File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed
build/devices/gecko/analog Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -33,18 +33,11 @@ static void calibrate() {
3333
3434void 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
4239void 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
5043void 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 );
You can’t perform that action at this time.
0 commit comments