Skip to content

Commit 628799c

Browse files
committed
cc3200/mods/pybspi: Allow "write" arg of read/readinto to be positional.
To conform with Hardware API.
1 parent f12047f commit 628799c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cc3200/mods/pybspi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(pyb_spi_write_obj, pyb_spi_write);
295295
STATIC mp_obj_t pyb_spi_read(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
296296
static const mp_arg_t allowed_args[] = {
297297
{ MP_QSTR_nbytes, MP_ARG_REQUIRED | MP_ARG_OBJ, },
298-
{ MP_QSTR_write, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0x00} },
298+
{ MP_QSTR_write, MP_ARG_INT, {.u_int = 0x00} },
299299
};
300300

301301
// parse args
@@ -319,7 +319,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pyb_spi_read_obj, 1, pyb_spi_read);
319319
STATIC mp_obj_t pyb_spi_readinto(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
320320
static const mp_arg_t allowed_args[] = {
321321
{ MP_QSTR_buf, MP_ARG_REQUIRED | MP_ARG_OBJ, },
322-
{ MP_QSTR_write, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0x00} },
322+
{ MP_QSTR_write, MP_ARG_INT, {.u_int = 0x00} },
323323
};
324324

325325
// parse args

0 commit comments

Comments
 (0)