codebuild.c 97 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551
  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. "ssd1362z", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI,
  2163. "Requires U8G2_16BIT (see u8g2.h)", /* is_generate_u8g2_class= */ 1,
  2164. {
  2165. { "256x64_OEL1M0033WE" },
  2166. { NULL }
  2167. }
  2168. },
  2169. {
  2170. "ssd1362z", 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_OEL1M0033WE" },
  2174. { NULL }
  2175. }
  2176. },
  2177. {
  2178. "ssd1362", 32, 8, "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. { "256x64" },
  2182. { NULL }
  2183. }
  2184. },
  2185. {
  2186. "ssd1362", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C, // not tested
  2187. "", /* is_generate_u8g2_class= */ 1,
  2188. {
  2189. { "256x64" },
  2190. { NULL }
  2191. }
  2192. },
  2193. {
  2194. "ssd1362", 26, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  2195. "Requires U8G2_16BIT (see u8g2.h)", /* is_generate_u8g2_class= */ 1,
  2196. {
  2197. { "206x36" },
  2198. { NULL }
  2199. }
  2200. },
  2201. {
  2202. "ssd1362", 26, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C, // not tested
  2203. "", /* is_generate_u8g2_class= */ 1,
  2204. {
  2205. { "206x36" },
  2206. { NULL }
  2207. }
  2208. },
  2209. {
  2210. "ssd1363", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
  2211. "Requires U8G2_16BIT (see u8g2.h)", /* is_generate_u8g2_class= */ 1,
  2212. {
  2213. { "256x128" },
  2214. { NULL }
  2215. }
  2216. },
  2217. {
  2218. "ssd1363", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011_ssd13xx_i2c", "i2c", COM_I2C, // not tested
  2219. "", /* is_generate_u8g2_class= */ 1,
  2220. {
  2221. { "256x128" },
  2222. { NULL }
  2223. }
  2224. },
  2225. {
  2226. "ssd1606", 22, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI,
  2227. "Partly supported by U8x8, no HW flip, no contrast setting", /* is_generate_u8g2_class= */ 1,
  2228. {
  2229. { "172x72" },
  2230. { NULL }
  2231. }
  2232. },
  2233. {
  2234. "ssd1607", 25, 25, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI,
  2235. "Partly supported by U8x8, no HW flip, no contrast setting, v2 includes an optimized LUT", /* is_generate_u8g2_class= */ 1,
  2236. {
  2237. { "200x200" },
  2238. { "gd_200x200" }, // GDEP015OC1
  2239. { "ws_200x200" }, // Waveshare issue #637
  2240. { NULL }
  2241. }
  2242. },
  2243. {
  2244. "il3820", 37, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI,
  2245. "Partly supported by U8x8, no HW flip, no contrast setting, V2 produces lesser screen-flicker", /* is_generate_u8g2_class= */ 1,
  2246. {
  2247. { "296x128" },
  2248. { "v2_296x128" },
  2249. { NULL }
  2250. }
  2251. },
  2252. {
  2253. "sed1330", 30, 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. { "240x128" },
  2257. { NULL }
  2258. }
  2259. },
  2260. {
  2261. "sed1330", 30, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  2262. "Not tested, might work for RA8835 and SED1335 also", /* is_generate_u8g2_class= */ 1,
  2263. {
  2264. { "240x64" },
  2265. { NULL }
  2266. }
  2267. },
  2268. {
  2269. "sed1330", 32, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  2270. "Not tested, might work for RA8835 and SED1335 also", /* is_generate_u8g2_class= */ 1,
  2271. {
  2272. { "256x128" },
  2273. { NULL }
  2274. }
  2275. },
  2276. {
  2277. "ra8835", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  2278. "Tested with RA8835", /* is_generate_u8g2_class= */ 1,
  2279. {
  2280. { "nhd_240x128" },
  2281. { NULL }
  2282. }
  2283. },
  2284. {
  2285. "ra8835", 40, 30, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  2286. "not tested", /* is_generate_u8g2_class= */ 1,
  2287. {
  2288. { "320x240" },
  2289. { NULL }
  2290. }
  2291. },
  2292. {
  2293. "sed1330", 40, 25, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
  2294. "Not tested, might work for RA8835 and SED1335 also", /* is_generate_u8g2_class= */ 1,
  2295. {
  2296. { "320x200" },
  2297. { NULL }
  2298. }
  2299. },
  2300. {
  2301. "max7219", 8, 1, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
  2302. "", /* is_generate_u8g2_class= */ 1,
  2303. {
  2304. { "64x8" },
  2305. { NULL }
  2306. }
  2307. },
  2308. {
  2309. "max7219", 4, 1, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
  2310. "", /* is_generate_u8g2_class= */ 1,
  2311. {
  2312. { "32x8" },
  2313. { NULL }
  2314. }
  2315. },
  2316. #ifdef NOT_POSSIBLE
  2317. {
  2318. "max7219", 2, 2, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
  2319. "", /* is_generate_u8g2_class= */ 1,
  2320. {
  2321. { "16x16" },
  2322. { NULL }
  2323. }
  2324. },
  2325. #endif
  2326. {
  2327. "max7219", 1, 1, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
  2328. "", /* is_generate_u8g2_class= */ 1,
  2329. {
  2330. { "8x8" },
  2331. { NULL }
  2332. }
  2333. },
  2334. { /* cad001 or cad011: this controller doesn't contain two byte commands, argument is not required */
  2335. "s1d15300", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  2336. "", /* is_generate_u8g2_class= */ 1,
  2337. {
  2338. { "lm6023" }, /* 128x64 */
  2339. { NULL }
  2340. }
  2341. },
  2342. { /* cad001 or cad011: this controller doesn't contain two byte commands, argument is not required */
  2343. "s1d15300", 13, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  2344. "", /* is_generate_u8g2_class= */ 1,
  2345. {
  2346. { "97x32" },
  2347. { "100x32" },
  2348. { "100x32i" }, // inverted CS line
  2349. { NULL }
  2350. }
  2351. },
  2352. {
  2353. "s1d15e06", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  2354. "", /* is_generate_u8g2_class= */ 1,
  2355. {
  2356. { "160100" },
  2357. { NULL }
  2358. }
  2359. },
  2360. {
  2361. "s1d15721", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
  2362. "", /* is_generate_u8g2_class= */ 1,
  2363. {
  2364. { "240x64" },
  2365. { NULL }
  2366. }
  2367. },
  2368. {
  2369. "gu800", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_gu800_cad_110", "", COM_4WSPI|COM_6800|COM_8080,
  2370. "", /* is_generate_u8g2_class= */ 1,
  2371. {
  2372. { "128x64" },
  2373. { NULL }
  2374. }
  2375. },
  2376. {
  2377. "gu800", 20, 2, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_gu800_cad_110", "", COM_4WSPI|COM_6800|COM_8080,
  2378. "", /* is_generate_u8g2_class= */ 1,
  2379. {
  2380. { "160x16" },
  2381. { NULL }
  2382. }
  2383. },
  2384. {
  2385. "gp1287ai", 32, 7, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_empty", "", COM_4WSPI, /* DC pin is not used */
  2386. "", /* is_generate_u8g2_class= */ 1,
  2387. {
  2388. { "256x50" },
  2389. { NULL }
  2390. }
  2391. },
  2392. {
  2393. "gp1247ai", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_empty", "", COM_4WSPI, /* DC pin is not used */
  2394. "", /* is_generate_u8g2_class= */ 1,
  2395. {
  2396. { "253x63" },
  2397. { NULL }
  2398. }
  2399. },
  2400. {
  2401. "gp1294ai", 32, 6, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_empty", "", COM_4WSPI, /* DC pin is not used */
  2402. "", /* is_generate_u8g2_class= */ 1,
  2403. {
  2404. { "256x48" },
  2405. { NULL }
  2406. }
  2407. },
  2408. {
  2409. "a2printer", 48, 30, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_UART,
  2410. "", /* is_generate_u8g2_class= */ 0,
  2411. {
  2412. { "384x240" },
  2413. { NULL }
  2414. }
  2415. },
  2416. {
  2417. "ssd1315", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
  2418. "", /* is_generate_u8g2_class= */ 1,
  2419. {
  2420. { "128x64_noname" },
  2421. { NULL }
  2422. }
  2423. },
  2424. {
  2425. "ssd1315", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
  2426. "", /* is_generate_u8g2_class= */ 1,
  2427. {
  2428. { "128x64_noname" },
  2429. { NULL }
  2430. }
  2431. }
  2432. };
  2433. /* display_controller_list_end */
  2434. struct interface interface_list[] =
  2435. {
  2436. /* 0 */
  2437. {
  2438. "4W_SW_SPI",
  2439. "u8x8_SetPin_4Wire_SW_SPI",
  2440. "u8x8_byte_arduino_4wire_sw_spi", /* improved version over u8x8_byte_4wire_sw_spi */
  2441. "u8x8_gpio_and_delay_arduino",
  2442. "uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
  2443. "clock, data, cs, dc, reset",
  2444. "clk, data, cs, dc [, reset]",
  2445. "u8x8_byte_4wire_sw_spi"
  2446. },
  2447. /* 1 */
  2448. {
  2449. "4W_HW_SPI",
  2450. "u8x8_SetPin_4Wire_HW_SPI",
  2451. "u8x8_byte_arduino_hw_spi",
  2452. "u8x8_gpio_and_delay_arduino",
  2453. "uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
  2454. "cs, dc, reset",
  2455. "cs, dc [, reset]",
  2456. "uC specific"
  2457. },
  2458. /* 2 */
  2459. {
  2460. "6800",
  2461. "u8x8_SetPin_8Bit_6800",
  2462. "u8x8_byte_8bit_6800mode",
  2463. "u8x8_gpio_and_delay_arduino",
  2464. "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",
  2465. "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc, reset",
  2466. "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc [, reset]",
  2467. "u8x8_byte_8bit_6800mode"
  2468. },
  2469. /* 3 */
  2470. {
  2471. "8080",
  2472. "u8x8_SetPin_8Bit_8080",
  2473. "u8x8_byte_arduino_8bit_8080mode",
  2474. "u8x8_gpio_and_delay_arduino",
  2475. "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",
  2476. "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc, reset",
  2477. "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc [, reset]",
  2478. "u8x8_byte_8bit_8080mode"
  2479. },
  2480. /* 4 */
  2481. {
  2482. "3W_SW_SPI",
  2483. "u8x8_SetPin_3Wire_SW_SPI",
  2484. "u8x8_byte_arduino_3wire_sw_spi",
  2485. "u8x8_gpio_and_delay_arduino",
  2486. "uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  2487. "clock, data, cs, reset",
  2488. "clk, data, cs [, reset]",
  2489. "u8x8_byte_3wire_sw_spi"
  2490. },
  2491. /* 5 */
  2492. {
  2493. "3W_HW_SPI",
  2494. "u8x8_SetPin_3Wire_HW_SPI",
  2495. "u8x8_byte_arduino_3wire_hw_spi",
  2496. "u8x8_gpio_and_delay_arduino",
  2497. "uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  2498. "cs, reset",
  2499. "cs [, reset]",
  2500. "uC specific"
  2501. },
  2502. /* 6 */
  2503. {
  2504. "SW_I2C",
  2505. "u8x8_SetPin_SW_I2C",
  2506. "u8x8_byte_arduino_sw_i2c" /* u8x8_byte_sw_i2c */,
  2507. "u8x8_gpio_and_delay_arduino",
  2508. "uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE",
  2509. "clock, data, reset",
  2510. "clk, data [, reset]",
  2511. "u8x8_byte_sw_i2c" /* u8x8_byte_sw_i2c */
  2512. },
  2513. /* 7 */
  2514. {
  2515. "HW_I2C",
  2516. "u8x8_SetPin_HW_I2C",
  2517. "u8x8_byte_arduino_hw_i2c",
  2518. "u8x8_gpio_and_delay_arduino",
  2519. "uint8_t reset = U8X8_PIN_NONE, uint8_t clock = U8X8_PIN_NONE, uint8_t data = U8X8_PIN_NONE",
  2520. "reset, clock, data",
  2521. "[reset [, clk, data]]",
  2522. "uC specific"
  2523. },
  2524. /* 8 */
  2525. {
  2526. /* ST7920 */ "SW_SPI",
  2527. "u8x8_SetPin_3Wire_SW_SPI", /* use the 3 wire interface, because the DC is not used */
  2528. "u8x8_byte_arduino_4wire_sw_spi", /* improved version over u8x8_byte_4wire_sw_spi */
  2529. "u8x8_gpio_and_delay_arduino",
  2530. "uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  2531. "clock, data, cs, reset",
  2532. "clk, data, cs [, reset]",
  2533. "u8x8_byte_4wire_sw_spi", /* "u8x8_byte_st7920_sw_spi" */
  2534. },
  2535. /* 9 */
  2536. {
  2537. /* ST7920 */ "HW_SPI",
  2538. "u8x8_SetPin_ST7920_HW_SPI",
  2539. "u8x8_byte_arduino_hw_spi",
  2540. "u8x8_gpio_and_delay_arduino",
  2541. "uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  2542. "cs, reset",
  2543. "cs [, reset]",
  2544. "uC specific"
  2545. },
  2546. /* 10 */
  2547. {
  2548. "2ND_HW_I2C",
  2549. "u8x8_SetPin_HW_I2C",
  2550. "u8x8_byte_arduino_2nd_hw_i2c",
  2551. "u8x8_gpio_and_delay_arduino",
  2552. "uint8_t reset = U8X8_PIN_NONE",
  2553. "reset",
  2554. "[reset]",
  2555. "uC specific"
  2556. },
  2557. /* 11 */
  2558. {
  2559. "",
  2560. "u8x8_SetPin_KS0108",
  2561. "u8x8_byte_arduino_ks0108",
  2562. "u8x8_gpio_and_delay_arduino",
  2563. "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",
  2564. "d0, d1, d2, d3, d4, d5, d6, d7, enable, dc, cs0, cs1, cs2, reset",
  2565. "d0, d1, d2, d3, d4, d5, d6, d7, enable, dc, cs0, cs1, cs2 [, reset]",
  2566. "u8x8_byte_ks0108"
  2567. },
  2568. /* 12 */
  2569. {
  2570. "2ND_4W_HW_SPI",
  2571. "u8x8_SetPin_4Wire_HW_SPI",
  2572. "u8x8_byte_arduino_2nd_hw_spi",
  2573. "u8x8_gpio_and_delay_arduino",
  2574. "uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
  2575. "cs, dc, reset",
  2576. "cs, dc [, reset]",
  2577. "uC specific"
  2578. },
  2579. /* 13 */
  2580. {
  2581. "",
  2582. "u8x8_SetPin_SED1520",
  2583. "u8x8_byte_sed1520",
  2584. "u8x8_gpio_and_delay_arduino",
  2585. "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",
  2586. "d0, d1, d2, d3, d4, d5, d6, d7, dc, e1, e2, reset",
  2587. "d0, d1, d2, d3, d4, d5, d6, d7, dc, e1, e2, reset",
  2588. "u8x8_byte_sed1520"
  2589. },
  2590. /* 14 */
  2591. {
  2592. /* ST7920 */ "2ND_HW_SPI",
  2593. "u8x8_SetPin_ST7920_HW_SPI",
  2594. "u8x8_byte_arduino_2nd_hw_spi",
  2595. "u8x8_gpio_and_delay_arduino",
  2596. "uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
  2597. "cs, reset",
  2598. "cs [, reset]",
  2599. "uC specific"
  2600. },
  2601. };
  2602. /*===========================================*/
  2603. #define STR_MAX 1024
  2604. char *str_list[STR_MAX];
  2605. int str_cnt = 0 ;
  2606. int str_exists(const char *s)
  2607. {
  2608. int i;
  2609. for( i = 0; i < str_cnt; i++ )
  2610. {
  2611. if ( strcmp(str_list[i], s) == 0 )
  2612. return 1;
  2613. }
  2614. return 0;
  2615. }
  2616. void str_add(const char *s)
  2617. {
  2618. if ( str_exists(s) )
  2619. return;
  2620. if ( str_cnt >= STR_MAX )
  2621. {
  2622. error(1,0, "max number of strings reached");
  2623. }
  2624. else
  2625. {
  2626. str_list[str_cnt] = strdup(s);
  2627. str_cnt++;
  2628. }
  2629. }
  2630. /*===========================================*/
  2631. /*
  2632. copy file from source_file_name to dest_file_name
  2633. */
  2634. int file_copy(const char *source_file_name, const char *dest_file_name)
  2635. {
  2636. int ch;
  2637. FILE *source_fp;
  2638. FILE *dest_fp;
  2639. source_fp = fopen(source_file_name, "r");
  2640. dest_fp = fopen(dest_file_name, "w");
  2641. if ( source_fp == NULL || dest_fp == NULL )
  2642. return 0;
  2643. while( ( ch = fgetc(source_fp) ) != EOF )
  2644. fputc(ch, dest_fp);
  2645. fclose(source_fp);
  2646. fclose(dest_fp);
  2647. return 1;
  2648. }
  2649. /*
  2650. Insert file "insertname" between lines "start_line" and "end_line" of file "filename"
  2651. */
  2652. int insert_into_file(const char *filename, const char *insertname, const char *start_line, const char *end_line)
  2653. {
  2654. int ch;
  2655. static char line[1024*4];
  2656. const char *tmpname = "tmp.h";
  2657. FILE *source_fp;
  2658. FILE *dest_fp;
  2659. FILE *insert_fp;
  2660. if ( file_copy(filename, tmpname) == 0 )
  2661. return 0;
  2662. source_fp = fopen(tmpname, "r");
  2663. dest_fp = fopen(filename, "w");
  2664. insert_fp = fopen(insertname, "r");
  2665. if ( source_fp == NULL || dest_fp == NULL || insert_fp == NULL )
  2666. return 0;
  2667. for(;;)
  2668. {
  2669. if ( fgets(line, 1024*4, source_fp) == NULL )
  2670. break;
  2671. if ( strncmp(line, start_line, strlen(start_line)) == 0 )
  2672. {
  2673. fputs(line, dest_fp);
  2674. while( ( ch = fgetc(insert_fp) ) != EOF )
  2675. fputc(ch, dest_fp);
  2676. fputs("\n", dest_fp);
  2677. for(;;)
  2678. {
  2679. if ( fgets(line, 1024*4, source_fp) == NULL )
  2680. break;
  2681. if ( strncmp(line, end_line, strlen(end_line)) == 0 )
  2682. {
  2683. fputs(line, dest_fp);
  2684. break;
  2685. }
  2686. }
  2687. }
  2688. else
  2689. {
  2690. fputs(line, dest_fp);
  2691. }
  2692. }
  2693. fclose(insert_fp);
  2694. fclose(source_fp);
  2695. fclose(dest_fp);
  2696. unlink(tmpname);
  2697. printf("patched %s\n", filename);
  2698. return 1;
  2699. }
  2700. /*===========================================*/
  2701. char *strlowercase(const char *s)
  2702. {
  2703. int i, len = strlen(s);
  2704. static char buf[1024];
  2705. for( i = 0; i <= len; i++ )
  2706. buf[i] = tolower(s[i]);
  2707. return buf;
  2708. }
  2709. char *struppercase(const char *s)
  2710. {
  2711. int i, len = strlen(s);
  2712. static char buf[1024];
  2713. for( i = 0; i <= len; i++ )
  2714. buf[i] = toupper(s[i]);
  2715. return buf;
  2716. }
  2717. /*===========================================*/
  2718. FILE *buf_code_fp;
  2719. FILE *buf_header_fp;
  2720. FILE *setup_code_fp;
  2721. FILE *setup_header_fp;
  2722. FILE *u8g2_cpp_header_fp;
  2723. FILE *u8x8_cpp_header_fp;
  2724. FILE *u8x8_setup_c_md_fp;
  2725. FILE *u8x8_setup_cpp_md_fp;
  2726. FILE *u8g2_setup_c_md_fp;
  2727. FILE *u8g2_setup_cpp_md_fp;
  2728. const char *get_setup_function_name(int controller_idx, int display_idx, const char *postfix)
  2729. {
  2730. static char s[1024];
  2731. strcpy(s, "u8g2_Setup_");
  2732. strcat(s, strlowercase(controller_list[controller_idx].name));
  2733. strcat(s, "_");
  2734. if ( controller_list[controller_idx].cad_shortname[0] != '\0' )
  2735. {
  2736. strcat(s, strlowercase(controller_list[controller_idx].cad_shortname));
  2737. strcat(s, "_");
  2738. }
  2739. strcat(s, strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2740. strcat(s, "_");
  2741. strcat(s, postfix);
  2742. return s;
  2743. }
  2744. void do_setup_prototype(FILE *fp, int controller_idx, int display_idx, const char *postfix)
  2745. {
  2746. /*
  2747. fprintf(fp, "void u8g2_Setup_");
  2748. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
  2749. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2750. fprintf(fp, "%s(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)", postfix);
  2751. */
  2752. fprintf(fp, "void %s", get_setup_function_name(controller_idx, display_idx, postfix));
  2753. fprintf(fp, "(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)");
  2754. }
  2755. /*===========================================*/
  2756. /*
  2757. class U8X8_SSD1306_128X64_4W_SW_SPI : public U8X8 {
  2758. 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() {
  2759. u8x8_Setup(getU8x8(), u8x8_d_ssd1306_128x64_noname, u8x8_cad_001, u8x8_byte_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
  2760. u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
  2761. }
  2762. }
  2763. */
  2764. void do_u8x8_header(int controller_idx, int display_idx, int interface_idx)
  2765. {
  2766. FILE *fp = u8x8_cpp_header_fp;
  2767. fprintf(fp, "class U8X8_");
  2768. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2769. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2770. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2771. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2772. fprintf(fp, " : public U8X8 {\n");
  2773. fprintf(fp, " public: ");
  2774. fprintf(fp, "U8X8_");
  2775. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2776. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2777. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2778. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2779. fprintf(fp, "(%s) : U8X8() {\n", interface_list[interface_idx].pins_with_type);
  2780. fprintf(fp, " ");
  2781. fprintf(fp, "u8x8_Setup(getU8x8(), u8x8_d_");
  2782. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
  2783. fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2784. fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].cad));
  2785. fprintf(fp, "%s, ", interface_list[interface_idx].arduino_com_procedure);
  2786. fprintf(fp, "%s);\n", interface_list[interface_idx].arduino_gpio_procedure);
  2787. fprintf(fp, " ");
  2788. fprintf(fp, "%s(getU8x8(), ", interface_list[interface_idx].setpin_function);
  2789. fprintf(fp, "%s);\n", interface_list[interface_idx].pins_plain);
  2790. fprintf(fp, " }\n");
  2791. fprintf(fp, "};\n");
  2792. }
  2793. /*
  2794. class U8G2_SSD1306_128x64_NONAME_1_SW_SPI : public U8G2
  2795. {
  2796. public:
  2797. 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)
  2798. {
  2799. u8g2_Setup_ssd1306_128x64_noname_1(&u8g2, rotation, u8x8_byte_4wire_sw_spi, u8x8_gpio_and_delay_arduino,);
  2800. u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
  2801. }
  2802. };
  2803. */
  2804. void do_display_interface(int controller_idx, int display_idx, const char *postfix, int interface_idx)
  2805. {
  2806. FILE *fp = u8g2_cpp_header_fp;
  2807. printf(" %s %s", postfix, interface_list[interface_idx].interface_name);
  2808. fprintf(fp, "class U8G2_");
  2809. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2810. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2811. fprintf(fp, "%s", struppercase(postfix));
  2812. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2813. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2814. fprintf(fp, " : public U8G2 {\n");
  2815. fprintf(fp, " public: ");
  2816. fprintf(fp, "U8G2_");
  2817. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  2818. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2819. fprintf(fp, "%s", struppercase(postfix));
  2820. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  2821. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  2822. fprintf(fp, "(const u8g2_cb_t *rotation, ");
  2823. fprintf(fp, "%s) : U8G2() {\n", interface_list[interface_idx].pins_with_type);
  2824. fprintf(fp, " ");
  2825. /*
  2826. fprintf(fp, "u8g2_Setup_");
  2827. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
  2828. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2829. fprintf(fp, "%s", postfix);
  2830. */
  2831. fprintf(fp, "%s", get_setup_function_name(controller_idx, display_idx, postfix));
  2832. fprintf(fp, "(&u8g2, ");
  2833. fprintf(fp, "rotation, ");
  2834. fprintf(fp, "%s, ", interface_list[interface_idx].arduino_com_procedure);
  2835. fprintf(fp, "%s);\n", interface_list[interface_idx].arduino_gpio_procedure);
  2836. fprintf(fp, " ");
  2837. fprintf(fp, "%s(getU8x8(), ", interface_list[interface_idx].setpin_function);
  2838. fprintf(fp, "%s);\n", interface_list[interface_idx].pins_plain);
  2839. fprintf(fp, " }\n");
  2840. fprintf(fp, "};\n");
  2841. if ( strcmp(postfix, "1") == 0 )
  2842. do_u8x8_header(controller_idx, display_idx, interface_idx);
  2843. }
  2844. /*===========================================*/
  2845. void do_display(int controller_idx, int display_idx, const char *postfix)
  2846. {
  2847. do_setup_prototype(setup_header_fp, controller_idx, display_idx, postfix);
  2848. fprintf(setup_header_fp, ";\n");
  2849. do_setup_prototype(setup_code_fp, controller_idx, display_idx, postfix);
  2850. fprintf(setup_code_fp, "\n");
  2851. fprintf(setup_code_fp, "{\n");
  2852. fprintf(setup_code_fp, " uint8_t tile_buf_height;\n");
  2853. fprintf(setup_code_fp, " uint8_t *buf;\n");
  2854. fprintf(setup_code_fp, " u8g2_SetupDisplay(u8g2, u8x8_d_");
  2855. fprintf(setup_code_fp, "%s_", strlowercase(controller_list[controller_idx].name));
  2856. fprintf(setup_code_fp, "%s, ", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  2857. fprintf(setup_code_fp, "%s, ", controller_list[controller_idx].cad);
  2858. fprintf(setup_code_fp, "byte_cb, gpio_and_delay_cb);\n");
  2859. fprintf(setup_code_fp, " buf = ");
  2860. //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);
  2861. 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);
  2862. fprintf(setup_code_fp, " u8g2_SetupBuffer(u8g2, buf, tile_buf_height, %s, rotation);\n", controller_list[controller_idx].ll_hvline);
  2863. fprintf(setup_code_fp, "}\n");
  2864. /* generate interfaces for this display */
  2865. if ( controller_list[controller_idx].com & COM_4WSPI )
  2866. {
  2867. do_display_interface(controller_idx, display_idx, postfix, 0); /* SW SPI */
  2868. do_display_interface(controller_idx, display_idx, postfix, 1); /* HW SPI */
  2869. do_display_interface(controller_idx, display_idx, postfix, 12); /* 2nd HW SPI */
  2870. }
  2871. if ( controller_list[controller_idx].com & COM_3WSPI )
  2872. {
  2873. do_display_interface(controller_idx, display_idx, postfix, 4); /* 3wire SW SPI */
  2874. do_display_interface(controller_idx, display_idx, postfix, 5); /* 3wire HW SPI (not implemented) */
  2875. }
  2876. if ( controller_list[controller_idx].com & COM_6800 )
  2877. {
  2878. do_display_interface(controller_idx, display_idx, postfix, 2); /* 6800 mode */
  2879. }
  2880. if ( controller_list[controller_idx].com & COM_8080 )
  2881. {
  2882. do_display_interface(controller_idx, display_idx, postfix, 3); /* 8080 mode */
  2883. }
  2884. if ( controller_list[controller_idx].com & COM_I2C )
  2885. {
  2886. do_display_interface(controller_idx, display_idx, postfix, 6); /* SW I2C */
  2887. do_display_interface(controller_idx, display_idx, postfix, 7); /* HW I2C */
  2888. do_display_interface(controller_idx, display_idx, postfix, 10); /* 2nd HW I2C */
  2889. }
  2890. if ( controller_list[controller_idx].com & COM_ST7920SPI )
  2891. {
  2892. do_display_interface(controller_idx, display_idx, postfix, 8); /* ST7920 SW SPI */
  2893. do_display_interface(controller_idx, display_idx, postfix, 9); /* HW SPI */
  2894. do_display_interface(controller_idx, display_idx, postfix, 14); /* 2ND HW SPI */
  2895. }
  2896. if ( controller_list[controller_idx].com & COM_UART )
  2897. {
  2898. /* currently there is no Arduino C++ interface, instead the interface is created manually in the example */
  2899. }
  2900. if ( controller_list[controller_idx].com & COM_KS0108 )
  2901. {
  2902. do_display_interface(controller_idx, display_idx, postfix, 11); /* KS0108 6800 parallel mode */
  2903. }
  2904. if ( controller_list[controller_idx].com & COM_SED1520 )
  2905. {
  2906. do_display_interface(controller_idx, display_idx, postfix, 13);
  2907. }
  2908. }
  2909. void do_controller_buffer_code(int idx, const char *postfix, int buf_len, int rows)
  2910. {
  2911. int display_idx;
  2912. char s[1024];
  2913. //sprintf(s, "u8g2_m_%s_%d_%d_%s", strlowercase(controller_list[idx].name), controller_list[idx].tile_width, controller_list[idx].tile_height, postfix);
  2914. /* this should fix #370, additionally the controller is removed (hope that this will not break anything) */
  2915. sprintf(s, "u8g2_m_%d_%d_%s", controller_list[idx].tile_width, controller_list[idx].tile_height, postfix);
  2916. if ( str_exists(s) == 0 )
  2917. {
  2918. str_add(s);
  2919. //FILE *fp = stdout;
  2920. fprintf(buf_code_fp, "uint8_t *%s(uint8_t *page_cnt)\n", s);
  2921. fprintf(buf_code_fp, "{\n");
  2922. fprintf(buf_code_fp, " #ifdef U8G2_USE_DYNAMIC_ALLOC\n");
  2923. fprintf(buf_code_fp, " *page_cnt = %d;\n", rows);
  2924. fprintf(buf_code_fp, " return 0;\n");
  2925. fprintf(buf_code_fp, " #else\n");
  2926. fprintf(buf_code_fp, " static uint8_t buf[%d];\n", buf_len);
  2927. fprintf(buf_code_fp, " *page_cnt = %d;\n", rows);
  2928. fprintf(buf_code_fp, " return buf;\n");
  2929. fprintf(buf_code_fp, " #endif\n");
  2930. fprintf(buf_code_fp, "}\n");
  2931. fprintf(buf_header_fp, "uint8_t *%s(uint8_t *page_cnt);\n", s);
  2932. }
  2933. display_idx = 0;
  2934. fprintf(setup_code_fp, "/* %s %s */\n", controller_list[idx].name, postfix);
  2935. while( controller_list[idx].display_list[display_idx].name != NULL )
  2936. {
  2937. do_display(idx, display_idx, postfix);
  2938. display_idx++;
  2939. }
  2940. }
  2941. void do_controller_list(void)
  2942. {
  2943. int i;
  2944. for( i = 0; i < sizeof(controller_list)/sizeof(*controller_list); i++ )
  2945. {
  2946. printf("%s: ",controller_list[i].name);
  2947. fprintf(setup_code_fp, "/* %s */\n", controller_list[i].name);
  2948. do_controller_buffer_code(i, "1", controller_list[i].tile_width*8, 1);
  2949. do_controller_buffer_code(i, "2", controller_list[i].tile_width*8*2, 2);
  2950. do_controller_buffer_code(i, "f", controller_list[i].tile_width*8*controller_list[i].tile_height, controller_list[i].tile_height);
  2951. printf("\n");
  2952. }
  2953. }
  2954. int is_arduino_cpp = 1;
  2955. int is_u8g2 = 1;
  2956. FILE *md_fp;
  2957. void do_md_display(int controller_idx, int display_idx)
  2958. {
  2959. FILE *fp = md_fp;
  2960. /*
  2961. fprintf(fp, "%s:", controller_list[controller_idx].name);
  2962. fprintf(fp, "%s\n", controller_list[controller_idx].display_list[display_idx].name);
  2963. */
  2964. if ( is_u8g2 )
  2965. {
  2966. fprintf(fp, "\n");
  2967. fprintf(fp, "## %s ", struppercase(controller_list[controller_idx].name));
  2968. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2969. fprintf(fp, "\n");
  2970. #ifdef MD_TABLES
  2971. fprintf(fp, "| Controller \"%s\", ", controller_list[controller_idx].name);
  2972. fprintf(fp, "Display \"%s\" | ", controller_list[controller_idx].display_list[display_idx].name);
  2973. fprintf(fp, "Description |\n");
  2974. fprintf(fp, "|---|---|\n");
  2975. #else
  2976. fprintf(fp, "Controller \"%s\", ", controller_list[controller_idx].name);
  2977. fprintf(fp, "Display \"%s\" ", controller_list[controller_idx].display_list[display_idx].name);
  2978. fprintf(fp, "\n");
  2979. #endif
  2980. }
  2981. else
  2982. {
  2983. if ( is_u8g2 != 0 || strcmp(controller_list[controller_idx].ll_hvline, U8X8_HVLINE ) == 0 )
  2984. {
  2985. fprintf(fp, "\n");
  2986. fprintf(fp, "## %s ", struppercase(controller_list[controller_idx].name));
  2987. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  2988. fprintf(fp, "\n");
  2989. fprintf(fp, "| Controller \"%s\", ", controller_list[controller_idx].name);
  2990. fprintf(fp, "Display \"%s\" |\n", controller_list[controller_idx].display_list[display_idx].name);
  2991. fprintf(fp, "|---|\n");
  2992. }
  2993. }
  2994. }
  2995. void do_md_display_interface_buffer(int controller_idx, int display_idx, int interface_idx, char *postfix, int size, int rows)
  2996. {
  2997. FILE *fp = md_fp;
  2998. #ifdef MD_TABLES
  2999. if ( is_u8g2 )
  3000. {
  3001. if ( is_arduino_cpp )
  3002. {
  3003. fprintf(fp, "| U8G2_");
  3004. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  3005. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  3006. fprintf(fp, "%s", struppercase(postfix));
  3007. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  3008. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  3009. fprintf(fp, "(rotation, %s)", interface_list[interface_idx].pins_md_plain);
  3010. if ( postfix[0] == 'f' )
  3011. {
  3012. fprintf(fp, " | full framebuffer, size = %d bytes |\n", size);
  3013. }
  3014. else
  3015. {
  3016. fprintf(fp, " | page buffer, size = %d bytes |\n", size);
  3017. }
  3018. }
  3019. else
  3020. {
  3021. fprintf(fp, "| ");
  3022. fprintf(fp, "%s", get_setup_function_name(controller_idx, display_idx, postfix));
  3023. fprintf(fp, "(u8g2, ");
  3024. fprintf(fp, "rotation, ");
  3025. fprintf(fp, "%s, ", interface_list[interface_idx].generic_com_procedure);
  3026. fprintf(fp, "%s)", "uC specific");
  3027. if ( postfix[0] == 'f' )
  3028. {
  3029. fprintf(fp, " | full framebuffer, size = %d bytes |\n", size);
  3030. }
  3031. else
  3032. {
  3033. fprintf(fp, " | page buffer, size = %d bytes |\n", size);
  3034. }
  3035. }
  3036. }
  3037. #else
  3038. if ( is_u8g2 )
  3039. {
  3040. if ( is_arduino_cpp )
  3041. {
  3042. fprintf(fp, " * U8G2_");
  3043. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  3044. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  3045. fprintf(fp, "%s", struppercase(postfix));
  3046. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  3047. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  3048. fprintf(fp, "(rotation, %s)", interface_list[interface_idx].pins_md_plain);
  3049. /* removed to reduce the size of the md file */
  3050. /*
  3051. if ( postfix[0] == 'f' )
  3052. {
  3053. fprintf(fp, " [full framebuffer, size = %d bytes]\n", size);
  3054. }
  3055. else
  3056. {
  3057. fprintf(fp, " [page buffer, size = %d bytes]\n", size);
  3058. }
  3059. */
  3060. fprintf(fp, "\n");
  3061. }
  3062. else
  3063. {
  3064. fprintf(fp, " * ");
  3065. fprintf(fp, "%s", get_setup_function_name(controller_idx, display_idx, postfix));
  3066. fprintf(fp, "(u8g2, ");
  3067. fprintf(fp, "rotation, ");
  3068. fprintf(fp, "%s, ", interface_list[interface_idx].generic_com_procedure);
  3069. fprintf(fp, "%s)", "uC specific");
  3070. /* removed to reduce the size of the md file */
  3071. /*
  3072. if ( postfix[0] == 'f' )
  3073. {
  3074. fprintf(fp, " [full framebuffer, size = %d bytes]\n", size);
  3075. }
  3076. else
  3077. {
  3078. fprintf(fp, " [page buffer, size = %d bytes]\n", size);
  3079. }
  3080. */
  3081. fprintf(fp, "\n");
  3082. }
  3083. }
  3084. #endif
  3085. }
  3086. void do_md_display_interface(int controller_idx, int display_idx, int interface_idx)
  3087. {
  3088. FILE *fp = md_fp;
  3089. if ( !is_u8g2 )
  3090. {
  3091. if ( strcmp(controller_list[controller_idx].ll_hvline, U8X8_HVLINE ) == 0 )
  3092. {
  3093. if ( is_arduino_cpp )
  3094. {
  3095. fprintf(fp, "| U8X8_");
  3096. fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
  3097. fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
  3098. if ( interface_list[interface_idx].interface_name[0] != '\0' )
  3099. fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
  3100. fprintf(fp, "(%s) |\n", interface_list[interface_idx].pins_md_plain);
  3101. }
  3102. else
  3103. {
  3104. fprintf(fp, "| u8x8_Setup(u8x8, u8x8_d_");
  3105. fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
  3106. fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
  3107. fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].cad));
  3108. fprintf(fp, "%s, ", strlowercase(interface_list[interface_idx].generic_com_procedure));
  3109. fprintf(fp, "uC specific) |\n");
  3110. }
  3111. }
  3112. }
  3113. do_md_display_interface_buffer(controller_idx, display_idx, interface_idx, "1", controller_list[controller_idx].tile_width*8, 1);
  3114. do_md_display_interface_buffer(controller_idx, display_idx, interface_idx, "2", controller_list[controller_idx].tile_width*8*2, 2);
  3115. 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);
  3116. }
  3117. void do_md_controller_list(void)
  3118. {
  3119. int controller_idx, display_idx;
  3120. for( controller_idx = 0; controller_idx < sizeof(controller_list)/sizeof(*controller_list); controller_idx++ )
  3121. {
  3122. display_idx = 0;
  3123. while( controller_list[controller_idx].display_list[display_idx].name != NULL )
  3124. {
  3125. do_md_display(controller_idx, display_idx);
  3126. /* generate interfaces for this display */
  3127. if ( controller_list[controller_idx].com & COM_4WSPI )
  3128. {
  3129. do_md_display_interface(controller_idx, display_idx, 0); /* SW SPI */
  3130. if ( is_arduino_cpp )
  3131. {
  3132. do_md_display_interface(controller_idx, display_idx, 1); /* HW SPI */
  3133. do_md_display_interface(controller_idx, display_idx, 12); /* 2nd HW SPI */
  3134. }
  3135. }
  3136. if ( controller_list[controller_idx].com & COM_3WSPI )
  3137. {
  3138. do_md_display_interface(controller_idx, display_idx, 4); /* 3wire SW SPI */
  3139. do_md_display_interface(controller_idx, display_idx, 5); /* 3wire HW SPI (not implemented) */
  3140. }
  3141. if ( controller_list[controller_idx].com & COM_6800 )
  3142. {
  3143. do_md_display_interface(controller_idx, display_idx, 2); /* 6800 mode */
  3144. }
  3145. if ( controller_list[controller_idx].com & COM_8080 )
  3146. {
  3147. do_md_display_interface(controller_idx, display_idx, 3); /* 8080 mode */
  3148. }
  3149. if ( controller_list[controller_idx].com & COM_I2C )
  3150. {
  3151. do_md_display_interface(controller_idx, display_idx, 6); /* SW I2C */
  3152. do_md_display_interface(controller_idx, display_idx, 7); /* HW I2C */
  3153. do_md_display_interface(controller_idx, display_idx, 10); /* 2nd HW I2C */
  3154. }
  3155. if ( controller_list[controller_idx].com & COM_ST7920SPI )
  3156. {
  3157. do_md_display_interface(controller_idx, display_idx, 8); /* ST7920 SW SPI */
  3158. do_md_display_interface(controller_idx, display_idx, 9); /* HW SPI (not yet implemented) */
  3159. do_md_display_interface(controller_idx, display_idx, 14); /* 2ND HW SPI */
  3160. }
  3161. if ( controller_list[controller_idx].com & COM_KS0108 )
  3162. {
  3163. do_md_display_interface(controller_idx, display_idx, 11); /* KS0108 */
  3164. }
  3165. if ( controller_list[controller_idx].com & COM_SED1520 )
  3166. {
  3167. do_md_display_interface(controller_idx, display_idx, 13); /* SED1520 */
  3168. }
  3169. display_idx++;
  3170. }
  3171. }
  3172. }
  3173. int main(void)
  3174. {
  3175. buf_code_fp = fopen("u8g2_d_memory.c", "w");
  3176. fprintf(buf_code_fp, "/* u8g2_d_memory.c */\n");
  3177. fprintf(buf_code_fp, "/* generated code, codebuild, u8g2 project */\n");
  3178. fprintf(buf_code_fp, "\n");
  3179. fprintf(buf_code_fp, "#include \"u8g2.h\"\n");
  3180. fprintf(buf_code_fp, "\n");
  3181. buf_header_fp = fopen("u8g2_memory.h", "w");
  3182. //fprintf(buf_header_fp, "/* start of generated code, codebuild, u8g2 project */\n");
  3183. setup_code_fp = fopen("u8g2_d_setup.c", "w");
  3184. fprintf(setup_code_fp, "/* u8g2_d_setup.c */\n");
  3185. fprintf(setup_code_fp, "/* generated code, codebuild, u8g2 project */\n");
  3186. fprintf(setup_code_fp, "\n");
  3187. fprintf(setup_code_fp, "#include \"u8g2.h\"\n");
  3188. fprintf(setup_code_fp, "\n");
  3189. setup_header_fp = fopen("u8g2_setup.h", "w");
  3190. //fprintf(setup_header_fp, "/* start of generated code, codebuild, u8g2 project */\n");
  3191. u8g2_cpp_header_fp = fopen("U8g2lib.h", "w");
  3192. fprintf(u8g2_cpp_header_fp, "/* generated code (codebuild), u8g2 project */\n");
  3193. u8x8_cpp_header_fp = fopen("U8x8lib.h", "w");
  3194. fprintf(u8x8_cpp_header_fp, "/* generated code (codebuild), u8g2 project */\n");
  3195. u8x8_setup_c_md_fp = fopen("u8x8setupc.md", "w");
  3196. u8x8_setup_cpp_md_fp = fopen("u8x8setupcpp.md", "w");
  3197. u8g2_setup_c_md_fp = fopen("u8g2setupc.md", "w");
  3198. u8g2_setup_cpp_md_fp = fopen("u8g2setupcpp.md", "w");
  3199. do_controller_list();
  3200. md_fp = u8g2_setup_cpp_md_fp;
  3201. is_arduino_cpp = 1;
  3202. is_u8g2 = 1;
  3203. do_md_controller_list();
  3204. md_fp = u8g2_setup_c_md_fp;
  3205. is_arduino_cpp = 0;
  3206. is_u8g2 = 1;
  3207. do_md_controller_list();
  3208. md_fp = u8x8_setup_cpp_md_fp;
  3209. is_arduino_cpp = 1;
  3210. is_u8g2 = 0;
  3211. do_md_controller_list();
  3212. md_fp = u8x8_setup_c_md_fp;
  3213. is_arduino_cpp = 0;
  3214. is_u8g2 = 0;
  3215. do_md_controller_list();
  3216. fprintf(buf_code_fp, "/* end of generated code */\n");
  3217. fclose(buf_code_fp);
  3218. //fprintf(buf_header_fp, "/* end of generated code */\n");
  3219. fclose(buf_header_fp);
  3220. fprintf(setup_code_fp, "/* end of generated code */\n");
  3221. fclose(setup_code_fp);
  3222. //fprintf(setup_header_fp, "/* end of generated code */\n");
  3223. fclose(setup_header_fp);
  3224. fclose(u8g2_cpp_header_fp);
  3225. fclose(u8x8_cpp_header_fp);
  3226. fclose(u8x8_setup_c_md_fp);
  3227. fclose(u8x8_setup_cpp_md_fp);
  3228. fclose(u8g2_setup_c_md_fp);
  3229. fclose(u8g2_setup_cpp_md_fp);
  3230. system("cp u8g2_d_memory.c ../../csrc/.");
  3231. puts("generate u8g2_d_memory.c");
  3232. system("cp u8g2_d_setup.c ../../csrc/.");
  3233. puts("generate u8g2_d_setup.c");
  3234. insert_into_file("../../csrc/u8g2.h", "u8g2_memory.h", "/* u8g2_d_memory.c generated code start */", "/* u8g2_d_memory.c generated code end */");
  3235. insert_into_file("../../csrc/u8g2.h", "u8g2_setup.h", "/* u8g2_d_setup.c generated code start */", "/* u8g2_d_setup.c generated code end */");
  3236. insert_into_file("../../cppsrc/U8g2lib.h", "U8g2lib.h", "/* Arduino constructor list start */", "/* Arduino constructor list end */");
  3237. insert_into_file("../../cppsrc/U8x8lib.h", "U8x8lib.h", "// constructor list start", "// constructor list end");
  3238. insert_into_file("../../../u8g2.wiki/u8g2setupc.md", "u8g2setupc.md", "# Setup Function Reference", "# Links");
  3239. insert_into_file("../../../u8g2.wiki/u8g2setupcpp.md", "u8g2setupcpp.md", "# Constructor Reference", "# Links");
  3240. insert_into_file("../../../u8g2.wiki/u8x8setupc.md", "u8x8setupc.md", "# Setup Function Reference", "# Links");
  3241. insert_into_file("../../../u8g2.wiki/u8x8setupcpp.md", "u8x8setupcpp.md", "# Constructor Reference", "# Links");
  3242. return 0;
  3243. }