2015-02-13 22:21:44 +00:00
|
|
|
extern const mp_obj_type_t pyb_pin_type;
|
2015-05-18 17:35:56 +01:00
|
|
|
extern const mp_obj_type_t pyb_adc_type;
|
2015-06-22 23:03:17 +01:00
|
|
|
extern const mp_obj_type_t pyb_rtc_type;
|
2016-02-11 12:43:41 +00:00
|
|
|
extern const mp_obj_type_t pyb_i2c_type;
|
2015-12-29 00:19:23 +00:00
|
|
|
|
2016-02-11 11:41:58 +00:00
|
|
|
typedef struct _pyb_pin_obj_t {
|
|
|
|
mp_obj_base_t base;
|
|
|
|
uint16_t pin_id;
|
|
|
|
uint16_t phys_port;
|
|
|
|
uint32_t periph;
|
|
|
|
uint16_t func;
|
|
|
|
} pyb_pin_obj_t;
|
|
|
|
|
2015-12-29 00:19:23 +00:00
|
|
|
uint mp_obj_get_pin(mp_obj_t pin_in);
|
2016-02-11 11:41:58 +00:00
|
|
|
pyb_pin_obj_t *mp_obj_get_pin_obj(mp_obj_t pin_in);
|
2015-12-29 00:19:23 +00:00
|
|
|
int pin_get(uint pin);
|
|
|
|
void pin_set(uint pin, int value);
|