![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Music Player for ARCH-PRO
Dependencies: GT20L16J1Y_font TinyJpgDec mbed
SeeedStudio Arch Pro + aitendo TFT-LCD w/Touch panel => .wav File Player
LPC1768 + aitendo TFT-LCD w/Touch panel => .wav File Player
http://goji2100.com/
mGTFT/mGTFT.h@0:6fa19738f62e, 2014-09-08 (annotated)
- Committer:
- Goji
- Date:
- Mon Sep 08 16:07:05 2014 +0000
- Revision:
- 0:6fa19738f62e
Music Player for ARCH-PRO
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Goji | 0:6fa19738f62e | 1 | // -------------------------------------------------------- |
Goji | 0:6fa19738f62e | 2 | // mGTFT.h (c) CopYright 2013-2014 Goji. |
Goji | 0:6fa19738f62e | 3 | // -------------------------------------------------------- |
Goji | 0:6fa19738f62e | 4 | |
Goji | 0:6fa19738f62e | 5 | #include "mGTFTdev.h" |
Goji | 0:6fa19738f62e | 6 | |
Goji | 0:6fa19738f62e | 7 | #define __RGB(r,g,b) (uint16_t)((r<<11)|(g<<6)|b) |
Goji | 0:6fa19738f62e | 8 | #define WHITE (__RGB(31, 31, 31)) |
Goji | 0:6fa19738f62e | 9 | #define DWHITE (__RGB(27, 27, 27)) |
Goji | 0:6fa19738f62e | 10 | #define RED (__RGB(31, 0, 0)) |
Goji | 0:6fa19738f62e | 11 | #define GREEN (__RGB( 0, 31, 0)) |
Goji | 0:6fa19738f62e | 12 | #define BLUE (__RGB( 0, 0, 31)) |
Goji | 0:6fa19738f62e | 13 | #define BLACK (__RGB( 0, 0, 0)) |
Goji | 0:6fa19738f62e | 14 | #define YELLOW (__RGB(31, 31, 0)) |
Goji | 0:6fa19738f62e | 15 | #define MAGENTA (__RGB(31, 0, 31)) |
Goji | 0:6fa19738f62e | 16 | #define CYAN (__RGB( 0, 31, 31)) |
Goji | 0:6fa19738f62e | 17 | #define GRAY (__RGB(11, 11, 11)) |
Goji | 0:6fa19738f62e | 18 | #define GRAY1 (__RGB(10, 10, 8)) |
Goji | 0:6fa19738f62e | 19 | #define GRAY2 (__RGB(16, 16, 14)) |
Goji | 0:6fa19738f62e | 20 | #define BLACK1 (__RGB( 0, 0, 1)) |
Goji | 0:6fa19738f62e | 21 | |
Goji | 0:6fa19738f62e | 22 | #define TFT_STOP() // { TFT_CS_1; LCDTFT::wr_data(0); } |
Goji | 0:6fa19738f62e | 23 | #define TFT_RUN() // TFT_CS_0 |
Goji | 0:6fa19738f62e | 24 | |
Goji | 0:6fa19738f62e | 25 | //#define delay_ms(ms) wait_ms(ms) |
Goji | 0:6fa19738f62e | 26 | #define TFT_abs(a, b) ((a > b) ? (a - b) : (b - a)) |
Goji | 0:6fa19738f62e | 27 | #define TFT_swap(a, b) { uint16_t w = a; a = b; b = w; } |
Goji | 0:6fa19738f62e | 28 | |
Goji | 0:6fa19738f62e | 29 | void TFT_wr_regs(uint8_t regv); |
Goji | 0:6fa19738f62e | 30 | void TFT_wr_reg(uint16_t regv); |
Goji | 0:6fa19738f62e | 31 | void TFT_wr_index(uint16_t index); |
Goji | 0:6fa19738f62e | 32 | void TFT_wr_data(uint16_t data); |
Goji | 0:6fa19738f62e | 33 | void TFT_wr_index_data(uint16_t index, uint16_t data); |
Goji | 0:6fa19738f62e | 34 | |
Goji | 0:6fa19738f62e | 35 | void TFT_init(void); |
Goji | 0:6fa19738f62e | 36 | void TFT_setOrientation(uint16_t am); |
Goji | 0:6fa19738f62e | 37 | void TFT_setWindow(int16_t x1, int16_t y1, int16_t x2, int16_t y2); |
Goji | 0:6fa19738f62e | 38 | void TFT_clearScreen(uint16_t ccolor); |
Goji | 0:6fa19738f62e | 39 | void TFT_setXY(int16_t x1, int16_t y1); |
Goji | 0:6fa19738f62e | 40 | void TFT_setPixel(int16_t x1, int16_t y1, uint16_t ccode); |
Goji | 0:6fa19738f62e | 41 | void TFT_setPixels(int16_t x1, int16_t y1, uint16_t ccode); |
Goji | 0:6fa19738f62e | 42 | void TFT_drawLine(int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t ccolor); |
Goji | 0:6fa19738f62e | 43 | void TFT_drawVerticalLine(int16_t x1, int16_t y1, int16_t y2, uint16_t ccode); |
Goji | 0:6fa19738f62e | 44 | void TFT_drawHorizontalLine(int16_t x1, int16_t y1, int16_t x2, uint16_t ccode); |
Goji | 0:6fa19738f62e | 45 | void TFT_drawRectangle(int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t ccode); |
Goji | 0:6fa19738f62e | 46 | void TFT_fillRectangle(int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t lccode, uint16_t fccode); |
Goji | 0:6fa19738f62e | 47 | void TFT_drawCircle(int16_t x1, int16_t y1, int16_t r, uint16_t lccode, uint16_t fccode); |
Goji | 0:6fa19738f62e | 48 | void TFT_drawFont(int16_t x1, int16_t y1, int16_t width, int16_t line, uint8_t *font, uint16_t fccode, uint16_t bccode); |
Goji | 0:6fa19738f62e | 49 | void TFT_drawICON(int16_t x1, int16_t y1, int16_t width, int16_t line, uint16_t *icon, uint16_t fccode, uint16_t bccode); |
Goji | 0:6fa19738f62e | 50 | uint32_t TFT_getFont(uint8_t *font, int16_t width, int16_t line); |
Goji | 0:6fa19738f62e | 51 | int16_t TFT_drawText(int16_t x1, int16_t y1, uint8_t *s, uint16_t fccode, uint16_t bccode); |