Skip to content

Commit a2a32fe

Browse files
committed
Added newlines after every ellipsis
1 parent 093461e commit a2a32fe

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

shared-bindings/busio/I2C.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
//| except on the Circuit Playground Bluefruit, which allows two,
6666
//| one for the onboard accelerometer, and one for offboard use."""
6767
//| ...
68+
//|
6869
STATIC mp_obj_t busio_i2c_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
6970
busio_i2c_obj_t *self = m_new_obj(busio_i2c_obj_t);
7071
self->base.type = &busio_i2c_type;
@@ -88,6 +89,7 @@ STATIC mp_obj_t busio_i2c_make_new(const mp_obj_type_t *type, size_t n_args, con
8889
//| def deinit(self, ) -> Any:
8990
//| """Releases control of the underlying hardware so other classes can use it."""
9091
//| ...
92+
//|
9193
STATIC mp_obj_t busio_i2c_obj_deinit(mp_obj_t self_in) {
9294
busio_i2c_obj_t *self = MP_OBJ_TO_PTR(self_in);
9395
common_hal_busio_i2c_deinit(self);
@@ -104,12 +106,14 @@ STATIC void check_for_deinit(busio_i2c_obj_t *self) {
104106
//| def __enter__(self, ) -> Any:
105107
//| """No-op used in Context Managers."""
106108
//| ...
109+
//|
107110
// Provided by context manager helper.
108111

109112
//| def __exit__(self, ) -> Any:
110113
//| """Automatically deinitializes the hardware on context exit. See
111114
//| :ref:`lifetime-and-contextmanagers` for more info."""
112115
//| ...
116+
//|
113117
STATIC mp_obj_t busio_i2c_obj___exit__(size_t n_args, const mp_obj_t *args) {
114118
(void)n_args;
115119
common_hal_busio_i2c_deinit(args[0]);
@@ -132,6 +136,7 @@ static void check_lock(busio_i2c_obj_t *self) {
132136
//| :return: List of device ids on the I2C bus
133137
//| :rtype: list"""
134138
//| ...
139+
//|
135140
STATIC mp_obj_t busio_i2c_scan(mp_obj_t self_in) {
136141
busio_i2c_obj_t *self = MP_OBJ_TO_PTR(self_in);
137142
check_for_deinit(self);
@@ -154,6 +159,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(busio_i2c_scan_obj, busio_i2c_scan);
154159
//| :return: True when lock has been grabbed
155160
//| :rtype: bool"""
156161
//| ...
162+
//|
157163
STATIC mp_obj_t busio_i2c_obj_try_lock(mp_obj_t self_in) {
158164
busio_i2c_obj_t *self = MP_OBJ_TO_PTR(self_in);
159165
check_for_deinit(self);
@@ -164,6 +170,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(busio_i2c_try_lock_obj, busio_i2c_obj_try_lock);
164170
//| def unlock(self, ) -> Any:
165171
//| """Releases the I2C lock."""
166172
//| ...
173+
//|
167174
STATIC mp_obj_t busio_i2c_obj_unlock(mp_obj_t self_in) {
168175
busio_i2c_obj_t *self = MP_OBJ_TO_PTR(self_in);
169176
check_for_deinit(self);
@@ -186,6 +193,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(busio_i2c_unlock_obj, busio_i2c_obj_unlock);
186193
//| :param int start: Index to start writing at
187194
//| :param int end: Index to write up to but not include. Defaults to ``len(buffer)``"""
188195
//| ...
196+
//|
189197
// Shared arg parsing for readfrom_into and writeto_then_readfrom.
190198
STATIC void readfrom(busio_i2c_obj_t *self, mp_int_t address, mp_obj_t buffer, int32_t start, mp_int_t end) {
191199
mp_buffer_info_t bufinfo;
@@ -243,6 +251,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(busio_i2c_readfrom_into_obj, 3, busio_i2c_readfrom_in
243251
//| :param bool stop: If true, output an I2C stop condition after the buffer is written.
244252
//| Deprecated. Will be removed in 6.x and act as stop=True."""
245253
//| ...
254+
//|
246255
// Shared arg parsing for writeto and writeto_then_readfrom.
247256
STATIC void writeto(busio_i2c_obj_t *self, mp_int_t address, mp_obj_t buffer, int32_t start, mp_int_t end, bool stop) {
248257
// get the buffer to write the data from
@@ -298,6 +307,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(busio_i2c_writeto_obj, 1, busio_i2c_writeto);
298307
//| :param int in_start: Index to start writing at
299308
//| :param int in_end: Index to write up to but not include. Defaults to ``len(buffer)``"""
300309
//| ...
310+
//|
301311
STATIC mp_obj_t busio_i2c_writeto_then_readfrom(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
302312
enum { ARG_address, ARG_out_buffer, ARG_in_buffer, ARG_out_start, ARG_out_end, ARG_in_start, ARG_in_end };
303313
static const mp_arg_t allowed_args[] = {

shared-bindings/busio/OneWire.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
//| onewire.write_bit(False)
6464
//| print(onewire.read_bit())"""
6565
//| ...
66+
//|
6667
STATIC mp_obj_t busio_onewire_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
6768
enum { ARG_pin };
6869
static const mp_arg_t allowed_args[] = {
@@ -82,6 +83,7 @@ STATIC mp_obj_t busio_onewire_make_new(const mp_obj_type_t *type, size_t n_args,
8283
//| def deinit(self, ) -> Any:
8384
//| """Deinitialize the OneWire bus and release any hardware resources for reuse."""
8485
//| ...
86+
//|
8587
STATIC mp_obj_t busio_onewire_deinit(mp_obj_t self_in) {
8688
busio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in);
8789
common_hal_busio_onewire_deinit(self);
@@ -98,12 +100,14 @@ STATIC void check_for_deinit(busio_onewire_obj_t *self) {
98100
//| def __enter__(self, ) -> Any:
99101
//| """No-op used by Context Managers."""
100102
//| ...
103+
//|
101104
// Provided by context manager helper.
102105

103106
//| def __exit__(self, ) -> Any:
104107
//| """Automatically deinitializes the hardware when exiting a context. See
105108
//| :ref:`lifetime-and-contextmanagers` for more info."""
106109
//| ...
110+
//|
107111
STATIC mp_obj_t busio_onewire_obj___exit__(size_t n_args, const mp_obj_t *args) {
108112
(void)n_args;
109113
common_hal_busio_onewire_deinit(args[0]);
@@ -117,6 +121,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_onewire___exit___obj, 4, 4, bus
117121
//| :returns: False when at least one device is present
118122
//| :rtype: bool"""
119123
//| ...
124+
//|
120125
STATIC mp_obj_t busio_onewire_obj_reset(mp_obj_t self_in) {
121126
busio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in);
122127
check_for_deinit(self);
@@ -131,6 +136,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(busio_onewire_reset_obj, busio_onewire_obj_reset);
131136
//| :returns: bit state read
132137
//| :rtype: bool"""
133138
//| ...
139+
//|
134140
STATIC mp_obj_t busio_onewire_obj_read_bit(mp_obj_t self_in) {
135141
busio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in);
136142
check_for_deinit(self);
@@ -142,6 +148,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(busio_onewire_read_bit_obj, busio_onewire_obj_read_bit
142148
//| def write_bit(self, value: Any) -> Any:
143149
//| """Write out a bit based on value."""
144150
//| ...
151+
//|
145152
STATIC mp_obj_t busio_onewire_obj_write_bit(mp_obj_t self_in, mp_obj_t bool_obj) {
146153
busio_onewire_obj_t *self = MP_OBJ_TO_PTR(self_in);
147154
check_for_deinit(self);

shared-bindings/busio/SPI.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
//| :param ~microcontroller.Pin MOSI: the Master Out Slave In pin.
7979
//| :param ~microcontroller.Pin MISO: the Master In Slave Out pin."""
8080
//| ...
81+
//|
8182

8283

8384
// TODO(tannewt): Support LSB SPI.
@@ -104,6 +105,7 @@ STATIC mp_obj_t busio_spi_make_new(const mp_obj_type_t *type, size_t n_args, con
104105
//| def deinit(self, ) -> Any:
105106
//| """Turn off the SPI bus."""
106107
//| ...
108+
//|
107109
STATIC mp_obj_t busio_spi_obj_deinit(mp_obj_t self_in) {
108110
busio_spi_obj_t *self = MP_OBJ_TO_PTR(self_in);
109111
common_hal_busio_spi_deinit(self);
@@ -115,11 +117,13 @@ MP_DEFINE_CONST_FUN_OBJ_1(busio_spi_deinit_obj, busio_spi_obj_deinit);
115117
//| """No-op used by Context Managers.
116118
//| Provided by context manager helper."""
117119
//| ...
120+
//|
118121

119122
//| def __exit__(self, ) -> Any:
120123
//| """Automatically deinitializes the hardware when exiting a context. See
121124
//| :ref:`lifetime-and-contextmanagers` for more info."""
122125
//| ...
126+
//|
123127
STATIC mp_obj_t busio_spi_obj___exit__(size_t n_args, const mp_obj_t *args) {
124128
(void)n_args;
125129
common_hal_busio_spi_deinit(args[0]);
@@ -162,6 +166,7 @@ STATIC void check_for_deinit(busio_spi_obj_t *self) {
162166
//| Two SPI objects may be created, except on the Circuit Playground Bluefruit,
163167
//| which allows only one (to allow for an additional I2C object)."""
164168
//| ...
169+
//|
165170

166171
STATIC mp_obj_t busio_spi_configure(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
167172
enum { ARG_baudrate, ARG_polarity, ARG_phase, ARG_bits };
@@ -204,6 +209,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_configure_obj, 1, busio_spi_configure);
204209
//| :return: True when lock has been grabbed
205210
//| :rtype: bool"""
206211
//| ...
212+
//|
207213

208214
STATIC mp_obj_t busio_spi_obj_try_lock(mp_obj_t self_in) {
209215
busio_spi_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -214,6 +220,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(busio_spi_try_lock_obj, busio_spi_obj_try_lock);
214220
//| def unlock(self, ) -> Any:
215221
//| """Releases the SPI lock."""
216222
//| ...
223+
//|
217224

218225
STATIC mp_obj_t busio_spi_obj_unlock(mp_obj_t self_in) {
219226
busio_spi_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -231,6 +238,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(busio_spi_unlock_obj, busio_spi_obj_unlock);
231238
//| :param int start: Start of the slice of ``buffer`` to write out: ``buffer[start:end]``
232239
//| :param int end: End of the slice; this index is not included. Defaults to ``len(buffer)``"""
233240
//| ...
241+
//|
234242

235243
STATIC mp_obj_t busio_spi_write(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
236244
enum { ARG_buffer, ARG_start, ARG_end };
@@ -274,6 +282,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_write_obj, 2, busio_spi_write);
274282
//| :param int end: End of the slice; this index is not included. Defaults to ``len(buffer)``
275283
//| :param int write_value: Value to write while reading. (Usually ignored.)"""
276284
//| ...
285+
//|
277286

278287
STATIC mp_obj_t busio_spi_readinto(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
279288
enum { ARG_buffer, ARG_start, ARG_end, ARG_write_value };
@@ -321,6 +330,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_readinto_obj, 2, busio_spi_readinto);
321330
//| :param int in_start: Start of the slice of ``buffer_in`` to read into: ``buffer_in[in_start:in_end]``
322331
//| :param int in_end: End of the slice; this index is not included. Defaults to ``len(buffer_in)``"""
323332
//| ...
333+
//|
324334

325335
STATIC mp_obj_t busio_spi_write_readinto(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
326336
enum { ARG_buffer_out, ARG_buffer_in, ARG_out_start, ARG_out_end, ARG_in_start, ARG_in_end };

shared-bindings/busio/UART.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
//| *New in CircuitPython 4.0:* ``timeout`` has incompatibly changed units from milliseconds to seconds.
6565
//| The new upper limit on ``timeout`` is meant to catch mistaken use of milliseconds."""
6666
//| ...
67+
//|
6768
typedef struct {
6869
mp_obj_base_t base;
6970
} busio_uart_parity_obj_t;
@@ -144,6 +145,7 @@ STATIC mp_obj_t busio_uart_make_new(const mp_obj_type_t *type, size_t n_args, co
144145
//| def deinit(self, ) -> Any:
145146
//| """Deinitialises the UART and releases any hardware resources for reuse."""
146147
//| ...
148+
//|
147149
STATIC mp_obj_t busio_uart_obj_deinit(mp_obj_t self_in) {
148150
busio_uart_obj_t *self = MP_OBJ_TO_PTR(self_in);
149151
common_hal_busio_uart_deinit(self);
@@ -160,12 +162,14 @@ STATIC void check_for_deinit(busio_uart_obj_t *self) {
160162
//| def __enter__(self, ) -> Any:
161163
//| """No-op used by Context Managers."""
162164
//| ...
165+
//|
163166
// Provided by context manager helper.
164167

165168
//| def __exit__(self, ) -> Any:
166169
//| """Automatically deinitializes the hardware when exiting a context. See
167170
//| :ref:`lifetime-and-contextmanagers` for more info."""
168171
//| ...
172+
//|
169173
STATIC mp_obj_t busio_uart_obj___exit__(size_t n_args, const mp_obj_t *args) {
170174
(void)n_args;
171175
common_hal_busio_uart_deinit(args[0]);
@@ -184,6 +188,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_uart___exit___obj, 4, 4, busio_
184188
//| :return: Data read
185189
//| :rtype: bytes or None"""
186190
//| ...
191+
//|
187192

188193
//| def readinto(self, buf: Any) -> Any:
189194
//| """Read bytes into the ``buf``. Read at most ``len(buf)`` bytes.
@@ -193,13 +198,15 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_uart___exit___obj, 4, 4, busio_
193198
//|
194199
//| *New in CircuitPython 4.0:* No length parameter is permitted."""
195200
//| ...
201+
//|
196202

197203
//| def readline(self, ) -> Any:
198204
//| """Read a line, ending in a newline character.
199205
//|
200206
//| :return: the line read
201207
//| :rtype: int or None"""
202208
//| ...
209+
//|
203210

204211
//| def write(self, buf: Any) -> Any:
205212
//| """Write the buffer of bytes to the bus.
@@ -209,6 +216,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(busio_uart___exit___obj, 4, 4, busio_
209216
//| :return: the number of bytes written
210217
//| :rtype: int or None"""
211218
//| ...
219+
//|
212220

213221
// These three methods are used by the shared stream methods.
214222
STATIC mp_uint_t busio_uart_read(mp_obj_t self_in, void *buf_in, mp_uint_t size, int *errcode) {
@@ -344,6 +352,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(busio_uart_reset_input_buffer_obj, busio_uart_o
344352
//| EVEN: Any = ...
345353
//| """Total number of ones should be even."""
346354
//| ...
355+
//|
347356
const mp_obj_type_t busio_uart_parity_type;
348357

349358
const busio_uart_parity_obj_t busio_uart_parity_odd_obj = {

0 commit comments

Comments
 (0)