Skip to content

Commit f15eceb

Browse files
committed
Document more classes that can be separately enabled
1 parent aca93d0 commit f15eceb

File tree

8 files changed

+89
-5
lines changed

8 files changed

+89
-5
lines changed

docs/shared_bindings_matrix.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,14 @@
6969
"array": "CIRCUITPY_ARRAY",
7070
# always available, so depend on something that's always 1.
7171
"builtins": "CIRCUITPY",
72+
"busio.SPI": "CIRCUITPY_BUSIO_SPI",
73+
"busio.UART": "CIRCUITPY_BUSIO_UART",
7274
"collections": "CIRCUITPY_COLLECTIONS",
7375
"fontio": "CIRCUITPY_DISPLAYIO",
7476
"io": "CIRCUITPY_IO",
77+
"keypad.KeyMatrix": "CIRCUITPY_KEYPAD_KEYMATRIX",
78+
"keypad.Keys": "CIRCUITPY_KEYPAD_KEYS",
79+
"keypad.ShiftRegisterKeys": "CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS",
7580
"os.getenv": "CIRCUITPY_OS_GETENV",
7681
"select": "MICROPY_PY_USELECT_SELECT",
7782
"sys": "CIRCUITPY_SYS",

shared-bindings/busio/SPI.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,22 @@
5252
//| `!MOSI`, `!MISO`. Its up to the client to manage the appropriate
5353
//| select line, often abbreviated `!CS` or `!SS`. (This is common because
5454
//| multiple secondaries can share the `!clock`, `!MOSI` and `!MISO` lines
55-
//| and therefore the hardware.)"""
55+
//| and therefore the hardware.)
56+
//|
57+
//| .. raw:: html
58+
//|
59+
//| <p>
60+
//| <details>
61+
//| <summary>Available on these boards</summary>
62+
//| <ul>
63+
//| {% for board in support_matrix_reverse["busio.SPI"] %}
64+
//| <li> {{ board }}
65+
//| {% endfor %}
66+
//| </ul>
67+
//| </details>
68+
//| </p>
69+
//|
70+
//| """
5671
//|
5772
//| def __init__(
5873
//| self,

shared-bindings/busio/UART.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,22 @@
4444
// #define STREAM_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
4545

4646
//| class UART:
47-
//| """A bidirectional serial protocol"""
47+
//| """A bidirectional serial protocol
48+
//|
49+
//| .. raw:: html
50+
//|
51+
//| <p>
52+
//| <details>
53+
//| <summary>Available on these boards</summary>
54+
//| <ul>
55+
//| {% for board in support_matrix_reverse["busio.UART"] %}
56+
//| <li> {{ board }}
57+
//| {% endfor %}
58+
//| </ul>
59+
//| </details>
60+
//| </p>
61+
//|
62+
//| """
4863
//|
4964
//| def __init__(
5065
//| self,

shared-bindings/busio/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
//|
7878
//| Tutorial for UART:
7979
//| https://learn.adafruit.com/circuitpython-essentials/circuitpython-uart-serial
80+
//|
81+
//| .. jinja
8082
//| """
8183

8284
STATIC const mp_rom_map_elem_t busio_module_globals_table[] = {

shared-bindings/keypad/KeyMatrix.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,22 @@
3535
#include "shared-bindings/util.h"
3636

3737
//| class KeyMatrix:
38-
//| """Manage a 2D matrix of keys with row and column pins."""
38+
//| """Manage a 2D matrix of keys with row and column pins.
39+
//|
40+
//| .. raw:: html
41+
//|
42+
//| <p>
43+
//| <details>
44+
//| <summary>Available on these boards</summary>
45+
//| <ul>
46+
//| {% for board in support_matrix_reverse["keypad.KeyMatrix"] %}
47+
//| <li> {{ board }}
48+
//| {% endfor %}
49+
//| </ul>
50+
//| </details>
51+
//| </p>
52+
//|
53+
//| """
3954
//|
4055
//| def __init__(
4156
//| self,

shared-bindings/keypad/Keys.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,22 @@
3535
#include "shared-bindings/util.h"
3636

3737
//| class Keys:
38-
//| """Manage a set of independent keys."""
38+
//| """Manage a set of independent keys.
39+
//|
40+
//| .. raw:: html
41+
//|
42+
//| <p>
43+
//| <details>
44+
//| <summary>Available on these boards</summary>
45+
//| <ul>
46+
//| {% for board in support_matrix_reverse["keypad.Keys"] %}
47+
//| <li> {{ board }}
48+
//| {% endfor %}
49+
//| </ul>
50+
//| </details>
51+
//| </p>
52+
//|
53+
//| """
3954
//|
4055
//| def __init__(
4156
//| self,

shared-bindings/keypad/ShiftRegisterKeys.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,22 @@
3535
#include "shared-bindings/util.h"
3636

3737
//| class ShiftRegisterKeys:
38-
//| """Manage a set of keys attached to an incoming shift register."""
38+
//| """Manage a set of keys attached to an incoming shift register.
39+
//|
40+
//| .. raw:: html
41+
//|
42+
//| <p>
43+
//| <details>
44+
//| <summary>Available on these boards</summary>
45+
//| <ul>
46+
//| {% for board in support_matrix_reverse["keypad.ShiftRegisterKeys"] %}
47+
//| <li> {{ board }}
48+
//| {% endfor %}
49+
//| </ul>
50+
//| </details>
51+
//| </p>
52+
//|
53+
//| """
3954
//|
4055
//| def __init__(
4156
//| self,

shared-bindings/keypad/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ const mp_obj_property_t keypad_generic_events_obj = {
8989
//|
9090
//| For more information about working with the `keypad` module in CircuitPython,
9191
//| see `this Learn guide <https://learn.adafruit.com/key-pad-matrix-scanning-in-circuitpython>`_.
92+
//|
93+
//| .. jinja
9294
//| """
9395

9496
STATIC mp_rom_map_elem_t keypad_module_globals_table[] = {

0 commit comments

Comments
 (0)