From 0a8d9eed45422936bfa6df58d79ac2b4a855ca90 Mon Sep 17 00:00:00 2001 From: dherrada Date: Fri, 3 Jul 2020 10:33:28 -0400 Subject: [PATCH] Added type hints to microcontroller --- shared-bindings/microcontroller/Processor.c | 6 +++--- shared-bindings/microcontroller/RunMode.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/shared-bindings/microcontroller/Processor.c b/shared-bindings/microcontroller/Processor.c index c3c60d5cc6..32ec4f2e79 100644 --- a/shared-bindings/microcontroller/Processor.c +++ b/shared-bindings/microcontroller/Processor.c @@ -67,7 +67,7 @@ const mp_obj_property_t mcu_processor_frequency_obj = { }, }; -//| temperature: Any = ... +//| temperature: Optional[float] = ... //| """The on-chip temperature, in Celsius, as a float. (read-only) //| //| Is `None` if the temperature is not available.""" @@ -87,7 +87,7 @@ const mp_obj_property_t mcu_processor_temperature_obj = { }, }; -//| uid: Any = ... +//| uid: bytearray = ... //| """The unique id (aka serial number) of the chip as a `bytearray`. (read-only)""" //| STATIC mp_obj_t mcu_processor_get_uid(mp_obj_t self) { @@ -106,7 +106,7 @@ const mp_obj_property_t mcu_processor_uid_obj = { }, }; -//| voltage: Any = ... +//| voltage: Optional[float] = ... //| """The input voltage to the microcontroller, as a float. (read-only) //| //| Is `None` if the voltage is not available.""" diff --git a/shared-bindings/microcontroller/RunMode.c b/shared-bindings/microcontroller/RunMode.c index d4c10109a5..dce7a52301 100644 --- a/shared-bindings/microcontroller/RunMode.c +++ b/shared-bindings/microcontroller/RunMode.c @@ -33,18 +33,18 @@ //| """Enum-like class to define the run mode of the microcontroller and //| CircuitPython.""" //| -//| NORMAL: Any = ... +//| NORMAL: microcontroller.RunMode = ... //| """Run CircuitPython as normal. //| //| :type microcontroller.RunMode:""" //| -//| SAFE_MODE: Any = ... +//| SAFE_MODE: microcontroller.RunMode = ... //| """Run CircuitPython in safe mode. User code will not be run and the //| file system will be writeable over USB. //| //| :type microcontroller.RunMode:""" //| -//| BOOTLOADER: Any = ... +//| BOOTLOADER: microcontroller.RunMode = ... //| """Run the bootloader. //| //| :type microcontroller.RunMode:"""