Skip to content

Commit 9f00859

Browse files
authored
Update api_gpio.js
Externalise additional function hat allows to read the state of output GPIO pins
1 parent 8d2f612 commit 9f00859

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fs/api_gpio.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ let GPIO = {
3636
// ## **`GPIO.read(pin)`**
3737
// Read GPIO pin level. Return value: 0 or 1.
3838
read: ffi('int mgos_gpio_read(int)'),
39-
39+
40+
//read GPIO level for OUTPUT GPIO mode. Return value: 0 or 1.
41+
readout: ffi ('int mgos_gpio_read_out(int)'),
42+
4043
// ## **`GPIO.enable_int(pin)`**
4144
// Enable interrupts on GPIO pin.
4245
// This function must be called AFTER the interrupt handler is installed.

0 commit comments

Comments
 (0)