8000 Merge pull request #10160 from dhalbert/9.2.x-doc-fixes · adafruit/circuitpython@ae285da · GitHub
[go: up one dir, main page]

Skip to content

Commit ae285da

Browse files
authored
Merge pull request #10160 from dhalbert/9.2.x-doc-fixes
Fix multiple documentation issues.
2 parents fcb6bea + edf507e commit ae285da

File tree

14 files changed

+53
-12
lines changed

14 files changed

+53
-12
lines changed

docs/library/errno.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
|see_cpython_module| :mod:`python:errno`.
88

99
This module provides access to symbolic error codes for `OSError` exception.
10-
The codes available may vary per CircuitPython build.
10+
Some codes are not available on the smallest CircuitPython builds, such as SAMD21, for space reasons.
1111

1212
Constants
1313
---------

shared-bindings/_stage/__init__.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
//| """C-level helpers for animation of sprites on a stage
1818
//|
19-
//| The `_stage` module contains native code to speed-up the ```stage`` Library
20-
//| <https://github.com/python-ugame/circuitpython-stage>`_."""
19+
//| The `_stage` module contains native code to speed-up the ``stage``
20+
//| `library <https://github.com/python-ugame/circuitpython-stage>`_."""
2121
//|
2222
//|
2323
//| def render(

shared-bindings/aesio/aes.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,10 @@ static void validate_length(aesio_aes_obj_t *self, size_t src_length,
177177
//| """Encrypt the buffer from ``src`` into ``dest``.
178178
//|
179179
//| For ECB mode, the buffers must be 16 bytes long. For CBC mode, the
180-
//| buffers must be a multiple of 16 bytes, and must be equal length. For
181-
//| CTR mode, there are no restrictions."""
180+
//| buffers must be a multiple of 16 bytes, and must be equal length.
181+
//| Any included padding must conform to the required padding style for the given mode.
182+
//| For CTR mode, there are no restrictions.
183+
//| """
182184
//| ...
183185
//|
184186
static mp_obj_t aesio_aes_encrypt_into(mp_obj_t self_in, mp_obj_t src, mp_obj_t dest) {

shared-bindings/alarm/time/TimeAlarm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ mp_obj_t MP_WEAK rtc_get_time_source_time(void) {
3535
//| If the given time is already in the past, then an exception is raised.
3636
//| If the sleep happens after the given time, then it will wake immediately
3737
//| due to this time alarm.
38+
//|
39+
//| Example::
40+
//|
41+
//| # Deep sleep for 30 seconds.
42+
//| time_alarm = alarm.time.TimeAlarm(monotonic_time=time.monotonic() + 30)
43+
//| alarm.exit_and_deep_sleep_until_alarms(time_alarm)
3844
//| """
3945
//| ...
4046
//|

shared-bindings/analogio/AnalogOut.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
//|
2121
//| **Limitations:** Not available on Nordic, RP2040, Spresense, as there is no on-chip DAC.
2222
//| On Espressif, available only on ESP32 and ESP32-S2; other chips do not have a DAC.
23+
//| On ESP32-S2 boards, GPIO18 (DAC2) is often connected to a pull-up resistor, which causes
24+
//| `unexpected output values in the lower part of the output range
25+
//| <https://github.com/adafruit/circuitpython/issues/7871>`_.
2326
//|
2427
//| Example usage::
2528
//|

shared-bindings/busio/I2C.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
//| bit unpacking. Instead, use an existing driver or make one with
4040
//| :ref:`Register <register-module-reference>` data descriptors.
4141
//|
42+
//| .. seealso:: This class provides an I2C controller, which controls I2C targets (peripherals).
43+
//| To act as an I2C target, use `i2ctarget.I2CTarget`.
44+
//|
4245
//| :param ~microcontroller.Pin scl: The clock pin
4346
//| :param ~microcontroller.Pin sda: The data pin
4447
//| :param int frequency: The clock frequency in Hertz

shared-bindings/busio/SPI.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
//| main device. It is typically faster than :py:class:`~bitbangio.I2C` because a
2929
//| separate pin is used to select a device rather than a transmitted
3030
//| address. This class only manages three of the four SPI lines: `!clock`,
31-
//| `!MOSI`, `!MISO`. Its up to the client to manage the appropriate
31+
//| `!MOSI`, `!MISO`. It is up to the client to manage the appropriate
3232
//| select line, often abbreviated `!CS` or `!SS`. (This is common because
3333
//| multiple secondaries can share the `!clock`, `!MOSI` and `!MISO` lines
3434
//| and therefore the hardware.)
@@ -46,6 +46,8 @@
4646
//| </details>
4747
//| </p>
4848
//|
49+
//| .. seealso:: This class acts as an SPI main (controller).
50+
//| To act as an SPI secondary (target), use `spitarget.SPITarget`.
4951
//| """
5052
//|
5153
//| def __init__(

shared-bindings/epaperdisplay/EPaperDisplay.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
//| is called. This is done so that CircuitPython can use the display itself.
3030
//|
3131
//| Most people should not use this class directly. Use a specific display driver instead that will
32-
//| contain the startup and shutdown sequences at minimum."""
32+
//| contain the startup and shutdown sequences at minimum.
33+
//| """
3334
//|
3435
//| def __init__(
3536
//| self,

shared-bindings/fourwire/FourWire.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020

2121
//| class FourWire:
2222
//| """Manage updating a display over SPI four wire protocol in the background while Python code runs.
23-
//| It doesn't handle display initiali C631 zation."""
23+
//| It doesn't handle display initialization.
24+
//|
25+
//| .. seealso:: See `busdisplay.BusDisplay` and `epaperdisplay.EPaperDisplay`
26+
//| for how to initialize a display, given a `FourWire` bus.
27+
//| """
2428
//|
2529
//| def __init__(
2630
//| self,

shared-bindings/i2cdisplaybus/I2CDisplayBus.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919

2020
//| class I2CDisplayBus:
2121
//| """Manage updating a display over I2C in the background while Python code runs.
22-
//| It doesn't handle display initialization."""
22+
//| It doesn't handle display initialization.
23+
//|
24+
//| .. seealso:: See `busdisplay.BusDisplay` and `epaperdisplay.EPaperDisplay`
25+
//| for how to initialize a display, given an `I2CDisplayBus`.
26+
//| """
2327
//|
2428
//| def __init__(
2529
//| self,

0 commit comments

Comments
 (0)
0