diff options
| author | Fuji Pebri <pebri86@gmail.com> | 2020-06-09 10:18:27 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2020-06-11 20:17:16 (GMT) |
| commit | df9d80f6f7c906764b02f33a7491d36bfe7efd52 (patch) | |
| tree | d40e9e73561ec5d594277e009079d08f4dd44d04 /wasp/boards | |
| parent | acf318c122c635fef3dbe1f89806b5a4192500b6 (diff) | |
drivers: cst816s: optimize for power saving and responsiveness
Signed-off-by: Fuji Pebri <pebri86@gmail.com>
[daniel@redfelineinja.org.uk: removed leading underscore from method
arguments, removed redundant state tracking, adopt i2c.writeto_mem]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/boards')
| -rw-r--r-- | wasp/boards/pinetime/watch.py.in | 2 | ||||
| -rw-r--r-- | wasp/boards/simulator/watch.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/wasp/boards/pinetime/watch.py.in b/wasp/boards/pinetime/watch.py.in index ef7d0f4..058cdfd 100644 --- a/wasp/boards/pinetime/watch.py.in +++ b/wasp/boards/pinetime/watch.py.in @@ -81,7 +81,7 @@ try: Signal(Pin('USB_PWR', Pin.IN), invert=True)) i2c = I2C(1, scl='I2C_SCL', sda='I2C_SDA') accel = BMA421(i2c) - touch = CST816S(i2c) + touch = CST816S(i2c, Pin('TP_INT', Pin.IN), Pin('TP_RST', Pin.OUT, value=0)) vibrator = Vibrator(Pin('MOTOR', Pin.OUT, value=0), active_low=True) # Release flash from deep power-down diff --git a/wasp/boards/simulator/watch.py b/wasp/boards/simulator/watch.py index c6dafc3..b12ec94 100644 --- a/wasp/boards/simulator/watch.py +++ b/wasp/boards/simulator/watch.py @@ -13,6 +13,7 @@ def print_exception(exc, file=sys.stdout): sys.print_exception = print_exception import draw565 +import array from machine import I2C from machine import Pin |
