trigger.h 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. /*!
  2. * trigger.cpp - Easy library for Nextion Displays
  3. * Copyright (c) 2020 Athanasios Seitanis < seithagta@gmail.com >.
  4. * All rights reserved under the library's licence
  5. */
  6. /*! We separate this file from the EasyNextionLibrary.cpp in order to make easier the modifications for it
  7. * and for simplifying reasons instead of dealing with a large code file.
  8. * if you want to change the name of the predefined voids that I made,(trigger1, trigger2....etc)
  9. * you must change:
  10. 1. The name from "declare the functions"
  11. ---------(example: extern void trigger1(); -> extern void myFunction();)
  12. 2. The name from "declaration of the function as weak"
  13. (example: extern void trigger1() __attribute__((weak)); ---> extern void myFunction() __attribute__((weak));)
  14. 3. the predefined name in the switch(){case} for the trigger command group at the callTriggers.cpp file
  15. * With the same way, you can add as many extern void as you like
  16. * NOTE: WE can have UP TO 255 extern void
  17. *
  18. * When a function has a weak attribute it will be created only when user
  19. * declare this function on the main code
  20. */
  21. #ifndef trigger_h
  22. #define trigger_h
  23. // weak attribute funcion for read the custom command protocol
  24. extern void easyNexReadCustomCommand();
  25. extern void easyNexReadCustomCommand() __attribute__((weak));
  26. // declare the functions for triggers
  27. extern void trigger0();
  28. extern void trigger1();
  29. extern void trigger2();
  30. extern void trigger3();
  31. extern void trigger4();
  32. extern void trigger5();
  33. extern void trigger6();
  34. extern void trigger7();
  35. extern void trigger8();
  36. extern void trigger9();
  37. extern void trigger10();
  38. extern void trigger11();
  39. extern void trigger12();
  40. extern void trigger13();
  41. extern void trigger14();
  42. extern void trigger15();
  43. extern void trigger16();
  44. extern void trigger17();
  45. extern void trigger18();
  46. extern void trigger19();
  47. extern void trigger20();
  48. extern void trigger21();
  49. extern void trigger22();
  50. extern void trigger23();
  51. extern void trigger24();
  52. extern void trigger25();
  53. extern void trigger26();
  54. extern void trigger27();
  55. extern void trigger28();
  56. extern void trigger29();
  57. extern void trigger30();
  58. extern void trigger31();
  59. extern void trigger32();
  60. extern void trigger33();
  61. extern void trigger34();
  62. extern void trigger35();
  63. extern void trigger36();
  64. extern void trigger37();
  65. extern void trigger38();
  66. extern void trigger39();
  67. extern void trigger40();
  68. extern void trigger41();
  69. extern void trigger42();
  70. extern void trigger43();
  71. extern void trigger44();
  72. extern void trigger45();
  73. extern void trigger46();
  74. extern void trigger47();
  75. extern void trigger48();
  76. extern void trigger49();
  77. extern void trigger50();
  78. extern void trigger51();
  79. extern void trigger52();
  80. extern void trigger53();
  81. extern void trigger54();
  82. extern void trigger55();
  83. extern void trigger56();
  84. extern void trigger57();
  85. extern void trigger58();
  86. extern void trigger59();
  87. extern void trigger60();
  88. extern void trigger61();
  89. extern void trigger62();
  90. extern void trigger63();
  91. extern void trigger64();
  92. extern void trigger65();
  93. extern void trigger66();
  94. extern void trigger67();
  95. extern void trigger68();
  96. extern void trigger69();
  97. extern void trigger70();
  98. extern void trigger71();
  99. extern void trigger72();
  100. extern void trigger73();
  101. extern void trigger74();
  102. extern void trigger75();
  103. extern void trigger76();
  104. extern void trigger77();
  105. extern void trigger78();
  106. extern void trigger79();
  107. extern void trigger80();
  108. extern void trigger81();
  109. extern void trigger82();
  110. extern void trigger83();
  111. extern void trigger84();
  112. extern void trigger85();
  113. extern void trigger86();
  114. extern void trigger87();
  115. extern void trigger88();
  116. extern void trigger89();
  117. extern void trigger90();
  118. extern void trigger91();
  119. extern void trigger92();
  120. extern void trigger93();
  121. extern void trigger94();
  122. extern void trigger95();
  123. extern void trigger96();
  124. extern void trigger97();
  125. extern void trigger98();
  126. extern void trigger99();
  127. // declaration of the function as weak
  128. extern void trigger0() __attribute__((weak));
  129. extern void trigger1() __attribute__((weak));
  130. extern void trigger2() __attribute__((weak));
  131. extern void trigger3() __attribute__((weak));
  132. extern void trigger4() __attribute__((weak));
  133. extern void trigger5() __attribute__((weak));
  134. extern void trigger6() __attribute__((weak));
  135. extern void trigger7() __attribute__((weak));
  136. extern void trigger8() __attribute__((weak));
  137. extern void trigger9() __attribute__((weak));
  138. extern void trigger10() __attribute__((weak));
  139. extern void trigger11() __attribute__((weak));
  140. extern void trigger12() __attribute__((weak));
  141. extern void trigger13() __attribute__((weak));
  142. extern void trigger14() __attribute__((weak));
  143. extern void trigger15() __attribute__((weak));
  144. extern void trigger16() __attribute__((weak));
  145. extern void trigger17() __attribute__((weak));
  146. extern void trigger18() __attribute__((weak));
  147. extern void trigger19() __attribute__((weak));
  148. extern void trigger20() __attribute__((weak));
  149. extern void trigger21() __attribute__((weak));
  150. extern void trigger22() __attribute__((weak));
  151. extern void trigger23() __attribute__((weak));
  152. extern void trigger24() __attribute__((weak));
  153. extern void trigger25() __attribute__((weak));
  154. extern void trigger26() __attribute__((weak));
  155. extern void trigger27() __attribute__((weak));
  156. extern void trigger28() __attribute__((weak));
  157. extern void trigger29() __attribute__((weak));
  158. extern void trigger30() __attribute__((weak));
  159. extern void trigger31() __attribute__((weak));
  160. extern void trigger32() __attribute__((weak));
  161. extern void trigger33() __attribute__((weak));
  162. extern void trigger34() __attribute__((weak));
  163. extern void trigger35() __attribute__((weak));
  164. extern void trigger36() __attribute__((weak));
  165. extern void trigger37() __attribute__((weak));
  166. extern void trigger38() __attribute__((weak));
  167. extern void trigger39() __attribute__((weak));
  168. extern void trigger40() __attribute__((weak));
  169. extern void trigger41() __attribute__((weak));
  170. extern void trigger42() __attribute__((weak));
  171. extern void trigger43() __attribute__((weak));
  172. extern void trigger44() __attribute__((weak));
  173. extern void trigger45() __attribute__((weak));
  174. extern void trigger46() __attribute__((weak));
  175. extern void trigger47() __attribute__((weak));
  176. extern void trigger48() __attribute__((weak));
  177. extern void trigger49() __attribute__((weak));
  178. extern void trigger50() __attribute__((weak));
  179. extern void trigger51() __attribute__((weak));
  180. extern void trigger52() __attribute__((weak));
  181. extern void trigger53() __attribute__((weak));
  182. extern void trigger54() __attribute__((weak));
  183. extern void trigger55() __attribute__((weak));
  184. extern void trigger56() __attribute__((weak));
  185. extern void trigger57() __attribute__((weak));
  186. extern void trigger58() __attribute__((weak));
  187. extern void trigger59() __attribute__((weak));
  188. extern void trigger60() __attribute__((weak));
  189. extern void trigger61() __attribute__((weak));
  190. extern void trigger62() __attribute__((weak));
  191. extern void trigger63() __attribute__((weak));
  192. extern void trigger64() __attribute__((weak));
  193. extern void trigger65() __attribute__((weak));
  194. extern void trigger66() __attribute__((weak));
  195. extern void trigger67() __attribute__((weak));
  196. extern void trigger68() __attribute__((weak));
  197. extern void trigger69() __attribute__((weak));
  198. extern void trigger70() __attribute__((weak));
  199. extern void trigger71() __attribute__((weak));
  200. extern void trigger72() __attribute__((weak));
  201. extern void trigger73() __attribute__((weak));
  202. extern void trigger74() __attribute__((weak));
  203. extern void trigger75() __attribute__((weak));
  204. extern void trigger76() __attribute__((weak));
  205. extern void trigger77() __attribute__((weak));
  206. extern void trigger78() __attribute__((weak));
  207. extern void trigger79() __attribute__((weak));
  208. extern void trigger80() __attribute__((weak));
  209. extern void trigger81() __attribute__((weak));
  210. extern void trigger82() __attribute__((weak));
  211. extern void trigger83() __attribute__((weak));
  212. extern void trigger84() __attribute__((weak));
  213. extern void trigger85() __attribute__((weak));
  214. extern void trigger86() __attribute__((weak));
  215. extern void trigger87() __attribute__((weak));
  216. extern void trigger88() __attribute__((weak));
  217. extern void trigger89() __attribute__((weak));
  218. extern void trigger90() __attribute__((weak));
  219. extern void trigger91() __attribute__((weak));
  220. extern void trigger92() __attribute__((weak));
  221. extern void trigger93() __attribute__((weak));
  222. extern void trigger94() __attribute__((weak));
  223. extern void trigger95() __attribute__((weak));
  224. extern void trigger96() __attribute__((weak));
  225. extern void trigger97() __attribute__((weak));
  226. extern void trigger98() __attribute__((weak));
  227. extern void trigger99() __attribute__((weak));
  228. #endif