mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
20 lines
465 B
C
20 lines
465 B
C
#include "Arm2D_common.h"
|
|
|
|
uint16_t getColorCode(char* colorName) {
|
|
if (strEqu("white", colorName)) {
|
|
return GLCD_COLOR_WHITE;
|
|
}
|
|
if (strEqu("black", colorName)) {
|
|
return GLCD_COLOR_BLACK;
|
|
}
|
|
if (strEqu("red", colorName)) {
|
|
return GLCD_COLOR_RED;
|
|
}
|
|
if (strEqu("blue", colorName)) {
|
|
return GLCD_COLOR_BLUE;
|
|
}
|
|
if (strEqu("green", colorName)) {
|
|
return GLCD_COLOR_GREEN;
|
|
}
|
|
return 0x00;
|
|
} |