Skip to content

Commit 8104b82

Browse files
committed
Standardize CPU temp and voltage. Add autogen warning
1 parent 18207cd commit 8104b82

File tree

35 files changed

+249
-9
lines changed

35 files changed

+249
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ float common_hal_mcu_processor_get_temperature(void) {
3434
}
3535

3636
float common_hal_mcu_processor_get_voltage(void) {
37-
return 1.2f;
37+
return NAN;
3838
}
3939

4040
uint32_t common_hal_mcu_processor_get_frequency(void) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
float common_hal_mcu_processor_get_temperature(void) {
4848
float tsens_out;
4949
#if defined(CONFIG_IDF_TARGET_ESP32)
50-
mp_raise_NotImplementedError(NULL);
50+
return NAN;
5151
#else
5252
temp_sensor_config_t temp_sensor = TSENS_CONFIG_DEFAULT(); // DEFAULT: range:-10℃ ~ 80℃, error < 1℃.
5353
temp_sensor_set_config(temp_sensor);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ float common_hal_mcu_processor_get_temperature(void) {
5454

5555
return temp;
5656
#else
57-
return 0;
57+
return NAN;
5858
#endif
5959
}
6060

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1011` to update this file.
35+
*/
36+
2937
#include "py/obj.h"
3038
#include "py/mphal.h"
3139
#include "mimxrt10xx/periph.h"

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1011` to update this file.
35+
*/
36+
2937
#pragma once
3038
extern LPI2C_Type *const mcu_i2c_banks[2];
3139
extern const mcu_periph_obj_t mcu_i2c_sda_list[8];

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/pins.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1011` to update this file.
35+
*/
36+
2937
#include "py/obj.h"
3038
#include "py/mphal.h"
3139
#include "mimxrt10xx/pins.h"

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/pins.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1011` to update this file.
35+
*/
36+
2937
#pragma once
3038

3139
#define FORMAT_PIN(pin_name) extern const mcu_pin_obj_t pin_##pin_name;

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/periph.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1015` to update this file.
35+
*/
36+
2937
#include "py/obj.h"
3038
#include "py/mphal.h"
3139
#include "mimxrt10xx/periph.h"

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/periph.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1015` to update this file.
35+
*/
36+
2937
#pragma once
3038
extern LPI2C_Type *const mcu_i2c_banks[2];
3139
extern const mcu_periph_obj_t mcu_i2c_sda_list[2];

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/pins.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1015` to update this file.
35+
*/
36+
2937
#include "py/obj.h"
3038
#include "py/mphal.h"
3139
#include "mimxrt10xx/pins.h"

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/pins.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1015` to update this file.
35+
*/
36+
2937
#pragma once
3038

3139
#define FORMAT_PIN(pin_name) extern const mcu_pin_obj_t pin_##pin_name;

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1021` to update this file.
35+
*/
36+
2937
#include "py/obj.h"
3038
#include "py/mphal.h"
3139
#include "mimxrt10xx/periph.h"

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1021` to update this file.
35+
*/
36+
2937
#pragma once
3038
extern LPI2C_Type *const mcu_i2c_banks[4];
3139
extern const mcu_periph_obj_t mcu_i2c_sda_list[8];

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pins.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1021` to update this file.
35+
*/
36+
2937
#include "py/obj.h"
3038
#include "py/mphal.h"
3139
#include "mimxrt10xx/pins.h"

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pins.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1021` to update this file.
35+
*/
36+
2937
#pragma once
3038

3139
#define FORMAT_PIN(pin_name) extern const mcu_pin_obj_t pin_##pin_name;

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/periph.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1042` to update this file.
35+
*/
36+
2937
#include "py/obj.h"
3038
#include "py/mphal.h"
3139
#include "mimxrt10xx/periph.h"

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/periph.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1042` to update this file.
35+
*/
36+
2937
#pragma once
3038
extern LPI2C_Type *const mcu_i2c_banks[4];
3139
extern const mcu_periph_obj_t mcu_i2c_sda_list[9];

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/pins.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1042` to update this file.
35+
*/
36+
2937
#include "py/obj.h"
3038
#include "py/mphal.h"
3139
#include "mimxrt10xx/pins.h"

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/pins.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1042` to update this file.
35+
*/
36+
2937
#pragma once
3038

3139
#define FORMAT_PIN(pin_name) extern const mcu_pin_obj_t pin_##pin_name;

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/periph.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1052` to update this file.
35+
*/
36+
2937
#include "py/obj.h"
3038
#include "py/mphal.h"
3139
#include "mimxrt10xx/periph.h"

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/periph.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1052` to update this file.
35+
*/
36+
2937
#pragma once
3038
extern LPI2C_Type *const mcu_i2c_banks[4];
3139
extern const mcu_periph_obj_t mcu_i2c_sda_list[9];

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/pins.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1052` to update this file.
35+
*/
36+
2937
#include "py/obj.h"
3038
#include "py/mphal.h"
3139
#include "mimxrt10xx/pins.h"

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/pins.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1052` to update this file.
35+
*/
36+
2937
#pragma once
3038

3139
#define FORMAT_PIN(pin_name) extern const mcu_pin_obj_t pin_##pin_name;

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1062` to update this file.
35+
*/
36+
2937
#include "py/obj.h"
3038
#include "py/mphal.h"
3139
#include "mimxrt10xx/periph.h"

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1062` to update this file.
35+
*/
36+
2937
#pragma once
3038
extern LPI2C_Type *const mcu_i2c_banks[4];
3139
extern const mcu_periph_obj_t mcu_i2c_sda_list[9];

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/pins.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1062` to update this file.
35+
*/
36+
2937
#include "py/obj.h"
3038
#include "py/mphal.h"
3139
#include "mimxrt10xx/pins.h"

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/pins.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
* THE SOFTWARE.
2727
*/
2828

29+
/*
30+
* This file is autogenerated! Do NOT hand edit it. Instead, edit tools/gen_peripherals_data.py and
31+
* then rerun the script. You'll need to 1) clone https://github.com/nxp-mcuxpresso/mcux-soc-svd/
32+
* and 2) download and extract config tools data from https://mcuxpresso.nxp.com/en/select_config_tools_data.
33+
*
34+
* Run `python tools/gen_peripherals_data.py <svd dir> <config dir> MIMXRT1062` to update this file.
35+
*/
36+
2937
#pragma once
3038

3139
#define FORMAT_PIN(pin_name) extern const mcu_pin_obj_t pin_##pin_name;

0 commit comments

Comments
 (0)