Library to control a Graphics TFT connected to 4-wire SPI - revised for the Raio RA8875 Display Controller.

Dependents:   FRDM_RA8875_mPaint RA8875_Demo RA8875_KeyPadDemo SignalGenerator ... more

Fork of SPI_TFT by Peter Drescher

See Components - RA8875 Based Display

Enhanced touch-screen support - where it previous supported both the Resistive Touch and Capacitive Touch based on the FT5206 Touch Controller, now it also has support for the GSL1680 Touch Controller.

Offline Help Manual (Windows chm)

/media/uploads/WiredHome/ra8875.zip.bin (download, rename to .zip and unzip)

Committer:
WiredHome
Date:
Thu Jul 24 00:41:37 2014 +0000
Revision:
59:fb40aad4efd4
Parent:
42:7cbdfd2bbfc5
Child:
77:9206c13aa527
Nearly insignificant changes to the test code.

Who changed what in which revision?

UserRevisionLine numberNew 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 42:7cbdfd2bbfc5 14 not_bmp_format, ///< file is not a .bmp file
WiredHome 42:7cbdfd2bbfc5 15 not_ico_format, ///< file is not a .ico file
WiredHome 31:c72e12cd5c67 16 not_supported_format, ///< file format is not yet supported
WiredHome 31:c72e12cd5c67 17 image_too_big, ///< image is too large for the screen
WiredHome 31:c72e12cd5c67 18 not_enough_ram, ///< could not allocate ram for scanline
WiredHome 31:c72e12cd5c67 19 } RetCode_t;
WiredHome 31:c72e12cd5c67 20
WiredHome 37:f19b7e7449dc 21 /// type that manages locations, which is typically an x or y pixel location,
WiredHome 37:f19b7e7449dc 22 /// which can range from -N to +N (even if the screen is 0 to +n). @see textloc_t.
WiredHome 37:f19b7e7449dc 23 typedef int16_t loc_t;
WiredHome 37:f19b7e7449dc 24
WiredHome 37:f19b7e7449dc 25 /// type that manages text locations, which are row or column values in
WiredHome 37:f19b7e7449dc 26 /// units of character, not pixel. @see loc_t.
WiredHome 37:f19b7e7449dc 27 typedef uint16_t textloc_t;
WiredHome 37:f19b7e7449dc 28
WiredHome 37:f19b7e7449dc 29 /// type that manages dimensions of width or height, which range from 0 to N.
WiredHome 37:f19b7e7449dc 30 typedef uint16_t dim_t;
WiredHome 37:f19b7e7449dc 31
WiredHome 32:0e4f2ae512e2 32 /// type that manages x,y pairs
WiredHome 32:0e4f2ae512e2 33 typedef struct
WiredHome 32:0e4f2ae512e2 34 {
WiredHome 37:f19b7e7449dc 35 loc_t x; ///< x value in the point
WiredHome 37:f19b7e7449dc 36 loc_t y; ///< y value in the point
WiredHome 32:0e4f2ae512e2 37 } point_t;
WiredHome 32:0e4f2ae512e2 38
WiredHome 32:0e4f2ae512e2 39 /// color type definition to let the compiler help keep us honest.
WiredHome 32:0e4f2ae512e2 40 ///
WiredHome 32:0e4f2ae512e2 41 /// colors can be defined with the RGB(r,g,b) macro, and there
WiredHome 32:0e4f2ae512e2 42 /// are a number of predefined colors:
WiredHome 32:0e4f2ae512e2 43 /// - Black, Blue, Green, Cyan,
WiredHome 32:0e4f2ae512e2 44 /// - Red, Magenta, Brown, Gray,
WiredHome 32:0e4f2ae512e2 45 /// - Charcoal, BrightBlue, BrightGreen, BrightCyan,
WiredHome 32:0e4f2ae512e2 46 /// - Orange, Pink, Yellow, White
WiredHome 32:0e4f2ae512e2 47 ///
WiredHome 32:0e4f2ae512e2 48 typedef uint16_t color_t;
WiredHome 32:0e4f2ae512e2 49
WiredHome 32:0e4f2ae512e2 50 /// background fill info for drawing Text, Rectangles, RoundedRectanges, Circles, Ellipses and Triangles.
WiredHome 32:0e4f2ae512e2 51 typedef enum
WiredHome 32:0e4f2ae512e2 52 {
WiredHome 32:0e4f2ae512e2 53 NOFILL, ///< do not fill the object with the background color
WiredHome 32:0e4f2ae512e2 54 FILL ///< fill the object space with the background color
WiredHome 32:0e4f2ae512e2 55 } fill_t;
WiredHome 32:0e4f2ae512e2 56
WiredHome 31:c72e12cd5c67 57 #endif // DISPLAYDEFS_H