-
Notifications
You must be signed in to change notification settings - Fork 0
/
lcd.h
41 lines (32 loc) · 837 Bytes
/
lcd.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
/*
* File: lcd.h
* Author: louis
*
* Created on April 24, 2019, 10:55 AM
*/
#ifndef LCD_H
#define LCD_H
//#define LCD_CS_SET PORTBbits.RB2 = 1 // CS isn't currently used, this pin on LCD is just tied to ground.
#define LCD_DC_SET PORTBbits.RB6 = 1
//#define LCD_CS_RESET PORTBbits.RB2 = 0
#define LCD_DC_RESET PORTBbits.RB6 = 0
#define LCD_FONT_HEIGHT 12
#define LCD_FONT_PADDINGX 1
#define LCD_FONT_PADDINGY 1
#define LCD_FONT_WIDTH 8
#define LCD_WIDTH 128
#define LCD_HEIGHT 64
#ifdef __cplusplus
extern "C" {
#endif
void lcd_cmd(unsigned short int packet);
void lcd_write_pixel(int x, int y, int colour);
void lcd_write_string(char *s, int x, int y);
void lcd_clear(int c);
void lcd_setup(void);
void lcd_update(void);
#ifdef __cplusplus
}
#endif
#endif /* LCD_H */
//