diff options
Diffstat (limited to 'cc3200/mods/pybpin.h')
-rw-r--r-- | cc3200/mods/pybpin.h | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/cc3200/mods/pybpin.h b/cc3200/mods/pybpin.h index 6228fa2ec3..9cc0243d1a 100644 --- a/cc3200/mods/pybpin.h +++ b/cc3200/mods/pybpin.h @@ -33,24 +33,24 @@ #define PYBPIN_ANALOG_TYPE 0xFF typedef struct { - mp_obj_base_t base; - qstr name; - mp_obj_t callback; - uint32_t port; - uint16_t type; - uint8_t bit; - uint8_t pin_num; - uint8_t af; - uint8_t strength; - uint8_t mode; - bool used; + const mp_obj_base_t base; + const qstr name; + mp_obj_t callback; + const uint32_t port; + uint16_t type; + const uint8_t bit; + const uint8_t pin_num; + uint8_t af; + uint8_t strength; + uint8_t mode; + bool used; } pin_obj_t; extern const mp_obj_type_t pin_type; typedef struct { - const char *name; - const pin_obj_t *pin; + const char *name; + const pin_obj_t *pin; } pin_named_pin_t; typedef struct { @@ -62,19 +62,14 @@ typedef struct { extern const mp_obj_type_t pin_cpu_pins_obj_type; extern const mp_obj_dict_t pin_cpu_pins_locals_dict; -MP_DECLARE_CONST_FUN_OBJ(pin_init_obj); - void pin_init0(void); void pin_verify_af (uint af); void pin_config(pin_obj_t *self, uint af, uint mode, uint type, uint strength); -void pin_extint_register(pin_obj_t *self, uint32_t intmode, mp_obj_t callback); -void pin_extint_enable(pin_obj_t *self); -void pin_extint_disable(pin_obj_t *self); -void pin_extint_swint(pin_obj_t *self); -const pin_obj_t *pin_find(mp_obj_t user_obj); -const pin_obj_t *pin_find_named_pin(const mp_obj_dict_t *named_pins, mp_obj_t name); -const pin_obj_t *pin_find_pin(const mp_obj_dict_t *named_pins, uint pin_num); -const pin_obj_t *pin_find_pin_by_port_bit (const mp_obj_dict_t *named_pins, uint port, uint bit); +void pin_extint_register(pin_obj_t *self, uint32_t intmode, uint32_t priority); +pin_obj_t *pin_find(mp_obj_t user_obj); +pin_obj_t *pin_find_named_pin(const mp_obj_dict_t *named_pins, mp_obj_t name); +pin_obj_t *pin_find_pin(const mp_obj_dict_t *named_pins, uint pin_num); +pin_obj_t *pin_find_pin_by_port_bit (const mp_obj_dict_t *named_pins, uint port, uint bit); uint32_t pin_get_mode(const pin_obj_t *self); uint32_t pin_get_type(const pin_obj_t *self); uint32_t pin_get_strenght(const pin_obj_t *self); |