42 #if defined(GLCD_DEVICE_AVR8)
43 void glcd_set_font(PGM_P font_table, uint8_t width, uint8_t height,
char start_char,
char end_char)
45 void glcd_set_font(
const char * font_table, uint8_t width, uint8_t height,
char start_char,
char end_char)
50 font_current.
width = width;
51 font_current.
height = height;
59 if (c < font_current.start_char || c > font_current.
end_char) {
67 for ( i = 0; i < font_current.
width; i++ ) {
68 #if defined(GLCD_DEVICE_AVR8)
74 for (j = 0; j < 8; j++) {
85 return font_current.
width;
93 uint8_t bytes_high = font_current.
height / 8 + 1;
94 uint8_t bytes_per_char = font_current.
width * bytes_high + 1;
99 #if defined(GLCD_DEVICE_AVR8)
100 var_width = pgm_read_byte(p);
113 for ( i = 0; i < var_width; i++ ) {
115 for ( j = 0; j < bytes_high; j++ ) {
116 #if defined(GLCD_DEVICE_AVR8)
117 uint8_t dat = pgm_read_byte( p + i*bytes_high + j );
119 uint8_t dat = *( p + i*bytes_high + j );
122 for (bit = 0; bit < 8; bit++) {
128 if (dat & (1<<bit)) {
175 #if defined(GLCD_DEVICE_AVR8)
176 char c = pgm_read_byte(str++);
void glcd_draw_string_xy(uint8_t x, uint8_t y, char *c)
Draw a string at specified location.
#define GLCD_LCD_WIDTH
User specified GLCD width in pixels Set to 0 for automatic assignment based on controller.
glcd_BoundingBox_t * glcd_bbox_selected
Pointer to bounding box currently in use.
glcd_FontConfig_t font_current
Bounding box for pixels that need to be updated.
uint8_t glcd_draw_char_xy(uint8_t x, uint8_t y, char c)
Draw a char at specified location.
#define GLCD_LCD_HEIGHT
User specified GLCD height in pixels Set to 0 for automatic assignment based on controller.
uint8_t * glcd_buffer_selected
Pointer to screen buffer currently in use.
enum font_table_type table_type
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.
void glcd_set_pixel(uint8_t x, uint8_t y, uint8_t color)
Set pixel to specified colour.
GLCD Library main header file.
void glcd_draw_string_xy_P(uint8_t x, uint8_t y, const char *str)
Draw a string from program memory at specified location.