LCD LIB
Fork of RA8875 by
DisplayDefs.h@125:7a0b70f56550, 2016-08-01 (annotated)
- Committer:
- WiredHome
- Date:
- Mon Aug 01 22:31:42 2016 +0000
- Revision:
- 125:7a0b70f56550
- Parent:
- 123:2f45e80fec5f
Minor documentation tweaks
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 | |
WiredHome | 125:7a0b70f56550 | 7 | /// Return values from functions. Use this number, or use the |
WiredHome | 79:544eb4964795 | 8 | /// lookup function to get a text string. @see GetErrorMessage. |
WiredHome | 79:544eb4964795 | 9 | /// |
WiredHome | 31:c72e12cd5c67 | 10 | typedef enum |
WiredHome | 31:c72e12cd5c67 | 11 | { |
WiredHome | 31:c72e12cd5c67 | 12 | noerror, ///< no errors, command completed successfully |
WiredHome | 31:c72e12cd5c67 | 13 | bad_parameter, ///< one or more parameters are invalid |
WiredHome | 31:c72e12cd5c67 | 14 | file_not_found, ///< specified file could not be found |
WiredHome | 42:7cbdfd2bbfc5 | 15 | not_bmp_format, ///< file is not a .bmp file |
WiredHome | 42:7cbdfd2bbfc5 | 16 | not_ico_format, ///< file is not a .ico file |
WiredHome | 112:325ca91bc03d | 17 | not_supported_format, ///< file format is not yet supported (e.g. bits per pixel, compression) |
WiredHome | 31:c72e12cd5c67 | 18 | image_too_big, ///< image is too large for the screen |
WiredHome | 31:c72e12cd5c67 | 19 | not_enough_ram, ///< could not allocate ram for scanline |
WiredHome | 122:79e431f98fa9 | 20 | touch_cal_timeout, ///< timeout while trying to calibrate touchscreen, perhaps it is not installed. |
WiredHome | 115:c9862fd0c689 | 21 | external_abort, ///< an external process caused an abort |
WiredHome | 79:544eb4964795 | 22 | LastErrCode, // Private marker. |
WiredHome | 31:c72e12cd5c67 | 23 | } RetCode_t; |
WiredHome | 31:c72e12cd5c67 | 24 | |
WiredHome | 83:7bad0068cca0 | 25 | /// return values from TouchPanelReadable, TouchPanelA2DRaw, TouchPanelA2DFiltered. |
WiredHome | 83:7bad0068cca0 | 26 | /// @see TouchPanelReadable. |
WiredHome | 83:7bad0068cca0 | 27 | typedef enum |
WiredHome | 83:7bad0068cca0 | 28 | { |
WiredHome | 83:7bad0068cca0 | 29 | no_touch, ///< no touch is detected |
WiredHome | 83:7bad0068cca0 | 30 | touch, ///< touch is detected |
WiredHome | 83:7bad0068cca0 | 31 | held, ///< held after touch |
WiredHome | 83:7bad0068cca0 | 32 | release, ///< release is detected |
WiredHome | 83:7bad0068cca0 | 33 | no_cal, ///< no calibration matrix is available |
WiredHome | 83:7bad0068cca0 | 34 | } TouchCode_t; |
WiredHome | 83:7bad0068cca0 | 35 | |
WiredHome | 125:7a0b70f56550 | 36 | /// Data type that manages locations, which is typically an x or y pixel location, |
WiredHome | 37:f19b7e7449dc | 37 | /// which can range from -N to +N (even if the screen is 0 to +n). @see textloc_t. |
WiredHome | 37:f19b7e7449dc | 38 | typedef int16_t loc_t; |
WiredHome | 37:f19b7e7449dc | 39 | |
WiredHome | 125:7a0b70f56550 | 40 | /// Data type that manages text locations, which are row or column values in |
WiredHome | 37:f19b7e7449dc | 41 | /// units of character, not pixel. @see loc_t. |
WiredHome | 37:f19b7e7449dc | 42 | typedef uint16_t textloc_t; |
WiredHome | 37:f19b7e7449dc | 43 | |
WiredHome | 37:f19b7e7449dc | 44 | /// type that manages dimensions of width or height, which range from 0 to N. |
WiredHome | 37:f19b7e7449dc | 45 | typedef uint16_t dim_t; |
WiredHome | 37:f19b7e7449dc | 46 | |
WiredHome | 32:0e4f2ae512e2 | 47 | /// type that manages x,y pairs |
WiredHome | 32:0e4f2ae512e2 | 48 | typedef struct |
WiredHome | 32:0e4f2ae512e2 | 49 | { |
WiredHome | 37:f19b7e7449dc | 50 | loc_t x; ///< x value in the point |
WiredHome | 37:f19b7e7449dc | 51 | loc_t y; ///< y value in the point |
WiredHome | 32:0e4f2ae512e2 | 52 | } point_t; |
WiredHome | 32:0e4f2ae512e2 | 53 | |
WiredHome | 125:7a0b70f56550 | 54 | /// Data type that manages rectangles, which are pairs of points. It is recommended |
WiredHome | 81:01da2e34283d | 55 | /// that p1 contains the top-left point and p2 contains the bottom-right point, |
WiredHome | 81:01da2e34283d | 56 | /// even though eventually this should not matter. |
WiredHome | 81:01da2e34283d | 57 | typedef struct |
WiredHome | 81:01da2e34283d | 58 | { |
WiredHome | 81:01da2e34283d | 59 | point_t p1; ///< p1 defines one point on the rectangle |
WiredHome | 81:01da2e34283d | 60 | point_t p2; ///< p2 defines the opposite point on the rectangle |
WiredHome | 81:01da2e34283d | 61 | } rect_t; |
WiredHome | 81:01da2e34283d | 62 | |
WiredHome | 125:7a0b70f56550 | 63 | /// Data type that manages the calibration matrix for the resistive touch panel. |
WiredHome | 125:7a0b70f56550 | 64 | /// |
WiredHome | 125:7a0b70f56550 | 65 | /// This object, when instantiated, may be passed back and forth, stored |
WiredHome | 125:7a0b70f56550 | 66 | /// and loaded, but the internals are generally of little interest. |
WiredHome | 77:9206c13aa527 | 67 | typedef struct |
WiredHome | 77:9206c13aa527 | 68 | { |
WiredHome | 125:7a0b70f56550 | 69 | int32_t An; ///< calibration factor, see source for details |
WiredHome | 125:7a0b70f56550 | 70 | int32_t Bn; ///< calibration factor, see source for details |
WiredHome | 125:7a0b70f56550 | 71 | int32_t Cn; ///< calibration factor, see source for details |
WiredHome | 125:7a0b70f56550 | 72 | int32_t Dn; ///< calibration factor, see source for details |
WiredHome | 125:7a0b70f56550 | 73 | int32_t En; ///< calibration factor, see source for details |
WiredHome | 125:7a0b70f56550 | 74 | int32_t Fn; ///< calibration factor, see source for details |
WiredHome | 125:7a0b70f56550 | 75 | int32_t Divider; ///< calibration factor, see source for details |
WiredHome | 77:9206c13aa527 | 76 | } tpMatrix_t; |
WiredHome | 77:9206c13aa527 | 77 | |
WiredHome | 32:0e4f2ae512e2 | 78 | /// color type definition to let the compiler help keep us honest. |
WiredHome | 32:0e4f2ae512e2 | 79 | /// |
WiredHome | 32:0e4f2ae512e2 | 80 | /// colors can be defined with the RGB(r,g,b) macro, and there |
WiredHome | 32:0e4f2ae512e2 | 81 | /// are a number of predefined colors: |
WiredHome | 32:0e4f2ae512e2 | 82 | /// - Black, Blue, Green, Cyan, |
WiredHome | 32:0e4f2ae512e2 | 83 | /// - Red, Magenta, Brown, Gray, |
WiredHome | 32:0e4f2ae512e2 | 84 | /// - Charcoal, BrightBlue, BrightGreen, BrightCyan, |
WiredHome | 32:0e4f2ae512e2 | 85 | /// - Orange, Pink, Yellow, White |
WiredHome | 32:0e4f2ae512e2 | 86 | /// |
WiredHome | 32:0e4f2ae512e2 | 87 | typedef uint16_t color_t; |
WiredHome | 32:0e4f2ae512e2 | 88 | |
WiredHome | 32:0e4f2ae512e2 | 89 | /// background fill info for drawing Text, Rectangles, RoundedRectanges, Circles, Ellipses and Triangles. |
WiredHome | 32:0e4f2ae512e2 | 90 | typedef enum |
WiredHome | 32:0e4f2ae512e2 | 91 | { |
WiredHome | 32:0e4f2ae512e2 | 92 | NOFILL, ///< do not fill the object with the background color |
WiredHome | 32:0e4f2ae512e2 | 93 | FILL ///< fill the object space with the background color |
WiredHome | 32:0e4f2ae512e2 | 94 | } fill_t; |
WiredHome | 32:0e4f2ae512e2 | 95 | |
WiredHome | 31:c72e12cd5c67 | 96 | #endif // DISPLAYDEFS_H |