четверг, 26 июля 2012 г.

ASF: RGB macros

Famouse RGB macros for R5G6B5 for ET0240006 (analogue of et024006_Color(R, G, B) in Atmel Software Framework):
#define GUI_RGB(R, G, B) ((((R) & 0xF8)<<8) | (((G) & 0xFC)<<3) | ((B)>>3))
may be used anywhere - where you need constant, not function call (initializer of structs members and so on)

Комментариев нет:

Отправить комментарий

Thanks for your posting!