From fdb97eda09ca1968df8a919d15ebd1fe191fb57e Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 31 Aug 2017 13:48:30 -0400 Subject: Add microcontroller.cpu.temperature, for use as a simple sensor on minimal boards. (#211) * Add microcontroller.cpu, the sole instance of microcontroller.Processor. microcontroller.cpu.frequency is the clock frequency, in Hz. microcontroller.cpu.temperature is the reading from the internal temperature sensor, in Celsius. None if not available. * Squeeze firmware size by using -finline-limit. Otherwise non-Express builds were slightly too big. * Update submodules. * Fix documentation glitches --- shared-bindings/microcontroller/__init__.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'shared-bindings/microcontroller/__init__.h') diff --git a/shared-bindings/microcontroller/__init__.h b/shared-bindings/microcontroller/__init__.h index 9bad926cd..d43db4bf4 100644 --- a/shared-bindings/microcontroller/__init__.h +++ b/shared-bindings/microcontroller/__init__.h @@ -1,3 +1,4 @@ + /* * This file is part of the MicroPython project, http://micropython.org/ * @@ -30,6 +31,8 @@ #include "py/mpconfig.h" #include "py/obj.h" +#include "common-hal/microcontroller/Processor.h" + extern void common_hal_mcu_delay_us(uint32_t); extern void common_hal_mcu_disable_interrupts(void); @@ -37,6 +40,9 @@ extern void common_hal_mcu_enable_interrupts(void); extern const mp_obj_dict_t mcu_pin_globals; +extern const mcu_processor_obj_t common_hal_mcu_processor_obj; + + #if CIRCUITPY_INTERNAL_NVM_SIZE > 0 #include "common-hal/nvm/ByteArray.h" -- cgit v1.2.3