aboutsummaryrefslogtreecommitdiff
path: root/cc3200/mods/pybpin.h
diff options
context:
space:
mode:
authordanicampora2016-02-14 13:46:04 +0100
committerdanicampora2016-02-21 21:53:16 +0100
commit73c9f85b4ca10bcf8a01942e3638aa8b4331957a (patch)
treefbfbdb064ec984c7ba568c8e4a8b492ec039adf6 /cc3200/mods/pybpin.h
parent562bcffd3aa9e9e1226389e658c6d5d0ac007add (diff)
cc3200: Simplify the Timer API and correct the documents.
Make the PWM duty cycle configurable from 0.00 to 100.00 by accepting values from 0 to 10000. Add automatic Pin assignment when operating in PWM mode.
Diffstat (limited to 'cc3200/mods/pybpin.h')
-rw-r--r--cc3200/mods/pybpin.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/cc3200/mods/pybpin.h b/cc3200/mods/pybpin.h
index 3e7784926..ad02cc777 100644
--- a/cc3200/mods/pybpin.h
+++ b/cc3200/mods/pybpin.h
@@ -72,10 +72,7 @@ enum {
};
enum {
- PIN_TYPE_TIM_PWM0 = 0,
- PIN_TYPE_TIM_PWM1,
- PIN_TYPE_TIM_CC0,
- PIN_TYPE_TIM_CC1,
+ PIN_TYPE_TIM_PWM = 0,
};
enum {
@@ -139,5 +136,6 @@ 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);
+int8_t pin_find_af_index (const pin_obj_t* pin, uint8_t fn, uint8_t unit, uint8_t type);;
#endif // PYBPIN_H_