File tree Expand file tree Collapse file tree 2 files changed +1
-11
lines changed
common-hal/microcontroller Expand file tree Collapse file tree 2 files changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -279,9 +279,6 @@ float common_hal_mcu_processor_get_temperature(void) {
279
279
}
280
280
281
281
float common_hal_mcu_processor_get_voltage (void ) {
282
- #if MICROCONTROLLER_VOLTAGE_DISABLE
283
- return NAN ;
284
- #else
285
282
struct adc_sync_descriptor adc ;
286
283
287
284
static Adc * adc_insts [] = ADC_INSTS ;
@@ -292,6 +289,7 @@ float common_hal_mcu_processor_get_voltage(void) {
292
289
#endif
293
290
294
291
#ifdef SAM_D5X_E5X
292
+ hri_supc_clear_VREF_ONDEMAND_bit (SUPC );
295
293
hri_supc_set_VREF_SEL_bf (SUPC , SUPC_VREF_SEL_1V0_Val );
296
294
hri_supc_set_VREF_VREFOE_bit (SUPC );
297
295
@@ -326,7 +324,6 @@ float common_hal_mcu_processor_get_voltage(void) {
326
324
adc_sync_deinit (& adc );
327
325
// Multiply by 4 to compensate for SCALEDIOVCC division by 4.
328
326
return (reading / 4095.0f ) * 4.0f ;
329
- #endif
330
327
}
331
328
332
329
uint32_t common_hal_mcu_processor_get_frequency (void ) {
Original file line number Diff line number Diff line change 73
73
#define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51"
74
74
#elif defined(SAME54 )
75
75
#define MICROPY_PY_SYS_PLATFORM "MicroChip SAME54"
76
- #ifndef MICROCONTROLLER_VOLTAGE_DISABLE
77
- #define MICROCONTROLLER_VOLTAGE_DISABLE (1)
78
- #endif
79
76
#endif
80
77
#define SPI_FLASH_MAX_BAUDRATE 24000000
81
78
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1)
243
240
CIRCUITPY_COMMON_ROOT_POINTERS \
244
241
mp_obj_t playing_audio[AUDIO_DMA_CHANNEL_COUNT];
245
242
246
- #ifndef MICROCONTROLLER_VOLTAGE_DISABLE
247
- #define MICROCONTROLLER_VOLTAGE_DISABLE (0)
248
- #endif
249
-
250
243
#endif // __INCLUDED_MPCONFIGPORT_H
You can’t perform that action at this time.
0 commit comments