@@ -333,7 +333,7 @@ STATIC void pin_extint_disable (mp_obj_t self_in) {
333333/// Initialise the pin:
334334///
335335/// - `af` can be in range 0-15, please check the CC3200 datasheet
336- /// for the details on the AFs availables on each pin (af=0, keeps it as a gpio pin).
336+ /// for the details on the AFs availables on each pin (af=0 keeps it as a gpio pin).
337337/// - `mode` can be one of:
338338/// - `Pin.IN` - configure the pin for input;
339339/// - `Pin.OUT` - configure the pin for output;
@@ -344,7 +344,6 @@ STATIC void pin_extint_disable (mp_obj_t self_in) {
344344/// - `Pin.OD` - standard without pull up or pull down;
345345/// - `Pin.OD_PU` - open drain with pull-up resistor;
346346/// - `Pin.OD_PD` - open drain with pull-down resistor.
347- /// - `Pin.ANALOG` - configured in analog (adc) mode
348347/// - `strength` can be one of:
349348/// - `Pin.S2MA` - 2ma drive strength;
350349/// - `Pin.S4MA` - 4ma drive strength;
@@ -526,10 +525,10 @@ STATIC mp_obj_t pin_toggle(mp_obj_t self_in) {
526525}
527526STATIC MP_DEFINE_CONST_FUN_OBJ_1 (pin_toggle_obj , pin_toggle );
528527
529- /// \method get_config ()
528+ /// \method info ()
530529/// Returns a named tupple with the current configuration of the gpio pin
531- STATIC mp_obj_t pin_get_config (mp_obj_t self_in ) {
532- STATIC const qstr pin_config_fields [] = {
530+ STATIC mp_obj_t pin_info (mp_obj_t self_in ) {
531+ STATIC const qstr pin_info_fields [] = {
533532 MP_QSTR_name , MP_QSTR_af , MP_QSTR_mode ,
534533 MP_QSTR_type , MP_QSTR_strength
535534 };
@@ -542,9 +541,9 @@ STATIC mp_obj_t pin_get_config(mp_obj_t self_in) {
542541 pin_config [3 ] = mp_obj_new_int (self -> type );
543542 pin_config [4 ] = mp_obj_new_int (self -> strength );
544543
545- return mp_obj_new_attrtuple (pin_config_fields , 5 , pin_config );
544+ return mp_obj_new_attrtuple (pin_info_fields , 5 , pin_config );
546545}
547- STATIC MP_DEFINE_CONST_FUN_OBJ_1 (pin_get_config_obj , pin_get_config );
546+ STATIC MP_DEFINE_CONST_FUN_OBJ_1 (pin_info_obj , pin_info );
548547
549548/// \method callback(method, mode, priority, pwrmode)
550549/// Creates a callback object associated to a pin
@@ -682,7 +681,7 @@ STATIC const mp_map_elem_t pin_locals_dict_table[] = {
682681 { MP_OBJ_NEW_QSTR (MP_QSTR_low ), (mp_obj_t )& pin_low_obj },
683682 { MP_OBJ_NEW_QSTR (MP_QSTR_high ), (mp_obj_t )& pin_high_obj },
684683 { MP_OBJ_NEW_QSTR (MP_QSTR_toggle ), (mp_obj_t )& pin_toggle_obj },
685- { MP_OBJ_NEW_QSTR (MP_QSTR_get_config ), (mp_obj_t )& pin_get_config_obj },
684+ { MP_OBJ_NEW_QSTR (MP_QSTR_info ), (mp_obj_t )& pin_info_obj },
686685 { MP_OBJ_NEW_QSTR (MP_QSTR_callback ), (mp_obj_t )& pin_callback_obj },
687686
688687 // class constants
0 commit comments