Skip to content

Commit 1acafbf

Browse files
committed
Fix n_args_min on many MP_DEFINE_CONST_FUN_OBJ_KW()
1 parent 75db5a2 commit 1acafbf

File tree

23 files changed

+82
-77
lines changed

23 files changed

+82
-77
lines changed

locale/circuitpython.pot

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3943,6 +3943,7 @@ msgstr ""
39433943
#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h
39443944
#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
39453945
#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h
3946+
#: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h
39463947
#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h
39473948
#: ports/espressif/boards/artisense_rd00/mpconfigboard.h
39483949
#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h
@@ -3961,6 +3962,7 @@ msgstr ""
39613962
#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h
39623963
#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
39633964
#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h
3965+
#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h
39643966
#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h
39653967
#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h
39663968
#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h

shared-bindings/_bleio/Adapter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ STATIC mp_obj_t bleio_adapter_start_advertising(mp_uint_t n_args, const mp_obj_t
271271

272272
return mp_const_none;
273273
}
274-
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_adapter_start_advertising_obj, 2, bleio_adapter_start_advertising);
274+
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_adapter_start_advertising_obj, 1, bleio_adapter_start_advertising);
275275

276276
//| def stop_advertising(self) -> None:
277277
//| """Stop sending advertising packets."""
@@ -456,7 +456,7 @@ STATIC mp_obj_t bleio_adapter_connect(mp_uint_t n_args, const mp_obj_t *pos_args
456456

457457
return common_hal_bleio_adapter_connect(self, address, timeout);
458458
}
459-
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_adapter_connect_obj, 2, bleio_adapter_connect);
459+
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_adapter_connect_obj, 1, bleio_adapter_connect);
460460

461461
//| def erase_bonding(self) -> None:
462462
//| """Erase all bonding information stored in flash memory."""

shared-bindings/_bleio/Characteristic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ STATIC mp_obj_t bleio_characteristic_add_to_service(size_t n_args, const mp_obj_
156156

157157
return MP_OBJ_FROM_PTR(characteristic);
158158
}
159-
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_characteristic_add_to_service_fun_obj, 3, bleio_characteristic_add_to_service);
159+
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_characteristic_add_to_service_fun_obj, 1, bleio_characteristic_add_to_service);
160160
STATIC MP_DEFINE_CONST_CLASSMETHOD_OBJ(bleio_characteristic_add_to_service_obj, MP_ROM_PTR(&bleio_characteristic_add_to_service_fun_obj));
161161

162162

shared-bindings/_bleio/Descriptor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ STATIC mp_obj_t bleio_descriptor_add_to_characteristic(size_t n_args, const mp_o
136136

137137
return MP_OBJ_FROM_PTR(descriptor);
138138
}
139-
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_descriptor_add_to_characteristic_fun_obj, 3, bleio_descriptor_add_to_characteristic);
139+
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_descriptor_add_to_characteristic_fun_obj, 1, bleio_descriptor_add_to_characteristic);
140140
STATIC MP_DEFINE_CONST_CLASSMETHOD_OBJ(bleio_descriptor_add_to_characteristic_obj, MP_ROM_PTR(&bleio_descriptor_add_to_characteristic_fun_obj));
141141

142142
//| uuid: UUID

shared-bindings/_bleio/ScanEntry.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ STATIC mp_obj_t bleio_scanentry_matches(mp_uint_t n_args, const mp_obj_t *pos_ar
7272
mp_get_buffer_raise(args[ARG_prefixes].u_obj, &bufinfo, MP_BUFFER_READ);
7373
return mp_obj_new_bool(common_hal_bleio_scanentry_matches(self, bufinfo.buf, bufinfo.len, match_all));
7474
}
75-
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_scanentry_matches_obj, 2, bleio_scanentry_matches);
75+
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_scanentry_matches_obj, 1, bleio_scanentry_matches);
7676

7777
//| address: Address
7878
//| """The address of the device (read-only), of type `_bleio.Address`."""

