codebuild.c 97 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534
  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 *arduino_com_procedure; /* u8x8_byte_4wire_sw_spi */
  32. const char *arduino_gpio_procedure; /* u8x8_gpio_and_delay_arduino */
  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. "ssd1312", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  129. "", /* is_generate_u8g2_class= */ 1,
  130. {
  131. { "128x64_noname" },
  132. { NULL }
  133. }
  134. },
  135. {
  136. "ssd1312", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  137. "", /* is_generate_u8g2_class= */ 1,
  138. {
  139. { "128x64_noname" },
  140. { NULL }
  141. }
  142. },
  143. {
  144. "ssd1306", 9, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  145. "", /* is_generate_u8g2_class= */ 1,
  146. {
  147. { "72x40_er" },
  148. { NULL }
  149. }
  150. },
  151. {
  152. "ssd1306", 9, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  153. "", /* is_generate_u8g2_class= */ 1,
  154. {
  155. { "72x40_er" },
  156. { NULL }
  157. }
  158. },
  159. {
  160. "ssd1306", 12, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  161. "", /* is_generate_u8g2_class= */ 1,
  162. {
  163. { "96x40" },
  164. { "96x39" },
  165. { NULL }
  166. }
  167. },
  168. {
  169. "ssd1306", 12, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  170. "", /* is_generate_u8g2_class= */ 1,
  171. {
  172. { "96x40" },
  173. { "96x39" },
  174. { NULL }
  175. }
  176. },
  177. {
  178. "sh1106", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  179. "Not tested", /* is_generate_u8g2_class= */ 1,
  180. {
  181. { "128x64_noname" },
  182. { "128x64_vcomh0" },
  183. { "128x64_winstar" },
  184. { NULL }
  185. }
  186. },
  187. {
  188. "sh1106", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  189. "Not tested", /* is_generate_u8g2_class= */ 1,
  190. {
  191. { "128x64_noname" },
  192. { "128x64_vcomh0" },
  193. { "128x64_winstar" },
  194. { NULL }
  195. }
  196. },
  197. {
  198. "sh1106", 9, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  199. "Not tested", /* is_generate_u8g2_class= */ 1,
  200. {
  201. { "72x40_wise" },
  202. { NULL }
  203. }
  204. },
  205. {
  206. "sh1106", 9, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  207. "Not tested", /* is_generate_u8g2_class= */ 1,
  208. {
  209. { "72x40_wise" },
  210. { NULL }
  211. }
  212. },
  213. {
  214. "sh1106", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  215. "Not tested", /* is_generate_u8g2_class= */ 1,
  216. {
  217. { "64x32" },
  218. { NULL }
  219. }
  220. },
  221. {
  222. "sh1106", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  223. "Not tested", /* is_generate_u8g2_class= */ 1,
  224. {
  225. { "64x32" },
  226. { NULL }
  227. }
  228. },
  229. {
  230. "sh1107", 8, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  231. "Not tested", /* is_generate_u8g2_class= */ 1,
  232. {
  233. { "64x128" },
  234. { NULL }
  235. }
  236. },
  237. {
  238. "sh1107", 8, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  239. "Not tested", /* is_generate_u8g2_class= */ 1,
  240. {
  241. { "64x128" },
  242. { NULL }
  243. }
  244. },
  245. {
  246. "sh1107", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  247. "Not tested", /* is_generate_u8g2_class= */ 1,
  248. {
  249. { "seeed_96x96" },
  250. { "hjr_oel1m0201_96x96" },
  251. { NULL }
  252. }
  253. },
  254. {
  255. "sh1107", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  256. "Not tested", /* is_generate_u8g2_class= */ 1,
  257. {
  258. { "seeed_96x96" },
  259. { "hjr_oel1m0201_96x96" },
  260. { NULL }
  261. }
  262. },
  263. {
  264. "sh1107", 10, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  265. "", /* is_generate_u8g2_class= */ 1,
  266. {
  267. { "128x80" }, /* actually this is a 80x128 display */
  268. { "tk078f288_80x128" },
  269. { NULL }
  270. }
  271. },
  272. {
  273. "sh1107", 10, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  274. "", /* is_generate_u8g2_class= */ 1,
  275. {
  276. { "128x80" }, /* actually this is a 80x128 display */
  277. { "tk078f288_80x128" },
  278. { NULL }
  279. }
  280. },
  281. {
  282. "sh1107", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  283. "", /* is_generate_u8g2_class= */ 1,
  284. {
  285. { "128x128" }, // not tested
  286. { "pimoroni_128x128" }, // not tested
  287. { "seeed_128x128" }, // in lab
  288. { NULL }
  289. }
  290. },
  291. {
  292. "sh1107", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  293. "", /* is_generate_u8g2_class= */ 1,
  294. {
  295. { "128x128" }, // not tested
  296. { "pimoroni_128x128" }, // not tested
  297. { "seeed_128x128" }, // in lab
  298. { NULL }
  299. }
  300. },
  301. {
  302. "sh1108", 16, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  303. "", /* is_generate_u8g2_class= */ 1,
  304. {
  305. { "128x160" },
  306. { NULL }
  307. }
  308. },
  309. {
  310. "sh1108", 16, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  311. "", /* is_generate_u8g2_class= */ 1,
  312. {
  313. { "128x160" },
  314. { NULL }
  315. }
  316. },
  317. {
  318. "ch1120", 16, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  319. "", /* is_generate_u8g2_class= */ 1,
  320. {
  321. { "128x160" },
  322. { NULL }
  323. }
  324. },
  325. {
  326. "ch1120", 16, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  327. "", /* is_generate_u8g2_class= */ 1,
  328. {
  329. { "128x160" },
  330. { NULL }
  331. }
  332. },
  333. {
  334. "sh1108", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  335. "Not tested", /* is_generate_u8g2_class= */ 1,
  336. {
  337. { "160x160" },
  338. { NULL }
  339. }
  340. },
  341. {
  342. "sh1108", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  343. "Not tested", /* is_generate_u8g2_class= */ 1,
  344. {
  345. { "160x160" },
  346. { NULL }
  347. }
  348. },
  349. {
  350. "sh1122", 32, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  351. "", /* is_generate_u8g2_class= */ 1,
  352. {
  353. { "256x64" },
  354. { NULL }
  355. }
  356. },
  357. {
  358. "sh1122", 32, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  359. "", /* is_generate_u8g2_class= */ 1,
  360. {
  361. { "256x64" },
  362. { NULL }
  363. }
  364. },
  365. {
  366. "ssd1306", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  367. "", /* is_generate_u8g2_class= */ 1,
  368. {
  369. { "128x32_univision" },
  370. { "128x32_winstar" },
  371. { NULL }
  372. }
  373. },
  374. {
  375. "ssd1306", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  376. "", /* is_generate_u8g2_class= */ 1,
  377. {
  378. { "128x32_univision" },
  379. { "128x32_winstar" },
  380. { NULL }
  381. }
  382. },
  383. {
  384. "ssd1306", 13, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  385. "", /* is_generate_u8g2_class= */ 1,
  386. {
  387. { "102x64_ea_oleds102" },
  388. { NULL }
  389. }
  390. },
  391. {
  392. "ssd1306", 13, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  393. "", /* is_generate_u8g2_class= */ 1,
  394. {
  395. { "102x64_ea_oleds102" },
  396. { NULL }
  397. }
  398. },
  399. {
  400. "sh1106", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  401. "", /* is_generate_u8g2_class= */ 1,
  402. {
  403. { "128x32_visionox" },
  404. { NULL }
  405. }
  406. },
  407. {
  408. "sh1106", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  409. "", /* is_generate_u8g2_class= */ 1,
  410. {
  411. { "128x32_visionox" },
  412. { NULL }
  413. }
  414. },
  415. {
  416. "ssd1306", 8, 6, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  417. "", /* is_generate_u8g2_class= */ 1,
  418. {
  419. { "64x48_er" },
  420. { NULL }
  421. }
  422. },
  423. {
  424. "ssd1306", 8, 6, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  425. "", /* is_generate_u8g2_class= */ 1,
  426. {
  427. { "64x48_er" },
  428. { NULL }
  429. }
  430. },
  431. {
  432. "ssd1306", 6, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  433. "", /* is_generate_u8g2_class= */ 1,
  434. {
  435. { "48x64_winstar" },
  436. { NULL }
  437. }
  438. },
  439. {
  440. "ssd1306", 6, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  441. "", /* is_generate_u8g2_class= */ 1,
  442. {
  443. { "48x64_winstar" },
  444. { NULL }
  445. }
  446. },
  447. {
  448. "ssd1306", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  449. "", /* is_generate_u8g2_class= */ 1,
  450. {
  451. { "64x32_noname" },
  452. { "64x32_1f" },
  453. { NULL }
  454. }
  455. },
  456. {
  457. "ssd1306", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  458. "", /* is_generate_u8g2_class= */ 1,
  459. {
  460. { "64x32_noname" },
  461. { "64x32_1f" },
  462. { NULL }
  463. }
  464. },
  465. {
  466. "ssd1306", 12, 2, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  467. "", /* is_generate_u8g2_class= */ 1,
  468. {
  469. { "96x16_er" },
  470. { NULL }
  471. }
  472. },
  473. {
  474. "ssd1306", 12, 2, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  475. "", /* is_generate_u8g2_class= */ 1,
  476. {
  477. { "96x16_er" },
  478. { NULL }
  479. }
  480. },
  481. {
  482. "ssd1309", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  483. "", /* is_generate_u8g2_class= */ 1,
  484. {
  485. { "128x64_noname2" },
  486. { NULL }
  487. }
  488. },
  489. {
  490. "ssd1309", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  491. "", /* is_generate_u8g2_class= */ 1,
  492. {
  493. { "128x64_noname2" },
  494. { NULL }
  495. }
  496. },
  497. {
  498. "ssd1309", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  499. "", /* is_generate_u8g2_class= */ 1,
  500. {
  501. { "128x64_noname0" },
  502. { NULL }
  503. }
  504. },
  505. {
  506. "ssd1309", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  507. "", /* is_generate_u8g2_class= */ 1,
  508. {
  509. { "128x64_noname0" },
  510. { NULL }
  511. }
  512. },
  513. {
  514. "ssd1309", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  515. "", /* is_generate_u8g2_class= */ 1,
  516. {
  517. { "128x128_noname0" },
  518. { NULL }
  519. }
  520. },
  521. {
  522. "ssd1309", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  523. "", /* is_generate_u8g2_class= */ 1,
  524. {
  525. { "128x128_noname0" },
  526. { NULL }
  527. }
  528. },
  529. {
  530. "ssd1312", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  531. "", /* is_generate_u8g2_class= */ 1,
  532. {
  533. { "128x32" },
  534. { NULL }
  535. }
  536. },
  537. {
  538. "ssd1312", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  539. "", /* is_generate_u8g2_class= */ 1,
  540. {
  541. { "128x32" },
  542. { NULL }
  543. }
  544. },
  545. {
  546. "ssd1312", 15, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  547. "", /* is_generate_u8g2_class= */ 1,
  548. {
  549. { "120x32" },
  550. { "120x28" },
  551. { NULL }
  552. }
  553. },
  554. {
  555. "ssd1312", 15, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  556. "", /* is_generate_u8g2_class= */ 1,
  557. {
  558. { "120x32" },
  559. { "120x28" },
  560. { NULL }
  561. }
  562. },
  563. /* https://github.com/olikraus/u8g2/issues/919 */
  564. {
  565. "ssd1316", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  566. "", /* is_generate_u8g2_class= */ 1,
  567. {
  568. { "128x32" },
  569. { NULL }
  570. }
  571. },
  572. {
  573. "ssd1316", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  574. "", /* is_generate_u8g2_class= */ 1,
  575. {
  576. { "128x32" },
  577. { NULL }
  578. }
  579. },
  580. /* https://github.com/olikraus/u8g2/issues/1938 */
  581. {
  582. "ssd1316", 12, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  583. "", /* is_generate_u8g2_class= */ 1,
  584. {
  585. { "96x32" },
  586. { NULL }
  587. }
  588. },
  589. {
  590. "ssd1316", 12, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  591. "", /* is_generate_u8g2_class= */ 1,
  592. {
  593. { "96x32" },
  594. { NULL }
  595. }
  596. },
  597. {
  598. "ssd1317", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  599. "", /* is_generate_u8g2_class= */ 1,
  600. {
  601. { "96x96" },
  602. { NULL }
  603. }
  604. },
  605. {
  606. "ssd1317", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  607. "", /* is_generate_u8g2_class= */ 1,
  608. {
  609. { "96x96" },
  610. { NULL }
  611. }
  612. },
  613. /* issue 784 */
  614. {
  615. "ssd1318", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
  616. "", /* is_generate_u8g2_class= */ 1,
  617. {
  618. { "128x96" },
  619. { "128x96_xcp" }, // with external charge pump
  620. { NULL }
  621. }
  622. },
  623. {
  624. "ssd1318", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  625. "", /* is_generate_u8g2_class= */ 1,
  626. {
  627. { "128x96" },
  628. { "128x96_xcp" }, // with external charge pump
  629. { NULL }
  630. }
  631. },
  632. {
  633. "ssd1325", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  634. "", /* is_generate_u8g2_class= */ 1,
  635. {
  636. { "nhd_128x64" },
  637. { NULL }
  638. }
  639. },
  640. {
  641. "ssd1325", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  642. "", /* is_generate_u8g2_class= */ 1,
  643. {
  644. { "nhd_128x64" },
  645. { NULL }
  646. }
  647. },
  648. {
  649. "ssd0323", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  650. "", /* is_generate_u8g2_class= */ 1,
  651. {
  652. { "os128064" },
  653. { NULL }
  654. }
  655. },
  656. {
  657. "ssd0323", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  658. "", /* is_generate_u8g2_class= */ 1,
  659. {
  660. { "os128064" },
  661. { NULL }
  662. }
  663. },
  664. {
  665. "ssd1326", 32, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  666. "", /* is_generate_u8g2_class= */ 1,
  667. {
  668. { "er_256x32" },
  669. { NULL }
  670. }
  671. },
  672. {
  673. "ssd1326", 32, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  674. "", /* is_generate_u8g2_class= */ 1,
  675. {
  676. { "er_256x32" },
  677. { NULL }
  678. }
  679. },
  680. {
  681. "ssd1327", 12, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  682. "", /* is_generate_u8g2_class= */ 1,
  683. {
  684. { "ws_96x64" },
  685. { NULL }
  686. }
  687. },
  688. {
  689. "ssd1327", 12, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  690. "", /* is_generate_u8g2_class= */ 1,
  691. {
  692. { "ws_96x64" },
  693. { NULL }
  694. }
  695. },
  696. {
  697. "ssd1327", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  698. "", /* is_generate_u8g2_class= */ 1,
  699. {
  700. { "seeed_96x96" },
  701. { NULL }
  702. }
  703. },
  704. {
  705. "ssd1327", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  706. "", /* is_generate_u8g2_class= */ 1,
  707. {
  708. { "seeed_96x96" },
  709. { NULL }
  710. }
  711. },
  712. {
  713. "ssd1327", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  714. "", /* is_generate_u8g2_class= */ 1,
  715. {
  716. { "ea_w128128" },
  717. { "midas_128x128" },
  718. { "zjy_128x128" }, /* issue 1960 */
  719. { "ws_128x128" },
  720. { NULL }
  721. }
  722. },
  723. {
  724. "ssd1327", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  725. "", /* is_generate_u8g2_class= */ 1,
  726. {
  727. { "ea_w128128" },
  728. { "midas_128x128" },
  729. { "zjy_128x128" }, /* issue 2407 */
  730. { "ws_128x128" },
  731. { NULL }
  732. }
  733. },
  734. {
  735. "ssd1327", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  736. "", /* is_generate_u8g2_class= */ 1,
  737. {
  738. { "visionox_128x96" },
  739. { NULL }
  740. }
  741. },
  742. {
  743. "ssd1327", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  744. "", /* is_generate_u8g2_class= */ 1,
  745. {
  746. { "visionox_128x96" },
  747. { NULL }
  748. }
  749. },
  750. {
  751. "ssd1329", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  752. "", /* is_generate_u8g2_class= */ 1,
  753. {
  754. { "128x96_noname" },
  755. { NULL }
  756. }
  757. },
  758. {
  759. "ssd1329", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  760. "", /* is_generate_u8g2_class= */ 1,
  761. {
  762. { "96x96_noname" },
  763. { NULL }
  764. }
  765. },
  766. {
  767. "ld7032", 8, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI,
  768. "", /* is_generate_u8g2_class= */ 1,
  769. {
  770. { "60x32" },
  771. { "60x32_alt" },
  772. { NULL }
  773. }
  774. },
  775. {
  776. "ld7032", 8, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_ld7032_i2c", "i2c", COM_I2C,
  777. "", /* is_generate_u8g2_class= */ 1,
  778. {
  779. { "60x32" },
  780. { "60x32_alt" },
  781. { NULL }
  782. }
  783. },
  784. {
  785. "ld7032", 16, 5, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI,
  786. "", /* is_generate_u8g2_class= */ 1,
  787. {
  788. { "128x36" },
  789. { NULL }
  790. }
  791. },
  792. {
  793. "ld7032", 16, 5, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_ld7032_i2c", "i2c", COM_I2C,
  794. "", /* is_generate_u8g2_class= */ 1,
  795. {
  796. { "128x36" },
  797. { NULL }
  798. }
  799. },
  800. {
  801. "st7920", 32, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "p", COM_8080,
  802. "", /* is_generate_u8g2_class= */ 1,
  803. {
  804. { "256x32" },
  805. { NULL }
  806. }
  807. },
  808. {
  809. "st7920", 32, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_6800,
  810. "", /* is_generate_u8g2_class= */ 1,
  811. {
  812. { "256x32" },
  813. { NULL }
  814. }
  815. },
  816. {
  817. "st7920", 32, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_st7920_spi", "s", COM_ST7920SPI,
  818. "", /* is_generate_u8g2_class= */ 1,
  819. {
  820. { "256x32" },
  821. { NULL }
  822. }
  823. },
  824. {
  825. "st7920", 18, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "p", COM_8080,
  826. "", /* is_generate_u8g2_class= */ 1,
  827. {
  828. { "144x32" },
  829. { NULL }
  830. }
  831. },
  832. {
  833. "st7920", 18, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_6800,
  834. "", /* is_generate_u8g2_class= */ 1,
  835. {
  836. { "144x32" },
  837. { NULL }
  838. }
  839. },
  840. {
  841. "st7920", 18, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_st7920_spi", "s", COM_ST7920SPI,
  842. "", /* is_generate_u8g2_class= */ 1,
  843. {
  844. { "144x32" },
  845. { NULL }
  846. }
  847. },
  848. {
  849. "st7920", 16, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "p", COM_8080,
  850. "", /* is_generate_u8g2_class= */ 1,
  851. {
  852. { "128x32" },
  853. { NULL }
  854. }
  855. },
  856. {
  857. "st7920", 16, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_6800,
  858. "", /* is_generate_u8g2_class= */ 1,
  859. {
  860. { "128x32" },
  861. { NULL }
  862. }
  863. },
  864. {
  865. "st7920", 16, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_st7920_spi", "s", COM_ST7920SPI,
  866. "", /* is_generate_u8g2_class= */ 1,
  867. {
  868. { "128x32" },
  869. { NULL }
  870. }
  871. },
  872. {
  873. "st7920", 20, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "p", COM_8080,
  874. "", /* is_generate_u8g2_class= */ 1,
  875. {
  876. { "160x32" },
  877. { NULL }
  878. }
  879. },
  880. {
  881. "st7920", 20, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_6800,
  882. "", /* is_generate_u8g2_class= */ 1,
  883. {
  884. { "160x32" },
  885. { NULL }
  886. }
  887. },
  888. {
  889. "st7920", 20, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_st7920_spi", "s", COM_ST7920SPI,
  890. "", /* is_generate_u8g2_class= */ 1,
  891. {
  892. { "160x32" },
  893. { NULL }
  894. }
  895. },
  896. {
  897. "st7920", 24, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "p", COM_8080,
  898. "", /* is_generate_u8g2_class= */ 1,
  899. {
  900. { "192x32" },
  901. { NULL }
  902. }
  903. },
  904. {
  905. "st7920", 24, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_6800,
  906. "", /* is_generate_u8g2_class= */ 1,
  907. {
  908. { "192x32" },
  909. { NULL }
  910. }
  911. },
  912. {
  913. "st7920", 24, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_st7920_spi", "s", COM_ST7920SPI,
  914. "", /* is_generate_u8g2_class= */ 1,
  915. {
  916. { "192x32" },
  917. { NULL }
  918. }
  919. },
  920. {
  921. "st7920", 16, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "p", COM_8080,
  922. "", /* is_generate_u8g2_class= */ 1,
  923. {
  924. { "128x64" },
  925. { NULL }
  926. }
  927. },
  928. {
  929. "st7920", 16, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_6800,
  930. "", /* is_generate_u8g2_class= */ 1,
  931. {
  932. { "128x64" },
  933. { NULL }
  934. }
  935. },
  936. {
  937. "st7920", 16, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_st7920_spi", "s", COM_ST7920SPI,
  938. "", /* is_generate_u8g2_class= */ 1,
  939. {
  940. { "128x64" },
  941. { NULL }
  942. }
  943. },
  944. {
  945. "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 */
  946. "", /* is_generate_u8g2_class= */ 1,
  947. {
  948. { "128x128" },
  949. { NULL }
  950. }
  951. },
  952. {
  953. "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 */
  954. "", /* is_generate_u8g2_class= */ 1,
  955. {
  956. { "400x240" }, // SPI Mode 2
  957. { "m0_400x240" }, // SPI Mode 0
  958. { NULL }
  959. }
  960. },
  961. {
  962. "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 */
  963. "", /* is_generate_u8g2_class= */ 1,
  964. {
  965. { "144x168" },
  966. { NULL }
  967. }
  968. },
  969. {
  970. "ls011b7dh03", 20, 9, "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 */
  971. "", /* is_generate_u8g2_class= */ 1,
  972. {
  973. { "160x68" },
  974. { NULL }
  975. }
  976. },
  977. {
  978. "uc1701", 13, 8, "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. { "ea_dogs102" },
  982. { NULL }
  983. }
  984. },
  985. {
  986. "uc1701", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  987. "", /* is_generate_u8g2_class= */ 1,
  988. {
  989. { "mini12864" },
  990. { NULL }
  991. }
  992. },
  993. {
  994. "pcd8544", 11, 6, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
  995. "No HW flip", /* is_generate_u8g2_class= */ 1,
  996. {
  997. { "84x48" },
  998. { NULL }
  999. }
  1000. },
  1001. {
  1002. "pcf8812", 12, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
  1003. "No HW flip", /* is_generate_u8g2_class= */ 1,
  1004. {
  1005. { "96x65" },
  1006. { NULL }
  1007. }
  1008. },
  1009. {
  1010. "pcf8812", 13, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
  1011. "No HW flip", /* is_generate_u8g2_class= */ 1,
  1012. {
  1013. { "101x64" },
  1014. { NULL }
  1015. }
  1016. },
  1017. {
  1018. "hx1230", 12, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
  1019. "No HW flip", /* is_generate_u8g2_class= */ 1,
  1020. {
  1021. { "96x68" },
  1022. { NULL }
  1023. }
  1024. },
  1025. {
  1026. "uc1604", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1027. "", /* is_generate_u8g2_class= */ 1,
  1028. {
  1029. { "jlx19264" },
  1030. { NULL }
  1031. }
  1032. },
  1033. {
  1034. "uc1604", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1035. "", /* is_generate_u8g2_class= */ 1,
  1036. {
  1037. { "jlx19264" },
  1038. { NULL }
  1039. }
  1040. },
  1041. {
  1042. "uc1604", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1043. "", /* is_generate_u8g2_class= */ 1,
  1044. {
  1045. { "jlx12864" },
  1046. { NULL }
  1047. }
  1048. },
  1049. {
  1050. "uc1604", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1051. "", /* is_generate_u8g2_class= */ 1,
  1052. {
  1053. { "jlx12864" },
  1054. { NULL }
  1055. }
  1056. },
  1057. {
  1058. "uc1608", 30, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1059. "", /* is_generate_u8g2_class= */ 1,
  1060. {
  1061. { "erc24064" },
  1062. { "dem240064" },
  1063. { NULL }
  1064. }
  1065. },
  1066. {
  1067. "uc1608", 30, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1068. "", /* is_generate_u8g2_class= */ 1,
  1069. {
  1070. { "erc24064" },
  1071. { "dem240064" },
  1072. { NULL }
  1073. }
  1074. },
  1075. {
  1076. "uc1608", 30, 15, "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. { "erc240120" },
  1080. { NULL }
  1081. }
  1082. },
  1083. {
  1084. "uc1608", 30, 15, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1085. "", /* is_generate_u8g2_class= */ 1,
  1086. {
  1087. { "erc240120" },
  1088. { NULL }
  1089. }
  1090. },
  1091. {
  1092. "uc1608", 30, 16, "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. { "240x128" },
  1096. { NULL }
  1097. }
  1098. },
  1099. {
  1100. "uc1608", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1101. "", /* is_generate_u8g2_class= */ 1,
  1102. {
  1103. { "240x128" },
  1104. { NULL }
  1105. }
  1106. },
  1107. {
  1108. "uc1609", 24, 8, "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. { "slg19264" },
  1112. { NULL }
  1113. }
  1114. },
  1115. {
  1116. "uc1609", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1117. "", /* is_generate_u8g2_class= */ 1,
  1118. {
  1119. { "slg19264" },
  1120. { NULL }
  1121. }
  1122. },
  1123. {
  1124. "uc1628", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  1125. "", /* is_generate_u8g2_class= */ 1,
  1126. {
  1127. { "128x64" },
  1128. { NULL }
  1129. }
  1130. },
  1131. {
  1132. "uc1628", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1133. "NOT TESTED, CAD not checked", /* is_generate_u8g2_class= */ 1,
  1134. {
  1135. { "128x64" },
  1136. { NULL }
  1137. }
  1138. },
  1139. {
  1140. "uc1628", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  1141. "", /* is_generate_u8g2_class= */ 1,
  1142. {
  1143. { "256x128" },
  1144. { NULL }
  1145. }
  1146. },
  1147. {
  1148. "uc1628", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1149. "NOT TESTED, CAD not checked", /* is_generate_u8g2_class= */ 1,
  1150. {
  1151. { "256x128" },
  1152. { NULL }
  1153. }
  1154. },
  1155. {
  1156. "uc1628", 32, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  1157. "", /* is_generate_u8g2_class= */ 1,
  1158. {
  1159. { "256x32" },
  1160. { NULL }
  1161. }
  1162. },
  1163. {
  1164. "uc1628", 32, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1165. "NOT TESTED, CAD not checked", /* is_generate_u8g2_class= */ 1,
  1166. {
  1167. { "256x32" },
  1168. { NULL }
  1169. }
  1170. },
  1171. {
  1172. "uc1638", 20, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1173. "", /* is_generate_u8g2_class= */ 1,
  1174. {
  1175. { "160x128" },
  1176. { NULL }
  1177. }
  1178. },
  1179. {
  1180. "uc1638", 24, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1181. "", /* is_generate_u8g2_class= */ 1,
  1182. {
  1183. { "192x96" },
  1184. { NULL }
  1185. }
  1186. },
  1187. {
  1188. "uc1638", 24, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc1638_i2c", "i2c", COM_I2C,
  1189. "", /* is_generate_u8g2_class= */ 1,
  1190. {
  1191. { "192x96" },
  1192. { NULL }
  1193. }
  1194. },
  1195. {
  1196. "uc1638", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1197. "", /* is_generate_u8g2_class= */ 1,
  1198. {
  1199. { "240x128" },
  1200. { NULL }
  1201. }
  1202. },
  1203. {
  1204. "uc1638", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc1638_i2c", "i2c", COM_I2C,
  1205. "", /* is_generate_u8g2_class= */ 1,
  1206. {
  1207. { "240x128" },
  1208. { NULL }
  1209. }
  1210. },
  1211. //{
  1212. /* this device requires cd=1 for arguments, not clear whether the u8x8_cad_uc16xx_i2c works */
  1213. //"uc1638", 20, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1214. //"", /* is_generate_u8g2_class= */ 1,
  1215. //{
  1216. // { "160x128" },
  1217. // { NULL }
  1218. //}
  1219. //},
  1220. {
  1221. "uc1610", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1222. "3W SPI not tested", /* is_generate_u8g2_class= */ 1,
  1223. {
  1224. { "ea_dogxl160" },
  1225. { NULL }
  1226. }
  1227. },
  1228. {
  1229. "uc1610", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1230. "3W SPI not tested, I2C not tested", /* is_generate_u8g2_class= */ 1,
  1231. {
  1232. { "ea_dogxl160" },
  1233. { NULL }
  1234. }
  1235. },
  1236. {
  1237. "uc1611", 30, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1238. "", /* is_generate_u8g2_class= */ 1,
  1239. {
  1240. { "ea_dogm240" },
  1241. { NULL }
  1242. }
  1243. },
  1244. {
  1245. "uc1611", 30, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1246. "", /* is_generate_u8g2_class= */ 1,
  1247. {
  1248. { "ea_dogm240" },
  1249. { NULL }
  1250. }
  1251. },
  1252. {
  1253. "uc1611", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1254. "", /* is_generate_u8g2_class= */ 1,
  1255. {
  1256. { "ea_dogxl240" },
  1257. { NULL }
  1258. }
  1259. },
  1260. {
  1261. "uc1611", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1262. "", /* is_generate_u8g2_class= */ 1,
  1263. {
  1264. { "ea_dogxl240" },
  1265. { NULL }
  1266. }
  1267. },
  1268. {
  1269. "uc1611", 30, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1270. "240x160, active high chip select", /* is_generate_u8g2_class= */ 1,
  1271. {
  1272. { "ew50850" }, /* 240x160 */
  1273. { NULL }
  1274. }
  1275. },
  1276. {
  1277. "uc1611", 30, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1278. "240x160, active high chip select", /* is_generate_u8g2_class= */ 1,
  1279. {
  1280. { "ew50850" }, /* 240x160 */
  1281. { NULL }
  1282. }
  1283. },
  1284. {
  1285. "uc1611", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1286. "use CS0 as chips select", /* is_generate_u8g2_class= */ 1,
  1287. {
  1288. { "cg160160" },
  1289. { NULL }
  1290. }
  1291. },
  1292. {
  1293. "uc1611", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1294. "", /* is_generate_u8g2_class= */ 1,
  1295. {
  1296. { "cg160160" },
  1297. { NULL }
  1298. }
  1299. },
  1300. {
  1301. "uc1611", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1302. "", /* is_generate_u8g2_class= */ 1,
  1303. {
  1304. { "ids4073" },
  1305. { NULL }
  1306. }
  1307. },
  1308. {
  1309. "uc1611", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1310. "", /* is_generate_u8g2_class= */ 1,
  1311. {
  1312. { "ids4073" },
  1313. { NULL }
  1314. }
  1315. },
  1316. {
  1317. "uc1698", 20, 20, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1318. "", /* is_generate_u8g2_class= */ 1,
  1319. {
  1320. { "160x160" },
  1321. { NULL }
  1322. }
  1323. },
  1324. {
  1325. "st7511", 40, 30, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1326. "", /* is_generate_u8g2_class= */ 1,
  1327. {
  1328. { "avd_320x240" }, /* 320x240 */
  1329. { NULL }
  1330. }
  1331. },
  1332. {
  1333. "st7511", 80, 40, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1334. "", /* is_generate_u8g2_class= */ 1,
  1335. {
  1336. { "640x320" },
  1337. { NULL }
  1338. }
  1339. },
  1340. {
  1341. "st7528", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1342. "", /* is_generate_u8g2_class= */ 1,
  1343. {
  1344. { "nhd_c160100" },
  1345. { NULL }
  1346. }
  1347. },
  1348. {
  1349. "st7528", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  1350. "", /* is_generate_u8g2_class= */ 1,
  1351. {
  1352. { "nhd_c160100" },
  1353. { NULL }
  1354. }
  1355. },
  1356. {
  1357. "st7528", 20, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1358. "", /* is_generate_u8g2_class= */ 1,
  1359. {
  1360. { "erc16064" },
  1361. { NULL }
  1362. }
  1363. },
  1364. {
  1365. "st7528", 20, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  1366. "", /* is_generate_u8g2_class= */ 1,
  1367. {
  1368. { "erc16064" },
  1369. { NULL }
  1370. }
  1371. },
  1372. {
  1373. "uc1617", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
  1374. "", /* is_generate_u8g2_class= */ 1,
  1375. {
  1376. { "jlx128128" },
  1377. { NULL }
  1378. }
  1379. },
  1380. {
  1381. "uc1617", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1382. "", /* is_generate_u8g2_class= */ 1,
  1383. {
  1384. { "jlx128128" },
  1385. { NULL }
  1386. }
  1387. },
  1388. {
  1389. "st7565", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1390. "", /* is_generate_u8g2_class= */ 1,
  1391. {
  1392. { "ea_dogm128" },
  1393. { "lm6063" }, /* https://github.com/olikraus/u8g2/issues/893 */
  1394. { "64128n" },
  1395. { "zolen_128x64" },
  1396. { "lm6059" },
  1397. { "ks0713" }, /* KS0713 chip, which seems to be almost compatible to ST7565 */
  1398. { "lx12864" },
  1399. { "erc12864" },
  1400. { "erc12864_alt" }, /* issue 790 */
  1401. { "nhd_c12864" },
  1402. { "jlx12864" },
  1403. { NULL }
  1404. },
  1405. },
  1406. {
  1407. "st7565", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1408. "", /* is_generate_u8g2_class= */ 1,
  1409. {
  1410. { "nhd_c12832" },
  1411. { NULL }
  1412. }
  1413. },
  1414. {
  1415. "st7539", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1416. "", /* is_generate_u8g2_class= */ 1,
  1417. {
  1418. { "192x64" },
  1419. { NULL }
  1420. }
  1421. },
  1422. {
  1423. "st7539", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  1424. "", /* is_generate_u8g2_class= */ 1,
  1425. {
  1426. { "192x64" },
  1427. { NULL }
  1428. }
  1429. },
  1430. {
  1431. "uc1601", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1432. "", /* is_generate_u8g2_class= */ 1,
  1433. {
  1434. { "128x32" },
  1435. { NULL }
  1436. }
  1437. },
  1438. {
  1439. "uc1601", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1440. "", /* is_generate_u8g2_class= */ 1,
  1441. {
  1442. { "128x32" },
  1443. { NULL }
  1444. }
  1445. },
  1446. {
  1447. "uc1601", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1448. "", /* is_generate_u8g2_class= */ 1,
  1449. {
  1450. { "128x64" },
  1451. { NULL }
  1452. }
  1453. },
  1454. {
  1455. "uc1601", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
  1456. "", /* is_generate_u8g2_class= */ 1,
  1457. {
  1458. { "128x64" },
  1459. { NULL }
  1460. }
  1461. },
  1462. {
  1463. "st7565", 17, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1464. "", /* is_generate_u8g2_class= */ 1,
  1465. {
  1466. { "ea_dogm132" },
  1467. { NULL }
  1468. }
  1469. },
  1470. /* https://www.crystalfontz.com/controllers/Sitronix/ST7567A/ supports I2C */
  1471. {
  1472. "st7567", 17, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1473. "", /* is_generate_u8g2_class= */ 1,
  1474. {
  1475. { "pi_132x64" },
  1476. { NULL }
  1477. }
  1478. },
  1479. {
  1480. "st7567", 17, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  1481. "", /* is_generate_u8g2_class= */ 1,
  1482. {
  1483. { "pi_132x64" },
  1484. { NULL }
  1485. }
  1486. },
  1487. {
  1488. "st7567", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1489. "", /* is_generate_u8g2_class= */ 1,
  1490. {
  1491. { "jlx12864" },
  1492. { "enh_dg128064" },
  1493. { "enh_dg128064i" },
  1494. { "os12864" },
  1495. { NULL }
  1496. }
  1497. },
  1498. {
  1499. "st7567", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  1500. "", /* is_generate_u8g2_class= */ 1,
  1501. {
  1502. { "jlx12864" },
  1503. { "enh_dg128064" },
  1504. { "enh_dg128064i" },
  1505. { "os12864" },
  1506. { NULL }
  1507. }
  1508. },
  1509. {
  1510. "st7567", 17, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1511. "", /* is_generate_u8g2_class= */ 1,
  1512. {
  1513. { "erc13232" },
  1514. { NULL }
  1515. }
  1516. },
  1517. {
  1518. "st7567", 17, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  1519. "", /* is_generate_u8g2_class= */ 1,
  1520. {
  1521. { "erc13232" },
  1522. { NULL }
  1523. }
  1524. },
  1525. {
  1526. "st7567", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1527. "", /* is_generate_u8g2_class= */ 1,
  1528. {
  1529. { "erc12864" },
  1530. { NULL }
  1531. }
  1532. },
  1533. {
  1534. "st7567", 12, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1535. "", /* is_generate_u8g2_class= */ 1,
  1536. {
  1537. { "96x65" },
  1538. { NULL }
  1539. }
  1540. },
  1541. {
  1542. "st7567", 12, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  1543. "", /* is_generate_u8g2_class= */ 1,
  1544. {
  1545. { "96x65" },
  1546. { NULL }
  1547. }
  1548. },
  1549. {
  1550. "st7567", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1551. "", /* is_generate_u8g2_class= */ 1,
  1552. {
  1553. { "122x32" },
  1554. { NULL }
  1555. }
  1556. },
  1557. {
  1558. "st7567", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  1559. "", /* is_generate_u8g2_class= */ 1,
  1560. {
  1561. { "122x32" },
  1562. { NULL }
  1563. }
  1564. },
  1565. {
  1566. "st7567", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1567. "", /* is_generate_u8g2_class= */ 1,
  1568. {
  1569. { "64x32" },
  1570. { "hem6432" },
  1571. { NULL }
  1572. }
  1573. },
  1574. {
  1575. "st7567", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  1576. "", /* is_generate_u8g2_class= */ 1,
  1577. {
  1578. { "64x32" },
  1579. { "hem6432" },
  1580. { NULL }
  1581. }
  1582. },
  1583. {
  1584. "st7567", 17, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1585. "", /* is_generate_u8g2_class= */ 1,
  1586. {
  1587. { "lw12832" },
  1588. { "yxd12832" },
  1589. { NULL }
  1590. }
  1591. },
  1592. {
  1593. "st7567", 17, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  1594. "", /* is_generate_u8g2_class= */ 1,
  1595. {
  1596. { "lw12832" },
  1597. { NULL }
  1598. }
  1599. },
  1600. {
  1601. "st7571", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1602. "", /* is_generate_u8g2_class= */ 1,
  1603. {
  1604. { "128x128" },
  1605. { NULL }
  1606. }
  1607. },
  1608. {
  1609. "st7571", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  1610. "", /* is_generate_u8g2_class= */ 1,
  1611. {
  1612. { "128x128" },
  1613. { NULL }
  1614. }
  1615. },
  1616. {
  1617. "st7571", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1618. "", /* is_generate_u8g2_class= */ 1,
  1619. {
  1620. { "128x96" },
  1621. { "g12896" },
  1622. { NULL }
  1623. }
  1624. },
  1625. {
  1626. "st7571", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  1627. "", /* is_generate_u8g2_class= */ 1,
  1628. {
  1629. { "128x96" },
  1630. { "g12896" },
  1631. { NULL }
  1632. }
  1633. },
  1634. {
  1635. "st7302", 16, 32, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1636. "", /* is_generate_u8g2_class= */ 1,
  1637. {
  1638. { "122X250" },
  1639. { NULL }
  1640. },
  1641. },
  1642. {
  1643. "st7305", 16, 32, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1644. "", /* is_generate_u8g2_class= */ 1,
  1645. {
  1646. { "122X250" },
  1647. { NULL }
  1648. },
  1649. },
  1650. {
  1651. /* the st7305 requires 12pixel blocks --> 204x200, but u8x8 requires tiles, so we have 208x200 (26x25) */
  1652. "st7305", 26, 25, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1653. "", /* is_generate_u8g2_class= */ 1,
  1654. {
  1655. { "200X200" },
  1656. { NULL }
  1657. },
  1658. },
  1659. {
  1660. "st7305", 21, 48, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1661. "", /* is_generate_u8g2_class= */ 1,
  1662. {
  1663. { "168X384" }, /* https://github.com/olikraus/u8g2/issues/2702 */
  1664. { NULL }
  1665. },
  1666. },
  1667. {
  1668. "st7586s", 48, 17, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI,
  1669. "", /* is_generate_u8g2_class= */ 1,
  1670. {
  1671. { "s028hn118a" },
  1672. { NULL }
  1673. },
  1674. },
  1675. {
  1676. "st7586s", 48, 20, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI,
  1677. "", /* is_generate_u8g2_class= */ 1,
  1678. {
  1679. { "jlx384160" },
  1680. { NULL }
  1681. },
  1682. },
  1683. {
  1684. "st7586s", 30, 20, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1685. "", /* is_generate_u8g2_class= */ 1,
  1686. {
  1687. { "erc240160" },
  1688. { "ymc240160" },
  1689. { NULL }
  1690. },
  1691. },
  1692. {
  1693. /* tile width is little bit larger, 42*8=336 so that it can be devided by 3 and 8 */
  1694. "st7586s", 42, 20, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1695. "", /* is_generate_u8g2_class= */ 1,
  1696. {
  1697. { "jlx320160" },
  1698. { NULL }
  1699. },
  1700. },
  1701. {
  1702. "st7586s", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1703. "", /* is_generate_u8g2_class= */ 1,
  1704. {
  1705. { "md240128" },
  1706. { NULL }
  1707. },
  1708. },
  1709. {
  1710. "st7588", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1711. "", /* is_generate_u8g2_class= */ 1,
  1712. {
  1713. { "jlx12864" },
  1714. { NULL }
  1715. },
  1716. },
  1717. { /* the ST7588 has the same I2C protocol as the SSD13xx */
  1718. "st7588", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
  1719. "", /* is_generate_u8g2_class= */ 1,
  1720. {
  1721. { "jlx12864" },
  1722. { NULL }
  1723. }
  1724. },
  1725. {
  1726. "st75160", 20, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1727. "", /* is_generate_u8g2_class= */ 1,
  1728. {
  1729. { "jm16096" },
  1730. { NULL }
  1731. },
  1732. },
  1733. /* takeover i2c from ST75256 (not sure whether this is correct: */
  1734. /* the ST75256 has the same I2C protocol as the SSD13xx, BUT: for arguments have the data bit set!!!! */
  1735. /* this means, we need to implement a u8x8_cad_ssd13xx_i2c procedure with cad 011 functionality */
  1736. /* done: u8x8_cad_st75256_i2c */
  1737. {
  1738. "st75160", 20, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1739. "", /* is_generate_u8g2_class= */ 1,
  1740. {
  1741. { "jm16096" },
  1742. { NULL }
  1743. }
  1744. },
  1745. {
  1746. "st75161", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1747. "", /* is_generate_u8g2_class= */ 1,
  1748. {
  1749. { "jlx160160" },
  1750. { NULL }
  1751. },
  1752. },
  1753. /* takeover i2c from ST75256 (not sure whether this is correct */
  1754. {
  1755. "st75161", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1756. "", /* is_generate_u8g2_class= */ 1,
  1757. {
  1758. { "jlx160160" },
  1759. { NULL }
  1760. }
  1761. },
  1762. {
  1763. "st75256", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1764. "", /* is_generate_u8g2_class= */ 1,
  1765. {
  1766. { "jlx256128" },
  1767. { "wo256x128" },
  1768. { NULL }
  1769. },
  1770. },
  1771. /* the ST75256 has the same I2C protocol as the SSD13xx, BUT: for arguments have the data bit set!!!! */
  1772. /* this means, we need to implement a u8x8_cad_ssd13xx_i2c procedure with cad 011 functionality */
  1773. /* done: u8x8_cad_st75256_i2c */
  1774. {
  1775. "st75256", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1776. "", /* is_generate_u8g2_class= */ 1,
  1777. {
  1778. { "jlx256128" },
  1779. { "wo256x128" },
  1780. { NULL }
  1781. }
  1782. },
  1783. {
  1784. "st75256", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1785. "", /* is_generate_u8g2_class= */ 1,
  1786. {
  1787. { "128x128" }, /* https://github.com/olikraus/u8g2/issues/2702 */
  1788. { NULL }
  1789. },
  1790. },
  1791. {
  1792. "st75256", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1793. "", /* is_generate_u8g2_class= */ 1,
  1794. {
  1795. { "128x128" }, /* https://github.com/olikraus/u8g2/issues/2702 */
  1796. { NULL }
  1797. }
  1798. },
  1799. {
  1800. "st75256", 32, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1801. "", /* is_generate_u8g2_class= */ 1,
  1802. {
  1803. { "jlx256160" },
  1804. { "jlx256160m" },
  1805. { "jlx256160_alt" },
  1806. { NULL }
  1807. },
  1808. },
  1809. /* the ST75256 has the same I2C protocol as the SSD13xx, BUT: for arguments have the data bit set!!!! */
  1810. /* this means, we need to implement a u8x8_cad_ssd13xx_i2c procedure with cad 011 functionality */
  1811. /* done: u8x8_cad_st75256_i2c */
  1812. {
  1813. "st75256", 32, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1814. "", /* is_generate_u8g2_class= */ 1,
  1815. {
  1816. { "jlx256160" },
  1817. { "jlx256160m" },
  1818. { "jlx256160_alt" },
  1819. { NULL }
  1820. }
  1821. },
  1822. {
  1823. "st75256", 30, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1824. "", /* is_generate_u8g2_class= */ 1,
  1825. {
  1826. { "jlx240160" },
  1827. { NULL }
  1828. },
  1829. },
  1830. {
  1831. "st75256", 30, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1832. "", /* is_generate_u8g2_class= */ 1,
  1833. {
  1834. { "jlx240160" },
  1835. { NULL }
  1836. }
  1837. },
  1838. {
  1839. "st75256", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1840. "", /* is_generate_u8g2_class= */ 1,
  1841. {
  1842. { "jlx25664" },
  1843. { NULL }
  1844. },
  1845. },
  1846. {
  1847. "st75256", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1848. "", /* is_generate_u8g2_class= */ 1,
  1849. {
  1850. { "jlx25664" },
  1851. { NULL }
  1852. }
  1853. },
  1854. {
  1855. "st75256", 22, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1856. "", /* is_generate_u8g2_class= */ 1,
  1857. {
  1858. { "jlx172104" },
  1859. { NULL }
  1860. },
  1861. },
  1862. {
  1863. "st75256", 22, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1864. "", /* is_generate_u8g2_class= */ 1,
  1865. {
  1866. { "jlx172104" },
  1867. { NULL }
  1868. },
  1869. },
  1870. {
  1871. "st75256", 24, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1872. "", /* is_generate_u8g2_class= */ 1,
  1873. {
  1874. { "jlx19296" },
  1875. { NULL }
  1876. },
  1877. },
  1878. {
  1879. "st75256", 24, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1880. "", /* is_generate_u8g2_class= */ 1,
  1881. {
  1882. { "jlx19296" },
  1883. { NULL }
  1884. },
  1885. },
  1886. {
  1887. "st75256", 20, 10, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1888. "", /* is_generate_u8g2_class= */ 1,
  1889. {
  1890. { "jlx16080" },
  1891. { NULL }
  1892. },
  1893. },
  1894. {
  1895. "st75256", 20, 10, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1896. "", /* is_generate_u8g2_class= */ 1,
  1897. {
  1898. { "jlx16080" },
  1899. { NULL }
  1900. },
  1901. },
  1902. {
  1903. "st75320", 40, 30, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  1904. "", /* is_generate_u8g2_class= */ 1,
  1905. {
  1906. { "jlx320240" },
  1907. { NULL }
  1908. },
  1909. },
  1910. {
  1911. "st75320", 40, 30, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
  1912. "", /* is_generate_u8g2_class= */ 1,
  1913. {
  1914. { "jlx320240" },
  1915. { NULL }
  1916. },
  1917. },
  1918. {
  1919. "nt7534", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1920. "", /* is_generate_u8g2_class= */ 1,
  1921. {
  1922. { "tg12864r" },
  1923. { NULL }
  1924. }
  1925. },
  1926. {
  1927. "ist3020", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1928. "", /* is_generate_u8g2_class= */ 1,
  1929. {
  1930. { "erc19264" },
  1931. { NULL }
  1932. }
  1933. },
  1934. {
  1935. "ist3088", 40, 30, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  1936. "not tested", /* is_generate_u8g2_class= */ 1,
  1937. {
  1938. { "320x240" },
  1939. { NULL }
  1940. }
  1941. },
  1942. {
  1943. "ist7920", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
  1944. "", /* is_generate_u8g2_class= */ 1,
  1945. {
  1946. { "128x128" },
  1947. { NULL }
  1948. }
  1949. },
  1950. {
  1951. "sbn1661", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_SED1520,
  1952. "", /* is_generate_u8g2_class= */ 1,
  1953. {
  1954. { "122x32" },
  1955. { NULL }
  1956. },
  1957. },
  1958. {
  1959. "sed1520", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_SED1520,
  1960. "", /* is_generate_u8g2_class= */ 1,
  1961. {
  1962. { "122x32" },
  1963. { NULL }
  1964. },
  1965. },
  1966. {
  1967. "ks0108", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_KS0108,
  1968. "", /* is_generate_u8g2_class= */ 1,
  1969. {
  1970. { "128x64" },
  1971. { NULL }
  1972. },
  1973. },
  1974. {
  1975. "ks0108", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_KS0108,
  1976. "", /* is_generate_u8g2_class= */ 1,
  1977. {
  1978. { "erm19264" },
  1979. { NULL }
  1980. },
  1981. },
  1982. {
  1983. "t7932", 19, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_KS0108,
  1984. "", /* is_generate_u8g2_class= */ 1,
  1985. {
  1986. { "150x32" }, /* compatible with hd44102 */
  1987. { NULL }
  1988. },
  1989. },
  1990. {
  1991. "hd44102", 13, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_KS0108,
  1992. "", /* is_generate_u8g2_class= */ 1,
  1993. {
  1994. { "100x64" }, /* compatible with t7932 */
  1995. { NULL }
  1996. },
  1997. },
  1998. {
  1999. "lc7981", 20, 10, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
  2000. "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
  2001. {
  2002. { "160x80" },
  2003. { NULL }
  2004. }
  2005. },
  2006. {
  2007. "lc7981", 20, 20, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
  2008. "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
  2009. {
  2010. { "160x160" },
  2011. { NULL }
  2012. }
  2013. },
  2014. {
  2015. "lc7981", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
  2016. "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
  2017. {
  2018. { "240x128" },
  2019. { NULL }
  2020. }
  2021. },
  2022. {
  2023. "lc7981", 30, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
  2024. "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
  2025. {
  2026. { "240x64" },
  2027. { NULL }
  2028. }
  2029. },
  2030. {
  2031. "lc7981", 16, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
  2032. "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
  2033. {
  2034. { "128x128" },
  2035. { NULL }
  2036. }
  2037. },
  2038. {
  2039. "t6963", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
  2040. "", /* is_generate_u8g2_class= */ 1,
  2041. {
  2042. { "240x128" },
  2043. { NULL }
  2044. }
  2045. },
  2046. {
  2047. "t6963", 30, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
  2048. "", /* is_generate_u8g2_class= */ 1,
  2049. {
  2050. { "240x64" },
  2051. { NULL }
  2052. }
  2053. },
  2054. {
  2055. "t6963", 32, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
  2056. "Not tested", /* is_generate_u8g2_class= */ 1,
  2057. {
  2058. { "256x64" },
  2059. { NULL }
  2060. }
  2061. },
  2062. {
  2063. "t6963", 16, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
  2064. "Not tested", /* is_generate_u8g2_class= */ 1,
  2065. {
  2066. { "128x64" },
  2067. { "128x64_alt" },
  2068. { NULL }
  2069. }
  2070. },
  2071. {
  2072. "t6963", 20, 10, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
  2073. "Not tested", /* is_generate_u8g2_class= */ 1,
  2074. {
  2075. { "160x80" },
  2076. { NULL }
  2077. }
  2078. },
  2079. {
  2080. "t6963", 16, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
  2081. "Not tested", /* is_generate_u8g2_class= */ 1,
  2082. {
  2083. { "128x128" },
  2084. { NULL }
  2085. }
  2086. },
  2087. {
  2088. "t6963", 16, 20, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
  2089. "Not tested", /* is_generate_u8g2_class= */ 1,
  2090. {
  2091. { "128x160" },
  2092. { NULL }
  2093. }
  2094. },
  2095. {
  2096. "ssd1320", 20, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  2097. "", /* is_generate_u8g2_class= */ 1,
  2098. {
  2099. { "160x32" },
  2100. { NULL }
  2101. }
  2102. },
  2103. {
  2104. "ssd1320", 16, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  2105. "", /* is_generate_u8g2_class= */ 1,
  2106. {
  2107. { "128x72" },
  2108. { NULL }
  2109. }
  2110. },
  2111. {
  2112. "ssd1320", 20, 17, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  2113. "", /* is_generate_u8g2_class= */ 1,
  2114. {
  2115. { "160x132" },
  2116. { NULL }
  2117. }
  2118. },
  2119. {
  2120. "ssd1320", 20, 10, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  2121. "", /* is_generate_u8g2_class= */ 1,
  2122. {
  2123. { "160x80" },
  2124. { NULL }
  2125. }
  2126. },
  2127. {
  2128. "ssd1320", 20, 10, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  2129. "", /* is_generate_u8g2_class= */ 1,
  2130. {
  2131. { "160x80" },
  2132. { NULL }
  2133. }
  2134. },
  2135. {
  2136. "ssd1322", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  2137. "", /* is_generate_u8g2_class= */ 1,
  2138. {
  2139. { "240x128" },
  2140. { "topwin_240x128" },
  2141. { NULL }
  2142. }
  2143. },
  2144. {
  2145. "ssd1322", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  2146. "Requires U8G2_16BIT (see u8g2.h)", /* is_generate_u8g2_class= */ 1,
  2147. {
  2148. { "nhd_256x64" },
  2149. { "zjy_256x64" },
  2150. { NULL }
  2151. }
  2152. },
  2153. {
  2154. "ssd1322", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  2155. "", /* is_generate_u8g2_class= */ 1,
  2156. {
  2157. { "nhd_128x64" },
  2158. { NULL }
  2159. }
  2160. },
  2161. {
  2162. "ssd1362", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  2163. "Requires U8G2_16BIT (see u8g2.h)", /* is_generate_u8g2_class= */ 1,
  2164. {
  2165. { "256x64" },
  2166. { NULL }
  2167. }
  2168. },
  2169. {
  2170. "ssd1362", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C, // not tested
  2171. "", /* is_generate_u8g2_class= */ 1,
  2172. {
  2173. { "256x64" },
  2174. { NULL }
  2175. }
  2176. },
  2177. {
  2178. "ssd1362", 26, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  2179. "Requires U8G2_16BIT (see u8g2.h)", /* is_generate_u8g2_class= */ 1,
  2180. {
  2181. { "206x36" },
  2182. { NULL }
  2183. }
  2184. },
  2185. {
  2186. "ssd1362", 26, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C, // not tested
  2187. "", /* is_generate_u8g2_class= */ 1,
  2188. {
  2189. { "206x36" },
  2190. { NULL }
  2191. }
  2192. },
  2193. {
  2194. "ssd1363", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  2195. "Requires U8G2_16BIT (see u8g2.h)", /* is_generate_u8g2_class= */ 1,
  2196. {
  2197. { "256x128" },
  2198. { NULL }
  2199. }
  2200. },
  2201. {
  2202. "ssd1363", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011_ssd13xx_i2c", "i2c", COM_I2C, // not tested
  2203. "", /* is_generate_u8g2_class= */ 1,
  2204. {
  2205. { "256x128" },
  2206. { NULL }
  2207. }
  2208. },
  2209. {
  2210. "ssd1606", 22, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI,
  2211. "Partly supported by U8x8, no HW flip, no contrast setting", /* is_generate_u8g2_class= */ 1,
  2212. {
  2213. { "172x72" },
  2214. { NULL }
  2215. }
  2216. },
  2217. {
  2218. "ssd1607", 25, 25, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI,
  2219. "Partly supported by U8x8, no HW flip, no contrast setting, v2 includes an optimized LUT", /* is_generate_u8g2_class= */ 1,
  2220. {
  2221. { "200x200" },
  2222. { "gd_200x200" }, // GDEP015OC1
  2223. { "ws_200x200" }, // Waveshare issue #637
  2224. { NULL }
  2225. }
  2226. },
  2227. {
  2228. "il3820", 37, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI,
  2229. "Partly supported by U8x8, no HW flip, no contrast setting, V2 produces lesser screen-flicker", /* is_generate_u8g2_class= */ 1,
  2230. {
  2231. { "296x128" },
  2232. { "v2_296x128" },
  2233. { NULL }
  2234. }
  2235. },
  2236. {
  2237. "sed1330", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  2238. "Not tested, might work for RA8835 and SED1335 also", /* is_generate_u8g2_class= */ 1,
  2239. {
  2240. { "240x128" },
  2241. { NULL }
  2242. }
  2243. },
  2244. {
  2245. "sed1330", 30, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  2246. "Not tested, might work for RA8835 and SED1335 also", /* is_generate_u8g2_class= */ 1,
  2247. {
  2248. { "240x64" },
  2249. { NULL }
  2250. }
  2251. },
  2252. {
  2253. "sed1330", 32, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  2254. "Not tested, might work for RA8835 and SED1335 also", /* is_generate_u8g2_class= */ 1,
  2255. {
  2256. { "256x128" },
  2257. { NULL }
  2258. }
  2259. },
  2260. {
  2261. "ra8835", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  2262. "Tested with RA8835", /* is_generate_u8g2_class= */ 1,
  2263. {
  2264. { "nhd_240x128" },
  2265. { NULL }
  2266. }
  2267. },
  2268. {
  2269. "ra8835", 40, 30, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  2270. "not tested", /* is_generate_u8g2_class= */ 1,
  2271. {
  2272. { "320x240" },
  2273. { NULL }
  2274. }
  2275. },
  2276. {
  2277. "sed1330", 40, 25, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  2278. "Not tested, might work for RA8835 and SED1335 also", /* is_generate_u8g2_class= */ 1,
  2279. {
  2280. { "320x200" },
  2281. { NULL }
  2282. }
  2283. },
  2284. {
  2285. "max7219", 8, 1, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
  2286. "", /* is_generate_u8g2_class= */ 1,
  2287. {
  2288. { "64x8" },
  2289. { NULL }
  2290. }
  2291. },
  2292. {
  2293. "max7219", 4, 1, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
  2294. "", /* is_generate_u8g2_class= */ 1,
  2295. {
  2296. { "32x8" },
  2297. { NULL }
  2298. }
  2299. },
  2300. #ifdef NOT_POSSIBLE
  2301. {
  2302. "max7219", 2, 2, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
  2303. "", /* is_generate_u8g2_class= */ 1,
  2304. {
  2305. { "16x16" },
  2306. { NULL }
  2307. }
  2308. },
  2309. #endif
  2310. {
  2311. "max7219", 1, 1, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
  2312. "", /* is_generate_u8g2_class= */ 1,
  2313. {
  2314. { "8x8" },
  2315. { NULL }
  2316. }
  2317. },
  2318. { /* cad001 or cad011: this controller doesn't contain two byte commands, argument is not required */
  2319. "s1d15300", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  2320. "", /* is_generate_u8g2_class= */ 1,
  2321. {
  2322. { "lm6023" }, /* 128x64 */
  2323. { NULL }
  2324. }
  2325. },
  2326. { /* cad001 or cad011: this controller doesn't contain two byte commands, argument is not required */
  2327. "s1d15300", 13, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  2328. "", /* is_generate_u8g2_class= */ 1,
  2329. {
  2330. { "97x32" },
  2331. { "100x32" },
  2332. { "100x32i" }, // inverted CS line
  2333. { NULL }
  2334. }
  2335. },
  2336. {
  2337. "s1d15e06", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  2338. "", /* is_generate_u8g2_class= */ 1,
  2339. {
  2340. { "160100" },
  2341. { NULL }
  2342. }
  2343. },
  2344. {
  2345. "s1d15721", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  2346. "", /* is_generate_u8g2_class= */ 1,
  2347. {
  2348. { "240x64" },
  2349. { NULL }
  2350. }
  2351. },
  2352. {
  2353. "gu800", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_gu800_cad_110", "", COM_4WSPI|COM_6800|COM_8080,
  2354. "", /* is_generate_u8g2_class= */ 1,
  2355. {
  2356. { "128x64" },
  2357. { NULL }
  2358. }
  2359. },
  2360. {
  2361. "gu800", 20, 2, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_gu800_cad_110", "", COM_4WSPI|COM_6800|COM_8080,
  2362. "", /* is_generate_u8g2_class= */ 1,
  2363. {
  2364. { "160x16" },
  2365. { NULL }
  2366. }
  2367. },
  2368. {
  2369. "gp1287ai", 32, 7, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_empty", "", COM_4WSPI, /* DC pin is not used */
  2370. "", /* is_generate_u8g2_class= */ 1,
  2371. {
  2372. { "256x50" },
  2373. { NULL }
  2374. }
  2375. },
  2376. {
  2377. "gp1247ai", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_empty", "", COM_4WSPI, /* DC pin is not used */
  2378. "", /* is_generate_u8g2_class= */ 1,
  2379. {
  2380. { "253x63" },
  2381. { NULL }
  2382. }
  2383. },
  2384. {
  2385. "gp1294ai", 32, 6, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_empty", "", COM_4WSPI, /* DC pin is not used */
  2386. "", /* is_generate_u8g2_class= */ 1,
  2387. {
  2388. { "256x48" },
  2389. { NULL }
  2390. }
  2391. },
  2392. {
  2393. "a2printer", 48, 30, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_UART,
  2394. "", /* is_generate_u8g2_class= */ 0,
  2395. {
  2396. { "384x240" },
  2397. { NULL }
  2398. }
  2399. },
  2400. {
  2401. "ssd1315", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
  2402. "", /* is_generate_u8g2_class= */ 1,
  2403. {
  2404. { "128x64_noname" },
  2405. { NULL }
  2406. }
  2407. },
  2408. {
  2409. "ssd1315", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  2410. "", /* is_generate_u8g2_class= */ 1,
  2411. {
  2412. { "128x64_noname" },
  2413. { NULL }
  2414. }
  2415. }
  2416. };
  2417. /* display_controller_list_end */
  2418. struct interface interface_list[] =
  2419. {
  2420. /* 0 */
  2421. {
  2422. "4W_SW_SPI",
  2423. "u8x8_SetPin_4Wire_SW_SPI",
  2424. "u8x8_byte_arduino_4wire_sw_spi", /* improved version over u8x8_byte_4wire_sw_spi */
  2425. "u8x8_gpio_and_delay_arduino",
  2426. "uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
  2427. "clock, data, cs, dc, reset",
  2428. "clk, data, cs, dc [, reset]",
  2429. "u8x8_byte_4wire_sw_spi"
  2430. },
  2431. /* 1 */
  2432. {
  2433. "4W_HW_SPI",
  2434. "u8x8_SetPin_4Wire_HW_SPI",
  2435. "u8x8_byte_arduino_hw_spi",
  2436. "u8x8_gpio_and_delay_arduino",
  2437. "uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
  2438. "cs, dc, reset",
  2439. "cs, dc [, reset]",
  2440. "uC specific"
  2441. },
  2442. /* 2 */
  2443. {
  2444. "6800",
  2445. "u8x8_SetPin_8Bit_6800",
  2446. "u8x8_byte_8bit_6800mode",
  2447. "u8x8_gpio_and_delay_arduino",
  2448. "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",
  2449. "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc, reset",
  2450. "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc [, reset]",
  2451. "u8x8_byte_8bit_6800mode"
  2452. },
  2453. /* 3 */
  2454. {
  2455. "8080",
  2456. "u8x8_SetPin_8Bit_8080",
  2457. "u8x8_byte_arduino_8bit_8080mode",
  2458. "u8x8_gpio_and_delay_arduino",
  2459. "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",
  2460. "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc, reset",
  2461. "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc [, reset]",
  2462. "u8x8_byte_8bit_8080mode"
  2463. },
  2464. /* 4 */
  2465. {
  2466. "3W_SW_SPI",
  2467. "u8x8_SetPin_3Wire_SW_SPI",
  2468. "u8x8_byte_arduino_3wire_sw_spi",
  2469. "u8x8_gpio_and_delay_arduino",
  2470. "uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  2471. "clock, data, cs, reset",
  2472. "clk, data, cs [, reset]",
  2473. "u8x8_byte_3wire_sw_spi"
  2474. },
  2475. /* 5 */
  2476. {
  2477. "3W_HW_SPI",
  2478. "u8x8_SetPin_3Wire_HW_SPI",
  2479. "u8x8_byte_arduino_3wire_hw_spi",
  2480. "u8x8_gpio_and_delay_arduino",
  2481. "uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  2482. "cs, reset",
  2483. "cs [, reset]",
  2484. "uC specific"
  2485. },
  2486. /* 6 */
  2487. {
  2488. "SW_I2C",
  2489. "u8x8_SetPin_SW_I2C",
  2490. "u8x8_byte_arduino_sw_i2c" /* u8x8_byte_sw_i2c */,
  2491. "u8x8_gpio_and_delay_arduino",
  2492. "uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE",
  2493. "clock, data, reset",
  2494. "clk, data [, reset]",
  2495. "u8x8_byte_sw_i2c" /* u8x8_byte_sw_i2c */
  2496. },
  2497. /* 7 */
  2498. {
  2499. "HW_I2C",
  2500. "u8x8_SetPin_HW_I2C",
  2501. "u8x8_byte_arduino_hw_i2c",
  2502. "u8x8_gpio_and_delay_arduino",
  2503. "uint8_t reset = U8X8_PIN_NONE, uint8_t clock = U8X8_PIN_NONE, uint8_t data = U8X8_PIN_NONE",
  2504. "reset, clock, data",
  2505. "[reset [, clk, data]]",
  2506. "uC specific"
  2507. },
  2508. /* 8 */
  2509. {
  2510. /* ST7920 */ "SW_SPI",
  2511. "u8x8_SetPin_3Wire_SW_SPI", /* use the 3 wire interface, because the DC is not used */
  2512. "u8x8_byte_arduino_4wire_sw_spi", /* improved version over u8x8_byte_4wire_sw_spi */
  2513. "u8x8_gpio_and_delay_arduino",
  2514. "uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  2515. "clock, data, cs, reset",
  2516. "clk, data, cs [, reset]",
  2517. "u8x8_byte_4wire_sw_spi", /* "u8x8_byte_st7920_sw_spi" */
  2518. },
  2519. /* 9 */
  2520. {
  2521. /* ST7920 */ "HW_SPI",
  2522. "u8x8_SetPin_ST7920_HW_SPI",
  2523. "u8x8_byte_arduino_hw_spi",
  2524. "u8x8_gpio_and_delay_arduino",
  2525. "uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  2526. "cs, reset",
  2527. "cs [, reset]",
  2528. "uC specific"
  2529. },
  2530. /* 10 */
  2531. {
  2532. "2ND_HW_I2C",
  2533. "u8x8_SetPin_HW_I2C",
  2534. "u8x8_byte_arduino_2nd_hw_i2c",
  2535. "u8x8_gpio_and_delay_arduino",
  2536. "uint8_t reset = U8X8_PIN_NONE",
  2537. "reset",
  2538. "[reset]",
  2539. "uC specific"
  2540. },
  2541. /* 11 */
  2542. {
  2543. "",
  2544. "u8x8_SetPin_KS0108",
  2545. "u8x8_byte_arduino_ks0108",
  2546. "u8x8_gpio_and_delay_arduino",
  2547. "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",
  2548. "d0, d1, d2, d3, d4, d5, d6, d7, enable, dc, cs0, cs1, cs2, reset",
  2549. "d0, d1, d2, d3, d4, d5, d6, d7, enable, dc, cs0, cs1, cs2 [, reset]",
  2550. "u8x8_byte_ks0108"
  2551. },
  2552. /* 12 */
  2553. {
  2554. "2ND_4W_HW_SPI",
  2555. "u8x8_SetPin_4Wire_HW_SPI",
  2556. "u8x8_byte_arduino_2nd_hw_spi",
  2557. "u8x8_gpio_and_delay_arduino",
  2558. "uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
  2559. "cs, dc, reset",
  2560. "cs, dc [, reset]",
  2561. "uC specific"
  2562. },
  2563. /* 13 */
  2564. {
  2565. "",
  2566. "u8x8_SetPin_SED1520",
  2567. "u8x8_byte_sed1520",
  2568. "u8x8_gpio_and_delay_arduino",
  2569. "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",
  2570. "d0, d1, d2, d3, d4, d5, d6, d7, dc, e1, e2, reset",
  2571. "d0, d1, d2, d3, d4, d5, d6, d7, dc, e1, e2, reset",
  2572. "u8x8_byte_sed1520"
  2573. },
  2574. /* 14 */
  2575. {
  2576. /* ST7920 */ "2ND_HW_SPI",
  2577. "u8x8_SetPin_ST7920_HW_SPI",
  2578. "u8x8_byte_arduino_2nd_hw_spi",
  2579. "u8x8_gpio_and_delay_arduino",
  2580. "uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  2581. "cs, reset",
  2582. "cs [, reset]",
  2583. "uC specific"
  2584. },
  2585. };
  2586. /*===========================================*/
  2587. #define STR_MAX 1024
  2588. char *str_list[STR_MAX];
  2589. int str_cnt = 0 ;
  2590. int str_exists(const char *s)
  2591. {
  2592. int i;
  2593. for( i = 0; i < str_cnt; i++ )
  2594. {
  2595. if ( strcmp(str_list[i], s) == 0 )
  2596. return 1;
  2597. }
  2598. return 0;
  2599. }
  2600. void str_add(const char *s)
  2601. {
  2602. if ( str_exists(s) )
  2603. return;
  2604. if ( str_cnt >= STR_MAX )
  2605. {
  2606. error(1,0, "max number of strings reached");
  2607. }
  2608. else
  2609. {
  2610. str_list[str_cnt] = strdup(s);
  2611. str_cnt++;
  2612. }
  2613. }
  2614. /*===========================================*/
  2615. /*
  2616. copy file from source_file_name to dest_file_name
  2617. */
  2618. int file_copy(const char *source_file_name, const char *dest_file_name)
  2619. {
  2620. int ch;
  2621. FILE *source_fp;
  2622. FILE *dest_fp;
  2623. source_fp = fopen(source_file_name, "r");
  2624. dest_fp = fopen(dest_file_name, "w");
  2625. if ( source_fp == NULL || dest_fp == NULL )
  2626. return 0;
  2627. while( ( ch = fgetc(source_fp) ) != EOF )
  2628. fputc(ch, dest_fp);
  2629. fclose(source_fp);
  2630. fclose(dest_fp);
  2631. return 1;
  2632. }
  2633. /*
  2634. Insert file "insertname" between lines "start_line" and "end_line" of file "filename"
  2635. */
  2636. int insert_into_file(const char *filename, const char *insertname, const char *start_line, const char *end_line)
  2637. {
  2638. int ch;
  2639. static char line[1024*4];
  2640. const char *tmpname = "tmp.h";
  2641. FILE *source_fp;
  2642. FILE *dest_fp;
  2643. FILE *insert_fp;
  2644. if ( file_copy(filename, tmpname) == 0 )
  2645. return 0;
  2646. source_fp = fopen(tmpname, "r");
  2647. dest_fp = fopen(filename, "w");
  2648. insert_fp = fopen(insertname, "r");
  2649. if ( source_fp == NULL || dest_fp == NULL || insert_fp == NULL )
  2650. return 0;
  2651. for(;;)
  2652. {
  2653. if ( fgets(line, 1024*4, source_fp) == NULL )
  2654. break;
  2655. if ( strncmp(line, start_line, strlen(start_line)) == 0 )
  2656. {
  2657. fputs(line, dest_fp);
  2658. while( ( ch = fgetc(insert_fp) ) != EOF )
  2659. fputc(ch, dest_fp);
  2660. fputs("\n", dest_fp);
  2661. for(;;)
  2662. {
  2663. if ( fgets(line, 1024*4, source_fp) == NULL )
  2664. break;
  2665. if ( strncmp(line, end_line, strlen(end_line)) == 0 )
  2666. {
  2667. fputs(line, dest_fp);
  2668. break;
  2669. }
  2670. }
  2671. }
  2672. else
  2673. {
  2674. fputs(line, dest_fp);
  2675. }
  2676. }
  2677. fclose(insert_fp);
  2678. fclose(source_fp);
  2679. fclose(dest_fp);
  2680. unlink(tmpname);
  2681. printf("patched %s\n", filename);
  2682. return 1;
  2683. }
  2684. /*===========================================*/
  2685. char *strlowercase(const char *s)
  2686. {
  2687. int i, len = strlen(s);
  2688. static char buf[1024];
  2689. for( i = 0; i <= len; i++ )
  2690. buf[i] = tolower(s[i]);
  2691. return buf;
  2692. }
  2693. char *struppercase(const char *s)
  2694. {
  2695. int i, len = strlen(s);
  2696. static char buf[1024];
  2697. for( i = 0; i <= len; i++ )
  2698. buf[i] = toupper(s[i]);
  2699. return buf;
  2700. }
  2701. /*===========================================*/
  2702. FILE *buf_code_fp;
  2703. FILE *buf_header_fp;
  2704. FILE *setup_code_fp;
  2705. FILE *setup_header_fp;
  2706. FILE *u8g2_cpp_header_fp;
  2707. FILE *u8x8_cpp_header_fp;
  2708. FILE *u8x8_setup_c_md_fp;
  2709. FILE *u8x8_setup_cpp_md_fp;
  2710. FILE *u8g2_setup_c_md_fp;
  2711. FILE *u8g2_setup_cpp_md_fp;
  2712. const char *get_setup_function_name(int controller_idx, int display_idx, const char *postfix)
  2713. {
  2714. static char s[1024];
  2715. strcpy(s, "u8g2_Setup_");
  2716. strcat(s, strlowercase(controller_list[controller_idx].name));
  2717. strcat(s, "_");
  2718. if ( controller_list[controller_idx].cad_shortname[0] != '\0' )
  2719. {
  2720. strcat(s, strlowercase(controller_list[controller_idx].cad_shortname));
  2721. strcat(s, "_");
  2722. }
  2723. strcat(s, strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2724. strcat(s, "_");
  2725. strcat(s, postfix);
  2726. return s;
  2727. }
  2728. void do_setup_prototype(FILE *fp, int controller_idx, int display_idx, const char *postfix)
  2729. {
  2730. /*
  2731. fprintf(fp, "void u8g2_Setup_");
  2732. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
  2733. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2734. fprintf(fp, "%s(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)", postfix);
  2735. */
  2736. fprintf(fp, "void %s", get_setup_function_name(controller_idx, display_idx, postfix));
  2737. fprintf(fp, "(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)");
  2738. }
  2739. /*===========================================*/
  2740. /*
  2741. class U8X8_SSD1306_128X64_4W_SW_SPI : public U8X8 {
  2742. 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() {
  2743. u8x8_Setup(getU8x8(), u8x8_d_ssd1306_128x64_noname, u8x8_cad_001, u8x8_byte_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
  2744. u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
  2745. }
  2746. }
  2747. */
  2748. void do_u8x8_header(int controller_idx, int display_idx, int interface_idx)
  2749. {
  2750. FILE *fp = u8x8_cpp_header_fp;
  2751. fprintf(fp, "class U8X8_");
  2752. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2753. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2754. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2755. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2756. fprintf(fp, " : public U8X8 {\n");
  2757. fprintf(fp, " public: ");
  2758. fprintf(fp, "U8X8_");
  2759. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2760. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2761. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2762. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2763. fprintf(fp, "(%s) : U8X8() {\n", interface_list[interface_idx].pins_with_type);
  2764. fprintf(fp, " ");
  2765. fprintf(fp, "u8x8_Setup(getU8x8(), u8x8_d_");
  2766. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
  2767. fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2768. fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].cad));
  2769. fprintf(fp, "%s, ", interface_list[interface_idx].arduino_com_procedure);
  2770. fprintf(fp, "%s);\n", interface_list[interface_idx].arduino_gpio_procedure);
  2771. fprintf(fp, " ");
  2772. fprintf(fp, "%s(getU8x8(), ", interface_list[interface_idx].setpin_function);
  2773. fprintf(fp, "%s);\n", interface_list[interface_idx].pins_plain);
  2774. fprintf(fp, " }\n");
  2775. fprintf(fp, "};\n");
  2776. }
  2777. /*
  2778. class U8G2_SSD1306_128x64_NONAME_1_SW_SPI : public U8G2
  2779. {
  2780. public:
  2781. 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)
  2782. {
  2783. u8g2_Setup_ssd1306_128x64_noname_1(&u8g2, rotation, u8x8_byte_4wire_sw_spi, u8x8_gpio_and_delay_arduino,);
  2784. u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
  2785. }
  2786. };
  2787. */
  2788. void do_display_interface(int controller_idx, int display_idx, const char *postfix, int interface_idx)
  2789. {
  2790. FILE *fp = u8g2_cpp_header_fp;
  2791. printf(" %s %s", postfix, interface_list[interface_idx].interface_name);
  2792. fprintf(fp, "class U8G2_");
  2793. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2794. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2795. fprintf(fp, "%s", struppercase(postfix));
  2796. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2797. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2798. fprintf(fp, " : public U8G2 {\n");
  2799. fprintf(fp, " public: ");
  2800. fprintf(fp, "U8G2_");
  2801. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2802. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2803. fprintf(fp, "%s", struppercase(postfix));
  2804. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2805. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2806. fprintf(fp, "(const u8g2_cb_t *rotation, ");
  2807. fprintf(fp, "%s) : U8G2() {\n", interface_list[interface_idx].pins_with_type);
  2808. fprintf(fp, " ");
  2809. /*
  2810. fprintf(fp, "u8g2_Setup_");
  2811. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
  2812. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2813. fprintf(fp, "%s", postfix);
  2814. */
  2815. fprintf(fp, "%s", get_setup_function_name(controller_idx, display_idx, postfix));
  2816. fprintf(fp, "(&u8g2, ");
  2817. fprintf(fp, "rotation, ");
  2818. fprintf(fp, "%s, ", interface_list[interface_idx].arduino_com_procedure);
  2819. fprintf(fp, "%s);\n", interface_list[interface_idx].arduino_gpio_procedure);
  2820. fprintf(fp, " ");
  2821. fprintf(fp, "%s(getU8x8(), ", interface_list[interface_idx].setpin_function);
  2822. fprintf(fp, "%s);\n", interface_list[interface_idx].pins_plain);
  2823. fprintf(fp, " }\n");
  2824. fprintf(fp, "};\n");
  2825. if ( strcmp(postfix, "1") == 0 )
  2826. do_u8x8_header(controller_idx, display_idx, interface_idx);
  2827. }
  2828. /*===========================================*/
  2829. void do_display(int controller_idx, int display_idx, const char *postfix)
  2830. {
  2831. do_setup_prototype(setup_header_fp, controller_idx, display_idx, postfix);
  2832. fprintf(setup_header_fp, ";\n");
  2833. do_setup_prototype(setup_code_fp, controller_idx, display_idx, postfix);
  2834. fprintf(setup_code_fp, "\n");
  2835. fprintf(setup_code_fp, "{\n");
  2836. fprintf(setup_code_fp, " uint8_t tile_buf_height;\n");
  2837. fprintf(setup_code_fp, " uint8_t *buf;\n");
  2838. fprintf(setup_code_fp, " u8g2_SetupDisplay(u8g2, u8x8_d_");
  2839. fprintf(setup_code_fp, "%s_", strlowercase(controller_list[controller_idx].name));
  2840. fprintf(setup_code_fp, "%s, ", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2841. fprintf(setup_code_fp, "%s, ", controller_list[controller_idx].cad);
  2842. fprintf(setup_code_fp, "byte_cb, gpio_and_delay_cb);\n");
  2843. fprintf(setup_code_fp, " buf = ");
  2844. //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);
  2845. 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);
  2846. fprintf(setup_code_fp, " u8g2_SetupBuffer(u8g2, buf, tile_buf_height, %s, rotation);\n", controller_list[controller_idx].ll_hvline);
  2847. fprintf(setup_code_fp, "}\n");
  2848. /* generate interfaces for this display */
  2849. if ( controller_list[controller_idx].com & COM_4WSPI )
  2850. {
  2851. do_display_interface(controller_idx, display_idx, postfix, 0); /* SW SPI */
  2852. do_display_interface(controller_idx, display_idx, postfix, 1); /* HW SPI */
  2853. do_display_interface(controller_idx, display_idx, postfix, 12); /* 2nd HW SPI */
  2854. }
  2855. if ( controller_list[controller_idx].com & COM_3WSPI )
  2856. {
  2857. do_display_interface(controller_idx, display_idx, postfix, 4); /* 3wire SW SPI */
  2858. do_display_interface(controller_idx, display_idx, postfix, 5); /* 3wire HW SPI (not implemented) */
  2859. }
  2860. if ( controller_list[controller_idx].com & COM_6800 )
  2861. {
  2862. do_display_interface(controller_idx, display_idx, postfix, 2); /* 6800 mode */
  2863. }
  2864. if ( controller_list[controller_idx].com & COM_8080 )
  2865. {
  2866. do_display_interface(controller_idx, display_idx, postfix, 3); /* 8080 mode */
  2867. }
  2868. if ( controller_list[controller_idx].com & COM_I2C )
  2869. {
  2870. do_display_interface(controller_idx, display_idx, postfix, 6); /* SW I2C */
  2871. do_display_interface(controller_idx, display_idx, postfix, 7); /* HW I2C */
  2872. do_display_interface(controller_idx, display_idx, postfix, 10); /* 2nd HW I2C */
  2873. }
  2874. if ( controller_list[controller_idx].com & COM_ST7920SPI )
  2875. {
  2876. do_display_interface(controller_idx, display_idx, postfix, 8); /* ST7920 SW SPI */
  2877. do_display_interface(controller_idx, display_idx, postfix, 9); /* HW SPI */
  2878. do_display_interface(controller_idx, display_idx, postfix, 14); /* 2ND HW SPI */
  2879. }
  2880. if ( controller_list[controller_idx].com & COM_UART )
  2881. {
  2882. /* currently there is no Arduino C++ interface, instead the interface is created manually in the example */
  2883. }
  2884. if ( controller_list[controller_idx].com & COM_KS0108 )
  2885. {
  2886. do_display_interface(controller_idx, display_idx, postfix, 11); /* KS0108 6800 parallel mode */
  2887. }
  2888. if ( controller_list[controller_idx].com & COM_SED1520 )
  2889. {
  2890. do_display_interface(controller_idx, display_idx, postfix, 13);
  2891. }
  2892. }
  2893. void do_controller_buffer_code(int idx, const char *postfix, int buf_len, int rows)
  2894. {
  2895. int display_idx;
  2896. char s[1024];
  2897. //sprintf(s, "u8g2_m_%s_%d_%d_%s", strlowercase(controller_list[idx].name), controller_list[idx].tile_width, controller_list[idx].tile_height, postfix);
  2898. /* this should fix #370, additionally the controller is removed (hope that this will not break anything) */
  2899. sprintf(s, "u8g2_m_%d_%d_%s", controller_list[idx].tile_width, controller_list[idx].tile_height, postfix);
  2900. if ( str_exists(s) == 0 )
  2901. {
  2902. str_add(s);
  2903. //FILE *fp = stdout;
  2904. fprintf(buf_code_fp, "uint8_t *%s(uint8_t *page_cnt)\n", s);
  2905. fprintf(buf_code_fp, "{\n");
  2906. fprintf(buf_code_fp, " #ifdef U8G2_USE_DYNAMIC_ALLOC\n");
  2907. fprintf(buf_code_fp, " *page_cnt = %d;\n", rows);
  2908. fprintf(buf_code_fp, " return 0;\n");
  2909. fprintf(buf_code_fp, " #else\n");
  2910. fprintf(buf_code_fp, " static uint8_t buf[%d];\n", buf_len);
  2911. fprintf(buf_code_fp, " *page_cnt = %d;\n", rows);
  2912. fprintf(buf_code_fp, " return buf;\n");
  2913. fprintf(buf_code_fp, " #endif\n");
  2914. fprintf(buf_code_fp, "}\n");
  2915. fprintf(buf_header_fp, "uint8_t *%s(uint8_t *page_cnt);\n", s);
  2916. }
  2917. display_idx = 0;
  2918. fprintf(setup_code_fp, "/* %s %s */\n", controller_list[idx].name, postfix);
  2919. while( controller_list[idx].display_list[display_idx].name != NULL )
  2920. {
  2921. do_display(idx, display_idx, postfix);
  2922. display_idx++;
  2923. }
  2924. }
  2925. void do_controller_list(void)
  2926. {
  2927. int i;
  2928. for( i = 0; i < sizeof(controller_list)/sizeof(*controller_list); i++ )
  2929. {
  2930. printf("%s: ",controller_list[i].name);
  2931. fprintf(setup_code_fp, "/* %s */\n", controller_list[i].name);
  2932. do_controller_buffer_code(i, "1", controller_list[i].tile_width*8, 1);
  2933. do_controller_buffer_code(i, "2", controller_list[i].tile_width*8*2, 2);
  2934. do_controller_buffer_code(i, "f", controller_list[i].tile_width*8*controller_list[i].tile_height, controller_list[i].tile_height);
  2935. printf("\n");
  2936. }
  2937. }
  2938. int is_arduino_cpp = 1;
  2939. int is_u8g2 = 1;
  2940. FILE *md_fp;
  2941. void do_md_display(int controller_idx, int display_idx)
  2942. {
  2943. FILE *fp = md_fp;
  2944. /*
  2945. fprintf(fp, "%s:", controller_list[controller_idx].name);
  2946. fprintf(fp, "%s\n", controller_list[controller_idx].display_list[display_idx].name);
  2947. */
  2948. if ( is_u8g2 )
  2949. {
  2950. fprintf(fp, "\n");
  2951. fprintf(fp, "## %s ", struppercase(controller_list[controller_idx].name));
  2952. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2953. fprintf(fp, "\n");
  2954. #ifdef MD_TABLES
  2955. fprintf(fp, "| Controller \"%s\", ", controller_list[controller_idx].name);
  2956. fprintf(fp, "Display \"%s\" | ", controller_list[controller_idx].display_list[display_idx].name);
  2957. fprintf(fp, "Description |\n");
  2958. fprintf(fp, "|---|---|\n");
  2959. #else
  2960. fprintf(fp, "Controller \"%s\", ", controller_list[controller_idx].name);
  2961. fprintf(fp, "Display \"%s\" ", controller_list[controller_idx].display_list[display_idx].name);
  2962. fprintf(fp, "\n");
  2963. #endif
  2964. }
  2965. else
  2966. {
  2967. if ( is_u8g2 != 0 || strcmp(controller_list[controller_idx].ll_hvline, U8X8_HVLINE ) == 0 )
  2968. {
  2969. fprintf(fp, "\n");
  2970. fprintf(fp, "## %s ", struppercase(controller_list[controller_idx].name));
  2971. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2972. fprintf(fp, "\n");
  2973. fprintf(fp, "| Controller \"%s\", ", controller_list[controller_idx].name);
  2974. fprintf(fp, "Display \"%s\" |\n", controller_list[controller_idx].display_list[display_idx].name);
  2975. fprintf(fp, "|---|\n");
  2976. }
  2977. }
  2978. }
  2979. void do_md_display_interface_buffer(int controller_idx, int display_idx, int interface_idx, char *postfix, int size, int rows)
  2980. {
  2981. FILE *fp = md_fp;
  2982. #ifdef MD_TABLES
  2983. if ( is_u8g2 )
  2984. {
  2985. if ( is_arduino_cpp )
  2986. {
  2987. fprintf(fp, "| U8G2_");
  2988. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2989. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2990. fprintf(fp, "%s", struppercase(postfix));
  2991. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2992. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2993. fprintf(fp, "(rotation, %s)", interface_list[interface_idx].pins_md_plain);
  2994. if ( postfix[0] == 'f' )
  2995. {
  2996. fprintf(fp, " | full framebuffer, size = %d bytes |\n", size);
  2997. }
  2998. else
  2999. {
  3000. fprintf(fp, " | page buffer, size = %d bytes |\n", size);
  3001. }
  3002. }
  3003. else
  3004. {
  3005. fprintf(fp, "| ");
  3006. fprintf(fp, "%s", get_setup_function_name(controller_idx, display_idx, postfix));
  3007. fprintf(fp, "(u8g2, ");
  3008. fprintf(fp, "rotation, ");
  3009. fprintf(fp, "%s, ", interface_list[interface_idx].generic_com_procedure);
  3010. fprintf(fp, "%s)", "uC specific");
  3011. if ( postfix[0] == 'f' )
  3012. {
  3013. fprintf(fp, " | full framebuffer, size = %d bytes |\n", size);
  3014. }
  3015. else
  3016. {
  3017. fprintf(fp, " | page buffer, size = %d bytes |\n", size);
  3018. }
  3019. }
  3020. }
  3021. #else
  3022. if ( is_u8g2 )
  3023. {
  3024. if ( is_arduino_cpp )
  3025. {
  3026. fprintf(fp, " * U8G2_");
  3027. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  3028. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  3029. fprintf(fp, "%s", struppercase(postfix));
  3030. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  3031. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  3032. fprintf(fp, "(rotation, %s)", interface_list[interface_idx].pins_md_plain);
  3033. /* removed to reduce the size of the md file */
  3034. /*
  3035. if ( postfix[0] == 'f' )
  3036. {
  3037. fprintf(fp, " [full framebuffer, size = %d bytes]\n", size);
  3038. }
  3039. else
  3040. {
  3041. fprintf(fp, " [page buffer, size = %d bytes]\n", size);
  3042. }
  3043. */
  3044. fprintf(fp, "\n");
  3045. }
  3046. else
  3047. {
  3048. fprintf(fp, " * ");
  3049. fprintf(fp, "%s", get_setup_function_name(controller_idx, display_idx, postfix));
  3050. fprintf(fp, "(u8g2, ");
  3051. fprintf(fp, "rotation, ");
  3052. fprintf(fp, "%s, ", interface_list[interface_idx].generic_com_procedure);
  3053. fprintf(fp, "%s)", "uC specific");
  3054. /* removed to reduce the size of the md file */
  3055. /*
  3056. if ( postfix[0] == 'f' )
  3057. {
  3058. fprintf(fp, " [full framebuffer, size = %d bytes]\n", size);
  3059. }
  3060. else
  3061. {
  3062. fprintf(fp, " [page buffer, size = %d bytes]\n", size);
  3063. }
  3064. */
  3065. fprintf(fp, "\n");
  3066. }
  3067. }
  3068. #endif
  3069. }
  3070. void do_md_display_interface(int controller_idx, int display_idx, int interface_idx)
  3071. {
  3072. FILE *fp = md_fp;
  3073. if ( !is_u8g2 )
  3074. {
  3075. if ( strcmp(controller_list[controller_idx].ll_hvline, U8X8_HVLINE ) == 0 )
  3076. {
  3077. if ( is_arduino_cpp )
  3078. {
  3079. fprintf(fp, "| U8X8_");
  3080. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  3081. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  3082. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  3083. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  3084. fprintf(fp, "(%s) |\n", interface_list[interface_idx].pins_md_plain);
  3085. }
  3086. else
  3087. {
  3088. fprintf(fp, "| u8x8_Setup(u8x8, u8x8_d_");
  3089. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
  3090. fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  3091. fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].cad));
  3092. fprintf(fp, "%s, ", strlowercase(interface_list[interface_idx].generic_com_procedure));
  3093. fprintf(fp, "uC specific) |\n");
  3094. }
  3095. }
  3096. }
  3097. do_md_display_interface_buffer(controller_idx, display_idx, interface_idx, "1", controller_list[controller_idx].tile_width*8, 1);
  3098. do_md_display_interface_buffer(controller_idx, display_idx, interface_idx, "2", controller_list[controller_idx].tile_width*8*2, 2);
  3099. 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);
  3100. }
  3101. void do_md_controller_list(void)
  3102. {
  3103. int controller_idx, display_idx;
  3104. for( controller_idx = 0; controller_idx < sizeof(controller_list)/sizeof(*controller_list); controller_idx++ )
  3105. {
  3106. display_idx = 0;
  3107. while( controller_list[controller_idx].display_list[display_idx].name != NULL )
  3108. {
  3109. do_md_display(controller_idx, display_idx);
  3110. /* generate interfaces for this display */
  3111. if ( controller_list[controller_idx].com & COM_4WSPI )
  3112. {
  3113. do_md_display_interface(controller_idx, display_idx, 0); /* SW SPI */
  3114. if ( is_arduino_cpp )
  3115. {
  3116. do_md_display_interface(controller_idx, display_idx, 1); /* HW SPI */
  3117. do_md_display_interface(controller_idx, display_idx, 12); /* 2nd HW SPI */
  3118. }
  3119. }
  3120. if ( controller_list[controller_idx].com & COM_3WSPI )
  3121. {
  3122. do_md_display_interface(controller_idx, display_idx, 4); /* 3wire SW SPI */
  3123. do_md_display_interface(controller_idx, display_idx, 5); /* 3wire HW SPI (not implemented) */
  3124. }
  3125. if ( controller_list[controller_idx].com & COM_6800 )
  3126. {
  3127. do_md_display_interface(controller_idx, display_idx, 2); /* 6800 mode */
  3128. }
  3129. if ( controller_list[controller_idx].com & COM_8080 )
  3130. {
  3131. do_md_display_interface(controller_idx, display_idx, 3); /* 8080 mode */
  3132. }
  3133. if ( controller_list[controller_idx].com & COM_I2C )
  3134. {
  3135. do_md_display_interface(controller_idx, display_idx, 6); /* SW I2C */
  3136. do_md_display_interface(controller_idx, display_idx, 7); /* HW I2C */
  3137. do_md_display_interface(controller_idx, display_idx, 10); /* 2nd HW I2C */
  3138. }
  3139. if ( controller_list[controller_idx].com & COM_ST7920SPI )
  3140. {
  3141. do_md_display_interface(controller_idx, display_idx, 8); /* ST7920 SW SPI */
  3142. do_md_display_interface(controller_idx, display_idx, 9); /* HW SPI (not yet implemented) */
  3143. do_md_display_interface(controller_idx, display_idx, 14); /* 2ND HW SPI */
  3144. }
  3145. if ( controller_list[controller_idx].com & COM_KS0108 )
  3146. {
  3147. do_md_display_interface(controller_idx, display_idx, 11); /* KS0108 */
  3148. }
  3149. if ( controller_list[controller_idx].com & COM_SED1520 )
  3150. {
  3151. do_md_display_interface(controller_idx, display_idx, 13); /* SED1520 */
  3152. }
  3153. display_idx++;
  3154. }
  3155. }
  3156. }
  3157. int main(void)
  3158. {
  3159. buf_code_fp = fopen("u8g2_d_memory.c", "w");
  3160. fprintf(buf_code_fp, "/* u8g2_d_memory.c */\n");
  3161. fprintf(buf_code_fp, "/* generated code, codebuild, u8g2 project */\n");
  3162. fprintf(buf_code_fp, "\n");
  3163. fprintf(buf_code_fp, "#include \"u8g2.h\"\n");
  3164. fprintf(buf_code_fp, "\n");
  3165. buf_header_fp = fopen("u8g2_memory.h", "w");
  3166. //fprintf(buf_header_fp, "/* start of generated code, codebuild, u8g2 project */\n");
  3167. setup_code_fp = fopen("u8g2_d_setup.c", "w");
  3168. fprintf(setup_code_fp, "/* u8g2_d_setup.c */\n");
  3169. fprintf(setup_code_fp, "/* generated code, codebuild, u8g2 project */\n");
  3170. fprintf(setup_code_fp, "\n");
  3171. fprintf(setup_code_fp, "#include \"u8g2.h\"\n");
  3172. fprintf(setup_code_fp, "\n");
  3173. setup_header_fp = fopen("u8g2_setup.h", "w");
  3174. //fprintf(setup_header_fp, "/* start of generated code, codebuild, u8g2 project */\n");
  3175. u8g2_cpp_header_fp = fopen("U8g2lib.h", "w");
  3176. fprintf(u8g2_cpp_header_fp, "/* generated code (codebuild), u8g2 project */\n");
  3177. u8x8_cpp_header_fp = fopen("U8x8lib.h", "w");
  3178. fprintf(u8x8_cpp_header_fp, "/* generated code (codebuild), u8g2 project */\n");
  3179. u8x8_setup_c_md_fp = fopen("u8x8setupc.md", "w");
  3180. u8x8_setup_cpp_md_fp = fopen("u8x8setupcpp.md", "w");
  3181. u8g2_setup_c_md_fp = fopen("u8g2setupc.md", "w");
  3182. u8g2_setup_cpp_md_fp = fopen("u8g2setupcpp.md", "w");
  3183. do_controller_list();
  3184. md_fp = u8g2_setup_cpp_md_fp;
  3185. is_arduino_cpp = 1;
  3186. is_u8g2 = 1;
  3187. do_md_controller_list();
  3188. md_fp = u8g2_setup_c_md_fp;
  3189. is_arduino_cpp = 0;
  3190. is_u8g2 = 1;
  3191. do_md_controller_list();
  3192. md_fp = u8x8_setup_cpp_md_fp;
  3193. is_arduino_cpp = 1;
  3194. is_u8g2 = 0;
  3195. do_md_controller_list();
  3196. md_fp = u8x8_setup_c_md_fp;
  3197. is_arduino_cpp = 0;
  3198. is_u8g2 = 0;
  3199. do_md_controller_list();
  3200. fprintf(buf_code_fp, "/* end of generated code */\n");
  3201. fclose(buf_code_fp);
  3202. //fprintf(buf_header_fp, "/* end of generated code */\n");
  3203. fclose(buf_header_fp);
  3204. fprintf(setup_code_fp, "/* end of generated code */\n");
  3205. fclose(setup_code_fp);
  3206. //fprintf(setup_header_fp, "/* end of generated code */\n");
  3207. fclose(setup_header_fp);
  3208. fclose(u8g2_cpp_header_fp);
  3209. fclose(u8x8_cpp_header_fp);
  3210. fclose(u8x8_setup_c_md_fp);
  3211. fclose(u8x8_setup_cpp_md_fp);
  3212. fclose(u8g2_setup_c_md_fp);
  3213. fclose(u8g2_setup_cpp_md_fp);
  3214. system("cp u8g2_d_memory.c ../../csrc/.");
  3215. puts("generate u8g2_d_memory.c");
  3216. system("cp u8g2_d_setup.c ../../csrc/.");
  3217. puts("generate u8g2_d_setup.c");
  3218. insert_into_file("../../csrc/u8g2.h", "u8g2_memory.h", "/* u8g2_d_memory.c generated code start */", "/* u8g2_d_memory.c generated code end */");
  3219. insert_into_file("../../csrc/u8g2.h", "u8g2_setup.h", "/* u8g2_d_setup.c generated code start */", "/* u8g2_d_setup.c generated code end */");
  3220. insert_into_file("../../cppsrc/U8g2lib.h", "U8g2lib.h", "/* Arduino constructor list start */", "/* Arduino constructor list end */");
  3221. insert_into_file("../../cppsrc/U8x8lib.h", "U8x8lib.h", "// constructor list start", "// constructor list end");
  3222. insert_into_file("../../../u8g2.wiki/u8g2setupc.md", "u8g2setupc.md", "# Setup Function Reference", "# Links");
  3223. insert_into_file("../../../u8g2.wiki/u8g2setupcpp.md", "u8g2setupcpp.md", "# Constructor Reference", "# Links");
  3224. insert_into_file("../../../u8g2.wiki/u8x8setupc.md", "u8x8setupc.md", "# Setup Function Reference", "# Links");
  3225. insert_into_file("../../../u8g2.wiki/u8x8setupcpp.md", "u8x8setupcpp.md", "# Constructor Reference", "# Links");
  3226. return 0;
  3227. }