diff options
| author | Taku Fukada <naninunenor@gmail.com> | 2020-07-25 17:58:37 +0900 |
|---|---|---|
| committer | Taku Fukada <naninunenor@gmail.com> | 2020-07-27 18:05:13 +0900 |
| commit | d356581651e4a11dc18787da95e2f96bfde3575d (patch) | |
| tree | aa6eb14d4bd0b1e29a79b26413d7ee90b57243e9 /shared-bindings/microcontroller | |
| parent | 54a342a7f5b74f32c7a53ea483d9046e688b9830 (diff) | |
Fix several type hints
Diffstat (limited to 'shared-bindings/microcontroller')
| -rw-r--r-- | shared-bindings/microcontroller/Pin.c | 2 | ||||
| -rw-r--r-- | shared-bindings/microcontroller/Processor.c | 8 | ||||
| -rw-r--r-- | shared-bindings/microcontroller/RunMode.c | 6 | ||||
| -rw-r--r-- | shared-bindings/microcontroller/__init__.c | 10 |
4 files changed, 16 insertions, 10 deletions
diff --git a/shared-bindings/microcontroller/Pin.c b/shared-bindings/microcontroller/Pin.c index 931c0b4c4..1294b78f0 100644 --- a/shared-bindings/microcontroller/Pin.c +++ b/shared-bindings/microcontroller/Pin.c @@ -39,7 +39,7 @@ //| def __init__(self) -> None: //| """Identifies an IO pin on the microcontroller. They are fixed by the //| hardware so they cannot be constructed on demand. Instead, use -//| `board` or `microcontroller.pin` to reference the desired pin.""" +//| :mod:`board` or :mod:`microcontroller.pin` to reference the desired pin.""" //| ... //| diff --git a/shared-bindings/microcontroller/Processor.c b/shared-bindings/microcontroller/Processor.c index d9f780f84..8c703891d 100644 --- a/shared-bindings/microcontroller/Processor.c +++ b/shared-bindings/microcontroller/Processor.c @@ -50,7 +50,7 @@ //| ... //| -//| frequency: int = ... +//| frequency: int //| """The CPU operating frequency in Hertz. (read-only)""" //| STATIC mp_obj_t mcu_processor_get_frequency(mp_obj_t self) { @@ -67,7 +67,7 @@ const mp_obj_property_t mcu_processor_frequency_obj = { }, }; -//| temperature: Optional[float] = ... +//| 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: bytearray = ... +//| 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: Optional[float] = ... +//| 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 38bbb612b..a54f40cac 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: RunMode = ... +//| NORMAL: RunMode //| """Run CircuitPython as normal. //| //| :type microcontroller.RunMode:""" //| -//| SAFE_MODE: RunMode = ... +//| SAFE_MODE: 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: RunMode = ... +//| BOOTLOADER: RunMode //| """Run the bootloader. //| //| :type microcontroller.RunMode:""" diff --git a/shared-bindings/microcontroller/__init__.c b/shared-bindings/microcontroller/__init__.c index a75082340..c00b1e314 100644 --- a/shared-bindings/microcontroller/__init__.c +++ b/shared-bindings/microcontroller/__init__.c @@ -48,7 +48,7 @@ //| microcontroller. See `board` for board-specific pin mappings.""" //| -//| cpu: Processor = ... +//| cpu: Processor //| """CPU information and control, such as ``cpu.temperature`` and ``cpu.frequency`` //| (clock frequency). //| This object is the sole instance of `microcontroller.Processor`.""" @@ -133,13 +133,19 @@ STATIC mp_obj_t mcu_reset(void) { } STATIC MP_DEFINE_CONST_FUN_OBJ_0(mcu_reset_obj, mcu_reset); -//| nvm: Optional[nvm.ByteArray] = ... +//| nvm: Optional[nvm.ByteArray] //| """Available non-volatile memory. //| This object is the sole instance of `nvm.ByteArray` when available or ``None`` otherwise. //| //| :type: nvm.ByteArray or None""" //| +//| watchdog: Optional[watchdog.WatchDogTimer] +//| """Available watchdog timer. +//| This object is the sole instance of `watchdog.WatchDogTimer` when available or ``None`` otherwise.""" +//| + + //| """:mod:`microcontroller.pin` --- Microcontroller pin names //| -------------------------------------------------------- //| |
