zoom/firmware/led.h
2013-06-12 18:40:40 -04:00

28 lines
395 B
C

#ifndef LED_H
#define LED_H
#include "config.h"
#define LED_BLINK_RATE 8
extern int16_t __led_pattern;
/* Initialize LED */
void led_init(void);
/* Set a pattern (8-bit binary pattern). */
void led_pattern(uint8_t pattern);
static inline void led_on(void)
{
__led_pattern = -1;
PORTBbits.RB13 = 0;
}
static inline void led_off(void)
{
__led_pattern = -1;
PORTBbits.RB13 = 1;
}
#endif