images.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. #ifndef IMAGES_H_
  2. #define IMAGES_H_
  3. #include <stdint.h>
  4. #include <stdbool.h>
  5. //----------------------------------------------------------------------------- ----------------------------------------
  6. typedef enum showMode {
  7. // {INV:--:WHT:BLK::--:--:CLR:SET}
  8. SHOW_SET_ = 0x01,
  9. SHOW_CLR_ = 0x02,
  10. SHOW_ALL_ = SHOW_SET_ | SHOW_CLR_,
  11. SHOW_BLK_ = 0x10,
  12. SHOW_WHT_ = 0x20,
  13. SHOW_NRM_ = 0x00,
  14. SHOW_INV_ = SHOW_BLK_ | SHOW_WHT_,
  15. SHOW_SET_BLK = SHOW_SET_ | SHOW_BLK_,
  16. SHOW_SET_WHT = SHOW_SET_ | SHOW_WHT_,
  17. SHOW_CLR_BLK = SHOW_CLR_ | SHOW_BLK_,
  18. SHOW_CLR_WHT = SHOW_CLR_ | SHOW_WHT_,
  19. SHOW_ALL = SHOW_ALL_ | SHOW_NRM_,
  20. SHOW_ALL_INV = SHOW_ALL_ | SHOW_INV_,
  21. } showMode_t;
  22. //----------------------------------------------------------------------------- ----------------------------------------
  23. typedef struct image {
  24. uint8_t w; // width
  25. uint8_t h; // height
  26. bool c; // compressed?
  27. uint16_t len; // image data length
  28. uint8_t tag; // rle tag
  29. uint8_t data[]; // image data
  30. } image_t;
  31. //----------------------------------------------------------------------------- ----------------------------------------
  32. //[TAG]
  33. extern const image_t img_csLogo_Small;
  34. extern const image_t img_3x5_v;
  35. extern const image_t img_3x5_9;
  36. extern const image_t img_3x5_8;
  37. extern const image_t img_3x5_7;
  38. extern const image_t img_3x5_6;
  39. extern const image_t img_3x5_5;
  40. extern const image_t img_3x5_4;
  41. extern const image_t img_3x5_3;
  42. extern const image_t img_3x5_2;
  43. extern const image_t img_3x5_1;
  44. extern const image_t img_3x5_0;
  45. extern const image_t img_key_Ui;
  46. extern const image_t img_key_OKi;
  47. extern const image_t img_RIP;
  48. extern const image_t img_cc_trg_R4;
  49. extern const image_t img_cc_trg_R3;
  50. extern const image_t img_cc_trg_R2;
  51. extern const image_t img_cc_trg_R1;
  52. extern const image_t img_cc_trg_L4;
  53. extern const image_t img_cc_trg_L3;
  54. extern const image_t img_cc_trg_L2;
  55. extern const image_t img_cc_trg_L1;
  56. extern const image_t img_cc_Joy;
  57. extern const image_t img_cc_Main;
  58. extern const image_t img_cc_Cable;
  59. extern const image_t img_key_Back;
  60. extern const image_t img_key_OK;
  61. extern const image_t img_6x8_Z;
  62. extern const image_t img_6x8_Y;
  63. extern const image_t img_6x8_X;
  64. extern const image_t img_key_U;
  65. extern const image_t img_key_D;
  66. extern const image_t img_csLogo_FULL;
  67. extern const image_t img_6x8_7;
  68. extern const image_t img_key_R;
  69. extern const image_t img_key_L;
  70. extern const image_t img_5x7_7;
  71. extern const image_t img_5x7_F;
  72. extern const image_t img_5x7_E;
  73. extern const image_t img_5x7_D;
  74. extern const image_t img_5x7_C;
  75. extern const image_t img_5x7_B;
  76. extern const image_t img_5x7_A;
  77. extern const image_t img_5x7_9;
  78. extern const image_t img_5x7_8;
  79. extern const image_t img_5x7_6;
  80. extern const image_t img_5x7_5;
  81. extern const image_t img_5x7_4;
  82. extern const image_t img_5x7_3;
  83. extern const image_t img_5x7_2;
  84. extern const image_t img_5x7_1;
  85. extern const image_t img_5x7_0;
  86. extern const image_t img_6x8_v;
  87. extern const image_t img_6x8_n;
  88. extern const image_t img_6x8_G;
  89. extern const image_t img_6x8_F;
  90. extern const image_t img_6x8_E;
  91. extern const image_t img_6x8_d;
  92. extern const image_t img_6x8_C;
  93. extern const image_t img_6x8_B;
  94. extern const image_t img_6x8_A;
  95. extern const image_t img_6x8_9;
  96. extern const image_t img_6x8_8;
  97. extern const image_t img_6x8_6;
  98. extern const image_t img_6x8_5;
  99. extern const image_t img_6x8_4;
  100. extern const image_t img_6x8_3;
  101. extern const image_t img_6x8_2;
  102. extern const image_t img_6x8_1;
  103. extern const image_t img_6x8_0;
  104. extern const image_t img_ecp_SDA;
  105. extern const image_t img_ecp_SCL;
  106. extern const image_t img_ecp_port;
  107. extern const image_t img_cc_pad_UD1;
  108. extern const image_t img_cc_pad_LR1;
  109. extern const image_t img_cc_btn_Y1;
  110. extern const image_t img_cc_btn_X1;
  111. extern const image_t img_cc_btn_B1;
  112. extern const image_t img_cc_btn_A1;
  113. extern const image_t img_6x8_D;
  114. //----------------------------------------------------------------------------- ----------------------------------------
  115. #ifndef IMGTEST
  116. #include <gui/gui.h>
  117. void show(
  118. Canvas* const canvas,
  119. const uint8_t tlx,
  120. const uint8_t tly,
  121. const image_t* img,
  122. const showMode_t mode);
  123. #endif
  124. #endif //IMAGES_H_