diff options
Diffstat (limited to 'firmware/export')
| -rw-r--r-- | firmware/export/lcd-charcell.h | 30 | ||||
| -rw-r--r-- | firmware/export/lcd.h | 12 |
2 files changed, 29 insertions, 13 deletions
diff --git a/firmware/export/lcd-charcell.h b/firmware/export/lcd-charcell.h index 9a93cf1..0684f9c 100644 --- a/firmware/export/lcd-charcell.h +++ b/firmware/export/lcd-charcell.h @@ -17,6 +17,20 @@ * ****************************************************************************/ +/* target dependent - to be adjusted for other charcell targets */ +#define HW_PATTERN_SIZE 7 /* number of bytes per pattern */ +#define MAX_HW_PATTERNS 8 /* max. number of user-definable hw patterns */ + +struct cursor_info { + unsigned char hw_char; + bool enabled; + bool visible; + int x; + int y; + int divider; + int downcount; +}; + /* map unicode characters to hardware or extended lcd characters */ struct xchar_info { unsigned short ucs; @@ -28,10 +42,18 @@ struct xchar_info { unsigned char hw_char; /* direct or substitute */ }; -/* target dependent - to be adjusted for other charcell targets */ -#define HW_PATTERN_SIZE 7 /* number of bytes per pattern */ -#define MAX_HW_PATTERNS 8 /* max. number of user-definable hw patterns */ -extern int hw_pattern_count; /* actual number of user-definable hw patterns */ +/* track usage of user-definable characters */ +struct pattern_info { + short count; + unsigned short xchar; + unsigned char pattern[HW_PATTERN_SIZE]; +}; + +extern int lcd_pattern_count; /* actual number of user-definable hw patterns */ + +extern unsigned char lcd_charbuffer[LCD_HEIGHT][LCD_WIDTH]; +extern struct pattern_info lcd_patterns[MAX_HW_PATTERNS]; +extern struct cursor_info lcd_cursor; extern const struct xchar_info *xchar_info; extern int xchar_info_size; /* number of entries */ diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 48de53a..68f0961 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -64,6 +64,7 @@ extern int lcd_getxmargin(void); extern int lcd_getymargin(void); extern int lcd_getstringsize(const unsigned char *str, int *w, int *h); +extern void lcd_update(void); extern void lcd_clear_display(void); extern void lcd_putsxy(int x, int y, const unsigned char *string); extern void lcd_puts(int x, int y, const unsigned char *string); @@ -79,7 +80,6 @@ extern void lcd_scroll_delay(int ms); extern void lcd_puts_scroll(int x, int y, const unsigned char* string); extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string, int style); -extern void lcd_icon(int icon, bool enable); #if defined(HAVE_LCD_COLOR) && !defined(SIMULATOR) extern void lcd_yuv_blit(unsigned char * const src[3], @@ -87,12 +87,11 @@ extern void lcd_yuv_blit(unsigned char * const src[3], int x, int y, int width, int height); #endif -#if defined(SIMULATOR) || defined(HAVE_LCD_BITMAP) +#ifdef HAVE_LCD_BITMAP /* performance function */ extern void lcd_blit(const fb_data* data, int x, int by, int width, int bheight, int stride); -extern void lcd_update(void); /* update a fraction of the screen */ extern void lcd_update_rect(int x, int y, int width, int height); @@ -101,10 +100,6 @@ extern void lcd_remote_update(void); /* update a fraction of the screen */ extern void lcd_remote_update_rect(int x, int y, int width, int height); #endif - -#else - #define lcd_update() - #define lcd_update_rect(x,y,w,h) #endif #ifdef HAVE_LCD_CHARCELLS @@ -132,9 +127,8 @@ enum ICON_PARAM }; +void lcd_icon(int icon, bool enable); void lcd_double_height(bool on); -void lcd_put_hw_char(int x, int y, unsigned char hw_char); -void lcd_define_hw_pattern(int which, const char *pattern); void lcd_define_pattern(unsigned long ucs, const char *pattern); unsigned long lcd_get_locked_pattern(void); void lcd_unlock_pattern(unsigned long ucs); |