SPI based library for the ST7735 LCD controller.
Dependents: RayCastingEngine RETRO_LCD_PerformanceTest RETRO_loop_test RETRO_RickGame ... more
Color565.cpp@2:43f08d03a7e2, 2014-09-20 (annotated)
- Committer:
- taylorza
- Date:
- Sat Sep 20 05:43:17 2014 +0000
- Revision:
- 2:43f08d03a7e2
Add color constants based on the Windows 16 color palette
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
taylorza | 2:43f08d03a7e2 | 1 | /////////////////////////////////////////////////////////////////////////////// |
taylorza | 2:43f08d03a7e2 | 2 | // LCD_ST7735 - Driver for ST7735 LCD display controller |
taylorza | 2:43f08d03a7e2 | 3 | // Author: Chris Taylor (taylorza) |
taylorza | 2:43f08d03a7e2 | 4 | #include "mbed.h" |
taylorza | 2:43f08d03a7e2 | 5 | #include "Color565.h" |
taylorza | 2:43f08d03a7e2 | 6 | |
taylorza | 2:43f08d03a7e2 | 7 | const uint16_t Color565::White = Color565::fromRGB(0xff, 0xff, 0xff); |
taylorza | 2:43f08d03a7e2 | 8 | const uint16_t Color565::Silver = Color565::fromRGB(0xc0, 0xc0, 0xc0); |
taylorza | 2:43f08d03a7e2 | 9 | const uint16_t Color565::Gray = Color565::fromRGB(0x80, 0x80, 0x80); |
taylorza | 2:43f08d03a7e2 | 10 | const uint16_t Color565::Black = Color565::fromRGB(0x00, 0x00, 0x00); |
taylorza | 2:43f08d03a7e2 | 11 | const uint16_t Color565::Red = Color565::fromRGB(0xff, 0x00, 0x00); |
taylorza | 2:43f08d03a7e2 | 12 | const uint16_t Color565::Maroon = Color565::fromRGB(0x80, 0x00, 0x00); |
taylorza | 2:43f08d03a7e2 | 13 | const uint16_t Color565::Yellow = Color565::fromRGB(0xff, 0xff, 0x00); |
taylorza | 2:43f08d03a7e2 | 14 | const uint16_t Color565::Olive = Color565::fromRGB(0x80, 0x80, 0x00); |
taylorza | 2:43f08d03a7e2 | 15 | const uint16_t Color565::Lime = Color565::fromRGB(0x00, 0xff, 0x00); |
taylorza | 2:43f08d03a7e2 | 16 | const uint16_t Color565::Green = Color565::fromRGB(0x00, 0x80, 0x00); |
taylorza | 2:43f08d03a7e2 | 17 | const uint16_t Color565::Aqua = Color565::fromRGB(0x00, 0xff, 0xff); |
taylorza | 2:43f08d03a7e2 | 18 | const uint16_t Color565::Teal = Color565::fromRGB(0x00, 0x80, 0x80); |
taylorza | 2:43f08d03a7e2 | 19 | const uint16_t Color565::Blue = Color565::fromRGB(0x00, 0x00, 0xff); |
taylorza | 2:43f08d03a7e2 | 20 | const uint16_t Color565::Navy = Color565::fromRGB(0x00, 0x00, 0x80); |
taylorza | 2:43f08d03a7e2 | 21 | const uint16_t Color565::Fuchsia = Color565::fromRGB(0xff, 0x00, 0xff); |
taylorza | 2:43f08d03a7e2 | 22 | const uint16_t Color565::Purple = Color565::fromRGB(0x80, 0x00, 0x80); |