Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 19e0652

Browse files
author
Paul Sokolovsky
committed
cc3200/mods/pybpin: Remove toggle() method.
It's not part of MicroPython HW API and can be easily implemented on Python level in case of need. Saved 56 bytes of binary.
1 parent 338f084 commit 19e0652

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

cc3200/mods/pybpin.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -684,13 +684,6 @@ STATIC mp_obj_t pin_value(mp_uint_t n_args, const mp_obj_t *args) {
684684
}
685685
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pin_value_obj, 1, 2, pin_value);
686686

687-
STATIC mp_obj_t pin_toggle(mp_obj_t self_in) {
688-
pin_obj_t *self = self_in;
689-
MAP_GPIOPinWrite(self->port, self->bit, ~MAP_GPIOPinRead(self->port, self->bit));
690-
return mp_const_none;
691-
}
692-
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pin_toggle_obj, pin_toggle);
693-
694687
STATIC mp_obj_t pin_id(mp_obj_t self_in) {
695688
pin_obj_t *self = self_in;
696689
return MP_OBJ_NEW_QSTR(self->name);
@@ -913,7 +906,6 @@ STATIC const mp_map_elem_t pin_locals_dict_table[] = {
913906
// instance methods
914907
{ MP_OBJ_NEW_QSTR(MP_QSTR_init), (mp_obj_t)&pin_init_obj },
915908
{ MP_OBJ_NEW_QSTR(MP_QSTR_value), (mp_obj_t)&pin_value_obj },
916-
{ MP_OBJ_NEW_QSTR(MP_QSTR_toggle), (mp_obj_t)&pin_toggle_obj },
917909
{ MP_OBJ_NEW_QSTR(MP_QSTR_id), (mp_obj_t)&pin_id_obj },
918910
{ MP_OBJ_NEW_QSTR(MP_QSTR_mode), (mp_obj_t)&pin_mode_obj },
919911
{ MP_OBJ_NEW_QSTR(MP_QSTR_pull), (mp_obj_t)&pin_pull_obj },

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy