50d5420deb
* Add a TARGET definition to Makefile (default PYBOARD). * Add support for discovery LEDs in led module. * Add support for discovery user switch in usersw * Add EXTI interrupt handler for discovery user switch on (PA0). * Parameterize led and usrsw modules pins and port. * Issue #83
18 lines
334 B
C
18 lines
334 B
C
typedef enum {
|
|
PYB_LED_R1 = 0,
|
|
PYB_LED_R2 = 1,
|
|
PYB_LED_G1 = 2,
|
|
PYB_LED_G2 = 3,
|
|
//STM32F4DISC
|
|
PYB_LED_R = 0,
|
|
PYB_LED_G = 1,
|
|
PYB_LED_B = 2,
|
|
PYB_LED_O = 3,
|
|
} pyb_led_t;
|
|
|
|
void led_init(void);
|
|
void led_state(pyb_led_t led, int state);
|
|
void led_toggle(pyb_led_t led);
|
|
|
|
mp_obj_t pyb_Led(mp_obj_t led_id);
|