Skip to content

Commit 9af0940

Browse files
authored
Merge pull request #1225 from lanselambor/master
Merge pull request #1 from espruino/master
2 parents b49b6a3 + 9cd6c92 commit 9af0940

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

libs/wio_lte/jswrap_wio_lte.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,27 @@ void jswrap_wio_lte_led(int r, int g, int b) {
6161
["onoff","bool","Whether to turn the Grove connectors power on or off (D38 is always powered)"]
6262
]
6363
}
64-
Set the WIO's LED
64+
Set the power of Grove connecters, except D38 D39 they are always on
6565
*/
6666
void jswrap_wio_lte_setGrovePower(bool pwr) {
6767
jshPinOutput(JSH_PORTB_OFFSET+10, pwr);
6868
}
6969

70+
/*JSON{
71+
"type" : "staticmethod",
72+
"class" : "WioLTE",
73+
"name" : "setLEDPower",
74+
"generate" : "jswrap_wio_lte_setLEDPower",
75+
"params" : [
76+
["onoff","bool","Whether to turn the Grove connectors power on or off (D38 is always powered)"]
77+
]
78+
}
79+
Set the WIO's LED
80+
*/
81+
void jswrap_wio_lte_setLEDPower(bool pwr) {
82+
jshPinOutput(JSH_PORTA_OFFSET+8, pwr);
83+
}
84+
7085
/*JSON{
7186
"type" : "staticproperty",
7287
"class" : "WioLTE",

libs/wio_lte/jswrap_wio_lte.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515

1616
void jswrap_wio_lte_led(int r, int g, int b);
1717
void jswrap_wio_lte_setGrovePower(bool pwr);
18+
void jswrap_wio_lte_setLEDPower(bool pwr);
1819
void jswrap_wio_lte_init();

0 commit comments

Comments
 (0)