Forked para SNOCC
Fork of RA8875 by
DisplayDefs.h@32:0e4f2ae512e2, 2014-01-21 (annotated)
- Committer:
- WiredHome
- Date:
- Tue Jan 21 03:28:36 2014 +0000
- Revision:
- 32:0e4f2ae512e2
- Parent:
- 31:c72e12cd5c67
- Child:
- 37:f19b7e7449dc
Tuned up the Bitmap support - includes 24-bit color, and some hardware performance improvements.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
WiredHome | 31:c72e12cd5c67 | 1 | #ifndef DISPLAYDEFS_H |
WiredHome | 31:c72e12cd5c67 | 2 | #define DISPLAYDEFS_H |
WiredHome | 31:c72e12cd5c67 | 3 | |
WiredHome | 32:0e4f2ae512e2 | 4 | #define RGB(r,g,b) ( ((r<<8)&0xF800) | ((g<<3)&0x07E0) | (b>>3) ) |
WiredHome | 32:0e4f2ae512e2 | 5 | |
WiredHome | 31:c72e12cd5c67 | 6 | typedef uint16_t color_t; |
WiredHome | 31:c72e12cd5c67 | 7 | |
WiredHome | 31:c72e12cd5c67 | 8 | /// return values from functions |
WiredHome | 31:c72e12cd5c67 | 9 | typedef enum |
WiredHome | 31:c72e12cd5c67 | 10 | { |
WiredHome | 31:c72e12cd5c67 | 11 | noerror, ///< no errors, command completed successfully |
WiredHome | 31:c72e12cd5c67 | 12 | bad_parameter, ///< one or more parameters are invalid |
WiredHome | 31:c72e12cd5c67 | 13 | file_not_found, ///< specified file could not be found |
WiredHome | 31:c72e12cd5c67 | 14 | not_bmp_format, ///< file is a not bmp file |
WiredHome | 31:c72e12cd5c67 | 15 | not_supported_format, ///< file format is not yet supported |
WiredHome | 31:c72e12cd5c67 | 16 | image_too_big, ///< image is too large for the screen |
WiredHome | 31:c72e12cd5c67 | 17 | not_enough_ram, ///< could not allocate ram for scanline |
WiredHome | 31:c72e12cd5c67 | 18 | } RetCode_t; |
WiredHome | 31:c72e12cd5c67 | 19 | |
WiredHome | 32:0e4f2ae512e2 | 20 | /// type that manages x,y pairs |
WiredHome | 32:0e4f2ae512e2 | 21 | typedef struct |
WiredHome | 32:0e4f2ae512e2 | 22 | { |
WiredHome | 32:0e4f2ae512e2 | 23 | uint16_t x; ///< x value in the point |
WiredHome | 32:0e4f2ae512e2 | 24 | uint16_t y; ///< y value in the point |
WiredHome | 32:0e4f2ae512e2 | 25 | } point_t; |
WiredHome | 32:0e4f2ae512e2 | 26 | |
WiredHome | 32:0e4f2ae512e2 | 27 | /// color type definition to let the compiler help keep us honest. |
WiredHome | 32:0e4f2ae512e2 | 28 | /// |
WiredHome | 32:0e4f2ae512e2 | 29 | /// colors can be defined with the RGB(r,g,b) macro, and there |
WiredHome | 32:0e4f2ae512e2 | 30 | /// are a number of predefined colors: |
WiredHome | 32:0e4f2ae512e2 | 31 | /// - Black, Blue, Green, Cyan, |
WiredHome | 32:0e4f2ae512e2 | 32 | /// - Red, Magenta, Brown, Gray, |
WiredHome | 32:0e4f2ae512e2 | 33 | /// - Charcoal, BrightBlue, BrightGreen, BrightCyan, |
WiredHome | 32:0e4f2ae512e2 | 34 | /// - Orange, Pink, Yellow, White |
WiredHome | 32:0e4f2ae512e2 | 35 | /// |
WiredHome | 32:0e4f2ae512e2 | 36 | typedef uint16_t color_t; |
WiredHome | 32:0e4f2ae512e2 | 37 | |
WiredHome | 32:0e4f2ae512e2 | 38 | /// background fill info for drawing Text, Rectangles, RoundedRectanges, Circles, Ellipses and Triangles. |
WiredHome | 32:0e4f2ae512e2 | 39 | typedef enum |
WiredHome | 32:0e4f2ae512e2 | 40 | { |
WiredHome | 32:0e4f2ae512e2 | 41 | NOFILL, ///< do not fill the object with the background color |
WiredHome | 32:0e4f2ae512e2 | 42 | FILL ///< fill the object space with the background color |
WiredHome | 32:0e4f2ae512e2 | 43 | } fill_t; |
WiredHome | 32:0e4f2ae512e2 | 44 | |
WiredHome | 31:c72e12cd5c67 | 45 | #endif // DISPLAYDEFS_H |