diff options
author | Damien George <damien.p.george@gmail.com> | 2016-10-18 10:16:46 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-10-18 10:16:46 +1100 |
commit | 628799cd365e174a53a9328ebe3045f53efdf7d6 (patch) | |
tree | c00f60e63a6ce783f341412797f00f78da7aa0e4 | |
parent | f12047f66d34df3001fd1bec0d7aa46f3a6f25fe (diff) | |
download | micropython-628799cd365e174a53a9328ebe3045f53efdf7d6.tar.gz micropython-628799cd365e174a53a9328ebe3045f53efdf7d6.zip |
cc3200/mods/pybspi: Allow "write" arg of read/readinto to be positional.
To conform with Hardware API.
-rw-r--r-- | cc3200/mods/pybspi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cc3200/mods/pybspi.c b/cc3200/mods/pybspi.c index f5c9962728..5a040e3f59 100644 --- a/cc3200/mods/pybspi.c +++ b/cc3200/mods/pybspi.c @@ -295,7 +295,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(pyb_spi_write_obj, pyb_spi_write); STATIC mp_obj_t pyb_spi_read(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { static const mp_arg_t allowed_args[] = { { MP_QSTR_nbytes, MP_ARG_REQUIRED | MP_ARG_OBJ, }, - { MP_QSTR_write, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0x00} }, + { MP_QSTR_write, MP_ARG_INT, {.u_int = 0x00} }, }; // parse args @@ -319,7 +319,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pyb_spi_read_obj, 1, pyb_spi_read); STATIC mp_obj_t pyb_spi_readinto(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { static const mp_arg_t allowed_args[] = { { MP_QSTR_buf, MP_ARG_REQUIRED | MP_ARG_OBJ, }, - { MP_QSTR_write, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0x00} }, + { MP_QSTR_write, MP_ARG_INT, {.u_int = 0x00} }, }; // parse args |