Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
628799cd
Commit
628799cd
authored
Oct 18, 2016
by
Damien George
Browse files
cc3200/mods/pybspi: Allow "write" arg of read/readinto to be positional.
To conform with Hardware API.
parent
f12047f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
cc3200/mods/pybspi.c
View file @
628799cd
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment