Skip to content

Commit a0d18ac

Browse files
committed
add dummy common_hal_mcu_processor_get_voltage() for spresense
1 parent eca7343 commit a0d18ac

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/tinyusb

ports/cxd56/common-hal/microcontroller/Processor.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,20 @@
2626

2727
#include <sys/boardctl.h>
2828

29+
// For NAN: remove when not needed.
30+
#include <math.h>
2931
#include "py/mphal.h"
3032

3133
uint32_t common_hal_mcu_processor_get_frequency(void) {
3234
return mp_hal_ticks_cpu();
3335
}
3436

3537
float common_hal_mcu_processor_get_temperature(void) {
36-
return 0;
38+
return NAN;
39+
}
40+
41+
float common_hal_mcu_processor_get_voltage(void) {
42+
return NAN;
3743
}
3844

3945
void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) {

0 commit comments

Comments
 (0)