need to init all led directions and turn all leds off initially
This commit is contained in:
parent
c624e4e475
commit
ef0a049035
|
@ -7,7 +7,7 @@
|
||||||
volatile uint8_t led;
|
volatile uint8_t led;
|
||||||
|
|
||||||
#define LED LED_PURPLE
|
#define LED LED_PURPLE
|
||||||
#define led_init() do { gpio_pad_dir_set(LED); } while(0);
|
#define led_init() do { gpio_pad_dir_set(LED_WHITE); gpio_data_reset(LED_WHITE); } while(0);
|
||||||
#define led_on() do { led = 1; gpio_data_set(LED); } while(0);
|
#define led_on() do { led = 1; gpio_data_set(LED); } while(0);
|
||||||
#define led_off() do { led = 0; gpio_data_reset(LED); } while(0);
|
#define led_off() do { led = 0; gpio_data_reset(LED); } while(0);
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,9 @@
|
||||||
void main(void) {
|
void main(void) {
|
||||||
|
|
||||||
/* pin direction */
|
/* pin direction */
|
||||||
gpio_pad_dir_set(LED);
|
gpio_pad_dir_set(LED_WHITE);
|
||||||
|
/* all LEDs off */
|
||||||
|
gpio_data_reset(LED_WHITE);
|
||||||
|
|
||||||
/* timer setup */
|
/* timer setup */
|
||||||
/* CTRL */
|
/* CTRL */
|
||||||
|
|
Loading…
Reference in a new issue