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
c27dc38e
Commit
c27dc38e
authored
May 17, 2015
by
Daniel Campora
Browse files
cc3200: Re-name 'intmode' to 'mode' in the callback API.
parent
cd3f2523
Changes
3
Hide whitespace changes
Inline
Side-by-side
cc3200/misc/mpcallback.c
View file @
c27dc38e
...
...
@@ -41,7 +41,7 @@
DEFINE PUBLIC DATA
******************************************************************************/
const
mp_arg_t
mpcallback_init_args
[]
=
{
{
MP_QSTR_
int
mode
,
MP_ARG_KW_ONLY
|
MP_ARG_INT
,
{.
u_int
=
0
}
},
{
MP_QSTR_mode
,
MP_ARG_KW_ONLY
|
MP_ARG_INT
,
{.
u_int
=
0
}
},
{
MP_QSTR_handler
,
MP_ARG_KW_ONLY
|
MP_ARG_OBJ
,
{.
u_obj
=
mp_const_none
}
},
{
MP_QSTR_priority
,
MP_ARG_KW_ONLY
|
MP_ARG_INT
,
{.
u_int
=
1
}
},
{
MP_QSTR_value
,
MP_ARG_KW_ONLY
|
MP_ARG_INT
,
{.
u_int
=
0
}
},
...
...
cc3200/mods/pybpin.c
View file @
c27dc38e
...
...
@@ -72,7 +72,7 @@
/// print(pin.get_config().name)
///
/// extint = pyb.Pin('GPIO10', 0, pyb.Pin.INT_RISING, pyb.GPIO.STD_PD, pyb.S2MA)
/// extint.callback (
int
mode=pyb.Pin.INT_RISING, handler=pincb)
/// extint.callback (mode=pyb.Pin.INT_RISING, handler=pincb)
/// # the callback can be triggered manually
/// extint.callback()()
/// # to disable the callback
...
...
@@ -543,9 +543,9 @@ STATIC mp_obj_t pin_get_config(mp_obj_t self_in) {
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_1
(
pin_get_config_obj
,
pin_get_config
);
/// \method callback(method,
int
mode, priority, pwrmode)
/// \method callback(method, mode, priority, pwrmode)
/// Creates a callback object associated to a pin
/// min num of arguments is 1 (
int
mode)
/// min num of arguments is 1 (mode)
STATIC
mp_obj_t
pin_callback
(
mp_uint_t
n_args
,
const
mp_obj_t
*
pos_args
,
mp_map_t
*
kw_args
)
{
mp_arg_val_t
args
[
mpcallback_INIT_NUM_ARGS
];
mp_arg_parse_all
(
n_args
-
1
,
pos_args
+
1
,
kw_args
,
mpcallback_INIT_NUM_ARGS
,
mpcallback_init_args
,
args
);
...
...
cc3200/qstrdefsport.h
View file @
c27dc38e
...
...
@@ -287,7 +287,7 @@ Q(enable)
Q
(
disable
)
Q
(
callback
)
Q
(
handler
)
Q
(
int
mode
)
Q
(
mode
)
Q
(
value
)
Q
(
priority
)
Q
(
wakes
)
...
...
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