shared-bindings/_bleio/UUID.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ STATIC mp_obj_t bleio_uuid_pack_into(mp_uint_t n_args, const mp_obj_t *pos_args,
214214
common_hal_bleio_uuid_pack_into(self, bufinfo.buf + offset);
215215
return mp_const_none;
216216
}
217-
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_uuid_pack_into_obj, 2, bleio_uuid_pack_into);
217+
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_uuid_pack_into_obj, 1, bleio_uuid_pack_into);
218218

219219
STATIC const mp_rom_map_elem_t bleio_uuid_locals_dict_table[] = {
220220
{ MP_ROM_QSTR(MP_QSTR_uuid16), MP_ROM_PTR(&bleio_uuid_uuid16_obj) },

shared-bindings/adafruit_bus_device/I2CDevice.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,16 @@ STATIC mp_obj_t adafruit_bus_device_i2cdevice_obj___exit__(size_t n_args, const
109109
}
110110
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(adafruit_bus_device_i2cdevice___exit___obj, 4, 4, adafruit_bus_device_i2cdevice_obj___exit__);
111111

112-
//| def readinto(self, buf: WriteableBuffer, *, start: int = 0, end: Optional[int] = None) -> None:
113-
//| """Read into ``buf`` from the device. The number of bytes read will be the
114-
//| length of ``buf``.
112+
//| def readinto(self, buffer: WriteableBuffer, *, start: int = 0, end: int = len(buffer)) -> None:
113+
//| """Read into ``buffer`` from the device. The number of bytes read will be the
114+
//| length of ``buffer``.
115115
//| If ``start`` or ``end`` is provided, then the buffer will be sliced
116-
//| as if ``buf[start:end]``. This will not cause an allocation like
117-
//| ``buf[start:end]`` will so it saves memory.
116+
//| as if ``buffer[start:end]``. This will not cause an allocation like
117+
//| ``buffer[start:end]`` will so it saves memory.
118118
//|
119-
//| :param bytearray buf: buffer to write into
119+
//| :param bytearray buffer: buffer to write into
120120
//| :param int start: Index to start writing at
121-
//| :param int end: Index to write up to but not include; if None, use ``len(buf)``"""
121+
//| :param int end: Index to write up to but not include; if None, use ``len(buffer)``"""
122122
//| ...
123123
//|
124124
STATIC mp_obj_t adafruit_bus_device_i2cdevice_readinto(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
@@ -152,17 +152,17 @@ STATIC mp_obj_t adafruit_bus_device_i2cdevice_readinto(size_t n_args, const mp_o
152152

153153
return mp_const_none;
154154
}
155-
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(adafruit_bus_device_i2cdevice_readinto_obj, 2, adafruit_bus_device_i2cdevice_readinto);
155+
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(adafruit_bus_device_i2cdevice_readinto_obj, 1, adafruit_bus_device_i2cdevice_readinto);
156156

157-
//| def write(self, buf: ReadableBuffer, *, start: int = 0, end: Optional[int] = None) -> None:
157+
//| def write(self, buffer: ReadableBuffer, *, start: int = 0, end: int = len(buffer)) -> None:
158158
//| """Write the bytes from ``buffer`` to the device, then transmit a stop bit.
159159
//| If ``start`` or ``end`` is provided, then the buffer will be sliced
160160
//| as if ``buffer[start:end]``. This will not cause an allocation like
161161
//| ``buffer[start:end]`` will so it saves memory.
162162
//|
163-
//| :param bytearray buf: buffer containing the bytes to write
163+
//| :param bytearray buffer: buffer containing the bytes to write
164164
//| :param int start: Index to start writing from
165-
//| :param int end: Index to read up to but not include; if None, use ``len(buf)``
165+
//| :param int end: Index to read up to but not include; if None, use ``len(buffer)``
166166
//| """
167167
//| ...
168168
//|
@@ -196,10 +196,10 @@ STATIC mp_obj_t adafruit_bus_device_i2cdevice_write(size_t n_args, const mp_obj_
196196

197197
return mp_const_none;
198198
}
199-
MP_DEFINE_CONST_FUN_OBJ_KW(adafruit_bus_device_i2cdevice_write_obj, 2, adafruit_bus_device_i2cdevice_write);
199+
MP_DEFINE_CONST_FUN_OBJ_KW(adafruit_bus_device_i2cdevice_write_obj, 1, adafruit_bus_device_i2cdevice_write);
200200

201201

202-
//| def write_then_readinto(self, out_buffer: WriteableBuffer, in_buffer: ReadableBuffer, *, out_start: int = 0, out_end: Optional[int] = None, in_start: int = 0, in_end: Optional[int] = None) -> None:
202+
//| def write_then_readinto(self, out_buffer: WriteableBuffer, in_buffer: ReadableBuffer, *, out_start: int = 0, out_end: int = len(out_buffer), in_start: int = 0, in_end: int = len(in_buffer)) -> None:
203203
//| """Write the bytes from ``out_buffer`` to the device, then immediately
204204
//| reads into ``in_buffer`` from the device. The number of bytes read
205205
//| will be the length of ``in_buffer``.
@@ -263,7 +263,7 @@ STATIC mp_obj_t adafruit_bus_device_i2cdevice_write_then_readinto(size_t n_args,
263263

264264
return mp_const_none;
265265
}
266-
MP_DEFINE_CONST_FUN_OBJ_KW(adafruit_bus_device_i2cdevice_write_then_readinto_obj, 3, adafruit_bus_device_i2cdevice_write_then_readinto);
266+
MP_DEFINE_CONST_FUN_OBJ_KW(adafruit_bus_device_i2cdevice_write_then_readinto_obj, 1, adafruit_bus_device_i2cdevice_write_then_readinto);
267267

268268
STATIC const mp_rom_map_elem_t adafruit_bus_device_i2cdevice_locals_dict_table[] = {
269269
{ MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&adafruit_bus_device_i2cdevice___enter___obj) },

shared-bindings/bitbangio/I2C.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ STATIC mp_obj_t bitbangio_i2c_obj_unlock(mp_obj_t self_in) {
165165
}
166166
MP_DEFINE_CONST_FUN_OBJ_1(bitbangio_i2c_unlock_obj, bitbangio_i2c_obj_unlock);
167167

168-
//| def readfrom_into(self, address: int, buffer: WriteableBuffer, *, start: int = 0, end: Optional[int] = None) -> None:
168+
//| def readfrom_into(self, address: int, buffer: WriteableBuffer, *, start: int = 0, end: int = len(buffer)) -> None:
169169
//| """Read into ``buffer`` from the device selected by ``address``.
170170
//| The number of bytes read will be the length of ``buffer``.
171171
//| At least one byte must be read.
@@ -215,7 +215,7 @@ STATIC mp_obj_t bitbangio_i2c_readfrom_into(size_t n_args, const mp_obj_t *pos_a
215215
args[ARG_end].u_int);
216216
return mp_const_none;
217217
}
218-
MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_i2c_readfrom_into_obj, 3, bitbangio_i2c_readfrom_into);
218+
MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_i2c_readfrom_into_obj, 1, bitbangio_i2c_readfrom_into);
219219

