summaryrefslogtreecommitdiff
path: root/shared-bindings/microcontroller/Processor.c
diff options
context:
space:
mode:
authordherrada <dylan.herrada@gmail.com>2020-05-07 15:59:52 -0400
committerdherrada <dylan.herrada@gmail.com>2020-05-07 15:59:52 -0400
commite31e9eeaa1e1dad1bd2243b7be76012aa2ee64b8 (patch)
tree1daaec28f2c720b735bb0336c09b6b068efa6158 /shared-bindings/microcontroller/Processor.c
parent4f33a20d17c7b7688e5dd1ee37346ff2d4f4a340 (diff)
Did math, microcontroller, and multiterminal
Diffstat (limited to 'shared-bindings/microcontroller/Processor.c')
-rw-r--r--shared-bindings/microcontroller/Processor.c49
1 files changed, 23 insertions, 26 deletions
diff --git a/shared-bindings/microcontroller/Processor.c b/shared-bindings/microcontroller/Processor.c
index 023f063e0..dedb5a27c 100644
--- a/shared-bindings/microcontroller/Processor.c
+++ b/shared-bindings/microcontroller/Processor.c
@@ -34,29 +34,29 @@
#include "py/runtime.h"
-//| .. currentmodule:: microcontroller
+//| class Processor:
+//| """.. currentmodule:: microcontroller
//|
-//| :class:`Processor` --- Microcontroller CPU information and control
-//| ------------------------------------------------------------------
+//| :class:`Processor` --- Microcontroller CPU information and control
+//| ------------------------------------------------------------------
//|
-//| Get information about the microcontroller CPU and control it.
+//| Get information about the microcontroller CPU and control it.
//|
-//| Usage::
+//| Usage::
//|
-//| import microcontroller
-//| print(microcontroller.cpu.frequency)
-//| print(microcontroller.cpu.temperature)
+//| import microcontroller
+//| print(microcontroller.cpu.frequency)
+//| print(microcontroller.cpu.temperature)"""
//|
-//| .. class:: Processor()
-//|
-//| You cannot create an instance of `microcontroller.Processor`.
-//| Use `microcontroller.cpu` to access the sole instance available.
+//| def __init__(self, ):
+//| """You cannot create an instance of `microcontroller.Processor`.
+//| Use `microcontroller.cpu` to access the sole instance available."""
+//| ...
//|
-//| .. attribute:: frequency
-//|
-//| The CPU operating frequency as an `int`, in Hertz. (read-only)
+//| frequency: Any = ...
+//| """The CPU operating frequency as an `int`, in Hertz. (read-only)"""
//|
STATIC mp_obj_t mcu_processor_get_frequency(mp_obj_t self) {
return mp_obj_new_int_from_uint(common_hal_mcu_processor_get_frequency());
@@ -72,11 +72,10 @@ const mp_obj_property_t mcu_processor_frequency_obj = {
},
};
-//| .. attribute:: temperature
-//|
-//| The on-chip temperature, in Celsius, as a float. (read-only)
+//| temperature: Any = ...
+//| """The on-chip temperature, in Celsius, as a float. (read-only)
//|
-//| Is `None` if the temperature is not available.
+//| Is `None` if the temperature is not available."""
//|
STATIC mp_obj_t mcu_processor_get_temperature(mp_obj_t self) {
float temperature = common_hal_mcu_processor_get_temperature();
@@ -93,9 +92,8 @@ const mp_obj_property_t mcu_processor_temperature_obj = {
},
};
-//| .. attribute:: uid
-//|
-//| The unique id (aka serial number) of the chip as a `bytearray`. (read-only)
+//| uid: Any = ...
+//| """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) {
uint8_t raw_id[COMMON_HAL_MCU_PROCESSOR_UID_LENGTH];
@@ -113,11 +111,10 @@ const mp_obj_property_t mcu_processor_uid_obj = {
},
};
-//| .. attribute:: voltage
-//|
-//| The input voltage to the microcontroller, as a float. (read-only)
+//| voltage: Any = ...
+//| """The input voltage to the microcontroller, as a float. (read-only)
//|
-//| Is `None` if the voltage is not available.
+//| Is `None` if the voltage is not available."""
//|
STATIC mp_obj_t mcu_processor_get_voltage(mp_obj_t self) {
float voltage = common_hal_mcu_processor_get_voltage();