pikapython/package/Arm2D/Arm2D_common.c
2021-10-05 09:49:52 +08:00

26 lines
485 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;
}