@@ -37,7 +37,6 @@ extern void DeInitPwm();
3737#include < sys_dev_usbstream_native_target.h>
3838#endif
3939
40-
4140// global mutex protecting the internal state of the interpreter, including event flags
4241// mutex_t interpreterGlobalMutex;
4342
@@ -51,9 +50,9 @@ extern "C"
5150 nanoHAL_Initialize ();
5251 }
5352
54- void nanoHAL_Uninitialize_C ()
53+ void nanoHAL_Uninitialize_C (bool isPoweringDown )
5554 {
56- nanoHAL_Uninitialize ();
55+ nanoHAL_Uninitialize (isPoweringDown );
5756 }
5857}
5958
@@ -138,10 +137,10 @@ void nanoHAL_Initialize()
138137#endif
139138
140139#if (GECKO_USE_ADC0 == TRUE) && defined(NANO_GG_ADC_NATIVE_TARGET_H)
141- adc0Initialized = false ;
140+ adc0Initialized = false ;
142141#endif
143142#if (GECKO_USE_ADC1 == TRUE) && defined(NANO_GG_ADC_NATIVE_TARGET_H)
144- adc1Initialized = false ;
143+ adc1Initialized = false ;
145144#endif
146145
147146#if GECKO_FEATURE_USBD_WINUSB == TRUE
@@ -205,8 +204,10 @@ adc1Initialized = false;
205204 Network_Initialize ();
206205}
207206
208- void nanoHAL_Uninitialize ()
207+ void nanoHAL_Uninitialize (bool isPoweringDown )
209208{
209+ (void )isPoweringDown;
210+
210211 // release the global mutex, just in case it's locked somewhere
211212 // chMtxUnlock(&interpreterGlobalMutex);
212213
@@ -283,16 +284,16 @@ void nanoHAL_Uninitialize()
283284#endif
284285
285286#if (GECKO_USE_ADC0 == TRUE) && defined(NANO_GG_ADC_NATIVE_TARGET_H)
286- ADC_Reset (ADC0);
287- adc0Initialized = false ;
287+ ADC_Reset (ADC0);
288+ adc0Initialized = false ;
288289#endif
289290#if (GECKO_USE_ADC1 == TRUE) && defined(NANO_GG_ADC_NATIVE_TARGET_H)
290- ADC_Reset (ADC1);
291- adc1Initialized = false ;
291+ ADC_Reset (ADC1);
292+ adc1Initialized = false ;
292293#endif
293294
294295#if GECKO_FEATURE_USBD_WINUSB == TRUE
295-
296+
296297 // abort any transfer in progress, just in case
297298 sl_usbd_vendor_abort_write_bulk (sl_usbd_vendor_winusb_number);
298299 sl_usbd_vendor_abort_read_bulk (sl_usbd_vendor_winusb_number);
0 commit comments