Skip to content

Commit d9ff37d

Browse files
committed
set power to grove connectors
1 parent 45cbeb6 commit d9ff37d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

libs/wio_lte/jswrap_wio_lte.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@ void jswrap_wio_lte_led(int r, int g, int b) {
5252
stm32_neopixelWrite(JSH_PORTB_OFFSET+1, rgb, 3);
5353
}
5454

55+
/*JSON{
56+
"type" : "staticmethod",
57+
"class" : "WioLTE",
58+
"name" : "setGrovePower",
59+
"generate" : "jswrap_wio_lte_setGrovePower",
60+
"params" : [
61+
["onoff","bool","Whether to turn the Grove connectors power on or off (D38 is always powered)"]
62+
]
63+
}
64+
Set the WIO's LED
65+
*/
66+
void jswrap_wio_lte_setGrovePower(bool pwr) {
67+
jshPinOutput(JSH_PORTB_OFFSET+10, pwr);
68+
}
69+
5570
/*JSON{
5671
"type" : "staticproperty",
5772
"class" : "WioLTE",

libs/wio_lte/jswrap_wio_lte.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
#include "jspin.h"
1515

1616
void jswrap_wio_lte_led(int r, int g, int b);
17+
void jswrap_wio_lte_setGrovePower(bool pwr);
1718
void jswrap_wio_lte_init();

0 commit comments

Comments
 (0)