220220
//| def writeto(self, address: int, buffer: ReadableBuffer, *, start: int = 0, end: Optional[int] = None) -> None:
221221
//| """Write the bytes from ``buffer`` to the device selected by ``address`` and then transmits a
@@ -274,7 +274,7 @@ STATIC mp_obj_t bitbangio_i2c_writeto(size_t n_args, const mp_obj_t *pos_args, m
274274
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_i2c_writeto_obj, 1, bitbangio_i2c_writeto);
275275

276276

277-
//| def writeto_then_readfrom(self, address: int, out_buffer: ReadableBuffer, in_buffer: ReadableBuffer, *, out_start: int = 0, out_end: Optional[int] = None, in_start: int = 0, in_end: Optional[int] = None) -> None:
277+
//| def writeto_then_readfrom(self, address: int, out_buffer: ReadableBuffer, in_buffer: ReadableBuffer, *, out_start: int = 0, out_end: int = len(out_buffer), in_start: int = 0, in_end: int = len(in_buffer)) -> None:
278278
//| """Write the bytes from ``out_buffer`` to the device selected by ``address``, generate no stop
279279
//| bit, generate a repeated start and read into ``in_buffer``. ``out_buffer`` and
280280
//| ``in_buffer`` can be the same buffer because they are used sequentially.
@@ -315,7 +315,7 @@ STATIC mp_obj_t bitbangio_i2c_writeto_then_readfrom(size_t n_args, const mp_obj_
315315

316316
return mp_const_none;
317317
}
318-
MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_i2c_writeto_then_readfrom_obj, 3, bitbangio_i2c_writeto_then_readfrom);
318+
MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_i2c_writeto_then_readfrom_obj, 1, bitbangio_i2c_writeto_then_readfrom);
319319

