| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676 |
- /*
- generate and update c/c++ files
- this also replaces the buildcpp tool
-
-
- Dec 2018:
- There are now two SSD13xx cad procedures:
- u8x8_cad_ssd13xx_i2c Put a I2C start/stop around each command and each argument --> many start/stop commands
- u8x8_cad_ssd13xx_fast_i2c Put a I2C start/stop around each command+arg sequence --> start/stop is probably halfed --> 4% faster
-
- */
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <error.h>
- #include <ctype.h>
- #include <unistd.h>
- /*===========================================*/
- /* ll_hvline */
- #define U8X8_HVLINE "u8g2_ll_hvline_vertical_top_lsb"
- #define COM_4WSPI 0x0001
- #define COM_3WSPI 0x0002
- #define COM_6800 0x0004
- #define COM_8080 0x0008
- #define COM_I2C 0x0010
- #define COM_ST7920SPI 0x0020 /* mostly identical to COM_4WSPI, but does not use DC */
- #define COM_UART 0x0040
- #define COM_KS0108 0x0080 /* mostly identical to 6800 mode, but has more chip select lines */
- #define COM_SED1520 0x0100
- struct interface
- {
- const char *interface_name; /* SW_SPI */
- const char *setpin_function; /* u8x8_SetPin_4Wire_SW_SPI */
- const char *arm_linux_com_procedure; /* u8x8_byte_4wire_sw_spi */
- const char *arm_linux_gpio_procedure; /* u8x8_arm_linux_gpio_and_delay */
- const char *pins_with_type; /* uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE */
- const char *pins_plain; /* clock, data, cs, dc, reset */
- const char *pins_md_plain; /* clock, data, cs, dc, reset */
- const char *generic_com_procedure; /* u8x8_byte_4wire_sw_spi, this is used for documentation, so it suould be generic for all uC architectures */
- };
- struct display
- {
- /* this name must match the display part of the device procedure */
- /* u8x8_d_<controller>_<display> */
-
- const char *name;
- };
- struct controller
- {
- /* the name must match the controller part of the device procedure */
- /* u8x8_d_<controller>_<display> */
- const char *name;
-
- int tile_width;
- int tile_height;
- const char *ll_hvline;
- const char *cad;
- const char *cad_shortname;
- unsigned com;
- char *note;
- unsigned is_generate_u8g2_class; /* currently not used, instead conrolled by COM_UART */
- struct display display_list[16]; /* usually not used completly, but space does not matter much here */
- };
- /* issue #649 */
- /* display_controller_list_start */
- struct controller controller_list[] =
- {
- {
- "ssd1305", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x32_noname" },
- { "128x32_adafruit" },
- { NULL }
- }
- },
- {
- "ssd1305", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x32_noname" },
- { "128x32_adafruit" },
- { NULL }
- }
- },
- {
- "ssd1305", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64_adafruit" },
- { "128x64_raystar" },
- { NULL }
- }
- },
- {
- "ssd1305", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64_adafruit" },
- { "128x64_raystar" },
- { NULL }
- }
- },
- {
- "ssd1306", 255, 2, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "2040x16" },
- { NULL }
- }
- },
-
- {
- "ssd1306", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64_noname" },
- { "128x64_vcomh0" },
- { "128x64_alt0" },
- { NULL }
- }
- },
- {
- "ssd1306", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64_noname" },
- { "128x64_vcomh0" },
- { "128x64_alt0" },
- { NULL }
- }
- },
-
- {
- "ssd1306", 9, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "72x40_er" },
- { NULL }
- }
- },
- {
- "ssd1306", 9, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "72x40_er" },
- { NULL }
- }
- },
- {
- "sh1106", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64_noname" },
- { "128x64_vcomh0" },
- { "128x64_winstar" },
- { NULL }
- }
- },
- {
- "sh1106", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64_noname" },
- { "128x64_vcomh0" },
- { "128x64_winstar" },
- { NULL }
- }
- },
- {
- "sh1106", 9, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "72x40_wise" },
- { NULL }
- }
- },
- {
- "sh1106", 9, 5, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "72x40_wise" },
- { NULL }
- }
- },
- {
- "sh1106", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "64x32" },
- { NULL }
- }
- },
- {
- "sh1106", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "64x32" },
- { NULL }
- }
- },
-
- {
- "sh1107", 8, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "64x128" },
- { NULL }
- }
- },
- {
- "sh1107", 8, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "64x128" },
- { NULL }
- }
- },
-
- {
- "sh1107", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "seeed_96x96" },
- { NULL }
- }
- },
- {
- "sh1107", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "seeed_96x96" },
- { NULL }
- }
- },
- {
- "sh1107", 10, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x80" }, /* actually this is a 80x128 display */
- { NULL }
- }
- },
- {
- "sh1107", 10, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x80" }, /* actually this is a 80x128 display */
- { NULL }
- }
- },
- {
- "sh1107", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x128" }, // not tested
- { "pimoroni_128x128" }, // not tested
- { "seeed_128x128" }, // in lab
- { NULL }
- }
- },
- {
- "sh1107", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x128" }, // not tested
- { "pimoroni_128x128" }, // not tested
- { "seeed_128x128" }, // in lab
- { NULL }
- }
- },
- {
- "sh1108", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "160x160" },
- { NULL }
- }
- },
- {
- "sh1108", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "160x160" },
- { NULL }
- }
- },
-
- {
- "sh1122", 32, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "256x64" },
- { NULL }
- }
- },
- {
- "sh1122", 32, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "256x64" },
- { NULL }
- }
- },
- {
- "ssd1306", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x32_univision" },
- { "128x32_winstar" },
- { NULL }
- }
- },
- {
- "ssd1306", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x32_univision" },
- { "128x32_winstar" },
- { NULL }
- }
- },
- {
- "ssd1306", 13, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "102x64_ea_oleds102" },
- { NULL }
- }
- },
- {
- "ssd1306", 13, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "102x64_ea_oleds102" },
- { NULL }
- }
- },
-
- {
- "sh1106", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x32_visionox" },
- { NULL }
- }
- },
- {
- "sh1106", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x32_visionox" },
- { NULL }
- }
- },
- {
- "ssd1306", 8, 6, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "64x48_er" },
- { NULL }
- }
- },
- {
- "ssd1306", 8, 6, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "64x48_er" },
- { NULL }
- }
- },
-
- {
- "ssd1306", 6, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "48x64_winstar" },
- { NULL }
- }
- },
- {
- "ssd1306", 6, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "48x64_winstar" },
- { NULL }
- }
- },
- {
- "ssd1306", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "64x32_noname" },
- { "64x32_1f" },
- { NULL }
- }
- },
- {
- "ssd1306", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "64x32_noname" },
- { "64x32_1f" },
- { NULL }
- }
- },
- {
- "ssd1306", 12, 2, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "96x16_er" },
- { NULL }
- }
- },
- {
- "ssd1306", 12, 2, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "96x16_er" },
- { NULL }
- }
- },
-
-
- {
- "ssd1309", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64_noname2" },
- { NULL }
- }
- },
- {
- "ssd1309", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64_noname2" },
- { NULL }
- }
- },
-
- {
- "ssd1309", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64_noname0" },
- { NULL }
- }
- },
- {
- "ssd1309", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64_noname0" },
- { NULL }
- }
- },
- /* https://github.com/olikraus/u8g2/issues/919 */
- {
- "ssd1316", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x32" },
- { NULL }
- }
- },
- {
- "ssd1316", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x32" },
- { NULL }
- }
- },
-
- {
- "ssd1317", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "96x96" },
- { NULL }
- }
- },
- {
- "ssd1317", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "96x96" },
- { NULL }
- }
- },
-
- /* issue 784 */
- {
- "ssd1318", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x96" },
- { "128x96_xcp" }, // with external charge pump
- { NULL }
- }
- },
- {
- "ssd1318", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_fast_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x96" },
- { "128x96_xcp" }, // with external charge pump
- { NULL }
- }
- },
-
-
- {
- "ssd1325", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "nhd_128x64" },
- { NULL }
- }
- },
- {
- "ssd1325", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "nhd_128x64" },
- { NULL }
- }
- },
- {
- "ssd0323", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "os128064" },
- { NULL }
- }
- },
- {
- "ssd0323", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "os128064" },
- { NULL }
- }
- },
- {
- "ssd1326", 32, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "er_256x32" },
- { NULL }
- }
- },
- {
- "ssd1326", 32, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "er_256x32" },
- { NULL }
- }
- },
-
- {
- "ssd1327", 12, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ws_96x64" },
- { NULL }
- }
- },
- {
- "ssd1327", 12, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ws_96x64" },
- { NULL }
- }
- },
- {
- "ssd1327", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "seeed_96x96" },
- { NULL }
- }
- },
- {
- "ssd1327", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "seeed_96x96" },
- { NULL }
- }
- },
- {
- "ssd1327", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ea_w128128" },
- { "midas_128x128" },
- { "ws_128x128" },
- { NULL }
- }
- },
- {
- "ssd1327", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ea_w128128" },
- { "midas_128x128" },
- { "ws_128x128" },
- { NULL }
- }
- },
-
- {
- "ssd1327", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "visionox_128x96" },
- { NULL }
- }
- },
- {
- "ssd1327", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "visionox_128x96" },
- { NULL }
- }
- },
-
- {
- "ssd1329", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x96_noname" },
- { NULL }
- }
- },
- {
- "ssd1329", 12, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "96x96_noname" },
- { NULL }
- }
- },
-
- {
- "ld7032", 8, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "60x32" },
- { "60x32_alt" },
- { NULL }
- }
- },
- {
- "ld7032", 8, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_ld7032_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "60x32" },
- { "60x32_alt" },
- { NULL }
- }
- },
-
- {
- "st7920", 32, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "p", COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "256x32" },
- { NULL }
- }
- },
- {
- "st7920", 32, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_6800,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "256x32" },
- { NULL }
- }
- },
- {
- "st7920", 32, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_st7920_spi", "s", COM_ST7920SPI,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "256x32" },
- { NULL }
- }
- },
-
- {
- "st7920", 24, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "p", COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "192x32" },
- { NULL }
- }
- },
- {
- "st7920", 24, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_6800,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "192x32" },
- { NULL }
- }
- },
- {
- "st7920", 24, 4, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_st7920_spi", "s", COM_ST7920SPI,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "192x32" },
- { NULL }
- }
- },
-
- {
- "st7920", 16, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "p", COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64" },
- { NULL }
- }
- },
- {
- "st7920", 16, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_001", "", COM_6800,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64" },
- { NULL }
- }
- },
- {
- "st7920", 16, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_st7920_spi", "s", COM_ST7920SPI,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64" },
- { NULL }
- }
- },
- {
- "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 */
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x128" },
- { NULL }
- }
- },
- {
- "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 */
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "400x240" }, // SPI Mode 2
- { "m0_400x240" }, // SPI Mode 0
- { NULL }
- }
- },
- {
- "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 */
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "144x168" },
- { NULL }
- }
- },
- {
- "uc1701", 13, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ea_dogs102" },
- { NULL }
- }
- },
- {
- "uc1701", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "mini12864" },
- { NULL }
- }
- },
- {
- "pcd8544", 11, 6, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
- "No HW flip", /* is_generate_u8g2_class= */ 1,
- {
- { "84x48" },
- { NULL }
- }
- },
- {
- "pcf8812", 12, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
- "No HW flip", /* is_generate_u8g2_class= */ 1,
- {
- { "96x65" },
- { NULL }
- }
- },
- {
- "hx1230", 12, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
- "No HW flip", /* is_generate_u8g2_class= */ 1,
- {
- { "96x68" },
- { NULL }
- }
- },
- {
- "uc1604", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx19264" },
- { NULL }
- }
- },
- {
- "uc1604", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx19264" },
- { NULL }
- }
- },
- {
- "uc1608", 30, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "erc24064" },
- { "dem240064" },
- { NULL }
- }
- },
- {
- "uc1608", 30, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "erc24064" },
- { "dem240064" },
- { NULL }
- }
- },
- {
- "uc1608", 30, 15, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "erc240120" },
- { NULL }
- }
- },
- {
- "uc1608", 30, 15, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "erc240120" },
- { NULL }
- }
- },
- {
- "uc1608", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "240x128" },
- { NULL }
- }
- },
- {
- "uc1608", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "240x128" },
- { NULL }
- }
- },
- {
- "uc1609", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "slg19264" },
- { NULL }
- }
- },
- {
- "uc1609", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "slg19264" },
- { NULL }
- }
- },
-
- {
- "uc1638", 20, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "160x128" },
- { NULL }
- }
- },
- {
- "uc1638", 24, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "192x96" },
- { NULL }
- }
- },
- {
- "uc1638", 24, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc1638_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "192x96" },
- { NULL }
- }
- },
-
- //{
- /* this device requires cd=1 for arguments, not clear whether the u8x8_cad_uc16xx_i2c works */
- //"uc1638", 20, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- //"", /* is_generate_u8g2_class= */ 1,
- //{
- // { "160x128" },
- // { NULL }
- //}
- //},
-
- {
- "uc1610", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "3W SPI not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "ea_dogxl160" },
- { NULL }
- }
- },
- {
- "uc1610", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "3W SPI not tested, I2C not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "ea_dogxl160" },
- { NULL }
- }
- },
- {
- "uc1611", 30, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ea_dogm240" },
- { NULL }
- }
- },
- {
- "uc1611", 30, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ea_dogm240" },
- { NULL }
- }
- },
- {
- "uc1611", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ea_dogxl240" },
- { NULL }
- }
- },
- {
- "uc1611", 30, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ea_dogxl240" },
- { NULL }
- }
- },
- {
- "uc1611", 30, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "240x160, active high chip select", /* is_generate_u8g2_class= */ 1,
- {
- { "ew50850" }, /* 240x160 */
- { NULL }
- }
- },
- {
- "uc1611", 30, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "240x160, active high chip select", /* is_generate_u8g2_class= */ 1,
- {
- { "ew50850" }, /* 240x160 */
- { NULL }
- }
- },
-
- {
- "uc1611", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "use CS0 as chips select", /* is_generate_u8g2_class= */ 1,
- {
- { "cg160160" },
- { NULL }
- }
- },
- {
- "uc1611", 20, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "cg160160" },
- { NULL }
- }
- },
- {
- "uc1611", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ids4073" },
- { NULL }
- }
- },
- {
- "uc1611", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ids4073" },
- { NULL }
- }
- },
-
- {
- "st7511", 40, 30, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "avd_320x240" }, /* 320x240 */
- { NULL }
- }
- },
- {
- "st7528", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "nhd_c160100" },
- { NULL }
- }
- },
- {
- "st7528", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "nhd_c160100" },
- { NULL }
- }
- },
- {
- "st7528", 20, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "erc16064" },
- { NULL }
- }
- },
- {
- "st7528", 20, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "erc16064" },
- { NULL }
- }
- },
-
-
- {
- "uc1617", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx128128" },
- { NULL }
- }
- },
- {
- "uc1617", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx128128" },
- { NULL }
- }
- },
-
- {
- "st7565", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ea_dogm128" },
- { "lm6063" }, /* https://github.com/olikraus/u8g2/issues/893 */
- { "64128n" },
- { "zolen_128x64" },
- { "lm6059" },
- { "ks0713" }, /* KS0713 chip, which seems to be almost compatible to ST7565 */
- { "lx12864" },
- { "erc12864" },
- { "erc12864_alt" }, /* issue 790 */
- { "nhd_c12864" },
- { "jlx12864" },
- { NULL }
- },
- },
- {
- "st7565", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "nhd_c12832" },
- { NULL }
- }
- },
- {
- "uc1601", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x32" },
- { NULL }
- }
- },
- {
- "uc1601", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x32" },
- { NULL }
- }
- },
- {
- "uc1601", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64" },
- { NULL }
- }
- },
- {
- "uc1601", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_uc16xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64" },
- { NULL }
- }
- },
-
- {
- "st7565", 17, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "ea_dogm132" },
- { NULL }
- }
- },
- {
- "st7567", 17, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "pi_132x64" },
- { NULL }
- }
- },
- {
- "st7567", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx12864" },
- { "enh_dg128064" },
- { "enh_dg128064i" },
- { "os12864" },
- { NULL }
- }
- },
- {
- "st7567", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "64x32" },
- { "hem6432" },
- { NULL }
- }
- },
- {
- "st7567", 8, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "64x32" },
- { "hem6432" },
- { NULL }
- }
- },
-
- {
- "st7571", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x128" },
- { NULL }
- }
- },
- {
- "st7571", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x128" },
- { NULL }
- }
- },
- {
- "st7571", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x96" },
- { NULL }
- }
- },
- {
- "st7571", 16, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x96" },
- { NULL }
- }
- },
-
-
- {
- "st7586s", 48, 17, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "s028hn118a" },
- { NULL }
- },
- },
-
- {
- "st7586s", 30, 20, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "erc240160" },
- { "ymc240160" },
- { NULL }
- },
- },
-
- {
- "st7588", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx12864" },
- { NULL }
- },
- },
- { /* the ST7588 has the same I2C protocol as the SSD13xx */
- "st7588", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_ssd13xx_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx12864" },
- { NULL }
- }
- },
- {
- "st75256", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx256128" },
- { "wo256x128" },
- { NULL }
- },
- },
- /* the ST75256 has the same I2C protocol as the SSD13xx, BUT: for arguments have the data bit set!!!! */
- /* this means, we need to implement a u8x8_cad_ssd13xx_i2c procedure with cad 011 functionality */
- /* done: u8x8_cad_st75256_i2c */
- {
- "st75256", 32, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx256128" },
- { "wo256x128" },
- { NULL }
- }
- },
- {
- "st75256", 32, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx256160" },
- { "jlx256160m" },
- { "jlx256160_alt" },
- { NULL }
- },
- },
- /* the ST75256 has the same I2C protocol as the SSD13xx, BUT: for arguments have the data bit set!!!! */
- /* this means, we need to implement a u8x8_cad_ssd13xx_i2c procedure with cad 011 functionality */
- /* done: u8x8_cad_st75256_i2c */
- {
- "st75256", 32, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx256160" },
- { "jlx256160m" },
- { "jlx256160_alt" },
- { NULL }
- }
- },
-
- {
- "st75256", 30, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx240160" },
- { NULL }
- },
- },
- {
- "st75256", 30, 20, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx240160" },
- { NULL }
- }
- },
- {
- "st75256", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx25664" },
- { NULL }
- },
- },
- {
- "st75256", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx25664" },
- { NULL }
- }
- },
-
- {
- "st75256", 22, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx172104" },
- { NULL }
- },
- },
-
- {
- "st75256", 22, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx172104" },
- { NULL }
- },
- },
- {
- "st75256", 24, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx19296" },
- { NULL }
- },
- },
-
- {
- "st75256", 24, 12, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx19296" },
- { NULL }
- },
- },
- {
- "st75320", 40, 30, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx320240" },
- { NULL }
- },
- },
-
- {
- "st75320", 40, 30, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_st75256_i2c", "i2c", COM_I2C,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "jlx320240" },
- { NULL }
- },
- },
-
-
- {
- "nt7534", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "tg12864r" },
- { NULL }
- }
- },
- {
- "ist3020", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "erc19264" },
- { NULL }
- }
- },
- {
- "ist7920", 16, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x128" },
- { NULL }
- }
- },
- {
- "sbn1661", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_SED1520,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "122x32" },
- { NULL }
- },
- },
- {
- "sed1520", 16, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_SED1520,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "122x32" },
- { NULL }
- },
- },
-
- {
- "ks0108", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_KS0108,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64" },
- { NULL }
- },
- },
- {
- "ks0108", 24, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_KS0108,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "erm19264" },
- { NULL }
- },
- },
- {
- "t7932", 19, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_KS0108,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "150x32" }, /* compatible with hd44102 */
- { NULL }
- },
- },
- {
- "hd44102", 13, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_KS0108,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "100x64" }, /* compatible with t7932 */
- { NULL }
- },
- },
-
-
- {
- "lc7981", 20, 10, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
- "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
- {
- { "160x80" },
- { NULL }
- }
- },
- {
- "lc7981", 20, 20, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
- "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
- {
- { "160x160" },
- { NULL }
- }
- },
- {
- "lc7981", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
- "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
- {
- { "240x128" },
- { NULL }
- }
- },
- {
- "lc7981", 30, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800,
- "U8x8 not supported, no powerdown, no HW flip, no constrast", /* is_generate_u8g2_class= */ 1,
- {
- { "240x64" },
- { NULL }
- }
- },
-
- {
- "t6963", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "240x128" },
- { NULL }
- }
- },
- {
- "t6963", 30, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "240x64" },
- { NULL }
- }
- },
- {
- "t6963", 32, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "256x64" },
- { NULL }
- }
- },
- {
- "t6963", 16, 8, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64" },
- { "128x64_alt" },
- { NULL }
- }
- },
- {
- "t6963", 20, 10, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_8080,
- "Not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "160x80" },
- { NULL }
- }
- },
- {
- "ssd1320", 20, 4, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "160x32" },
- { NULL }
- }
- },
- {
- "ssd1320", 20, 17, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_001", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "160x132" },
- { NULL }
- }
- },
-
- {
- "ssd1322", 32, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "Requires U8G2_16BIT (see u8g2.h)", /* is_generate_u8g2_class= */ 1,
- {
- { "nhd_256x64" },
- { NULL }
- }
- },
- {
- "ssd1322", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "nhd_128x64" },
- { NULL }
- }
- },
- {
- "ssd1606", 22, 9, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI,
- "Partly supported by U8x8, no HW flip, no contrast setting", /* is_generate_u8g2_class= */ 1,
- {
- { "172x72" },
- { NULL }
- }
- },
- {
- "ssd1607", 25, 25, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI,
- "Partly supported by U8x8, no HW flip, no contrast setting, v2 includes an optimized LUT", /* is_generate_u8g2_class= */ 1,
- {
- { "200x200" },
- { "gd_200x200" }, // GDEP015OC1
- { "ws_200x200" }, // Waveshare issue #637
- { NULL }
- }
- },
- {
- "il3820", 37, 16, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_3WSPI,
- "Partly supported by U8x8, no HW flip, no contrast setting, V2 produces lesser screen-flicker", /* is_generate_u8g2_class= */ 1,
- {
- { "296x128" },
- { "v2_296x128" },
- { NULL }
- }
- },
- {
- "sed1330", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
- "Not tested, might work for RA8835 and SED1335 also", /* is_generate_u8g2_class= */ 1,
- {
- { "240x128" },
- { NULL }
- }
- },
- {
- "ra8835", 30, 16, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
- "Tested with RA8835", /* is_generate_u8g2_class= */ 1,
- {
- { "nhd_240x128" },
- { NULL }
- }
- },
- {
- "ra8835", 40, 30, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_100", "", COM_6800|COM_8080,
- "not tested", /* is_generate_u8g2_class= */ 1,
- {
- { "320x240" },
- { NULL }
- }
- },
- {
- "max7219", 8, 1, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "64x8" },
- { NULL }
- }
- },
- {
- "max7219", 4, 1, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "32x8" },
- { NULL }
- }
- },
- #ifdef NOT_POSSIBLE
- {
- "max7219", 2, 2, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "16x16" },
- { NULL }
- }
- },
- #endif
- {
- "max7219", 1, 1, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_4WSPI,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "8x8" },
- { NULL }
- }
- },
-
- {
- "s1d15e06", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "160100" },
- { NULL }
- }
- },
-
- {
- "s1d15721", 20, 13, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_cad_011", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "240x64" },
- { NULL }
- }
- },
- {
- "gu800", 16, 8, "u8g2_ll_hvline_vertical_top_lsb", "u8x8_gu800_cad_110", "", COM_4WSPI|COM_6800|COM_8080,
- "", /* is_generate_u8g2_class= */ 1,
- {
- { "128x64" },
- { NULL }
- }
- },
-
- {
- "a2printer", 48, 30, "u8g2_ll_hvline_horizontal_right_lsb", "u8x8_cad_empty", "", COM_UART,
- "", /* is_generate_u8g2_class= */ 0,
- {
- { "384x240" },
- { NULL }
- }
- }
- };
- /* display_controller_list_end */
- struct interface interface_list[] =
- {
- /* 0 */
- {
- "4W_SW_SPI",
- "u8x8_SetPin_4Wire_SW_SPI",
- "u8x8_byte_4wire_sw_spi", /* improved version over u8x8_byte_4wire_sw_spi */
- "u8x8_arm_linux_gpio_and_delay",
- "uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
- "clock, data, cs, dc, reset",
- "clock, data, cs, dc [, reset]",
- "u8x8_byte_4wire_sw_spi"
- },
- /* 1 */
- {
- "4W_HW_SPI",
- "u8x8_SetPin_4Wire_HW_SPI",
- "u8x8_byte_arm_linux_hw_spi",
- "u8x8_arm_linux_gpio_and_delay",
- "uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
- "cs, dc, reset",
- "cs, dc [, reset]",
- "uC specific"
- },
- /* 2 */
- {
- "6800",
- "u8x8_SetPin_8Bit_6800",
- "u8x8_byte_8bit_6800mode",
- "u8x8_arm_linux_gpio_and_delay",
- "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",
- "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc, reset",
- "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc [, reset]",
- "u8x8_byte_8bit_6800mode"
- },
- /* 3 */
- {
- "8080",
- "u8x8_SetPin_8Bit_8080",
- "u8x8_byte_8bit_8080mode",
- "u8x8_arm_linux_gpio_and_delay",
- "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",
- "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc, reset",
- "d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc [, reset]",
- "u8x8_byte_8bit_8080mode"
- },
- /* 4 */
- {
- "3W_SW_SPI",
- "u8x8_SetPin_3Wire_SW_SPI",
- "u8x8_byte_3wire_sw_spi",
- "u8x8_arm_linux_gpio_and_delay",
- "uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
- "clock, data, cs, reset",
- "clock, data, cs [, reset]",
- "u8x8_byte_3wire_sw_spi"
- },
- /* 5 */
- {
- "3W_HW_SPI",
- "u8x8_SetPin_3Wire_HW_SPI",
- "u8x8_byte_arduino_3wire_hw_spi",
- "u8x8_arm_linux_gpio_and_delay",
- "uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
- "cs, reset",
- "cs [, reset]",
- "uC specific"
- },
- /* 6 */
- {
- "SW_I2C",
- "u8x8_SetPin_SW_I2C",
- "u8x8_byte_sw_i2c" /* u8x8_byte_sw_i2c */,
- "u8x8_arm_linux_gpio_and_delay",
- "uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE",
- "clock, data, reset",
- "clock, data [, reset]",
- "u8x8_byte_sw_i2c" /* u8x8_byte_sw_i2c */
- },
- /* 7 */
- {
- "HW_I2C",
- "u8x8_SetPin_HW_I2C",
- "u8x8_byte_arm_linux_hw_i2c",
- "u8x8_arm_linux_gpio_and_delay",
- "uint8_t reset = U8X8_PIN_NONE, uint8_t clock = U8X8_PIN_NONE, uint8_t data = U8X8_PIN_NONE",
- "reset, clock, data",
- "[reset [, clock, data]]",
- "uC specific"
- },
- /* 8 */
- {
- /* ST7920 */ "SW_SPI",
- "u8x8_SetPin_3Wire_SW_SPI", /* use the 3 wire interface, because the DC is not used */
- "u8x8_byte_4wire_sw_spi", /* improved version over u8x8_byte_4wire_sw_spi */
- "u8x8_arm_linux_gpio_and_delay",
- "uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
- "clock, data, cs, reset",
- "clock, data, cs [, reset]",
- "u8x8_byte_4wire_sw_spi", /* "u8x8_byte_st7920_sw_spi" */
- },
- /* 9 */
- {
- /* ST7920 */ "HW_SPI",
- "u8x8_SetPin_ST7920_HW_SPI",
- "u8x8_byte_arm_linux_hw_spi",
- "u8x8_arm_linux_gpio_and_delay",
- "uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
- "cs, reset",
- "cs [, reset]",
- "uC specific"
- },
- /* 10 */
- {
- "2ND_HW_I2C",
- "u8x8_SetPin_HW_I2C",
- "u8x8_byte_2nd_hw_i2c",
- "u8x8_arm_linux_gpio_and_delay",
- "uint8_t reset = U8X8_PIN_NONE",
- "reset",
- "[reset]",
- "uC specific"
- },
- /* 11 */
- {
- "",
- "u8x8_SetPin_KS0108",
- "u8x8_byte_ks0108",
- "u8x8_arm_linux_gpio_and_delay",
- "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",
- "d0, d1, d2, d3, d4, d5, d6, d7, enable, dc, cs0, cs1, cs2, reset",
- "d0, d1, d2, d3, d4, d5, d6, d7, enable, dc, cs0, cs1, cs2 [, reset]",
- "u8x8_byte_ks0108"
- },
- /* 12 */
- {
- "2ND_4W_HW_SPI",
- "u8x8_SetPin_4Wire_HW_SPI",
- "u8x8_byte_2nd_hw_spi",
- "u8x8_arm_linux_gpio_and_delay",
- "uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE",
- "cs, dc, reset",
- "cs, dc [, reset]",
- "uC specific"
- },
- /* 13 */
- {
- "",
- "u8x8_SetPin_SED1520",
- "u8x8_byte_sed1520",
- "u8x8_arm_linux_gpio_and_delay",
- "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",
- "d0, d1, d2, d3, d4, d5, d6, d7, dc, e1, e2, reset",
- "d0, d1, d2, d3, d4, d5, d6, d7, dc, e1, e2, reset",
- "u8x8_byte_sed1520"
- },
- /* 14 */
- {
- /* ST7920 */ "2ND_HW_SPI",
- "u8x8_SetPin_ST7920_HW_SPI",
- "u8x8_byte_arduino_2nd_hw_spi",
- "u8x8_arm_linux_gpio_and_delay",
- "uint8_t cs, uint8_t reset = U8X8_PIN_NONE",
- "cs, reset",
- "cs [, reset]",
- "uC specific"
- },
-
-
- };
- /*===========================================*/
- #define STR_MAX 1024
- char *str_list[STR_MAX];
- int str_cnt = 0;
- int str_exists(const char *s)
- {
- int i;
- for( i = 0; i < str_cnt; i++ )
- {
- if ( strcmp(str_list[i], s) == 0 )
- return 1;
- }
- return 0;
- }
- void str_add(const char *s)
- {
- if ( str_exists(s) )
- return;
- if ( str_cnt >= STR_MAX )
- {
- error(1,0, "max number of strings reached");
- }
- else
- {
- str_list[str_cnt] = strdup(s);
- str_cnt++;
- }
- }
- /*===========================================*/
- /*
- copy file from source_file_name to dest_file_name
- */
- int file_copy(const char *source_file_name, const char *dest_file_name)
- {
- int ch;
- FILE *source_fp;
- FILE *dest_fp;
-
- source_fp = fopen(source_file_name, "r");
- dest_fp = fopen(dest_file_name, "w");
-
- if ( source_fp == NULL || dest_fp == NULL )
- return 0;
-
- while( ( ch = fgetc(source_fp) ) != EOF )
- fputc(ch, dest_fp);
-
- fclose(source_fp);
- fclose(dest_fp);
-
- return 1;
- }
- /*
- Insert file "insertname" between lines "start_line" and "end_line" of file "filename"
- */
- int insert_into_file(const char *filename, const char *insertname, const char *start_line, const char *end_line)
- {
- int ch;
- static char line[1024*4];
- const char *tmpname = "tmp.h";
- FILE *source_fp;
- FILE *dest_fp;
- FILE *insert_fp;
-
- if ( file_copy(filename, tmpname) == 0 )
- return 0;
- source_fp = fopen(tmpname, "r");
- dest_fp = fopen(filename, "w");
- insert_fp = fopen(insertname, "r");
- if ( source_fp == NULL || dest_fp == NULL || insert_fp == NULL )
- return 0;
-
- for(;;)
- {
- if ( fgets(line, 1024*4, source_fp) == NULL )
- break;
- if ( strncmp(line, start_line, strlen(start_line)) == 0 )
- {
- fputs(line, dest_fp);
- while( ( ch = fgetc(insert_fp) ) != EOF )
- fputc(ch, dest_fp);
-
- fputs("\n", dest_fp);
-
- for(;;)
- {
- if ( fgets(line, 1024*4, source_fp) == NULL )
- break;
- if ( strncmp(line, end_line, strlen(end_line)) == 0 )
- {
- fputs(line, dest_fp);
- break;
- }
- }
- }
- else
- {
- fputs(line, dest_fp);
- }
- }
- fclose(insert_fp);
- fclose(source_fp);
- fclose(dest_fp);
-
- unlink(tmpname);
-
- printf("patched %s\n", filename);
- return 1;
- }
- /*===========================================*/
- char *strlowercase(const char *s)
- {
- int i, len = strlen(s);
- static char buf[1024];
- for( i = 0; i <= len; i++ )
- buf[i] = tolower(s[i]);
- return buf;
- }
- char *struppercase(const char *s)
- {
- int i, len = strlen(s);
- static char buf[1024];
- for( i = 0; i <= len; i++ )
- buf[i] = toupper(s[i]);
- return buf;
- }
- /*===========================================*/
- FILE *buf_code_fp;
- FILE *buf_header_fp;
- FILE *setup_code_fp;
- FILE *setup_header_fp;
- FILE *u8g2_cpp_header_fp;
- FILE *u8x8_cpp_header_fp;
- FILE *u8x8_setup_c_md_fp;
- FILE *u8x8_setup_cpp_md_fp;
- FILE *u8g2_setup_c_md_fp;
- FILE *u8g2_setup_cpp_md_fp;
- const char *get_setup_function_name(int controller_idx, int display_idx, const char *postfix)
- {
- static char s[1024];
- strcpy(s, "u8g2_Setup_");
- strcat(s, strlowercase(controller_list[controller_idx].name));
- strcat(s, "_");
- if ( controller_list[controller_idx].cad_shortname[0] != '\0' )
- {
- strcat(s, strlowercase(controller_list[controller_idx].cad_shortname));
- strcat(s, "_");
- }
- strcat(s, strlowercase(controller_list[controller_idx].display_list[display_idx].name));
- strcat(s, "_");
- strcat(s, postfix);
- return s;
- }
- void do_setup_prototype(FILE *fp, int controller_idx, int display_idx, const char *postfix)
- {
- /*
- fprintf(fp, "void u8g2_Setup_");
- fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
- fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
- fprintf(fp, "%s(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)", postfix);
- */
- fprintf(fp, "void %s", get_setup_function_name(controller_idx, display_idx, postfix));
- fprintf(fp, "(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb)");
- }
- /*===========================================*/
- /*
- class U8X8_SSD1306_128X64_4W_SW_SPI : public U8X8 {
- 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() {
- u8x8_Setup(getU8x8(), u8x8_d_ssd1306_128x64_noname, u8x8_cad_001, u8x8_byte_4wire_sw_spi, u8x8_arm_linux_gpio_and_delay);
- u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
- }
- }
- */
- void do_u8x8_header(int controller_idx, int display_idx, int interface_idx)
- {
- FILE *fp = u8x8_cpp_header_fp;
- fprintf(fp, "class U8X8_");
- fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
- fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
- if ( interface_list[interface_idx].interface_name[0] != '\0' )
- fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
- fprintf(fp, " : public U8X8 {\n");
- fprintf(fp, " public: ");
- fprintf(fp, "U8X8_");
- fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
- fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
- if ( interface_list[interface_idx].interface_name[0] != '\0' )
- fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
- fprintf(fp, "(%s) : U8X8() {\n", interface_list[interface_idx].pins_with_type);
- fprintf(fp, " ");
- fprintf(fp, "u8x8_Setup(getU8x8(), u8x8_d_");
- fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
- fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
- fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].cad));
- fprintf(fp, "%s, ", interface_list[interface_idx].arm_linux_com_procedure);
- fprintf(fp, "%s);\n", interface_list[interface_idx].arm_linux_gpio_procedure);
- fprintf(fp, " ");
- fprintf(fp, "%s(getU8x8(), ", interface_list[interface_idx].setpin_function);
- fprintf(fp, "%s);\n", interface_list[interface_idx].pins_plain);
- fprintf(fp, " }\n");
- fprintf(fp, "};\n");
- }
- /*
- class U8G2_SSD1306_128x64_NONAME_1_SW_SPI : public U8G2
- {
- public:
- 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)
- {
- u8g2_Setup_ssd1306_128x64_noname_1(&u8g2, rotation, u8x8_byte_4wire_sw_spi, u8x8_arm_linux_gpio_and_delay,);
- u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
- }
- };
- */
- void do_display_interface(int controller_idx, int display_idx, const char *postfix, int interface_idx)
- {
-
- FILE *fp = u8g2_cpp_header_fp;
-
- printf(" %s %s", postfix, interface_list[interface_idx].interface_name);
- fprintf(fp, "class U8G2_");
- fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
- fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
- fprintf(fp, "%s", struppercase(postfix));
- if ( interface_list[interface_idx].interface_name[0] != '\0' )
- fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
- fprintf(fp, " : public U8G2 {\n");
- fprintf(fp, " public: ");
- fprintf(fp, "U8G2_");
- fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
- fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
- fprintf(fp, "%s", struppercase(postfix));
- if ( interface_list[interface_idx].interface_name[0] != '\0' )
- fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
- fprintf(fp, "(const u8g2_cb_t *rotation, ");
- fprintf(fp, "%s) : U8G2() {\n", interface_list[interface_idx].pins_with_type);
- fprintf(fp, " ");
- /*
- fprintf(fp, "u8g2_Setup_");
- fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
- fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
- fprintf(fp, "%s", postfix);
- */
- fprintf(fp, "%s", get_setup_function_name(controller_idx, display_idx, postfix));
- fprintf(fp, "(&u8g2, ");
- fprintf(fp, "rotation, ");
- fprintf(fp, "%s, ", interface_list[interface_idx].arm_linux_com_procedure);
- fprintf(fp, "%s);\n", interface_list[interface_idx].arm_linux_gpio_procedure);
- fprintf(fp, " ");
- fprintf(fp, "%s(getU8x8(), ", interface_list[interface_idx].setpin_function);
- fprintf(fp, "%s);\n", interface_list[interface_idx].pins_plain);
- fprintf(fp, " }\n");
- fprintf(fp, "};\n");
-
- if ( strcmp(postfix, "1") == 0 )
- do_u8x8_header(controller_idx, display_idx, interface_idx);
-
- }
- /*===========================================*/
- void do_display(int controller_idx, int display_idx, const char *postfix)
- {
-
- do_setup_prototype(setup_header_fp, controller_idx, display_idx, postfix);
- fprintf(setup_header_fp, ";\n");
-
- do_setup_prototype(setup_code_fp, controller_idx, display_idx, postfix);
- fprintf(setup_code_fp, "\n");
- fprintf(setup_code_fp, "{\n");
- fprintf(setup_code_fp, " uint8_t tile_buf_height;\n");
- fprintf(setup_code_fp, " uint8_t *buf;\n");
- fprintf(setup_code_fp, " u8g2_SetupDisplay(u8g2, u8x8_d_");
- fprintf(setup_code_fp, "%s_", strlowercase(controller_list[controller_idx].name));
- fprintf(setup_code_fp, "%s, ", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
- fprintf(setup_code_fp, "%s, ", controller_list[controller_idx].cad);
- fprintf(setup_code_fp, "byte_cb, gpio_and_delay_cb);\n");
- fprintf(setup_code_fp, " buf = ");
- //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);
- 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);
- fprintf(setup_code_fp, " u8g2_SetupBuffer(u8g2, buf, tile_buf_height, %s, rotation);\n", controller_list[controller_idx].ll_hvline);
- fprintf(setup_code_fp, "}\n");
-
- /* generate interfaces for this display */
- if ( controller_list[controller_idx].com & COM_4WSPI )
- {
- do_display_interface(controller_idx, display_idx, postfix, 0); /* SW SPI */
- do_display_interface(controller_idx, display_idx, postfix, 1); /* HW SPI */
- // do_display_interface(controller_idx, display_idx, postfix, 12); /* 2nd HW SPI */
- }
- if ( controller_list[controller_idx].com & COM_3WSPI )
- {
- do_display_interface(controller_idx, display_idx, postfix, 4); /* 3wire SW SPI */
- // do_display_interface(controller_idx, display_idx, postfix, 5); /* 3wire HW SPI (not implemented) */
- }
- if ( controller_list[controller_idx].com & COM_6800 )
- {
- do_display_interface(controller_idx, display_idx, postfix, 2); /* 6800 mode */
- }
- if ( controller_list[controller_idx].com & COM_8080 )
- {
- do_display_interface(controller_idx, display_idx, postfix, 3); /* 8080 mode */
- }
- if ( controller_list[controller_idx].com & COM_I2C )
- {
- do_display_interface(controller_idx, display_idx, postfix, 6); /* SW I2C */
- do_display_interface(controller_idx, display_idx, postfix, 7); /* HW I2C */
- // do_display_interface(controller_idx, display_idx, postfix, 10); /* 2nd HW I2C */
- }
- if ( controller_list[controller_idx].com & COM_ST7920SPI )
- {
- do_display_interface(controller_idx, display_idx, postfix, 8); /* ST7920 SW SPI */
- do_display_interface(controller_idx, display_idx, postfix, 9); /* HW SPI */
- // do_display_interface(controller_idx, display_idx, postfix, 14); /* 2ND HW SPI */
- }
- if ( controller_list[controller_idx].com & COM_UART )
- {
- /* currently there is no arm-linux C++ interface, instead the interface is created manually in the example */
- }
- if ( controller_list[controller_idx].com & COM_KS0108 )
- {
- do_display_interface(controller_idx, display_idx, postfix, 11); /* KS0108 6800 parallel mode */
- }
- if ( controller_list[controller_idx].com & COM_SED1520 )
- {
- do_display_interface(controller_idx, display_idx, postfix, 13);
- }
-
- }
- void do_controller_buffer_code(int idx, const char *postfix, int buf_len, int rows)
- {
- int display_idx;
- char s[1024];
- //sprintf(s, "u8g2_m_%s_%d_%d_%s", strlowercase(controller_list[idx].name), controller_list[idx].tile_width, controller_list[idx].tile_height, postfix);
- /* this should fix #370, additionally the controller is removed (hope that this will not break anything) */
- sprintf(s, "u8g2_m_%d_%d_%s", controller_list[idx].tile_width, controller_list[idx].tile_height, postfix);
-
- if ( str_exists(s) == 0 )
- {
- str_add(s);
- //FILE *fp = stdout;
- fprintf(buf_code_fp, "uint8_t *%s(uint8_t *page_cnt)\n", s);
- fprintf(buf_code_fp, "{\n");
- fprintf(buf_code_fp, " #ifdef U8G2_USE_DYNAMIC_ALLOC\n");
- fprintf(buf_code_fp, " *page_cnt = %d;\n", rows);
- fprintf(buf_code_fp, " return 0;\n");
- fprintf(buf_code_fp, " #else\n");
- fprintf(buf_code_fp, " static uint8_t buf[%d];\n", buf_len);
- fprintf(buf_code_fp, " *page_cnt = %d;\n", rows);
- fprintf(buf_code_fp, " return buf;\n");
- fprintf(buf_code_fp, " #endif\n");
- fprintf(buf_code_fp, "}\n");
-
- fprintf(buf_header_fp, "uint8_t *%s(uint8_t *page_cnt);\n", s);
- }
-
- display_idx = 0;
- fprintf(setup_code_fp, "/* %s %s */\n", controller_list[idx].name, postfix);
- while( controller_list[idx].display_list[display_idx].name != NULL )
- {
- do_display(idx, display_idx, postfix);
- display_idx++;
- }
-
- }
- void do_controller_list(void)
- {
- int i;
- for( i = 0; i < sizeof(controller_list)/sizeof(*controller_list); i++ )
- {
- printf("%s: ",controller_list[i].name);
- fprintf(setup_code_fp, "/* %s */\n", controller_list[i].name);
- do_controller_buffer_code(i, "1", controller_list[i].tile_width*8, 1);
- do_controller_buffer_code(i, "2", controller_list[i].tile_width*8*2, 2);
- do_controller_buffer_code(i, "f", controller_list[i].tile_width*8*controller_list[i].tile_height, controller_list[i].tile_height);
- printf("\n");
- }
- }
- int is_arm_linux_cpp = 1;
- int is_u8g2 = 1;
- FILE *md_fp;
- void do_md_display(int controller_idx, int display_idx)
- {
- FILE *fp = md_fp;
- /*
- fprintf(fp, "%s:", controller_list[controller_idx].name);
- fprintf(fp, "%s\n", controller_list[controller_idx].display_list[display_idx].name);
- */
-
- if ( is_u8g2 )
- {
- fprintf(fp, "\n");
- fprintf(fp, "## %s ", struppercase(controller_list[controller_idx].name));
- fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
- fprintf(fp, "\n");
- #ifdef MD_TABLES
- fprintf(fp, "| Controller \"%s\", ", controller_list[controller_idx].name);
- fprintf(fp, "Display \"%s\" | ", controller_list[controller_idx].display_list[display_idx].name);
- fprintf(fp, "Description |\n");
- fprintf(fp, "|---|---|\n");
- #else
- fprintf(fp, "Controller \"%s\", ", controller_list[controller_idx].name);
- fprintf(fp, "Display \"%s\" ", controller_list[controller_idx].display_list[display_idx].name);
- fprintf(fp, "[Description]\n");
- #endif
- }
- else
- {
- if ( is_u8g2 != 0 || strcmp(controller_list[controller_idx].ll_hvline, U8X8_HVLINE ) == 0 )
- {
- fprintf(fp, "\n");
- fprintf(fp, "## %s ", struppercase(controller_list[controller_idx].name));
- fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
- fprintf(fp, "\n");
- fprintf(fp, "| Controller \"%s\", ", controller_list[controller_idx].name);
- fprintf(fp, "Display \"%s\" |\n", controller_list[controller_idx].display_list[display_idx].name);
- fprintf(fp, "|---|\n");
- }
- }
- }
- void do_md_display_interface_buffer(int controller_idx, int display_idx, int interface_idx, char *postfix, int size, int rows)
- {
- FILE *fp = md_fp;
-
- #ifdef MD_TABLES
- if ( is_u8g2 )
- {
- if ( is_arm_linux_cpp )
- {
- fprintf(fp, "| U8G2_");
- fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
- fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
- fprintf(fp, "%s", struppercase(postfix));
- if ( interface_list[interface_idx].interface_name[0] != '\0' )
- fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
- fprintf(fp, "(rotation, %s)", interface_list[interface_idx].pins_md_plain);
- if ( postfix[0] == 'f' )
- {
- fprintf(fp, " | full framebuffer, size = %d bytes |\n", size);
- }
- else
- {
- fprintf(fp, " | page buffer, size = %d bytes |\n", size);
- }
- }
- else
- {
- fprintf(fp, "| ");
- fprintf(fp, "%s", get_setup_function_name(controller_idx, display_idx, postfix));
- fprintf(fp, "(u8g2, ");
- fprintf(fp, "rotation, ");
- fprintf(fp, "%s, ", interface_list[interface_idx].generic_com_procedure);
- fprintf(fp, "%s)", "uC specific");
- if ( postfix[0] == 'f' )
- {
- fprintf(fp, " | full framebuffer, size = %d bytes |\n", size);
- }
- else
- {
- fprintf(fp, " | page buffer, size = %d bytes |\n", size);
- }
- }
- }
- #else
- if ( is_u8g2 )
- {
- if ( is_arm_linux_cpp )
- {
- fprintf(fp, " * U8G2_");
- fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
- fprintf(fp, "%s_", struppercase(controller_list[controller_idx].display_list[display_idx].name));
- fprintf(fp, "%s", struppercase(postfix));
- if ( interface_list[interface_idx].interface_name[0] != '\0' )
- fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
- fprintf(fp, "(rotation, %s)", interface_list[interface_idx].pins_md_plain);
- if ( postfix[0] == 'f' )
- {
- fprintf(fp, " [full framebuffer, size = %d bytes]\n", size);
- }
- else
- {
- fprintf(fp, " [page buffer, size = %d bytes]\n", size);
- }
- }
- else
- {
- fprintf(fp, " * ");
- fprintf(fp, "%s", get_setup_function_name(controller_idx, display_idx, postfix));
- fprintf(fp, "(u8g2, ");
- fprintf(fp, "rotation, ");
- fprintf(fp, "%s, ", interface_list[interface_idx].generic_com_procedure);
- fprintf(fp, "%s)", "uC specific");
- if ( postfix[0] == 'f' )
- {
- fprintf(fp, " [full framebuffer, size = %d bytes]\n", size);
- }
- else
- {
- fprintf(fp, " [page buffer, size = %d bytes]\n", size);
- }
- }
- }
- #endif
- }
- void do_md_display_interface(int controller_idx, int display_idx, int interface_idx)
- {
- FILE *fp = md_fp;
-
- if ( !is_u8g2 )
- {
- if ( strcmp(controller_list[controller_idx].ll_hvline, U8X8_HVLINE ) == 0 )
- {
- if ( is_arm_linux_cpp )
- {
- fprintf(fp, "| U8X8_");
- fprintf(fp, "%s_", struppercase(controller_list[controller_idx].name));
- fprintf(fp, "%s", struppercase(controller_list[controller_idx].display_list[display_idx].name));
- if ( interface_list[interface_idx].interface_name[0] != '\0' )
- fprintf(fp, "_%s", struppercase(interface_list[interface_idx].interface_name));
- fprintf(fp, "(%s) |\n", interface_list[interface_idx].pins_md_plain);
- }
- else
- {
-
- fprintf(fp, "| u8x8_Setup(u8x8_d_");
- fprintf(fp, "%s_", strlowercase(controller_list[controller_idx].name));
- fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].display_list[display_idx].name));
- fprintf(fp, "%s, ", strlowercase(controller_list[controller_idx].cad));
- fprintf(fp, "%s, ", strlowercase(interface_list[interface_idx].generic_com_procedure));
- fprintf(fp, "uC specific) |\n");
- }
- }
- }
- do_md_display_interface_buffer(controller_idx, display_idx, interface_idx, "1", controller_list[controller_idx].tile_width*8, 1);
- do_md_display_interface_buffer(controller_idx, display_idx, interface_idx, "2", controller_list[controller_idx].tile_width*8*2, 2);
- 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);
-
- }
- void do_md_controller_list(void)
- {
- int controller_idx, display_idx;
-
- for( controller_idx = 0; controller_idx < sizeof(controller_list)/sizeof(*controller_list); controller_idx++ )
- {
- display_idx = 0;
- while( controller_list[controller_idx].display_list[display_idx].name != NULL )
- {
- do_md_display(controller_idx, display_idx);
- /* generate interfaces for this display */
- if ( controller_list[controller_idx].com & COM_4WSPI )
- {
- do_md_display_interface(controller_idx, display_idx, 0); /* SW SPI */
- if ( is_arm_linux_cpp )
- {
- do_md_display_interface(controller_idx, display_idx, 1); /* HW SPI */
- // do_md_display_interface(controller_idx, display_idx, 12); /* 2nd HW SPI */
- }
- }
- if ( controller_list[controller_idx].com & COM_3WSPI )
- {
- do_md_display_interface(controller_idx, display_idx, 4); /* 3wire SW SPI */
- do_md_display_interface(controller_idx, display_idx, 5); /* 3wire HW SPI (not implemented) */
- }
- if ( controller_list[controller_idx].com & COM_6800 )
- {
- do_md_display_interface(controller_idx, display_idx, 2); /* 6800 mode */
- }
- if ( controller_list[controller_idx].com & COM_8080 )
- {
- do_md_display_interface(controller_idx, display_idx, 3); /* 8080 mode */
- }
- if ( controller_list[controller_idx].com & COM_I2C )
- {
- do_md_display_interface(controller_idx, display_idx, 6); /* SW I2C */
- do_md_display_interface(controller_idx, display_idx, 7); /* HW I2C */
- // do_md_display_interface(controller_idx, display_idx, 10); /* 2nd HW I2C */
- }
- if ( controller_list[controller_idx].com & COM_ST7920SPI )
- {
- do_md_display_interface(controller_idx, display_idx, 8); /* ST7920 SW SPI */
- do_md_display_interface(controller_idx, display_idx, 9); /* HW SPI (not yet implemented) */
- do_md_display_interface(controller_idx, display_idx, 14); /* 2ND HW SPI */
- }
- if ( controller_list[controller_idx].com & COM_KS0108 )
- {
- do_md_display_interface(controller_idx, display_idx, 11); /* KS0108 */
- }
- if ( controller_list[controller_idx].com & COM_SED1520 )
- {
- do_md_display_interface(controller_idx, display_idx, 13); /* SED1520 */
- }
-
- display_idx++;
- }
- }
- }
- int main(void)
- {
- buf_code_fp = fopen("u8g2_d_memory.c", "w");
- fprintf(buf_code_fp, "/* u8g2_d_memory.c */\n");
- fprintf(buf_code_fp, "/* generated code, codebuild, u8g2 project */\n");
- fprintf(buf_code_fp, "\n");
- fprintf(buf_code_fp, "#include \"u8g2.h\"\n");
- fprintf(buf_code_fp, "\n");
-
- buf_header_fp = fopen("u8g2_memory.h", "w");
- //fprintf(buf_header_fp, "/* start of generated code, codebuild, u8g2 project */\n");
- setup_code_fp = fopen("u8g2_d_setup.c", "w");
- fprintf(setup_code_fp, "/* u8g2_d_setup.c */\n");
- fprintf(setup_code_fp, "/* generated code, codebuild, u8g2 project */\n");
- fprintf(setup_code_fp, "\n");
- fprintf(setup_code_fp, "#include \"u8g2.h\"\n");
- fprintf(setup_code_fp, "\n");
- setup_header_fp = fopen("u8g2_setup.h", "w");
- //fprintf(setup_header_fp, "/* start of generated code, codebuild, u8g2 project */\n");
-
- u8g2_cpp_header_fp = fopen("U8g2lib.h", "w");
- fprintf(u8g2_cpp_header_fp, "/* generated code (codebuild), u8g2 project */\n");
-
- u8x8_cpp_header_fp = fopen("U8x8lib.h", "w");
- fprintf(u8x8_cpp_header_fp, "/* generated code (codebuild), u8g2 project */\n");
- u8x8_setup_c_md_fp = fopen("u8x8setupc.md", "w");
- u8x8_setup_cpp_md_fp = fopen("u8x8setupcpp.md", "w");
- u8g2_setup_c_md_fp = fopen("u8g2setupc.md", "w");
- u8g2_setup_cpp_md_fp = fopen("u8g2setupcpp.md", "w");
- do_controller_list();
-
-
-
- md_fp = u8g2_setup_cpp_md_fp;
- is_arm_linux_cpp = 1;
- is_u8g2 = 1;
- do_md_controller_list();
-
- md_fp = u8g2_setup_c_md_fp;
- is_arm_linux_cpp = 0;
- is_u8g2 = 1;
- do_md_controller_list();
-
- md_fp = u8x8_setup_cpp_md_fp;
- is_arm_linux_cpp = 1;
- is_u8g2 = 0;
- do_md_controller_list();
-
- md_fp = u8x8_setup_c_md_fp;
- is_arm_linux_cpp = 0;
- is_u8g2 = 0;
- do_md_controller_list();
-
- fprintf(buf_code_fp, "/* end of generated code */\n");
- fclose(buf_code_fp);
-
- //fprintf(buf_header_fp, "/* end of generated code */\n");
- fclose(buf_header_fp);
- fprintf(setup_code_fp, "/* end of generated code */\n");
- fclose(setup_code_fp);
- //fprintf(setup_header_fp, "/* end of generated code */\n");
- fclose(setup_header_fp);
- fclose(u8g2_cpp_header_fp);
- fclose(u8x8_cpp_header_fp);
- fclose(u8x8_setup_c_md_fp);
- fclose(u8x8_setup_cpp_md_fp);
- fclose(u8g2_setup_c_md_fp);
- fclose(u8g2_setup_cpp_md_fp);
- system("cp u8g2_d_memory.c ../../../../csrc/.");
- puts("generate u8g2_d_memory.c");
- system("cp u8g2_d_setup.c ../../../../csrc/.");
- puts("generate u8g2_d_setup.c");
- insert_into_file("../../../../csrc/u8g2.h", "u8g2_memory.h", "/* u8g2_d_memory.c generated code start */", "/* u8g2_d_memory.c generated code end */");
- insert_into_file("../../../../csrc/u8g2.h", "u8g2_setup.h", "/* u8g2_d_setup.c generated code start */", "/* u8g2_d_setup.c generated code end */");
- insert_into_file("../../cppsrc/U8g2lib.h", "U8g2lib.h", "/* arm-linux constructor list start */", "/* arm-linux constructor list end */");
- insert_into_file("../../cppsrc/U8x8lib.h", "U8x8lib.h", "// constructor list start", "// constructor list end");
- insert_into_file("../../../u8g2.wiki/u8g2setupc.md", "u8g2setupc.md", "# Setup Function Reference", "# Links");
- insert_into_file("../../../u8g2.wiki/u8g2setupcpp.md", "u8g2setupcpp.md", "# Constructor Reference", "# Links");
- insert_into_file("../../../u8g2.wiki/u8x8setupc.md", "u8x8setupc.md", "# Setup Function Reference", "# Links");
- insert_into_file("../../../u8g2.wiki/u8x8setupcpp.md", "u8x8setupcpp.md", "# Constructor Reference", "# Links");
- return 0;
- }
|