summaryrefslogtreecommitdiff
path: root/wasp/boards
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-06-22 21:22:40 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-06-22 21:22:40 (GMT)
commit417e408dc4821012d4b34a2bee28338cfc0b4295 (patch)
tree31b2403e8c536c8e7e2d9b2b84708dc779e75049 /wasp/boards
parentbbe8add40c82d4e2360d453ff277be9ce351c8e4 (diff)
drivers: hrs3300: Add a basic HRS3300 sensor driver
Add the driver and enable it on PineTime. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/boards')
-rw-r--r--wasp/boards/pinetime/manifest.py1
-rw-r--r--wasp/boards/pinetime/watch.py.in4
2 files changed, 4 insertions, 1 deletions
diff --git a/wasp/boards/pinetime/manifest.py b/wasp/boards/pinetime/manifest.py
index 073e1a0..59061b6 100644
--- a/wasp/boards/pinetime/manifest.py
+++ b/wasp/boards/pinetime/manifest.py
@@ -17,6 +17,7 @@ freeze('../..',
'drivers/bma421.py',
'drivers/battery.py',
'drivers/cst816s.py',
+ 'drivers/hrs3300.py',
'drivers/nrf_rtc.py',
'drivers/signal.py',
'drivers/st7789.py',
diff --git a/wasp/boards/pinetime/watch.py.in b/wasp/boards/pinetime/watch.py.in
index 058cdfd..d98c99d 100644
--- a/wasp/boards/pinetime/watch.py.in
+++ b/wasp/boards/pinetime/watch.py.in
@@ -20,6 +20,7 @@ from machine import SPI
from drivers.battery import Battery
from drivers.bma421 import BMA421
from drivers.cst816s import CST816S
+from drivers.hrs3300 import HRS3300
from drivers.signal import Signal
from drivers.st7789 import ST7789_SPI
from drivers.vibrator import Vibrator
@@ -81,6 +82,7 @@ try:
Signal(Pin('USB_PWR', Pin.IN), invert=True))
i2c = I2C(1, scl='I2C_SCL', sda='I2C_SDA')
accel = BMA421(i2c)
+ hrs = HRS3300(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)
@@ -93,7 +95,7 @@ try:
# Mount the filesystem
boot_msg("Init SPINOR")
- flash = FLASH(spi, (Pin('NOR_CS', Pin.OUT, value=1),))
+ flash = FLASH(spi, (nor_cs,))
try:
boot_msg("Mount FS")
os.mount(flash, '/flash')