320320
STATIC const mp_rom_map_elem_t bitbangio_i2c_locals_dict_table[] = {
321321
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&bitbangio_i2c_deinit_obj) },

shared-bindings/bitbangio/SPI.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ STATIC mp_obj_t bitbangio_spi_write(mp_obj_t self_in, mp_obj_t wr_buf) {
224224
MP_DEFINE_CONST_FUN_OBJ_2(bitbangio_spi_write_obj, bitbangio_spi_write);
225225

226226

227-
//| def readinto(self, buffer: WriteableBuffer, *, start: int = 0, end: Optional[int] = None, write_value: int = 0) -> None:
227+
//| def readinto(self, buffer: WriteableBuffer, *, start: int = 0, end: int = len(buffer), write_value: int = 0) -> None:
228228
//| """Read into ``buffer`` while writing ``write_value`` for each byte read.
229229
//| The SPI object must be locked.
230230
//| If the number of bytes to read is 0, nothing happens.
@@ -266,9 +266,9 @@ STATIC mp_obj_t bitbangio_spi_readinto(size_t n_args, const mp_obj_t *pos_args,
266266
}
267267
return mp_const_none;
268268
}
269-
MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_spi_readinto_obj, 2, bitbangio_spi_readinto);
269+
MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_spi_readinto_obj, 1, bitbangio_spi_readinto);
270270

271-
//| def write_readinto(self, buffer_out: ReadableBuffer, buffer_in: ReadableBuffer, *, out_start: int = 0, out_end: Optional[int] = None, in_start: int = 0, in_end: Optional[int] = None) -> None:
271+
//| def write_readinto(self, buffer_out: ReadableBuffer, buffer_in: ReadableBuffer, *, out_start: int = 0, out_end: int = len(buffer_out), in_start: int = 0, in_end: int = len(buffer_in)) -> None:
272272
//| """Write out the data in ``buffer_out`` while simultaneously reading data into ``buffer_in``.
273273
//| The SPI object must be locked.
274274
//| The lengths of the slices defined by ``buffer_out[out_start:out_end]`` and ``buffer_in[in_start:in_end]``
@@ -329,7 +329,7 @@ STATIC mp_obj_t bitbangio_spi_write_readinto(size_t n_args, const mp_obj_t *pos_
329329
}
330330
return mp_const_none;
331331
}
332-
MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_spi_write_readinto_obj, 2, bitbangio_spi_write_readinto);
332+
MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_spi_write_readinto_obj, 1, bitbangio_spi_write_readinto);
333333

334334
STATIC const mp_rom_map_elem_t bitbangio_spi_locals_dict_table[] = {
335335
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&bitbangio_spi_deinit_obj) },

shared-bindings/bitops/__init__.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ STATIC mp_obj_t bit_transpose(size_t n_args, const mp_obj_t *pos_args, mp_map_t
8686
common_hal_bitops_bit_transpose(output_bufinfo.buf, input_bufinfo.buf, inlen, width);
8787
return args[ARG_output].u_obj;
8888
}
89-
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bitops_bit_transpose_obj, 1, bit_transpose);
89+
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bitops_bit_transpose_obj, 0, bit_transpose);
9090

