Commit fa13cd92 authored by Russ's avatar Russ

TTGO T-Watch-2020 support and demo

parent 22e09516
......@@ -18,6 +18,11 @@ The firmware/pybv11 directory contains a firmware.dfu file with MicroPython
v1.12-464-gcae77daf0 compiled with the st7789 C driver and
the frozen python font files for the Pyboard v1.1.
The firmware/ttgo_watch directory contains a firmware.bin file with MicroPython
v1.12-464-gcae77daf0 compiled using ESP IDF v3 with the st7789
C driver, frozen axp202c driver from https://github.com/lewisxhe/AXP202X_Libraries
and the frozen python font files for the TTGO T-Watch-2020.
This is a work in progress.
Thanks go out to:
......
"""
watch_hello.py
Writes "Hello!" in random colors at random locations on a
LILYGO® TTGO T-Watch 2020.
Demo program for LILYGO® TTGO T-Watch-2020.
https://youtu.be/Bwq39tuMoY4
......
......@@ -10,7 +10,7 @@ the frozen python font files for the Pyboard v1.1.
The ttgo_watch directory contains a firmware.bin file with MicroPython
v1.12-464-gcae77daf0 compiled using ESP IDF v3 with the st7789
C driver, frozen axp202c driver from https://github.com/lewisxhe/AXP202X_Libraries
and the frozen python font files for the TTGO T-Watch 2020.
and the frozen python font files for the TTGO T-Watch-2020.
Frozen python bitmap font files included:
......
......@@ -34,7 +34,6 @@ from ustruct import unpack
# Chip Address
AXP202_SLAVE_ADDRESS = 0x35
AXP192_SLAVE_ADDRESS = 0x34
......@@ -670,7 +669,7 @@ class PMU(object):
mv = 3500
elif self.chip == AXP192_CHIP_ID and mv > 3300:
mv = 3300
if self.chip == AXP202_CHIP_ID:
val = (mv - 700) / 25
prev = self.read_byte(AXP202_LDO3OUT_VOL)
......@@ -684,7 +683,7 @@ class PMU(object):
prev &= 0xF0
prev = prev | int(val)
self.write_byte(AXP192_LDO23OUT_VOL, int(prev))
def setLDO4Voltage(self, arg):
data = self.read_byte(AXP202_LDO24OUT_VOL)
data = data & 0xF0
......@@ -789,7 +788,7 @@ class PMU(object):
if(mask):
return 0
return data & (~self.__BIT_MASK(7))
def setChgLEDChgControl(self):
data = self.read_byte(AXP202_OFF_CTL)
data = data & 0b111110111
......
......@@ -875,6 +875,7 @@ STATIC const mp_map_elem_t st7789_module_globals_table[] = {
STATIC MP_DEFINE_CONST_DICT (mp_module_st7789_globals, st7789_module_globals_table );
const mp_obj_module_t mp_module_st7789 = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t*)&mp_module_st7789_globals,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment