Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
st7789_mpy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
st7789_mpy
Commits
fa13cd92
Commit
fa13cd92
authored
Jul 24, 2020
by
Russ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TTGO T-Watch-2020 support and demo
parent
22e09516
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
7 deletions
+11
-7
README.md
README.md
+5
-0
examples/watch_hello.py
examples/watch_hello.py
+1
-2
firmware/README.md
firmware/README.md
+1
-1
lib/axp202c.py
lib/axp202c.py
+3
-4
st7789/st7789.c
st7789/st7789.c
+1
-0
No files found.
README.md
View file @
fa13cd92
...
...
@@ -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:
...
...
examples/watch_hello.py
View file @
fa13cd92
"""
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
...
...
firmware/README.md
View file @
fa13cd92
...
...
@@ -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:
...
...
lib/axp202c.py
View file @
fa13cd92
...
...
@@ -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
...
...
st7789/st7789.c
View file @
fa13cd92
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment