codebuild.c 75 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676
  1. /*
  2. generate and update c/c++ files
  3. this also replaces the buildcpp tool
  4. Dec 2018:
  5. There are now two SSD13xx cad procedures:
  6. u8x8_cad_ssd13xx_i2c Put a I2C start/stop around each command and each argument --> many start/stop commands
  7. u8x8_cad_ssd13xx_fast_i2c Put a I2C start/stop around each command+arg sequence --> start/stop is probably halfed --> 4% faster
  8. */
  9. #include <stdio.h>
  10. #include <stdlib.h>
  11. #include <string.h>
  12. #include <error.h>
  13. #include <ctype.h>
  14. #include <unistd.h>
  15. /*===========================================*/
  16. /* ll_hvline */
  17. #define U8X8_HVLINE "u8g2_ll_hvline_vertical_top_lsb"
  18. #define COM_4WSPI 0x0001
  19. #define COM_3WSPI 0x0002
  20. #define COM_6800 0x0004
  21. #define COM_8080 0x0008
  22. #define COM_I2C 0x0010
  23. #define COM_ST7920SPI 0x0020 /* mostly identical to COM_4WSPI, but does not use DC */
  24. #define COM_UART 0x0040
  25. #define COM_KS0108 0x0080 /* mostly identical to 6800 mode, but has more chip select lines */
  26. #define COM_SED1520 0x0100
  27. struct interface
  28. {
  29. const char *interface_name; /* SW_SPI */
  30. const char *setpin_function; /* u8x8_SetPin_4Wire_SW_SPI */
  31. const char *arm_linux_com_procedure; /* u8x8_byte_4wire_sw_spi */
  32. const char *arm_linux_gpio_procedure; /* u8x8_arm_linux_gpio_and_delay */
  33. const char *pins_with_type; /* uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE */
  34. const char *pins_plain; /* clock, data, cs, dc, reset */
  35. const char *pins_md_plain; /* clock, data, cs, dc, reset */
  36. const char *generic_com_procedure; /* u8x8_byte_4wire_sw_spi, this is used for documentation, so it suould be generic for all uC architectures */
  37. };
  38. struct display
  39. {
  40. /* this name must match the display part of the device procedure */
  41. /* u8x8_d_<controller>_<display> */
  42. const char *name;
  43. };
  44. struct controller
  45. {
  46. /* the name must match the controller part of the device procedure */
  47. /* u8x8_d_<controller>_<display> */
  48. const char *name;
  49. int tile_width;
  50. int tile_height;
  51. const char *ll_hvline;
  52. const char *cad;
  53. const char *cad_shortname;
  54. unsigned com;
  55. char *note;
  56. unsigned is_generate_u8g2_class; /* currently not used, instead conrolled by COM_UART */
  57. struct display display_list[16]; /* usually not used completly, but space does not matter much here */
  58. };
  59. /* issue #649 */
  60. /* display_controller_list_start */
  61. struct controller controller_list[] =
  62. {
  63. {
  64. "ssd1305", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  65. "", /* is_generate_u8g2_class= */ 1,
  66. {
  67. { "128x32_noname" },
  68. { "128x32_adafruit" },
  69. { NULL }
  70. }
  71. },
  72. {
  73. "ssd1305", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  74. "", /* is_generate_u8g2_class= */ 1,
  75. {
  76. { "128x32_noname" },
  77. { "128x32_adafruit" },
  78. { NULL }
  79. }
  80. },
  81. {
  82. "ssd1305", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  83. "", /* is_generate_u8g2_class= */ 1,
  84. {
  85. { "128x64_adafruit" },
  86. { "128x64_raystar" },
  87. { NULL }
  88. }
  89. },
  90. {
  91. "ssd1305", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  92. "", /* is_generate_u8g2_class= */ 1,
  93. {
  94. { "128x64_adafruit" },
  95. { "128x64_raystar" },
  96. { NULL }
  97. }
  98. },
  99. {
  100. "ssd1306", 255, 2, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  101. "", /* is_generate_u8g2_class= */ 1,
  102. {
  103. { "2040x16" },
  104. { NULL }
  105. }
  106. },
  107. {
  108. "ssd1306", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  109. "", /* is_generate_u8g2_class= */ 1,
  110. {
  111. { "128x64_noname" },
  112. { "128x64_vcomh0" },
  113. { "128x64_alt0" },
  114. { NULL }
  115. }
  116. },
  117. {
  118. "ssd1306", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  119. "", /* is_generate_u8g2_class= */ 1,
  120. {
  121. { "128x64_noname" },
  122. { "128x64_vcomh0" },
  123. { "128x64_alt0" },
  124. { NULL }
  125. }
  126. },
  127. {
  128. "ssd1306", 9, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  129. "", /* is_generate_u8g2_class= */ 1,
  130. {
  131. { "72x40_er" },
  132. { NULL }
  133. }
  134. },
  135. {
  136. "ssd1306", 9, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  137. "", /* is_generate_u8g2_class= */ 1,
  138. {
  139. { "72x40_er" },
  140. { NULL }
  141. }
  142. },
  143. {
  144. "sh1106", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  145. "Not tested", /* is_generate_u8g2_class= */ 1,
  146. {
  147. { "128x64_noname" },
  148. { "128x64_vcomh0" },
  149. { "128x64_winstar" },
  150. { NULL }
  151. }
  152. },
  153. {
  154. "sh1106", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  155. "Not tested", /* is_generate_u8g2_class= */ 1,
  156. {
  157. { "128x64_noname" },
  158. { "128x64_vcomh0" },
  159. { "128x64_winstar" },
  160. { NULL }
  161. }
  162. },
  163. {
  164. "sh1106", 9, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  165. "Not tested", /* is_generate_u8g2_class= */ 1,
  166. {
  167. { "72x40_wise" },
  168. { NULL }
  169. }
  170. },
  171. {
  172. "sh1106", 9, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  173. "Not tested", /* is_generate_u8g2_class= */ 1,
  174. {
  175. { "72x40_wise" },
  176. { NULL }
  177. }
  178. },
  179. {
  180. "sh1106", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  181. "Not tested", /* is_generate_u8g2_class= */ 1,
  182. {
  183. { "64x32" },
  184. { NULL }
  185. }
  186. },
  187. {
  188. "sh1106", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  189. "Not tested", /* is_generate_u8g2_class= */ 1,
  190. {
  191. { "64x32" },
  192. { NULL }
  193. }
  194. },
  195. {
  196. "sh1107", 8, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  197. "Not tested", /* is_generate_u8g2_class= */ 1,
  198. {
  199. { "64x128" },
  200. { NULL }
  201. }
  202. },
  203. {
  204. "sh1107", 8, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  205. "Not tested", /* is_generate_u8g2_class= */ 1,
  206. {
  207. { "64x128" },
  208. { NULL }
  209. }
  210. },
  211. {
  212. "sh1107", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  213. "Not tested", /* is_generate_u8g2_class= */ 1,
  214. {
  215. { "seeed_96x96" },
  216. { NULL }
  217. }
  218. },
  219. {
  220. "sh1107", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  221. "Not tested", /* is_generate_u8g2_class= */ 1,
  222. {
  223. { "seeed_96x96" },
  224. { NULL }
  225. }
  226. },
  227. {
  228. "sh1107", 10, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  229. "", /* is_generate_u8g2_class= */ 1,
  230. {
  231. { "128x80" }, /* actually this is a 80x128 display */
  232. { NULL }
  233. }
  234. },
  235. {
  236. "sh1107", 10, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  237. "", /* is_generate_u8g2_class= */ 1,
  238. {
  239. { "128x80" }, /* actually this is a 80x128 display */
  240. { NULL }
  241. }
  242. },
  243. {
  244. "sh1107", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  245. "", /* is_generate_u8g2_class= */ 1,
  246. {
  247. { "128x128" }, // not tested
  248. { "pimoroni_128x128" }, // not tested
  249. { "seeed_128x128" }, // in lab
  250. { NULL }
  251. }
  252. },
  253. {
  254. "sh1107", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  255. "", /* is_generate_u8g2_class= */ 1,
  256. {
  257. { "128x128" }, // not tested
  258. { "pimoroni_128x128" }, // not tested
  259. { "seeed_128x128" }, // in lab
  260. { NULL }
  261. }
  262. },
  263. {
  264. "sh1108", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  265. "Not tested", /* is_generate_u8g2_class= */ 1,
  266. {
  267. { "160x160" },
  268. { NULL }
  269. }
  270. },
  271. {
  272. "sh1108", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  273. "Not tested", /* is_generate_u8g2_class= */ 1,
  274. {
  275. { "160x160" },
  276. { NULL }
  277. }
  278. },
  279. {
  280. "sh1122", 32, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  281. "", /* is_generate_u8g2_class= */ 1,
  282. {
  283. { "256x64" },
  284. { NULL }
  285. }
  286. },
  287. {
  288. "sh1122", 32, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  289. "", /* is_generate_u8g2_class= */ 1,
  290. {
  291. { "256x64" },
  292. { NULL }
  293. }
  294. },
  295. {
  296. "ssd1306", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  297. "", /* is_generate_u8g2_class= */ 1,
  298. {
  299. { "128x32_univision" },
  300. { "128x32_winstar" },
  301. { NULL }
  302. }
  303. },
  304. {
  305. "ssd1306", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  306. "", /* is_generate_u8g2_class= */ 1,
  307. {
  308. { "128x32_univision" },
  309. { "128x32_winstar" },
  310. { NULL }
  311. }
  312. },
  313. {
  314. "ssd1306", 13, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  315. "", /* is_generate_u8g2_class= */ 1,
  316. {
  317. { "102x64_ea_oleds102" },
  318. { NULL }
  319. }
  320. },
  321. {
  322. "ssd1306", 13, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  323. "", /* is_generate_u8g2_class= */ 1,
  324. {
  325. { "102x64_ea_oleds102" },
  326. { NULL }
  327. }
  328. },
  329. {
  330. "sh1106", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  331. "", /* is_generate_u8g2_class= */ 1,
  332. {
  333. { "128x32_visionox" },
  334. { NULL }
  335. }
  336. },
  337. {
  338. "sh1106", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  339. "", /* is_generate_u8g2_class= */ 1,
  340. {
  341. { "128x32_visionox" },
  342. { NULL }
  343. }
  344. },
  345. {
  346. "ssd1306", 8, 6, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  347. "", /* is_generate_u8g2_class= */ 1,
  348. {
  349. { "64x48_er" },
  350. { NULL }
  351. }
  352. },
  353. {
  354. "ssd1306", 8, 6, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  355. "", /* is_generate_u8g2_class= */ 1,
  356. {
  357. { "64x48_er" },
  358. { NULL }
  359. }
  360. },
  361. {
  362. "ssd1306", 6, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  363. "", /* is_generate_u8g2_class= */ 1,
  364. {
  365. { "48x64_winstar" },
  366. { NULL }
  367. }
  368. },
  369. {
  370. "ssd1306", 6, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  371. "", /* is_generate_u8g2_class= */ 1,
  372. {
  373. { "48x64_winstar" },
  374. { NULL }
  375. }
  376. },
  377. {
  378. "ssd1306", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  379. "", /* is_generate_u8g2_class= */ 1,
  380. {
  381. { "64x32_noname" },
  382. { "64x32_1f" },
  383. { NULL }
  384. }
  385. },
  386. {
  387. "ssd1306", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  388. "", /* is_generate_u8g2_class= */ 1,
  389. {
  390. { "64x32_noname" },
  391. { "64x32_1f" },
  392. { NULL }
  393. }
  394. },
  395. {
  396. "ssd1306", 12, 2, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  397. "", /* is_generate_u8g2_class= */ 1,
  398. {
  399. { "96x16_er" },
  400. { NULL }
  401. }
  402. },
  403. {
  404. "ssd1306", 12, 2, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  405. "", /* is_generate_u8g2_class= */ 1,
  406. {
  407. { "96x16_er" },
  408. { NULL }
  409. }
  410. },
  411. {
  412. "ssd1309", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  413. "", /* is_generate_u8g2_class= */ 1,
  414. {
  415. { "128x64_noname2" },
  416. { NULL }
  417. }
  418. },
  419. {
  420. "ssd1309", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  421. "", /* is_generate_u8g2_class= */ 1,
  422. {
  423. { "128x64_noname2" },
  424. { NULL }
  425. }
  426. },
  427. {
  428. "ssd1309", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  429. "", /* is_generate_u8g2_class= */ 1,
  430. {
  431. { "128x64_noname0" },
  432. { NULL }
  433. }
  434. },
  435. {
  436. "ssd1309", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  437. "", /* is_generate_u8g2_class= */ 1,
  438. {
  439. { "128x64_noname0" },
  440. { NULL }
  441. }
  442. },
  443. /* https://github.com/olikraus/u8g2/issues/919 */
  444. {
  445. "ssd1316", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  446. "", /* is_generate_u8g2_class= */ 1,
  447. {
  448. { "128x32" },
  449. { NULL }
  450. }
  451. },
  452. {
  453. "ssd1316", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  454. "", /* is_generate_u8g2_class= */ 1,
  455. {
  456. { "128x32" },
  457. { NULL }
  458. }
  459. },
  460. {
  461. "ssd1317", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  462. "", /* is_generate_u8g2_class= */ 1,
  463. {
  464. { "96x96" },
  465. { NULL }
  466. }
  467. },
  468. {
  469. "ssd1317", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  470. "", /* is_generate_u8g2_class= */ 1,
  471. {
  472. { "96x96" },
  473. { NULL }
  474. }
  475. },
  476. /* issue 784 */
  477. {
  478. "ssd1318", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  479. "", /* is_generate_u8g2_class= */ 1,
  480. {
  481. { "128x96" },
  482. { "128x96_xcp" }, // with external charge pump
  483. { NULL }
  484. }
  485. },
  486. {
  487. "ssd1318", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  488. "", /* is_generate_u8g2_class= */ 1,
  489. {
  490. { "128x96" },
  491. { "128x96_xcp" }, // with external charge pump
  492. { NULL }
  493. }
  494. },
  495. {
  496. "ssd1325", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  497. "", /* is_generate_u8g2_class= */ 1,
  498. {
  499. { "nhd_128x64" },
  500. { NULL }
  501. }
  502. },
  503. {
  504. "ssd1325", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  505. "", /* is_generate_u8g2_class= */ 1,
  506. {
  507. { "nhd_128x64" },
  508. { NULL }
  509. }
  510. },
  511. {
  512. "ssd0323", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  513. "", /* is_generate_u8g2_class= */ 1,
  514. {
  515. { "os128064" },
  516. { NULL }
  517. }
  518. },
  519. {
  520. "ssd0323", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  521. "", /* is_generate_u8g2_class= */ 1,
  522. {
  523. { "os128064" },
  524. { NULL }
  525. }
  526. },
  527. {
  528. "ssd1326", 32, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  529. "", /* is_generate_u8g2_class= */ 1,
  530. {
  531. { "er_256x32" },
  532. { NULL }
  533. }
  534. },
  535. {
  536. "ssd1326", 32, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  537. "", /* is_generate_u8g2_class= */ 1,
  538. {
  539. { "er_256x32" },
  540. { NULL }
  541. }
  542. },
  543. {
  544. "ssd1327", 12, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  545. "", /* is_generate_u8g2_class= */ 1,
  546. {
  547. { "ws_96x64" },
  548. { NULL }
  549. }
  550. },
  551. {
  552. "ssd1327", 12, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  553. "", /* is_generate_u8g2_class= */ 1,
  554. {
  555. { "ws_96x64" },
  556. { NULL }
  557. }
  558. },
  559. {
  560. "ssd1327", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  561. "", /* is_generate_u8g2_class= */ 1,
  562. {
  563. { "seeed_96x96" },
  564. { NULL }
  565. }
  566. },
  567. {
  568. "ssd1327", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  569. "", /* is_generate_u8g2_class= */ 1,
  570. {
  571. { "seeed_96x96" },
  572. { NULL }
  573. }
  574. },
  575. {
  576. "ssd1327", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  577. "", /* is_generate_u8g2_class= */ 1,
  578. {
  579. { "ea_w128128" },
  580. { "midas_128x128" },
  581. { "ws_128x128" },
  582. { NULL }
  583. }
  584. },
  585. {
  586. "ssd1327", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  587. "", /* is_generate_u8g2_class= */ 1,
  588. {
  589. { "ea_w128128" },
  590. { "midas_128x128" },
  591. { "ws_128x128" },
  592. { NULL }
  593. }
  594. },
  595. {
  596. "ssd1327", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  597. "", /* is_generate_u8g2_class= */ 1,
  598. {
  599. { "visionox_128x96" },
  600. { NULL }
  601. }
  602. },
  603. {
  604. "ssd1327", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  605. "", /* is_generate_u8g2_class= */ 1,
  606. {
  607. { "visionox_128x96" },
  608. { NULL }
  609. }
  610. },
  611. {
  612. "ssd1329", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  613. "", /* is_generate_u8g2_class= */ 1,
  614. {
  615. { "128x96_noname" },
  616. { NULL }
  617. }
  618. },
  619. {
  620. "ssd1329", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  621. "", /* is_generate_u8g2_class= */ 1,
  622. {
  623. { "96x96_noname" },
  624. { NULL }
  625. }
  626. },
  627. {
  628. "ld7032", 8, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI,
  629. "", /* is_generate_u8g2_class= */ 1,
  630. {
  631. { "60x32" },
  632. { "60x32_alt" },
  633. { NULL }
  634. }
  635. },
  636. {
  637. "ld7032", 8, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_ld7032_i2c", "i2c", COM_I2C,
  638. "", /* is_generate_u8g2_class= */ 1,
  639. {
  640. { "60x32" },
  641. { "60x32_alt" },
  642. { NULL }
  643. }
  644. },
  645. {
  646. "st7920", 32, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "p", COM_8080,
  647. "", /* is_generate_u8g2_class= */ 1,
  648. {
  649. { "256x32" },
  650. { NULL }
  651. }
  652. },
  653. {
  654. "st7920", 32, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_6800,
  655. "", /* is_generate_u8g2_class= */ 1,
  656. {
  657. { "256x32" },
  658. { NULL }
  659. }
  660. },
  661. {
  662. "st7920", 32, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_st7920_spi", "s", COM_ST7920SPI,
  663. "", /* is_generate_u8g2_class= */ 1,
  664. {
  665. { "256x32" },
  666. { NULL }
  667. }
  668. },
  669. {
  670. "st7920", 24, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "p", COM_8080,
  671. "", /* is_generate_u8g2_class= */ 1,
  672. {
  673. { "192x32" },
  674. { NULL }
  675. }
  676. },
  677. {
  678. "st7920", 24, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_6800,
  679. "", /* is_generate_u8g2_class= */ 1,
  680. {
  681. { "192x32" },
  682. { NULL }
  683. }
  684. },
  685. {
  686. "st7920", 24, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_st7920_spi", "s", COM_ST7920SPI,
  687. "", /* is_generate_u8g2_class= */ 1,
  688. {
  689. { "192x32" },
  690. { NULL }
  691. }
  692. },
  693. {
  694. "st7920", 16, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "p", COM_8080,
  695. "", /* is_generate_u8g2_class= */ 1,
  696. {
  697. { "128x64" },
  698. { NULL }
  699. }
  700. },
  701. {
  702. "st7920", 16, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_6800,
  703. "", /* is_generate_u8g2_class= */ 1,
  704. {
  705. { "128x64" },
  706. { NULL }
  707. }
  708. },
  709. {
  710. "st7920", 16, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_st7920_spi", "s", COM_ST7920SPI,
  711. "", /* is_generate_u8g2_class= */ 1,
  712. {
  713. { "128x64" },
  714. { NULL }
  715. }
  716. },
  717. {
  718. "ls013b7dh03", 16, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_4WSPI, /* cad procedure is not required (no DC for this display) so it could be a dummy procedure here */
  719. "", /* is_generate_u8g2_class= */ 1,
  720. {
  721. { "128x128" },
  722. { NULL }
  723. }
  724. },
  725. {
  726. "ls027b7dh01", 50, 30, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_4WSPI, /* cad procedure is not required (no DC for this display) so it could be a dummy procedure here */
  727. "", /* is_generate_u8g2_class= */ 1,
  728. {
  729. { "400x240" }, // SPI Mode 2
  730. { "m0_400x240" }, // SPI Mode 0
  731. { NULL }
  732. }
  733. },
  734. {
  735. "ls013b7dh05", 18, 21, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_4WSPI, /* cad procedure is not required (no DC for this display) so it could be a dummy procedure here */
  736. "", /* is_generate_u8g2_class= */ 1,
  737. {
  738. { "144x168" },
  739. { NULL }
  740. }
  741. },
  742. {
  743. "uc1701", 13, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  744. "", /* is_generate_u8g2_class= */ 1,
  745. {
  746. { "ea_dogs102" },
  747. { NULL }
  748. }
  749. },
  750. {
  751. "uc1701", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  752. "", /* is_generate_u8g2_class= */ 1,
  753. {
  754. { "mini12864" },
  755. { NULL }
  756. }
  757. },
  758. {
  759. "pcd8544", 11, 6, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
  760. "No HW flip", /* is_generate_u8g2_class= */ 1,
  761. {
  762. { "84x48" },
  763. { NULL }
  764. }
  765. },
  766. {
  767. "pcf8812", 12, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
  768. "No HW flip", /* is_generate_u8g2_class= */ 1,
  769. {
  770. { "96x65" },
  771. { NULL }
  772. }
  773. },
  774. {
  775. "hx1230", 12, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
  776. "No HW flip", /* is_generate_u8g2_class= */ 1,
  777. {
  778. { "96x68" },
  779. { NULL }
  780. }
  781. },
  782. {
  783. "uc1604", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  784. "", /* is_generate_u8g2_class= */ 1,
  785. {
  786. { "jlx19264" },
  787. { NULL }
  788. }
  789. },
  790. {
  791. "uc1604", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  792. "", /* is_generate_u8g2_class= */ 1,
  793. {
  794. { "jlx19264" },
  795. { NULL }
  796. }
  797. },
  798. {
  799. "uc1608", 30, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  800. "", /* is_generate_u8g2_class= */ 1,
  801. {
  802. { "erc24064" },
  803. { "dem240064" },
  804. { NULL }
  805. }
  806. },
  807. {
  808. "uc1608", 30, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  809. "", /* is_generate_u8g2_class= */ 1,
  810. {
  811. { "erc24064" },
  812. { "dem240064" },
  813. { NULL }
  814. }
  815. },
  816. {
  817. "uc1608", 30, 15, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  818. "", /* is_generate_u8g2_class= */ 1,
  819. {
  820. { "erc240120" },
  821. { NULL }
  822. }
  823. },
  824. {
  825. "uc1608", 30, 15, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  826. "", /* is_generate_u8g2_class= */ 1,
  827. {
  828. { "erc240120" },
  829. { NULL }
  830. }
  831. },
  832. {
  833. "uc1608", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  834. "", /* is_generate_u8g2_class= */ 1,
  835. {
  836. { "240x128" },
  837. { NULL }
  838. }
  839. },
  840. {
  841. "uc1608", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  842. "", /* is_generate_u8g2_class= */ 1,
  843. {
  844. { "240x128" },
  845. { NULL }
  846. }
  847. },
  848. {
  849. "uc1609", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  850. "", /* is_generate_u8g2_class= */ 1,
  851. {
  852. { "slg19264" },
  853. { NULL }
  854. }
  855. },
  856. {
  857. "uc1609", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  858. "", /* is_generate_u8g2_class= */ 1,
  859. {
  860. { "slg19264" },
  861. { NULL }
  862. }
  863. },
  864. {
  865. "uc1638", 20, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  866. "", /* is_generate_u8g2_class= */ 1,
  867. {
  868. { "160x128" },
  869. { NULL }
  870. }
  871. },
  872. {
  873. "uc1638", 24, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  874. "", /* is_generate_u8g2_class= */ 1,
  875. {
  876. { "192x96" },
  877. { NULL }
  878. }
  879. },
  880. {
  881. "uc1638", 24, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc1638_i2c", "i2c", COM_I2C,
  882. "", /* is_generate_u8g2_class= */ 1,
  883. {
  884. { "192x96" },
  885. { NULL }
  886. }
  887. },
  888. //{
  889. /* this device requires cd=1 for arguments, not clear whether the u8x8_cad_uc16xx_i2c works */
  890. //"uc1638", 20, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  891. //"", /* is_generate_u8g2_class= */ 1,
  892. //{
  893. // { "160x128" },
  894. // { NULL }
  895. //}
  896. //},
  897. {
  898. "uc1610", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  899. "3W SPI not tested", /* is_generate_u8g2_class= */ 1,
  900. {
  901. { "ea_dogxl160" },
  902. { NULL }
  903. }
  904. },
  905. {
  906. "uc1610", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  907. "3W SPI not tested, I2C not tested", /* is_generate_u8g2_class= */ 1,
  908. {
  909. { "ea_dogxl160" },
  910. { NULL }
  911. }
  912. },
  913. {
  914. "uc1611", 30, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  915. "", /* is_generate_u8g2_class= */ 1,
  916. {
  917. { "ea_dogm240" },
  918. { NULL }
  919. }
  920. },
  921. {
  922. "uc1611", 30, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  923. "", /* is_generate_u8g2_class= */ 1,
  924. {
  925. { "ea_dogm240" },
  926. { NULL }
  927. }
  928. },
  929. {
  930. "uc1611", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  931. "", /* is_generate_u8g2_class= */ 1,
  932. {
  933. { "ea_dogxl240" },
  934. { NULL }
  935. }
  936. },
  937. {
  938. "uc1611", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  939. "", /* is_generate_u8g2_class= */ 1,
  940. {
  941. { "ea_dogxl240" },
  942. { NULL }
  943. }
  944. },
  945. {
  946. "uc1611", 30, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  947. "240x160, active high chip select", /* is_generate_u8g2_class= */ 1,
  948. {
  949. { "ew50850" }, /* 240x160 */
  950. { NULL }
  951. }
  952. },
  953. {
  954. "uc1611", 30, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  955. "240x160, active high chip select", /* is_generate_u8g2_class= */ 1,
  956. {
  957. { "ew50850" }, /* 240x160 */
  958. { NULL }
  959. }
  960. },
  961. {
  962. "uc1611", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  963. "use CS0 as chips select", /* is_generate_u8g2_class= */ 1,
  964. {
  965. { "cg160160" },
  966. { NULL }
  967. }
  968. },
  969. {
  970. "uc1611", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  971. "", /* is_generate_u8g2_class= */ 1,
  972. {
  973. { "cg160160" },
  974. { NULL }
  975. }
  976. },
  977. {
  978. "uc1611", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  979. "", /* is_generate_u8g2_class= */ 1,
  980. {
  981. { "ids4073" },
  982. { NULL }
  983. }
  984. },
  985. {
  986. "uc1611", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  987. "", /* is_generate_u8g2_class= */ 1,
  988. {
  989. { "ids4073" },
  990. { NULL }
  991. }
  992. },
  993. {
  994. "st7511", 40, 30, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  995. "", /* is_generate_u8g2_class= */ 1,
  996. {
  997. { "avd_320x240" }, /* 320x240 */
  998. { NULL }
  999. }
  1000. },
  1001. {
  1002. "st7528", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1003. "", /* is_generate_u8g2_class= */ 1,
  1004. {
  1005. { "nhd_c160100" },
  1006. { NULL }
  1007. }
  1008. },
  1009. {
  1010. "st7528", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  1011. "", /* is_generate_u8g2_class= */ 1,
  1012. {
  1013. { "nhd_c160100" },
  1014. { NULL }
  1015. }
  1016. },
  1017. {
  1018. "st7528", 20, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1019. "", /* is_generate_u8g2_class= */ 1,
  1020. {
  1021. { "erc16064" },
  1022. { NULL }
  1023. }
  1024. },
  1025. {
  1026. "st7528", 20, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  1027. "", /* is_generate_u8g2_class= */ 1,
  1028. {
  1029. { "erc16064" },
  1030. { NULL }
  1031. }
  1032. },
  1033. {
  1034. "uc1617", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
  1035. "", /* is_generate_u8g2_class= */ 1,
  1036. {
  1037. { "jlx128128" },
  1038. { NULL }
  1039. }
  1040. },
  1041. {
  1042. "uc1617", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1043. "", /* is_generate_u8g2_class= */ 1,
  1044. {
  1045. { "jlx128128" },
  1046. { NULL }
  1047. }
  1048. },
  1049. {
  1050. "st7565", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1051. "", /* is_generate_u8g2_class= */ 1,
  1052. {
  1053. { "ea_dogm128" },
  1054. { "lm6063" }, /* https://github.com/olikraus/u8g2/issues/893 */
  1055. { "64128n" },
  1056. { "zolen_128x64" },
  1057. { "lm6059" },
  1058. { "ks0713" }, /* KS0713 chip, which seems to be almost compatible to ST7565 */
  1059. { "lx12864" },
  1060. { "erc12864" },
  1061. { "erc12864_alt" }, /* issue 790 */
  1062. { "nhd_c12864" },
  1063. { "jlx12864" },
  1064. { NULL }
  1065. },
  1066. },
  1067. {
  1068. "st7565", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1069. "", /* is_generate_u8g2_class= */ 1,
  1070. {
  1071. { "nhd_c12832" },
  1072. { NULL }
  1073. }
  1074. },
  1075. {
  1076. "uc1601", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1077. "", /* is_generate_u8g2_class= */ 1,
  1078. {
  1079. { "128x32" },
  1080. { NULL }
  1081. }
  1082. },
  1083. {
  1084. "uc1601", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1085. "", /* is_generate_u8g2_class= */ 1,
  1086. {
  1087. { "128x32" },
  1088. { NULL }
  1089. }
  1090. },
  1091. {
  1092. "uc1601", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1093. "", /* is_generate_u8g2_class= */ 1,
  1094. {
  1095. { "128x64" },
  1096. { NULL }
  1097. }
  1098. },
  1099. {
  1100. "uc1601", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1101. "", /* is_generate_u8g2_class= */ 1,
  1102. {
  1103. { "128x64" },
  1104. { NULL }
  1105. }
  1106. },
  1107. {
  1108. "st7565", 17, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1109. "", /* is_generate_u8g2_class= */ 1,
  1110. {
  1111. { "ea_dogm132" },
  1112. { NULL }
  1113. }
  1114. },
  1115. {
  1116. "st7567", 17, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1117. "", /* is_generate_u8g2_class= */ 1,
  1118. {
  1119. { "pi_132x64" },
  1120. { NULL }
  1121. }
  1122. },
  1123. {
  1124. "st7567", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1125. "", /* is_generate_u8g2_class= */ 1,
  1126. {
  1127. { "jlx12864" },
  1128. { "enh_dg128064" },
  1129. { "enh_dg128064i" },
  1130. { "os12864" },
  1131. { NULL }
  1132. }
  1133. },
  1134. {
  1135. "st7567", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1136. "", /* is_generate_u8g2_class= */ 1,
  1137. {
  1138. { "64x32" },
  1139. { "hem6432" },
  1140. { NULL }
  1141. }
  1142. },
  1143. {
  1144. "st7567", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  1145. "", /* is_generate_u8g2_class= */ 1,
  1146. {
  1147. { "64x32" },
  1148. { "hem6432" },
  1149. { NULL }
  1150. }
  1151. },
  1152. {
  1153. "st7571", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1154. "", /* is_generate_u8g2_class= */ 1,
  1155. {
  1156. { "128x128" },
  1157. { NULL }
  1158. }
  1159. },
  1160. {
  1161. "st7571", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  1162. "", /* is_generate_u8g2_class= */ 1,
  1163. {
  1164. { "128x128" },
  1165. { NULL }
  1166. }
  1167. },
  1168. {
  1169. "st7571", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1170. "", /* is_generate_u8g2_class= */ 1,
  1171. {
  1172. { "128x96" },
  1173. { NULL }
  1174. }
  1175. },
  1176. {
  1177. "st7571", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  1178. "", /* is_generate_u8g2_class= */ 1,
  1179. {
  1180. { "128x96" },
  1181. { NULL }
  1182. }
  1183. },
  1184. {
  1185. "st7586s", 48, 17, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI,
  1186. "", /* is_generate_u8g2_class= */ 1,
  1187. {
  1188. { "s028hn118a" },
  1189. { NULL }
  1190. },
  1191. },
  1192. {
  1193. "st7586s", 30, 20, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1194. "", /* is_generate_u8g2_class= */ 1,
  1195. {
  1196. { "erc240160" },
  1197. { "ymc240160" },
  1198. { NULL }
  1199. },
  1200. },
  1201. {
  1202. "st7588", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1203. "", /* is_generate_u8g2_class= */ 1,
  1204. {
  1205. { "jlx12864" },
  1206. { NULL }
  1207. },
  1208. },
  1209. { /* the ST7588 has the same I2C protocol as the SSD13xx */
  1210. "st7588", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  1211. "", /* is_generate_u8g2_class= */ 1,
  1212. {
  1213. { "jlx12864" },
  1214. { NULL }
  1215. }
  1216. },
  1217. {
  1218. "st75256", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1219. "", /* is_generate_u8g2_class= */ 1,
  1220. {
  1221. { "jlx256128" },
  1222. { "wo256x128" },
  1223. { NULL }
  1224. },
  1225. },
  1226. /* the ST75256 has the same I2C protocol as the SSD13xx, BUT: for arguments have the data bit set!!!! */
  1227. /* this means, we need to implement a u8x8_cad_ssd13xx_i2c procedure with cad 011 functionality */
  1228. /* done: u8x8_cad_st75256_i2c */
  1229. {
  1230. "st75256", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1231. "", /* is_generate_u8g2_class= */ 1,
  1232. {
  1233. { "jlx256128" },
  1234. { "wo256x128" },
  1235. { NULL }
  1236. }
  1237. },
  1238. {
  1239. "st75256", 32, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1240. "", /* is_generate_u8g2_class= */ 1,
  1241. {
  1242. { "jlx256160" },
  1243. { "jlx256160m" },
  1244. { "jlx256160_alt" },
  1245. { NULL }
  1246. },
  1247. },
  1248. /* the ST75256 has the same I2C protocol as the SSD13xx, BUT: for arguments have the data bit set!!!! */
  1249. /* this means, we need to implement a u8x8_cad_ssd13xx_i2c procedure with cad 011 functionality */
  1250. /* done: u8x8_cad_st75256_i2c */
  1251. {
  1252. "st75256", 32, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1253. "", /* is_generate_u8g2_class= */ 1,
  1254. {
  1255. { "jlx256160" },
  1256. { "jlx256160m" },
  1257. { "jlx256160_alt" },
  1258. { NULL }
  1259. }
  1260. },
  1261. {
  1262. "st75256", 30, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1263. "", /* is_generate_u8g2_class= */ 1,
  1264. {
  1265. { "jlx240160" },
  1266. { NULL }
  1267. },
  1268. },
  1269. {
  1270. "st75256", 30, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1271. "", /* is_generate_u8g2_class= */ 1,
  1272. {
  1273. { "jlx240160" },
  1274. { NULL }
  1275. }
  1276. },
  1277. {
  1278. "st75256", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1279. "", /* is_generate_u8g2_class= */ 1,
  1280. {
  1281. { "jlx25664" },
  1282. { NULL }
  1283. },
  1284. },
  1285. {
  1286. "st75256", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1287. "", /* is_generate_u8g2_class= */ 1,
  1288. {
  1289. { "jlx25664" },
  1290. { NULL }
  1291. }
  1292. },
  1293. {
  1294. "st75256", 22, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1295. "", /* is_generate_u8g2_class= */ 1,
  1296. {
  1297. { "jlx172104" },
  1298. { NULL }
  1299. },
  1300. },
  1301. {
  1302. "st75256", 22, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1303. "", /* is_generate_u8g2_class= */ 1,
  1304. {
  1305. { "jlx172104" },
  1306. { NULL }
  1307. },
  1308. },
  1309. {
  1310. "st75256", 24, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1311. "", /* is_generate_u8g2_class= */ 1,
  1312. {
  1313. { "jlx19296" },
  1314. { NULL }
  1315. },
  1316. },
  1317. {
  1318. "st75256", 24, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1319. "", /* is_generate_u8g2_class= */ 1,
  1320. {
  1321. { "jlx19296" },
  1322. { NULL }
  1323. },
  1324. },
  1325. {
  1326. "st75320", 40, 30, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1327. "", /* is_generate_u8g2_class= */ 1,
  1328. {
  1329. { "jlx320240" },
  1330. { NULL }
  1331. },
  1332. },
  1333. {
  1334. "st75320", 40, 30, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1335. "", /* is_generate_u8g2_class= */ 1,
  1336. {
  1337. { "jlx320240" },
  1338. { NULL }
  1339. },
  1340. },
  1341. {
  1342. "nt7534", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1343. "", /* is_generate_u8g2_class= */ 1,
  1344. {
  1345. { "tg12864r" },
  1346. { NULL }
  1347. }
  1348. },
  1349. {
  1350. "ist3020", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1351. "", /* is_generate_u8g2_class= */ 1,
  1352. {
  1353. { "erc19264" },
  1354. { NULL }
  1355. }
  1356. },
  1357. {
  1358. "ist7920", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1359. "", /* is_generate_u8g2_class= */ 1,
  1360. {
  1361. { "128x128" },
  1362. { NULL }
  1363. }
  1364. },
  1365. {
  1366. "sbn1661", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_SED1520,
  1367. "", /* is_generate_u8g2_class= */ 1,
  1368. {
  1369. { "122x32" },
  1370. { NULL }
  1371. },
  1372. },
  1373. {
  1374. "sed1520", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_SED1520,
  1375. "", /* is_generate_u8g2_class= */ 1,
  1376. {
  1377. { "122x32" },
  1378. { NULL }
  1379. },
  1380. },
  1381. {
  1382. "ks0108", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_KS0108,
  1383. "", /* is_generate_u8g2_class= */ 1,
  1384. {
  1385. { "128x64" },
  1386. { NULL }
  1387. },
  1388. },
  1389. {
  1390. "ks0108", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_KS0108,
  1391. "", /* is_generate_u8g2_class= */ 1,
  1392. {
  1393. { "erm19264" },
  1394. { NULL }
  1395. },
  1396. },
  1397. {
  1398. "t7932", 19, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_KS0108,
  1399. "", /* is_generate_u8g2_class= */ 1,
  1400. {
  1401. { "150x32" }, /* compatible with hd44102 */
  1402. { NULL }
  1403. },
  1404. },
  1405. {
  1406. "hd44102", 13, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_KS0108,
  1407. "", /* is_generate_u8g2_class= */ 1,
  1408. {
  1409. { "100x64" }, /* compatible with t7932 */
  1410. { NULL }
  1411. },
  1412. },
  1413. {
  1414. "lc7981", 20, 10, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
  1415. "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
  1416. {
  1417. { "160x80" },
  1418. { NULL }
  1419. }
  1420. },
  1421. {
  1422. "lc7981", 20, 20, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
  1423. "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
  1424. {
  1425. { "160x160" },
  1426. { NULL }
  1427. }
  1428. },
  1429. {
  1430. "lc7981", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
  1431. "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
  1432. {
  1433. { "240x128" },
  1434. { NULL }
  1435. }
  1436. },
  1437. {
  1438. "lc7981", 30, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
  1439. "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
  1440. {
  1441. { "240x64" },
  1442. { NULL }
  1443. }
  1444. },
  1445. {
  1446. "t6963", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
  1447. "", /* is_generate_u8g2_class= */ 1,
  1448. {
  1449. { "240x128" },
  1450. { NULL }
  1451. }
  1452. },
  1453. {
  1454. "t6963", 30, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
  1455. "", /* is_generate_u8g2_class= */ 1,
  1456. {
  1457. { "240x64" },
  1458. { NULL }
  1459. }
  1460. },
  1461. {
  1462. "t6963", 32, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
  1463. "Not tested", /* is_generate_u8g2_class= */ 1,
  1464. {
  1465. { "256x64" },
  1466. { NULL }
  1467. }
  1468. },
  1469. {
  1470. "t6963", 16, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
  1471. "Not tested", /* is_generate_u8g2_class= */ 1,
  1472. {
  1473. { "128x64" },
  1474. { "128x64_alt" },
  1475. { NULL }
  1476. }
  1477. },
  1478. {
  1479. "t6963", 20, 10, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
  1480. "Not tested", /* is_generate_u8g2_class= */ 1,
  1481. {
  1482. { "160x80" },
  1483. { NULL }
  1484. }
  1485. },
  1486. {
  1487. "ssd1320", 20, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1488. "", /* is_generate_u8g2_class= */ 1,
  1489. {
  1490. { "160x32" },
  1491. { NULL }
  1492. }
  1493. },
  1494. {
  1495. "ssd1320", 20, 17, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1496. "", /* is_generate_u8g2_class= */ 1,
  1497. {
  1498. { "160x132" },
  1499. { NULL }
  1500. }
  1501. },
  1502. {
  1503. "ssd1322", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1504. "Requires U8G2_16BIT (see u8g2.h)", /* is_generate_u8g2_class= */ 1,
  1505. {
  1506. { "nhd_256x64" },
  1507. { NULL }
  1508. }
  1509. },
  1510. {
  1511. "ssd1322", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1512. "", /* is_generate_u8g2_class= */ 1,
  1513. {
  1514. { "nhd_128x64" },
  1515. { NULL }
  1516. }
  1517. },
  1518. {
  1519. "ssd1606", 22, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI,
  1520. "Partly supported by U8x8, no HW flip, no contrast setting", /* is_generate_u8g2_class= */ 1,
  1521. {
  1522. { "172x72" },
  1523. { NULL }
  1524. }
  1525. },
  1526. {
  1527. "ssd1607", 25, 25, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI,
  1528. "Partly supported by U8x8, no HW flip, no contrast setting, v2 includes an optimized LUT", /* is_generate_u8g2_class= */ 1,
  1529. {
  1530. { "200x200" },
  1531. { "gd_200x200" }, // GDEP015OC1
  1532. { "ws_200x200" }, // Waveshare issue #637
  1533. { NULL }
  1534. }
  1535. },
  1536. {
  1537. "il3820", 37, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI,
  1538. "Partly supported by U8x8, no HW flip, no contrast setting, V2 produces lesser screen-flicker", /* is_generate_u8g2_class= */ 1,
  1539. {
  1540. { "296x128" },
  1541. { "v2_296x128" },
  1542. { NULL }
  1543. }
  1544. },
  1545. {
  1546. "sed1330", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  1547. "Not tested, might work for RA8835 and SED1335 also", /* is_generate_u8g2_class= */ 1,
  1548. {
  1549. { "240x128" },
  1550. { NULL }
  1551. }
  1552. },
  1553. {
  1554. "ra8835", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  1555. "Tested with RA8835", /* is_generate_u8g2_class= */ 1,
  1556. {
  1557. { "nhd_240x128" },
  1558. { NULL }
  1559. }
  1560. },
  1561. {
  1562. "ra8835", 40, 30, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  1563. "not tested", /* is_generate_u8g2_class= */ 1,
  1564. {
  1565. { "320x240" },
  1566. { NULL }
  1567. }
  1568. },
  1569. {
  1570. "max7219", 8, 1, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
  1571. "", /* is_generate_u8g2_class= */ 1,
  1572. {
  1573. { "64x8" },
  1574. { NULL }
  1575. }
  1576. },
  1577. {
  1578. "max7219", 4, 1, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
  1579. "", /* is_generate_u8g2_class= */ 1,
  1580. {
  1581. { "32x8" },
  1582. { NULL }
  1583. }
  1584. },
  1585. #ifdef NOT_POSSIBLE
  1586. {
  1587. "max7219", 2, 2, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
  1588. "", /* is_generate_u8g2_class= */ 1,
  1589. {
  1590. { "16x16" },
  1591. { NULL }
  1592. }
  1593. },
  1594. #endif
  1595. {
  1596. "max7219", 1, 1, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
  1597. "", /* is_generate_u8g2_class= */ 1,
  1598. {
  1599. { "8x8" },
  1600. { NULL }
  1601. }
  1602. },
  1603. {
  1604. "s1d15e06", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  1605. "", /* is_generate_u8g2_class= */ 1,
  1606. {
  1607. { "160100" },
  1608. { NULL }
  1609. }
  1610. },
  1611. {
  1612. "s1d15721", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  1613. "", /* is_generate_u8g2_class= */ 1,
  1614. {
  1615. { "240x64" },
  1616. { NULL }
  1617. }
  1618. },
  1619. {
  1620. "gu800", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_gu800_cad_110", "", COM_4WSPI|COM_6800|COM_8080,
  1621. "", /* is_generate_u8g2_class= */ 1,
  1622. {
  1623. { "128x64" },
  1624. { NULL }
  1625. }
  1626. },
  1627. {
  1628. "a2printer", 48, 30, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_UART,
  1629. "", /* is_generate_u8g2_class= */ 0,
  1630. {
  1631. { "384x240" },
  1632. { NULL }
  1633. }
  1634. }
  1635. };
  1636. /* display_controller_list_end */
  1637. struct interface interface_list[] =
  1638. {
  1639. /* 0 */
  1640. {
  1641. "4W_SW_SPI",
  1642. "u8x8_SetPin_4Wire_SW_SPI",
  1643. "u8x8_byte_4wire_sw_spi", /* improved version over u8x8_byte_4wire_sw_spi */
  1644. "u8x8_arm_linux_gpio_and_delay",
  1645. "uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
  1646. "clock, data, cs, dc, reset",
  1647. "clock, data, cs, dc [, reset]",
  1648. "u8x8_byte_4wire_sw_spi"
  1649. },
  1650. /* 1 */
  1651. {
  1652. "4W_HW_SPI",
  1653. "u8x8_SetPin_4Wire_HW_SPI",
  1654. "u8x8_byte_arm_linux_hw_spi",
  1655. "u8x8_arm_linux_gpio_and_delay",
  1656. "uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
  1657. "cs, dc, reset",
  1658. "cs, dc [, reset]",
  1659. "uC specific"
  1660. },
  1661. /* 2 */
  1662. {
  1663. "6800",
  1664. "u8x8_SetPin_8Bit_6800",
  1665. "u8x8_byte_8bit_6800mode",
  1666. "u8x8_arm_linux_gpio_and_delay",
  1667. "uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t enable, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
  1668. "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc, reset",
  1669. "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc [, reset]",
  1670. "u8x8_byte_8bit_6800mode"
  1671. },
  1672. /* 3 */
  1673. {
  1674. "8080",
  1675. "u8x8_SetPin_8Bit_8080",
  1676. "u8x8_byte_8bit_8080mode",
  1677. "u8x8_arm_linux_gpio_and_delay",
  1678. "uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t enable, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
  1679. "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc, reset",
  1680. "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc [, reset]",
  1681. "u8x8_byte_8bit_8080mode"
  1682. },
  1683. /* 4 */
  1684. {
  1685. "3W_SW_SPI",
  1686. "u8x8_SetPin_3Wire_SW_SPI",
  1687. "u8x8_byte_3wire_sw_spi",
  1688. "u8x8_arm_linux_gpio_and_delay",
  1689. "uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  1690. "clock, data, cs, reset",
  1691. "clock, data, cs [, reset]",
  1692. "u8x8_byte_3wire_sw_spi"
  1693. },
  1694. /* 5 */
  1695. {
  1696. "3W_HW_SPI",
  1697. "u8x8_SetPin_3Wire_HW_SPI",
  1698. "u8x8_byte_arduino_3wire_hw_spi",
  1699. "u8x8_arm_linux_gpio_and_delay",
  1700. "uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  1701. "cs, reset",
  1702. "cs [, reset]",
  1703. "uC specific"
  1704. },
  1705. /* 6 */
  1706. {
  1707. "SW_I2C",
  1708. "u8x8_SetPin_SW_I2C",
  1709. "u8x8_byte_sw_i2c" /* u8x8_byte_sw_i2c */,
  1710. "u8x8_arm_linux_gpio_and_delay",
  1711. "uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE",
  1712. "clock, data, reset",
  1713. "clock, data [, reset]",
  1714. "u8x8_byte_sw_i2c" /* u8x8_byte_sw_i2c */
  1715. },
  1716. /* 7 */
  1717. {
  1718. "HW_I2C",
  1719. "u8x8_SetPin_HW_I2C",
  1720. "u8x8_byte_arm_linux_hw_i2c",
  1721. "u8x8_arm_linux_gpio_and_delay",
  1722. "uint8_t reset = U8X8_PIN_NONE, uint8_t clock = U8X8_PIN_NONE, uint8_t data = U8X8_PIN_NONE",
  1723. "reset, clock, data",
  1724. "[reset [, clock, data]]",
  1725. "uC specific"
  1726. },
  1727. /* 8 */
  1728. {
  1729. /* ST7920 */ "SW_SPI",
  1730. "u8x8_SetPin_3Wire_SW_SPI", /* use the 3 wire interface, because the DC is not used */
  1731. "u8x8_byte_4wire_sw_spi", /* improved version over u8x8_byte_4wire_sw_spi */
  1732. "u8x8_arm_linux_gpio_and_delay",
  1733. "uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  1734. "clock, data, cs, reset",
  1735. "clock, data, cs [, reset]",
  1736. "u8x8_byte_4wire_sw_spi", /* "u8x8_byte_st7920_sw_spi" */
  1737. },
  1738. /* 9 */
  1739. {
  1740. /* ST7920 */ "HW_SPI",
  1741. "u8x8_SetPin_ST7920_HW_SPI",
  1742. "u8x8_byte_arm_linux_hw_spi",
  1743. "u8x8_arm_linux_gpio_and_delay",
  1744. "uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  1745. "cs, reset",
  1746. "cs [, reset]",
  1747. "uC specific"
  1748. },
  1749. /* 10 */
  1750. {
  1751. "2ND_HW_I2C",
  1752. "u8x8_SetPin_HW_I2C",
  1753. "u8x8_byte_2nd_hw_i2c",
  1754. "u8x8_arm_linux_gpio_and_delay",
  1755. "uint8_t reset = U8X8_PIN_NONE",
  1756. "reset",
  1757. "[reset]",
  1758. "uC specific"
  1759. },
  1760. /* 11 */
  1761. {
  1762. "",
  1763. "u8x8_SetPin_KS0108",
  1764. "u8x8_byte_ks0108",
  1765. "u8x8_arm_linux_gpio_and_delay",
  1766. "uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t enable, uint8_t dc, uint8_t cs0, uint8_t cs1, uint8_t cs2, uint8_t reset = U8X8_PIN_NONE",
  1767. "d0, d1, d2, d3, d4, d5, d6, d7, enable, dc, cs0, cs1, cs2, reset",
  1768. "d0, d1, d2, d3, d4, d5, d6, d7, enable, dc, cs0, cs1, cs2 [, reset]",
  1769. "u8x8_byte_ks0108"
  1770. },
  1771. /* 12 */
  1772. {
  1773. "2ND_4W_HW_SPI",
  1774. "u8x8_SetPin_4Wire_HW_SPI",
  1775. "u8x8_byte_2nd_hw_spi",
  1776. "u8x8_arm_linux_gpio_and_delay",
  1777. "uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
  1778. "cs, dc, reset",
  1779. "cs, dc [, reset]",
  1780. "uC specific"
  1781. },
  1782. /* 13 */
  1783. {
  1784. "",
  1785. "u8x8_SetPin_SED1520",
  1786. "u8x8_byte_sed1520",
  1787. "u8x8_arm_linux_gpio_and_delay",
  1788. "uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t dc, uint8_t e1, uint8_t e2, uint8_t reset",
  1789. "d0, d1, d2, d3, d4, d5, d6, d7, dc, e1, e2, reset",
  1790. "d0, d1, d2, d3, d4, d5, d6, d7, dc, e1, e2, reset",
  1791. "u8x8_byte_sed1520"
  1792. },
  1793. /* 14 */
  1794. {
  1795. /* ST7920 */ "2ND_HW_SPI",
  1796. "u8x8_SetPin_ST7920_HW_SPI",
  1797. "u8x8_byte_arduino_2nd_hw_spi",
  1798. "u8x8_arm_linux_gpio_and_delay",
  1799. "uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  1800. "cs, reset",
  1801. "cs [, reset]",
  1802. "uC specific"
  1803. },
  1804. };
  1805. /*===========================================*/
  1806. #define STR_MAX 1024
  1807. char *str_list[STR_MAX];
  1808. int str_cnt = 0;
  1809. int str_exists(const char *s)
  1810. {
  1811. int i;
  1812. for( i = 0; i < str_cnt; i++ )
  1813. {
  1814. if ( strcmp(str_list[i], s) == 0 )
  1815. return 1;
  1816. }
  1817. return 0;
  1818. }
  1819. void str_add(const char *s)
  1820. {
  1821. if ( str_exists(s) )
  1822. return;
  1823. if ( str_cnt >= STR_MAX )
  1824. {
  1825. error(1,0, "max number of strings reached");
  1826. }
  1827. else
  1828. {
  1829. str_list[str_cnt] = strdup(s);
  1830. str_cnt++;
  1831. }
  1832. }
  1833. /*===========================================*/
  1834. /*
  1835. copy file from source_file_name to dest_file_name
  1836. */
  1837. int file_copy(const char *source_file_name, const char *dest_file_name)
  1838. {
  1839. int ch;
  1840. FILE *source_fp;
  1841. FILE *dest_fp;
  1842. source_fp = fopen(source_file_name, "r");
  1843. dest_fp = fopen(dest_file_name, "w");
  1844. if ( source_fp == NULL || dest_fp == NULL )
  1845. return 0;
  1846. while( ( ch = fgetc(source_fp) ) != EOF )
  1847. fputc(ch, dest_fp);
  1848. fclose(source_fp);
  1849. fclose(dest_fp);
  1850. return 1;
  1851. }
  1852. /*
  1853. Insert file "insertname" between lines "start_line" and "end_line" of file "filename"
  1854. */
  1855. int insert_into_file(const char *filename, const char *insertname, const char *start_line, const char *end_line)
  1856. {
  1857. int ch;
  1858. static char line[1024*4];
  1859. const char *tmpname = "tmp.h";
  1860. FILE *source_fp;
  1861. FILE *dest_fp;
  1862. FILE *insert_fp;
  1863. if ( file_copy(filename, tmpname) == 0 )
  1864. return 0;
  1865. source_fp = fopen(tmpname, "r");
  1866. dest_fp = fopen(filename, "w");
  1867. insert_fp = fopen(insertname, "r");
  1868. if ( source_fp == NULL || dest_fp == NULL || insert_fp == NULL )
  1869. return 0;
  1870. for(;;)
  1871. {
  1872. if ( fgets(line, 1024*4, source_fp) == NULL )
  1873. break;
  1874. if ( strncmp(line, start_line, strlen(start_line)) == 0 )
  1875. {
  1876. fputs(line, dest_fp);
  1877. while( ( ch = fgetc(insert_fp) ) != EOF )
  1878. fputc(ch, dest_fp);
  1879. fputs("\n", dest_fp);
  1880. for(;;)
  1881. {
  1882. if ( fgets(line, 1024*4, source_fp) == NULL )
  1883. break;
  1884. if ( strncmp(line, end_line, strlen(end_line)) == 0 )
  1885. {
  1886. fputs(line, dest_fp);
  1887. break;
  1888. }
  1889. }
  1890. }
  1891. else
  1892. {
  1893. fputs(line, dest_fp);
  1894. }
  1895. }
  1896. fclose(insert_fp);
  1897. fclose(source_fp);
  1898. fclose(dest_fp);
  1899. unlink(tmpname);
  1900. printf("patched %s\n", filename);
  1901. return 1;
  1902. }
  1903. /*===========================================*/
  1904. char *strlowercase(const char *s)
  1905. {
  1906. int i, len = strlen(s);
  1907. static char buf[1024];
  1908. for( i = 0; i <= len; i++ )
  1909. buf[i] = tolower(s[i]);
  1910. return buf;
  1911. }
  1912. char *struppercase(const char *s)
  1913. {
  1914. int i, len = strlen(s);
  1915. static char buf[1024];
  1916. for( i = 0; i <= len; i++ )
  1917. buf[i] = toupper(s[i]);
  1918. return buf;
  1919. }
  1920. /*===========================================*/
  1921. FILE *buf_code_fp;
  1922. FILE *buf_header_fp;
  1923. FILE *setup_code_fp;
  1924. FILE *setup_header_fp;
  1925. FILE *u8g2_cpp_header_fp;
  1926. FILE *u8x8_cpp_header_fp;
  1927. FILE *u8x8_setup_c_md_fp;
  1928. FILE *u8x8_setup_cpp_md_fp;
  1929. FILE *u8g2_setup_c_md_fp;
  1930. FILE *u8g2_setup_cpp_md_fp;
  1931. const char *get_setup_function_name(int controller_idx, int display_idx, const char *postfix)
  1932. {
  1933. static char s[1024];
  1934. strcpy(s, "u8g2_Setup_");
  1935. strcat(s, strlowercase(controller_list[controller_idx].name));
  1936. strcat(s, "_");
  1937. if ( controller_list[controller_idx].cad_shortname[0] != '\0' )
  1938. {
  1939. strcat(s, strlowercase(controller_list[controller_idx].cad_shortname));
  1940. strcat(s, "_");
  1941. }
  1942. strcat(s, strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  1943. strcat(s, "_");
  1944. strcat(s, postfix);
  1945. return s;
  1946. }
  1947. void do_setup_prototype(FILE *fp, int controller_idx, int display_idx, const char *postfix)
  1948. {
  1949. /*
  1950. fprintf(fp, "void u8g2_Setup_");
  1951. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
  1952. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  1953. fprintf(fp, "%s(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)", postfix);
  1954. */
  1955. fprintf(fp, "void %s", get_setup_function_name(controller_idx, display_idx, postfix));
  1956. fprintf(fp, "(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)");
  1957. }
  1958. /*===========================================*/
  1959. /*
  1960. class U8X8_SSD1306_128X64_4W_SW_SPI : public U8X8 {
  1961. public: U8X8_SSD1306_128X64_4W_SW_SPI(uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() {
  1962. u8x8_Setup(getU8x8(), u8x8_d_ssd1306_128x64_noname, u8x8_cad_001, u8x8_byte_4wire_sw_spi, u8x8_arm_linux_gpio_and_delay);
  1963. u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
  1964. }
  1965. }
  1966. */
  1967. void do_u8x8_header(int controller_idx, int display_idx, int interface_idx)
  1968. {
  1969. FILE *fp = u8x8_cpp_header_fp;
  1970. fprintf(fp, "class U8X8_");
  1971. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  1972. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  1973. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  1974. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  1975. fprintf(fp, " : public U8X8 {\n");
  1976. fprintf(fp, " public: ");
  1977. fprintf(fp, "U8X8_");
  1978. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  1979. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  1980. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  1981. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  1982. fprintf(fp, "(%s) : U8X8() {\n", interface_list[interface_idx].pins_with_type);
  1983. fprintf(fp, " ");
  1984. fprintf(fp, "u8x8_Setup(getU8x8(), u8x8_d_");
  1985. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
  1986. fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  1987. fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].cad));
  1988. fprintf(fp, "%s, ", interface_list[interface_idx].arm_linux_com_procedure);
  1989. fprintf(fp, "%s);\n", interface_list[interface_idx].arm_linux_gpio_procedure);
  1990. fprintf(fp, " ");
  1991. fprintf(fp, "%s(getU8x8(), ", interface_list[interface_idx].setpin_function);
  1992. fprintf(fp, "%s);\n", interface_list[interface_idx].pins_plain);
  1993. fprintf(fp, " }\n");
  1994. fprintf(fp, "};\n");
  1995. }
  1996. /*
  1997. class U8G2_SSD1306_128x64_NONAME_1_SW_SPI : public U8G2
  1998. {
  1999. public:
  2000. U8G2_SSD1306_128x64_NONAME_1_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE)
  2001. {
  2002. u8g2_Setup_ssd1306_128x64_noname_1(&u8g2, rotation, u8x8_byte_4wire_sw_spi, u8x8_arm_linux_gpio_and_delay,);
  2003. u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
  2004. }
  2005. };
  2006. */
  2007. void do_display_interface(int controller_idx, int display_idx, const char *postfix, int interface_idx)
  2008. {
  2009. FILE *fp = u8g2_cpp_header_fp;
  2010. printf(" %s %s", postfix, interface_list[interface_idx].interface_name);
  2011. fprintf(fp, "class U8G2_");
  2012. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2013. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2014. fprintf(fp, "%s", struppercase(postfix));
  2015. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2016. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2017. fprintf(fp, " : public U8G2 {\n");
  2018. fprintf(fp, " public: ");
  2019. fprintf(fp, "U8G2_");
  2020. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2021. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2022. fprintf(fp, "%s", struppercase(postfix));
  2023. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2024. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2025. fprintf(fp, "(const u8g2_cb_t *rotation, ");
  2026. fprintf(fp, "%s) : U8G2() {\n", interface_list[interface_idx].pins_with_type);
  2027. fprintf(fp, " ");
  2028. /*
  2029. fprintf(fp, "u8g2_Setup_");
  2030. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
  2031. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2032. fprintf(fp, "%s", postfix);
  2033. */
  2034. fprintf(fp, "%s", get_setup_function_name(controller_idx, display_idx, postfix));
  2035. fprintf(fp, "(&u8g2, ");
  2036. fprintf(fp, "rotation, ");
  2037. fprintf(fp, "%s, ", interface_list[interface_idx].arm_linux_com_procedure);
  2038. fprintf(fp, "%s);\n", interface_list[interface_idx].arm_linux_gpio_procedure);
  2039. fprintf(fp, " ");
  2040. fprintf(fp, "%s(getU8x8(), ", interface_list[interface_idx].setpin_function);
  2041. fprintf(fp, "%s);\n", interface_list[interface_idx].pins_plain);
  2042. fprintf(fp, " }\n");
  2043. fprintf(fp, "};\n");
  2044. if ( strcmp(postfix, "1") == 0 )
  2045. do_u8x8_header(controller_idx, display_idx, interface_idx);
  2046. }
  2047. /*===========================================*/
  2048. void do_display(int controller_idx, int display_idx, const char *postfix)
  2049. {
  2050. do_setup_prototype(setup_header_fp, controller_idx, display_idx, postfix);
  2051. fprintf(setup_header_fp, ";\n");
  2052. do_setup_prototype(setup_code_fp, controller_idx, display_idx, postfix);
  2053. fprintf(setup_code_fp, "\n");
  2054. fprintf(setup_code_fp, "{\n");
  2055. fprintf(setup_code_fp, " uint8_t tile_buf_height;\n");
  2056. fprintf(setup_code_fp, " uint8_t *buf;\n");
  2057. fprintf(setup_code_fp, " u8g2_SetupDisplay(u8g2, u8x8_d_");
  2058. fprintf(setup_code_fp, "%s_", strlowercase(controller_list[controller_idx].name));
  2059. fprintf(setup_code_fp, "%s, ", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2060. fprintf(setup_code_fp, "%s, ", controller_list[controller_idx].cad);
  2061. fprintf(setup_code_fp, "byte_cb, gpio_and_delay_cb);\n");
  2062. fprintf(setup_code_fp, " buf = ");
  2063. //fprintf(setup_code_fp, "u8g2_m_%s_%d_%s(&tile_buf_height);\n", strlowercase(controller_list[controller_idx].name), controller_list[controller_idx].tile_width, postfix);
  2064. fprintf(setup_code_fp, "u8g2_m_%d_%d_%s(&tile_buf_height);\n", controller_list[controller_idx].tile_width, controller_list[controller_idx].tile_height, postfix);
  2065. fprintf(setup_code_fp, " u8g2_SetupBuffer(u8g2, buf, tile_buf_height, %s, rotation);\n", controller_list[controller_idx].ll_hvline);
  2066. fprintf(setup_code_fp, "}\n");
  2067. /* generate interfaces for this display */
  2068. if ( controller_list[controller_idx].com & COM_4WSPI )
  2069. {
  2070. do_display_interface(controller_idx, display_idx, postfix, 0); /* SW SPI */
  2071. do_display_interface(controller_idx, display_idx, postfix, 1); /* HW SPI */
  2072. // do_display_interface(controller_idx, display_idx, postfix, 12); /* 2nd HW SPI */
  2073. }
  2074. if ( controller_list[controller_idx].com & COM_3WSPI )
  2075. {
  2076. do_display_interface(controller_idx, display_idx, postfix, 4); /* 3wire SW SPI */
  2077. // do_display_interface(controller_idx, display_idx, postfix, 5); /* 3wire HW SPI (not implemented) */
  2078. }
  2079. if ( controller_list[controller_idx].com & COM_6800 )
  2080. {
  2081. do_display_interface(controller_idx, display_idx, postfix, 2); /* 6800 mode */
  2082. }
  2083. if ( controller_list[controller_idx].com & COM_8080 )
  2084. {
  2085. do_display_interface(controller_idx, display_idx, postfix, 3); /* 8080 mode */
  2086. }
  2087. if ( controller_list[controller_idx].com & COM_I2C )
  2088. {
  2089. do_display_interface(controller_idx, display_idx, postfix, 6); /* SW I2C */
  2090. do_display_interface(controller_idx, display_idx, postfix, 7); /* HW I2C */
  2091. // do_display_interface(controller_idx, display_idx, postfix, 10); /* 2nd HW I2C */
  2092. }
  2093. if ( controller_list[controller_idx].com & COM_ST7920SPI )
  2094. {
  2095. do_display_interface(controller_idx, display_idx, postfix, 8); /* ST7920 SW SPI */
  2096. do_display_interface(controller_idx, display_idx, postfix, 9); /* HW SPI */
  2097. // do_display_interface(controller_idx, display_idx, postfix, 14); /* 2ND HW SPI */
  2098. }
  2099. if ( controller_list[controller_idx].com & COM_UART )
  2100. {
  2101. /* currently there is no arm-linux C++ interface, instead the interface is created manually in the example */
  2102. }
  2103. if ( controller_list[controller_idx].com & COM_KS0108 )
  2104. {
  2105. do_display_interface(controller_idx, display_idx, postfix, 11); /* KS0108 6800 parallel mode */
  2106. }
  2107. if ( controller_list[controller_idx].com & COM_SED1520 )
  2108. {
  2109. do_display_interface(controller_idx, display_idx, postfix, 13);
  2110. }
  2111. }
  2112. void do_controller_buffer_code(int idx, const char *postfix, int buf_len, int rows)
  2113. {
  2114. int display_idx;
  2115. char s[1024];
  2116. //sprintf(s, "u8g2_m_%s_%d_%d_%s", strlowercase(controller_list[idx].name), controller_list[idx].tile_width, controller_list[idx].tile_height, postfix);
  2117. /* this should fix #370, additionally the controller is removed (hope that this will not break anything) */
  2118. sprintf(s, "u8g2_m_%d_%d_%s", controller_list[idx].tile_width, controller_list[idx].tile_height, postfix);
  2119. if ( str_exists(s) == 0 )
  2120. {
  2121. str_add(s);
  2122. //FILE *fp = stdout;
  2123. fprintf(buf_code_fp, "uint8_t *%s(uint8_t *page_cnt)\n", s);
  2124. fprintf(buf_code_fp, "{\n");
  2125. fprintf(buf_code_fp, " #ifdef U8G2_USE_DYNAMIC_ALLOC\n");
  2126. fprintf(buf_code_fp, " *page_cnt = %d;\n", rows);
  2127. fprintf(buf_code_fp, " return 0;\n");
  2128. fprintf(buf_code_fp, " #else\n");
  2129. fprintf(buf_code_fp, " static uint8_t buf[%d];\n", buf_len);
  2130. fprintf(buf_code_fp, " *page_cnt = %d;\n", rows);
  2131. fprintf(buf_code_fp, " return buf;\n");
  2132. fprintf(buf_code_fp, " #endif\n");
  2133. fprintf(buf_code_fp, "}\n");
  2134. fprintf(buf_header_fp, "uint8_t *%s(uint8_t *page_cnt);\n", s);
  2135. }
  2136. display_idx = 0;
  2137. fprintf(setup_code_fp, "/* %s %s */\n", controller_list[idx].name, postfix);
  2138. while( controller_list[idx].display_list[display_idx].name != NULL )
  2139. {
  2140. do_display(idx, display_idx, postfix);
  2141. display_idx++;
  2142. }
  2143. }
  2144. void do_controller_list(void)
  2145. {
  2146. int i;
  2147. for( i = 0; i < sizeof(controller_list)/sizeof(*controller_list); i++ )
  2148. {
  2149. printf("%s: ",controller_list[i].name);
  2150. fprintf(setup_code_fp, "/* %s */\n", controller_list[i].name);
  2151. do_controller_buffer_code(i, "1", controller_list[i].tile_width*8, 1);
  2152. do_controller_buffer_code(i, "2", controller_list[i].tile_width*8*2, 2);
  2153. do_controller_buffer_code(i, "f", controller_list[i].tile_width*8*controller_list[i].tile_height, controller_list[i].tile_height);
  2154. printf("\n");
  2155. }
  2156. }
  2157. int is_arm_linux_cpp = 1;
  2158. int is_u8g2 = 1;
  2159. FILE *md_fp;
  2160. void do_md_display(int controller_idx, int display_idx)
  2161. {
  2162. FILE *fp = md_fp;
  2163. /*
  2164. fprintf(fp, "%s:", controller_list[controller_idx].name);
  2165. fprintf(fp, "%s\n", controller_list[controller_idx].display_list[display_idx].name);
  2166. */
  2167. if ( is_u8g2 )
  2168. {
  2169. fprintf(fp, "\n");
  2170. fprintf(fp, "## %s ", struppercase(controller_list[controller_idx].name));
  2171. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2172. fprintf(fp, "\n");
  2173. #ifdef MD_TABLES
  2174. fprintf(fp, "| Controller \"%s\", ", controller_list[controller_idx].name);
  2175. fprintf(fp, "Display \"%s\" | ", controller_list[controller_idx].display_list[display_idx].name);
  2176. fprintf(fp, "Description |\n");
  2177. fprintf(fp, "|---|---|\n");
  2178. #else
  2179. fprintf(fp, "Controller \"%s\", ", controller_list[controller_idx].name);
  2180. fprintf(fp, "Display \"%s\" ", controller_list[controller_idx].display_list[display_idx].name);
  2181. fprintf(fp, "[Description]\n");
  2182. #endif
  2183. }
  2184. else
  2185. {
  2186. if ( is_u8g2 != 0 || strcmp(controller_list[controller_idx].ll_hvline, U8X8_HVLINE ) == 0 )
  2187. {
  2188. fprintf(fp, "\n");
  2189. fprintf(fp, "## %s ", struppercase(controller_list[controller_idx].name));
  2190. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2191. fprintf(fp, "\n");
  2192. fprintf(fp, "| Controller \"%s\", ", controller_list[controller_idx].name);
  2193. fprintf(fp, "Display \"%s\" |\n", controller_list[controller_idx].display_list[display_idx].name);
  2194. fprintf(fp, "|---|\n");
  2195. }
  2196. }
  2197. }
  2198. void do_md_display_interface_buffer(int controller_idx, int display_idx, int interface_idx, char *postfix, int size, int rows)
  2199. {
  2200. FILE *fp = md_fp;
  2201. #ifdef MD_TABLES
  2202. if ( is_u8g2 )
  2203. {
  2204. if ( is_arm_linux_cpp )
  2205. {
  2206. fprintf(fp, "| U8G2_");
  2207. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2208. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2209. fprintf(fp, "%s", struppercase(postfix));
  2210. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2211. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2212. fprintf(fp, "(rotation, %s)", interface_list[interface_idx].pins_md_plain);
  2213. if ( postfix[0] == 'f' )
  2214. {
  2215. fprintf(fp, " | full framebuffer, size = %d bytes |\n", size);
  2216. }
  2217. else
  2218. {
  2219. fprintf(fp, " | page buffer, size = %d bytes |\n", size);
  2220. }
  2221. }
  2222. else
  2223. {
  2224. fprintf(fp, "| ");
  2225. fprintf(fp, "%s", get_setup_function_name(controller_idx, display_idx, postfix));
  2226. fprintf(fp, "(u8g2, ");
  2227. fprintf(fp, "rotation, ");
  2228. fprintf(fp, "%s, ", interface_list[interface_idx].generic_com_procedure);
  2229. fprintf(fp, "%s)", "uC specific");
  2230. if ( postfix[0] == 'f' )
  2231. {
  2232. fprintf(fp, " | full framebuffer, size = %d bytes |\n", size);
  2233. }
  2234. else
  2235. {
  2236. fprintf(fp, " | page buffer, size = %d bytes |\n", size);
  2237. }
  2238. }
  2239. }
  2240. #else
  2241. if ( is_u8g2 )
  2242. {
  2243. if ( is_arm_linux_cpp )
  2244. {
  2245. fprintf(fp, " * U8G2_");
  2246. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2247. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2248. fprintf(fp, "%s", struppercase(postfix));
  2249. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2250. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2251. fprintf(fp, "(rotation, %s)", interface_list[interface_idx].pins_md_plain);
  2252. if ( postfix[0] == 'f' )
  2253. {
  2254. fprintf(fp, " [full framebuffer, size = %d bytes]\n", size);
  2255. }
  2256. else
  2257. {
  2258. fprintf(fp, " [page buffer, size = %d bytes]\n", size);
  2259. }
  2260. }
  2261. else
  2262. {
  2263. fprintf(fp, " * ");
  2264. fprintf(fp, "%s", get_setup_function_name(controller_idx, display_idx, postfix));
  2265. fprintf(fp, "(u8g2, ");
  2266. fprintf(fp, "rotation, ");
  2267. fprintf(fp, "%s, ", interface_list[interface_idx].generic_com_procedure);
  2268. fprintf(fp, "%s)", "uC specific");
  2269. if ( postfix[0] == 'f' )
  2270. {
  2271. fprintf(fp, " [full framebuffer, size = %d bytes]\n", size);
  2272. }
  2273. else
  2274. {
  2275. fprintf(fp, " [page buffer, size = %d bytes]\n", size);
  2276. }
  2277. }
  2278. }
  2279. #endif
  2280. }
  2281. void do_md_display_interface(int controller_idx, int display_idx, int interface_idx)
  2282. {
  2283. FILE *fp = md_fp;
  2284. if ( !is_u8g2 )
  2285. {
  2286. if ( strcmp(controller_list[controller_idx].ll_hvline, U8X8_HVLINE ) == 0 )
  2287. {
  2288. if ( is_arm_linux_cpp )
  2289. {
  2290. fprintf(fp, "| U8X8_");
  2291. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2292. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2293. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2294. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2295. fprintf(fp, "(%s) |\n", interface_list[interface_idx].pins_md_plain);
  2296. }
  2297. else
  2298. {
  2299. fprintf(fp, "| u8x8_Setup(u8x8_d_");
  2300. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
  2301. fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2302. fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].cad));
  2303. fprintf(fp, "%s, ", strlowercase(interface_list[interface_idx].generic_com_procedure));
  2304. fprintf(fp, "uC specific) |\n");
  2305. }
  2306. }
  2307. }
  2308. do_md_display_interface_buffer(controller_idx, display_idx, interface_idx, "1", controller_list[controller_idx].tile_width*8, 1);
  2309. do_md_display_interface_buffer(controller_idx, display_idx, interface_idx, "2", controller_list[controller_idx].tile_width*8*2, 2);
  2310. do_md_display_interface_buffer(controller_idx, display_idx, interface_idx, "f", controller_list[controller_idx].tile_width*8*controller_list[controller_idx].tile_height, controller_list[controller_idx].tile_height);
  2311. }
  2312. void do_md_controller_list(void)
  2313. {
  2314. int controller_idx, display_idx;
  2315. for( controller_idx = 0; controller_idx < sizeof(controller_list)/sizeof(*controller_list); controller_idx++ )
  2316. {
  2317. display_idx = 0;
  2318. while( controller_list[controller_idx].display_list[display_idx].name != NULL )
  2319. {
  2320. do_md_display(controller_idx, display_idx);
  2321. /* generate interfaces for this display */
  2322. if ( controller_list[controller_idx].com & COM_4WSPI )
  2323. {
  2324. do_md_display_interface(controller_idx, display_idx, 0); /* SW SPI */
  2325. if ( is_arm_linux_cpp )
  2326. {
  2327. do_md_display_interface(controller_idx, display_idx, 1); /* HW SPI */
  2328. // do_md_display_interface(controller_idx, display_idx, 12); /* 2nd HW SPI */
  2329. }
  2330. }
  2331. if ( controller_list[controller_idx].com & COM_3WSPI )
  2332. {
  2333. do_md_display_interface(controller_idx, display_idx, 4); /* 3wire SW SPI */
  2334. do_md_display_interface(controller_idx, display_idx, 5); /* 3wire HW SPI (not implemented) */
  2335. }
  2336. if ( controller_list[controller_idx].com & COM_6800 )
  2337. {
  2338. do_md_display_interface(controller_idx, display_idx, 2); /* 6800 mode */
  2339. }
  2340. if ( controller_list[controller_idx].com & COM_8080 )
  2341. {
  2342. do_md_display_interface(controller_idx, display_idx, 3); /* 8080 mode */
  2343. }
  2344. if ( controller_list[controller_idx].com & COM_I2C )
  2345. {
  2346. do_md_display_interface(controller_idx, display_idx, 6); /* SW I2C */
  2347. do_md_display_interface(controller_idx, display_idx, 7); /* HW I2C */
  2348. // do_md_display_interface(controller_idx, display_idx, 10); /* 2nd HW I2C */
  2349. }
  2350. if ( controller_list[controller_idx].com & COM_ST7920SPI )
  2351. {
  2352. do_md_display_interface(controller_idx, display_idx, 8); /* ST7920 SW SPI */
  2353. do_md_display_interface(controller_idx, display_idx, 9); /* HW SPI (not yet implemented) */
  2354. do_md_display_interface(controller_idx, display_idx, 14); /* 2ND HW SPI */
  2355. }
  2356. if ( controller_list[controller_idx].com & COM_KS0108 )
  2357. {
  2358. do_md_display_interface(controller_idx, display_idx, 11); /* KS0108 */
  2359. }
  2360. if ( controller_list[controller_idx].com & COM_SED1520 )
  2361. {
  2362. do_md_display_interface(controller_idx, display_idx, 13); /* SED1520 */
  2363. }
  2364. display_idx++;
  2365. }
  2366. }
  2367. }
  2368. int main(void)
  2369. {
  2370. buf_code_fp = fopen("u8g2_d_memory.c", "w");
  2371. fprintf(buf_code_fp, "/* u8g2_d_memory.c */\n");
  2372. fprintf(buf_code_fp, "/* generated code, codebuild, u8g2 project */\n");
  2373. fprintf(buf_code_fp, "\n");
  2374. fprintf(buf_code_fp, "#include \"u8g2.h\"\n");
  2375. fprintf(buf_code_fp, "\n");
  2376. buf_header_fp = fopen("u8g2_memory.h", "w");
  2377. //fprintf(buf_header_fp, "/* start of generated code, codebuild, u8g2 project */\n");
  2378. setup_code_fp = fopen("u8g2_d_setup.c", "w");
  2379. fprintf(setup_code_fp, "/* u8g2_d_setup.c */\n");
  2380. fprintf(setup_code_fp, "/* generated code, codebuild, u8g2 project */\n");
  2381. fprintf(setup_code_fp, "\n");
  2382. fprintf(setup_code_fp, "#include \"u8g2.h\"\n");
  2383. fprintf(setup_code_fp, "\n");
  2384. setup_header_fp = fopen("u8g2_setup.h", "w");
  2385. //fprintf(setup_header_fp, "/* start of generated code, codebuild, u8g2 project */\n");
  2386. u8g2_cpp_header_fp = fopen("U8g2lib.h", "w");
  2387. fprintf(u8g2_cpp_header_fp, "/* generated code (codebuild), u8g2 project */\n");
  2388. u8x8_cpp_header_fp = fopen("U8x8lib.h", "w");
  2389. fprintf(u8x8_cpp_header_fp, "/* generated code (codebuild), u8g2 project */\n");
  2390. u8x8_setup_c_md_fp = fopen("u8x8setupc.md", "w");
  2391. u8x8_setup_cpp_md_fp = fopen("u8x8setupcpp.md", "w");
  2392. u8g2_setup_c_md_fp = fopen("u8g2setupc.md", "w");
  2393. u8g2_setup_cpp_md_fp = fopen("u8g2setupcpp.md", "w");
  2394. do_controller_list();
  2395. md_fp = u8g2_setup_cpp_md_fp;
  2396. is_arm_linux_cpp = 1;
  2397. is_u8g2 = 1;
  2398. do_md_controller_list();
  2399. md_fp = u8g2_setup_c_md_fp;
  2400. is_arm_linux_cpp = 0;
  2401. is_u8g2 = 1;
  2402. do_md_controller_list();
  2403. md_fp = u8x8_setup_cpp_md_fp;
  2404. is_arm_linux_cpp = 1;
  2405. is_u8g2 = 0;
  2406. do_md_controller_list();
  2407. md_fp = u8x8_setup_c_md_fp;
  2408. is_arm_linux_cpp = 0;
  2409. is_u8g2 = 0;
  2410. do_md_controller_list();
  2411. fprintf(buf_code_fp, "/* end of generated code */\n");
  2412. fclose(buf_code_fp);
  2413. //fprintf(buf_header_fp, "/* end of generated code */\n");
  2414. fclose(buf_header_fp);
  2415. fprintf(setup_code_fp, "/* end of generated code */\n");
  2416. fclose(setup_code_fp);
  2417. //fprintf(setup_header_fp, "/* end of generated code */\n");
  2418. fclose(setup_header_fp);
  2419. fclose(u8g2_cpp_header_fp);
  2420. fclose(u8x8_cpp_header_fp);
  2421. fclose(u8x8_setup_c_md_fp);
  2422. fclose(u8x8_setup_cpp_md_fp);
  2423. fclose(u8g2_setup_c_md_fp);
  2424. fclose(u8g2_setup_cpp_md_fp);
  2425. system("cp u8g2_d_memory.c ../../../../csrc/.");
  2426. puts("generate u8g2_d_memory.c");
  2427. system("cp u8g2_d_setup.c ../../../../csrc/.");
  2428. puts("generate u8g2_d_setup.c");
  2429. insert_into_file("../../../../csrc/u8g2.h", "u8g2_memory.h", "/* u8g2_d_memory.c generated code start */", "/* u8g2_d_memory.c generated code end */");
  2430. insert_into_file("../../../../csrc/u8g2.h", "u8g2_setup.h", "/* u8g2_d_setup.c generated code start */", "/* u8g2_d_setup.c generated code end */");
  2431. insert_into_file("../../cppsrc/U8g2lib.h", "U8g2lib.h", "/* arm-linux constructor list start */", "/* arm-linux constructor list end */");
  2432. insert_into_file("../../cppsrc/U8x8lib.h", "U8x8lib.h", "// constructor list start", "// constructor list end");
  2433. insert_into_file("../../../u8g2.wiki/u8g2setupc.md", "u8g2setupc.md", "# Setup Function Reference", "# Links");
  2434. insert_into_file("../../../u8g2.wiki/u8g2setupcpp.md", "u8g2setupcpp.md", "# Constructor Reference", "# Links");
  2435. insert_into_file("../../../u8g2.wiki/u8x8setupc.md", "u8x8setupc.md", "# Setup Function Reference", "# Links");
  2436. insert_into_file("../../../u8g2.wiki/u8x8setupcpp.md", "u8x8setupcpp.md", "# Constructor Reference", "# Links");
  2437. return 0;
  2438. }