1
0
Fork 0

wasp: pinetime: Enable the cst816s by default

This commit is contained in:
Daniel Thompson 2020-03-07 11:48:17 +00:00
parent e5f455b5ba
commit 1b334f7ad9
2 changed files with 6 additions and 1 deletions

View file

@ -6,6 +6,7 @@ freeze('../..',
'demo.py',
'draw565.py',
'drivers/battery.py',
'drivers/cst816s.py',
'drivers/nrf_rtc.py',
'drivers/signal.py',
'drivers/st7789.py',

View file

@ -7,11 +7,13 @@ rtc.counter.start()
import os
import time
from machine import I2C
from machine import Pin
#from machine import Signal
from machine import SPI
from drivers.battery import Battery
from drivers.cst816s import CST816S
from drivers.signal import Signal
from drivers.st7789 import ST7789_SPI
from drivers.vibrator import Vibrator
@ -55,8 +57,10 @@ battery = Battery(
Pin('BATTERY', Pin.IN),
Signal(Pin('CHARGING', Pin.IN), invert=True),
Signal(Pin('USB_PWR', Pin.IN), invert=True))
vibrator = Vibrator(Pin('MOTOR', Pin.OUT, value=0), active_low=True)
button = Pin('BUTTON', Pin.IN)
i2c = I2C(1, scl='I2C_SCL', sda='I2C_SDA')
touch = CST816S(i2c)
vibrator = Vibrator(Pin('MOTOR', Pin.OUT, value=0), active_low=True)
# Mount the filesystem
flash = FLASH(spi, (Pin('NOR_CS', Pin.OUT, value=1),))