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
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)
Diff: Bitmap.h
- Revision:
- 125:7a0b70f56550
- Parent:
- 42:7cbdfd2bbfc5
- Child:
- 163:17526689a3ed
--- a/Bitmap.h Sun Jul 31 20:59:01 2016 +0000 +++ b/Bitmap.h Mon Aug 01 22:31:42 2016 +0000 @@ -23,28 +23,30 @@ #pragma push #pragma pack(2) +/// Bitmap file header typedef struct /**** BMP file header structure ****/ { - uint16_t bfType; /* Magic number for file */ - uint32_t bfSize; /* Size of file */ - uint16_t bfReserved1; /* Reserved */ - uint16_t bfReserved2; /* ... */ - uint32_t bfOffBits; /* Offset to bitmap data */ + uint16_t bfType; ///< Magic number for file + uint32_t bfSize; ///< Size of file + uint16_t bfReserved1; ///< reserved placeholder for the structure footprint + uint16_t bfReserved2; ///< reserved placeholder for the structure footprint + uint32_t bfOffBits; ///< Offset to bitmap data } BITMAPFILEHEADER; +/// Bitmap information header typedef struct /**** BMP file info structure ****/ { - uint32_t biSize; /* Size of info header */ - uint32_t biWidth; /* Width of image */ - uint32_t biHeight; /* Height of image */ - uint16_t biPlanes; /* Number of color planes */ - uint16_t biBitCount; /* Number of bits per pixel */ - uint32_t biCompression; /* Type of compression to use */ - uint32_t biSizeImage; /* Size of image data */ - int32_t biXPelsPerMeter; /* X pixels per meter */ - int32_t biYPelsPerMeter; /* Y pixels per meter */ - uint32_t biClrUsed; /* Number of colors used */ - uint32_t biClrImportant; /* Number of important colors */ + uint32_t biSize; ///< Size of info header + uint32_t biWidth; ///< Width of image + uint32_t biHeight; ///< Height of image + uint16_t biPlanes; ///< Number of color planes + uint16_t biBitCount; ///< Number of bits per pixel + uint32_t biCompression; ///< Type of compression to use + uint32_t biSizeImage; ///< Size of image data + int32_t biXPelsPerMeter; ///< X pixels per meter + int32_t biYPelsPerMeter; ///< Y pixels per meter + uint32_t biClrUsed; ///< Number of colors used + uint32_t biClrImportant; ///< Number of important colors } BITMAPINFOHEADER; #pragma pop @@ -59,12 +61,13 @@ # define BI_RLE4 2 /* 4-bit run-length compression */ # define BI_BITFIELDS 3 /* RGB bitmap with RGB masks */ +/// An RGB Quad data type used by the bitmap driver. typedef struct /**** Colormap entry structure ****/ { - uint8_t rgbBlue; /* Blue value */ - uint8_t rgbGreen; /* Green value */ - uint8_t rgbRed; /* Red value */ - uint8_t rgbReserved; /* Reserved */ + uint8_t rgbBlue; ///< Blue value + uint8_t rgbGreen; ///< Green value + uint8_t rgbRed; ///< Red value + uint8_t rgbReserved; ///< Reserved } RGBQUAD; //typedef struct /**** Bitmap information structure ****/ @@ -77,23 +80,25 @@ #pragma push #pragma pack(2) +/// Icon file type file header. typedef struct /**** ICO file header structure ****/ { - uint16_t Reserved_zero; // Always zero - uint16_t icType; // 1 for .ico, 2 for .cur - uint16_t icImageCount; // number of images in the file + uint16_t Reserved_zero; ///< Always zero + uint16_t icType; ///< 1 for .ico, 2 for .cur + uint16_t icImageCount; ///< number of images in the file } ICOFILEHEADER; - + +/// Icon file type directory entry structure typedef struct /**** ICO file Directory Entry structure (1 or more) ****/ { - uint8_t biWidth; /* Width of image */ - uint8_t biHeight; /* Height of image */ - uint8_t biClrUsed; /* Number of colors used */ - uint8_t Reserved_zero; - uint16_t biPlanes; /* Number of color planes (ICO should be 0 or 1, CUR horz hotspot */ - uint16_t biBitCount; /* Number of bits per pixel (ICO bits per pixel, CUR vert hotspot */ - uint32_t biSizeImage; /* Size of image data */ - uint32_t bfOffBits; /* Offset into file for the bitmap data */ + uint8_t biWidth; ///< Width of image + uint8_t biHeight; ///< Height of image + uint8_t biClrUsed; ///< Number of colors used + uint8_t Reserved_zero; ///< reserved placeholder for the structure footprint + uint16_t biPlanes; ///< Number of color planes (ICO should be 0 or 1, CUR horz hotspot + uint16_t biBitCount; ///< Number of bits per pixel (ICO bits per pixel, CUR vert hotspot + uint32_t biSizeImage; ///< Size of image data + uint32_t bfOffBits; ///< Offset into file for the bitmap data } ICODIRENTRY; #pragma pop