summaryrefslogtreecommitdiff
path: root/shared-bindings/microcontroller
diff options
context:
space:
mode:
Diffstat (limited to 'shared-bindings/microcontroller')
-rw-r--r--shared-bindings/microcontroller/Pin.c2
-rw-r--r--shared-bindings/microcontroller/RunMode.c14
-rw-r--r--shared-bindings/microcontroller/__init__.c16
3 files changed, 20 insertions, 12 deletions
diff --git a/shared-bindings/microcontroller/Pin.c b/shared-bindings/microcontroller/Pin.c
index e79663107..3635f0afb 100644
--- a/shared-bindings/microcontroller/Pin.c
+++ b/shared-bindings/microcontroller/Pin.c
@@ -40,7 +40,7 @@
//|
//| Identifies an IO pin on the microcontroller.
//|
-//| .. class:: Pin
+//| .. class:: Pin()
//|
//| Identifies an IO pin on the microcontroller. They are fixed by the
//| hardware so they cannot be constructed on demand. Instead, use
diff --git a/shared-bindings/microcontroller/RunMode.c b/shared-bindings/microcontroller/RunMode.c
index 7c3f84fca..913242ad2 100644
--- a/shared-bindings/microcontroller/RunMode.c
+++ b/shared-bindings/microcontroller/RunMode.c
@@ -31,24 +31,30 @@
//| :class:`RunMode` -- run state of the microcontroller
//| =============================================================
//|
-//| .. class:: microcontroller.RunMode
+//| .. class:: RunMode()
//|
//| Enum-like class to define the run mode of the microcontroller and
//| CircuitPython.
//|
-//| .. data:: NORMAL
+//| .. attribute:: NORMAL
//|
//| Run CircuitPython as normal.
//|
-//| .. data:: SAFE_MODE
+//| :type microcontroller.RunMode:
+//|
+//| .. attribute:: SAFE_MODE
//|
//| Run CircuitPython in safe mode. User code will not be run and the
//| file system will be writeable over USB.
//|
-//| .. data:: BOOTLOADER
+//| :type microcontroller.RunMode:
+//|
+//| .. attribute:: BOOTLOADER
//|
//| Run the bootloader.
//|
+//| :type microcontroller.RunMode:
+//|
const mp_obj_type_t mcu_runmode_type;
const mcu_runmode_obj_t mcu_runmode_normal_obj = {
diff --git a/shared-bindings/microcontroller/__init__.c b/shared-bindings/microcontroller/__init__.c
index da8d0bd94..090c4564d 100644
--- a/shared-bindings/microcontroller/__init__.c
+++ b/shared-bindings/microcontroller/__init__.c
@@ -62,14 +62,14 @@
//| RunMode
//|
-//| .. attribute:: cpu
+//| .. data:: cpu
//|
//| CPU information and control, such as ``cpu.temperature`` and ``cpu.frequency``
//| (clock frequency).
//| This object is the sole instance of `microcontroller.Processor`.
//|
-//| .. method:: delay_us(delay)
+//| .. function:: delay_us(delay)
//|
//| Dedicated delay method used for very short delays. **Do not** do long delays
//| because this stops all other functions from completing. Think of this as an empty
@@ -87,7 +87,7 @@ STATIC mp_obj_t mcu_delay_us(mp_obj_t delay_obj) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mcu_delay_us_obj, mcu_delay_us);
-//| .. method:: disable_interrupts()
+//| .. function:: disable_interrupts()
//|
//| Disable all interrupts. Be very careful, this can stall everything.
//|
@@ -97,7 +97,7 @@ STATIC mp_obj_t mcu_disable_interrupts(void) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mcu_disable_interrupts_obj, mcu_disable_interrupts);
-//| .. method:: enable_interrupts()
+//| .. function:: enable_interrupts()
//|
//| Enable the interrupts that were enabled at the last disable.
//|
@@ -107,7 +107,7 @@ STATIC mp_obj_t mcu_enable_interrupts(void) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mcu_enable_interrupts_obj, mcu_enable_interrupts);
-//| .. method:: on_next_reset(run_mode)
+//| .. function:: on_next_reset(run_mode)
//|
//| Configure the run mode used the next time the microcontroller is reset but
//| not powered down.
@@ -132,7 +132,7 @@ STATIC mp_obj_t mcu_on_next_reset(mp_obj_t run_mode_obj) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(mcu_on_next_reset_obj, mcu_on_next_reset);
-//| .. method:: reset()
+//| .. function:: reset()
//|
//| Reset the microcontroller. After reset, the microcontroller will enter the
//| run mode last set by `on_next_reset`.
@@ -148,11 +148,13 @@ STATIC mp_obj_t mcu_reset(void) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(mcu_reset_obj, mcu_reset);
-//| .. attribute:: nvm
+//| .. data:: nvm
//|
//| Available non-volatile memory.
//| This object is the sole instance of `nvm.ByteArray` when available or ``None`` otherwise.
//|
+//| :type: nvm.ByteArray or None
+//|
//| :mod:`microcontroller.pin` --- Microcontroller pin names
//| --------------------------------------------------------