summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared-bindings/neopixel_write/__init__.c13
-rw-r--r--shared-bindings/network/__init__.c10
-rw-r--r--shared-bindings/nvm/ByteArray.c34
-rw-r--r--shared-bindings/nvm/__init__.c5
4 files changed, 33 insertions, 29 deletions
diff --git a/shared-bindings/neopixel_write/__init__.c b/shared-bindings/neopixel_write/__init__.c
index 1ee66337b..f18c7fdfd 100644
--- a/shared-bindings/neopixel_write/__init__.c
+++ b/shared-bindings/neopixel_write/__init__.c
@@ -31,7 +31,7 @@
#include "shared-bindings/digitalio/DigitalInOut.h"
#include "supervisor/shared/translate.h"
-//| :mod:`neopixel_write` --- Low-level neopixel implementation
+//| """:mod:`neopixel_write` --- Low-level neopixel implementation
//| ===========================================================
//|
//| .. module:: neopixel_write
@@ -53,15 +53,14 @@
//| pin = digitalio.DigitalInOut(board.NEOPIXEL)
//| pin.direction = digitalio.Direction.OUTPUT
//| pixel_off = bytearray([0, 0, 0])
-//| neopixel_write.neopixel_write(pin, pixel_off)
+//| neopixel_write.neopixel_write(pin, pixel_off)"""
//|
-//| .. function:: neopixel_write(digitalinout, buf)
-//|
-//| Write buf out on the given DigitalInOut.
+//| def neopixel_write(digitalinout: digitalio.DigitalInOut, buf: bytearray) -> Any:
+//| """Write buf out on the given DigitalInOut.
//|
//| :param ~digitalio.DigitalInOut digitalinout: the DigitalInOut to output with
-//| :param bytearray buf: The bytes to clock out. No assumption is made about color order
-//|
+//| :param bytearray buf: The bytes to clock out. No assumption is made about color order"""
+//| ...
STATIC mp_obj_t neopixel_write_neopixel_write_(mp_obj_t digitalinout_obj, mp_obj_t buf) {
if (!MP_OBJ_IS_TYPE(digitalinout_obj, &digitalio_digitalinout_type)) {
mp_raise_TypeError_varg(translate("Expected a %q"), digitalio_digitalinout_type.name);
diff --git a/shared-bindings/network/__init__.c b/shared-bindings/network/__init__.c
index 01763a73c..4f03781cf 100644
--- a/shared-bindings/network/__init__.c
+++ b/shared-bindings/network/__init__.c
@@ -38,7 +38,7 @@
#if CIRCUITPY_NETWORK
-//| :mod:`network` --- Network Interface Management
+//| """:mod:`network` --- Network Interface Management
//| ===============================================
//|
//| .. module:: network
@@ -47,11 +47,11 @@
//|
//| This module provides a registry of configured NICs.
//| It is used by the 'socket' module to look up a suitable
-//| NIC when a socket is created.
+//| NIC when a socket is created."""
//|
-//| .. function:: route()
-//|
-//| Returns a list of all configured NICs.
+//| def route() -> Any:
+//| """Returns a list of all configured NICs."""
+//| ...
//|
STATIC mp_obj_t network_route(void) {
diff --git a/shared-bindings/nvm/ByteArray.c b/shared-bindings/nvm/ByteArray.c
index 31bedeacc..a28c2c4f9 100644
--- a/shared-bindings/nvm/ByteArray.c
+++ b/shared-bindings/nvm/ByteArray.c
@@ -31,29 +31,33 @@
#include "shared-bindings/nvm/ByteArray.h"
#include "supervisor/shared/translate.h"
-//| .. currentmodule:: nvm
+
+
+
+//| class ByteArray:
+//| """.. currentmodule:: nvm
//|
-//| :class:`ByteArray` -- Presents a stretch of non-volatile memory as a bytearray.
-//| ================================================================================
+//| :class:`ByteArray` -- Presents a stretch of non-volatile memory as a bytearray.
+//| ================================================================================
//|
-//| Non-volatile memory is available as a byte array that persists over reloads
-//| and power cycles. Each assignment causes an erase and write cycle so its recommended to assign
-//| all values to change at once.
+//| Non-volatile memory is available as a byte array that persists over reloads
+//| and power cycles. Each assignment causes an erase and write cycle so its recommended to assign
+//| all values to change at once.
//|
-//| Usage::
+//| Usage::
//|
-//| import microcontroller
-//| microcontroller.nvm[0:3] = b"\xcc\x10\x00"
+//| import microcontroller
+//| microcontroller.nvm[0:3] = b\"\xcc\x10\x00\""""
//|
-//| .. class:: ByteArray()
-//|
-//| Not currently dynamically supported. Access the sole instance through `microcontroller.nvm`.
+//| def __init__(self, ):
+//| """Not currently dynamically supported. Access the sole instance through `microcontroller.nvm`."""
+//| ...
//|
-//| .. method:: __len__()
-//|
-//| Return the length. This is used by (`len`)
+//| def __len__(self, ) -> Any:
+//| """Return the length. This is used by (`len`)"""
+//| ...
//|
STATIC mp_obj_t nvm_bytearray_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
nvm_bytearray_obj_t *self = MP_OBJ_TO_PTR(self_in);
diff --git a/shared-bindings/nvm/__init__.c b/shared-bindings/nvm/__init__.c
index 811855c09..3bd9a309b 100644
--- a/shared-bindings/nvm/__init__.c
+++ b/shared-bindings/nvm/__init__.c
@@ -31,7 +31,7 @@
#include "shared-bindings/nvm/__init__.h"
#include "shared-bindings/nvm/ByteArray.h"
-//| :mod:`nvm` --- Non-volatile memory
+//| """:mod:`nvm` --- Non-volatile memory
//| ===========================================================
//|
//| .. module:: nvm
@@ -47,7 +47,8 @@
//| .. toctree::
//| :maxdepth: 3
//|
-//| ByteArray
+//| ByteArray"""
+//|
STATIC const mp_rom_map_elem_t nvm_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_nvm) },
{ MP_ROM_QSTR(MP_QSTR_ByteArray), MP_ROM_PTR(&nvm_bytearray_type) },