GLCD Library
A C Library for Embedded Applications
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
ST7565R.h
Go to the documentation of this file.
1 
13 /*
14  Copyright (c) 2012, Andy Gock
15 
16  All rights reserved.
17 
18  Redistribution and use in source and binary forms, with or without
19  modification, are permitted provided that the following conditions are met:
20  * Redistributions of source code must retain the above copyright
21  notice, this list of conditions and the following disclaimer.
22  * Redistributions in binary form must reproduce the above copyright
23  notice, this list of conditions and the following disclaimer in the
24  documentation and/or other materials provided with the distribution.
25  * Neither the name of Andy Gock nor the
26  names of its contributors may be used to endorse or promote products
27  derived from this software without specific prior written permission.
28 
29  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
30  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
32  DISCLAIMED. IN NO EVENT SHALL ANDY GOCK BE LIABLE FOR ANY
33  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
34  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
35  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
36  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
38  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 */
40 
41 #ifndef ST7565R_H_
42 #define ST7565R_H_
43 
44 /* Commands */
45 #define ST7565R_DISPLAY_ON 0b10101111
46 #define ST7565R_DISPLAY_OFF 0b10101110
47 #define ST7565R_PAGE_ADDRESS_SET 0b10110000
48 #define ST7565R_COLUMN_ADDRESS_SET_LOWER 0x00
49 #define ST7565R_COLUMN_ADDRESS_SET_UPPER 0x10
50 #define ST7565R_DISPLAY_NORMAL 0b10100100
51 #define ST7565R_DISPLAY_ALL_ON 0b10100101
52 #define ST7565R_NORMAL 0b10100000
53 #define ST7565R_REVERSE 0b10100001
54 #define ST7565R_RESET 0b11100010
55 #define ST7565R_SET_START_LINE (1<<6)
56 
57 /* These functions only available on ST7565 implementation (for now) */
58 
59 /* Private functions */
60 void glcd_set_column_upper(uint8_t addr);
61 void glcd_set_column_lower(uint8_t addr);
62 
64 void glcd_all_on(void);
65 
67 void glcd_normal(void);
68 
70 void glcd_set_start_line(uint8_t addr);
71 
73 void glcd_clear_now(void);
74 
76 void glcd_pattern(void);
77 
78 #endif /* ST7565R_H_ */
void glcd_set_column_upper(uint8_t addr)
void glcd_all_on(void)
All display points on (native)
void glcd_set_start_line(uint8_t addr)
Set start line/page.
void glcd_clear_now(void)
Clear the display immediately, does not buffer.
void glcd_pattern(void)
Show a black and white line pattern on the display.
void glcd_normal(void)
Set to normal mode.
void glcd_set_column_lower(uint8_t addr)