Skip to content

Commit 38549ab

Browse files
committed
more minor tweaks
1 parent bd0f041 commit 38549ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libs/banglejs/jswrap_bangle.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -4931,9 +4931,10 @@ void jswrap_banglejs_touchWr(JsVarInt reg, JsVarInt data) {
49314931
]
49324932
}
49334933
Reads a register from the touch controller. See https://github.com/espruino/Espruino/issues/2146#issuecomment-2554296721 for a list
4934-
of registers.
4934+
of registers. When the touchscreen is off (eg the Bangle is locked) then reading from any register will return `255` (`0xFF`) -
4935+
so ensure the Bangle is unlocked with `Bangle.setLocked(false)` before trying to read or write.
49354936
4936-
For example `print(Bangle.touchRd(0xa7).toString(16))` returns the `ChipID` register, which is 0xB4 (CST816S) on older Bangles or 0xB6 (CST816D) on newer ones.
4937+
For example `print(Bangle.touchRd(0xa7).toString(16))` returns the `ChipID` register, which is `0xB4` (CST816S) on older Bangles or `0xB6` (CST816D) on newer ones.
49374938
49384939
**Note:** On Espruino 2v06 and before this function only returns a number (`cnt` is ignored).
49394940
*/

0 commit comments

Comments
 (0)