2021-10-05 09:49:52 +08:00
|
|
|
#include "Arm2D_common.h"
|
|
|
|
|
2021-11-03 20:11:31 +08:00
|
|
|
uint16_t getColorCode(char* colorName) {
|
|
|
|
if (strEqu("white", colorName)) {
|
2021-10-05 09:49:52 +08:00
|
|
|
return GLCD_COLOR_WHITE;
|
|
|
|
}
|
2021-11-03 20:11:31 +08:00
|
|
|
if (strEqu("black", colorName)) {
|
2021-10-05 09:49:52 +08:00
|
|
|
return GLCD_COLOR_BLACK;
|
|
|
|
}
|
2021-11-03 20:11:31 +08:00
|
|
|
if (strEqu("red", colorName)) {
|
2021-10-05 09:49:52 +08:00
|
|
|
return GLCD_COLOR_RED;
|
|
|
|
}
|
2021-11-03 20:11:31 +08:00
|
|
|
if (strEqu("blue", colorName)) {
|
2021-10-05 09:49:52 +08:00
|
|
|
return GLCD_COLOR_BLUE;
|
|
|
|
}
|
2021-11-03 20:11:31 +08:00
|
|
|
if (strEqu("green", colorName)) {
|
2021-10-05 09:49:52 +08:00
|
|
|
return GLCD_COLOR_GREEN;
|
|
|
|
}
|
|
|
|
return 0x00;
|
|
|
|
}
|