diff options
| author | Daniel Campora | 2015-09-14 20:03:32 +0200 |
|---|---|---|
| committer | Daniel Campora | 2015-09-16 10:10:38 +0200 |
| commit | 22b4c28f854bb2066a0d7471b50f9e00e1363239 (patch) | |
| tree | eeedc24a49a3f8c5a3cfa8fe0eed83a7788c9584 /cc3200/mods/pybpin.h | |
| parent | 0e52d9860adc2d3d7328c649f3b6995ffc04fc63 (diff) | |
cc3200: New ADC API.
Diffstat (limited to 'cc3200/mods/pybpin.h')
| -rw-r--r-- | cc3200/mods/pybpin.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cc3200/mods/pybpin.h b/cc3200/mods/pybpin.h index 3d46a0b61..72a90874c 100644 --- a/cc3200/mods/pybpin.h +++ b/cc3200/mods/pybpin.h @@ -85,15 +85,15 @@ enum { }; enum { - PIN_TYPE_ADC_CH0 = -1, - PIN_TYPE_ADC_CH1 = -1, - PIN_TYPE_ADC_CH2 = -1, - PIN_TYPE_ADC_CH3 = -1, + PIN_TYPE_ADC_CH0 = 0, + PIN_TYPE_ADC_CH1, + PIN_TYPE_ADC_CH2, + PIN_TYPE_ADC_CH3, }; typedef struct { qstr name; - uint8_t idx; + int8_t idx; uint8_t fn; uint8_t unit; uint8_t type; @@ -136,5 +136,6 @@ void pin_config(pin_obj_t *self, int af, uint mode, uint type, int value, uint s pin_obj_t *pin_find(mp_obj_t user_obj); void pin_assign_pins_af (mp_obj_t *pins, uint32_t n_pins, uint32_t pull, uint32_t fn, uint32_t unit); uint8_t pin_find_peripheral_unit (const mp_obj_t pin, uint8_t fn, uint8_t type); +uint8_t pin_find_peripheral_type (const mp_obj_t pin, uint8_t fn, uint8_t unit); #endif // PYBPIN_H_ |