9191
STATIC const mp_rom_map_elem_t bitops_module_globals_table[] = {
9292
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_bitops) },

shared-bindings/busio/I2C.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ STATIC mp_obj_t busio_i2c_readfrom_into(size_t n_args, const mp_obj_t *pos_args,
226226
args[ARG_end].u_int);
227227
return mp_const_none;
228228
}
229-
MP_DEFINE_CONST_FUN_OBJ_KW(busio_i2c_readfrom_into_obj, 3, busio_i2c_readfrom_into);
229+
MP_DEFINE_CONST_FUN_OBJ_KW(busio_i2c_readfrom_into_obj, 1, busio_i2c_readfrom_into);
230230

231231
//| def writeto(self, address: int, buffer: ReadableBuffer, *, start: int = 0, end: Optional[int] = None) -> None:
232232
//| """Write the bytes from ``buffer`` to the device selected by ``address`` and
@@ -324,7 +324,7 @@ STATIC mp_obj_t busio_i2c_writeto_then_readfrom(size_t n_args, const mp_obj_t *p
324324

325325
return mp_const_none;
326326
}
327-
MP_DEFINE_CONST_FUN_OBJ_KW(busio_i2c_writeto_then_readfrom_obj, 3, busio_i2c_writeto_then_readfrom);
327+
MP_DEFINE_CONST_FUN_OBJ_KW(busio_i2c_writeto_then_readfrom_obj, 1, busio_i2c_writeto_then_readfrom);
328328

329329
STATIC const mp_rom_map_elem_t busio_i2c_locals_dict_table[] = {
330330
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&busio_i2c_deinit_obj) },

shared-bindings/busio/SPI.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ STATIC mp_obj_t busio_spi_obj_unlock(mp_obj_t self_in) {
237237
}
238238
MP_DEFINE_CONST_FUN_OBJ_1(busio_spi_unlock_obj, busio_spi_obj_unlock);
239239

240-
//| def write(self, buffer: ReadableBuffer, *, start: int = 0, end: Optional[int] = None) -> None:
240+
//| def write(self, buffer: ReadableBuffer, *, start: int = 0, end: int = len(buffer)) -> None:
241241
//| """Write the data contained in ``buffer``. The SPI object must be locked.
242242
//| If the buffer is empty, nothing happens.
243243
//|
@@ -276,10 +276,10 @@ STATIC mp_obj_t busio_spi_write(size_t n_args, const mp_obj_t *pos_args, mp_map_
276276
}
277277
return mp_const_none;
278278
}
279-
MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_write_obj, 2, busio_spi_write);
279+
MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_write_obj, 1, busio_spi_write);
280280

281281

282-
//| def readinto(self, buffer: WriteableBuffer, *, start: int = 0, end: Optional[int] = None, write_value: int = 0) -> None:
282+
//| def readinto(self, buffer: WriteableBuffer, *, start: int = 0, end: int = len(buffer), write_value: int = 0) -> None:
283283
//| """Read into ``buffer`` while writing ``write_value`` for each byte read.
284284
//| The SPI object must be locked.
285285
//| If the number of bytes to read is 0, nothing happens.
@@ -321,9 +321,9 @@ STATIC mp_obj_t busio_spi_readinto(size_t n_args, const mp_obj_t *pos_args, mp_m
321321
}
322322
return mp_const_none;
323323
}
324-
MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_readinto_obj, 2, busio_spi_readinto);
324+
MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_readinto_obj, 1, busio_spi_readinto);
325325

