Skip to content

Commit 7e55905

Browse files
committed
Fix up onewireio docs and other notes
Not all of the notes were marked correctly.
1 parent de796e2 commit 7e55905

File tree

6 files changed

+14
-16
lines changed

6 files changed

+14
-16
lines changed

shared-bindings/_bleio/Adapter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,10 @@ const mp_obj_property_t bleio_adapter_name_obj = {
197197
//| """Starts advertising until `stop_advertising` is called or if connectable, another device
198198
//| connects to us.
199199
//|
200-
//| .. warning: If data is longer than 31 bytes, then this will automatically advertise as an
200+
//| .. warning:: If data is longer than 31 bytes, then this will automatically advertise as an
201201
//| extended advertisement that older BLE 4.x clients won't be able to scan for.
202202
//|
203-
//| .. note: If you set ``anonymous=True``, then a timeout must be specified. If no timeout is
203+
//| .. note:: If you set ``anonymous=True``, then a timeout must be specified. If no timeout is
204204
//| specified, then the maximum allowed timeout will be selected automatically.
205205
//|
206206
//| :param ~_typing.ReadableBuffer data: advertising data packet bytes

shared-bindings/canio/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ MAKE_ENUM_VALUE(canio_bus_state_type, bus_state, BUS_OFF, BUS_STATE_OFF);
8080
//| ERROR_WARNING: object
8181
//| """The bus is in the normal (active) state, but a moderate number of errors have occurred recently.
8282
//|
83-
//| NOTE: Not all implementations may use ERROR_WARNING. Do not rely on seeing ERROR_WARNING before ERROR_PASSIVE."""
83+
//| .. note:: Not all implementations may use ``ERROR_WARNING``. Do not rely on seeing ``ERROR_WARNING`` before ``ERROR_PASSIVE``."""
8484
//|
8585
//| ERROR_PASSIVE: object
8686
//| """The bus is in the passive state due to the number of errors that have occurred recently.

shared-bindings/keypad/EventQueue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(keypad_eventqueue_get_obj, keypad_eventqueue_get);
6868
//| Note that the queue size is limited; see ``max_events`` in the constructor of
6969
//| a scanner such as `Keys` or `KeyMatrix`.
7070
//|
71-
//| :return ``True`` if an event was available and stored, ``False`` if not.
71+
//| :return: ``True`` if an event was available and stored, ``False`` if not.
7272
//| :rtype: bool
7373
//| """
7474
//| ...

shared-bindings/onewireio/OneWire.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,16 @@
3535
#include "shared-bindings/util.h"
3636

3737
//| class OneWire:
38-
//| """Lowest-level of the Maxim OneWire protocol"""
39-
//|
4038
//| def __init__(self, pin: microcontroller.Pin) -> None:
41-
//| """(formerly Dallas Semi) OneWire protocol.
42-
//|
43-
//| Protocol definition is here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/126
39+
//| """Create a OneWire object associated with the given pin.
4440
//|
45-
//| .. class:: OneWire(pin)
46-
//|
47-
//| Create a OneWire object associated with the given pin. The object
48-
//| implements the lowest level timing-sensitive bits of the protocol.
41+
//| The object implements the lowest level timing-sensitive bits of the protocol.
4942
//|
5043
//| :param ~microcontroller.Pin pin: Pin connected to the OneWire bus
5144
//|
45+
//| .. note:: The OneWire class is available on `busio` and `bitbangio` in CircuitPython
46+
//| 7.x for backwards compatibility but will be removed in CircuitPython 8.0.0.
47+
//|
5248
//| Read a short series of pulses::
5349
//|
5450
//| import onewireio

shared-bindings/onewireio/__init__.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535

3636
#include "py/runtime.h"
3737

38-
//| """Low-level bit primitives for """
38+
//| """Low-level bit primitives for Maxim (formerly Dallas Semi) one-wire protocol.
39+
//|
40+
//| Protocol definition is here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/126"""
3941
//|
4042

4143
STATIC const mp_rom_map_elem_t onewireio_module_globals_table[] = {

shared-bindings/traceback/__init__.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ STATIC void traceback_exception_common(mp_print_t *print, mp_obj_t value, mp_obj
7373
//| these lines are concatenated and printed, exactly the same text is
7474
//| printed as does print_exception().
7575
//|
76-
//| .. note: Setting `chain` will have no effect as chained exceptions are not yet implemented.
76+
//| .. note:: Setting ``chain`` will have no effect as chained exceptions are not yet implemented.
7777
//|
7878
//| :param Type[BaseException] etype: This is ignored and inferred from the type of ``value``.
7979
//| :param BaseException value: The exception. Must be an instance of `BaseException`.
@@ -112,7 +112,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(traceback_format_exception_obj, 3, traceback_f
112112
//|
113113
//| """Prints exception information and stack trace entries.
114114
//|
115-
//| .. note: Setting `chain` will have no effect as chained exceptions are not yet implemented.
115+
//| .. note:: Setting ``chain`` will have no effect as chained exceptions are not yet implemented.
116116
//|
117117
//| :param Type[BaseException] etype: This is ignored and inferred from the type of ``value``.
118118
//| :param BaseException value: The exception. Must be an instance of `BaseException`.

0 commit comments

Comments
 (0)