dev.nut 219 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174
  1. --
  2. -- Copyright (C) 2004-2007 by egnite Software GmbH. All rights reserved.
  3. --
  4. -- Redistribution and use in source and binary forms, with or without
  5. -- modification, are permitted provided that the following conditions
  6. -- are met:
  7. --
  8. -- 1. Redistributions of source code must retain the above copyright
  9. -- notice, this list of conditions and the following disclaimer.
  10. -- 2. Redistributions in binary form must reproduce the above copyright
  11. -- notice, this list of conditions and the following disclaimer in the
  12. -- documentation and/or other materials provided with the distribution.
  13. -- 3. Neither the name of the copyright holders nor the names of
  14. -- contributors may be used to endorse or promote products derived
  15. -- from this software without specific prior written permission.
  16. --
  17. -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. -- ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  20. -- FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  21. -- COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  22. -- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  23. -- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  24. -- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  25. -- AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  26. -- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  27. -- THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28. -- SUCH DAMAGE.
  29. --
  30. -- For additional information see http://www.ethernut.de/
  31. --
  32. -- Operating system functions
  33. --
  34. -- $Log$
  35. -- Revision 1.54 2009/02/13 14:46:19 haraldkipp
  36. -- Using the VS10xx driver as a template for redesign.
  37. --
  38. -- Revision 1.53 2009/02/06 15:48:08 haraldkipp
  39. -- New audio driver for VLSI chips uses the SPI bus.
  40. --
  41. -- Revision 1.52 2009/01/30 08:57:16 haraldkipp
  42. -- Added auto detected VS10xx.
  43. -- Default audio decoder reset recover times changed to 0.
  44. --
  45. -- Revision 1.51 2009/01/19 10:38:54 haraldkipp
  46. -- Configuration of the AT45D non-volatile memory support was not useable.
  47. --
  48. -- Revision 1.50 2009/01/18 16:44:07 haraldkipp
  49. -- Added GPIO based bit banging SPI bus driver.
  50. --
  51. -- Revision 1.49 2009/01/09 17:59:05 haraldkipp
  52. -- Added target independent AT45D block device drivers and non-volatile
  53. -- memory support based on the new bus controllers.
  54. --
  55. -- Revision 1.48 2008/12/24 14:52:10 thiagocorrea
  56. -- Improve Serial Bit Bang drivers dependency check in nutconf.
  57. --
  58. -- Revision 1.47 2008/10/23 08:52:20 haraldkipp
  59. -- New software SPI MMC routines added.
  60. --
  61. -- Revision 1.46 2008/10/05 16:56:15 haraldkipp
  62. -- Added Helix audio device.
  63. --
  64. -- Revision 1.45 2008/10/03 11:31:27 haraldkipp
  65. -- Added TWI support for the AT91SAM9260.
  66. --
  67. -- Revision 1.44 2008/09/23 07:26:51 haraldkipp
  68. -- Made early watchdog setting configurable.
  69. --
  70. -- Revision 1.43 2008/09/02 14:27:15 haraldkipp
  71. -- Added platform independent reset functions.
  72. -- Disabled the old vs1001k driver.
  73. --
  74. -- Revision 1.42 2008/08/28 16:11:31 haraldkipp
  75. -- Fixed bitbanging SPI for ARM targets.
  76. --
  77. -- Revision 1.41 2008/08/28 11:07:06 haraldkipp
  78. -- Added platform independant driver for LAN91 chips, currently LAN91C111
  79. -- only. This is also the first Ethernet driver with ioctl support.
  80. --
  81. -- Revision 1.40 2008/07/29 07:30:57 haraldkipp
  82. -- Added VS1053B.
  83. --
  84. -- Revision 1.39 2008/07/09 14:25:06 haraldkipp
  85. -- Made EEPROM_PAGE_SIZE configurable. Does it really make sense?
  86. --
  87. -- Revision 1.38 2008/02/15 16:55:43 haraldkipp
  88. -- Added support for VS1033/53 codec.
  89. --
  90. -- Revision 1.37 2007/08/30 12:15:06 haraldkipp
  91. -- Configurable MMC timings.
  92. --
  93. -- Revision 1.36 2007/04/12 08:57:19 haraldkipp
  94. -- New VS10XX decoder support. It will replace the old VS1001K driver, but
  95. -- hasn't been tested for this chip yet. For the time being, please add the
  96. -- vs10xx.c to your application code when using the VS1011E.
  97. -- New API added, which allows to program external AVR devices via SPI.
  98. -- Configurable SPI support added. Polled hardware SPI only, which is
  99. -- currently limited to AVR. Header files are available for up to 4 software
  100. -- SPI devices, but the API routines had been implemented for device 0 only.
  101. --
  102. -- Revision 1.35 2007/03/22 08:23:41 haraldkipp
  103. -- Added the user (green) LED settings for Ethernut 3.0.
  104. --
  105. -- Revision 1.34 2007/02/15 16:17:27 haraldkipp
  106. -- Configurable port bits for bit-banging I2C. Should work now on all
  107. -- AT91 MCUs.
  108. --
  109. -- Revision 1.33 2006/10/05 17:16:50 haraldkipp
  110. -- Hardware independant RTC layer added.
  111. --
  112. -- Revision 1.32 2006/09/29 12:41:55 haraldkipp
  113. -- Added support for AT45 serial DataFlash memory chips. Currently limited
  114. -- to AT91 builds.
  115. --
  116. -- Revision 1.31 2006/08/05 12:00:39 haraldkipp
  117. -- Added clock settings for Ethernut 3.0 Rev-E.
  118. --
  119. -- Revision 1.30 2006/06/30 22:08:23 christianwelzel
  120. -- DS1307 RTC Driver added.
  121. --
  122. -- Revision 1.29 2006/06/28 17:22:34 haraldkipp
  123. -- Make it compile for AT91SAM7X256.
  124. --
  125. -- Revision 1.28 2006/06/28 14:31:55 haraldkipp
  126. -- Null device added to Configurator build.
  127. --
  128. -- Revision 1.27 2006/05/25 09:13:23 haraldkipp
  129. -- Platform independent watchdog API added.
  130. --
  131. -- Revision 1.26 2006/04/07 12:26:59 haraldkipp
  132. -- Removing requirement for non-volatile hardware solves link problem
  133. -- if no such hardware is available.
  134. --
  135. -- Revision 1.25 2006/02/23 15:42:26 haraldkipp
  136. -- MMC low level bit banging SPI added.
  137. --
  138. -- Revision 1.24 2006/01/23 17:29:14 haraldkipp
  139. -- X1226/X1286 EEPROM now available for system configuration storage.
  140. --
  141. -- Revision 1.23 2006/01/22 17:35:22 haraldkipp
  142. -- Baudrate calculation for Ethernut 3 failed if MCU Clock was not specified.
  143. --
  144. -- Revision 1.22 2006/01/05 16:49:06 haraldkipp
  145. -- Mulimedia Card Block Device Driver added.
  146. -- Programmable Logic Device added, which supports the CPLD
  147. -- implementation of the Ethernut 3 design.
  148. -- New options added for CY2239x support.
  149. --
  150. -- Revision 1.21 2005/10/24 09:54:55 haraldkipp
  151. -- New i2C bit banging driver.
  152. -- New Xicor RTC driver.
  153. -- New Cypress programmable clock driver.
  154. --
  155. -- Revision 1.20 2005/10/04 05:48:11 hwmaier
  156. -- Added CAN driver for AT90CAN128
  157. --
  158. -- Revision 1.19 2005/07/26 15:41:06 haraldkipp
  159. -- All target dependent code is has been moved to a new library named
  160. -- libnutarch. Each platform got its own script.
  161. --
  162. -- Revision 1.18 2005/05/27 13:51:07 olereinhardt
  163. -- Added new Display sizes for hd44780 and hd44780_bus
  164. -- Ports used for display connection still need's to be added.
  165. --
  166. -- Revision 1.17 2005/04/05 17:44:56 haraldkipp
  167. -- Made stack space configurable.
  168. --
  169. -- Revision 1.16 2005/02/21 00:56:59 hwmaier
  170. -- New CAN int vectors ivect35.c and ivect36 added, removed "makedefs" entry for RTL_IRQ_RISING_EDGE.
  171. --
  172. -- Revision 1.15 2005/02/19 22:47:54 hwmaier
  173. -- no message
  174. --
  175. -- Revision 1.14 2005/02/07 19:05:25 haraldkipp
  176. -- ATmega 103 compile errors fixed
  177. --
  178. -- Revision 1.13 2005/02/02 19:46:53 haraldkipp
  179. -- Port configuration was completely broken, because no AVRPORT values
  180. -- had been defined for the preprocessor. To fix this without modifying
  181. -- too many sourcefiles we change the name of AVR port config file and
  182. -- include this new file in the old avr.h.
  183. --
  184. -- Revision 1.12 2005/01/22 19:22:42 haraldkipp
  185. -- Changed AVR port configuration names from PORTx to AVRPORTx.
  186. -- Removed uartspi devices.
  187. --
  188. -- Revision 1.11 2004/12/17 15:31:28 haraldkipp
  189. -- Support of rising edge interrupts for hardware w/o inverter gate.
  190. -- Fixed compilation issue for hardware with RTL reset port.
  191. -- Thanks to FOCUS Software Engineering Pty Ltd.
  192. --
  193. -- Revision 1.10 2004/11/24 14:48:34 haraldkipp
  194. -- crt/crt.nut
  195. --
  196. -- Revision 1.9 2004/10/03 18:39:12 haraldkipp
  197. -- GBA debug output on screen
  198. --
  199. -- Revision 1.8 2004/09/25 15:43:54 drsung
  200. -- Light change for separate interrupt stack. Now it depends also
  201. -- on macro HW_MCU_AVR.
  202. --
  203. -- Revision 1.7 2004/09/22 08:21:43 haraldkipp
  204. -- No ATmega103 support for LAN91C111. Is there any hardware?
  205. -- List of devices sorted by platform.
  206. -- Separate IRQ stack for AVR is configurable.
  207. -- Configurable ports for digital I/O shift register.
  208. -- Configurable handshake ports for AVR USART.
  209. --
  210. -- Revision 1.6 2004/09/07 19:11:15 haraldkipp
  211. -- Simplified IRQ handling to get it done for EB40A
  212. --
  213. -- Revision 1.5 2004/09/01 14:04:57 haraldkipp
  214. -- Added UART handshake and EEPROM emulation port bits
  215. --
  216. -- Revision 1.4 2004/08/18 16:05:38 haraldkipp
  217. -- Use consistent directory structure
  218. --
  219. -- Revision 1.3 2004/08/18 13:46:09 haraldkipp
  220. -- Fine with avr-gcc
  221. --
  222. -- Revision 1.2 2004/08/03 15:09:31 haraldkipp
  223. -- Another change of everything
  224. --
  225. -- Revision 1.1 2004/06/07 16:35:53 haraldkipp
  226. -- First release
  227. --
  228. --
  229. nutdev =
  230. {
  231. --
  232. -- General device helper routines.
  233. --
  234. {
  235. name = "nutdev_ihndlr",
  236. brief = "Interrupt Handler",
  237. description = "Interrupt registration and distribution.",
  238. sources = { "ihndlr.c" },
  239. },
  240. {
  241. name = "nutdev_uart_poll",
  242. brief = "UART Polling Driver",
  243. description = "Simple UART driver without interrupt handler.",
  244. requires = { "DEV_UART" },
  245. options =
  246. {
  247. {
  248. macro = "NUT_DEV_DEBUG_READ",
  249. brief = "Enable Debug Input",
  250. description = "By default the serial debug port can be used for output only. "..
  251. "This option enables usage of this port for input too.\n\n"..
  252. "Note, that the debug driver is not interrupt driven, it "..
  253. "uses polling. Therefore, standard output functions "..
  254. "may be even called in interrupt context. This is not "..
  255. "true for input, where the driver calls NutSleep while "..
  256. "waiting for incoming data.\n\n"..
  257. "Further note, that incoming characters are not handled in "..
  258. "the background and may get lost, if the application is not "..
  259. "actively listening for input data.",
  260. requires = { "DEV_UART" },
  261. flavor = "boolean",
  262. file = "include/cfg/uart.h"
  263. }
  264. }
  265. },
  266. {
  267. name = "nutdev_usartcb",
  268. brief = "USART Driver Framework (Experimental)",
  269. description = "Experimental USART driver framework.",
  270. requires = { "CRT_HEAPMEM", "DEV_UART_CBRXTX", "DEV_CIRCBUF" },
  271. provides = { "DEV_UART_GENERIC", "DEV_FILE", "DEV_READ", "DEV_WRITE" },
  272. sources = { "usart_cb.c" },
  273. },
  274. {
  275. name = "nutdev_usart",
  276. brief = "USART Driver Framework",
  277. description = "Generic USART driver framework.",
  278. requires = { "CRT_HEAPMEM", "DEV_UART_SPECIFIC" },
  279. provides = { "DEV_UART_GENERIC", "DEV_FILE", "DEV_READ", "DEV_WRITE" },
  280. sources = { "usart.c" },
  281. options =
  282. {
  283. {
  284. macro = "UART0_RXTX_ONLY",
  285. brief = "USART0 Receive/Transmit Only",
  286. description = "When selected, the driver will not use any built-in hardware handshake.\n\n"..
  287. "Select this option, if you want to use hardware handshake via GPIO or if "..
  288. "the target specific UART0 driver doesn't support built-in hardware handshake.",
  289. flavor = "boolean",
  290. exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
  291. file = "include/cfg/uart.h"
  292. },
  293. {
  294. macro = "UART0_HARDWARE_HANDSHAKE",
  295. brief = "USART0 Hardware Handshake",
  296. description = "When selected, the driver will support built-in RTS/CTS hardware handshake. "..
  297. "This includes half duplex mode, using RTS for direction control.\n\n"..
  298. "Make sure, that the related peripheral pins are available.\n\n"..
  299. "Do not select this option if you want to use hardware handshake "..
  300. "via GPIO pins.",
  301. flavor = "boolean",
  302. exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
  303. requires = { "HW_UART0_RTSCTS" },
  304. file = "include/cfg/uart.h"
  305. },
  306. {
  307. macro = "UART0_MODEM_CONTROL",
  308. brief = "USART0 Full Modem Control",
  309. description = "When selected, the driver will support built-in full modem control. "..
  310. "This includes RTS/CTS handshake and half duplex mode.\n\n"..
  311. "Make sure, that all related peripheral pins are available.\n\n"..
  312. "Do not select this option if you want to use modem control "..
  313. "via GPIO pins.",
  314. flavor = "boolean",
  315. exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
  316. requires = { "HW_UART0_MODEM" },
  317. file = "include/cfg/uart.h"
  318. },
  319. {
  320. macro = "UART0_INIT_BAUDRATE",
  321. brief = "USART0 Initial Baudrate",
  322. description = "Default is 115200. Currently supported on the AT91 driver only.",
  323. requires = { "HW_MCU_AT91" },
  324. flavor = "integer",
  325. file = "include/cfg/uart.h"
  326. },
  327. {
  328. macro = "UART0_RTS_BIT",
  329. brief = "USART0 RTS Port Bit",
  330. description = "Port bit used for RTS handshake output. If enabled, "..
  331. "the driver provides RTS transmit handshake via GPIO.\n\n"..
  332. "Do not activate this option if you want to use the "..
  333. "UART's built-in hardware handshake.",
  334. provides = { "UART0_RTS_BIT" },
  335. type = "enumerated",
  336. choices = function() return GetGpioBits() end,
  337. flavor = "booldata",
  338. file = function() return GetGpioHeaderPath() end
  339. },
  340. {
  341. macro = "UART0_RTS_PIO_ID",
  342. brief = "USART0 RTS Port",
  343. description = "ID of the port used for RTS handshake output.",
  344. requires = { "UART0_RTS_BIT", "DEV_UART0_GPIO_RTS" },
  345. type = "enumerated",
  346. choices = function() return GetGpioPortIds() end,
  347. flavor = "integer",
  348. file = function() return GetGpioHeaderPath() end
  349. },
  350. {
  351. macro = "UART0_RTS_AVRPORT",
  352. brief = "USART0 RTS Port (AVR)",
  353. description = "AVR port register name of UART0 RTS handshake output.",
  354. requires = { "UART0_RTS_BIT", "HW_UART_AVR" },
  355. type = "enumerated",
  356. choices = avr_port_choice,
  357. file = "include/cfg/arch/avrpio.h"
  358. },
  359. {
  360. macro = "UART0_RTS_FLIP_BIT",
  361. brief = "USART0 RTS Bit Inverted",
  362. description = "If enabled, the RTS output will be inverted.",
  363. requires = { "UART0_RTS_BIT", "DEV_UART0_GPIO_RTS" },
  364. flavor = "boolean",
  365. file = function() return GetGpioHeaderPath() end
  366. },
  367. {
  368. macro = "UART0_CTS_BIT",
  369. brief = "USART0 CTS Port Bit",
  370. description = "Port bit used for CTS handshake input. If enabled, "..
  371. "the driver provides CTS transmit handshake via GPIO.\n\n"..
  372. "Do not activate this option if you want to use the "..
  373. "UART's built-in hardware handshake.",
  374. requires = { "DEV_UART0_GPIO_CTS" },
  375. provides = { "UART0_CTS_BIT" },
  376. type = "enumerated",
  377. choices = function() return GetGpioBits() end,
  378. flavor = "booldata",
  379. file = function() return GetGpioHeaderPath() end
  380. },
  381. {
  382. macro = "UART0_CTS_PIO_ID",
  383. brief = "USART0 CTS Port",
  384. description = "ID of the port used for CTS handshake output.",
  385. requires = { "UART0_CTS_BIT" },
  386. type = "enumerated",
  387. choices = function() return GetGpioPortIds() end,
  388. flavor = "integer",
  389. file = function() return GetGpioHeaderPath() end
  390. },
  391. {
  392. macro = "UART0_CTS_IRQ",
  393. brief = "USART0 CTS Interrupt (AVR)",
  394. description = "AVR interrupt number of UART0 CTS handshake input. If enabled, "..
  395. "the driver provides RS 232 output hardware handshake.\n\n",
  396. requires = { "HW_UART_AVR" },
  397. flavor = "booldata",
  398. type = "enumerated",
  399. choices = avr_irq_choice,
  400. file = "include/cfg/arch/avrpio.h"
  401. },
  402. {
  403. macro = "UART0_DTR_BIT",
  404. brief = "USART0 DTR Bit (AVR)",
  405. description = "Bit number of UART0 DTR handshake output. If enabled, "..
  406. "the driver provides RS 232 output hardware handshake.\n\n",
  407. requires = { "HW_UART_AVR" },
  408. provides = { "UART0_DTR_BIT" },
  409. flavor = "booldata",
  410. type = "enumerated",
  411. choices = avr_bit_choice,
  412. file = "include/cfg/arch/avrpio.h"
  413. },
  414. {
  415. macro = "UART0_DTR_AVRPORT",
  416. brief = "USART0 DTR Port (AVR)",
  417. description = "Port register name of UART0 DTR handshake output.",
  418. requires = { "UART0_DTR_BIT" },
  419. type = "enumerated",
  420. choices = avr_port_choice,
  421. file = "include/cfg/arch/avrpio.h"
  422. },
  423. {
  424. macro = "UART0_HDX_BIT",
  425. brief = "USART0 Half Duplex Bit",
  426. description = "Bit number of UART0 half duplex control output. If enabled, "..
  427. "the driver provides RS-485 half duplex mode control via GPIO."..
  428. "Do not activate this option if you want to use the "..
  429. "UART's built-in hardware handshake.",
  430. provides = { "UART0_HDX_BIT" },
  431. flavor = "booldata",
  432. type = "enumerated",
  433. choices = avr_bit_choice,
  434. file = function() return GetGpioHeaderPath() end
  435. },
  436. {
  437. macro = "UART0_HDX_PIO_ID",
  438. brief = "USART0 Half Duplex Port",
  439. description = "ID of the port used for UART0 half duplex control output.",
  440. requires = { "UART0_HDX_BIT", "DEV_UART0_GPIO_HDX" },
  441. type = "enumerated",
  442. choices = function() return GetGpioPortIds() end,
  443. flavor = "integer",
  444. file = function() return GetGpioHeaderPath() end
  445. },
  446. {
  447. macro = "UART0_HDX_AVRPORT",
  448. brief = "USART0 Half Duplex Port (AVR)",
  449. description = "AVR port register name of UART0 half duplex control output.",
  450. requires = { "UART0_HDX_BIT", "HW_UART_AVR" },
  451. type = "enumerated",
  452. choices = avr_port_choice,
  453. file = "include/cfg/arch/avrpio.h"
  454. },
  455. {
  456. macro = "UART0_HDX_FLIP_BIT",
  457. brief = "USART0 Half Duplex Bit Inverted",
  458. description = "If enabled, the half duplex control output will be inverted.",
  459. requires = { "UART0_HDX_BIT", "DEV_UART0_GPIO_HDX" },
  460. flavor = "boolean",
  461. file = function() return GetGpioHeaderPath() end
  462. },
  463. {
  464. macro = "UART1_RXTX_ONLY",
  465. brief = "USART1 Receive/Transmit Only",
  466. description = "When selected, the driver will not use any built-in hardware handshake.\n\n"..
  467. "Select this option, if you want to use hardware handshake via GPIO or if "..
  468. "the target specific UART1 driver doesn't support built-in hardware handshake.",
  469. flavor = "boolean",
  470. exclusivity = { "UART1_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
  471. file = "include/cfg/uart.h"
  472. },
  473. {
  474. macro = "UART1_HARDWARE_HANDSHAKE",
  475. brief = "USART1 Hardware Handshake",
  476. description = "When selected, the driver will support built-in RTS/CTS hardware handshake. "..
  477. "This includes half duplex mode, using RTS for direction control.\n\n"..
  478. "Make sure, that the related peripheral pins are available.\n\n"..
  479. "Do not select this option if you want to use hardware handshake "..
  480. "via GPIO pins.",
  481. flavor = "boolean",
  482. exclusivity = { "UART1_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
  483. requires = { "HW_UART1_RTSCTS" },
  484. file = "include/cfg/uart.h"
  485. },
  486. {
  487. macro = "UART1_MODEM_CONTROL",
  488. brief = "USART1 Full Modem Control",
  489. description = "When selected, the driver will support built-in full modem control. "..
  490. "This includes RTS/CTS handshake and half duplex mode.\n\n"..
  491. "Make sure, that all related peripheral pins are available.\n\n"..
  492. "Do not select this option if you want to use modem control "..
  493. "via GPIO pins.",
  494. flavor = "boolean",
  495. exclusivity = { "UART1_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
  496. requires = { "HW_UART1_MODEM" },
  497. file = "include/cfg/uart.h"
  498. },
  499. {
  500. macro = "UART1_INIT_BAUDRATE",
  501. brief = "USART1 Initial Baudrate",
  502. description = "Default is 115200. Currently supported on the AT91 driver only.",
  503. requires = { "HW_MCU_AT91" },
  504. flavor = "integer",
  505. file = "include/cfg/uart.h"
  506. },
  507. {
  508. macro = "UART1_RTS_BIT",
  509. brief = "USART1 RTS Port Bit",
  510. description = "Port bit used for RTS handshake output. If enabled, "..
  511. "the driver provides RTS transmit handshake via GPIO.\n\n"..
  512. "Do not activate this option if you want to use the "..
  513. "UART's built-in hardware handshake.",
  514. provides = { "UART1_RTS_BIT" },
  515. type = "enumerated",
  516. choices = function() return GetGpioBits() end,
  517. flavor = "booldata",
  518. file = function() return GetGpioHeaderPath() end
  519. },
  520. {
  521. macro = "UART1_RTS_PIO_ID",
  522. brief = "USART1 RTS Port",
  523. description = "ID of the port used for RTS handshake output.",
  524. requires = { "UART1_RTS_BIT", "DEV_UART1_GPIO_RTS" },
  525. type = "enumerated",
  526. choices = function() return GetGpioPortIds() end,
  527. flavor = "integer",
  528. file = function() return GetGpioHeaderPath() end
  529. },
  530. {
  531. macro = "UART1_RTS_AVRPORT",
  532. brief = "USART1 RTS Port (AVR)",
  533. description = "AVR port register name of UART1 RTS handshake output.",
  534. requires = { "UART1_RTS_BIT", "HW_UART_AVR" },
  535. type = "enumerated",
  536. choices = avr_port_choice,
  537. file = "include/cfg/arch/avrpio.h"
  538. },
  539. {
  540. macro = "UART1_RTS_FLIP_BIT",
  541. brief = "USART1 RTS Bit Inverted",
  542. description = "If enabled, the RTS output will be inverted.",
  543. requires = { "UART1_RTS_BIT", "DEV_UART1_GPIO_RTS" },
  544. flavor = "boolean",
  545. file = function() return GetGpioHeaderPath() end
  546. },
  547. {
  548. macro = "UART1_CTS_BIT",
  549. brief = "USART1 CTS Port Bit",
  550. description = "Port bit used for CTS handshake input. If enabled, "..
  551. "the driver provides CTS transmit handshake via GPIO.\n\n"..
  552. "Do not activate this option if you want to use the "..
  553. "UART's built-in hardware handshake.",
  554. requires = { "DEV_UART1_GPIO_CTS" },
  555. provides = { "UART1_CTS_BIT" },
  556. type = "enumerated",
  557. choices = function() return GetGpioBits() end,
  558. flavor = "booldata",
  559. file = function() return GetGpioHeaderPath() end
  560. },
  561. {
  562. macro = "UART1_CTS_PIO_ID",
  563. brief = "USART1 CTS Port",
  564. description = "ID of the port used for CTS handshake output.",
  565. requires = { "UART1_CTS_BIT" },
  566. type = "enumerated",
  567. choices = function() return GetGpioPortIds() end,
  568. flavor = "integer",
  569. file = function() return GetGpioHeaderPath() end
  570. },
  571. {
  572. macro = "UART1_CTS_IRQ",
  573. brief = "USART1 CTS Interrupt (AVR)",
  574. description = "AVR interrupt number of UART1 CTS handshake input. If enabled, "..
  575. "the driver provides RS 232 output hardware handshake.\n\n",
  576. requires = { "HW_UART_AVR" },
  577. flavor = "booldata",
  578. type = "enumerated",
  579. choices = avr_irq_choice,
  580. file = "include/cfg/arch/avrpio.h"
  581. },
  582. {
  583. macro = "UART1_DTR_BIT",
  584. brief = "USART1 DTR Bit (AVR)",
  585. description = "Bit number of UART1 DTR handshake output. If enabled, "..
  586. "the driver provides RS 232 output hardware handshake.\n\n",
  587. requires = { "HW_UART_AVR" },
  588. provides = { "UART1_DTR_BIT" },
  589. flavor = "booldata",
  590. type = "enumerated",
  591. choices = avr_bit_choice,
  592. file = "include/cfg/arch/avrpio.h"
  593. },
  594. {
  595. macro = "UART1_DTR_AVRPORT",
  596. brief = "USART1 DTR Port (AVR)",
  597. description = "Port register name of UART1 DTR handshake output.",
  598. requires = { "UART1_DTR_BIT" },
  599. type = "enumerated",
  600. choices = avr_port_choice,
  601. file = "include/cfg/arch/avrpio.h"
  602. },
  603. {
  604. macro = "UART1_HDX_BIT",
  605. brief = "USART1 Half Duplex Bit",
  606. description = "Bit number of UART1 half duplex control output. If enabled, "..
  607. "the driver provides RS-485 half duplex mode control via GPIO."..
  608. "Do not activate this option if you want to use the "..
  609. "UART's built-in hardware handshake.",
  610. provides = { "UART1_HDX_BIT" },
  611. flavor = "booldata",
  612. type = "enumerated",
  613. choices = avr_bit_choice,
  614. file = function() return GetGpioHeaderPath() end
  615. },
  616. {
  617. macro = "UART1_HDX_PIO_ID",
  618. brief = "USART1 Half Duplex Port",
  619. description = "ID of the port used for UART1 half duplex control output.",
  620. requires = { "UART1_HDX_BIT", "DEV_UART1_GPIO_HDX" },
  621. type = "enumerated",
  622. choices = function() return GetGpioPortIds() end,
  623. flavor = "integer",
  624. file = function() return GetGpioHeaderPath() end
  625. },
  626. {
  627. macro = "UART1_HDX_AVRPORT",
  628. brief = "USART1 Half Duplex Port (AVR)",
  629. description = "AVR port register name of UART1 half duplex control output.",
  630. requires = { "UART1_HDX_BIT", "HW_UART_AVR" },
  631. type = "enumerated",
  632. choices = avr_port_choice,
  633. file = "include/cfg/arch/avrpio.h"
  634. },
  635. {
  636. macro = "UART1_HDX_FLIP_BIT",
  637. brief = "USART1 Half Duplex Bit Inverted",
  638. description = "If enabled, the half duplex control output will be inverted.",
  639. requires = { "UART1_HDX_BIT", "DEV_UART1_GPIO_HDX" },
  640. flavor = "boolean",
  641. file = function() return GetGpioHeaderPath() end
  642. },
  643. {
  644. macro = "UARTD_RXTX_ONLY",
  645. brief = "DBGU Receive/Transmit Only",
  646. description = "When selected, the driver will not use any built-in hardware handshake.\n\n"..
  647. "Select this option, if you want to use hardware handshake via GPIO.\n\n"..
  648. "The DBGU unit does not support any other way of handshake.",
  649. flavor = "boolean",
  650. -- exclusivity = { "UARTD_RXTX_ONLY", "UARTD_HARDWARE_HANDSHAKE", "UARTD_MODEM_CONTROL" },
  651. file = "include/cfg/uart.h"
  652. },
  653. {
  654. macro = "UARTD_INIT_BAUDRATE",
  655. brief = "DBGU Initial Baudrate",
  656. description = "Default is 115200. Currently supported on the AT91 driver only.",
  657. requires = { "HW_MCU_AT91" },
  658. flavor = "integer",
  659. file = "include/cfg/uart.h"
  660. },
  661. {
  662. macro = "UARTD_RTS_BIT",
  663. brief = "DBGU RTS Port Bit",
  664. description = "Port bit used for RTS handshake output. If enabled, "..
  665. "the driver provides RTS transmit handshake via GPIO.",
  666. provides = { "UARTD_RTS_BIT" },
  667. type = "enumerated",
  668. choices = function() return GetGpioBits() end,
  669. flavor = "booldata",
  670. file = function() return GetGpioHeaderPath() end
  671. },
  672. {
  673. macro = "UARTD_RTS_PIO_ID",
  674. brief = "DBGU RTS Port",
  675. description = "ID of the port used for RTS handshake output.",
  676. requires = { "UARTD_RTS_BIT", "DEV_UARTD_GPIO_RTS" },
  677. type = "enumerated",
  678. choices = function() return GetGpioPortIds() end,
  679. flavor = "integer",
  680. file = function() return GetGpioHeaderPath() end
  681. },
  682. {
  683. macro = "UARTD_RTS_FLIP_BIT",
  684. brief = "DBGU RTS Bit Inverted",
  685. description = "If enabled, the RTS output will be inverted.",
  686. requires = { "UARTD_RTS_BIT", "DEV_UARTD_GPIO_RTS" },
  687. flavor = "boolean",
  688. file = function() return GetGpioHeaderPath() end
  689. },
  690. {
  691. macro = "UARTD_CTS_BIT",
  692. brief = "DBGU CTS Port Bit",
  693. description = "Port bit used for CTS handshake input. If enabled, "..
  694. "the driver provides CTS transmit handshake via GPIO.\n\n"..
  695. "Select this option, if you want to use hardware handshake via GPIO.\n\n"..
  696. "The DBGU unit does not support any other way of handshake.",
  697. requires = { "DEV_UARTD_GPIO_CTS" },
  698. provides = { "UARTD_CTS_BIT" },
  699. type = "enumerated",
  700. choices = function() return GetGpioBits() end,
  701. flavor = "booldata",
  702. file = function() return GetGpioHeaderPath() end
  703. },
  704. {
  705. macro = "UARTD_CTS_PIO_ID",
  706. brief = "DBGU CTS Port",
  707. description = "ID of the port used for CTS handshake output.",
  708. requires = { "UARTD_CTS_BIT" },
  709. type = "enumerated",
  710. choices = function() return GetGpioPortIds() end,
  711. flavor = "integer",
  712. file = function() return GetGpioHeaderPath() end
  713. },
  714. {
  715. macro = "UARTD_HDX_BIT",
  716. brief = "DBGU Half Duplex Bit",
  717. description = "Bit number of UART0 half duplex control output. If enabled, "..
  718. "the driver provides RS-485 half duplex mode control via GPIO."..
  719. "Select this option, if you want to use software half-duplex.\n\n"..
  720. "The DBGU unit does not support any other way.",
  721. provides = { "UARTD_HDX_BIT" },
  722. flavor = "booldata",
  723. type = "enumerated",
  724. choices = avr_bit_choice,
  725. file = function() return GetGpioHeaderPath() end
  726. },
  727. {
  728. macro = "UARTD_HDX_PIO_ID",
  729. brief = "DBGU Half Duplex Port",
  730. description = "ID of the port used for UART0 half duplex control output.",
  731. requires = { "UARTD_HDX_BIT", "DEV_UARTD_GPIO_HDX" },
  732. type = "enumerated",
  733. choices = function() return GetGpioPortIds() end,
  734. flavor = "integer",
  735. file = function() return GetGpioHeaderPath() end
  736. },
  737. {
  738. macro = "UARTD_HDX_FLIP_BIT",
  739. brief = "DBGU Half Duplex Bit Inverted",
  740. description = "If enabled, the half duplex control output will be inverted.",
  741. requires = { "UARTD_HDX_BIT", "DEV_UARTD_GPIO_HDX" },
  742. flavor = "boolean",
  743. file = function() return GetGpioHeaderPath() end
  744. },
  745. }
  746. },
  747. {
  748. name = "nutdev_chat",
  749. brief = "UART Chat",
  750. description = "Executes a conversational exchange with a serial device."..
  751. "Typically used for modem dial commands and login scripts.",
  752. requires = { "CRT_HEAPMEM", "DEV_UART", "NUT_TIMER" },
  753. provides = { "UART_CHAT" },
  754. sources = { "chat.c" },
  755. options =
  756. {
  757. {
  758. macro = "CHAT_MAX_ABORTS",
  759. brief = "Max. Number of Aborts",
  760. description = "Default is 10.",
  761. file = "include/cfg/chat.h"
  762. },
  763. {
  764. macro = "CHAT_MAX_REPORT_SIZE",
  765. brief = "Max. Size of Reports",
  766. description = "Default is 32",
  767. file = "include/cfg/chat.h"
  768. },
  769. {
  770. macro = "CHAT_DEFAULT_TIMEOUT",
  771. brief = "Default Timeout",
  772. description = "Specify the number of seconds. "..
  773. "Default is 45",
  774. file = "include/cfg/chat.h"
  775. },
  776. {
  777. macro = "NUTDEBUG_CHAT",
  778. brief = "Debug Output",
  779. flavor = "boolean",
  780. description = "Enables debug output.\n\n"..
  781. "Applications must call NutTraceChat() to activate it.",
  782. file = "include/cfg/chat.h"
  783. }
  784. }
  785. },
  786. {
  787. name = "nutdev_term",
  788. brief = "Terminal Emulation",
  789. requires = { "CRT_HEAPMEM" },
  790. sources = { "term.c" }
  791. },
  792. {
  793. name = "nutdev_circbuf",
  794. brief = "Circular Buffers",
  795. requires = { "TOOL_GCC" },
  796. provides = { "DEV_CIRCBUF" },
  797. sources = { "circbuff.c" }
  798. },
  799. {
  800. name = "nutdev_netbuf",
  801. brief = "Network Buffers",
  802. provides = { "DEV_NETBUF" },
  803. sources = { "netbuf.c" }
  804. },
  805. {
  806. name = "nutdev_can",
  807. brief = "CAN Driver Framework",
  808. description = "Generic CAN driver framework.",
  809. requires = { "DEV_CAN_SPECIFIC" },
  810. provides = { "DEV_CAN_GENERIC"},
  811. sources = { "can_dev.c" },
  812. },
  813. {
  814. name = "nutdev_canbus",
  815. brief = "CANBUS Driver Framework",
  816. description = "Generic CANBUS driver framework.",
  817. requires = { "DEV_CANBUS" },
  818. options =
  819. {
  820. {
  821. macro = "DEV_CANBUS",
  822. brief = "CANBUS Driver",
  823. description = "Enable use of the CANBUS drivers",
  824. requires = { "DEV_CANBUS" },
  825. type = "integer",
  826. default = 1,
  827. file = "include/cfg/can_dev.h"
  828. },
  829. }
  830. },
  831. {
  832. name = "nutdev_nvmem",
  833. brief = "Non Volatile Memory",
  834. description = "The Nut/OS API provides routines for platform independent access "..
  835. "to non-volatile memory. A part of this memory is used by the system "..
  836. "to store global settings like the host name or network parameters, "..
  837. "while the remaining part is available for application settings.",
  838. sources = { "nvmem.c" },
  839. options =
  840. {
  841. {
  842. macro = "NUT_CONFIG_AT45D",
  843. brief = "Atmel AT45D DataFlash",
  844. description = "If enabled, the Atmel AT45D DataFlash is used for non-volatile memory."..
  845. "Additionally specify the chip index as 0 for the first, 1 for the second etc.\n\n"..
  846. "For the AVR family the on-chip EEPROM is used by default.",
  847. provides = { "DEV_NVMEM", "DEV_NVMEM_AT45D" },
  848. flavor = "booldata",
  849. exclusivity =
  850. {
  851. "NUT_CONFIG_AT24",
  852. "NUT_CONFIG_X12RTC",
  853. "NUT_CONFIG_AT45D",
  854. "NUT_CONFIG_AT45DB",
  855. "NUT_CONFIG_AT49BV",
  856. "NUT_CONFIG_AT91EFC",
  857. "NUT_CONFIG_STM32_IAP",
  858. "NUT_CONFIG_STM32L1_EEPROM",
  859. "NUT_CONFIG_LPC177x_8x_EEPROM",
  860. "NUT_CONFIG_LPC17xx_IAP"
  861. },
  862. default = "0",
  863. file = "include/cfg/eeprom.h"
  864. },
  865. {
  866. macro = "NUT_CONFIG_AT45DB",
  867. brief = "Atmel AT45DB DataFlash",
  868. description = "Deprecated, uses old SPI routines.",
  869. provides = { "DEV_NVMEM", "DEV_NVMEM_AT45DB" },
  870. flavor = "boolean",
  871. exclusivity =
  872. {
  873. "NUT_CONFIG_AT24",
  874. "NUT_CONFIG_X12RTC",
  875. "NUT_CONFIG_AT45D",
  876. "NUT_CONFIG_AT45DB",
  877. "NUT_CONFIG_AT49BV",
  878. "NUT_CONFIG_AT91EFC",
  879. "NUT_CONFIG_STM32_IAP",
  880. "NUT_CONFIG_STM32L1_EEPROM",
  881. "NUT_CONFIG_LPC177x_8x_EEPROM",
  882. "NUT_CONFIG_LPC17xx_IAP"
  883. },
  884. file = "include/cfg/eeprom.h"
  885. },
  886. {
  887. macro = "NUT_CONFIG_AT49BV",
  888. brief = "Atmel AT49BV NOR Flash",
  889. description = "If enabled, Nut/OS and Nut/Net configurations will "..
  890. "be stored in this chip.",
  891. provides = { "DEV_NVMEM", "DEV_NVMEM_NORFLASH" },
  892. flavor = "boolean",
  893. exclusivity =
  894. {
  895. "NUT_CONFIG_AT24",
  896. "NUT_CONFIG_X12RTC",
  897. "NUT_CONFIG_AT45D",
  898. "NUT_CONFIG_AT45DB",
  899. "NUT_CONFIG_AT49BV",
  900. "NUT_CONFIG_AT91EFC",
  901. "NUT_CONFIG_STM32_IAP",
  902. "NUT_CONFIG_STM32L1_EEPROM",
  903. "NUT_CONFIG_LPC177x_8x_EEPROM",
  904. "NUT_CONFIG_LPC17xx_IAP"
  905. },
  906. file = "include/cfg/eeprom.h"
  907. },
  908. {
  909. macro = "NUT_CONFIG_AT91EFC",
  910. brief = "AT91 On-Chip Flash",
  911. description = "If enabled, Nut/OS and Nut/Net configurations will "..
  912. "be stored in on-chip flash memory.",
  913. requires = { "HW_EFC_AT91" },
  914. provides = { "DEV_NVMEM", "DEV_NVMEM_NORFLASH" },
  915. flavor = "boolean",
  916. exclusivity =
  917. {
  918. "NUT_CONFIG_AT24",
  919. "NUT_CONFIG_X12RTC",
  920. "NUT_CONFIG_AT45D",
  921. "NUT_CONFIG_AT45DB",
  922. "NUT_CONFIG_AT49BV",
  923. "NUT_CONFIG_AT91EFC",
  924. "NUT_CONFIG_STM32_IAP",
  925. "NUT_CONFIG_STM32L1_EEPROM",
  926. "NUT_CONFIG_LPC177x_8x_EEPROM",
  927. "NUT_CONFIG_LPC17xx_IAP"
  928. },
  929. file = "include/cfg/eeprom.h"
  930. },
  931. {
  932. macro = "NUT_CONFIG_STM32_IAP",
  933. brief = "STM32 On-Chip Flash",
  934. description = "If enabled, Nut/OS and Nut/Net configurations will "..
  935. "be stored in last sector of on-chip flash memory.",
  936. requires = { "HW_FLASH_STM32" },
  937. provides = { "DEV_NVMEM", "DEV_NVMEM_NORFLASH" },
  938. flavor = "boolean",
  939. exclusivity =
  940. {
  941. "NUT_CONFIG_AT24",
  942. "NUT_CONFIG_X12RTC",
  943. "NUT_CONFIG_AT45D",
  944. "NUT_CONFIG_AT45DB",
  945. "NUT_CONFIG_AT49BV",
  946. "NUT_CONFIG_AT91EFC",
  947. "NUT_CONFIG_STM32_IAP",
  948. "NUT_CONFIG_STM32L1_EEPROM",
  949. "NUT_CONFIG_LPC177x_8x_EEPROM",
  950. "NUT_CONFIG_LPC17xx_IAP"
  951. },
  952. file = "include/cfg/eeprom.h"
  953. },
  954. {
  955. macro = "NUT_CONFIG_STM32L1_EEPROM",
  956. brief = "STM32L1 On-Chip EEPROM",
  957. description = "If enabled, Nut/OS and Nut/Net configurations will "..
  958. "be stored in on-chip eeprom memory.",
  959. requires = { "HW_EEPROM_STM32L1" },
  960. provides = { "DEV_NVMEM" },
  961. flavor = "boolean",
  962. exclusivity =
  963. {
  964. "NUT_CONFIG_AT24",
  965. "NUT_CONFIG_X12RTC",
  966. "NUT_CONFIG_AT45D",
  967. "NUT_CONFIG_AT45DB",
  968. "NUT_CONFIG_AT49BV",
  969. "NUT_CONFIG_AT91EFC",
  970. "NUT_CONFIG_STM32_IAP",
  971. "NUT_CONFIG_STM32_IAP",
  972. "NUT_CONFIG_STM32L1_EEPROM",
  973. "NUT_CONFIG_LPC177x_8x_EEPROM",
  974. "NUT_CONFIG_LPC17xx_IAP"
  975. },
  976. file = "include/cfg/eeprom.h"
  977. },
  978. {
  979. macro = "NUT_CONFIG_LPC177x_8x_EEPROM",
  980. brief = "LPC177x_8x On-Chip EEPROM",
  981. description = "If enabled, Nut/OS and Nut/Net configurations will "..
  982. "be stored in on-chip eeprom memory.",
  983. requires = { "HW_EEPROM_LPC177x_8x" },
  984. provides = { "DEV_NVMEM" },
  985. flavor = "boolean",
  986. exclusivity =
  987. {
  988. "NUT_CONFIG_AT24",
  989. "NUT_CONFIG_X12RTC",
  990. "NUT_CONFIG_AT45D",
  991. "NUT_CONFIG_AT45DB",
  992. "NUT_CONFIG_AT49BV",
  993. "NUT_CONFIG_AT91EFC",
  994. "NUT_CONFIG_STM32_IAP",
  995. "NUT_CONFIG_STM32_IAP",
  996. "NUT_CONFIG_STM32L1_EEPROM",
  997. "NUT_CONFIG_LPC177x_8x_EEPROM",
  998. "NUT_CONFIG_LPC17xx_IAP"
  999. },
  1000. file = "include/cfg/eeprom.h"
  1001. },
  1002. {
  1003. macro = "NUT_CONFIG_LPC17xx_IAP",
  1004. brief = "LPC17xx On-Chip Flash",
  1005. description = "If enabled, Nut/OS and Nut/Net configurations will "..
  1006. "be stored in on-chip flash memory.",
  1007. requires = { "HW_FLASH_LPC17xx" },
  1008. provides = { "DEV_NVMEM", "DEV_NVMEM_NORFLASH" },
  1009. flavor = "boolean",
  1010. exclusivity =
  1011. {
  1012. "NUT_CONFIG_AT24",
  1013. "NUT_CONFIG_X12RTC",
  1014. "NUT_CONFIG_AT45D",
  1015. "NUT_CONFIG_AT45DB",
  1016. "NUT_CONFIG_AT49BV",
  1017. "NUT_CONFIG_AT91EFC",
  1018. "NUT_CONFIG_STM32_IAP",
  1019. "NUT_CONFIG_STM32L1_EEPROM",
  1020. "NUT_CONFIG_LPC177x_8x_EEPROM",
  1021. "NUT_CONFIG_LPC17xx_IAP"
  1022. },
  1023. file = "include/cfg/eeprom.h"
  1024. },
  1025. {
  1026. macro = "NUT_CONFIG_X12RTC",
  1027. brief = "Intersil X12x6 EEPROM",
  1028. description = "If enabled, the EEPROM on the Intersil X1226/X1286 chip is used for non-volatile memory.",
  1029. provides = { "DEV_NVMEM" },
  1030. flavor = "boolean",
  1031. exclusivity =
  1032. {
  1033. "NUT_CONFIG_AT24",
  1034. "NUT_CONFIG_X12RTC",
  1035. "NUT_CONFIG_AT45D",
  1036. "NUT_CONFIG_AT45DB",
  1037. "NUT_CONFIG_AT49BV",
  1038. "NUT_CONFIG_AT91EFC",
  1039. "NUT_CONFIG_STM32_IAP",
  1040. "NUT_CONFIG_STM32L1_EEPROM",
  1041. "NUT_CONFIG_LPC177x_8x_EEPROM",
  1042. "NUT_CONFIG_LPC17xx_IAP"
  1043. },
  1044. file = "include/cfg/eeprom.h"
  1045. },
  1046. {
  1047. macro = "NUT_CONFIG_AT24",
  1048. brief = "Standard EEPROM",
  1049. description = "If enabled, a standard EEPROM chip is used for non-volatile memory.",
  1050. provides = { "DEV_NVMEM", "DEV_NVMEM_I2C" },
  1051. flavor = "boolean",
  1052. exclusivity =
  1053. {
  1054. "NUT_CONFIG_AT24",
  1055. "NUT_CONFIG_X12RTC",
  1056. "NUT_CONFIG_AT45D",
  1057. "NUT_CONFIG_AT45DB",
  1058. "NUT_CONFIG_AT49BV",
  1059. "NUT_CONFIG_AT91EFC",
  1060. "NUT_CONFIG_STM32_IAP",
  1061. "NUT_CONFIG_STM32L1_EEPROM",
  1062. "NUT_CONFIG_LPC177x_8x_EEPROM",
  1063. "NUT_CONFIG_LPC17xx_IAP"
  1064. },
  1065. file = "include/cfg/eeprom.h"
  1066. },
  1067. {
  1068. macro = "NUT_CONFIG_AT24_ADR",
  1069. brief = "EEPROM Bus address",
  1070. description = "Address of the EEPROM on the I2C Bus.",
  1071. requires = { "DEV_NVMEM_I2C" },
  1072. default = "0x50",
  1073. file = "include/cfg/eeprom.h"
  1074. },
  1075. {
  1076. macro = "NUT_CONFIG_AT45D_CS",
  1077. brief = "AT45D Chip Select",
  1078. description = "Chip select number.",
  1079. requires = { "DEV_NVMEM_AT45D" },
  1080. default = "0",
  1081. type = "enumerated",
  1082. choices = { "0", "1", "2", "3" },
  1083. file = "include/cfg/eeprom.h"
  1084. },
  1085. {
  1086. macro = "NUT_CONFIG_AT45D_PAGE",
  1087. brief = "AT45D Start Page",
  1088. description = "First page used by the configuration data area. "..
  1089. "By default the last page will be used.",
  1090. requires = { "DEV_NVMEM_AT45D" },
  1091. flavor = "booldata",
  1092. file = "include/cfg/memory.h"
  1093. },
  1094. {
  1095. macro = "NUT_CONFIG_AT45D_SIZE",
  1096. brief = "AT45D Area Size",
  1097. description = "Size of the configuration data area."..
  1098. "By default one full page will be used.",
  1099. requires = { "DEV_NVMEM_AT45D" },
  1100. flavor = "booldata",
  1101. file = "include/cfg/memory.h"
  1102. },
  1103. {
  1104. macro = "AT45_CONF_SIZE",
  1105. brief = "Configuration Area Size",
  1106. description = "During write operations a buffer with this size is allocated "..
  1107. "from heap and may cause memory problems with large sectors. "..
  1108. "Thus, this value may be less than the size of the configuration "..
  1109. "sector, in which case the rest of the sector is unused.",
  1110. requires = { "DEV_NVMEM_AT45DB" },
  1111. flavor = "booldata",
  1112. file = "include/cfg/memory.h"
  1113. },
  1114. {
  1115. macro = "FLASH_CONF_SECTOR",
  1116. brief = "Flash Sector Address",
  1117. description = "Address of the sector used for configuration data.\n\n"..
  1118. "Specify the relative memory address, e.g. 0x0000 for the first sector.",
  1119. requires = { "DEV_NVMEM_NORFLASH" },
  1120. flavor = "booldata",
  1121. file = "include/cfg/memory.h"
  1122. },
  1123. {
  1124. macro = "FLASH_CONF_SIZE",
  1125. brief = "Configuration Area Size",
  1126. description = "During write operations a buffer with this size is allocated "..
  1127. "from heap and may cause memory problems with large sectors. "..
  1128. "Thus, this value may be less than the size of the configuration "..
  1129. "sector, in which case the rest of the sector is unused.",
  1130. requires = { "DEV_NVMEM_NORFLASH" },
  1131. default = "256",
  1132. flavor = "integer",
  1133. file = "include/cfg/memory.h"
  1134. },
  1135. }
  1136. },
  1137. {
  1138. name = "nutdev_reset",
  1139. brief = "System Reset",
  1140. sources = { "reset.c" },
  1141. },
  1142. {
  1143. name = "nutdev_watchdog",
  1144. brief = "Watchdog Timer",
  1145. description = "Platform independent watchdog API.\n\n"..
  1146. "The watchdog timer prevents system lock-up.",
  1147. sources = { "watchdog.c" },
  1148. options =
  1149. {
  1150. {
  1151. macro = "NUT_WDT_START",
  1152. brief = "Start Value",
  1153. description = "If enabled, the watchdog timer will be started during system "..
  1154. "initialization with the specified register value.\n\n"..
  1155. "On some systems, e.g. the AT91SAM7, the watchdog timer is "..
  1156. "enabled by default. If the start value is zero, the watchdog "..
  1157. "register is not touched. If this option is disabled, the "..
  1158. "watchdog timer will be disabled during system initialization. "..
  1159. "It is typically not possible to re-enable the watchdog timer.\n\n"..
  1160. "Note, that this setting is optional and may not be available "..
  1161. "for all targets.",
  1162. requires = { "HW_GPIO" },
  1163. flavor = "booldata",
  1164. file = "include/cfg/clock.h"
  1165. }
  1166. }
  1167. },
  1168. --
  1169. -- Simple Interface Drivers.
  1170. --
  1171. {
  1172. name = "nutdev_sbbif0",
  1173. brief = "Serial Bit Banged Interface 0",
  1174. description = "Software SPI0, master mode only.",
  1175. provides = { "DEV_SPI" },
  1176. requires = { "HW_GPIO" },
  1177. sources = {
  1178. "sbbif0.c",
  1179. "spibus_gpio.c",
  1180. "spibus0gpio.c"
  1181. },
  1182. options =
  1183. {
  1184. {
  1185. macro = "SBBI0_SCK_PORT",
  1186. brief = "SCK Port",
  1187. description = "ID of the port used for SPI clock.",
  1188. type = "enumerated",
  1189. choices = function() return GetGpioBanks() end,
  1190. flavor = "integer",
  1191. file = function() return GetGpioHeaderPath() end
  1192. },
  1193. {
  1194. macro = "SBBI0_SCK_BIT",
  1195. brief = "SCK Port Bit",
  1196. description = "Port bit used for SPI clock.",
  1197. type = "enumerated",
  1198. choices = function() return GetGpioBits() end,
  1199. flavor = "integer",
  1200. file = function() return GetGpioHeaderPath() end
  1201. },
  1202. {
  1203. macro = "SBBI0_MOSI_PORT",
  1204. brief = "MOSI Port",
  1205. description = "ID of the port used for SPI data output.",
  1206. type = "enumerated",
  1207. choices = function() return GetGpioBanks() end,
  1208. flavor = "integer",
  1209. file = function() return GetGpioHeaderPath() end
  1210. },
  1211. {
  1212. macro = "SBBI0_MOSI_BIT",
  1213. brief = "MOSI Port Bit",
  1214. description = "Port bit used for SPI data output.",
  1215. type = "enumerated",
  1216. choices = function() return GetGpioBits() end,
  1217. flavor = "integer",
  1218. file = function() return GetGpioHeaderPath() end
  1219. },
  1220. {
  1221. macro = "SBBI0_MISO_PORT",
  1222. brief = "MISO Port",
  1223. description = "ID of the port used for SPI data input.",
  1224. type = "enumerated",
  1225. choices = function() return GetGpioBanks() end,
  1226. flavor = "integer",
  1227. file = function() return GetGpioHeaderPath() end
  1228. },
  1229. {
  1230. macro = "SBBI0_MISO_BIT",
  1231. brief = "MISO Port Bit",
  1232. description = "Port bit used for SPI data input.",
  1233. type = "enumerated",
  1234. choices = function() return GetGpioBits() end,
  1235. flavor = "integer",
  1236. file = function() return GetGpioHeaderPath() end
  1237. },
  1238. {
  1239. macro = "SBBI0_CS0_PORT",
  1240. brief = "CS0 Port",
  1241. description = "ID of the port used for SPI chip select 0.",
  1242. type = "enumerated",
  1243. choices = function() return GetGpioBanks() end,
  1244. flavor = "integer",
  1245. file = function() return GetGpioHeaderPath() end
  1246. },
  1247. {
  1248. macro = "SBBI0_CS0_BIT",
  1249. brief = "CS0 Port Bit",
  1250. description = "Port bit used for SPI chip select 0.",
  1251. type = "enumerated",
  1252. choices = function() return GetGpioBits() end,
  1253. flavor = "integer",
  1254. file = function() return GetGpioHeaderPath() end
  1255. },
  1256. {
  1257. macro = "SBBI0_CS1_PORT",
  1258. brief = "CS1 Port",
  1259. description = "ID of the port used for SPI chip select 1.",
  1260. type = "enumerated",
  1261. choices = function() return GetGpioBanks() end,
  1262. flavor = "integer",
  1263. file = function() return GetGpioHeaderPath() end
  1264. },
  1265. {
  1266. macro = "SBBI0_CS1_BIT",
  1267. brief = "CS1 Port Bit",
  1268. description = "Port bit used for SPI chip select 1.",
  1269. type = "enumerated",
  1270. choices = function() return GetGpioBits() end,
  1271. flavor = "integer",
  1272. file = function() return GetGpioHeaderPath() end
  1273. },
  1274. {
  1275. macro = "SBBI0_CS2_PORT",
  1276. brief = "CS2 Port",
  1277. description = "ID of the port used for SPI chip select 2.",
  1278. type = "enumerated",
  1279. choices = function() return GetGpioBanks() end,
  1280. flavor = "integer",
  1281. file = function() return GetGpioHeaderPath() end
  1282. },
  1283. {
  1284. macro = "SBBI0_CS2_BIT",
  1285. brief = "CS2 Port Bit",
  1286. description = "Port bit used for SPI chip select 2.",
  1287. type = "enumerated",
  1288. choices = function() return GetGpioBits() end,
  1289. flavor = "integer",
  1290. file = function() return GetGpioHeaderPath() end
  1291. },
  1292. {
  1293. macro = "SBBI0_CS3_PORT",
  1294. brief = "CS3 Port",
  1295. description = "ID of the port used for SPI chip select 3.",
  1296. type = "enumerated",
  1297. choices = function() return GetGpioBanks() end,
  1298. flavor = "integer",
  1299. file = function() return GetGpioHeaderPath() end
  1300. },
  1301. {
  1302. macro = "SBBI0_CS3_BIT",
  1303. brief = "CS3 Port Bit",
  1304. description = "Port bit used for SPI chip select 3.",
  1305. type = "enumerated",
  1306. choices = function() return GetGpioBits() end,
  1307. flavor = "integer",
  1308. file = function() return GetGpioHeaderPath() end
  1309. },
  1310. {
  1311. macro = "SBBI0_RST0_PORT",
  1312. brief = "RESET0 Port",
  1313. description = "ID of the port used for SPI chip reset 0.",
  1314. type = "enumerated",
  1315. choices = function() return GetGpioBanks() end,
  1316. flavor = "integer",
  1317. file = function() return GetGpioHeaderPath() end
  1318. },
  1319. {
  1320. macro = "SBBI0_RST0_BIT",
  1321. brief = "RESET0 Port Bit",
  1322. description = "Port bit used for SPI chip reset 0.",
  1323. type = "enumerated",
  1324. choices = function() return GetGpioBits() end,
  1325. flavor = "integer",
  1326. file = function() return GetGpioHeaderPath() end
  1327. },
  1328. {
  1329. macro = "SBBI0_RST1_PORT",
  1330. brief = "RESET1 Port",
  1331. description = "ID of the port used for SPI chip reset 1.",
  1332. type = "enumerated",
  1333. choices = function() return GetGpioBanks() end,
  1334. flavor = "integer",
  1335. file = function() return GetGpioHeaderPath() end
  1336. },
  1337. {
  1338. macro = "SBBI0_RST1_BIT",
  1339. brief = "RESET1 Port Bit",
  1340. description = "Port bit used for SPI chip reset 1.",
  1341. type = "enumerated",
  1342. choices = function() return GetGpioBits() end,
  1343. flavor = "integer",
  1344. file = function() return GetGpioHeaderPath() end
  1345. },
  1346. {
  1347. macro = "SBBI0_RST2_PORT",
  1348. brief = "RESET2 Port",
  1349. description = "ID of the port used for SPI chip reset 2.",
  1350. type = "enumerated",
  1351. choices = function() return GetGpioBanks() end,
  1352. flavor = "integer",
  1353. file = function() return GetGpioHeaderPath() end
  1354. },
  1355. {
  1356. macro = "SBBI0_RST2_BIT",
  1357. brief = "RESET2 Port Bit",
  1358. description = "Port bit used for SPI chip reset 2.",
  1359. type = "enumerated",
  1360. choices = function() return GetGpioBits() end,
  1361. flavor = "integer",
  1362. file = function() return GetGpioHeaderPath() end
  1363. },
  1364. {
  1365. macro = "SBBI0_RST3_PORT",
  1366. brief = "RESET3 Port",
  1367. description = "ID of the port used for SPI chip reset 3.",
  1368. type = "enumerated",
  1369. choices = function() return GetGpioBanks() end,
  1370. flavor = "integer",
  1371. file = function() return GetGpioHeaderPath() end
  1372. },
  1373. {
  1374. macro = "SBBI0_RST3_BIT",
  1375. brief = "RESET3 Port Bit",
  1376. description = "Port bit used for SPI chip reset 3.",
  1377. type = "enumerated",
  1378. choices = function() return GetGpioBits() end,
  1379. flavor = "integer",
  1380. file = function() return GetGpioHeaderPath() end
  1381. },
  1382. },
  1383. },
  1384. {
  1385. name = "nutdev_sbbif1",
  1386. brief = "Serial Bit Banged Interface 1",
  1387. description = "Software SPI1, master mode only.",
  1388. provides = { "DEV_SPI" },
  1389. requires = { "HW_GPIO" },
  1390. options =
  1391. {
  1392. {
  1393. macro = "SBBI1_SCK_PORT",
  1394. brief = "SCK Port",
  1395. description = "ID of the port used for SPI clock.",
  1396. type = "enumerated",
  1397. choices = function() return GetGpioBanks() end,
  1398. flavor = "integer",
  1399. file = function() return GetGpioHeaderPath() end
  1400. },
  1401. {
  1402. macro = "SBBI1_SCK_BIT",
  1403. brief = "SCK Port Bit",
  1404. description = "Port bit used for SPI clock.",
  1405. type = "enumerated",
  1406. choices = function() return GetGpioBits() end,
  1407. flavor = "integer",
  1408. file = function() return GetGpioHeaderPath() end
  1409. },
  1410. {
  1411. macro = "SBBI1_MOSI_PORT",
  1412. brief = "MOSI Port",
  1413. description = "ID of the port used for SPI data output.",
  1414. type = "enumerated",
  1415. choices = function() return GetGpioBanks() end,
  1416. flavor = "integer",
  1417. file = function() return GetGpioHeaderPath() end
  1418. },
  1419. {
  1420. macro = "SBBI1_MOSI_BIT",
  1421. brief = "MOSI Port Bit",
  1422. description = "Port bit used for SPI data output.",
  1423. type = "enumerated",
  1424. choices = function() return GetGpioBits() end,
  1425. flavor = "integer",
  1426. file = function() return GetGpioHeaderPath() end
  1427. },
  1428. {
  1429. macro = "SBBI1_MISO_PORT",
  1430. brief = "MISO Port",
  1431. description = "ID of the port used for SPI data input.",
  1432. type = "enumerated",
  1433. choices = function() return GetGpioBanks() end,
  1434. flavor = "integer",
  1435. file = function() return GetGpioHeaderPath() end
  1436. },
  1437. {
  1438. macro = "SBBI1_MISO_BIT",
  1439. brief = "MISO Port Bit",
  1440. description = "Port bit used for SPI data input.",
  1441. type = "enumerated",
  1442. choices = function() return GetGpioBits() end,
  1443. flavor = "integer",
  1444. file = function() return GetGpioHeaderPath() end
  1445. },
  1446. {
  1447. macro = "SBBI1_CS0_PORT",
  1448. brief = "CS0 Port",
  1449. description = "ID of the port used for SPI chip select 0.",
  1450. type = "enumerated",
  1451. choices = function() return GetGpioBanks() end,
  1452. flavor = "integer",
  1453. file = function() return GetGpioHeaderPath() end
  1454. },
  1455. {
  1456. macro = "SBBI1_CS0_BIT",
  1457. brief = "CS0 Port Bit",
  1458. description = "Port bit used for SPI chip select 0.",
  1459. type = "enumerated",
  1460. choices = function() return GetGpioBits() end,
  1461. flavor = "integer",
  1462. file = function() return GetGpioHeaderPath() end
  1463. },
  1464. {
  1465. macro = "SBBI1_CS1_PORT",
  1466. brief = "CS1 Port",
  1467. description = "ID of the port used for SPI chip select 1.",
  1468. type = "enumerated",
  1469. choices = function() return GetGpioBanks() end,
  1470. flavor = "integer",
  1471. file = function() return GetGpioHeaderPath() end
  1472. },
  1473. {
  1474. macro = "SBBI1_CS1_BIT",
  1475. brief = "CS1 Port Bit",
  1476. description = "Port bit used for SPI chip select 1.",
  1477. type = "enumerated",
  1478. choices = function() return GetGpioBits() end,
  1479. flavor = "integer",
  1480. file = function() return GetGpioHeaderPath() end
  1481. },
  1482. {
  1483. macro = "SBBI1_CS2_PORT",
  1484. brief = "CS2 Port",
  1485. description = "ID of the port used for SPI chip select 2.",
  1486. type = "enumerated",
  1487. choices = function() return GetGpioBanks() end,
  1488. flavor = "integer",
  1489. file = function() return GetGpioHeaderPath() end
  1490. },
  1491. {
  1492. macro = "SBBI1_CS2_BIT",
  1493. brief = "CS2 Port Bit",
  1494. description = "Port bit used for SPI chip select 2.",
  1495. type = "enumerated",
  1496. choices = function() return GetGpioBits() end,
  1497. flavor = "integer",
  1498. file = function() return GetGpioHeaderPath() end
  1499. },
  1500. {
  1501. macro = "SBBI1_CS3_PORT",
  1502. brief = "CS3 Port",
  1503. description = "ID of the port used for SPI chip select 3.",
  1504. type = "enumerated",
  1505. choices = function() return GetGpioBanks() end,
  1506. flavor = "integer",
  1507. file = function() return GetGpioHeaderPath() end
  1508. },
  1509. {
  1510. macro = "SBBI1_CS3_BIT",
  1511. brief = "CS3 Port Bit",
  1512. description = "Port bit used for SPI chip select 3.",
  1513. type = "enumerated",
  1514. choices = function() return GetGpioBits() end,
  1515. flavor = "integer",
  1516. file = function() return GetGpioHeaderPath() end
  1517. },
  1518. {
  1519. macro = "SBBI1_RST0_PORT",
  1520. brief = "RESET0 Port",
  1521. description = "ID of the port used for SPI chip reset 0.",
  1522. type = "enumerated",
  1523. choices = function() return GetGpioBanks() end,
  1524. flavor = "integer",
  1525. file = function() return GetGpioHeaderPath() end
  1526. },
  1527. {
  1528. macro = "SBBI1_RST0_BIT",
  1529. brief = "RESET0 Port Bit",
  1530. description = "Port bit used for SPI chip reset 0.",
  1531. type = "enumerated",
  1532. choices = function() return GetGpioBits() end,
  1533. flavor = "integer",
  1534. file = function() return GetGpioHeaderPath() end
  1535. },
  1536. {
  1537. macro = "SBBI1_RST1_PORT",
  1538. brief = "RESET1 Port",
  1539. description = "ID of the port used for SPI chip reset 1.",
  1540. type = "enumerated",
  1541. choices = function() return GetGpioBanks() end,
  1542. flavor = "integer",
  1543. file = function() return GetGpioHeaderPath() end
  1544. },
  1545. {
  1546. macro = "SBBI1_RST1_BIT",
  1547. brief = "RESET1 Port Bit",
  1548. description = "Port bit used for SPI chip reset 1.",
  1549. type = "enumerated",
  1550. choices = function() return GetGpioBits() end,
  1551. flavor = "integer",
  1552. file = function() return GetGpioHeaderPath() end
  1553. },
  1554. {
  1555. macro = "SBBI1_RST2_PORT",
  1556. brief = "RESET2 Port",
  1557. description = "ID of the port used for SPI chip reset 2.",
  1558. type = "enumerated",
  1559. choices = function() return GetGpioBanks() end,
  1560. flavor = "integer",
  1561. file = function() return GetGpioHeaderPath() end
  1562. },
  1563. {
  1564. macro = "SBBI1_RST2_BIT",
  1565. brief = "RESET2 Port Bit",
  1566. description = "Port bit used for SPI chip reset 2.",
  1567. type = "enumerated",
  1568. choices = function() return GetGpioBits() end,
  1569. flavor = "integer",
  1570. file = function() return GetGpioHeaderPath() end
  1571. },
  1572. {
  1573. macro = "SBBI1_RST3_PORT",
  1574. brief = "RESET3 Port",
  1575. description = "ID of the port used for SPI chip reset 3.",
  1576. type = "enumerated",
  1577. choices = function() return GetGpioBanks() end,
  1578. flavor = "integer",
  1579. file = function() return GetGpioHeaderPath() end
  1580. },
  1581. {
  1582. macro = "SBBI1_RST3_BIT",
  1583. brief = "RESET3 Port Bit",
  1584. description = "Port bit used for SPI chip reset 3.",
  1585. type = "enumerated",
  1586. choices = function() return GetGpioBits() end,
  1587. flavor = "integer",
  1588. file = function() return GetGpioHeaderPath() end
  1589. },
  1590. },
  1591. },
  1592. {
  1593. name = "nutdev_sbbif2",
  1594. brief = "Serial Bit Banged Interface 2",
  1595. description = "Software SPI2, master mode only.",
  1596. provides = { "DEV_SPI" },
  1597. requires = { "HW_GPIO" },
  1598. options =
  1599. {
  1600. {
  1601. macro = "SBBI2_SCK_PORT",
  1602. brief = "SCK Port",
  1603. description = "ID of the port used for SPI clock.",
  1604. type = "enumerated",
  1605. choices = function() return GetGpioBanks() end,
  1606. flavor = "integer",
  1607. file = function() return GetGpioHeaderPath() end
  1608. },
  1609. {
  1610. macro = "SBBI2_SCK_BIT",
  1611. brief = "SCK Port Bit",
  1612. description = "Port bit used for SPI clock.",
  1613. type = "enumerated",
  1614. choices = function() return GetGpioBits() end,
  1615. flavor = "integer",
  1616. file = function() return GetGpioHeaderPath() end
  1617. },
  1618. {
  1619. macro = "SBBI2_MOSI_PORT",
  1620. brief = "MOSI Port",
  1621. description = "ID of the port used for SPI data output.",
  1622. type = "enumerated",
  1623. choices = function() return GetGpioBanks() end,
  1624. flavor = "integer",
  1625. file = function() return GetGpioHeaderPath() end
  1626. },
  1627. {
  1628. macro = "SBBI2_MOSI_BIT",
  1629. brief = "MOSI Port Bit",
  1630. description = "Port bit used for SPI data output.",
  1631. type = "enumerated",
  1632. choices = function() return GetGpioBits() end,
  1633. flavor = "integer",
  1634. file = function() return GetGpioHeaderPath() end
  1635. },
  1636. {
  1637. macro = "SBBI2_MISO_PORT",
  1638. brief = "MISO Port",
  1639. description = "ID of the port used for SPI data input.",
  1640. type = "enumerated",
  1641. choices = function() return GetGpioBanks() end,
  1642. flavor = "integer",
  1643. file = function() return GetGpioHeaderPath() end
  1644. },
  1645. {
  1646. macro = "SBBI2_MISO_BIT",
  1647. brief = "MISO Port Bit",
  1648. description = "Port bit used for SPI data input.",
  1649. type = "enumerated",
  1650. choices = function() return GetGpioBits() end,
  1651. flavor = "integer",
  1652. file = function() return GetGpioHeaderPath() end
  1653. },
  1654. {
  1655. macro = "SBBI2_CS0_PORT",
  1656. brief = "CS0 Port",
  1657. description = "ID of the port used for SPI chip select 0.",
  1658. type = "enumerated",
  1659. choices = function() return GetGpioBanks() end,
  1660. flavor = "integer",
  1661. file = function() return GetGpioHeaderPath() end
  1662. },
  1663. {
  1664. macro = "SBBI2_CS0_BIT",
  1665. brief = "CS0 Port Bit",
  1666. description = "Port bit used for SPI chip select 0.",
  1667. type = "enumerated",
  1668. choices = function() return GetGpioBits() end,
  1669. flavor = "integer",
  1670. file = function() return GetGpioHeaderPath() end
  1671. },
  1672. {
  1673. macro = "SBBI2_CS1_PORT",
  1674. brief = "CS1 Port",
  1675. description = "ID of the port used for SPI chip select 1.",
  1676. type = "enumerated",
  1677. choices = function() return GetGpioBanks() end,
  1678. flavor = "integer",
  1679. file = function() return GetGpioHeaderPath() end
  1680. },
  1681. {
  1682. macro = "SBBI2_CS1_BIT",
  1683. brief = "CS1 Port Bit",
  1684. description = "Port bit used for SPI chip select 1.",
  1685. type = "enumerated",
  1686. choices = function() return GetGpioBits() end,
  1687. flavor = "integer",
  1688. file = function() return GetGpioHeaderPath() end
  1689. },
  1690. {
  1691. macro = "SBBI2_CS2_PORT",
  1692. brief = "CS2 Port",
  1693. description = "ID of the port used for SPI chip select 2.",
  1694. type = "enumerated",
  1695. choices = function() return GetGpioBanks() end,
  1696. flavor = "integer",
  1697. file = function() return GetGpioHeaderPath() end
  1698. },
  1699. {
  1700. macro = "SBBI2_CS2_BIT",
  1701. brief = "CS2 Port Bit",
  1702. description = "Port bit used for SPI chip select 2.",
  1703. type = "enumerated",
  1704. choices = function() return GetGpioBits() end,
  1705. flavor = "integer",
  1706. file = function() return GetGpioHeaderPath() end
  1707. },
  1708. {
  1709. macro = "SBBI2_CS3_PORT",
  1710. brief = "CS3 Port",
  1711. description = "ID of the port used for SPI chip select 3.",
  1712. type = "enumerated",
  1713. choices = function() return GetGpioBanks() end,
  1714. flavor = "integer",
  1715. file = function() return GetGpioHeaderPath() end
  1716. },
  1717. {
  1718. macro = "SBBI2_CS3_BIT",
  1719. brief = "CS3 Port Bit",
  1720. description = "Port bit used for SPI chip select 3.",
  1721. type = "enumerated",
  1722. choices = function() return GetGpioBits() end,
  1723. flavor = "integer",
  1724. file = function() return GetGpioHeaderPath() end
  1725. },
  1726. {
  1727. macro = "SBBI2_RST0_PORT",
  1728. brief = "RESET0 Port",
  1729. description = "ID of the port used for SPI chip reset 0.",
  1730. type = "enumerated",
  1731. choices = function() return GetGpioBanks() end,
  1732. flavor = "integer",
  1733. file = function() return GetGpioHeaderPath() end
  1734. },
  1735. {
  1736. macro = "SBBI2_RST0_BIT",
  1737. brief = "RESET0 Port Bit",
  1738. description = "Port bit used for SPI chip reset 0.",
  1739. type = "enumerated",
  1740. choices = function() return GetGpioBits() end,
  1741. flavor = "integer",
  1742. file = function() return GetGpioHeaderPath() end
  1743. },
  1744. {
  1745. macro = "SBBI2_RST1_PORT",
  1746. brief = "RESET1 Port",
  1747. description = "ID of the port used for SPI chip reset 1.",
  1748. type = "enumerated",
  1749. choices = function() return GetGpioBanks() end,
  1750. flavor = "integer",
  1751. file = function() return GetGpioHeaderPath() end
  1752. },
  1753. {
  1754. macro = "SBBI2_RST1_BIT",
  1755. brief = "RESET1 Port Bit",
  1756. description = "Port bit used for SPI chip reset 1.",
  1757. type = "enumerated",
  1758. choices = function() return GetGpioBits() end,
  1759. flavor = "integer",
  1760. file = function() return GetGpioHeaderPath() end
  1761. },
  1762. {
  1763. macro = "SBBI2_RST2_PORT",
  1764. brief = "RESET2 Port",
  1765. description = "ID of the port used for SPI chip reset 2.",
  1766. type = "enumerated",
  1767. choices = function() return GetGpioBanks() end,
  1768. flavor = "integer",
  1769. file = function() return GetGpioHeaderPath() end
  1770. },
  1771. {
  1772. macro = "SBBI2_RST2_BIT",
  1773. brief = "RESET2 Port Bit",
  1774. description = "Port bit used for SPI chip reset 2.",
  1775. type = "enumerated",
  1776. choices = function() return GetGpioBits() end,
  1777. flavor = "integer",
  1778. file = function() return GetGpioHeaderPath() end
  1779. },
  1780. {
  1781. macro = "SBBI2_RST3_PORT",
  1782. brief = "RESET3 Port",
  1783. description = "ID of the port used for SPI chip reset 3.",
  1784. type = "enumerated",
  1785. choices = function() return GetGpioBanks() end,
  1786. flavor = "integer",
  1787. file = function() return GetGpioHeaderPath() end
  1788. },
  1789. {
  1790. macro = "SBBI2_RST3_BIT",
  1791. brief = "RESET3 Port Bit",
  1792. description = "Port bit used for SPI chip reset 3.",
  1793. type = "enumerated",
  1794. choices = function() return GetGpioBits() end,
  1795. flavor = "integer",
  1796. file = function() return GetGpioHeaderPath() end
  1797. },
  1798. },
  1799. },
  1800. {
  1801. name = "nutdev_sbbif3",
  1802. brief = "Serial Bit Banged Interface 3",
  1803. description = "Software SPI3, master mode only.",
  1804. provides = { "DEV_SPI" },
  1805. requires = { "HW_GPIO" },
  1806. options =
  1807. {
  1808. {
  1809. macro = "SBBI3_SCK_PORT",
  1810. brief = "SCK Port",
  1811. description = "ID of the port used for SPI clock.",
  1812. type = "enumerated",
  1813. choices = avr_port_choice,
  1814. flavor = "integer",
  1815. file = function() return GetGpioHeaderPath() end
  1816. },
  1817. {
  1818. macro = "SBBI3_SCK_BIT",
  1819. brief = "SCK Port Bit",
  1820. description = "Port bit used for SPI clock.",
  1821. type = "enumerated",
  1822. choices = function() return GetGpioBits() end,
  1823. flavor = "integer",
  1824. file = function() return GetGpioHeaderPath() end
  1825. },
  1826. {
  1827. macro = "SBBI3_MOSI_PORT",
  1828. brief = "MOSI Port",
  1829. description = "ID of the port used for SPI data output.",
  1830. type = "enumerated",
  1831. choices = avr_port_choice,
  1832. flavor = "integer",
  1833. file = function() return GetGpioHeaderPath() end
  1834. },
  1835. {
  1836. macro = "SBBI3_MOSI_BIT",
  1837. brief = "MOSI Port Bit",
  1838. description = "Port bit used for SPI data output.",
  1839. type = "enumerated",
  1840. choices = function() return GetGpioBits() end,
  1841. flavor = "integer",
  1842. file = function() return GetGpioHeaderPath() end
  1843. },
  1844. {
  1845. macro = "SBBI3_MISO_PORT",
  1846. brief = "MISO Port",
  1847. description = "ID of the port used for SPI data input.",
  1848. type = "enumerated",
  1849. choices = avr_port_choice,
  1850. flavor = "integer",
  1851. file = function() return GetGpioHeaderPath() end
  1852. },
  1853. {
  1854. macro = "SBBI3_MISO_BIT",
  1855. brief = "MISO Port Bit",
  1856. description = "Port bit used for SPI data input.",
  1857. type = "enumerated",
  1858. choices = function() return GetGpioBits() end,
  1859. flavor = "integer",
  1860. file = function() return GetGpioHeaderPath() end
  1861. },
  1862. {
  1863. macro = "SBBI3_CS0_PORT",
  1864. brief = "CS0 Port",
  1865. description = "ID of the port used for SPI chip select 0.",
  1866. type = "enumerated",
  1867. choices = avr_port_choice,
  1868. flavor = "integer",
  1869. file = function() return GetGpioHeaderPath() end
  1870. },
  1871. {
  1872. macro = "SBBI3_CS0_BIT",
  1873. brief = "CS0 Port Bit",
  1874. description = "Port bit used for SPI chip select 0.",
  1875. type = "enumerated",
  1876. choices = function() return GetGpioBits() end,
  1877. flavor = "integer",
  1878. file = function() return GetGpioHeaderPath() end
  1879. },
  1880. {
  1881. macro = "SBBI3_CS1_PORT",
  1882. brief = "CS1 Port",
  1883. description = "ID of the port used for SPI chip select 1.",
  1884. type = "enumerated",
  1885. choices = avr_port_choice,
  1886. flavor = "integer",
  1887. file = function() return GetGpioHeaderPath() end
  1888. },
  1889. {
  1890. macro = "SBBI3_CS1_BIT",
  1891. brief = "CS1 Port Bit",
  1892. description = "Port bit used for SPI chip select 1.",
  1893. type = "enumerated",
  1894. choices = function() return GetGpioBits() end,
  1895. flavor = "integer",
  1896. file = function() return GetGpioHeaderPath() end
  1897. },
  1898. {
  1899. macro = "SBBI3_CS2_PORT",
  1900. brief = "CS2 Port",
  1901. description = "ID of the port used for SPI chip select 2.",
  1902. type = "enumerated",
  1903. choices = avr_port_choice,
  1904. flavor = "integer",
  1905. file = function() return GetGpioHeaderPath() end
  1906. },
  1907. {
  1908. macro = "SBBI3_CS2_BIT",
  1909. brief = "CS2 Port Bit",
  1910. description = "Port bit used for SPI chip select 2.",
  1911. type = "enumerated",
  1912. choices = function() return GetGpioBits() end,
  1913. flavor = "integer",
  1914. file = function() return GetGpioHeaderPath() end
  1915. },
  1916. {
  1917. macro = "SBBI3_CS3_PORT",
  1918. brief = "CS3 Port",
  1919. description = "ID of the port used for SPI chip select 3.",
  1920. type = "enumerated",
  1921. choices = avr_port_choice,
  1922. flavor = "integer",
  1923. file = function() return GetGpioHeaderPath() end
  1924. },
  1925. {
  1926. macro = "SBBI3_CS3_BIT",
  1927. brief = "CS3 Port Bit",
  1928. description = "Port bit used for SPI chip select 3.",
  1929. type = "enumerated",
  1930. choices = function() return GetGpioBits() end,
  1931. flavor = "integer",
  1932. file = function() return GetGpioHeaderPath() end
  1933. },
  1934. {
  1935. macro = "SBBI3_RST0_PORT",
  1936. brief = "RESET0 Port",
  1937. description = "ID of the port used for SPI chip reset 0.",
  1938. type = "enumerated",
  1939. choices = avr_port_choice,
  1940. flavor = "integer",
  1941. file = function() return GetGpioHeaderPath() end
  1942. },
  1943. {
  1944. macro = "SBBI3_RST0_BIT",
  1945. brief = "RESET0 Port Bit",
  1946. description = "Port bit used for SPI chip reset 0.",
  1947. type = "enumerated",
  1948. choices = function() return GetGpioBits() end,
  1949. flavor = "integer",
  1950. file = function() return GetGpioHeaderPath() end
  1951. },
  1952. {
  1953. macro = "SBBI3_RST1_PORT",
  1954. brief = "RESET1 Port",
  1955. description = "ID of the port used for SPI chip reset 1.",
  1956. type = "enumerated",
  1957. choices = avr_port_choice,
  1958. flavor = "integer",
  1959. file = function() return GetGpioHeaderPath() end
  1960. },
  1961. {
  1962. macro = "SBBI3_RST1_BIT",
  1963. brief = "RESET1 Port Bit",
  1964. description = "Port bit used for SPI chip reset 1.",
  1965. type = "enumerated",
  1966. choices = function() return GetGpioBits() end,
  1967. flavor = "integer",
  1968. file = function() return GetGpioHeaderPath() end
  1969. },
  1970. {
  1971. macro = "SBBI3_RST2_PORT",
  1972. brief = "RESET2 Port",
  1973. description = "ID of the port used for SPI chip reset 2.",
  1974. type = "enumerated",
  1975. choices = avr_port_choice,
  1976. flavor = "integer",
  1977. file = function() return GetGpioHeaderPath() end
  1978. },
  1979. {
  1980. macro = "SBBI3_RST2_BIT",
  1981. brief = "RESET2 Port Bit",
  1982. description = "Port bit used for SPI chip reset 2.",
  1983. type = "enumerated",
  1984. choices = function() return GetGpioBits() end,
  1985. flavor = "integer",
  1986. file = function() return GetGpioHeaderPath() end
  1987. },
  1988. {
  1989. macro = "SBBI3_RST3_PORT",
  1990. brief = "RESET3 Port",
  1991. description = "ID of the port used for SPI chip reset 3.",
  1992. type = "enumerated",
  1993. choices = avr_port_choice,
  1994. flavor = "integer",
  1995. file = function() return GetGpioHeaderPath() end
  1996. },
  1997. {
  1998. macro = "SBBI3_RST3_BIT",
  1999. brief = "RESET3 Port Bit",
  2000. description = "Port bit used for SPI chip reset 3.",
  2001. type = "enumerated",
  2002. choices = function() return GetGpioBits() end,
  2003. flavor = "integer",
  2004. file = function() return GetGpioHeaderPath() end
  2005. },
  2006. },
  2007. },
  2008. {
  2009. name = "nutdev_spibus_npl",
  2010. brief = "NPL SPI Bus Controller",
  2011. description = "Programmable logic SPI bus master controller.",
  2012. requires = { "DEV_PLL" },
  2013. provides = { "SPIBUS_CONTROLLER" },
  2014. sources = { "spibus_npl.c" }
  2015. },
  2016. {
  2017. name = "nutdev_twbbif",
  2018. brief = "Bit Banging Two Wire",
  2019. description = "Tested on AT91 only.",
  2020. requires = { "HW_MCU_SWTWI" },
  2021. provides = { "DEV_TWI" },
  2022. sources = { "twbbif.c" },
  2023. options =
  2024. {
  2025. {
  2026. macro = "TWI_PIO_ID",
  2027. brief = "GPIO ID (AT91)",
  2028. description = "Data and clock line must be connected to the same GPIO port.",
  2029. type = "enumerated",
  2030. choices = at91_pio_id_choice,
  2031. flavor = "integer",
  2032. file = "include/cfg/arch/armpio.h"
  2033. },
  2034. {
  2035. macro = "TWI_SDA_BIT",
  2036. brief = "GPIO Data Bit (AT91)",
  2037. description = "Port bit number of the TWI data line.",
  2038. requires = { "HW_MCU_AT91" },
  2039. type = "enumerated",
  2040. choices = mcu_32bit_choice,
  2041. file = "include/cfg/arch/armpio.h"
  2042. },
  2043. {
  2044. macro = "TWI_SCL_BIT",
  2045. brief = "GPIO Clock Bit (AT91)",
  2046. description = "Port bit number of the TWI clock line.\n",
  2047. requires = { "HW_MCU_AT91" },
  2048. type = "enumerated",
  2049. choices = mcu_32bit_choice,
  2050. file = "include/cfg/arch/armpio.h"
  2051. },
  2052. {
  2053. macro = "TWI_DELAY",
  2054. brief = "Delay Loops",
  2055. description = "The number of dummy loops executed after falling and raising clock.",
  2056. default = "16",
  2057. flavor = "integer",
  2058. file = "include/cfg/twi.h"
  2059. },
  2060. },
  2061. },
  2062. {
  2063. name = "nutdev_i2cbus0gpio",
  2064. brief = "Bit Banging I2C bus driver 0",
  2065. description = "Tested on STM32 only.",
  2066. provides = { "I2CBUS_CONTROLLER" },
  2067. sources = { "i2cbus0gpio.c" },
  2068. options =
  2069. {
  2070. {
  2071. macro = "GPIO0_SDA_PORT",
  2072. brief = "GPIO SDA Port",
  2073. type = "enumerated",
  2074. description = "Port of the GPIO0 SDA line.",
  2075. choices = function() return GetGpioBanks() end,
  2076. flavor = "integer",
  2077. file = "include/cfg/twi.h"
  2078. },
  2079. {
  2080. macro = "GPIO0_SDA_PIN",
  2081. brief = "GPIO SDA Pin",
  2082. description = "Pin of the GPIO0 SDA line.",
  2083. type = "enumerated",
  2084. choices = function() return GetGpioBits() end,
  2085. file = "include/cfg/twi.h"
  2086. },
  2087. {
  2088. macro = "GPIO0_SCL_PORT",
  2089. brief = "GPIO SCL Port",
  2090. type = "enumerated",
  2091. description = "Port of the GPIO0 SCL line.",
  2092. choices = function() return GetGpioBanks() end,
  2093. flavor = "integer",
  2094. file = "include/cfg/twi.h"
  2095. },
  2096. {
  2097. macro = "GPIO0_SCL_PIN",
  2098. brief = "GPIO SCL Pin",
  2099. description = "Pin of the GPIO0 SCL line.",
  2100. type = "enumerated",
  2101. choices = function() return GetGpioBits() end,
  2102. file = "include/cfg/twi.h"
  2103. },
  2104. },
  2105. },
  2106. {
  2107. name = "nutdev_owibus0gpio",
  2108. brief = "Bit Banging OWI bus driver 0",
  2109. requires = { "HW_GPIO"},
  2110. provides = { "OWIBUS_CONTROLLER" },
  2111. sources = { "owibus0gpio.c"},
  2112. options =
  2113. {
  2114. {
  2115. macro = "OWI0_PIN",
  2116. brief = "OWI0 PIN",
  2117. description = "Port bit used for OWI Bus 0.",
  2118. provides = { "OWI0_PIN" },
  2119. type = "enumerated",
  2120. choices = function() return GetGpioBits() end,
  2121. flavor = "integer",
  2122. file = function() return GetGpioHeaderPath() end
  2123. },
  2124. {
  2125. macro = "OWI0_PORT",
  2126. brief = "OWI0 Port",
  2127. description = "Port used for OWI Bus 0.",
  2128. requries = { "OWI0_PIN" },
  2129. type = "enumerated",
  2130. choices = function() return GetGpioPortIds() end,
  2131. flavor = "integer",
  2132. file = function() return GetGpioHeaderPath() end
  2133. },
  2134. }
  2135. },
  2136. {
  2137. name = "nutdev_owibusuartif",
  2138. brief = "Run Time configurable OWI bus driver using uart",
  2139. -- requires = { "HW_UART"}, -- definition not yet provided
  2140. provides = { "OWIBUS_CONTROLLER" },
  2141. sources = { "owibus_uart.c", "owibus_uartif.c"},
  2142. },
  2143. {
  2144. name = "nutdev_owibus0uart",
  2145. brief = "Library compiled time configured OWI bus driver using uart",
  2146. -- requires = { "HW_UART"}, -- definition not yet provided
  2147. provides = { "OWIBUS_CONTROLLER" },
  2148. sources = { "owibus_uart.c", "owibus0uart.c"},
  2149. options =
  2150. {
  2151. {
  2152. macro = "OWIBUS0_HALDUPLEX",
  2153. brief = "OWIBUS0_HALDUPLEX",
  2154. description = "Use RX connected internally to TX for OWI Bus 0."..
  2155. "Hardware must supports this mode.",
  2156. requries = { "HW_UART_OWIMODE" },
  2157. flavor = "boolean",
  2158. file = "include/cfg/owi.h",
  2159. },
  2160. }
  2161. },
  2162. --
  2163. -- Character Device Drivers.
  2164. --
  2165. {
  2166. name = "nutdev_null",
  2167. brief = "Null",
  2168. description = "This can be useful if your application might write unwanted "..
  2169. "output to stdout. With this device you can redirect stdout "..
  2170. "to the nullDev which discards any output.",
  2171. sources = { "null.c" }
  2172. },
  2173. --
  2174. -- Character Device Drivers.
  2175. --
  2176. {
  2177. name = "nutdev_semihosting",
  2178. brief = "Virtual Serial Device using ARM semihosting",
  2179. description = "IO on virtual serial device using ARM semihosting. "..
  2180. "Program will only run with debugger attached.",
  2181. requires = { "ARM_SEMIHOSTING" };
  2182. sources = { "semihosting.c" }
  2183. },
  2184. -- {
  2185. -- name = "nutdev_sc16is752",
  2186. -- brief = "SC16IS752 Dual USART",
  2187. -- description = "TWI driver for SC16IS752 dual USART chip. "..
  2188. -- "Currently SAM7X256 is tested only. "..
  2189. -- "ICCAVR disabled due to compiler errors.",
  2190. -- sources =
  2191. -- {
  2192. -- "usart0sc16is752.c",
  2193. -- "usart1sc16is752.c",
  2194. -- "usart2sc16is752.c",
  2195. -- "usart3sc16is752.c",
  2196. -- "usartsc16is752.c"
  2197. -- },
  2198. -- requires = { "DEV_TWI", "TOOL_GCC" },
  2199. -- provides = { "DEV_UART_SPECIFIC" },
  2200. -- },
  2201. {
  2202. name = "nutdev_hxcodec",
  2203. brief = "Helix Audio Device",
  2204. sources = { "hxcodec.c" },
  2205. requires = { "AUDIO_DECODER_HELIX", "HW_AUDIO_DAC" },
  2206. options =
  2207. {
  2208. {
  2209. macro = "HXCODEC0_OUTPUT_BUFSIZ",
  2210. brief = "Decoder Buffer Size",
  2211. description = "Number of bytes for the decoder buffer.\n\n"..
  2212. "If not specified, half of available data RAM is used, "..
  2213. "up to a maximum of 16k.",
  2214. flavor = "booldata",
  2215. file = "include/cfg/audio.h"
  2216. },
  2217. {
  2218. macro = "NUT_THREAD_HXCODEC0STACK",
  2219. brief = "Thread Stack Size",
  2220. description = "Number of bytes for the decoder thread.",
  2221. flavor = "booldata",
  2222. file = "include/cfg/audio.h"
  2223. },
  2224. {
  2225. macro = "HXCODEC0_RESAMPLER",
  2226. brief = "Resampler",
  2227. description = "Enables the Hermite resampler.",
  2228. flavor = "boolean",
  2229. file = "include/cfg/audio.h"
  2230. }
  2231. }
  2232. },
  2233. {
  2234. name = "nutdev_spi_mlcd",
  2235. brief = "Mega LCD",
  2236. description = "Currently a dummy without any function.",
  2237. sources = { "spi_mlcd.c" },
  2238. requires = { "SPIBUS_CONTROLLER", "HW_GPIO" },
  2239. },
  2240. {
  2241. name = "nutdev_spi_lcd_st7565r",
  2242. brief = "ST7565R / C12832A1Z LCD Controller framebuffer driver",
  2243. description = "LCD framebuffer driver for LCD C12832A1Z with ST7565R controller."..
  2244. "Such an LCD display is e.g. used on the MBED application board.",
  2245. sources = { "spi_lcd_st7565r.c" },
  2246. requires = { "SPIBUS_CONTROLLER", "HW_GPIO" },
  2247. },
  2248. {
  2249. name = "nutdev_spi_vscodec0",
  2250. brief = "VLSI Audio Codec",
  2251. description = "Early release tested with VS1053B on SAM7SE.",
  2252. sources = { "spi_vscodec.c", "spi_vscodec0.c" },
  2253. requires = { "SPIBUS_CONTROLLER", "HW_GPIO" },
  2254. options =
  2255. {
  2256. {
  2257. macro = "AUDIO0_VSAUTO",
  2258. brief = "Auto Detect",
  2259. description = "Generates significantly more code. Untested.",
  2260. flavor = "boolean",
  2261. exclusivity =
  2262. {
  2263. "AUDIO0_VSAUTO",
  2264. "AUDIO0_VS1001K",
  2265. "AUDIO0_VS1011E",
  2266. "AUDIO0_VS1002D",
  2267. "AUDIO0_VS1003B",
  2268. "AUDIO0_VS1033C",
  2269. "AUDIO0_VS1053B",
  2270. "AUDIO0_VS1063A"
  2271. },
  2272. file = "include/cfg/audio.h"
  2273. },
  2274. {
  2275. macro = "AUDIO0_VS1001K",
  2276. brief = "VS1001K",
  2277. description = "Untested.",
  2278. flavor = "boolean",
  2279. exclusivity =
  2280. {
  2281. "AUDIO0_VSAUTO",
  2282. "AUDIO0_VS1001K",
  2283. "AUDIO0_VS1011E",
  2284. "AUDIO0_VS1002D",
  2285. "AUDIO0_VS1003B",
  2286. "AUDIO0_VS1033C",
  2287. "AUDIO0_VS1053B",
  2288. "AUDIO0_VS1063A"
  2289. },
  2290. file = "include/cfg/audio.h"
  2291. },
  2292. {
  2293. macro = "AUDIO0_VS1011E",
  2294. brief = "VS1011E",
  2295. description = "Untested.",
  2296. flavor = "boolean",
  2297. exclusivity =
  2298. {
  2299. "AUDIO0_VSAUTO",
  2300. "AUDIO0_VS1001K",
  2301. "AUDIO0_VS1011E",
  2302. "AUDIO0_VS1002D",
  2303. "AUDIO0_VS1003B",
  2304. "AUDIO0_VS1033C",
  2305. "AUDIO0_VS1053B",
  2306. "AUDIO0_VS1063A"
  2307. },
  2308. file = "include/cfg/audio.h"
  2309. },
  2310. {
  2311. macro = "AUDIO0_VS1002D",
  2312. brief = "VS1002D",
  2313. description = "Untested.",
  2314. flavor = "boolean",
  2315. exclusivity =
  2316. {
  2317. "AUDIO0_VSAUTO",
  2318. "AUDIO0_VS1001K",
  2319. "AUDIO0_VS1011E",
  2320. "AUDIO0_VS1002D",
  2321. "AUDIO0_VS1003B",
  2322. "AUDIO0_VS1033C",
  2323. "AUDIO0_VS1053B",
  2324. "AUDIO0_VS1063A"
  2325. },
  2326. file = "include/cfg/audio.h"
  2327. },
  2328. {
  2329. macro = "AUDIO0_VS1003B",
  2330. brief = "VS1003B",
  2331. description = "Untested.",
  2332. flavor = "boolean",
  2333. exclusivity =
  2334. {
  2335. "AUDIO0_VSAUTO",
  2336. "AUDIO0_VS1001K",
  2337. "AUDIO0_VS1011E",
  2338. "AUDIO0_VS1002D",
  2339. "AUDIO0_VS1003B",
  2340. "AUDIO0_VS1033C",
  2341. "AUDIO0_VS1053B",
  2342. "AUDIO0_VS1063A"
  2343. },
  2344. file = "include/cfg/audio.h"
  2345. },
  2346. {
  2347. macro = "AUDIO0_VS1033C",
  2348. brief = "VS1033C",
  2349. description = "Untested.",
  2350. flavor = "boolean",
  2351. exclusivity =
  2352. {
  2353. "AUDIO0_VSAUTO",
  2354. "AUDIO0_VS1001K",
  2355. "AUDIO0_VS1011E",
  2356. "AUDIO0_VS1002D",
  2357. "AUDIO0_VS1003B",
  2358. "AUDIO0_VS1033C",
  2359. "AUDIO0_VS1053B",
  2360. "AUDIO0_VS1063A"
  2361. },
  2362. file = "include/cfg/audio.h"
  2363. },
  2364. {
  2365. macro = "AUDIO0_VS1053B",
  2366. brief = "VS1053B",
  2367. description = "Tested with SAM7SE.",
  2368. flavor = "boolean",
  2369. exclusivity =
  2370. {
  2371. "AUDIO0_VSAUTO",
  2372. "AUDIO0_VS1001K",
  2373. "AUDIO0_VS1011E",
  2374. "AUDIO0_VS1002D",
  2375. "AUDIO0_VS1003B",
  2376. "AUDIO0_VS1033C",
  2377. "AUDIO0_VS1053B",
  2378. "AUDIO0_VS1063A"
  2379. },
  2380. file = "include/cfg/audio.h"
  2381. },
  2382. {
  2383. macro = "AUDIO0_VS1063A",
  2384. brief = "VS1063A",
  2385. description = "Tested with SAM7SE.",
  2386. flavor = "boolean",
  2387. exclusivity =
  2388. {
  2389. "AUDIO0_VSAUTO",
  2390. "AUDIO0_VS1001K",
  2391. "AUDIO0_VS1011E",
  2392. "AUDIO0_VS1002D",
  2393. "AUDIO0_VS1003B",
  2394. "AUDIO0_VS1033C",
  2395. "AUDIO0_VS1053B",
  2396. "AUDIO0_VS1063A"
  2397. },
  2398. file = "include/cfg/audio.h"
  2399. },
  2400. {
  2401. macro = "VSCODEC0_FREQ",
  2402. brief = "Crystal Clock Frequency",
  2403. description = "Frequency of the crystal clock in Hz.\n\n"..
  2404. "Tested with default of 12,288 MHz only",
  2405. default = "12288000",
  2406. flavor = "booldata",
  2407. file = "include/cfg/audio.h"
  2408. },
  2409. {
  2410. macro = "VSCODEC0_SPI_MODE",
  2411. brief = "SPI Mode",
  2412. description = "SPI mode of command channel, 0 is default.",
  2413. type = "integer",
  2414. default = "0",
  2415. file = "include/cfg/audio.h"
  2416. },
  2417. {
  2418. macro = "VSCODEC0_SPI_RATE",
  2419. brief = "SPI Bitrate",
  2420. description = "Interface speed in bits per second, default is VSCODEC_FREQ/6.",
  2421. file = "include/cfg/audio.h"
  2422. },
  2423. {
  2424. macro = "VSCODEC0_XRESET_PORT",
  2425. brief = "XRESET GPIO Port",
  2426. description = "ID of the port used for VS10XX hardware reset.",
  2427. type = "enumerated",
  2428. choices = function() return GetGpioBanks() end,
  2429. flavor = "integer",
  2430. file = function() return GetGpioHeaderPath() end
  2431. },
  2432. {
  2433. macro = "VSCODEC0_XRESET_BIT",
  2434. brief = "XRESET GPIO Bit",
  2435. description = "Port bit used for VS10XX hardware.",
  2436. type = "enumerated",
  2437. choices = function() return GetGpioBits() end,
  2438. flavor = "integer",
  2439. file = function() return GetGpioHeaderPath() end
  2440. },
  2441. {
  2442. macro = "VSCODEC0_SIGNAL_IRQ",
  2443. brief = "Decoder Interrupt",
  2444. description = "External interrupt line used for DREQ interrupt. "..
  2445. "Must match DREQ port and bit settings.",
  2446. type = "enumerated",
  2447. choices = gpio_irq_choice,
  2448. file = function() return GetGpioHeaderPath() end
  2449. },
  2450. {
  2451. macro = "VSCODEC0_DREQ_PORT",
  2452. brief = "DREQ GPIO Port",
  2453. description = "ID of the port used for VS10XX DREQ.\n\n"..
  2454. "Must correspond with the selected interrupt input.",
  2455. type = "enumerated",
  2456. choices = function() return GetGpioBanks() end,
  2457. flavor = "integer",
  2458. file = function() return GetGpioHeaderPath() end
  2459. },
  2460. {
  2461. macro = "VSCODEC0_DREQ_BIT",
  2462. brief = "DREQ GPIO Bit",
  2463. description = "Port bit used for VS10XX DREQ.\n\n"..
  2464. "Must correspond with the selected interrupt input.",
  2465. type = "enumerated",
  2466. choices = function() return GetGpioBits() end,
  2467. flavor = "integer",
  2468. file = function() return GetGpioHeaderPath() end
  2469. },
  2470. {
  2471. macro = "VSCODEC0_XCS_PORT",
  2472. brief = "XCS GPIO Port",
  2473. description = "ID of the port used for VS10XX XCS.",
  2474. type = "enumerated",
  2475. choices = function() return GetGpioBanks() end,
  2476. flavor = "integer",
  2477. file = function() return GetGpioHeaderPath() end
  2478. },
  2479. {
  2480. macro = "VSCODEC0_XCS_BIT",
  2481. brief = "XCS GPIO Bit",
  2482. description = "Port bit used for VS10XX XCS.",
  2483. type = "enumerated",
  2484. choices = function() return GetGpioBits() end,
  2485. flavor = "integer",
  2486. file = function() return GetGpioHeaderPath() end
  2487. },
  2488. {
  2489. macro = "VSCODEC0_XDCS_PORT",
  2490. brief = "XDCS GPIO Port",
  2491. description = "ID of the port used for VS10XX XDCS.",
  2492. type = "enumerated",
  2493. choices = function() return GetGpioBanks() end,
  2494. flavor = "integer",
  2495. file = function() return GetGpioHeaderPath() end
  2496. },
  2497. {
  2498. macro = "VSCODEC0_XDCS_BIT",
  2499. brief = "XDCS GPIO Bit",
  2500. description = "Port bit used for VS10XX XDCS.",
  2501. type = "enumerated",
  2502. choices = function() return GetGpioBits() end,
  2503. flavor = "integer",
  2504. file = function() return GetGpioHeaderPath() end
  2505. },
  2506. {
  2507. macro = "VSCODEC0_VSCS_PORT",
  2508. brief = "VSCS GPIO Port",
  2509. description = "ID of the port used for VS10XX general select.",
  2510. type = "enumerated",
  2511. choices = function() return GetGpioBanks() end,
  2512. flavor = "integer",
  2513. file = function() return GetGpioHeaderPath() end
  2514. },
  2515. {
  2516. macro = "VSCODEC0_VSCS_BIT",
  2517. brief = "VSCS GPIO Bit",
  2518. description = "Port bit used for VS10XX general select.",
  2519. type = "enumerated",
  2520. choices = function() return GetGpioBits() end,
  2521. flavor = "integer",
  2522. file = function() return GetGpioHeaderPath() end
  2523. },
  2524. {
  2525. macro = "VSCODEC0_BSYNC_PORT",
  2526. brief = "BSYNC GPIO Port",
  2527. description = "Unsupported. ID of the port used for optional VS10XX BSYNC.",
  2528. type = "enumerated",
  2529. choices = function() return GetGpioBanks() end,
  2530. flavor = "integer",
  2531. file = function() return GetGpioHeaderPath() end
  2532. },
  2533. {
  2534. macro = "VSCODEC0_BSYNC_BIT",
  2535. brief = "BSYNC GPIO Bit",
  2536. description = "Unsupported. Port bit used for optional VS10XX BSYNC.\n\n"..
  2537. "Required for the VS1001. Other decoders are driven "..
  2538. "in VS1001 mode, if this bit is defined. However, "..
  2539. "it is recommended to use this option for the VS1001 "..
  2540. "only and run newer chips in so called VS1002 native mode.",
  2541. type = "enumerated",
  2542. choices = function() return GetGpioBits() end,
  2543. flavor = "integer",
  2544. file = function() return GetGpioHeaderPath() end
  2545. },
  2546. {
  2547. macro = "VSCODEC0_HWRST_DURATION",
  2548. brief = "Hardware Reset Duration",
  2549. description = "Minimum time in milliseconds to held hardware reset low.",
  2550. default = "1",
  2551. flavor = "integer",
  2552. file = "include/cfg/audio.h"
  2553. },
  2554. {
  2555. macro = "VSCODEC0_HWRST_RECOVER",
  2556. brief = "Hardware Reset Recover",
  2557. description = "Milliseconds to wait after hardware reset.",
  2558. default = "0",
  2559. flavor = "integer",
  2560. file = "include/cfg/audio.h"
  2561. },
  2562. {
  2563. macro = "VSCODEC_SWRST_RECOVER",
  2564. brief = "Software Reset Recover",
  2565. description = "Milliseconds to wait after software reset.",
  2566. default = "0",
  2567. flavor = "integer",
  2568. file = "include/cfg/audio.h"
  2569. },
  2570. {
  2571. macro = "VSCODEC0_OUTPUT_BUFSIZ",
  2572. brief = "Decoder Buffer Size",
  2573. description = "Number of bytes for the decoder buffer.\n\n"..
  2574. "If not specified, half of available data RAM is used, "..
  2575. "up to a maximum of 16k.",
  2576. flavor = "booldata",
  2577. file = "include/cfg/audio.h"
  2578. },
  2579. {
  2580. macro = "NUT_THREAD_VSCODEC0STACK",
  2581. brief = "Thread Stack Size",
  2582. description = "Number of bytes for the decoder thread.",
  2583. flavor = "booldata",
  2584. file = "include/cfg/audio.h"
  2585. },
  2586. },
  2587. },
  2588. {
  2589. name = "nutdev_vscodec",
  2590. brief = "VS10XX Audio Device",
  2591. description = "Tested with VS1033 and VS1053 on a SAM7SE system. "..
  2592. "Most options are currently hard coded.",
  2593. sources = { "vscodec.c" },
  2594. requires = { "NOT_AVAILABLE" },
  2595. },
  2596. --
  2597. -- Ethernet Device Drivers.
  2598. --
  2599. {
  2600. name = "nutdev_lan91",
  2601. brief = "SMSC LAN91x Driver",
  2602. description = "LAN driver for SMSC LAN91. Currently supports LAN91C111 only.",
  2603. requires = { "NUT_EVENT", "NUT_TIMER", "HW_GPIOxx" },
  2604. provides = { "NET_MAC" },
  2605. sources = { "lan91.c" },
  2606. options =
  2607. {
  2608. {
  2609. macro = "LAN91_BASE_ADDR",
  2610. brief = "Controller Base Address",
  2611. description = "The driver supports memory mapped controllers only, using "..
  2612. "the specified based address.\n\n"..
  2613. "The Ethernut 2 reference design uses 0xC000.",
  2614. file = function() return GetGpioHeaderPath() end
  2615. },
  2616. {
  2617. macro = "LAN91_SIGNAL_IRQ",
  2618. brief = "Interrupt",
  2619. description = "Ethernet controller interrupt.",
  2620. default = "INT5",
  2621. type = "enumerated",
  2622. choices = avr_irq_choice,
  2623. file = function() return GetGpioHeaderPath() end
  2624. },
  2625. {
  2626. macro = "LAN91_RESET_GPIO_BIT",
  2627. brief = "Reset Bit",
  2628. description = "Bit number of the Ethernet controller reset output.\n\n"..
  2629. "Should be disabled when the LAN91 hardware reset "..
  2630. "is not connected to a port pin.\n",
  2631. provides = { "LAN91_RESET_BIT" },
  2632. flavor = "booldata",
  2633. type = "enumerated",
  2634. choices = function() return GetGpioBits() end,
  2635. file = function() return GetGpioHeaderPath() end
  2636. },
  2637. {
  2638. macro = "LAN91_RESET_GPIO_BANK",
  2639. brief = "Reset Port",
  2640. description = "Port register name of the Ethernet controller reset output.",
  2641. requires = { "LAN91_RESET_BIT" },
  2642. type = "enumerated",
  2643. choices = function() return GetGpioBanks() end,
  2644. file = function() return GetGpioHeaderPath() end
  2645. },
  2646. }
  2647. },
  2648. {
  2649. name = "nutdev_dm9000",
  2650. brief = "Davicom DM9000 Driver",
  2651. description = "LAN driver for Davicom DM9000A and DM9000E.",
  2652. requires = { "NUT_EVENT", "NUT_TIMER" },
  2653. provides = { "NET_MAC" },
  2654. sources = { "dm9000.c" },
  2655. options =
  2656. {
  2657. {
  2658. macro = "DM9000_BASE_ADDR",
  2659. brief = "Controller Base Address",
  2660. description = "The driver supports memory mapped controllers only, using "..
  2661. "the specified based address.\n\n"..
  2662. "The Ethernut 3 reference design uses 0x20000000.\n"..
  2663. "The ELEKTOR Internet Radio uses 0x30000000.\n",
  2664. file = "include/cfg/memory.h"
  2665. },
  2666. {
  2667. macro = "DM9000_SIGNAL_IRQ",
  2668. brief = "Ethernet Interrupt",
  2669. description = "Ethernet controller interrupt.",
  2670. type = "enumerated",
  2671. choices = avr_irq_choice,
  2672. file = function() return GetGpioHeaderPath() end
  2673. }
  2674. }
  2675. },
  2676. {
  2677. name = "nutdev_null_ether",
  2678. brief = "Ethernet Null Device",
  2679. description = "This virtual device discards all outgoing data and never delivers any "..
  2680. "incoming data.\n\n"..
  2681. "All targets without supported Ethernet hardware will use this driver "..
  2682. "by default. The main purpose of this driver is to build network applications "..
  2683. "without compiler and linker errors, even if no Ethernet hardware is available.",
  2684. provides = { "NET_MAC" },
  2685. sources = { "null_ether.c" },
  2686. },
  2687. {
  2688. name = "nutnet_ether_phy",
  2689. brief = "Ethernet PHYceiver",
  2690. requires = { "NET_MAC" },
  2691. provides = { "NET_PHY" },
  2692. sources = { "phy.c" },
  2693. options =
  2694. {
  2695. {
  2696. macro = "NIC_PHY_TYPE",
  2697. brief = "PHY Chip",
  2698. description = "Select the Physical Layer Tranceiver (PHYter) for your board.\n\n"..
  2699. "Commonly used chips and their IDs:\n"..
  2700. "AUTO: Autodetect chip\n"..
  2701. "AMD:\n"..
  2702. "AM79C875: 0x00225540\n"..
  2703. "DACOM\n"..
  2704. "DM9161: 0x0181B880 (ATMEL EK)\n"..
  2705. "DM9161A: 0x0181B8A0 (ATMEL EK)\n"..
  2706. "DM9161B: 0x0181B8B0\n"..
  2707. "DM9000: 0x0181B8C0 (EIR)\n"..
  2708. "DM9000A: 0x0181B8A0\n"..
  2709. "DM9000B: 0x0181B8B0\n"..
  2710. "National Semiconductors\n"..
  2711. "DP83838: 0x20005C90 (EVK1100, EVK1105)\n"..
  2712. "DP83848: 0x20005CA0\n"..
  2713. "Micrel\n"..
  2714. "KS8721: 0x00221610 (Olimex SAM7-EX256)\n"..
  2715. "KS8851: 0x00008870\n"..
  2716. "STMicroelectronics\n"..
  2717. "STE100P: 0x1C040010 (Hitex STM32-comStick)\n"..
  2718. "SMSC\n"..
  2719. "LAN8700: 0x0007C0C0\n"..
  2720. "LAN8710: 0x0007C0F0\n"..
  2721. "LAN8720: 0x0007C0F0\n"..
  2722. "ANY: 0xFFFFFFFF (Disable PHY ID check - not recommended)",
  2723. type = "enumerated",
  2724. choices =
  2725. {
  2726. "AUTO",
  2727. "AM79C875",
  2728. "DM9161",
  2729. "DM9161A",
  2730. "DM9161B",
  2731. "DM9000",
  2732. "DM9000A",
  2733. "DM9000B",
  2734. "DP83838",
  2735. "DP83848",
  2736. "KS8721",
  2737. "KS8851",
  2738. "STE100P",
  2739. "LAN8700",
  2740. "LAN8710",
  2741. "LAN8720",
  2742. "ANY"
  2743. },
  2744. file = "include/cfg/phycfg.h"
  2745. },
  2746. {
  2747. macro = "NIC_PHY_ADDR",
  2748. brief = "PHY Address",
  2749. description = "Default is 1 for EVK1100 and EVK1105.\n\n",
  2750. flavor = "integer",
  2751. file = "include/cfg/phycfg.h"
  2752. },
  2753. {
  2754. macro = "NIC_PHY_UID",
  2755. brief = "PHY ID",
  2756. description = "Override ID for the PHY connected to the Ethernet MAC.\n"..
  2757. "Pick the right ID out of the list of PHY chips or datasheet.\n"..
  2758. "Normally this should be left blank.",
  2759. flavor = "integer",
  2760. file = "include/cfg/phycfg.h"
  2761. },
  2762. {
  2763. macro = "PHY_MODE_RMII",
  2764. brief = "PHY_MODE_RMII",
  2765. description = "Use RMII mode for the phy, default is MII mode",
  2766. flavor = "boolean",
  2767. file = "include/cfg/phycfg.h"
  2768. },
  2769. }
  2770. },
  2771. --
  2772. -- Block Device Drivers.
  2773. --
  2774. {
  2775. name = "nutdev_blockdev",
  2776. brief = "Block I/O",
  2777. description = "Generic block I/O driver support routines.",
  2778. sources = { "blockdev.c" }
  2779. },
  2780. {
  2781. name = "nutdev_spi_at45d",
  2782. brief = "AT45D DataFlash Block I/O",
  2783. description = "Block I/O driver for up to four AT45D chips or cards.\n\n"..
  2784. "This new driver is based on the device independent "..
  2785. "bus interface and may replace older ones.\n\n"..
  2786. "Tested with non-volatile memory routines and "..
  2787. "the raw file system only. This early release will "..
  2788. "definitely not work with the PHAT file system.",
  2789. requires = { "SPIBUS_CONTROLLER" },
  2790. provides = { "DEV_BLOCKIO" },
  2791. sources =
  2792. {
  2793. "spi_at45d.c",
  2794. "spi_at45d0.c",
  2795. "spi_at45d1.c",
  2796. "spi_at45d2.c",
  2797. "spi_at45d3.c"
  2798. },
  2799. options =
  2800. {
  2801. {
  2802. macro = "MOUNT_OFFSET_AT45D0",
  2803. brief = "Reserved Bottom Pages (First Device)",
  2804. description = "Number of pages reserved at the bottom.\n\n"..
  2805. "When a file system driver mounts this device, the specified number "..
  2806. "of pages will be excluded from the volume and may be used for "..
  2807. "other purposes like storing configuration data or boot loader images.",
  2808. flavor = "booldata",
  2809. file = "include/cfg/memory.h"
  2810. },
  2811. {
  2812. macro = "MOUNT_TOP_RESERVE_AT45D0",
  2813. brief = "Reserved Top Pages (First Device)",
  2814. description = "Number of pages reserved at the top.\n\n"..
  2815. "When a file system driver mounts this device, the specified number "..
  2816. "of pages will be excluded from the volume. On some targets the "..
  2817. "top page is used to store internal Nut/OS settings.",
  2818. flavor = "booldata",
  2819. file = "include/cfg/memory.h"
  2820. },
  2821. {
  2822. macro = "SPI_RATE_AT45D0",
  2823. brief = "Transfer Rate (First Device)",
  2824. description = "Interface speed in bits per second, default is 33000000 (33Mbps).\n\n"..
  2825. "If the exact value can't be set, the driver will choose the "..
  2826. "next lower one. Bit banging interfaces always run at maximum speed.",
  2827. default = "33000000",
  2828. file = "include/cfg/memory.h"
  2829. },
  2830. {
  2831. macro = "SPI_MODE_AT45D0",
  2832. brief = "Transfer Mode (First Device)",
  2833. description = "Either mode 3 (default) or mode 0 is supported.",
  2834. default = "SPI_MODE_3",
  2835. type = "enumerated",
  2836. choices = { "SPI_MODE_3", "SPI_MODE_0" },
  2837. file = "include/cfg/memory.h"
  2838. },
  2839. {
  2840. macro = "SPI_CSHIGH_AT45D0",
  2841. brief = "Pos. Chip Select (First Device)",
  2842. description = "When set, the chip select is driven high to activate the device. "..
  2843. "By default chip selects are low active.",
  2844. flavor = "boolean",
  2845. file = "include/cfg/memory.h"
  2846. },
  2847. {
  2848. macro = "MOUNT_OFFSET_AT45D1",
  2849. brief = "Reserved Bottom Pages (Second Device)",
  2850. description = "Number of pages reserved at the bottom.\n\n"..
  2851. "When a file system driver mounts this device, the specified number "..
  2852. "of pages will be excluded from the volume and may be used for "..
  2853. "other purposes like storing configuration data or boot loader images.",
  2854. flavor = "booldata",
  2855. file = "include/cfg/memory.h"
  2856. },
  2857. {
  2858. macro = "MOUNT_TOP_RESERVE_AT45D1",
  2859. brief = "Reserved Top Pages (Second Device)",
  2860. description = "Number of pages reserved at the top.\n\n"..
  2861. "When a file system driver mounts this device, the specified number "..
  2862. "of pages will be excluded from the volume. On some targets the "..
  2863. "top page is used to store internal Nut/OS settings.",
  2864. flavor = "booldata",
  2865. file = "include/cfg/memory.h"
  2866. },
  2867. {
  2868. macro = "SPI_RATE_AT45D1",
  2869. brief = "Transfer Rate (Second Device)",
  2870. description = "Interface speed in bits per second, default is 33000000 (33Mbps).\n\n"..
  2871. "If the exact value can't be set, the driver will choose the "..
  2872. "next lower one. Bit banging interfaces always run at maximum speed.",
  2873. description = ".",
  2874. default = "33000000",
  2875. file = "include/cfg/memory.h"
  2876. },
  2877. {
  2878. macro = "SPI_CSHIGH_AT45D1",
  2879. brief = "Pos. Chip Select (Second Device)",
  2880. description = "When set, the chip select is driven high to activate the device. "..
  2881. "By default chip selects are low active.",
  2882. flavor = "boolean",
  2883. file = "include/cfg/memory.h"
  2884. },
  2885. {
  2886. macro = "MOUNT_OFFSET_AT45D2",
  2887. brief = "Reserved Bottom Pages (Third Device)",
  2888. description = "Number of pages reserved at the bottom.\n\n"..
  2889. "When a file system driver mounts this device, the specified number "..
  2890. "of pages will be excluded from the volume and may be used for "..
  2891. "other purposes like storing configuration data or boot loader images.",
  2892. flavor = "booldata",
  2893. file = "include/cfg/memory.h"
  2894. },
  2895. {
  2896. macro = "MOUNT_TOP_RESERVE_AT45D2",
  2897. brief = "Reserved Top Pages (Third Device)",
  2898. description = "Number of pages reserved at the top.\n\n"..
  2899. "When a file system driver mounts this device, the specified number "..
  2900. "of pages will be excluded from the volume. On some targets the "..
  2901. "top page is used to store internal Nut/OS settings.",
  2902. flavor = "booldata",
  2903. file = "include/cfg/memory.h"
  2904. },
  2905. {
  2906. macro = "SPI_RATE_AT45D2",
  2907. brief = "Transfer Rate (Third Device)",
  2908. description = "Interface speed in bits per second, default is 33000000 (33Mbps).\n\n"..
  2909. "If the exact value can't be set, the driver will choose the "..
  2910. "next lower one. Bit banging interfaces always run at maximum speed.",
  2911. description = ".",
  2912. default = "33000000",
  2913. file = "include/cfg/memory.h"
  2914. },
  2915. {
  2916. macro = "SPI_CSHIGH_AT45D2",
  2917. brief = "Pos. Chip Select (Third Device)",
  2918. description = "When set, the chip select is driven high to activate the device. "..
  2919. "By default chip selects are low active.",
  2920. flavor = "boolean",
  2921. file = "include/cfg/memory.h"
  2922. },
  2923. {
  2924. macro = "MOUNT_OFFSET_AT45D3",
  2925. brief = "Reserved Bottom Pages (Fourth Device)",
  2926. description = "Number of pages reserved at the bottom.\n\n"..
  2927. "When a file system driver mounts this device, the specified number "..
  2928. "of pages will be excluded from the volume and may be used for "..
  2929. "other purposes like storing configuration data or boot loader images.",
  2930. flavor = "booldata",
  2931. file = "include/cfg/memory.h"
  2932. },
  2933. {
  2934. macro = "MOUNT_TOP_RESERVE_AT45D3",
  2935. brief = "Reserved Top Pages (Fourth Device)",
  2936. description = "Number of pages reserved at the top.\n\n"..
  2937. "When a file system driver mounts this device, the specified number "..
  2938. "of pages will be excluded from the volume. On some targets the "..
  2939. "top page is used to store internal Nut/OS settings.",
  2940. flavor = "booldata",
  2941. file = "include/cfg/memory.h"
  2942. },
  2943. {
  2944. macro = "SPI_RATE_AT45D3",
  2945. brief = "Transfer Rate (Fourth Device)",
  2946. description = "Interface speed in bits per second, default is 33000000 (33Mbps).\n\n"..
  2947. "If the exact value can't be set, the driver will choose the "..
  2948. "next lower one. Bit banging interfaces always run at maximum speed.",
  2949. description = ".",
  2950. default = "33000000",
  2951. file = "include/cfg/memory.h"
  2952. },
  2953. {
  2954. macro = "SPI_CSHIGH_AT45D3",
  2955. brief = "Pos. Chip Select (Fourth Device)",
  2956. description = "When set, the chip select is driven high to activate the device. "..
  2957. "By default chip selects are low active.",
  2958. flavor = "boolean",
  2959. file = "include/cfg/memory.h"
  2960. },
  2961. {
  2962. macro = "AT45_WRITE_POLLS",
  2963. brief = "Max. Write Poll Number",
  2964. description = "Maximum number of polling loops for page write.",
  2965. default = "1000",
  2966. file = "include/cfg/memory.h"
  2967. }
  2968. }
  2969. },
  2970. {
  2971. name = "nutdev_spi_at45dib",
  2972. brief = "AT45D Serial Flash Driver",
  2973. description = "Although the implemented routines are quite similar to other device drivers, "..
  2974. "this is not a standard block I/O driver.\n\n",
  2975. -- "The implemented functions offer access to AT45D DataFlash devices "..
  2976. -- "without the need to allocate page buffers from heap memory. Instead, "..
  2977. -- "the chip's internal RAM buffers are used.\n\n"..
  2978. -- "This module also uses the options from the block I/O driver.",
  2979. requires = { "SPIBUS_CONTROLLER" },
  2980. provides = { "SERIALFLASH_INTERFACE" },
  2981. sources =
  2982. {
  2983. "spi_at45dib.c",
  2984. "spi_flash_at45d.c",
  2985. "spi_blkio_at45d.c",
  2986. "spi_node_at45d.c",
  2987. "spi_at45d_info.c"
  2988. },
  2989. options =
  2990. {
  2991. {
  2992. macro = "AT45D_CRC_PAGE",
  2993. brief = "Use Page CRC",
  2994. description = "If enabled, each page is protected by a 16 bit CRC ",
  2995. flavor = "boolean",
  2996. file = "include/cfg/memory.h"
  2997. },
  2998. {
  2999. macro = "FLASH_MOUNT_OFFSET_AT45D0",
  3000. brief = "FFS Reserved Bottom Pages (First Device)",
  3001. description = "Number of pages reserved at the bottom, when mounting a flash file system.\n\n"..
  3002. "When a flash file system driver mounts this device, the specified number "..
  3003. "of pages will be excluded from the volume.\n\n"..
  3004. "If not defined, the value of MOUNT_OFFSET_AT45D0 is used.",
  3005. flavor = "booldata",
  3006. file = "include/cfg/memory.h"
  3007. },
  3008. {
  3009. macro = "FLASH_MOUNT_TOP_RESERVE_AT45D0",
  3010. brief = "FFS Reserved Top Pages (First Device)",
  3011. description = "Number of pages reserved at the top, when mounting a flash file system.\n\n"..
  3012. "When a flash file system driver mounts this device, the specified number "..
  3013. "of pages at the top will be excluded from the volume.\n\n"..
  3014. "If not defined, the value of MOUNT_TOP_RESERVE_AT45D0 is used.",
  3015. flavor = "booldata",
  3016. file = "include/cfg/memory.h"
  3017. },
  3018. {
  3019. macro = "BLKIO_MOUNT_OFFSET_AT45D0",
  3020. brief = "Block I/O Reserved Bottom Pages (First Device)",
  3021. description = "Number of pages reserved at the bottom, when mounting a block I/O based file system.\n\n"..
  3022. "When a flash file system driver mounts this device, the specified number "..
  3023. "of pages will be excluded from the volume.\n\n"..
  3024. "If not defined, the value of MOUNT_OFFSET_AT45D0 is used.",
  3025. flavor = "booldata",
  3026. file = "include/cfg/memory.h"
  3027. },
  3028. {
  3029. macro = "BLKIO_MOUNT_TOP_RESERVE_AT45D0",
  3030. brief = "Block I/O Reserved Top Pages (First Device)",
  3031. description = "Number of pages reserved at the top, when mounting a block I/O based file system.\n\n"..
  3032. "When a flash file system driver mounts this device, the specified number "..
  3033. "of pages at the top will be excluded from the volume.\n\n"..
  3034. "If not defined, the value of MOUNT_TOP_RESERVE_AT45D0 is used.",
  3035. flavor = "booldata",
  3036. file = "include/cfg/memory.h"
  3037. },
  3038. {
  3039. macro = "FLASH_MOUNT_OFFSET_AT45D1",
  3040. brief = "FFS Reserved Bottom Pages (Second Device)",
  3041. description = "Number of pages reserved at the bottom, when mounting a flash file system.\n\n"..
  3042. "When a flash file system driver mounts this device, the specified number "..
  3043. "of pages will be excluded from the volume.\n\n"..
  3044. "If not defined, the value of MOUNT_OFFSET_AT45D1 is used.",
  3045. flavor = "booldata",
  3046. file = "include/cfg/memory.h"
  3047. },
  3048. {
  3049. macro = "FLASH_MOUNT_TOP_RESERVE_AT45D1",
  3050. brief = "FFS Reserved Top Pages (Second Device)",
  3051. description = "Number of pages reserved at the top, when mounting a flash file system.\n\n"..
  3052. "When a flash file system driver mounts this device, the specified number "..
  3053. "of pages at the top will be excluded from the volume.\n\n"..
  3054. "If not defined, the value of MOUNT_TOP_RESERVE_AT45D1 is used.",
  3055. flavor = "booldata",
  3056. file = "include/cfg/memory.h"
  3057. },
  3058. {
  3059. macro = "BLKIO_MOUNT_OFFSET_AT45D1",
  3060. brief = "Block I/O Reserved Bottom Pages (Second Device)",
  3061. description = "Number of pages reserved at the bottom, when mounting a block I/O based file system.\n\n"..
  3062. "When a flash file system driver mounts this device, the specified number "..
  3063. "of pages will be excluded from the volume.\n\n"..
  3064. "If not defined, the value of MOUNT_OFFSET_AT45D1 is used.",
  3065. flavor = "booldata",
  3066. file = "include/cfg/memory.h"
  3067. },
  3068. {
  3069. macro = "BLKIO_MOUNT_TOP_RESERVE_AT45D1",
  3070. brief = "Block I/O Reserved Top Pages (Second Device)",
  3071. description = "Number of pages reserved at the top, when mounting a block I/O based file system.\n\n"..
  3072. "When a flash file system driver mounts this device, the specified number "..
  3073. "of pages at the top will be excluded from the volume.\n\n"..
  3074. "If not defined, the value of MOUNT_TOP_RESERVE_AT45D1 is used.",
  3075. flavor = "booldata",
  3076. file = "include/cfg/memory.h"
  3077. },
  3078. {
  3079. macro = "FLASH_MOUNT_OFFSET_AT45D2",
  3080. brief = "FFS Reserved Bottom Pages (Third Device)",
  3081. description = "Number of pages reserved at the bottom, when mounting a flash file system.\n\n"..
  3082. "When a flash file system driver mounts this device, the specified number "..
  3083. "of pages will be excluded from the volume.\n\n"..
  3084. "If not defined, the value of MOUNT_OFFSET_AT45D2 is used.",
  3085. flavor = "booldata",
  3086. file = "include/cfg/memory.h"
  3087. },
  3088. {
  3089. macro = "FLASH_MOUNT_TOP_RESERVE_AT45D2",
  3090. brief = "FFS Reserved Top Pages (Third Device)",
  3091. description = "Number of pages reserved at the top, when mounting a flash file system.\n\n"..
  3092. "When a flash file system driver mounts this device, the specified number "..
  3093. "of pages at the top will be excluded from the volume.\n\n"..
  3094. "If not defined, the value of MOUNT_TOP_RESERVE_AT45D2 is used.",
  3095. flavor = "booldata",
  3096. file = "include/cfg/memory.h"
  3097. },
  3098. {
  3099. macro = "BLKIO_MOUNT_OFFSET_AT45D2",
  3100. brief = "Block I/O Reserved Bottom Pages (Third Device)",
  3101. description = "Number of pages reserved at the bottom, when mounting a block I/O based file system.\n\n"..
  3102. "When a flash file system driver mounts this device, the specified number "..
  3103. "of pages will be excluded from the volume.\n\n"..
  3104. "If not defined, the value of MOUNT_OFFSET_AT45D2 is used.",
  3105. flavor = "booldata",
  3106. file = "include/cfg/memory.h"
  3107. },
  3108. {
  3109. macro = "BLKIO_MOUNT_TOP_RESERVE_AT45D2",
  3110. brief = "Block I/O Reserved Top Pages (Third Device)",
  3111. description = "Number of pages reserved at the top, when mounting a block I/O based file system.\n\n"..
  3112. "When a flash file system driver mounts this device, the specified number "..
  3113. "of pages at the top will be excluded from the volume.\n\n"..
  3114. "If not defined, the value of MOUNT_TOP_RESERVE_AT45D2 is used.",
  3115. flavor = "booldata",
  3116. file = "include/cfg/memory.h"
  3117. },
  3118. {
  3119. macro = "FLASH_MOUNT_OFFSET_AT45D3",
  3120. brief = "FFS Reserved Bottom Pages (Forth Device)",
  3121. description = "Number of pages reserved at the bottom, when mounting a flash file system.\n\n"..
  3122. "When a flash file system driver mounts this device, the specified number "..
  3123. "of pages will be excluded from the volume.\n\n"..
  3124. "If not defined, the value of MOUNT_OFFSET_AT45D3 is used.",
  3125. flavor = "booldata",
  3126. file = "include/cfg/memory.h"
  3127. },
  3128. {
  3129. macro = "FLASH_MOUNT_TOP_RESERVE_AT45D3",
  3130. brief = "FFS Reserved Top Pages (Forth Device)",
  3131. description = "Number of pages reserved at the top, when mounting a flash file system.\n\n"..
  3132. "When a flash file system driver mounts this device, the specified number "..
  3133. "of pages at the top will be excluded from the volume.\n\n"..
  3134. "If not defined, the value of MOUNT_TOP_RESERVE_AT45D3 is used.",
  3135. flavor = "booldata",
  3136. file = "include/cfg/memory.h"
  3137. },
  3138. {
  3139. macro = "BLKIO_MOUNT_OFFSET_AT45D3",
  3140. brief = "Block I/O Reserved Bottom Pages (Forth Device)",
  3141. description = "Number of pages reserved at the bottom, when mounting a block I/O based file system.\n\n"..
  3142. "When a flash file system driver mounts this device, the specified number "..
  3143. "of pages will be excluded from the volume.\n\n"..
  3144. "If not defined, the value of MOUNT_OFFSET_AT45D3 is used.",
  3145. flavor = "booldata",
  3146. file = "include/cfg/memory.h"
  3147. },
  3148. {
  3149. macro = "BLKIO_MOUNT_TOP_RESERVE_AT45D3",
  3150. brief = "Block I/O Reserved Top Pages (Forth Device)",
  3151. description = "Number of pages reserved at the top, when mounting a block I/O based file system.\n\n"..
  3152. "When a flash file system driver mounts this device, the specified number "..
  3153. "of pages at the top will be excluded from the volume.\n\n"..
  3154. "If not defined, the value of MOUNT_TOP_RESERVE_AT45D3 is used.",
  3155. flavor = "booldata",
  3156. file = "include/cfg/memory.h"
  3157. }
  3158. }
  3159. },
  3160. {
  3161. name = "nutdev_spi_mmc",
  3162. brief = "SPI Bus MMC Driver",
  3163. description = "Block I/O driver for Multimedia cards attached to the SPI bus.\n\n"..
  3164. "The included routines provide generic access to memory cards to "..
  3165. "be used by hardware specifc MMC drivers, which are typically "..
  3166. "defined by an MMC support module.\n\n"..
  3167. "Replaces the older basic MMC driver. Tested on AT91 only.",
  3168. requires = { "DEV_MMCSUPPORT", "SPIBUS_CONTROLLER" },
  3169. provides = { "DEV_BLOCK" },
  3170. sources = { "spi_mmc.c" },
  3171. options =
  3172. {
  3173. {
  3174. macro = "MMC_BLOCK_SIZE",
  3175. brief = "Block Size",
  3176. description = "Block size in bytes. Do not change unless you are "..
  3177. "sure that both, the file system and the hardware support it.",
  3178. default = "512",
  3179. flavor = "integer",
  3180. file = "include/cfg/mmci.h"
  3181. },
  3182. {
  3183. macro = "MMC_MAX_INIT_POLLS",
  3184. brief = "Card Init Timeout",
  3185. description = "Max. number of loops waiting for card's idle mode "..
  3186. "after initialization. An additional delay of 1 ms is "..
  3187. "added to each loop after one quarter of this value "..
  3188. "elapsed.",
  3189. default = "512",
  3190. flavor = "integer",
  3191. file = "include/cfg/mmci.h"
  3192. },
  3193. {
  3194. macro = "MMC_MAX_RESET_POLLS",
  3195. brief = "Card Reset Timeout",
  3196. description = "Max. number of loops waiting for card's idle mode "..
  3197. "after resetting it.",
  3198. default = "255",
  3199. flavor = "integer",
  3200. file = "include/cfg/mmci.h"
  3201. },
  3202. {
  3203. macro = "MMC_MAX_WRITE_POLLS",
  3204. brief = "Card Write Timeout",
  3205. description = "Max. number of loops waiting for card's idle mode "..
  3206. "after resetting it. An additional delay of 1 ms is "..
  3207. "added to each loop after 31/32 of this value "..
  3208. "elapsed.",
  3209. default = "1024",
  3210. flavor = "integer",
  3211. file = "include/cfg/mmci.h"
  3212. },
  3213. {
  3214. macro = "MMC_MAX_WRITE_RETRIES",
  3215. brief = "Card Write Retries",
  3216. description = "Max. number of retries while writing.",
  3217. default = "32",
  3218. flavor = "integer",
  3219. file = "include/cfg/mmci.h"
  3220. },
  3221. {
  3222. macro = "MMC_MAX_READ_RETRIES",
  3223. brief = "Card Read Retries",
  3224. description = "Max. number of retries while reading.",
  3225. default = "8",
  3226. flavor = "integer",
  3227. file = "include/cfg/mmci.h"
  3228. },
  3229. {
  3230. macro = "MMC_MAX_REG_POLLS",
  3231. brief = "Register Read Timeout",
  3232. description = "Max. number of loops while reading a card's register.",
  3233. default = "512",
  3234. flavor = "integer",
  3235. file = "include/cfg/mmci.h"
  3236. },
  3237. {
  3238. macro = "MMC_MAX_CMDACK_POLLS",
  3239. brief = "Command Acknowledge Timeout",
  3240. description = "Max. number of loops waiting for card's acknowledge "..
  3241. "of a command. An additional delay of 1 ms is "..
  3242. "added to each loop after three quarter of this value "..
  3243. "elapsed.",
  3244. default = "1024",
  3245. flavor = "integer",
  3246. file = "include/cfg/mmci.h"
  3247. },
  3248. },
  3249. },
  3250. {
  3251. name = "nutdev_spi_mmc_gpio",
  3252. brief = "SPI bus based Multimedia Card Support",
  3253. description = "SPI bus implementation of MMC support with GPIO based CD and WP detection.\n\n"..
  3254. "This package provides additional routines, which "..
  3255. "are needed when using MultiMedia Cards with an SPI "..
  3256. "bus driver. Main functions are card change detection "..
  3257. "and write SD Card write protect switch sensing.\n\n"..
  3258. "Tested on AT91 only but should work with every SPI bus driver.",
  3259. requires = { "SPIBUS_CONTROLLER" },
  3260. provides = { "DEV_MMCSUPPORT" },
  3261. sources = { "spi_mmc_gpio.c" },
  3262. options =
  3263. {
  3264. {
  3265. macro = "SPI_MMC_CLK",
  3266. brief = "SPI Bus Transfer Rate",
  3267. description = "Interface speed in bits per second, default is 33000000 (33Mbps).\n\n"..
  3268. "If the exact value can't be set, the driver will choose the \n"..
  3269. "next lower one. Bit banging interfaces always run at maximum speed.",
  3270. default = "33000000",
  3271. file = "include/cfg/mmci.h"
  3272. },
  3273. {
  3274. macro = "SPI_MMC_CS",
  3275. brief = "SPI Bus Chip Select Number",
  3276. default = "0",
  3277. type = "enumerated",
  3278. choices = { "0", "1", "2", "3" },
  3279. file = "include/cfg/mmci.h"
  3280. },
  3281. {
  3282. macro = "MMC_CD_PIN",
  3283. brief = "Card detect GPIO pin number",
  3284. description = "Number of GPIO pin where the card detect signal is connected.\n\n"..
  3285. "If disabled it is assumed that the card is always present\n",
  3286. provides = { "MMC_CD_PIN" },
  3287. flavor = "booldata",
  3288. type = "enumerated",
  3289. choices = function() return GetGpioBits() end,
  3290. file = "include/cfg/mmci.h"
  3291. },
  3292. {
  3293. macro = "MMC_CD_PORT",
  3294. brief = "Card detect GPIO Port",
  3295. description = "Port register name of the GPIO pin where the carddetect signal is connected.",
  3296. requires = { "MMC_CD_PIN" },
  3297. type = "enumerated",
  3298. choices = function() return GetGpioBanks() end,
  3299. file = "include/cfg/mmci.h"
  3300. },
  3301. {
  3302. macro = "MMC_WP_PIN",
  3303. brief = "Card write protect GPIO pin number",
  3304. description = "Number of GPIO pin where the card write protect signal is connected.\n\n"..
  3305. "If disabled it is assumed that the card is always writable\n",
  3306. provides = { "MMC_WP_PIN" },
  3307. flavor = "booldata",
  3308. type = "enumerated",
  3309. choices = function() return GetGpioBits() end,
  3310. file = "include/cfg/mmci.h"
  3311. },
  3312. {
  3313. macro = "MMC_WP_PORT",
  3314. brief = "Card detect GPIO Port",
  3315. description = "Port register name of the GPIO pin where the write protect signal is connected.",
  3316. requires = { "MMC_WP_PIN" },
  3317. type = "enumerated",
  3318. choices = function() return GetGpioBanks() end,
  3319. file = "include/cfg/mmci.h"
  3320. },
  3321. },
  3322. },
  3323. {
  3324. name = "nutdev_mmcard",
  3325. brief = "Basic MMC Driver",
  3326. description = "Basic Multimedia card driver. To run this driver, a few low "..
  3327. "level routines are required for direct hardware access.\n\n"..
  3328. "SPI bus sharing is not available with this early driver "..
  3329. "and it has been replaced by the newer SPI bus driver.\n"..
  3330. "Tested on AT91 only.",
  3331. requires = { "DEV_MMCLL" },
  3332. provides = { "DEV_BLOCK" },
  3333. sources = { "mmcard.c" },
  3334. options =
  3335. {
  3336. {
  3337. macro = "MMC_MAX_R1_POLLS",
  3338. brief = "R1 Response Timeout",
  3339. description = "Max. number of loops waiting for card's R1 response. "..
  3340. "Increase on fast systems and old cards, decrease for "..
  3341. "faster timeout. ",
  3342. default = "1024",
  3343. flavor = "integer",
  3344. file = "include/cfg/mmci.h"
  3345. },
  3346. {
  3347. macro = "MMC_VERIFY_AFTER",
  3348. brief = "Verify Read/Write",
  3349. description = "If enabled, an additional read will be done to verify "..
  3350. "each read or written sector. This is useful for testing.",
  3351. flavor = "boolean",
  3352. file = "include/cfg/mmci.h"
  3353. }
  3354. }
  3355. },
  3356. --
  3357. -- RTC Support.
  3358. --
  3359. {
  3360. name = "nutdev_rtc",
  3361. brief = "RTC API",
  3362. description = "Hardware independant RTC routines.",
  3363. provides = { "DEV_RTC" },
  3364. sources = { "rtc.c" },
  3365. },
  3366. {
  3367. name = "nutdev_ds1307",
  3368. brief = "DS1307 Driver",
  3369. description = "Dallas DS1307 RTC driver. Tested on AVR (MMnet02) only.",
  3370. requires = { "HW_MCU_AVR" },
  3371. provides = { "DEV_RTC" },
  3372. sources = { "ds1307rtc.c" },
  3373. },
  3374. {
  3375. name = "nutdev_pcf8563",
  3376. brief = "PCF8563 Driver",
  3377. description = "Philips PCF8563 RTC driver. Tested on AT91 only.",
  3378. requires = { "HW_MCU_AT91" },
  3379. provides = { "DEV_RTC" },
  3380. sources = { "pcf8563.c" },
  3381. },
  3382. {
  3383. name = "nutdev_i2c_pcf85xx",
  3384. brief = "PCF85XX Driver",
  3385. description = "Early NXP RTC bus controller based driver, tested on Ethernut 5.",
  3386. requires = { "I2CBUS_CONTROLLER" },
  3387. provides = { "DEV_RTC" },
  3388. sources = { "i2c_pcf85xx.c" },
  3389. },
  3390. {
  3391. name = "nutdev_x12rtc",
  3392. brief = "X12xx Driver",
  3393. description = "Intersil X12xx RTC and EEPROM driver. Tested on AT91 only.",
  3394. requires = { "HW_MCU_AT91" },
  3395. provides = { "DEV_RTC" },
  3396. sources = { "x12rtc.c" },
  3397. options =
  3398. {
  3399. {
  3400. macro = "EEPROM_PAGE_SIZE",
  3401. brief = "EEPROM Page Size",
  3402. description = "If enabled, a different page size may be specified.\n\n"..
  3403. "Do we really need this?",
  3404. flavor = "booldata",
  3405. file = "include/cfg/eeprom.h"
  3406. },
  3407. },
  3408. },
  3409. --
  3410. -- Bus Controller Drivers.
  3411. --
  3412. {
  3413. name = "nutdev_spibus",
  3414. brief = "SPI Bus",
  3415. requires = { "SPIBUS_CONTROLLER" },
  3416. description = "Generic SPI bus routines, which may be used "..
  3417. "by bus controller implementations.",
  3418. sources = { "spibus.c" }
  3419. },
  3420. {
  3421. name = "nutdev_i2cbus",
  3422. brief = "I2C Bus",
  3423. requires = { "I2CBUS_CONTROLLER" },
  3424. description = "Hardware independent I2C bus API.",
  3425. sources = { "i2cbus.c" }
  3426. },
  3427. {
  3428. name = "nutdev_owibus",
  3429. brief = "OWI Bus",
  3430. requires = { "OWIBUS_CONTROLLER" },
  3431. description = "Hardware independent I2C bus API.",
  3432. sources = { "owibus.c" }
  3433. },
  3434. --
  3435. -- Special Chip Drivers.
  3436. --
  3437. {
  3438. name = "nutdev_twi_at24c",
  3439. brief = "AT24C Serial EEPROM",
  3440. description = "Serial eeprom driver for AT24C chips.\n\n",
  3441. requires = { "DEV_TWI" },
  3442. sources = { "at24c.c", "eeprom.c" },
  3443. options =
  3444. {
  3445. {
  3446. macro = "AT24C_SLAVE_ADDR",
  3447. brief = "Address of Slave",
  3448. description = "EEPROMs Slave address on the bus.\n"..
  3449. "No convetions here, so the address should be given without R/W bit.\n"..
  3450. "For a AT24C64 it usually will be 0x50.",
  3451. flavour = "integer",
  3452. default = "0x50",
  3453. file = "include/cfg/eeprom.h",
  3454. },
  3455. {
  3456. macro = "AT24C_CHIP_SIZE",
  3457. brief = "Memory Size",
  3458. description = "Size of your EEPROM.\n"..
  3459. "As manufacturers like to give sizes in bits, as it sound like more "..
  3460. "this value is usually the chips name divided by 8\n"..
  3461. "For a AT24C64 it will be 8192 bytes",
  3462. flavour = "integer",
  3463. default = "8192",
  3464. file = "include/cfg/eeprom.h",
  3465. },
  3466. {
  3467. macro = "AT24C_ADR_SIZE",
  3468. brief = "Address Size",
  3469. description = "Number of bytes send as internal address.\n",
  3470. flavour = "integer",
  3471. default = "2",
  3472. file = "include/cfg/eeprom.h",
  3473. },
  3474. {
  3475. macro = "AT24C_ROW_SIZE",
  3476. brief = "Row Size",
  3477. description = "Row size of the EEPROM.\n"..
  3478. "This is equal to the ammount of bytes that can be written in one "..
  3479. "programming cycle. Addtitionally this is the base for correct "..
  3480. "alignment of programming addresses.\n\n"..
  3481. "On most EEPROMs this value is 32 bytes.",
  3482. flavour = "integer",
  3483. default = "32",
  3484. file = "include/cfg/eeprom.h",
  3485. },
  3486. {
  3487. macro = "AT24C_BLOCK_ADDR",
  3488. brief = "Block Addressing Mode",
  3489. description = "This is a special addressing mode found on small end cheap chips "..
  3490. "of manufacturers that cannot understand I2C specification at all.\n\n"..
  3491. "Normally the Slave-Address is used to select the right slave on the bus. "..
  3492. "Some chips allow to appear on different addresses by pulling some of their pins high or low.\n"..
  3493. "Now, these EEPROMs needing this item checked, have their address pins internally not "..
  3494. "connected but use the lower three address bits for the high byte of the internal address...\n"..
  3495. "For these chips, the address length must be 1 even they are larger than 256 bytes.",
  3496. flavor = "booldata",
  3497. file = "include/cfg/eeprom.h",
  3498. }
  3499. }
  3500. },
  3501. {
  3502. name = "nutdev_sht21",
  3503. brief = "SHT21 Driver",
  3504. description = "Sensirion SHT21 temperature and humidity sensor driver.\n"..
  3505. "Should work with new SHT25 device too, but not tested.",
  3506. provides = { "DEV_SHT21" },
  3507. requires = { "DEV_TWI" },
  3508. sources = { "sht21.c" },
  3509. options =
  3510. {
  3511. {
  3512. macro = "I2C_SLA_SHT21",
  3513. brief = "Slave Address",
  3514. description = "SHT21 slave address. This is fixed and cannot be altered.",
  3515. type = "enumerated",
  3516. flavor = "integer",
  3517. default = "0x40",
  3518. file = "include/cfg/sht21.h"
  3519. },
  3520. {
  3521. macro = "SHT_ACK_POLLING",
  3522. brief = "SHT21 ACK-Polling",
  3523. description = "The SHT2x supports operation modes: ACK polling or ACK-Stretching.\n"..
  3524. "ACK Polling: The driver will poll the SHT2x every about 10ms for a result.\n"..
  3525. "ACK Stretching: The SHT2x will held SCL low until measurement finished. "..
  3526. "This will block the complete bus for other devices too but requires less code.",
  3527. flavor = "booldata",
  3528. file = "include/cfg/sht21.h"
  3529. },
  3530. {
  3531. macro = "SHT21_PRECISION",
  3532. brief = "SHT21 precision",
  3533. description = "The SHT21 supports several different precisons for measurement:\n"..
  3534. "Possible values are:\n"..
  3535. "0x00: rH=12bit, T=14bit\n"..
  3536. "0x01: rH= 8bit, T=12bit\n"..
  3537. "0x80: rH=10bit, T=13bit\n"..
  3538. "0x81: rH=11bit, T=11bit\n",
  3539. type = "enumerated",
  3540. flavor = "integer",
  3541. choices = { "0x00", "0x01", "0x80", "0x81" },
  3542. default = "0x00",
  3543. file = "include/cfg/sht21.h"
  3544. }
  3545. }
  3546. },
  3547. {
  3548. name = "nutdev_mma745x",
  3549. brief = "MMA745x Driver",
  3550. description = "Freescale MMA745x velocity sensor driver.\n",
  3551. provides = { "DEV_MMA745X" },
  3552. requires = { "DEV_TWI" },
  3553. sources = { "mma745x.c" },
  3554. options =
  3555. {
  3556. {
  3557. macro = "MMA745X_MODE",
  3558. brief = "Operating Mode",
  3559. description = "The MMA745x supports measurement modes:\n"..
  3560. "The driver initializes to the given mode. The user can switch the mode at any time.\n"..
  3561. "Possible values are:\n"..
  3562. "0x00: Standby\n"..
  3563. "0x01: Measurement\n"..
  3564. "0x02: Level detection\n"..
  3565. "0x02: Pulse detection\n"..
  3566. "Note that for Measurement Mode INT1/DRDY can only serve as DRDY signal or interrupt.\n"..
  3567. "Level and pulse interrupts are not available.\n",
  3568. type = "enumerated",
  3569. flavor = "integer",
  3570. choices = { "0x00", "0x01", "0x02", "0x03" },
  3571. default = "0x00",
  3572. file = "include/cfg/mma745x.h"
  3573. },
  3574. {
  3575. macro = "MMA745X_RANGE",
  3576. brief = "Range",
  3577. description = "The MMA745x supports several different measurement ranges:\n"..
  3578. "Possible values are:\n"..
  3579. "0x00: +/- 8g\n"..
  3580. "0x08: +/- 4g\n"..
  3581. "0x04: +/- 2g\n",
  3582. type = "enumerated",
  3583. flavor = "integer",
  3584. choices = { "0x00", "0x08", "0x04" },
  3585. default = "0x00",
  3586. file = "include/cfg/mma745x.h"
  3587. },
  3588. {
  3589. macro = "MMA745X_8BIT",
  3590. brief = "8 Bit Width",
  3591. description = "The MMA745x supports 10bit and 8 bit data format. Select this to use 8 bit information.\n",
  3592. type = "enumerated",
  3593. flavor = "boolean",
  3594. file = "include/cfg/mma745x.h"
  3595. },
  3596. {
  3597. macro = "MMA745X_IRQ1_PORT",
  3598. brief = "INT1/DRDY Port",
  3599. description = "Port for interrupt 1 / data ready signal.",
  3600. type = "enumerated",
  3601. choices = function() return GetGpioPortIds() end,
  3602. flavor = "integer",
  3603. file = "include/cfg/mma745x.h"
  3604. },
  3605. {
  3606. macro = "MMA745X_IRQ1_PIN",
  3607. brief = "INT1/DRDY Pin",
  3608. description = "Pin for interrupt 1 / data ready signal.",
  3609. type = "enumerated",
  3610. choices = function() return GetGpioBits() end,
  3611. flavor = "integer",
  3612. file = "include/cfg/mma745x.h"
  3613. },
  3614. {
  3615. macro = "MMA745X_IRQ2_PORT",
  3616. brief = "INT2 Port",
  3617. description = "Port for interrupt 2 signal.",
  3618. type = "enumerated",
  3619. choices = function() return GetGpioPortIds() end,
  3620. flavor = "integer",
  3621. file = "include/cfg/mma745x.h"
  3622. },
  3623. {
  3624. macro = "MMA745X_IRQ2_PIN",
  3625. brief = "INT2 Pin",
  3626. description = "Pin for interrupt 2 signal.",
  3627. type = "enumerated",
  3628. choices = function() return GetGpioBits() end,
  3629. flavor = "integer",
  3630. file = "include/cfg/mma745x.h"
  3631. },
  3632. }
  3633. },
  3634. {
  3635. name = "nutdev_pca9555",
  3636. brief = "PCA9555 Driver",
  3637. description = "Philips PCA9555 I/O expander. Uses TwMasterRegRead(), which is "..
  3638. "currently available on AT91 hardware TWI only.",
  3639. provides = { "DEV_IOEXP" },
  3640. requires = { "HW_TWI_AT91", "HW_MCU_AT91" },
  3641. sources = { "pca9555.c" },
  3642. options =
  3643. {
  3644. {
  3645. macro = "I2C_SLA_IOEXP",
  3646. brief = "Slave Address",
  3647. description = "PCA9555 slave address (0x20..0x27)",
  3648. type = "enumerated",
  3649. flavor = "integer",
  3650. default = "0x23",
  3651. file = "include/cfg/pca9555.h"
  3652. },
  3653. {
  3654. macro = "IOEXP_IRQ_PORT",
  3655. brief = "Interrupt Port",
  3656. description = "Port for interrupt",
  3657. type = "enumerated",
  3658. choices = function() return GetGpioPortIds() end,
  3659. flavor = "integer",
  3660. file = "include/cfg/pca9555.h"
  3661. },
  3662. {
  3663. macro = "IOEXP_IRQ_PIN",
  3664. brief = "Interrupt Pin",
  3665. description = "Port for Interrupty",
  3666. type = "enumerated",
  3667. choices = function() return GetGpioBits() end,
  3668. flavor = "integer",
  3669. file = "include/cfg/pca9555.h"
  3670. },
  3671. },
  3672. },
  3673. {
  3674. name = "led",
  3675. brief = "LED Driver",
  3676. description = "Provides controlling of LEDs connected to GPIO.\n"..
  3677. "In addition with a PCA9555 I2C IO-Expander a special range of GPIO Ports\n"..
  3678. "can be used to address LEDs connected to this chip instead of CPU's GPIOs",
  3679. provides = { "DEV_LED" },
  3680. sources = { "led.c" },
  3681. options =
  3682. {
  3683. {
  3684. macro = "LED_SUPPORT_IOEXP",
  3685. brief = "LEDs on external GPIOs",
  3686. description = "Enable control of LEDs connected to an external GPIO expanders "..
  3687. "like PCA9555.",
  3688. type = "enumerated",
  3689. flavor = "boolean",
  3690. requires = { "DEV_IOEXP" },
  3691. file = "include/cfg/pca9555.h",
  3692. },
  3693. {
  3694. macro = "LED_ON_HIGH",
  3695. brief = "LEDs On on GPIO is high",
  3696. description = "Enable this option if the LEDs are on on a logic 1 level of the port pin.",
  3697. flavor = "boolean",
  3698. requires = { "DEV_LED" },
  3699. file = "include/cfg/led.h",
  3700. },
  3701. },
  3702. },
  3703. {
  3704. name = "keys",
  3705. brief = "Key Driver",
  3706. description = "Provides controlling of keys / pushbuttons and switches connected to GPIO.\n"..
  3707. "In addition with a PCA9555 I2C IO-Expander a special range of GPIO Ports\n"..
  3708. "can be used to address keys connected to this chip instead of CPU's GPIOs",
  3709. provides = { "DEV_KEY" },
  3710. sources = { "keys.c" },
  3711. options =
  3712. {
  3713. {
  3714. macro = "KEY_SUPPORT_IOEXP",
  3715. brief = "Keys on external GPIOs",
  3716. description = "Enable control of Keys connected to an external GPIO expanders "..
  3717. "like PCA9555.",
  3718. type = "enumerated",
  3719. flavor = "boolean",
  3720. requires = { "DEV_IOEXP" },
  3721. file = "include/cfg/pca9555.h",
  3722. },
  3723. },
  3724. },
  3725. {
  3726. name = "nutdev_vs10xx",
  3727. brief = "VS10XX Audio Decoder",
  3728. description = "Tested with Medianut 2 attached to Ethernut 3.\n\n"..
  3729. "In the current implementation this file may conflict with "..
  3730. "the previous VS1001K driver. For now add this to your "..
  3731. "application's Makefile. ",
  3732. sources = { "vs10xx.c" },
  3733. requires = { "DEV_SPI", "HW_GPIOxx" },
  3734. options =
  3735. {
  3736. {
  3737. macro = "VS10XX_FREQ",
  3738. brief = "Crystal Clock Frequency",
  3739. description = "Frequency of the crystal clock in Hz.\n\n"..
  3740. "The clock doubler will be enabled if this value is "..
  3741. "lower than 20,000,000 Hz.",
  3742. default = "12288000",
  3743. file = "include/cfg/audio.h"
  3744. },
  3745. {
  3746. macro = "VS10XX_SCI_SPI0_DEVICE",
  3747. brief = "Command Hardware SPI (AVR)",
  3748. description = "Hardware SPI 0 device index (chip select) used for command channel.\n\n"..
  3749. "Specify device index 0, 1, 2 or 3.\n\n"..
  3750. "Currently supported on the AVR platform only.",
  3751. requires = { "HW_MCU_AVR" },
  3752. flavor = "booldata",
  3753. exclusivity =
  3754. {
  3755. "VS10XX_SCI_SPI0_DEVICE",
  3756. "VS10XX_SCI_SBBI0_DEVICE",
  3757. "VS10XX_SCI_SBBI1_DEVICE",
  3758. "VS10XX_SCI_SBBI2_DEVICE",
  3759. "VS10XX_SCI_SBBI3_DEVICE"
  3760. },
  3761. file = "include/cfg/audio.h"
  3762. },
  3763. {
  3764. macro = "VS10XX_SCI_SBBI0_DEVICE",
  3765. brief = "Command Software SPI0",
  3766. description = "Software SPI 0 device index (chip select) used for command channel.\n\n"..
  3767. "Specify device index 0, 1, 2 or 3.\n\n"..
  3768. "Currently supported on the AVR platform only.",
  3769. flavor = "booldata",
  3770. exclusivity =
  3771. {
  3772. "VS10XX_SCI_SPI0_DEVICE",
  3773. "VS10XX_SCI_SBBI0_DEVICE",
  3774. "VS10XX_SCI_SBBI1_DEVICE",
  3775. "VS10XX_SCI_SBBI2_DEVICE",
  3776. "VS10XX_SCI_SBBI3_DEVICE"
  3777. },
  3778. file = "include/cfg/audio.h"
  3779. },
  3780. {
  3781. macro = "VS10XX_SCI_SBBI1_DEVICE",
  3782. brief = "Command Software SPI1",
  3783. description = "Software SPI 1 device index (chip select) used for command channel.\n\n"..
  3784. "Specify device index 0, 1, 2 or 3.\n\n"..
  3785. "Currently supported on the AVR platform only.",
  3786. flavor = "booldata",
  3787. exclusivity =
  3788. {
  3789. "VS10XX_SCI_SPI0_DEVICE",
  3790. "VS10XX_SCI_SBBI0_DEVICE",
  3791. "VS10XX_SCI_SBBI1_DEVICE",
  3792. "VS10XX_SCI_SBBI2_DEVICE",
  3793. "VS10XX_SCI_SBBI3_DEVICE"
  3794. },
  3795. file = "include/cfg/audio.h"
  3796. },
  3797. {
  3798. macro = "VS10XX_SCI_SBBI2_DEVICE",
  3799. brief = "Command Software SPI2",
  3800. description = "Software SPI 2 device index (chip select) used for command channel.\n\n"..
  3801. "Specify device index 0, 1, 2 or 3.\n\n"..
  3802. "Currently supported on the AVR platform only.",
  3803. flavor = "booldata",
  3804. exclusivity =
  3805. {
  3806. "VS10XX_SCI_SPI0_DEVICE",
  3807. "VS10XX_SCI_SBBI0_DEVICE",
  3808. "VS10XX_SCI_SBBI1_DEVICE",
  3809. "VS10XX_SCI_SBBI2_DEVICE",
  3810. "VS10XX_SCI_SBBI3_DEVICE"
  3811. },
  3812. file = "include/cfg/audio.h"
  3813. },
  3814. {
  3815. macro = "VS10XX_SCI_SBBI3_DEVICE",
  3816. brief = "Command Software SPI3",
  3817. description = "Software SPI 3 device index (chip select) used for command channel.\n\n"..
  3818. "Specify device index 0, 1, 2 or 3.\n\n"..
  3819. "Currently supported on the AVR platform only.",
  3820. flavor = "booldata",
  3821. exclusivity =
  3822. {
  3823. "VS10XX_SCI_SPI0_DEVICE",
  3824. "VS10XX_SCI_SBBI0_DEVICE",
  3825. "VS10XX_SCI_SBBI1_DEVICE",
  3826. "VS10XX_SCI_SBBI2_DEVICE",
  3827. "VS10XX_SCI_SBBI3_DEVICE"
  3828. },
  3829. file = "include/cfg/audio.h"
  3830. },
  3831. {
  3832. macro = "VS10XX_SCI_MODE",
  3833. brief = "Command SPI Mode",
  3834. description = "SPI mode of command channel, 0 is default.\n\n"..
  3835. "Mode 0: Leading edge is rising, data sampled on rising edge.\n"..
  3836. "Mode 1: Leading edge is rising, data sampled on falling edge.\n"..
  3837. "Mode 2: Leading edge is falling, data sampled on falling edge.\n"..
  3838. "Mode 3: Leading edge is falling, data sampled on rising edge.\n",
  3839. type = "integer",
  3840. default = "0",
  3841. file = "include/cfg/audio.h"
  3842. },
  3843. {
  3844. macro = "VS10XX_SCI_RATE",
  3845. brief = "Command SPI Bitrate",
  3846. description = "Interface speed in bits per second, default is VS10XX_FREQ/4.\n\n"..
  3847. "If the exact value can't be set, the driver will choose the "..
  3848. "next lower one. Bit banging interfaces always run at maximum speed.",
  3849. file = "include/cfg/audio.h"
  3850. },
  3851. {
  3852. macro = "VS10XX_SDI_SPI0_DEVICE",
  3853. brief = "Data Hardware SPI (AVR)",
  3854. description = "Use hardware SPI for data channel.\n\n"..
  3855. "Currently supported on the AVR platform only.",
  3856. requires = { "HW_MCU_AVR" },
  3857. flavor = "booldata",
  3858. exclusivity =
  3859. {
  3860. "VS10XX_SDI_SPI0_DEVICE",
  3861. "VS10XX_SDI_SBBI0_DEVICE",
  3862. "VS10XX_SDI_SBBI1_DEVICE",
  3863. "VS10XX_SDI_SBBI2_DEVICE",
  3864. "VS10XX_SDI_SBBI3_DEVICE"
  3865. },
  3866. file = "include/cfg/audio.h"
  3867. },
  3868. {
  3869. macro = "VS10XX_SDI_SBBI0_DEVICE",
  3870. brief = "Data Software SPI0",
  3871. description = "Use software SPI 0 for data channel.",
  3872. flavor = "booldata",
  3873. exclusivity =
  3874. {
  3875. "VS10XX_SDI_SPI0_DEVICE",
  3876. "VS10XX_SDI_SBBI0_DEVICE",
  3877. "VS10XX_SDI_SBBI1_DEVICE",
  3878. "VS10XX_SDI_SBBI2_DEVICE",
  3879. "VS10XX_SDI_SBBI3_DEVICE"
  3880. },
  3881. file = "include/cfg/audio.h"
  3882. },
  3883. {
  3884. macro = "VS10XX_SDI_SBBI1_DEVICE",
  3885. brief = "Data Software SPI1",
  3886. description = "Use software SPI 1 for data channel.",
  3887. flavor = "booldata",
  3888. exclusivity =
  3889. {
  3890. "VS10XX_SDI_SPI0_DEVICE",
  3891. "VS10XX_SDI_SBBI0_DEVICE",
  3892. "VS10XX_SDI_SBBI1_DEVICE",
  3893. "VS10XX_SDI_SBBI2_DEVICE",
  3894. "VS10XX_SDI_SBBI3_DEVICE"
  3895. },
  3896. file = "include/cfg/audio.h"
  3897. },
  3898. {
  3899. macro = "VS10XX_SDI_SBBI2_DEVICE",
  3900. brief = "Data Software SPI2",
  3901. description = "Use software SPI 2 for data channel.",
  3902. flavor = "booldata",
  3903. exclusivity =
  3904. {
  3905. "VS10XX_SDI_SPI0_DEVICE",
  3906. "VS10XX_SDI_SBBI0_DEVICE",
  3907. "VS10XX_SDI_SBBI1_DEVICE",
  3908. "VS10XX_SDI_SBBI2_DEVICE",
  3909. "VS10XX_SDI_SBBI3_DEVICE"
  3910. },
  3911. file = "include/cfg/audio.h"
  3912. },
  3913. {
  3914. macro = "VS10XX_SDI_SBBI3_DEVICE",
  3915. brief = "Data Software SPI3",
  3916. description = "Use software SPI 3 for data channel.",
  3917. flavor = "booldata",
  3918. exclusivity =
  3919. {
  3920. "VS10XX_SDI_SPI0_DEVICE",
  3921. "VS10XX_SDI_SBBI0_DEVICE",
  3922. "VS10XX_SDI_SBBI1_DEVICE",
  3923. "VS10XX_SDI_SBBI2_DEVICE",
  3924. "VS10XX_SDI_SBBI3_DEVICE"
  3925. },
  3926. file = "include/cfg/audio.h"
  3927. },
  3928. {
  3929. macro = "VS10XX_SDI_MODE",
  3930. brief = "Data SPI Mode",
  3931. description = "SPI mode of data channel, 0 is default.\n\n"..
  3932. "Mode 0: Leading edge is rising, data sampled on rising edge.\n"..
  3933. "Mode 1: Leading edge is rising, data sampled on falling edge.\n"..
  3934. "Mode 2: Leading edge is falling, data sampled on falling edge.\n"..
  3935. "Mode 3: Leading edge is falling, data sampled on rising edge.\n",
  3936. type = "integer",
  3937. default = "0",
  3938. file = "include/cfg/audio.h"
  3939. },
  3940. {
  3941. macro = "VS10XX_SDI_RATE",
  3942. brief = "Data SPI Bitrate",
  3943. description = "Interface speed in bits per second, default is VS10XX_FREQ/4.\n\n"..
  3944. "If the exact value can't be set, the driver will choose the "..
  3945. "next lower one. Bit banging interfaces always run at maximum speed.",
  3946. file = "include/cfg/audio.h"
  3947. },
  3948. {
  3949. macro = "VS10XX_SELECT_ACTIVE_HIGH",
  3950. brief = "Active High Chip Select",
  3951. description = "Select this option if the chip select is active high.",
  3952. flavor = "boolean",
  3953. file = "include/cfg/audio.h"
  3954. },
  3955. {
  3956. macro = "VS10XX_RESET_ACTIVE_HIGH",
  3957. brief = "Active High Reset",
  3958. description = "Select this option if the reset is active high.",
  3959. flavor = "boolean",
  3960. file = "include/cfg/audio.h"
  3961. },
  3962. {
  3963. macro = "VS10XX_SIGNAL_IRQ",
  3964. brief = "Decoder Interrupt",
  3965. description = "Audio decoder interrupt, default is INT0.",
  3966. default = "INT0",
  3967. type = "enumerated",
  3968. choices = avr_irq_choice,
  3969. file = function() return GetGpioHeaderPath() end
  3970. },
  3971. {
  3972. macro = "VS10XX_DREQ_PIO_ID",
  3973. brief = "DREQ GPIO Port ID (AT91)",
  3974. description = "ID of the port used for VS10XX DREQ.\n\n"..
  3975. "Must correspond with the selected interrupt input.",
  3976. requires = { "HW_MCU_AT91" },
  3977. type = "enumerated",
  3978. choices = at91_pio_id_choice,
  3979. flavor = "integer",
  3980. file = "include/cfg/arch/armpio.h"
  3981. },
  3982. {
  3983. macro = "VS10XX_DREQ_BIT",
  3984. brief = "DREQ GPIO Bit (AT91)",
  3985. description = "Port bit used for VS10XX DREQ.\n\n"..
  3986. "Must correspond with the selected interrupt input.",
  3987. requires = { "HW_MCU_AT91" },
  3988. type = "enumerated",
  3989. choices = mcu_32bit_choice,
  3990. flavor = "integer",
  3991. file = "include/cfg/arch/armpio.h"
  3992. },
  3993. {
  3994. macro = "VS10XX_XCS_PORT",
  3995. brief = "XCS Port",
  3996. description = "ID of the port used for VS10XX XCS.",
  3997. type = "enumerated",
  3998. choices = function() return GetGpioPortIds() end,
  3999. flavor = "integer",
  4000. file = function() return GetGpioHeaderPath() end
  4001. },
  4002. {
  4003. macro = "VS10XX_XCS_BIT",
  4004. brief = "XCS Port Bit",
  4005. description = "Port bit used for VS10XX XCS.",
  4006. type = "enumerated",
  4007. choices = function() return GetGpioBits() end,
  4008. flavor = "integer",
  4009. file = function() return GetGpioHeaderPath() end
  4010. },
  4011. {
  4012. macro = "VS10XX_XDCS_PORT",
  4013. brief = "XDCS Port",
  4014. description = "ID of the port used for VS10XX XDCS.",
  4015. type = "enumerated",
  4016. choices = function() return GetGpioPortIds() end,
  4017. flavor = "integer",
  4018. file = function() return GetGpioHeaderPath() end
  4019. },
  4020. {
  4021. macro = "VS10XX_XDCS_BIT",
  4022. brief = "XDCS Port Bit",
  4023. description = "Port bit used for VS10XX XDCS.",
  4024. type = "enumerated",
  4025. choices = function() return GetGpioBits() end,
  4026. flavor = "integer",
  4027. file = function() return GetGpioHeaderPath() end
  4028. },
  4029. {
  4030. macro = "VS10XX_BSYNC_PORT",
  4031. brief = "BSYNC Port",
  4032. description = "ID of the port used for optional VS10XX BSYNC.",
  4033. type = "enumerated",
  4034. choices = function() return GetGpioPortIds() end,
  4035. flavor = "integer",
  4036. file = function() return GetGpioHeaderPath() end
  4037. },
  4038. {
  4039. macro = "VS10XX_BSYNC_BIT",
  4040. brief = "BSYNC Port Bit",
  4041. description = "Port bit used for optional VS10XX BSYNC.\n\n"..
  4042. "Required for the VS1001. Other decoders are driven "..
  4043. "in VS1001 mode, if this bit is defined. However, "..
  4044. "it is recommended to use this option for the VS1001 "..
  4045. "only and run newer chips in so called VS1002 native mode.",
  4046. type = "enumerated",
  4047. choices = function() return GetGpioBits() end,
  4048. flavor = "integer",
  4049. file = function() return GetGpioHeaderPath() end
  4050. },
  4051. {
  4052. macro = "VS10XX_HWRST_DURATION",
  4053. brief = "Hardware Reset Duration",
  4054. description = "Minimum time in milliseconds to held hardware reset low.",
  4055. default = "1",
  4056. flavor = "integer",
  4057. file = "include/cfg/audio.h"
  4058. },
  4059. {
  4060. macro = "VS10XX_HWRST_RECOVER",
  4061. brief = "Hardware Reset Recover",
  4062. description = "Milliseconds to wait after hardware reset.",
  4063. default = "5",
  4064. flavor = "integer",
  4065. file = "include/cfg/audio.h"
  4066. },
  4067. {
  4068. macro = "VS10XX_SWRST_RECOVER",
  4069. brief = "Software Reset Recover",
  4070. description = "Milliseconds to wait after software reset.",
  4071. default = "5",
  4072. flavor = "integer",
  4073. file = "include/cfg/audio.h"
  4074. },
  4075. },
  4076. },
  4077. {
  4078. name = "nutdev_jtag_tap",
  4079. brief = "JTAG TAP Controller",
  4080. sources = { "jtag_tap.c" },
  4081. requires = { "DEV_JTAG_CABLE" },
  4082. options =
  4083. {
  4084. {
  4085. macro = "JTAG0_CLOCK_RATE",
  4086. brief = "Cable 0 Clock Rate",
  4087. description = "Maximum TCK frequency in Hertz.",
  4088. file = "include/cfg/progif.h"
  4089. },
  4090. }
  4091. },
  4092. {
  4093. name = "nutdev_jtag_gpio",
  4094. brief = "JTAG GPIO Cable Driver 0",
  4095. sources = { "jtag_gpio0.c" },
  4096. provides = { "DEV_JTAG_CABLE" },
  4097. options =
  4098. {
  4099. {
  4100. macro = "JTAG0_TDO_PIO_ID",
  4101. brief = "TDO Port",
  4102. description = "Port ID of the TDO input.\n",
  4103. type = "enumerated",
  4104. choices = function() return GetGpioPortIds() end,
  4105. flavor = "integer",
  4106. file = function() return GetGpioHeaderPath() end
  4107. },
  4108. {
  4109. macro = "JTAG0_TDO_PIO_BIT",
  4110. brief = "TDO Bit",
  4111. description = "Port bit number of the TDO input.\n",
  4112. type = "enumerated",
  4113. choices = function() return GetGpioBits() end,
  4114. flavor = "integer",
  4115. file = function() return GetGpioHeaderPath() end
  4116. },
  4117. {
  4118. macro = "JTAG0_TDI_PIO_ID",
  4119. brief = "TDI Port",
  4120. description = "Port ID of the TDI output.\n",
  4121. type = "enumerated",
  4122. choices = function() return GetGpioPortIds() end,
  4123. flavor = "integer",
  4124. file = function() return GetGpioHeaderPath() end
  4125. },
  4126. {
  4127. macro = "JTAG0_TDI_PIO_BIT",
  4128. brief = "TDI Bit",
  4129. description = "Port bit number of the TDI output.\n",
  4130. type = "enumerated",
  4131. choices = function() return GetGpioBits() end,
  4132. flavor = "integer",
  4133. file = function() return GetGpioHeaderPath() end
  4134. },
  4135. {
  4136. macro = "JTAG0_TMS_PIO_ID",
  4137. brief = "TMS Port",
  4138. description = "Port ID of the TMS output.\n",
  4139. type = "enumerated",
  4140. choices = function() return GetGpioPortIds() end,
  4141. flavor = "integer",
  4142. file = function() return GetGpioHeaderPath() end
  4143. },
  4144. {
  4145. macro = "JTAG0_TMS_PIO_BIT",
  4146. brief = "TMS Bit",
  4147. description = "Port bit number of the TMS output.\n",
  4148. type = "enumerated",
  4149. choices = function() return GetGpioBits() end,
  4150. flavor = "integer",
  4151. file = function() return GetGpioHeaderPath() end
  4152. },
  4153. {
  4154. macro = "JTAG0_TCK_PIO_ID",
  4155. brief = "TCK Port",
  4156. description = "Port ID of the TCK output.\n",
  4157. type = "enumerated",
  4158. choices = function() return GetGpioPortIds() end,
  4159. flavor = "integer",
  4160. file = function() return GetGpioHeaderPath() end
  4161. },
  4162. {
  4163. macro = "JTAG0_TCK_PIO_BIT",
  4164. brief = "TCK Bit",
  4165. description = "Port bit number of the TCK output.\n",
  4166. type = "enumerated",
  4167. choices = function() return GetGpioBits() end,
  4168. flavor = "integer",
  4169. file = function() return GetGpioHeaderPath() end
  4170. },
  4171. }
  4172. },
  4173. {
  4174. name = "nutdev_avrtarget",
  4175. brief = "AVR Serial Programming",
  4176. description = "Routines for programming AVR targets via SPI.\n",
  4177. provides = { "DEV_SPI" },
  4178. sources = { "avrtarget.c" },
  4179. options =
  4180. {
  4181. {
  4182. macro = "AVRTARGET_PAGESIZE",
  4183. brief = "Program Flash Page Size",
  4184. description = "Specify the number of bytes.\n\n"..
  4185. "Later we will determine this automatically.",
  4186. type = "integer",
  4187. default = "128",
  4188. file = "include/cfg/progif.h"
  4189. },
  4190. {
  4191. macro = "AVRTARGET_CHIPERASE_TIMEOUT",
  4192. brief = "Chip Erase Timeout",
  4193. description = "Specify the number of milliseconds.\n\n"..
  4194. "Later we will determine this automatically.",
  4195. type = "integer",
  4196. default = "200",
  4197. file = "include/cfg/progif.h"
  4198. },
  4199. {
  4200. macro = "AVRTARGET_PAGEWRITE_TIMEOUT",
  4201. brief = "Page Write Timeout",
  4202. description = "Specify the number of milliseconds.\n\n"..
  4203. "Later we will determine this automatically.",
  4204. type = "integer",
  4205. default = "10",
  4206. file = "include/cfg/progif.h"
  4207. },
  4208. {
  4209. macro = "AVRTARGET_SPI0_DEVICE",
  4210. brief = "Polled Hardware SPI0 Device (AVR)",
  4211. description = "Use hardware SPI0 for programming.\n\n"..
  4212. "Specify device index 0, 1, 2 or 3.",
  4213. requires = { "HW_MCU_AVR" },
  4214. flavor = "booldata",
  4215. exclusivity =
  4216. {
  4217. "AVRTARGET_SPI",
  4218. "AVRTARGET_SBBI0",
  4219. "AVRTARGET_SBBI1",
  4220. "AVRTARGET_SBBI2",
  4221. "AVRTARGET_SBBI3"
  4222. },
  4223. file = "include/cfg/progif.h"
  4224. },
  4225. {
  4226. macro = "AVRTARGET_SBBI0_DEVICE",
  4227. brief = "Software SPI0 Device",
  4228. description = "Use software SPI 0 for programming.\n\n"..
  4229. "Specify device index 0, 1, 2 or 3.",
  4230. flavor = "booldata",
  4231. exclusivity =
  4232. {
  4233. "AVRTARGET_SPI",
  4234. "AVRTARGET_SBBI0",
  4235. "AVRTARGET_SBBI1",
  4236. "AVRTARGET_SBBI2",
  4237. "AVRTARGET_SBBI3"
  4238. },
  4239. file = "include/cfg/progif.h"
  4240. },
  4241. {
  4242. macro = "AVRTARGET_SBBI1_DEVICE",
  4243. brief = "Software SPI1 Device",
  4244. description = "Use software SPI 1 for programming.\n\n"..
  4245. "Specify device index 0, 1, 2 or 3.",
  4246. flavor = "booldata",
  4247. exclusivity =
  4248. {
  4249. "AVRTARGET_SPI",
  4250. "AVRTARGET_SBBI0",
  4251. "AVRTARGET_SBBI1",
  4252. "AVRTARGET_SBBI2",
  4253. "AVRTARGET_SBBI3"
  4254. },
  4255. file = "include/cfg/progif.h"
  4256. },
  4257. {
  4258. macro = "AVRTARGET_SBBI2_DEVICE",
  4259. brief = "Software SPI2 Device",
  4260. description = "Use software SPI 2 for programming.\n\n"..
  4261. "Specify device index 0, 1, 2 or 3.",
  4262. flavor = "booldata",
  4263. exclusivity =
  4264. {
  4265. "AVRTARGET_SPI",
  4266. "AVRTARGET_SBBI0",
  4267. "AVRTARGET_SBBI1",
  4268. "AVRTARGET_SBBI2",
  4269. "AVRTARGET_SBBI3"
  4270. },
  4271. file = "include/cfg/progif.h"
  4272. },
  4273. {
  4274. macro = "AVRTARGET_SBBI3_DEVICE",
  4275. brief = "Software SPI3 Device",
  4276. description = "Use software SPI 3 for programming.\n\n"..
  4277. "Specify device index 0, 1, 2 or 3.",
  4278. flavor = "booldata",
  4279. exclusivity =
  4280. {
  4281. "AVRTARGET_SPI",
  4282. "AVRTARGET_SBBI0",
  4283. "AVRTARGET_SBBI1",
  4284. "AVRTARGET_SBBI2",
  4285. "AVRTARGET_SBBI3"
  4286. },
  4287. file = "include/cfg/progif.h"
  4288. },
  4289. {
  4290. macro = "AVRTARGET_SELECT_ACTIVE_HIGH",
  4291. brief = "Active High Chip Select",
  4292. description = "Select this option if the chip select is active high.",
  4293. flavor = "boolean",
  4294. file = "include/cfg/progif.h"
  4295. },
  4296. {
  4297. macro = "AVRTARGET_RESET_ACTIVE_HIGH",
  4298. brief = "Active High Reset",
  4299. description = "Select this option if the reset is active high.",
  4300. flavor = "boolean",
  4301. file = "include/cfg/progif.h"
  4302. },
  4303. {
  4304. macro = "AVRTARGET_SPI_MODE",
  4305. brief = "SPI Mode",
  4306. description = "SPI mode, 0 is default.\n\n"..
  4307. "Mode 0: Leading edge is rising, data sampled on rising edge.\n"..
  4308. "Mode 1: Leading edge is rising, data sampled on falling edge.\n"..
  4309. "Mode 2: Leading edge is falling, data sampled on falling edge.\n"..
  4310. "Mode 3: Leading edge is falling, data sampled on rising edge.\n",
  4311. type = "integer",
  4312. default = "0",
  4313. file = "include/cfg/progif.h"
  4314. },
  4315. {
  4316. macro = "AVRTARGET_SPI_RATE",
  4317. brief = "SPI Bitrate",
  4318. description = "Interface speed in bits per second, default is 100000.\n\n"..
  4319. "If the exact value can't be set, the driver will choose the "..
  4320. "next lower one. Bit banging interfaces always run at maximum speed.",
  4321. default = "100000",
  4322. file = "include/cfg/progif.h"
  4323. },
  4324. },
  4325. },
  4326. {
  4327. name = "nutdev_nvmem_at45d",
  4328. brief = "AT45D Non-Volatile Memory",
  4329. description = "DataFlash chips and cards may be used to store any kind of configuration "..
  4330. "data, including internal Nut/OS and Nut/Net settings.\n\n"..
  4331. "This new module will replace existing ones, which either depend "..
  4332. "on specific target CPUs or which may interfere with other SPI devices.",
  4333. sources = { "nvmem_at45d.c" }
  4334. },
  4335. {
  4336. name = "nutdev_at45db",
  4337. brief = "AT45DB Serial DataFlash Memory",
  4338. description = "Supports multiple chips.\n\n"..
  4339. "Tested with AT91SAM9260-EK.",
  4340. sources = { "at45db.c" },
  4341. requires = { "HW_MCU_AT91", "HW_SPI_AT91" },
  4342. options =
  4343. {
  4344. {
  4345. macro = "MAX_AT45_DEVICES",
  4346. brief = "Number of Chips",
  4347. description = "Maximum number of chips, which can be used concurrently.",
  4348. default = "1",
  4349. file = "include/cfg/memory.h"
  4350. },
  4351. {
  4352. macro = "AT45_ERASE_WAIT",
  4353. brief = "Max. Page Erase Wait Time",
  4354. description = "Maximum number of milliseconds to wait until the chip "..
  4355. "becomes ready again after a sector erase command.",
  4356. default = "3000",
  4357. file = "include/cfg/memory.h"
  4358. },
  4359. {
  4360. macro = "AT45_CHIP_ERASE_WAIT",
  4361. brief = "Max. Chip Erase Wait Time",
  4362. description = "Maximum number of milliseconds to wait until the chip "..
  4363. "becomes ready again after a chip erase command.",
  4364. default = "50000",
  4365. file = "include/cfg/memory.h"
  4366. },
  4367. {
  4368. macro = "AT45_WRITE_POLLS",
  4369. brief = "Max. Write Poll Number",
  4370. description = "Maximum number of polling loops for page write.",
  4371. default = "1000",
  4372. file = "include/cfg/memory.h"
  4373. },
  4374. },
  4375. },
  4376. {
  4377. name = "nutdev_at49bv",
  4378. brief = "AT49BV Flash Memory",
  4379. description = "Currently supports a single chip only.\n\n"..
  4380. "Tested with AT49BV322A and AT49BV002A.",
  4381. sources = { "at49bv.c" },
  4382. options =
  4383. {
  4384. {
  4385. macro = "FLASH_CHIP_BASE",
  4386. brief = "Base Address",
  4387. description = "First memory address of the chip.",
  4388. default = "0x10000000",
  4389. file = "include/cfg/memory.h"
  4390. },
  4391. {
  4392. macro = "FLASH_8BIT",
  4393. brief = "8-Bit Flash",
  4394. description = "If enabled, flash is driven in 8-bit mode. "..
  4395. "By default Nut/OS supports 16-bit flash.",
  4396. flavor = "boolean",
  4397. file = "include/cfg/memory.h"
  4398. },
  4399. {
  4400. macro = "FLASH_ERASE_WAIT",
  4401. brief = "Max. Sector Erase Wait Time",
  4402. description = "Maximum number of milliseconds to wait until the chip "..
  4403. "becomes ready again after a sector erase command.",
  4404. default = "3000",
  4405. file = "include/cfg/memory.h"
  4406. },
  4407. {
  4408. macro = "FLASH_CHIP_ERASE_WAIT",
  4409. brief = "Max. Chip Erase Wait Time",
  4410. description = "Maximum number of milliseconds to wait until the chip "..
  4411. "becomes ready again after a chip erase command.",
  4412. default = "50000",
  4413. file = "include/cfg/memory.h"
  4414. },
  4415. {
  4416. macro = "FLASH_WRITE_POLLS",
  4417. brief = "Max. Write Poll Number",
  4418. description = "Maximum number of polling loops for a byte/word write.",
  4419. default = "1000",
  4420. file = "include/cfg/memory.h"
  4421. },
  4422. },
  4423. },
  4424. {
  4425. name = "nutdev_cy2239x",
  4426. brief = "CY2239x Driver",
  4427. description = "Cypress CY22393/4/5 PLL clock. Tested on AT91 only.",
  4428. requires = { "HW_MCU_AT91" },
  4429. provides = { "DEV_PLL" },
  4430. sources = { "cy2239x.c" },
  4431. options =
  4432. {
  4433. {
  4434. macro = "NUT_PLL_FREF",
  4435. brief = "Reference Clock",
  4436. description = "Frequency of the PLL reference clock in Hz. If enabled and "..
  4437. "if NUT_CPU_FREQ is not defined, this value will be used to "..
  4438. "determine the CPU clock as well.",
  4439. flavor = "booldata",
  4440. file = "include/cfg/os.h"
  4441. },
  4442. {
  4443. macro = "NUT_PLL_CPUCLK",
  4444. brief = "CPU Clock Output",
  4445. description = "PLL output used for the CPU Clock\n\n"..
  4446. "If an output is selected and if NUT_CPU_FREQ is not defined, "..
  4447. "then the CPU Clock Value will be queried from the PLL Clock "..
  4448. "Chip.\n\n"..
  4449. "Select\n"..
  4450. "0 for for the CLKA Pin\n"..
  4451. "1 for for the CLKB Pin (Ethernut 3.0 Rev-E)\n"..
  4452. "2 for for the CLKC Pin (Ethernut 3.0 Rev-D)\n"..
  4453. "3 for for the CLKD Pin\n"..
  4454. "4 for for the CLKE Pin",
  4455. type = "enumerated",
  4456. choices = pll_clk_choice,
  4457. file = "include/cfg/clock.h"
  4458. },
  4459. {
  4460. macro = "NUT_PLL_ETHCLK",
  4461. brief = "Ethernet Clock Output",
  4462. description = "PLL output used to drive the Ethernet Controller\n\n"..
  4463. "Select\n"..
  4464. "0 for for the CLKA Pin (Ethernut 3.0 Rev-D)\n"..
  4465. "1 for for the CLKB Pin\n"..
  4466. "2 for for the CLKC Pin (Ethernut 3.0 Rev-E)\n"..
  4467. "3 for for the CLKD Pin\n"..
  4468. "4 for for the CLKE Pin",
  4469. type = "enumerated",
  4470. choices = pll_clk_choice,
  4471. file = "include/cfg/clock.h"
  4472. },
  4473. {
  4474. macro = "NUT_PLL_NPLCLK1",
  4475. brief = "NPL Clock 1 Output",
  4476. description = "PLL output connected to the CPLD GCK1 Pin\n\n"..
  4477. "Select\n"..
  4478. "0 for for the CLKA Pin (Ethernut 3.0 Rev-E)\n"..
  4479. "1 for for the CLKB Pin (Ethernut 3.0 Rev-D)\n"..
  4480. "2 for for the CLKC Pin\n"..
  4481. "3 for for the CLKD Pin\n"..
  4482. "4 for for the CLKE Pin",
  4483. type = "enumerated",
  4484. choices = pll_clk_choice,
  4485. file = "include/cfg/clock.h"
  4486. },
  4487. {
  4488. macro = "NUT_PLL_NPLCLK3",
  4489. brief = "NPL Clock 3 Output",
  4490. description = "PLL output connected to the CPLD GCK3 Pin\n\n"..
  4491. "Select\n"..
  4492. "0 for for the CLKA Pin\n"..
  4493. "1 for for the CLKB Pin\n"..
  4494. "2 for for the CLKC Pin\n"..
  4495. "3 for for the CLKD Pin (Ethernut 3.0)\n"..
  4496. "4 for for the CLKE Pin",
  4497. type = "enumerated",
  4498. choices = pll_clk_choice,
  4499. file = "include/cfg/clock.h"
  4500. }
  4501. }
  4502. },
  4503. {
  4504. name = "nutdev_npl",
  4505. brief = "Nut Programmable Logic",
  4506. description = "CPLD interrupt handling.\n"..
  4507. "The CPLD on the Ethernut 3 reference design monitors "..
  4508. "a number of status lines and activates IRQ0 on certain "..
  4509. "status changes. This includes RS232 handshake inputs, "..
  4510. "multimedia card detection, RTC alarms and LAN wakeup. "..
  4511. "Tested on AT91 only.",
  4512. requires = { "DEV_IRQ_AT91" },
  4513. provides = { "DEV_NPL" },
  4514. sources = { "npl.c" },
  4515. },
  4516. {
  4517. name = "nutdev_nplmmc",
  4518. brief = "NPL Multimedia Card Access",
  4519. description = "CPLD implementation of a low level MMC interface.\n\n"..
  4520. "This early driver doesn't support SPI bus sharing and "..
  4521. "has been replaced by the SPI bus driver.\n\n"..
  4522. "Tested on AT91 only.",
  4523. requires = { "DEV_NPL" },
  4524. provides = { "DEV_MMCLL" },
  4525. sources = { "nplmmc.c" },
  4526. },
  4527. {
  4528. name = "nutdev_spi_mmc_npl",
  4529. brief = "NPL Multimedia Card Support",
  4530. description = "CPLD implementation of MMC support.\n\n"..
  4531. "This package provides additional routines, which "..
  4532. "are needed when using MultiMedia Cards with an SPI "..
  4533. "bus driver. Main functions are card change detection "..
  4534. "and write SD Card write protect switch sensing.\n\n",
  4535. "Tested on AT91 only.",
  4536. requires = { "DEV_NPL" },
  4537. provides = { "DEV_MMCSUPPORT" },
  4538. sources = { "spi_mmc_npl.c" },
  4539. options =
  4540. {
  4541. {
  4542. macro = "NPL_MMC0_ULED",
  4543. brief = "LED Indicator",
  4544. description = "If enabled, the NPL user LED will be used to "..
  4545. "inidcate card access.",
  4546. flavor = "boolean",
  4547. file = "include/cfg/mmci.h"
  4548. }
  4549. }
  4550. },
  4551. {
  4552. name = "nutdev_npluled",
  4553. brief = "NPL User (green) LED Access",
  4554. description = "CPLD implementation of a user (green) LED interface. "..
  4555. "Tested on AT91 only.",
  4556. requires = { "DEV_NPL" },
  4557. provides = { "DEV_NPLULED" },
  4558. sources = { "npluled.c" },
  4559. },
  4560. {
  4561. name = "nutdev_sbi0mmc",
  4562. brief = "MMC Software SPI 0 Driver",
  4563. description = "Bit banging implementation of a low level MMC interface. "..
  4564. "Tested on AT91 only, but should work on most targets.",
  4565. requires = { "HW_GPIO" },
  4566. provides = { "DEV_MMCLL" },
  4567. sources = { "sbi0mmc0.c", "sbi0mmc1.c" },
  4568. options =
  4569. {
  4570. {
  4571. macro = "MMC0_CLK_PIO_ID",
  4572. brief = "Clock Port",
  4573. description = "Port ID of the clock line.\n"..
  4574. "SD-Card Pin 5, CLK",
  4575. type = "enumerated",
  4576. choices = function() return GetGpioPortIds() end,
  4577. flavor = "integer",
  4578. file = function() return GetGpioHeaderPath() end
  4579. },
  4580. {
  4581. macro = "MMC0_CLK_PIO_BIT",
  4582. brief = "Clock Bit",
  4583. description = "Port bit number of the clock line.\n"..
  4584. "SD-Card Pin 5, CLK",
  4585. type = "enumerated",
  4586. choices = function() return GetGpioBits() end,
  4587. flavor = "integer",
  4588. file = function() return GetGpioHeaderPath() end
  4589. },
  4590. {
  4591. macro = "MMC0_MOSI_PIO_ID",
  4592. brief = "MOSI Port",
  4593. description = "Port ID of the MOSI line.\n"..
  4594. "SD-Card Pin 2, CMD",
  4595. type = "enumerated",
  4596. choices = function() return GetGpioPortIds() end,
  4597. flavor = "integer",
  4598. file = function() return GetGpioHeaderPath() end
  4599. },
  4600. {
  4601. macro = "MMC0_MOSI_PIO_BIT",
  4602. brief = "MOSI Bit",
  4603. description = "Port bit number of the MOSI line.\n"..
  4604. "SD-Card Pin 2, CMD",
  4605. type = "enumerated",
  4606. choices = function() return GetGpioBits() end,
  4607. flavor = "integer",
  4608. file = function() return GetGpioHeaderPath() end
  4609. },
  4610. {
  4611. macro = "MMC0_MISO_PIO_ID",
  4612. brief = "MISO Port",
  4613. description = "Port ID of the MISO line.\n"..
  4614. "SD-Card Pin 7, DAT0",
  4615. type = "enumerated",
  4616. choices = function() return GetGpioPortIds() end,
  4617. flavor = "integer",
  4618. file = function() return GetGpioHeaderPath() end
  4619. },
  4620. {
  4621. macro = "MMC0_MISO_PIO_BIT",
  4622. brief = "MISO Bit",
  4623. description = "Port bit number of the MISO line.\n"..
  4624. "SD-Card Pin 7, DAT0",
  4625. type = "enumerated",
  4626. choices = function() return GetGpioBits() end,
  4627. flavor = "integer",
  4628. file = function() return GetGpioHeaderPath() end
  4629. },
  4630. {
  4631. macro = "MMC0_CS0_PIO_ID",
  4632. brief = "Card 0 Select Port",
  4633. description = "Port ID of the first card select line.\n"..
  4634. "SD-Card Pin 1, DAT3",
  4635. type = "enumerated",
  4636. choices = function() return GetGpioPortIds() end,
  4637. flavor = "integer",
  4638. file = function() return GetGpioHeaderPath() end
  4639. },
  4640. {
  4641. macro = "MMC0_CS0_PIO_BIT",
  4642. brief = "Card 0 Select Bit",
  4643. description = "Port bit number of the first card select line.\n"..
  4644. "SD-Card Pin 1, DAT3",
  4645. type = "enumerated",
  4646. choices = function() return GetGpioBits() end,
  4647. flavor = "integer",
  4648. file = function() return GetGpioHeaderPath() end
  4649. },
  4650. {
  4651. macro = "MMC0_CD0_PIO_ID",
  4652. brief = "Card 0 Detect Port",
  4653. description = "Port ID of the first card's detect line.\n"..
  4654. "Must use an external interrupt pin. If left "..
  4655. "empty, then card change detection is disabled.",
  4656. type = "enumerated",
  4657. choices = function() return GetGpioPortIds() end,
  4658. flavor = "integer",
  4659. file = function() return GetGpioHeaderPath() end
  4660. },
  4661. {
  4662. macro = "MMC0_CD0_PIO_BIT",
  4663. brief = "Card 0 Detect Bit",
  4664. description = "Port bit number of the first card's detect line.\n"..
  4665. "Must use an external interrupt pin. If left "..
  4666. "empty, then card change detection is disabled.",
  4667. type = "enumerated",
  4668. choices = function() return GetGpioBits() end,
  4669. flavor = "integer",
  4670. file = function() return GetGpioHeaderPath() end
  4671. },
  4672. {
  4673. macro = "MMC0_WP0_PIO_ID",
  4674. brief = "Card 0 Write Protect Port",
  4675. description = "Port ID of the first card's write protect line.\n"..
  4676. "Currently ignored.",
  4677. type = "enumerated",
  4678. choices = function() return GetGpioPortIds() end,
  4679. flavor = "integer",
  4680. file = function() return GetGpioHeaderPath() end
  4681. },
  4682. {
  4683. macro = "MMC0_WP0_PIO_BIT",
  4684. brief = "Card 0 Write Protect Bit",
  4685. description = "Port bit number of the first card's write protect line.\n"..
  4686. "Currently ignored.",
  4687. type = "enumerated",
  4688. choices = function() return GetGpioBits() end,
  4689. flavor = "integer",
  4690. file = function() return GetGpioHeaderPath() end
  4691. },
  4692. {
  4693. macro = "MMC0_CS1_PIO_ID",
  4694. brief = "Card 1 Select Port",
  4695. description = "Port ID of the second card select line.\n"..
  4696. "SD-Card Pin 1, DAT3",
  4697. type = "enumerated",
  4698. choices = function() return GetGpioPortIds() end,
  4699. flavor = "integer",
  4700. file = function() return GetGpioHeaderPath() end
  4701. },
  4702. {
  4703. macro = "MMC0_CS1_PIO_BIT",
  4704. brief = "Card 1 Select Bit",
  4705. description = "Port bit number of the second card select line.\n"..
  4706. "SD-Card Pin 1, DAT3",
  4707. type = "enumerated",
  4708. choices = function() return GetGpioBits() end,
  4709. flavor = "integer",
  4710. file = function() return GetGpioHeaderPath() end
  4711. },
  4712. {
  4713. macro = "MMC0_CD1_PIO_ID",
  4714. brief = "Card 1 Detect Port",
  4715. description = "Port ID of the second card's detect line.\n"..
  4716. "Must use an external interrupt pin. If left "..
  4717. "empty, then card change detection is disabled.",
  4718. type = "enumerated",
  4719. choices = function() return GetGpioPortIds() end,
  4720. flavor = "integer",
  4721. file = function() return GetGpioHeaderPath() end
  4722. },
  4723. {
  4724. macro = "MMC0_CD1_PIO_BIT",
  4725. brief = "Card 1 Detect Bit",
  4726. description = "Port bit number of the second card's detect line.\n"..
  4727. "Must use an external interrupt pin. If left "..
  4728. "empty, then card change detection is disabled.",
  4729. type = "enumerated",
  4730. choices = function() return GetGpioBits() end,
  4731. flavor = "integer",
  4732. file = function() return GetGpioHeaderPath() end
  4733. },
  4734. {
  4735. macro = "MMC0_WP1_PIO_ID",
  4736. brief = "Card 1 Write Protect Port",
  4737. description = "Port ID of the second card's write protect line.\n"..
  4738. "Currently ignored.",
  4739. type = "enumerated",
  4740. choices = function() return GetGpioPortIds() end,
  4741. flavor = "integer",
  4742. file = function() return GetGpioHeaderPath() end
  4743. },
  4744. {
  4745. macro = "MMC0_WP1_PIO_BIT",
  4746. brief = "Card 1 Write Protect Bit",
  4747. description = "Port bit number of the second card's write protect line.\n"..
  4748. "Currently ignored.",
  4749. type = "enumerated",
  4750. choices = function() return GetGpioBits() end,
  4751. flavor = "integer",
  4752. file = function() return GetGpioHeaderPath() end
  4753. },
  4754. },
  4755. },
  4756. {
  4757. name = "nutdev_sbi1mmc",
  4758. brief = "MMC Software SPI 1 Driver",
  4759. description = "Bit banging implementation of a low level MMC interface. "..
  4760. "Tested on AT91 only, but should work on most targets.",
  4761. requires = { "HW_GPIO" },
  4762. provides = { "DEV_MMCLL" },
  4763. sources = { "sbi1mmc0.c", "sbi1mmc1.c" },
  4764. options =
  4765. {
  4766. {
  4767. macro = "MMC1_CLK_PIO_ID",
  4768. brief = "Clock Port",
  4769. description = "Port ID of the clock line.\n"..
  4770. "SD-Card Pin 5, CLK",
  4771. type = "enumerated",
  4772. choices = function() return GetGpioPortIds() end,
  4773. flavor = "integer",
  4774. file = function() return GetGpioHeaderPath() end
  4775. },
  4776. {
  4777. macro = "MMC1_CLK_PIO_BIT",
  4778. brief = "Clock Bit",
  4779. description = "Port bit number of the clock line.\n"..
  4780. "SD-Card Pin 5, CLK",
  4781. type = "enumerated",
  4782. choices = function() return GetGpioBits() end,
  4783. flavor = "integer",
  4784. file = function() return GetGpioHeaderPath() end
  4785. },
  4786. {
  4787. macro = "MMC1_MOSI_PIO_ID",
  4788. brief = "MOSI Port",
  4789. description = "Port ID of the MOSI line.\n"..
  4790. "SD-Card Pin 2, CMD",
  4791. type = "enumerated",
  4792. choices = function() return GetGpioPortIds() end,
  4793. flavor = "integer",
  4794. file = function() return GetGpioHeaderPath() end
  4795. },
  4796. {
  4797. macro = "MMC1_MOSI_PIO_BIT",
  4798. brief = "MOSI Bit",
  4799. description = "Port bit number of the MOSI line.\n"..
  4800. "SD-Card Pin 2, CMD",
  4801. type = "enumerated",
  4802. choices = function() return GetGpioBits() end,
  4803. flavor = "integer",
  4804. file = function() return GetGpioHeaderPath() end
  4805. },
  4806. {
  4807. macro = "MMC1_MISO_PIO_ID",
  4808. brief = "MISO Port",
  4809. description = "Port ID of the MISO line.\n"..
  4810. "SD-Card Pin 7, DAT0",
  4811. type = "enumerated",
  4812. choices = function() return GetGpioPortIds() end,
  4813. flavor = "integer",
  4814. file = function() return GetGpioHeaderPath() end
  4815. },
  4816. {
  4817. macro = "MMC1_MISO_PIO_BIT",
  4818. brief = "MISO Bit",
  4819. description = "Port bit number of the MISO line.\n"..
  4820. "SD-Card Pin 7, DAT0",
  4821. type = "enumerated",
  4822. choices = function() return GetGpioBits() end,
  4823. flavor = "integer",
  4824. file = function() return GetGpioHeaderPath() end
  4825. },
  4826. {
  4827. macro = "MMC1_CS0_PIO_ID",
  4828. brief = "Card 0 Select Port",
  4829. description = "Port ID of the first card select line.\n"..
  4830. "SD-Card Pin 1, DAT3",
  4831. type = "enumerated",
  4832. choices = function() return GetGpioPortIds() end,
  4833. flavor = "integer",
  4834. file = function() return GetGpioHeaderPath() end
  4835. },
  4836. {
  4837. macro = "MMC1_CS0_PIO_BIT",
  4838. brief = "Card 0 Select Bit",
  4839. description = "Port bit number of the first card select line.\n"..
  4840. "SD-Card Pin 1, DAT3",
  4841. type = "enumerated",
  4842. choices = function() return GetGpioBits() end,
  4843. flavor = "integer",
  4844. file = function() return GetGpioHeaderPath() end
  4845. },
  4846. {
  4847. macro = "MMC1_CD0_PIO_ID",
  4848. brief = "Card 0 Detect Port",
  4849. description = "Port ID of the first card's detect line.\n"..
  4850. "Must use an external interrupt pin. If left "..
  4851. "empty, then card change detection is disabled.",
  4852. type = "enumerated",
  4853. choices = function() return GetGpioPortIds() end,
  4854. flavor = "integer",
  4855. file = function() return GetGpioHeaderPath() end
  4856. },
  4857. {
  4858. macro = "MMC1_CD0_PIO_BIT",
  4859. brief = "Card 0 Detect Bit",
  4860. description = "Port bit number of the first card's detect line.\n"..
  4861. "Must use an external interrupt pin. If left "..
  4862. "empty, then card change detection is disabled.",
  4863. type = "enumerated",
  4864. choices = function() return GetGpioBits() end,
  4865. flavor = "integer",
  4866. file = function() return GetGpioHeaderPath() end
  4867. },
  4868. {
  4869. macro = "MMC1_WP0_PIO_ID",
  4870. brief = "Card 0 Write Protect Port",
  4871. description = "Port ID of the first card's write protect line.\n"..
  4872. "Currently ignored.",
  4873. type = "enumerated",
  4874. choices = function() return GetGpioPortIds() end,
  4875. flavor = "integer",
  4876. file = function() return GetGpioHeaderPath() end
  4877. },
  4878. {
  4879. macro = "MMC1_WP0_PIO_BIT",
  4880. brief = "Card 0 Write Protect Bit",
  4881. description = "Port bit number of the first card's write protect line.\n"..
  4882. "Currently ignored.",
  4883. type = "enumerated",
  4884. choices = function() return GetGpioBits() end,
  4885. flavor = "integer",
  4886. file = function() return GetGpioHeaderPath() end
  4887. },
  4888. {
  4889. macro = "MMC1_CS1_PIO_ID",
  4890. brief = "Card 1 Select Port",
  4891. description = "Port ID of the second card select line.\n"..
  4892. "SD-Card Pin 1, DAT3",
  4893. type = "enumerated",
  4894. choices = function() return GetGpioPortIds() end,
  4895. flavor = "integer",
  4896. file = function() return GetGpioHeaderPath() end
  4897. },
  4898. {
  4899. macro = "MMC1_CS1_PIO_BIT",
  4900. brief = "Card 1 Select Bit",
  4901. description = "Port bit number of the second card select line.\n"..
  4902. "SD-Card Pin 1, DAT3",
  4903. type = "enumerated",
  4904. choices = function() return GetGpioBits() end,
  4905. flavor = "integer",
  4906. file = function() return GetGpioHeaderPath() end
  4907. },
  4908. {
  4909. macro = "MMC1_CD1_PIO_ID",
  4910. brief = "Card 1 Detect Port",
  4911. description = "Port ID of the second card's detect line.\n"..
  4912. "Must use an external interrupt pin. If left "..
  4913. "empty, then card change detection is disabled.",
  4914. type = "enumerated",
  4915. choices = function() return GetGpioPortIds() end,
  4916. flavor = "integer",
  4917. file = function() return GetGpioHeaderPath() end
  4918. },
  4919. {
  4920. macro = "MMC1_CD1_PIO_BIT",
  4921. brief = "Card 1 Detect Bit",
  4922. description = "Port bit number of the second card's detect line.\n"..
  4923. "Must use an external interrupt pin. If left "..
  4924. "empty, then card change detection is disabled.",
  4925. type = "enumerated",
  4926. choices = function() return GetGpioBits() end,
  4927. flavor = "integer",
  4928. file = function() return GetGpioHeaderPath() end
  4929. },
  4930. {
  4931. macro = "MMC1_WP1_PIO_ID",
  4932. brief = "Card 1 Write Protect Port",
  4933. description = "Port ID of the second card's write protect line.\n"..
  4934. "Currently ignored.",
  4935. type = "enumerated",
  4936. choices = function() return GetGpioPortIds() end,
  4937. flavor = "integer",
  4938. file = function() return GetGpioHeaderPath() end
  4939. },
  4940. {
  4941. macro = "MMC1_WP1_PIO_BIT",
  4942. brief = "Card 1 Write Protect Bit",
  4943. description = "Port bit number of the second card's write protect line.\n"..
  4944. "Currently ignored.",
  4945. type = "enumerated",
  4946. choices = function() return GetGpioBits() end,
  4947. flavor = "integer",
  4948. file = function() return GetGpioHeaderPath() end
  4949. },
  4950. },
  4951. },
  4952. {
  4953. name = "nutdev_sbimmc",
  4954. brief = "Bit Banging Multimedia Card Access",
  4955. description = "Old driver, use the one above!\n\n"..
  4956. "Bit banging implementation of a low level MMC interface. "..
  4957. "Tested on AT91 only.",
  4958. requires = { "HW_GPIO", "HW_MCU_AT91R40008" },
  4959. provides = { "DEV_MMCLL" },
  4960. sources = { "sbimmc.c" },
  4961. options =
  4962. {
  4963. {
  4964. macro = "SPI0_CS_BIT",
  4965. brief = "SPI0 Chip Select (AT91)",
  4966. description = "Bit number of the chip select line.\n"..
  4967. "SD-Card Pin 1, DAT3",
  4968. requires = { "HW_MCU_AT91" },
  4969. type = "enumerated",
  4970. choices = mcu_32bit_choice,
  4971. file = "include/cfg/arch/armpio.h"
  4972. },
  4973. {
  4974. macro = "SPI0_CLK_BIT",
  4975. brief = "SPI0 Clock (AT91)",
  4976. description = "Bit number of the clock line.\n"..
  4977. "SD-Card Pin 5, CLK",
  4978. requires = { "HW_MCU_AT91" },
  4979. type = "enumerated",
  4980. choices = mcu_32bit_choice,
  4981. file = "include/cfg/arch/armpio.h"
  4982. },
  4983. {
  4984. macro = "SPI0_MOSI_BIT",
  4985. brief = "SPI0 MOSI (AT91)",
  4986. description = "Bit number of the MOSI line.\n"..
  4987. "SD-Card Pin 2, CMD",
  4988. requires = { "HW_MCU_AT91" },
  4989. type = "enumerated",
  4990. choices = mcu_32bit_choice,
  4991. file = "include/cfg/arch/armpio.h"
  4992. },
  4993. {
  4994. macro = "SPI0_MISO_BIT",
  4995. brief = "SPI0 MISO (AT91)",
  4996. description = "Bit number of the MISO line.\n"..
  4997. "SD-Card Pin 7, DAT0",
  4998. requires = { "HW_MCU_AT91" },
  4999. type = "enumerated",
  5000. choices = mcu_32bit_choice,
  5001. file = "include/cfg/arch/armpio.h"
  5002. },
  5003. {
  5004. macro = "MMC0_CD_BIT",
  5005. brief = "MMC0 Card Detect (AT91)",
  5006. description = "Bit number of the card detect line.\n"..
  5007. "Must use an external interrupt pin. If left "..
  5008. "empty, then card change detection is disabled.",
  5009. requires = { "HW_MCU_AT91" },
  5010. type = "enumerated",
  5011. choices = mcu_32bit_choice,
  5012. file = "include/cfg/arch/armpio.h"
  5013. },
  5014. {
  5015. macro = "MMC0_WP_BIT",
  5016. brief = "MMC0 Write Protect (AT91)",
  5017. description = "Bit number of the write protect line.\n"..
  5018. "Currently ignored.",
  5019. requires = { "HW_MCU_AT91" },
  5020. type = "enumerated",
  5021. choices = mcu_32bit_choice,
  5022. file = "include/cfg/arch/armpio.h"
  5023. },
  5024. {
  5025. macro = "SPI0_PORT",
  5026. brief = "SPI0 Port (AVR)",
  5027. description = "Port register name, AVRPORTB by default.",
  5028. requires = { "HW_MCU_AVR" },
  5029. type = "enumerated",
  5030. choices = avr_port_choice,
  5031. file = "include/cfg/arch/avrpio.h"
  5032. },
  5033. {
  5034. macro = "SPI0_CS_BIT",
  5035. brief = "SPI0 Chip Select (AVR)",
  5036. description = "Bit number of the chip select line.",
  5037. requires = { "HW_MCU_AVR" },
  5038. type = "enumerated",
  5039. choices = avr_bit_choice,
  5040. file = "include/cfg/arch/avrpio.h"
  5041. },
  5042. {
  5043. macro = "SPI0_CLK_BIT",
  5044. brief = "SPI0 Clock (AVR)",
  5045. description = "Bit number of the clock line.",
  5046. requires = { "HW_MCU_AVR" },
  5047. type = "enumerated",
  5048. choices = avr_bit_choice,
  5049. file = "include/cfg/arch/avrpio.h"
  5050. },
  5051. {
  5052. macro = "SPI0_MOSI_BIT",
  5053. brief = "SPI0 MOSI (AVR)",
  5054. description = "Bit number of the MOSI line.",
  5055. requires = { "HW_MCU_AVR" },
  5056. type = "enumerated",
  5057. choices = avr_bit_choice,
  5058. file = "include/cfg/arch/avrpio.h"
  5059. },
  5060. {
  5061. macro = "SPI0_MISO_BIT",
  5062. brief = "SPI0 MISO (AVR)",
  5063. description = "Bit number of the MISO line.",
  5064. requires = { "HW_MCU_AVR" },
  5065. type = "enumerated",
  5066. choices = avr_bit_choice,
  5067. file = "include/cfg/arch/avrpio.h"
  5068. },
  5069. },
  5070. },
  5071. --
  5072. -- WAN Drivers.
  5073. --
  5074. {
  5075. name = "nutdev_ppp_hdlc",
  5076. brief = "PPP HDLC Driver",
  5077. requires = { "DEV_UART_GENERIC", "NUT_TIMER" },
  5078. provides = { "PROTO_HDLC" },
  5079. sources = { "ppp_hdlc.c" }
  5080. },
  5081. {
  5082. name = "nutdev_ppp",
  5083. brief = "PPP Driver",
  5084. requires = { "PROTO_HDLC", "NUT_TIMER", "PROTO_HDLC" },
  5085. provides = { "NET_MAC" },
  5086. sources = { "ppp.c" }
  5087. },
  5088. {
  5089. name = "nutdev_flash",
  5090. brief = "Flash self programming",
  5091. description = "Portable interface for flash self programming supplied" ..
  5092. "by platform",
  5093. options =
  5094. {
  5095. {
  5096. macro = "IAP_FLASH",
  5097. brief = "Platform flash self programming",
  5098. description = "Portable IAP flash programming interface.",
  5099. type = "integer",
  5100. default = "1",
  5101. requires = { "HW_FLASH" },
  5102. file= "include/cfg/memory.h"
  5103. }
  5104. },
  5105. },
  5106. --
  5107. -- Disabled components.
  5108. --
  5109. {
  5110. name = "nutdev_spiflash_avr",
  5111. brief = "SPI Flashing (AVR)",
  5112. sources = { "spiflash.c" },
  5113. requires = { "NOT_AVAILABLE" }
  5114. },
  5115. {
  5116. name = "nutdev_3_7SEG",
  5117. brief = "3x7 segment driver",
  5118. description = "3x7 segment driver with SPI",
  5119. sources = { "spi_7seg.c" },
  5120. options =
  5121. {
  5122. {
  5123. macro = "SEG7_SPI_RATE",
  5124. brief = "SPI Transfer Rate",
  5125. description = "Interface speed in bits per second, default is 4000000 (4Mbps).\n\n"..
  5126. "If the exact value can't be set, the driver will choose the "..
  5127. "next lower one. Bit banging interfaces always run at maximum speed.",
  5128. default = "4000000",
  5129. file = "include/cfg/spi_7seg.h"
  5130. },
  5131. {
  5132. macro = "SEG7_DIGITS",
  5133. brief = "Number of Digits",
  5134. description = "Select Number of Digits connected to the AS110x chain.",
  5135. type = "integer",
  5136. default = "4",
  5137. file = "include/cfg/spi_7seg.h"
  5138. },
  5139. {
  5140. macro = "SEG7_REVERSE",
  5141. brief = "Reverse Digits",
  5142. description = "Select if Digits are connected reverse ( for upside down mounting).",
  5143. flavor = "boolean",
  5144. file = "include/cfg/spi_7seg.h"
  5145. },
  5146. },
  5147. },
  5148. }