wasp: pinetime: Start an RTC at board board

This commit is contained in:
Daniel Thompson 2020-02-01 13:42:11 +00:00
parent a70f82cf74
commit fed9c58205
2 changed files with 7 additions and 2 deletions

@ -1 +1 @@
Subproject commit e668ed3ed3778bf5aea08e766cc8d82eb0a4c247
Subproject commit b2273b5d22bc4d948b5333b2b82a7be66f62cefd

View file

@ -1,4 +1,5 @@
from machine import Pin
from machine import RTCounter as RTC
#from machine import Signal
from machine import SPI
@ -12,7 +13,7 @@ class Display(ST7789_SPI):
spi = SPI(0)
# Mode 3, maximum clock speed!
spi.init(polarity=1, phase=1, baudrate=8000000)
# Configure the display
cs = Pin("DISP_CS", Pin.OUT)
dc = Pin("DISP_DC", Pin.OUT)
@ -48,6 +49,10 @@ backlight = Backlight(0)
display = Display()
backlight.set(1)
# Start measuring time (and feeding the watchdog)
rtc = RTC(1, mode=RTC.PERIODIC)
rtc.start()
battery = Battery(
Pin('BATTERY', Pin.IN),
Signal(Pin('CHARGING', Pin.IN), invert=True),