Skip to content

Commit c27dc38

Browse files
author
Daniel Campora
committed
cc3200: Re-name 'intmode' to 'mode' in the callback API.
1 parent cd3f252 commit c27dc38

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

cc3200/misc/mpcallback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
DEFINE PUBLIC DATA
4242
******************************************************************************/
4343
const mp_arg_t mpcallback_init_args[] = {
44-
{ MP_QSTR_intmode, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} },
44+
{ MP_QSTR_mode, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} },
4545
{ MP_QSTR_handler, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} },
4646
{ MP_QSTR_priority, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} },
4747
{ MP_QSTR_value, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} },

cc3200/mods/pybpin.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
/// print(pin.get_config().name)
7373
///
7474
/// extint = pyb.Pin('GPIO10', 0, pyb.Pin.INT_RISING, pyb.GPIO.STD_PD, pyb.S2MA)
75-
/// extint.callback (intmode=pyb.Pin.INT_RISING, handler=pincb)
75+
/// extint.callback (mode=pyb.Pin.INT_RISING, handler=pincb)
7676
/// # the callback can be triggered manually
7777
/// extint.callback()()
7878
/// # to disable the callback
@@ -543,9 +543,9 @@ STATIC mp_obj_t pin_get_config(mp_obj_t self_in) {
543543
}
544544
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pin_get_config_obj, pin_get_config);
545545

546-
/// \method callback(method, intmode, priority, pwrmode)
546+
/// \method callback(method, mode, priority, pwrmode)
547547
/// Creates a callback object associated to a pin
548-
/// min num of arguments is 1 (intmode)
548+
/// min num of arguments is 1 (mode)
549549
STATIC mp_obj_t pin_callback (mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
550550
mp_arg_val_t args[mpcallback_INIT_NUM_ARGS];
551551
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, mpcallback_INIT_NUM_ARGS, mpcallback_init_args, args);

cc3200/qstrdefsport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ Q(enable)
287287
Q(disable)
288288
Q(callback)
289289
Q(handler)
290-
Q(intmode)
290+
Q(mode)
291291
Q(value)
292292
Q(priority)
293293
Q(wakes)

0 commit comments

Comments
 (0)