Skip to content

Commit 95cc1ff

Browse files
author
Daniel Campora
committed
cc3200: Re-name pyb.hard_reset() to pyb.reset().
1 parent 330e21c commit 95cc1ff

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

cc3200/mods/modpyb.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,17 @@ extern OsiTaskHandle xSimpleLinkSpawnTaskHndl;
8282
///
8383
/// The `pyb` module contains specific functions related to the pyboard.
8484

85-
/// \function hard_reset()
86-
/// Resets the pyboard in a manner similar to pushing the external RESET
87-
/// button.
88-
STATIC mp_obj_t pyb_hard_reset(void) {
85+
/// \function reset()
86+
/// Resets the pyboard in a manner similar to pushing the external
87+
/// reset button.
88+
STATIC mp_obj_t pyb_reset(void) {
8989
// disable wlan
9090
wlan_stop(SL_STOP_TIMEOUT_LONG);
9191
// reset the cpu and it's peripherals
9292
MAP_PRCMMCUReset(true);
9393
return mp_const_none;
9494
}
95-
STATIC MP_DEFINE_CONST_FUN_OBJ_0(pyb_hard_reset_obj, pyb_hard_reset);
95+
STATIC MP_DEFINE_CONST_FUN_OBJ_0(pyb_reset_obj, pyb_reset);
9696

9797
#ifdef DEBUG
9898
/// \function info([dump_alloc_table])
@@ -126,7 +126,10 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pyb_info_obj, 0, 1, pyb_info);
126126
/// \function freq()
127127
/// Returns the CPU frequency: (F_CPU).
128128
STATIC mp_obj_t pyb_freq(void) {
129-
return mp_obj_new_int(HAL_FCPU_HZ);
129+
mp_obj_t tuple[1] = {
130+
mp_obj_new_int(HAL_FCPU_HZ),
131+
};
132+
return mp_obj_new_tuple(1, tuple);
130133
}
131134
STATIC MP_DEFINE_CONST_FUN_OBJ_0(pyb_freq_obj, pyb_freq);
132135

@@ -250,7 +253,7 @@ MP_DECLARE_CONST_FUN_OBJ(pyb_main_obj); // defined in main.c
250253
STATIC const mp_map_elem_t pyb_module_globals_table[] = {
251254
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_pyb) },
252255

253-
{ MP_OBJ_NEW_QSTR(MP_QSTR_hard_reset), (mp_obj_t)&pyb_hard_reset_obj },
256+
{ MP_OBJ_NEW_QSTR(MP_QSTR_reset), (mp_obj_t)&pyb_reset_obj },
254257
#ifdef DEBUG
255258
{ MP_OBJ_NEW_QSTR(MP_QSTR_info), (mp_obj_t)&pyb_info_obj },
256259
#endif

cc3200/qstrdefsport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Q(__name__)
3030
Q(help)
3131
Q(pyb)
3232
Q(info)
33-
Q(hard_reset)
33+
Q(reset)
3434
Q(main)
3535
Q(sync)
3636
Q(gc)

0 commit comments

Comments
 (0)