summaryrefslogtreecommitdiff
path: root/wasp/boards
diff options
context:
space:
mode:
Diffstat (limited to 'wasp/boards')
-rw-r--r--wasp/boards/pinetime/watch.py.in2
-rw-r--r--wasp/boards/simulator/watch.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/wasp/boards/pinetime/watch.py.in b/wasp/boards/pinetime/watch.py.in
index aaed767..2e8813f 100644
--- a/wasp/boards/pinetime/watch.py.in
+++ b/wasp/boards/pinetime/watch.py.in
@@ -32,6 +32,8 @@ from drivers.st7789 import ST7789_SPI
from drivers.vibrator import Vibrator
from flash.flash_spi import FLASH
+from ubluepy import uart_connected as connected
+
class Backlight(object):
lo = Pin("BL_LO", Pin.OUT, value=0)
mid = Pin("BL_MID", Pin.OUT, value=1)
diff --git a/wasp/boards/simulator/watch.py b/wasp/boards/simulator/watch.py
index abdf571..de1b584 100644
--- a/wasp/boards/simulator/watch.py
+++ b/wasp/boards/simulator/watch.py
@@ -182,3 +182,5 @@ rtc = RTC()
touch = CST816S(I2C(0), Pin('TP_INT', Pin.IN, quiet=True), Pin('TP_RST', Pin.OUT, quiet=True))
vibrator = Vibrator(Pin('MOTOR', Pin.OUT, value=0), active_low=True)
+def connected():
+ return not (int(rtc.uptime / 30) & 1)