Arm2D_common.c 465 B

1234567891011121314151617181920
  1. #include "Arm2D_common.h"
  2. uint16_t getColorCode(char* colorName) {
  3. if (strEqu("white", colorName)) {
  4. return GLCD_COLOR_WHITE;
  5. }
  6. if (strEqu("black", colorName)) {
  7. return GLCD_COLOR_BLACK;
  8. }
  9. if (strEqu("red", colorName)) {
  10. return GLCD_COLOR_RED;
  11. }
  12. if (strEqu("blue", colorName)) {
  13. return GLCD_COLOR_BLUE;
  14. }
  15. if (strEqu("green", colorName)) {
  16. return GLCD_COLOR_GREEN;
  17. }
  18. return 0x00;
  19. }