www.pudn.com > OSBDM08.zip > led.h


#define LED_INIT      PTD_PTD0=1; DDRD_DDRD0=1;   /* LED off, LED pin is output */ 
#define LED_SW_ON     PTD_PTD0=0; 
#define LED_SW_OFF    PTD_PTD0=1; 
#define LED_SW_TOGGLE PTD_PTD0^=1; 
 
#define LED_BLINK_PERIOD  150   /* duration of LED period */ 
#define LED_OFF_TIME      75    /* how long should the LED be off during the blink period */ 
 
typedef enum { 
  LED_ON, 
  LED_OFF, 
  LED_BLINK 
} led_state_e; 
 
extern led_state_e led_state;