-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdisp.h
46 lines (41 loc) · 1.13 KB
/
disp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef _DISP_H_
#define _DISP_H_
#include <stdint.h>
//enum to specifiy digit, digit0 is left most digit
typedef enum
{
disp_DIGIT0, disp_DIGIT1, disp_DIGIT2
}
disp_digitn_t;
//setup timer1, ccp1, etc.
void
disp_init (void);
//display decimal number 000-999
void
disp_number (uint16_t);
//display hex number 000-FFF
void
disp_hex (uint16_t);
//display ascii to digit
void
disp_ascii (disp_digitn_t, char);
//display raw data
void
disp_raw (disp_digitn_t, uint8_t);
//clear display
void
disp_clear (void);
//blink n times, ms between on/off
void
disp_blink (uint8_t, uint16_t);
//set digit brightness
void
disp_bright (disp_digitn_t, uint8_t);
//move buffered data to digits
//buffered so multiple displays can update at the same time
void
disp_show (void);
//set decimal point
void
disp_dp (disp_digitn_t);
#endif // _DISP_H_