|
DMCP interface 03.17_023
|
LCD image functions. More...
Functions | |
| int | create_screenshot (int report_error) |
| Create screenshot. | |
| void | lcd_draw_img (const char *img, uint32_t xo, uint32_t yo, uint32_t x, uint32_t y) |
| Put image into LCD buffer. | |
| void | lcd_draw_img_direct (const char *img, uint32_t xo, uint32_t yo, uint32_t x, uint32_t y) |
| Put image directly on LCD. | |
| void | lcd_draw_img_part (const char *img, uint32_t xo, uint32_t yo, uint32_t x, uint32_t y, uint32_t dx) |
| Put part of image into LCD buffer. | |
| void | draw_power_off_image (int allow_errors) |
| Draw subsequent image from OFFIMG_DIR directory. | |
| void | reset_off_image_cycle () |
| Resets off image loop to first image. | |
| int | update_bmp_file_header (FIL *fp, int width, int height, uint32_t bg_color) |
| Write or update .bmp file header. | |
LCD image functions.
| int create_screenshot | ( | int | report_error | ) |
Create screenshot.
| report_error | (0/1) 0 - errors prints to LCD are suppressed |
Creates screenshot into BMP file in SCR_DIR. Filename is created from current date/time.
| void draw_power_off_image | ( | int | allow_errors | ) |
Draw subsequent image from OFFIMG_DIR directory.
| allow_errors | (0/1) 1 - info about errors fill be written to LCD |
| void lcd_draw_img | ( | const char * | img, |
| uint32_t | xo, | ||
| uint32_t | yo, | ||
| uint32_t | x, | ||
| uint32_t | y ) |
Put image into LCD buffer.
| img | Image data |
| xo | X origin coordinate at LCD |
| yo | Y origin coordinate at LCD |
| x | Width of image |
| y | Height of image |
All operations are byte aligned. Image isn't pixel shifted.
| void lcd_draw_img_direct | ( | const char * | img, |
| uint32_t | xo, | ||
| uint32_t | yo, | ||
| uint32_t | x, | ||
| uint32_t | y ) |
Put image directly on LCD.
| img | Image data |
| xo | X origin coordinate at LCD |
| yo | Y origin coordinate at LCD |
| x | Width of image |
| y | Height of image |
All operations are byte aligned. Image isn't pixel shifted.
| void lcd_draw_img_part | ( | const char * | img, |
| uint32_t | xo, | ||
| uint32_t | yo, | ||
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | dx ) |
Put part of image into LCD buffer.
| img | Image data |
| xo | X origin coordinate at LCD |
| yo | Y origin coordinate at LCD |
| x | Width of image |
| y | Height of image |
| dx | Width of image data to put into LCD buffer |
All operations are byte aligned. Image isn't pixel shifted.
| void reset_off_image_cycle | ( | ) |
Resets off image loop to first image.
Useful after changes in OFFIMG_DIR directory
| int update_bmp_file_header | ( | FIL * | fp, |
| int | width, | ||
| int | height, | ||
| uint32_t | bg_color ) |
Write or update .bmp file header.
| fp | Pointer to already opened file |
| width | BMP image width |
| height | BMP image height |
| bg_color | Background color |
BMP header is written with following parameters
Application has to write correct bitmap data after header.