Skip to content

Commit bd0f041

Browse files
committed
touch docs
1 parent dd1cf3e commit bd0f041

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

libs/banglejs/jswrap_bangle.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -4930,9 +4930,12 @@ void jswrap_banglejs_touchWr(JsVarInt reg, JsVarInt data) {
49304930
"touchRd(reg: number, cnt: number): number[];"
49314931
]
49324932
}
4933-
Reads a register from the touch controller
4934-
**Note:** On Espruino 2v06 and before this function only returns a number (`cnt`
4935-
is ignored).
4933+
Reads a register from the touch controller. See https://github.com/espruino/Espruino/issues/2146#issuecomment-2554296721 for a list
4934+
of registers.
4935+
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+
4938+
**Note:** On Espruino 2v06 and before this function only returns a number (`cnt` is ignored).
49364939
*/
49374940

49384941

0 commit comments

Comments
 (0)