326-
//| def write_readinto(self, buffer_out: ReadableBuffer, buffer_in: WriteableBuffer, *, out_start: int = 0, out_end: Optional[int] = None, in_start: int = 0, in_end: Optional[int] = None) -> None:
326+
//| def write_readinto(self, buffer_out: ReadableBuffer, buffer_in: WriteableBuffer, *, out_start: int = 0, out_end: int = len(buffer_out), in_start: int = 0, in_end: int = len(buffer_in)) -> None:
327327
//| """Write out the data in ``buffer_out`` while simultaneously reading data into ``buffer_in``.
328328
//| The SPI object must be locked.
329329
//| The lengths of the slices defined by ``buffer_out[out_start:out_end]`` and ``buffer_in[in_start:in_end]``
@@ -384,7 +384,7 @@ STATIC mp_obj_t busio_spi_write_readinto(size_t n_args, const mp_obj_t *pos_args
384384
}
385385
return mp_const_none;
386386
}
387-
MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_write_readinto_obj, 2, busio_spi_write_readinto);
387+
MP_DEFINE_CONST_FUN_OBJ_KW(busio_spi_write_readinto_obj, 1, busio_spi_write_readinto);
388388

389389
//| frequency: int
390390
//| """The actual SPI bus frequency. This may not match the frequency requested

shared-bindings/camera/Camera.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ STATIC mp_obj_t camera_obj_take_picture(size_t n_args, const mp_obj_t *pos_args,
116116

117117
return MP_OBJ_NEW_SMALL_INT(common_hal_camera_take_picture(self, (uint8_t *)bufinfo.buf, bufinfo.len, args[ARG_width].u_int, args[ARG_height].u_int, format));
118118
}
119-
MP_DEFINE_CONST_FUN_OBJ_KW(camera_take_picture_obj, 2, camera_obj_take_picture);
119+
MP_DEFINE_CONST_FUN_OBJ_KW(camera_take_picture_obj, 1, camera_obj_take_picture);
120120

121121
STATIC const mp_rom_map_elem_t camera_locals_dict_table[] = {
122122
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&camera_deinit_obj) },

shared-bindings/displayio/Bitmap.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,7 @@ STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_arg
285285

286286
return mp_const_none;
287287
}
288-
MP_DEFINE_CONST_FUN_OBJ_KW(displayio_bitmap_blit_obj, 4, displayio_bitmap_obj_blit);
289-
// `displayio_bitmap_obj_blit` requires at least 4 arguments
288+
MP_DEFINE_CONST_FUN_OBJ_KW(displayio_bitmap_blit_obj, 1, displayio_bitmap_obj_blit);
290289

291290
//| def fill(self, value: int) -> None:
292291
//| """Fills the bitmap with the supplied palette index value."""

shared-bindings/displayio/EPaperDisplay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ STATIC mp_obj_t displayio_epaperdisplay_update_refresh_mode(size_t n_args, const
240240
displayio_epaperdisplay_change_refresh_mode_parameters(self, &start_sequence, seconds_per_frame);
241241
return mp_const_none;
242242
}
243-
MP_DEFINE_CONST_FUN_OBJ_KW(displayio_epaperdisplay_update_refresh_mode_obj, 3, displayio_epaperdisplay_update_refresh_mode);
243+
MP_DEFINE_CONST_FUN_OBJ_KW(displayio_epaperdisplay_update_refresh_mode_obj, 1, displayio_epaperdisplay_update_refresh_mode);
244244

245245
//| def refresh(self) -> None:
246246
//| """Refreshes the display immediately or raises an exception if too soon. Use

shared-bindings/displayio/FourWire.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ STATIC mp_obj_t displayio_fourwire_obj_send(size_t n_args, const mp_obj_t *pos_a
149149

150150
return mp_const_none;
151151
}
152-
MP_DEFINE_CONST_FUN_OBJ_KW(displayio_fourwire_send_obj, 3, displayio_fourwire_obj_send);
152+
MP_DEFINE_CONST_FUN_OBJ_KW(displayio_fourwire_send_obj, 1, displayio_fourwire_obj_send);
153153

154154
STATIC const mp_rom_map_elem_t displayio_fourwire_locals_dict_table[] = {
155155
{ MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&displayio_fourwire_reset_obj) },

0 commit comments

Comments
 (0)