need to init all led directions and turn all leds off initially

This commit is contained in:
Mariano Alvira 2010-03-17 17:02:07 -04:00
parent c624e4e475
commit ef0a049035
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,7 @@
volatile uint8_t led;
#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_off() do { led = 0; gpio_data_reset(LED); } while(0);

View File

@ -9,7 +9,9 @@
void main(void) {
/* pin direction */
gpio_pad_dir_set(LED);
gpio_pad_dir_set(LED_WHITE);
/* all LEDs off */
gpio_data_reset(LED_WHITE);
/* timer setup */
/* CTRL */