Skip to content

Commit 742b44b

Browse files
committed
Don't turn on analog power in here.
1 parent c1c8efe commit 742b44b

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

build/devices/gecko/analog/xsAnalog.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,11 @@ static void calibrate() {
3333

3434
void xs_Analog(xsMachine *the) {
3535
adcSetup();
36-
#ifdef MODDEF_ANALOG_POWER_PIN
37-
GPIO_PinModeSet(MODDEF_ANALOG_POWER_PORT, MODDEF_ANALOG_POWER_PIN, gpioModePushPull, 0);
38-
#endif
3936
// calibrate();
4037
}
4138

4239
void xs_Analog_destructor(void *data) {
4340
adcTerminate();
44-
#ifdef MODDEF_ANALOG_POWER_PIN
45-
GPIO_PinOutClear( MODDEF_ANALOG_POWER_PORT, MODDEF_ANALOG_POWER_PIN );
46-
GPIO_PinModeSet(MODDEF_ANALOG_POWER_PORT, MODDEF_ANALOG_POWER_PIN, gpioModeDisabled, 0);
47-
#endif
4841
}
4942

5043
void xs_Analog_sleepEM4() {
@@ -91,13 +84,11 @@ void xs_Analog_read(xsMachine *the) {
9184
xsUnknownError("bad analog input # " + chan);
9285
}
9386
if (gotChan) {
94-
GPIO_PinOutSet( MODDEF_ANALOG_POWER_PORT, MODDEF_ANALOG_POWER_PIN );
9587
#ifdef MODDEF_ANALOG_REF
9688
ret = adcSingle(true, inputChan, MODDEF_ANALOG_REF);
9789
#else
9890
ret = adcSingle(true, inputChan, adcRefVDD);
9991
#endif
100-
GPIO_PinOutClear( MODDEF_ANALOG_POWER_PORT, MODDEF_ANALOG_POWER_PIN );
10192
}
10293

10394
xsResult = xsInteger(ret);

0 commit comments

Comments
 (0)