Subversion Repositories Code-Repo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
155 Kevin 1
#ifndef LED_BACKPACK_H
2
#define	LED_BACKPACK_H
3
 
4
#define HT16K33_ADDRESS 0x70
5
 
6
#define HT16K33_BLINK_CMD 0x80
7
#define HT16K33_BLINK_DISPLAYON 0x01
8
#define HT16K33_BLINK_OFF 0
9
#define HT16K33_BLINK_2HZ  1
10
#define HT16K33_BLINK_1HZ  2
11
#define HT16K33_BLINK_HALFHZ  3
12
 
13
#define HT16K33_CMD_BRIGHTNESS 0x0E
14
 
15
typedef struct {
16
    char i2c_address;
17
    char display_buffer[17];
18
} LED_DATA;
19
 
20
void LED_Init(LED_DATA *data);
21
void LED_Start(void);
22
void LED_Set_Brightness(char c);
23
void LED_Blink_Rate(char c);
24
void LED_Write_Display(void);
25
void LED_Clear(void);
26
void LED_Draw_Colon(char c);
27
void LED_Write_Digit_Raw(char loc, char bitmask);
28
void LED_Write_Digit_Num(char loc, char num, char dot);
29
void LED_Write_Digit_Alpha(char loc, char alpha, char dot);
30
void LED_Write_Num(int i);
31
 
32
 
33
#endif	/* LED_BACKPACK_H */
34