2015-02-13 17:21:44 -05:00
|
|
|
extern const mp_obj_type_t pyb_pin_type;
|
2016-03-02 08:37:27 -05:00
|
|
|
extern const mp_obj_type_t pyb_pwm_type;
|
2015-05-18 12:35:56 -04:00
|
|
|
extern const mp_obj_type_t pyb_adc_type;
|
2015-06-22 18:03:17 -04:00
|
|
|
extern const mp_obj_type_t pyb_rtc_type;
|
2016-02-11 07:43:41 -05:00
|
|
|
extern const mp_obj_type_t pyb_i2c_type;
|
2016-03-01 17:53:23 -05:00
|
|
|
extern const mp_obj_type_t pyb_spi_type;
|
2015-12-28 19:19:23 -05:00
|
|
|
|
2016-02-11 06:41:58 -05: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-28 19:19:23 -05:00
|
|
|
uint mp_obj_get_pin(mp_obj_t pin_in);
|
2016-02-11 06:41:58 -05:00
|
|
|
pyb_pin_obj_t *mp_obj_get_pin_obj(mp_obj_t pin_in);
|
2015-12-28 19:19:23 -05:00
|
|
|
int pin_get(uint pin);
|
|
|
|
void pin_set(uint pin, int value);
|