GLCD Library
A C Library for Embedded Applications
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
unit_tests.c
Go to the documentation of this file.
1 
7 /*
8  Copyright (c) 2012, Andy Gock
9 
10  All rights reserved.
11 
12  Redistribution and use in source and binary forms, with or without
13  modification, are permitted provided that the following conditions are met:
14  * Redistributions of source code must retain the above copyright
15  notice, this list of conditions and the following disclaimer.
16  * Redistributions in binary form must reproduce the above copyright
17  notice, this list of conditions and the following disclaimer in the
18  documentation and/or other materials provided with the distribution.
19  * Neither the name of Andy Gock nor the
20  names of its contributors may be used to endorse or promote products
21  derived from this software without specific prior written permission.
22 
23  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26  DISCLAIMED. IN NO EVENT SHALL ANDY GOCK BE LIABLE FOR ANY
27  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34 
35 #include <stdio.h>
36 #include <stdlib.h>
37 #include "glcd.h"
38 #include "unit_tests.h"
39 
41 #include "fonts/font5x7.h"
42 //#include "fonts/Liberation_Sans11x14_Numbers.h"
44 //#include "fonts/Liberation_Sans17x17_Alpha.h"
45 //#include "fonts/Liberation_Sans27x36_Numbers.h"
46 //#include "fonts/Bebas_Neue20x36_Bold_Numbers.h"
47 
48 volatile uint8_t unit_test_return = 0;
49 
54 #define DEMO_RETURN() if (unit_test_return) { unit_test_return = 0; return; }
55 
56 #if defined(GLCD_UNIT_TEST_BITMAP_ENABLE)
57  /* Open Source logo -- Size: 128x64 */
58  #if defined(GLCD_DEVICE_AVR8)
59  const unsigned char bmp_oslogo[] PROGMEM = {
60  #else
61  const unsigned char bmp_oslogo[] = {
62  #endif /* GLCD_DEVICE_AVR8 */
63  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf0, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xe0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 //
64  };
65 #endif /* GLCD_UNIT_TEST_BITMAP_ENABLE */
66 
68 {
69  uint8_t x,y,radius;
70 
71  while (1) {
72  uint8_t i;
73 
74  glcd_clear();
75 
76  // generate random(ish) position on display
77  x = rand() % GLCD_LCD_WIDTH;
78  y = rand() % GLCD_LCD_HEIGHT;
79  radius = rand() % 50;
80 
81  //x = 70; y=25; radius=50; // for debugging
82 
83  // fill circle with black
84 
85  for (i=0; i<=radius; i++) {
86  glcd_fill_circle(x,y,i,BLACK);
87  glcd_write();
88  delay_ms(2);
89  }
90 
91  // fill the same circle above but with white
92  for (i=0; i<=radius; i++) {
93  glcd_fill_circle(x,y,i,WHITE);
94  glcd_write();
95  delay_ms(1);
96  }
97  DEMO_RETURN();
98  }
99 }
100 
102 {
103  uint8_t count = 0;
104  char string[8] = "";
105  while(1) {
107 
108  //glcd_tiny_set_font(Font5x7,5,7,32,127);
109  //glcd_draw_string_xy(0,40,(char *)utoa(count,string,10));
110 
111  glcd_set_font(Liberation_Sans15x21_Numbers,15,21,46,57);
112  //glcd_set_font(Liberation_Sans27x36_Numbers,27,36,46,57);
113  //glcd_set_font(Bebas_Neue20x36_Bold_Numbers,20,36,46,57);
114  //glcd_set_font(Bebas_Neue18x36_Numbers,18,36,46,57);
115  //glcd_set_font(HelveticaNeueLT_Com_57_Cn23x35_Numbers,23,35,46,57); // commercial font - not for public distribution
116 
117  sprintf(string,"%d",count);
118  glcd_draw_string_xy(0,0,string);
119  glcd_bar_graph_horizontal(10,38,30,6,count*4);
120  glcd_bar_graph_vertical(70,0,8,30,count*2);
121 
122  glcd_write();
123  count += 1;
124 
125  DEMO_RETURN();
126  }
127 
128 }
129 
131 {
132  // moves some text up and down the display
133 
134  uint8_t y;
135  uint8_t max_y;
136 
137  //glcd_set_font(Liberation_Sans11x14_Numbers,11,14,46,57);
138  glcd_set_font(Liberation_Sans15x21_Numbers,15,21,46,57);
139  //glcd_set_font(Liberation_Sans27x36_Numbers,27,36,46,57);
140  //glcd_set_font(Liberation_Sans17x17_Alpha,17,17,46,90);
141 
142  max_y = GLCD_LCD_HEIGHT - font_current.height - 2; // max y start position for draw_string
143 
144  while(1) {
145  // move top to bottom
146  for (y=0; y<max_y; y++) {
147  DEMO_RETURN();
149  glcd_draw_string_xy(0,y,"123");
150  glcd_write();
151  delay_ms(80);
152  }
153 
154  // move bottom to top
155  for (y=(max_y); y>0; y--) {
156  DEMO_RETURN();
158  glcd_draw_string_xy(0,y,"456");
159  glcd_write();
160  delay_ms(80);
161  }
162 
163  }
164 
165 }
166 
168 {
169  /* Write tiny text on display, all chars, scrolling up every second */
170 
171  char string[GLCD_LCD_WIDTH / 6 + 1];
172 
173  uint8_t c = 32;
174  uint8_t len = GLCD_LCD_WIDTH / 6;
175 
176  GLCD_TEXT_INIT();
177 
178  while(1) {
179  // write chars to string from 32 to 127 ASCII
180  uint8_t i;
181  for (i=0; i<len; i++) {
182  string[i] = c;
183  c++;
184  if (c > 127) {
185  c = 32;
186  }
187  }
188 
189  // write null terminator
190  string[len] = '\0';
191 
192  GLCD_WRITE(string);
193 
194  DEMO_RETURN();
195 
196  delay_ms(1000);
197  }
198 
199 }
200 
202 {
203  glcd_tiny_set_font(Font5x7,5,7,32,127);
205  glcd_tiny_draw_string(0,0,"Hello World!");
206  glcd_write();
207  while(1) {
208  DEMO_RETURN();
209  }
210 }
211 
213 {
214  glcd_tiny_set_font(Font5x7,5,7,32,127);
216  glcd_tiny_draw_string(0,0,"RECTANGLE DEMO");
217  glcd_write();
218  delay_ms(1000);
219 
220  while(1) {
221 
222  glcd_clear();
223  glcd_draw_rect(0,0,100,50,BLACK);
224  glcd_tiny_draw_string(0,GLCD_NUMBER_OF_BANKS-1,"glcd_draw_rect");
225  glcd_write();
226  delay_ms(1000);
227  DEMO_RETURN();
228 
229  glcd_clear();
230  glcd_tiny_draw_string(0,GLCD_NUMBER_OF_BANKS-1,"glcd_draw_rect_thick");
231  glcd_write();
232 
233  glcd_draw_rect_thick(5,5,80,30,3,6,BLACK);
234  glcd_write();
235  delay_ms(1000);
236  DEMO_RETURN();
237 
238  glcd_draw_rect_thick(0,0,20,20,2,2,BLACK);
239  glcd_write();
240  delay_ms(1000);
241  DEMO_RETURN();
242 
243  glcd_draw_rect_thick(100,10,20,20,5,5,BLACK);
244  glcd_write();
245  delay_ms(1000);
246  DEMO_RETURN();
247 
248  glcd_clear();
249  glcd_tiny_draw_string(0,GLCD_NUMBER_OF_BANKS-1,"glcd_draw_rect_shadow");
250  glcd_draw_rect_shadow(0,0,45,30,BLACK);
251  glcd_write();
252  delay_ms(1000);
253  DEMO_RETURN();
254 
255  glcd_draw_rect_shadow(95,5,30,30,BLACK);
256  glcd_write();
257  delay_ms(1000);
258  DEMO_RETURN();
259 
260  }
261 
262 }
263 
265 {
266  glcd_clear();
267  glcd_write();
268  while(1) {
269  uint16_t n;
270  for (n=0; n<=255; n += 20) {
271  glcd_scrolling_bar_graph(0,0,50,50,n);
272  glcd_scrolling_bar_graph(60,0,50,30,n);
273  glcd_scrolling_bar_graph(60,35,60,20,n);
274  DEMO_RETURN();
275  }
276  for (n=0; n<=255; n += 20) {
277  glcd_scrolling_bar_graph(0,0,50,50,255-n);
278  glcd_scrolling_bar_graph(60,0,50,30,n);
279  glcd_scrolling_bar_graph(60,35,60,20,n);
280  DEMO_RETURN();
281  }
282  }
283 }
284 
285 #if defined (GLCD_UNIT_TEST_BITMAP_ENABLE)
287 {
288  glcd_draw_bitmap(bmp_oslogo);
289  glcd_write();
290  while (1) {
291  DEMO_RETURN();
292  }
293 }
294 #endif
void glcd_draw_string_xy(uint8_t x, uint8_t y, char *c)
Draw a string at specified location.
Definition: text.c:145
#define GLCD_LCD_WIDTH
User specified GLCD width in pixels Set to 0 for automatic assignment based on controller.
Definition: glcd.h:140
void glcd_draw_rect_shadow(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t color)
Draw rectangle but do not fill.
Definition: graphics.c:183
void glcd_bar_graph_horizontal(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t val)
Draw horizontal bar graph with 1 px wide border.
Definition: graphs.c:39
void glcd_write(void)
Update the display within the specified bounding box.
void glcd_draw_rect_thick(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t tx, uint8_t ty, uint8_t color)
Draw rectangle but do not fill.
Definition: graphics.c:154
void glcd_test_hello_world(void)
Print hello world to display.
Definition: unit_tests.c:201
glcd_FontConfig_t font_current
Definition: text.c:40
volatile uint8_t unit_test_return
Fonts.
Definition: unit_tests.c:48
void glcd_test_scrolling_graph(void)
Demonstrate scrolling bar graph.
Definition: unit_tests.c:264
void glcd_test_bitmap_128x64(void)
Demonstrate bitmap display.
Definition: unit_tests.c:286
const unsigned char bmp_oslogo[]
Definition: unit_tests.c:61
Various test functions to demonstrate features of the library.
#define BLACK
Definition: glcd.h:105
#define GLCD_LCD_HEIGHT
User specified GLCD height in pixels Set to 0 for automatic assignment based on controller.
Definition: glcd.h:141
void glcd_tiny_set_font(const char *font_table, uint8_t width, uint8_t height, char start_char, char end_char)
Set font to be used from now on.
Definition: text_tiny.c:40
#define GLCD_NUMBER_OF_BANKS
Definition: glcd.h:149
void glcd_bar_graph_vertical(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t val)
Draw vertical bar graph with 1px wide border.
Definition: graphs.c:56
void glcd_set_font(const char *font_table, uint8_t width, uint8_t height, char start_char, char end_char)
Set GLCD font to predefined font table.
Definition: text.c:45
void glcd_scrolling_bar_graph(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t val)
Definition: graphs.c:67
void glcd_clear_buffer(void)
Clear the display buffer only.
Definition: glcd.c:128
void glcd_tiny_draw_string(uint8_t x, uint8_t line, char *str)
Write string to display buffer in tiny 5x7 font.
Definition: text_tiny.c:81
void glcd_test_circles(void)
Make random &quot;exploding circles&quot;.
Definition: unit_tests.c:67
static const char Bebas_Neue18x36_Numbers[] PROGMEM
#define WHITE
Definition: glcd.h:106
void glcd_clear(void)
Clear the display.
Definition: glcd.c:122
#define DEMO_RETURN()
Return from test procedure.
Definition: unit_tests.c:54
uint8_t height
Definition: glcd.h:256
void glcd_fill_circle(uint8_t x0, uint8_t y0, uint8_t r, uint8_t color)
Draw circle and fill.
Definition: graphics.c:229
void glcd_test_counter_and_graph(void)
Definition: unit_tests.c:101
#define GLCD_TEXT_INIT()
Initialise 5x7 text.
#define GLCD_WRITE(str)
Write string to bottom-most line after scrolling everything else up.
GLCD Library main header file.
void glcd_draw_bitmap(const unsigned char *data)
Draw bitmap to screen buffer.
Definition: graphics.c:279
void glcd_draw_rect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t color)
Draw rectangle but do not fill.
Definition: graphics.c:140
void glcd_test_rectangles(void)
Demonstrating rectangle drawing.
Definition: unit_tests.c:212
void glcd_test_text_up_down(void)
Scroll some text up and down the screen.
Definition: unit_tests.c:130
void glcd_test_tiny_text(void)
Display all chars of tiny 5x7 font, scrolling previous lines one by one every second.
Definition: unit_tests.c:167