diff options
| author | Dan Halbert <halbert@halwitz.org> | 2017-08-31 13:48:30 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-31 13:48:30 -0400 |
| commit | fdb97eda09ca1968df8a919d15ebd1fe191fb57e (patch) | |
| tree | 600ed31b4d8e7223719a6099fd862c11b9b73e9e /shared-bindings/microcontroller/__init__.h | |
| parent | f3cd6b0232ababc573ebfb13de12c197e0be6b4d (diff) | |
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
Diffstat (limited to 'shared-bindings/microcontroller/__init__.h')
| -rw-r--r-- | shared-bindings/microcontroller/__init__.h | 6 |
1 files changed, 6 insertions, 0 deletions
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" |
