Microchip® Advanced Software Framework

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
XPM USART Screendump functions

This service will add the possibility to dump the LCD screen to the USART using the XPM file format.

Before using the screen dump function one should make sure that one has performed initialization of this service by calling gfx_mono_screen_dump_init() to set up which USART to use. One should also make sure that one has initialized the gfx mono driver gfx_mono_init() which will produce the screen buffer that is dumped trough the USART.

Dependencies

This driver depends on the following modules:

Macros

#define _XPM_HEADER(w, h)
 
#define GFX_MONO_LCD_PAGE_COUNT   GFX_MONO_LCD_HEIGHT / LCD_PAGE_HEIGHT
 
#define LCD_PAGE_HEIGHT   8
 TODO: This define should be fetched from the GFX display header file. More...
 
#define str(s)   # s
 
#define XPM_HEADER   _XPM_HEADER(GFX_MONO_LCD_WIDTH, GFX_MONO_LCD_HEIGHT)
 

Functions

static void gfx_mono_screen_dump (void)
 Function for dumping a LCD framebuffer. More...
 
static void gfx_mono_screen_dump_init (dump_usart_t *usart, const usart_serial_options_t *options)
 Init the framebuffer dump function. More...
 

Variables

dump_usart_t * dump_usart
 storage for the usart to use when dumping data More...
 
static const uint8_t xpm_header [] = XPM_HEADER
 

#define _XPM_HEADER (   w,
 
)
Value:
"/* XPM */\r\n" \
"static char * asf_screen_dump[] = {\r\n" \
"\"" str(w) " " str(h) " 2 1\",\r\n" \
"\" c #FFFFFF\",\r\n" \
"\". c #000000\",\r\n"
#define str(s)
Definition: gfx_mono_screen_dump.h:71
#define GFX_MONO_LCD_PAGE_COUNT   GFX_MONO_LCD_HEIGHT / LCD_PAGE_HEIGHT

Referenced by gfx_mono_screen_dump().

#define LCD_PAGE_HEIGHT   8

TODO: This define should be fetched from the GFX display header file.

Referenced by gfx_mono_screen_dump().

#define str (   s)    # s

static void gfx_mono_screen_dump ( void  )
inlinestatic

Function for dumping a LCD framebuffer.

This function will dump a framebuffer to a UART in XPM file format.

References gfx_mono_get_page, GFX_MONO_LCD_PAGE_COUNT, GFX_MONO_LCD_WIDTH, LCD_PAGE_HEIGHT, usart_putchar(), usart_serial_getchar(), and usart_serial_write_packet().

Referenced by main().

static void gfx_mono_screen_dump_init ( dump_usart_t *  usart,
const usart_serial_options_t options 
)
inlinestatic

Init the framebuffer dump function.

Parameters
usartpointer to the USART to use for dumping the image
optionspointer to the USART options, for documentation see usart_serial_options_t

References usart_serial_init().

Referenced by main().

dump_usart_t* dump_usart

storage for the usart to use when dumping data

const uint8_t xpm_header[] = XPM_HEADER
static