Commit 52ce1269 authored by Iulian Gheorghiu's avatar Iulian Gheorghiu

Move the color converter macro from 32 to 16 bit to the global header file.

parent 1317047d
......@@ -10,6 +10,7 @@
#include <api/i2c.h>
#include <lib/gfx/resource/fonts.h>
#include <lib/string.h>
#include <include/global.h>
/**********************************************/
#ifdef __AVR_XMEGA__
#define read_data_byte(addr) pgm_read_byte(&addr)
......@@ -355,9 +356,6 @@ typedef struct
// rgb.txt) that are supported by typical web browsers.
//
//*****************************************************************************
#define COLOR_CONVERSION_32_TO_16(COLOR_32) \
(unsigned short)(((((unsigned long)COLOR_32 >> 19) & 0x1F) << 11) | (((COLOR_32 >> 10) & 0x3F) << 5) | ((COLOR_32 >> 3) & 0x1F))
#if (__SIZEOF_INT__ == 2)
#define ClrAliceBlue COLOR_CONVERSION_32_TO_16(0x00F0F8FF)
#define ClrAntiqueWhite COLOR_CONVERSION_32_TO_16(0x00FAEBD7)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment