Any help appreciated.
________
Tom
Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard
#define _RGB32BIT(a, r, g, b) ( + ((g) << 8) + ((r) << 16) + ( << 24))
#define _RGB32BIT(a, r, g, b) ((b) + ((g) << 8) + ((r) << 16) + ((a) << 24))
typedef unsigned char u8_t;
typedef unsigned short u16_t;
inline u16_t rgb555(u8_t r, u8_t g, u8_t b) {
return
(u16_t(r & 0xf8) << 7) ||
(u16_t(g & 0xf8) << 2) ||
(u16_t(b & 0xf8) >> 3);
}#define RGB_16(r, g, b) (((r) << 11) | ((g) << 5) | (b))
#define RGB_32(r, g, b) (((r) << 16) | ((g) << 8) | (b))
Users browsing this forum: No registered users and 2 guests