avr.nut 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863
  1. --
  2. -- Copyright (C) 2004-2005 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. -- AVR Architecture
  33. --
  34. -- $Log$
  35. -- Revision 1.29 2009/02/06 15:37:40 haraldkipp
  36. -- Added stack space multiplier and addend. Adjusted stack space.
  37. --
  38. -- Revision 1.28 2009/02/04 23:40:52 hwmaier
  39. -- Added support for a receive buffer size configuration entry ATCAN_RX_BUF_SIZE.
  40. --
  41. -- Revision 1.27 2009/01/18 16:46:18 haraldkipp
  42. -- Properly distinguish between PIO IDs and port numbers.
  43. -- Call internal Lua functions when needed only.
  44. --
  45. -- Revision 1.26 2009/01/09 17:54:21 haraldkipp
  46. -- Added SPI bus controller for AVR and AT91.
  47. --
  48. -- Revision 1.25 2008/09/02 14:29:01 haraldkipp
  49. -- Disabled the old vs1001k driver.
  50. --
  51. -- Revision 1.24 2008/08/11 11:51:19 thiagocorrea
  52. -- Preliminary Atmega2560 compile options, but not yet supported.
  53. -- It builds, but doesn't seam to run properly at this time.
  54. --
  55. -- Revision 1.23 2008/07/19 02:54:52 thiagocorrea
  56. -- * conf/arch/avr.nut: Fix LCD size configuration for AVR.
  57. -- Previously, LCD Bus config settings would be used instead
  58. -- of the actual LCD Driver config settings.
  59. --
  60. -- Revision 1.22 2008/06/16 13:02:50 haraldkipp
  61. -- Temporarily removed wlandrv.c from build due to GCC 4.3 warnings.
  62. --
  63. -- Revision 1.21 2008/04/29 16:58:21 thiagocorrea
  64. -- Simplified HD44780 code for AVR based on the ARM driver.
  65. --
  66. -- Revision 1.20 2008/04/29 02:28:34 thiagocorrea
  67. -- Add configurable DTR pin to AVR USART driver.
  68. --
  69. -- Revision 1.19 2008/01/31 09:22:32 haraldkipp
  70. -- Added first version of platform independent GPIO routines. Consider the
  71. -- AVR version untested.
  72. --
  73. -- Revision 1.18 2007/10/05 23:47:50 olereinhardt
  74. -- Added a missin colon :-)
  75. --
  76. -- Revision 1.17 2007/10/04 19:32:52 olereinhardt
  77. -- SJA_BASE (base address for sja1000 driver) can now be set in configurator
  78. --
  79. -- Revision 1.16 2007/09/11 13:40:37 haraldkipp
  80. -- Typo corrected.
  81. --
  82. -- Revision 1.15 2007/04/12 09:07:54 haraldkipp
  83. -- Configurable SPI added.
  84. --
  85. -- Revision 1.14 2007/01/18 15:37:54 thiagocorrea
  86. -- Fixed macro for enabling CTS on the second USART port from the nutconf program
  87. --
  88. -- Revision 1.13 2006/10/08 16:40:17 haraldkipp
  89. -- Many thanks to Thiago Correa for adding LCD port configuration.
  90. --
  91. -- Revision 1.12 2006/10/05 17:16:04 haraldkipp
  92. -- Added exclusivity attribute.
  93. --
  94. -- Revision 1.11 2006/05/25 09:27:42 haraldkipp
  95. -- Watchdog API for AVR added.
  96. --
  97. -- Revision 1.10 2006/03/02 23:56:53 hwmaier
  98. -- NUT_THREAD_NICRXSTACK entry added
  99. --
  100. -- Revision 1.9 2006/02/08 15:20:22 haraldkipp
  101. -- ATmega2561 Support
  102. --
  103. -- Revision 1.8 2006/01/23 17:28:30 haraldkipp
  104. -- HW_NVMEM is now provided by specific modules.
  105. --
  106. -- Revision 1.7 2005/11/24 11:26:33 haraldkipp
  107. -- Added TLC16C550 driver.
  108. --
  109. -- Revision 1.6 2005/11/22 16:42:39 haraldkipp
  110. -- ICCAVR fixed. Re-enabled AHDLC and old UART driver.
  111. --
  112. -- Revision 1.5 2005/11/20 14:43:11 haraldkipp
  113. -- AHDLC driver and deprecated AVR UART driver temporarely removed from ICCAVR
  114. -- build. Will look into this later.
  115. --
  116. -- Revision 1.4 2005/10/24 11:14:07 haraldkipp
  117. -- NUT_CPU_FREQ option removed. This is handled in os.nut.
  118. --
  119. -- Revision 1.3 2005/10/04 05:51:49 hwmaier
  120. -- Added CAN driver for AT90CAN128
  121. --
  122. -- Revision 1.2 2005/09/17 09:28:26 drsung
  123. -- Added irqstack.c to sources for avr target.
  124. --
  125. -- Revision 1.1 2005/07/26 15:41:06 haraldkipp
  126. -- All target dependent code is has been moved to a new library named
  127. -- libnutarch. Each platform got its own script.
  128. --
  129. --
  130. nutarch_avr =
  131. {
  132. --
  133. -- Runtime Initialization
  134. --
  135. {
  136. name = "nutarch_avr_cstartup_icc",
  137. brief = "ICCAVR Startup",
  138. description = "There are five different ICCAVR startup files available.\n\n"..
  139. "crtnut.s, if globals and static variables use less than 4kB.\n"..
  140. "crtenut.s, same as above but including EEPROM emulation.\n"..
  141. "crtnutram.s, if globals and static variables use more than 4kB.\n"..
  142. "crtenutram.s, same as above but including EEPROM emulation.\n\n"..
  143. "crtnutm256.s, for the ATmega2560 and ATmega2561.\n\n"..
  144. "Ethernut 1.3 Rev-G boards require EEPROM emulation.",
  145. sources =
  146. {
  147. "avr/init/crtnut.s",
  148. "avr/init/crtnutram.s",
  149. "avr/init/crtenut.s",
  150. "avr/init/crtenutram.s",
  151. "avr/init/crtnutm256.s"
  152. },
  153. targets =
  154. {
  155. "avr/init/crtnut.o",
  156. "avr/init/crtnutram.o",
  157. "avr/init/crtenut.o",
  158. "avr/init/crtenutram.o",
  159. "avr/init/crtnutm256.o"
  160. },
  161. requires = { "TOOL_CC_AVR", "TOOL_ICC" },
  162. },
  163. --
  164. -- Board Initialization
  165. --
  166. {
  167. name = "nutarch_avr_bs",
  168. brief = "Board Support",
  169. sources =
  170. function()
  171. return { "avr/board/"..string.lower(c_macro_edit("PLATFORM"))..".c" };
  172. end,
  173. requires = { "HW_BOARD_SUPPORT" },
  174. },
  175. --
  176. -- Context Switching
  177. --
  178. {
  179. name = "nutarch_avr_context_gcc",
  180. brief = "Context Switching (AVRGCC)",
  181. provides = { "NUT_CONTEXT_SWITCH" },
  182. requires = { "HW_MCU_AVR", "TOOL_GCC" },
  183. sources = { "avr/os/context_gcc.c" },
  184. },
  185. {
  186. name = "nutarch_avr_context_icc",
  187. brief = "Context Switching (ICCAVR)",
  188. provides = { "NUT_CONTEXT_SWITCH" },
  189. requires = { "HW_MCU_AVR", "TOOL_ICC" },
  190. sources = { "avr/os/context_icc.c" },
  191. },
  192. --
  193. -- System Timer Hardware
  194. --
  195. {
  196. name = "nutarch_avr_ostimer",
  197. brief = "System Timer",
  198. requires = { "HW_MCU_AVR" },
  199. provides = { "NUT_OSTIMER_DEV" },
  200. sources = { "avr/dev/ostimer.c" },
  201. },
  202. {
  203. name = "nutarch_avr_wdt",
  204. brief = "Watchdog Timer (AVR)",
  205. requires = { "HW_MCU_AVR" },
  206. sources = { "avr/dev/wdt_avr.c" },
  207. },
  208. --
  209. -- AVR interrupt handling.
  210. --
  211. {
  212. name = "nutarch_avr_irq",
  213. brief = "Interrupt Handler",
  214. requires = { "HW_MCU_AVR" },
  215. provides = { "DEV_IRQ_AVR" },
  216. sources =
  217. {
  218. "avr/dev/ih_adc.c",
  219. "avr/dev/ih_analog_comp.c",
  220. "avr/dev/ih_canit.c",
  221. "avr/dev/ih_ee_ready.c",
  222. "avr/dev/ih_int0.c",
  223. "avr/dev/ih_int1.c",
  224. "avr/dev/ih_int2.c",
  225. "avr/dev/ih_int3.c",
  226. "avr/dev/ih_int4.c",
  227. "avr/dev/ih_int5.c",
  228. "avr/dev/ih_int6.c",
  229. "avr/dev/ih_int7.c",
  230. "avr/dev/ih_ovrit.c",
  231. "avr/dev/ih_spi_stc.c",
  232. "avr/dev/ih_spm_ready.c",
  233. "avr/dev/ih_timer0_comp.c",
  234. "avr/dev/ih_timer0_ovf.c",
  235. "avr/dev/ih_timer1_capt.c",
  236. "avr/dev/ih_timer1_compa.c",
  237. "avr/dev/ih_timer1_compb.c",
  238. "avr/dev/ih_timer1_compc.c",
  239. "avr/dev/ih_timer1_ovf.c",
  240. "avr/dev/ih_timer2_comp.c",
  241. "avr/dev/ih_timer2_ovf.c",
  242. "avr/dev/ih_timer3_capt.c",
  243. "avr/dev/ih_timer3_compa.c",
  244. "avr/dev/ih_timer3_compb.c",
  245. "avr/dev/ih_timer3_compc.c",
  246. "avr/dev/ih_timer3_ovf.c",
  247. "avr/dev/ih_twi.c",
  248. "avr/dev/irqstack.c"
  249. },
  250. options =
  251. {
  252. {
  253. macro = "IRQSTACK_SIZE",
  254. brief = "Separate Stack",
  255. description = "If this option is enabled, Nut/OS will use a separate "..
  256. "stack of the specified size for interrupts.\n"..
  257. "If this option is disabled, make sure to reserve "..
  258. "additional stack space for each thread.\n\n"..
  259. "Available for AVR-GCC only.",
  260. requires = { "HW_MCU_AVR", "TOOL_GCC" },
  261. flavor = "booldata",
  262. file = "include/cfg/dev.h"
  263. },
  264. }
  265. },
  266. {
  267. name = "nutarch_avr_irq_uart0",
  268. brief = "UART0 Interrupts",
  269. description = "UART0 interrupts.",
  270. requires = { "HW_MCU_AVR", "HW_AVR_HAVE_UART0" },
  271. provides = { "DEV_IRQ_UART0" },
  272. sources = {
  273. "avr/dev/ih_usart0_rx.c",
  274. "avr/dev/ih_usart0_tx.c",
  275. "avr/dev/ih_usart0_udre.c"
  276. },
  277. },
  278. {
  279. name = "nutarch_avr_irq_uart1",
  280. brief = "UART1 Interrupts",
  281. description = "UART1 interrupts.",
  282. requires = { "HW_MCU_AVR", "HW_AVR_HAVE_UART1" },
  283. provides = { "DEV_IRQ_UART1" },
  284. sources = {
  285. "avr/dev/ih_usart1_rx.c",
  286. "avr/dev/ih_usart1_tx.c",
  287. "avr/dev/ih_usart1_udre.c"
  288. },
  289. },
  290. --
  291. -- Device Drivers
  292. --
  293. {
  294. name = "nutarch_avr_ahdlc_uart0",
  295. brief = "AHDLC Device0",
  296. description = "HDLC device0, required for HDLC/PPP.",
  297. requires = { "DEV_IRQ_UART0" },
  298. provides = { "PROTO_HDLC_DEV" },
  299. sources = { "avr/dev/ahdlc0.c"},
  300. },
  301. {
  302. name = "nutarch_avr_ahdlc_uart1",
  303. brief = "AHDLC Device1",
  304. description = "HDLC device1, required for HDLC/PPP.",
  305. requires = { "DEV_IRQ_UART1" },
  306. provides = { "PROTO_HDLC_DEV" },
  307. sources = { "avr/dev/ahdlc1.c"},
  308. },
  309. {
  310. name = "nutarch_avr_ahdlc",
  311. brief = "AHDLC Protocol",
  312. description = "HDLC driver, required for PPP.",
  313. requires = { "HW_UART_AVR", "NUT_EVENT", "PROTO_HDLC_DEV" },
  314. provides = { "PROTO_HDLC" },
  315. sources = { "avr/dev/ahdlcavr.c" },
  316. options =
  317. {
  318. {
  319. macro = "NUT_THREAD_AHDLCRXSTACK",
  320. brief = "Receiver Thread Stack",
  321. description = "Number of bytes to be allocated for the stack of the AHDLC receive thread.",
  322. default = "512",
  323. type = "integer",
  324. file = "include/cfg/ahdlc.h"
  325. }
  326. }
  327. },
  328. {
  329. name = "nutarch_avr_debug0",
  330. brief = "UART Debug Output",
  331. description = "This simple UART output driver uses polling instead of "..
  332. "interrupts and can be used within interrupt routines. It "..
  333. "is mainly used for debugging and tracing.\n\n"..
  334. "Call NutRegisterDevice(&devDebug0, 0, 0) for U(S)ART0"..
  335. "Then you can use any of the stdio functions to open "..
  336. "device uart0.",
  337. requires = { "HW_AVR_HAVE_UART0", "HW_UART_AVR" },
  338. provides = { "DEV_UART", "DEV_FILE", "DEV_WRITE" },
  339. sources = { "avr/dev/debug0.c" }
  340. },
  341. {
  342. name = "nutarch_avr_debug1",
  343. brief = "UART Debug Output",
  344. description = "This simple UART output driver uses polling instead of "..
  345. "interrupts and can be used within interrupt routines. It "..
  346. "is mainly used for debugging and tracing.\n\n"..
  347. "Call NutRegisterDevice(&devDebug1, 0, 0) for U(S)ART1. "..
  348. "Then you can use any of the stdio functions to open "..
  349. "device uart1 resp.",
  350. requires = { "HW_AVR_HAVE_UART1", "HW_UART_AVR" },
  351. provides = { "DEV_UART", "DEV_FILE", "DEV_WRITE" },
  352. sources = { "avr/dev/debug1.c" }
  353. },
  354. {
  355. name = "nutarch_avr_usartcb",
  356. brief = "USART Driver CB",
  357. description = "Experimental driver.",
  358. requires = { "HW_MCU_ATMEGA128", "NUT_EVENT" },
  359. provides = { "DEV_UART_CBRXTX", "DEV_UART_HWCTRL" },
  360. sources = {
  361. "avr/dev/usart_cb_avr.c",
  362. "avr/dev/usart0cb_avr.c",
  363. "avr/dev/usart1cb_avr.c"
  364. }
  365. },
  366. {
  367. name = "nutarch_avr_usart0",
  368. brief = "USART0 Driver",
  369. description = "Hardware specific USART driver. Implements hardware "..
  370. "functions for the generic driver framework.",
  371. requires = {
  372. "HW_MCU_AVR",
  373. "HW_AVR_HAVE_UART0",
  374. "DEV_IRQ_AVR",
  375. "DEV_UART_GENERIC",
  376. "NUT_EVENT",
  377. "CRT_HEAPMEM"
  378. },
  379. provides = { "DEV_UART_SPECIFIC" },
  380. sources = { "avr/dev/usart0avr.c" },
  381. -- options =
  382. -- {
  383. -- {
  384. -- macro = "UART0_RTS_BIT",
  385. -- brief = "RTS Bit",
  386. -- description = "Bit number of UART0 RTS handshake output. If enabled, "..
  387. -- "the driver provides RS 232 input hardware handshake.\n\n"..
  388. -- "Ethernut 2.x:\n"..
  389. -- "Short JP1 pins 4 and 6 to select bit 2 on PORTE.",
  390. -- provides = { "UART0_RTS_BIT" },
  391. -- flavor = "booldata",
  392. -- type = "enumerated",
  393. -- choices = avr_bit_choice,
  394. -- file = "include/cfg/arch/avrpio.h"
  395. -- },
  396. -- {
  397. -- macro = "UART0_RTS_AVRPORT",
  398. -- brief = "RTS Port",
  399. -- description = "Port register name of UART0 RTS handshake output.",
  400. -- requires = { "UART0_RTS_BIT" },
  401. -- type = "enumerated",
  402. -- choices = avr_port_choice,
  403. -- file = "include/cfg/arch/avrpio.h"
  404. -- },
  405. -- {
  406. -- macro = "UART0_CTS_IRQ",
  407. -- brief = "CTS Interrupt",
  408. -- description = "Interrupt number of UART0 CTS handshake input. If enabled, "..
  409. -- "the driver provides RS 232 output hardware handshake.\n\n"..
  410. -- "Ethernut 2.x:\n"..
  411. -- "Short JP1 pins 7 and 8 to select INT7.",
  412. -- flavor = "booldata",
  413. -- type = "enumerated",
  414. -- choices = avr_irq_choice,
  415. -- file = "include/cfg/arch/avrpio.h"
  416. -- },
  417. -- {
  418. -- macro = "UART0_DTR_BIT",
  419. -- brief = "DTR Bit",
  420. -- description = "Bit number of UART0 DTR handshake output. If enabled, "..
  421. -- "the driver provides RS 232 output hardware handshake.\n\n",
  422. -- provides = { "UART0_DTR_BIT" },
  423. -- flavor = "booldata",
  424. -- type = "enumerated",
  425. -- choices = avr_bit_choice,
  426. -- file = "include/cfg/arch/avrpio.h"
  427. -- },
  428. -- {
  429. -- macro = "UART0_DTR_AVRPORT",
  430. -- brief = "DTR Port",
  431. -- description = "Port register name of UART0 DTR handshake output.",
  432. -- requires = { "UART0_DTR_BIT" },
  433. -- type = "enumerated",
  434. -- choices = avr_port_choice,
  435. -- file = "include/cfg/arch/avrpio.h"
  436. -- },
  437. -- {
  438. -- macro = "UART0_HDX_BIT",
  439. -- brief = "Half Duplex Bit",
  440. -- description = "Bit number of UART0 half duplex control output. If enabled, "..
  441. -- "the driver provides RS 485 half duplex mode.",
  442. -- provides = { "UART0_HDX_BIT" },
  443. -- flavor = "booldata",
  444. -- type = "enumerated",
  445. -- choices = avr_bit_choice,
  446. -- file = "include/cfg/arch/avrpio.h"
  447. -- },
  448. -- {
  449. -- macro = "UART0_HDX_AVRPORT",
  450. -- brief = "Half Duplex Port",
  451. -- description = "Port register name of UART0 half duplex control output.",
  452. -- requires = { "UART0_HDX_BIT" },
  453. -- type = "enumerated",
  454. -- choices = avr_port_choice,
  455. -- file = "include/cfg/arch/avrpio.h"
  456. -- },
  457. -- }
  458. },
  459. {
  460. name = "nutarch_avr_usart1",
  461. brief = "USART1 Driver",
  462. description = "Hardware specific USART driver. Implements hardware "..
  463. "functions for the generic driver framework.",
  464. requires =
  465. {
  466. "HW_MCU_AVR",
  467. "HW_AVR_HAVE_UART1",
  468. "DEV_UART_GENERIC",
  469. "NUT_EVENT",
  470. "CRT_HEAPMEM"
  471. },
  472. provides = { "DEV_UART_SPECIFIC" },
  473. sources = { "avr/dev/usart1avr.c" },
  474. -- options =
  475. -- {
  476. -- {
  477. -- macro = "UART1_RTS_BIT",
  478. -- brief = "RTS Bit",
  479. -- description = "Bit number of UART1 RTS handshake output. If enabled, "..
  480. -- "the driver provides RS 232 input hardware handshake.\n\n"..
  481. -- "Ethernut 2.x:\n"..
  482. -- "Short JP1 pins 4 and 6 to select bit 2 on PORTE.",
  483. -- provides = { "UART1_RTS_BIT" },
  484. -- flavor = "booldata",
  485. -- type = "enumerated",
  486. -- choices = avr_bit_choice,
  487. -- file = "include/cfg/arch/avrpio.h"
  488. -- },
  489. -- {
  490. -- macro = "UART1_RTS_AVRPORT",
  491. -- brief = "RTS Port",
  492. -- description = "Port register name of UART1 RTS handshake output.",
  493. -- requires = { "UART1_RTS_BIT" },
  494. -- type = "enumerated",
  495. -- choices = avr_port_choice,
  496. -- file = "include/cfg/arch/avrpio.h"
  497. -- },
  498. -- {
  499. -- macro = "UART1_CTS_IRQ",
  500. -- brief = "CTS Interrupt",
  501. -- description = "Interrupt number of UART1 CTS handshake input. If enabled, "..
  502. -- "the driver provides RS 232 output hardware handshake.\n\n"..
  503. -- "Ethernut 2.x:\n"..
  504. -- "Short JP1 pins 7 and 8 to select INT7.",
  505. -- flavor = "booldata",
  506. -- type = "enumerated",
  507. -- choices = avr_irq_choice,
  508. -- file = "include/cfg/arch/avrpio.h"
  509. -- },
  510. -- {
  511. -- macro = "UART1_DTR_BIT",
  512. -- brief = "DTR Bit",
  513. -- description = "Bit number of UART1 DTR handshake output. If enabled, "..
  514. -- "the driver provides RS 232 input hardware handshake.\n\n",
  515. -- provides = { "UART1_DTR_BIT" },
  516. -- flavor = "booldata",
  517. -- type = "enumerated",
  518. -- choices = avr_bit_choice,
  519. -- file = "include/cfg/arch/avrpio.h"
  520. -- },
  521. -- {
  522. -- macro = "UART1_DTR_AVRPORT",
  523. -- brief = "DTR Port",
  524. -- description = "Port register name of UART1 DTR handshake output.",
  525. -- requires = { "UART1_DTR_BIT" },
  526. -- type = "enumerated",
  527. -- choices = avr_port_choice,
  528. -- file = "include/cfg/arch/avrpio.h"
  529. -- },
  530. -- {
  531. -- macro = "UART1_HDX_BIT",
  532. -- brief = "Half Duplex Bit",
  533. -- description = "Bit number of UART1 half duplex control output. If enabled, "..
  534. -- "the driver provides RS 485 half duplex mode.",
  535. -- provides = { "UART1_HDX_BIT" },
  536. -- flavor = "booldata",
  537. -- type = "enumerated",
  538. -- choices = avr_bit_choice,
  539. -- file = "include/cfg/arch/avrpio.h"
  540. -- },
  541. -- {
  542. -- macro = "UART1_HDX_AVRPORT",
  543. -- brief = "Half Duplex Port",
  544. -- description = "Port register name of UART1 half duplex control output.",
  545. -- requires = { "UART1_HDX_BIT" },
  546. -- type = "enumerated",
  547. -- choices = avr_port_choice,
  548. -- file = "include/cfg/arch/avrpio.h"
  549. -- },
  550. -- }
  551. },
  552. {
  553. name = "nutarch_avr_usart2",
  554. brief = "USART2 Driver",
  555. description = "Hardware specific USART driver. Implements hardware "..
  556. "functions for the generic driver framework.",
  557. requires =
  558. {
  559. "HW_MCU_AVR",
  560. "DEV_IRQ_AVR",
  561. "DEV_UART_GENERIC",
  562. "NUT_EVENT",
  563. "CRT_HEAPMEM",
  564. "HW_AVR_HAVE_UART2"
  565. },
  566. provides = { "DEV_UART_SPECIFIC" },
  567. sources = { "avr/dev/usart2avr.c", "avr/dev/ih_usart2_rx.c", "avr/dev/ih_usart2_tx.c", "avr/dev/ih_usart2_udre.c" },
  568. options =
  569. {
  570. {
  571. macro = "UART2_RTS_BIT",
  572. brief = "RTS Bit",
  573. description = "Bit number of UART1 RTS handshake output. If enabled, "..
  574. "the driver provides RS 232 input hardware handshake.\n\n",
  575. provides = { "UART2_RTS_BIT" },
  576. flavor = "booldata",
  577. type = "enumerated",
  578. choices = avr_bit_choice,
  579. file = "include/cfg/arch/avrpio.h"
  580. },
  581. {
  582. macro = "UART2_RTS_AVRPORT",
  583. brief = "RTS Port",
  584. description = "Port register name of UART2 RTS handshake output.",
  585. requires = { "UART2_RTS_BIT" },
  586. type = "enumerated",
  587. choices = avr_port_choice,
  588. file = "include/cfg/arch/avrpio.h"
  589. },
  590. {
  591. macro = "UART2_CTS_IRQ",
  592. brief = "CTS Interrupt",
  593. description = "Interrupt number of UART2 CTS handshake input. If enabled, "..
  594. "the driver provides RS 232 output hardware handshake.\n\n",
  595. flavor = "booldata",
  596. type = "enumerated",
  597. choices = avr_irq_choice,
  598. file = "include/cfg/arch/avrpio.h"
  599. },
  600. {
  601. macro = "UART2_DTR_BIT",
  602. brief = "DTR Bit",
  603. description = "Bit number of UART2 DTR handshake output. If enabled, "..
  604. "the driver provides RS 232 input hardware handshake.\n\n",
  605. provides = { "UART2_DTR_BIT" },
  606. flavor = "booldata",
  607. type = "enumerated",
  608. choices = avr_bit_choice,
  609. file = "include/cfg/arch/avrpio.h"
  610. },
  611. {
  612. macro = "UART2_DTR_AVRPORT",
  613. brief = "DTR Port",
  614. description = "Port register name of UART2 DTR handshake output.",
  615. requires = { "UART2_DTR_BIT" },
  616. type = "enumerated",
  617. choices = avr_port_choice,
  618. file = "include/cfg/arch/avrpio.h"
  619. },
  620. {
  621. macro = "UART2_HDX_BIT",
  622. brief = "Half Duplex Bit",
  623. description = "Bit number of UART2 half duplex control output. If enabled, "..
  624. "the driver provides RS 485 half duplex mode.",
  625. provides = { "UART2_HDX_BIT" },
  626. flavor = "booldata",
  627. type = "enumerated",
  628. choices = avr_bit_choice,
  629. file = "include/cfg/arch/avrpio.h"
  630. },
  631. {
  632. macro = "UART2_HDX_AVRPORT",
  633. brief = "Half Duplex Port",
  634. description = "Port register name of UART2 half duplex control output.",
  635. requires = { "UART2_HDX_BIT" },
  636. type = "enumerated",
  637. choices = avr_port_choice,
  638. file = "include/cfg/arch/avrpio.h"
  639. },
  640. }
  641. },
  642. {
  643. name = "nutarch_avr_usart3",
  644. brief = "USART3 Driver",
  645. description = "Hardware specific USART driver. Implements hardware "..
  646. "functions for the generic driver framework.",
  647. requires =
  648. {
  649. "HW_MCU_AVR",
  650. "DEV_IRQ_AVR",
  651. "DEV_UART_GENERIC",
  652. "NUT_EVENT",
  653. "CRT_HEAPMEM",
  654. "HW_AVR_HAVE_UART3"
  655. },
  656. provides = { "DEV_UART_SPECIFIC" },
  657. sources = { "avr/dev/usart3avr.c" },
  658. options =
  659. {
  660. {
  661. macro = "UART3_RTS_BIT",
  662. brief = "RTS Bit",
  663. description = "Bit number of UART3 RTS handshake output. If enabled, "..
  664. "the driver provides RS 232 input hardware handshake.\n\n",
  665. provides = { "UART3_RTS_BIT" },
  666. flavor = "booldata",
  667. type = "enumerated",
  668. choices = avr_bit_choice,
  669. file = "include/cfg/arch/avrpio.h"
  670. },
  671. {
  672. macro = "UART3_RTS_AVRPORT",
  673. brief = "RTS Port",
  674. description = "Port register name of UART3 RTS handshake output.",
  675. requires = { "UART3_RTS_BIT" },
  676. type = "enumerated",
  677. choices = avr_port_choice,
  678. file = "include/cfg/arch/avrpio.h"
  679. },
  680. {
  681. macro = "UART3_CTS_IRQ",
  682. brief = "CTS Interrupt",
  683. description = "Interrupt number of UART3 CTS handshake input. If enabled, "..
  684. "the driver provides RS 232 output hardware handshake.\n\n",
  685. flavor = "booldata",
  686. type = "enumerated",
  687. choices = avr_irq_choice,
  688. file = "include/cfg/arch/avrpio.h"
  689. },
  690. {
  691. macro = "UART3_DTR_BIT",
  692. brief = "DTR Bit",
  693. description = "Bit number of UART3 DTR handshake output. If enabled, "..
  694. "the driver provides RS 232 input hardware handshake.\n\n",
  695. provides = { "UART3_DTR_BIT" },
  696. flavor = "booldata",
  697. type = "enumerated",
  698. choices = avr_bit_choice,
  699. file = "include/cfg/arch/avrpio.h"
  700. },
  701. {
  702. macro = "UART3_DTR_AVRPORT",
  703. brief = "DTR Port",
  704. description = "Port register name of UART3 DTR handshake output.",
  705. requires = { "UART3_DTR_BIT" },
  706. type = "enumerated",
  707. choices = avr_port_choice,
  708. file = "include/cfg/arch/avrpio.h"
  709. },
  710. {
  711. macro = "UART3_HDX_BIT",
  712. brief = "Half Duplex Bit",
  713. description = "Bit number of UART3 half duplex control output. If enabled, "..
  714. "the driver provides RS 485 half duplex mode.",
  715. provides = { "UART3_HDX_BIT" },
  716. flavor = "booldata",
  717. type = "enumerated",
  718. choices = avr_bit_choice,
  719. file = "include/cfg/arch/avrpio.h"
  720. },
  721. {
  722. macro = "UART3_HDX_AVRPORT",
  723. brief = "Half Duplex Port",
  724. description = "Port register name of UART3 half duplex control output.",
  725. requires = { "UART3_HDX_BIT" },
  726. type = "enumerated",
  727. choices = avr_port_choice,
  728. file = "include/cfg/arch/avrpio.h"
  729. },
  730. }
  731. },
  732. {
  733. name = "nutarch_avr_ace",
  734. brief = "TL16C550 Driver",
  735. description = "TL16C550 UART driver for ATmega128.\n"..
  736. "Initially contributed by William Basser and later "..
  737. "enhanced by Przemyslaw Rudy. Only available for GCC.",
  738. sources = { "avr/dev/ace.c", "avr/dev/tlc16c550.c" },
  739. requires = { "HW_MCU_ATMEGA128", "DEV_IRQ_AVR", "NUT_EVENT", "CRT_HEAPMEM", "TOOL_GCC" },
  740. provides = { "DEV_FILE", "DEV_READ", "DEV_WRITE" },
  741. },
  742. {
  743. name = "nutarch_avr_uart0",
  744. brief = "UART0 Device0",
  745. description = "UART0 Device for interrupt driven uart driver.",
  746. requires = { "DEV_IRQ_UART0" },
  747. provides = { "UART_AVR_DEV" },
  748. sources = { "avr/dev/uart0.c"},
  749. },
  750. {
  751. name = "nutarch_avr_uart1",
  752. brief = "UART1 Device0",
  753. description = "UART1 Device for interrupt driven uart driver.",
  754. requires = { "DEV_IRQ_UART1" },
  755. provides = { "UART_AVR_DEV" },
  756. sources = { "avr/dev/uart1.c"},
  757. },
  758. {
  759. name = "nutarch_avr_uart",
  760. brief = "UART driver",
  761. description = "Interrupt driven, buffered UART driver.\n"..
  762. "Deprecated, use the USART driver.",
  763. sources = { "avr/dev/uartavr.c" },
  764. requires = { "HW_MCU_AVR", "DEV_IRQ_AVR", "UART_AVR_DEV", "NUT_EVENT", "CRT_HEAPMEM" },
  765. provides = { "DEV_FILE", "DEV_READ", "DEV_WRITE" },
  766. },
  767. {
  768. name = "nutarch_avr_lanc111",
  769. brief = "LAN91C111 Driver",
  770. description = "LAN driver for SMSC LAN91C111. AVR only.",
  771. requires = { "HW_MCU_AVR", "NUT_EVENT", "NUT_TIMER" },
  772. provides = { "NET_PHY" },
  773. sources = { "avr/dev/lanc111.c" },
  774. options =
  775. {
  776. {
  777. macro = "LANC111_BASE_ADDR",
  778. brief = "Controller Base Address",
  779. description = "The driver supports memory mapped controllers only, using "..
  780. "the specified based address.\n\n"..
  781. "The Ethernut 2 reference design uses 0xC000.",
  782. file = "include/cfg/arch/avrpio.h"
  783. },
  784. {
  785. macro = "LANC111_SIGNAL_IRQ",
  786. brief = "Ethernet Interrupt",
  787. description = "Ethernet controller interrupt, typically INT5.",
  788. default = "INT5",
  789. type = "enumerated",
  790. choices = avr_irq_choice,
  791. file = "include/cfg/arch/avrpio.h"
  792. },
  793. {
  794. macro = "LANC111_RESET_BIT",
  795. brief = "Ethernet Reset Bit",
  796. description = "Bit number of the Ethernet controller reset output.\n\n"..
  797. "Should be disabled when the LAN91C111 hardware reset "..
  798. "is not connected to a port pin.\n\n"..
  799. "On Ethernut 2 boards the controller's reset pin "..
  800. "is connected to the system reset. However, on early "..
  801. "board revisions of Ethernut 2.0 no supervisory chip "..
  802. "had been mounted, which causes problems with some "..
  803. "power supplies. Mounting R30 or R31 connects the reset "..
  804. "to bit 3 or bit 7 of PORTE.",
  805. provides = { "LANC111_RESET_BIT" },
  806. flavor = "booldata",
  807. type = "enumerated",
  808. choices = avr_bit_choice,
  809. file = "include/cfg/arch/avrpio.h"
  810. },
  811. {
  812. macro = "LANC111_RESET_AVRPORT",
  813. brief = "Ethernet Reset Port",
  814. description = "Port register name of the Ethernet controller reset output.",
  815. requires = { "LANC111_RESET_BIT" },
  816. type = "enumerated",
  817. choices = avr_port_choice,
  818. file = "include/cfg/arch/avrpio.h"
  819. },
  820. }
  821. },
  822. {
  823. name = "nutarch_avr_rtl8019as",
  824. brief = "RTL8019AS Driver",
  825. requires = { "HW_MCU_AVR", "NUT_TIMER" },
  826. provides = { "NET_PHY" },
  827. sources = { "avr/dev/nicrtl.c", "avr/dev/eth0rtl.c" },
  828. options =
  829. {
  830. {
  831. macro = "RTL_BASE_ADDR",
  832. brief = "Controller Base Address",
  833. description = "The driver supports memory mapped controllers only, using "..
  834. "the specified based address.\n\n"..
  835. "The Ethernut 1 reference design uses 0x8300.",
  836. default = "0x8300",
  837. file = "include/cfg/arch/avrpio.h"
  838. },
  839. {
  840. macro = "RTL_SIGNAL_IRQ",
  841. brief = "Ethernet Interrupt",
  842. description = "Ethernet controller interrupt, typically INT5.",
  843. default = "INT5",
  844. type = "enumerated",
  845. choices = avr_irq_choice,
  846. file = "include/cfg/arch/avrpio.h"
  847. },
  848. {
  849. macro = "RTL_IRQ_RISING_EDGE",
  850. brief = "IRQ Rising Edge Trigger",
  851. description = "Configures rising edge trigger for RTL interrupt.\n\n"..
  852. "Don't enable this for Ethernut boards! "..
  853. "Used only on custom hardware designs without "..
  854. "inverter gate for the interrupt.\n\n"..
  855. "Valid only for ATMega 128 or AT90CAN128 parts, "..
  856. "not supported by ATMega 103.",
  857. flavor = "boolean",
  858. file = "include/cfg/arch/avrpio.h"
  859. },
  860. {
  861. macro = "RTL_RESET_BIT",
  862. brief = "Ethernet Reset Bit",
  863. description = "Bit number of the Ethernet controller reset output.\n\n"..
  864. "Early Ethernut revisions use bit 4 on PORTE to hard "..
  865. "reset the RTL8019AS. Later the controller's reset pin "..
  866. "had been connected to the system reset.\n\n"..
  867. "Should be disabled when the RTL8019AS hardware reset "..
  868. "is not connected to a port pin.",
  869. provides = { "RTL_RESET_BIT" },
  870. flavor = "booldata",
  871. type = "enumerated",
  872. choices = avr_bit_choice,
  873. file = "include/cfg/arch/avrpio.h"
  874. },
  875. {
  876. macro = "RTL_RESET_AVRPORT",
  877. brief = "Ethernet Reset Port",
  878. description = "Port register name of the Ethernet controller reset output.",
  879. requires = { "RTL_RESET_BIT" },
  880. type = "enumerated",
  881. choices = avr_port_choice,
  882. file = "include/cfg/arch/avrpio.h"
  883. },
  884. {
  885. macro = "RTL_EESK_BIT",
  886. brief = "Ethernet EESK Bit",
  887. description = "Bit number of the Ethernet controller EEPROM clock input.\n\n"..
  888. "This function, when enabled, uses three port pins to emulate "..
  889. "a serial EEPROM for the RTL8019AS. The clock pin is driven "..
  890. "by the Ethernet controller and will be monitored by the "..
  891. "driver to shift the correct values out of the EEDO pin.\n\n"..
  892. "Ethernut 1.3 Rev-G uses Bit 5 on Port C. On previous board "..
  893. "revisions the EEDO pin is connected to high. As a result, "..
  894. "the full duplex bit is permanently enabled. But the RTL8019AS "..
  895. "does not provide link level handshake, which makes the "..
  896. "peer believe, that it's half duplex only and any full duplex "..
  897. "traffic from the RTL8019AS is considered a collision. This "..
  898. "is not fatal, but noticeably reduces throughput.\n\n"..
  899. "Should be disabled when the hardware doesn't support "..
  900. "EEPROM Emulation or provides a real EEPROM.",
  901. provides = { "RTL_EESK_BIT" },
  902. flavor = "booldata",
  903. type = "enumerated",
  904. choices = avr_bit_choice,
  905. file = "include/cfg/arch/avrpio.h"
  906. },
  907. {
  908. macro = "RTL_EESK_AVRPORT",
  909. brief = "Ethernet EESK Port",
  910. description = "Port register name of the Ethernet controller EEPROM clock input.\n\n"..
  911. "Ethernut 1.3 Rev-G uses Bit 5 on Port C.",
  912. requires = { "RTL_EESK_BIT" },
  913. type = "enumerated",
  914. choices = avr_port_choice,
  915. file = "include/cfg/arch/avrpio.h"
  916. },
  917. {
  918. macro = "RTL_EEDO_BIT",
  919. brief = "Ethernet EEDO Bit",
  920. description = "Bit number of the Ethernet controller EEPROM data output.\n\n"..
  921. "Ethernut 1.3 Rev-G uses Bit 6 on Port C.",
  922. requires = { "RTL_EESK_BIT" },
  923. type = "enumerated",
  924. choices = avr_bit_choice,
  925. file = "include/cfg/arch/avrpio.h"
  926. },
  927. {
  928. macro = "RTL_EEDO_AVRPORT",
  929. brief = "Ethernet EEDO Port",
  930. description = "Port register name of the Ethernet controller EEPROM data output.\n\n"..
  931. "Ethernut 1.3 Rev-G uses Bit 6 on Port C.",
  932. requires = { "RTL_EESK_BIT" },
  933. type = "enumerated",
  934. choices = avr_port_choice,
  935. file = "include/cfg/arch/avrpio.h"
  936. },
  937. {
  938. macro = "RTL_EEMU_BIT",
  939. brief = "Ethernet EEMU Bit",
  940. description = "Bit number of the Ethernet controller EEPROM emulator output.\n\n"..
  941. "Ethernut 1.3 Rev-G uses Bit 7 on Port C to keep A15 high.\n\n"..
  942. "Disable this option if the hardware doesn't use this signal.",
  943. requires = { "RTL_EESK_BIT" },
  944. provides = { "RTL_EEMU_BIT" },
  945. flavor = "booldata",
  946. type = "enumerated",
  947. choices = avr_bit_choice,
  948. file = "include/cfg/arch/avrpio.h"
  949. },
  950. {
  951. macro = "RTL_EEMU_AVRPORT",
  952. brief = "Ethernet EEMU Port",
  953. description = "Port register name of the Ethernet controller reset output.\n\n"..
  954. "Ethernut 1.3 Rev-G uses Bit 7 on Port C.",
  955. requires = { "RTL_EEMU_BIT" },
  956. type = "enumerated",
  957. choices = avr_port_choice,
  958. file = "include/cfg/arch/avrpio.h"
  959. },
  960. {
  961. macro = "NUT_THREAD_NICRXSTACK",
  962. brief = "Receiver Thread Stack",
  963. description = "Number of bytes to be allocated for the stack of the NIC receive thread.",
  964. flavor = "booldata",
  965. type = "integer",
  966. file = "include/cfg/dev.h"
  967. }
  968. }
  969. },
  970. {
  971. name = "nutarch_avr_ide",
  972. brief = "ATA/IDE driver",
  973. description = "Mass storage driver.",
  974. requires = { "HW_MCU_AVR", "GCC_LE_4_5" },
  975. sources = { "avr/dev/ide.c" }
  976. },
  977. {
  978. name = "nutarch_avr_cs8900",
  979. brief = "CS8900 Driver",
  980. requires = { "HW_MCU_AVR", "NUT_TIMER", "GCC_LE_4_5" },
  981. sources = { "avr/dev/cs8900.c", "avr/dev/eth0cs.c" }
  982. },
  983. {
  984. name = "nutarch_avr_wlan",
  985. brief = "WLAN Driver",
  986. description = "Not well maintained. Disabled after compile problems with latest GCC.",
  987. requires = { "NOT_AVAILABLE", "NUT_EVENT", "HW_MCU_AVR" },
  988. provides = { "NET_PHY" },
  989. sources = { "avr/dev/wlan.c", "avr/dev/wlandrv.c" }
  990. },
  991. --
  992. -- Additional Hardware Support
  993. --
  994. {
  995. name = "nutarch_avr_gpio",
  996. brief = "AVR GPIO",
  997. requires = { "HW_MCU_AVR" },
  998. description = "Generic GPIO API.",
  999. sources = { "avr/dev/gpio_avr.c" }
  1000. },
  1001. {
  1002. name = "nutarch_avr_adc",
  1003. brief = "ADC Driver",
  1004. description = "Driver for the ATmega analog to digital converter.\n\n"..
  1005. "Only available for AVR-GCC.\n\n"..
  1006. "Contributed by Ole Reinhardt from www.kernelconcepts.de",
  1007. requires = { "HW_MCU_AVR", "TOOL_GCC" },
  1008. sources = { "avr/dev/adc.c" },
  1009. options =
  1010. {
  1011. {
  1012. macro = "ADC_BUF_SIZE",
  1013. brief = "Buffer Size",
  1014. description = "Defaults to 16",
  1015. file = "include/cfg/arch/avrpio.h"
  1016. },
  1017. {
  1018. macro = "ADC_INITIAL_CHANNEL",
  1019. brief = "Initial Channel",
  1020. description = "Set to ADC0..ADC7",
  1021. file = "include/cfg/arch/avrpio.h"
  1022. },
  1023. {
  1024. macro = "ADC_INITIAL_REF",
  1025. brief = "Initial Reference",
  1026. description = "Set to AVCC (supply voltage), "..
  1027. "AREF (external reference) "..
  1028. "or INTERNAL_256 (2.56V)",
  1029. file = "include/cfg/arch/avrpio.h"
  1030. },
  1031. {
  1032. macro = "ADC_INITIAL_MODE",
  1033. brief = "Initial Mode",
  1034. description = "Set to\n\nFREE_RUNNING:\n"..
  1035. "Free-running mode. Samples continuously taken "..
  1036. "every 13 cycles of ADC clock after "..
  1037. "ADC_start_conversion() is called.\n\n"..
  1038. "SINGLE_CONVERSION:\n"..
  1039. "Single-conversion mode. One sample taken every "..
  1040. "time ADC_start_conversion() is called.",
  1041. file = "include/cfg/arch/avrpio.h"
  1042. },
  1043. {
  1044. macro = "ADC_INITIAL_PRESCALE",
  1045. brief = "Initial Prescale",
  1046. description = "Set to\n"..
  1047. "ADC_PRESCALE_DIV2 for CPU clk/2\n"..
  1048. "ADC_PRESCALE_DIV4 for CPU clk/4\n"..
  1049. "ADC_PRESCALE_DIV8 for CPU clk/8\n"..
  1050. "ADC_PRESCALE_DIV16 for CPU clk/16\n"..
  1051. "ADC_PRESCALE_DIV32 for CPU clk/32\n"..
  1052. "ADC_PRESCALE_DIV64 for CPU clk/64\n"..
  1053. "ADC_PRESCALE_DIV128 for CPU clk/128",
  1054. file = "include/cfg/arch/avrpio.h"
  1055. },
  1056. }
  1057. },
  1058. {
  1059. name = "nutarch_avr_ir",
  1060. brief = "IR Driver",
  1061. requires = { "HW_MCU_AVR", "NUT_EVENT" },
  1062. description = "Infrared remote control for Sony protocol.",
  1063. sources = { "avr/dev/ir.c", "avr/dev/irsony.c" }
  1064. },
  1065. {
  1066. name = "nutarch_avr_hd44780",
  1067. brief = "HD44780 Driver",
  1068. requires = { "HW_MCU_AVR" },
  1069. provides = { "DEV_FILE", "DEV_WRITE" },
  1070. sources = { "avr/dev/hd44780.c" },
  1071. options =
  1072. {
  1073. {
  1074. macro = "LCD_ROWS",
  1075. brief = "Rows",
  1076. description = "The number of available display rows, either 1, 2 or 4.",
  1077. default = "2",
  1078. flavor = "integer",
  1079. file = "include/cfg/arch/avrpio.h"
  1080. },
  1081. {
  1082. macro = "LCD_COLS",
  1083. brief = "Columns",
  1084. description = "The number of available display colums, either 8, 16, 20 or 40.",
  1085. default = "16",
  1086. flavor = "integer",
  1087. file = "include/cfg/arch/avrpio.h"
  1088. },
  1089. {
  1090. macro = "KS0073_CONTROLLER",
  1091. brief = "KS0073 Controller",
  1092. flavor = "boolean",
  1093. file = "include/cfg/arch/avrpio.h"
  1094. },
  1095. {
  1096. macro = "LCD_SHORT_DELAY",
  1097. brief = "Short delay",
  1098. description = "Number of milliseconds",
  1099. flavor = "booldata",
  1100. type = "integer",
  1101. file = "include/cfg/arch/avrpio.h"
  1102. },
  1103. {
  1104. macro = "LCD_LONG_DELAY",
  1105. brief = "Long delay",
  1106. description = "Number of milliseconds",
  1107. flavor = "booldata",
  1108. type = "integer",
  1109. file = "include/cfg/arch/avrpio.h"
  1110. },
  1111. {
  1112. macro = "LCD_DATA_AVRPORT",
  1113. brief = "Data port",
  1114. description = "Port of the databits to use",
  1115. type = "enumerated",
  1116. choices = avr_port_choice,
  1117. file = "include/cfg/arch/avrpio.h"
  1118. },
  1119. {
  1120. macro = "LCD_DATA_BITS",
  1121. brief = "Bits Data Port",
  1122. description = "Choose between 4 bits mode (upper or lower) and 8 bits mode",
  1123. type = "enumerated",
  1124. choices = hd44780_databits_choice,
  1125. file = "include/cfg/arch/avrpio.h"
  1126. },
  1127. {
  1128. macro = "LCD_ENABLE_AVRPORT",
  1129. brief = "Enable Port",
  1130. description = "Choose port used for the enable line",
  1131. type = "enumerated",
  1132. choices = avr_port_choice,
  1133. file = "include/cfg/arch/avrpio.h"
  1134. },
  1135. {
  1136. macro = "LCD_ENABLE_BIT",
  1137. brief = "Enable Bit",
  1138. description = "Choose bit used for the enable line",
  1139. type = "enumerated",
  1140. choices = avr_bit_choice,
  1141. file = "include/cfg/arch/avrpio.h"
  1142. },
  1143. {
  1144. macro = "LCD_REGSEL_AVRPORT",
  1145. brief = "RS Port",
  1146. description = "Choose port for the Register Select line",
  1147. type = "enumerated",
  1148. choices = avr_port_choice,
  1149. file = "include/cfg/arch/avrpio.h"
  1150. },
  1151. {
  1152. macro = "LCD_REGSEL_BIT",
  1153. brief = "RS Bit",
  1154. description = "Choose bit for the Register Select line",
  1155. type = "enumerated",
  1156. choices = avr_bit_choice,
  1157. file = "include/cfg/arch/avrpio.h"
  1158. },
  1159. {
  1160. macro = "LCD_RW_AVRPORT",
  1161. brief = "RW Port",
  1162. description = "Choose port for the Read Write line",
  1163. type = "enumerated",
  1164. choices = avr_port_choice,
  1165. file = "include/cfg/arch/avrpio.h"
  1166. },
  1167. {
  1168. macro = "LCD_RW_BIT",
  1169. brief = "RW Bit",
  1170. description = "Choose bit for the Read Write line",
  1171. type = "enumerated",
  1172. choices = avr_bit_choice,
  1173. file = "include/cfg/arch/avrpio.h"
  1174. }
  1175. }
  1176. },
  1177. {
  1178. name = "nutarch_arv_hd44780_bus",
  1179. brief = "HD44780 Bus Driver",
  1180. description = "Alternate memory mapped LCD Driver.\n\n"..
  1181. "This is a terminal device driver for a memory "..
  1182. "mapped HD44780 compatible LCD. It is connected "..
  1183. "to the databus / adressbus. A chip select is "..
  1184. "generated from /RD, /WR, and the address decoder. "..
  1185. "It is connected to the LCD's enable signal. "..
  1186. "A0 is connected to the register select pin and A1 "..
  1187. "to the read/write signal. Therefore you'll read from "..
  1188. "an address with an offset of two.\n\n"..
  1189. "Only available for AVR-GCC.\n\n"..
  1190. "Contributed by Ole Reinhardt from www.kernelconcepts.de",
  1191. requires = { "HW_MCU_AVR", "TOOL_GCC" },
  1192. provides = { "DEV_FILE", "DEV_WRITE" },
  1193. sources = { "avr/dev/hd44780_bus.c" },
  1194. options =
  1195. {
  1196. {
  1197. macro = "LCD_4x20",
  1198. brief = "LCD 4x20",
  1199. flavor = "boolean",
  1200. file = "include/cfg/arch/avrpio.h"
  1201. },
  1202. {
  1203. macro = "LCD_4x16",
  1204. brief = "LCD 4x16",
  1205. flavor = "boolean",
  1206. file = "include/cfg/arch/avrpio.h"
  1207. }, {
  1208. macro = "LCD_2x40",
  1209. brief = "LCD 2x40",
  1210. flavor = "boolean",
  1211. file = "include/cfg/arch/avrpio.h"
  1212. },
  1213. {
  1214. macro = "LCD_2x20",
  1215. brief = "LCD 2x20",
  1216. flavor = "boolean",
  1217. file = "include/cfg/arch/avrpio.h"
  1218. },
  1219. {
  1220. macro = "LCD_2x16",
  1221. brief = "LCD 2x16",
  1222. flavor = "boolean",
  1223. file = "include/cfg/arch/avrpio.h"
  1224. },
  1225. {
  1226. macro = "LCD_2x8",
  1227. brief = "LCD 2x8",
  1228. flavor = "boolean",
  1229. file = "include/cfg/arch/avrpio.h"
  1230. }, {
  1231. macro = "LCD_1x20",
  1232. brief = "LCD 1x20",
  1233. flavor = "boolean",
  1234. file = "include/cfg/arch/avrpio.h"
  1235. },
  1236. {
  1237. macro = "LCD_1x16",
  1238. brief = "LCD 1x16",
  1239. flavor = "boolean",
  1240. file = "include/cfg/arch/avrpio.h"
  1241. },
  1242. {
  1243. macro = "LCD_1x8",
  1244. brief = "LCD 1x8",
  1245. flavor = "boolean",
  1246. file = "include/cfg/arch/avrpio.h"
  1247. },
  1248. {
  1249. macro = "KS0073_CONTROLLER",
  1250. brief = "KS0073 Controller",
  1251. flavor = "boolean",
  1252. file = "include/cfg/arch/avrpio.h"
  1253. }
  1254. }
  1255. },
  1256. {
  1257. name = "nutarch_avr_sja1000",
  1258. brief = "SJA1000 CAN Driver",
  1259. description = "Driver for SJA1000 CAN-Bus controller.\n\n"..
  1260. "The SJA1000 controller is connected to the memory "..
  1261. "bus. It's base address and interrupt is set by "..
  1262. "NutRegisterDevice().\n\n"..
  1263. "Only available for AVR-GCC.\n\n"..
  1264. "Contributed by Ole Reinhardt from www.embedded-it.de",
  1265. provides = { "DEV_CAN_SPECIFIC"},
  1266. requires = { "HW_MCU_AVR", "TOOL_GCC" },
  1267. sources = { "avr/dev/sja1000.c" },
  1268. options =
  1269. {
  1270. {
  1271. macro = "SJA_BASE",
  1272. brief = "Base address of SJA1000 controller",
  1273. description = "Default is 0x8800.",
  1274. file = "include/cfg/arch/avrpio.h"
  1275. },
  1276. {
  1277. macro = "SJA_SIGNAL_BIT",
  1278. brief = "Interrupt Number",
  1279. description = "Default is 7. Must correspond "..
  1280. "to SJA_SIGNAL.",
  1281. file = "include/cfg/arch/avrpio.h"
  1282. },
  1283. {
  1284. macro = "SJA_SIGNAL",
  1285. brief = "Interrupt Signal",
  1286. description = "Default is sig_INTERRUPT7. Must correspond "..
  1287. "to SJA_SIGNAL_BIT.",
  1288. file = "include/cfg/arch/avrpio.h"
  1289. },
  1290. {
  1291. macro = "SJA_EICR",
  1292. brief = "Interrupt Control",
  1293. description = "Default is EICRB. Must correspond "..
  1294. "to SJA_SIGNAL_BIT.",
  1295. file = "include/cfg/arch/avrpio.h"
  1296. }
  1297. }
  1298. },
  1299. {
  1300. name = "nutarch_avr_atcan",
  1301. brief = "AT CAN Driver",
  1302. description = "Driver for Atmel's internal Full CAN controller "..
  1303. "found in AT90 parts like the AT90CAN128 MCU.\n\n"..
  1304. "Requires a fixed MCU clock setting of either 12 or 16 MHz. "..
  1305. "Check setting in System Timer category.\n"..
  1306. "Currently only available for AVR-GCC.\n\n"..
  1307. "Contributed by Henrik Maier from www.proconx.com",
  1308. requires = { "HW_CAN_AVR", "TOOL_GCC"},
  1309. provides = { "DEV_CAN_SPECIFIC"},
  1310. sources = { "avr/dev/atcan.c" },
  1311. options =
  1312. {
  1313. {
  1314. macro = "ATCAN_RX_BUF_SIZE",
  1315. brief = "Receive buffers",
  1316. description = "Number of CAN messages in receive buffer. Default is 64.",
  1317. file = "include/cfg/arch/avrpio.h"
  1318. }
  1319. }
  1320. },
  1321. {
  1322. name = "nutarch_avr_spibus_avr",
  1323. brief = "AVR SPI Bus Controller",
  1324. description = "SPI bus controllers.\n\n",
  1325. provides = { "SPIBUS_CONTROLLER" },
  1326. sources =
  1327. {
  1328. "avr/dev/spibus_avr.c",
  1329. "avr/dev/spibus0avr.c"
  1330. },
  1331. options =
  1332. {
  1333. {
  1334. macro = "SPIBUS0_POLLING_MODE",
  1335. brief = "Polling Mode (First Controller)",
  1336. description = "If enabled, the controller will use polling mode. By default "..
  1337. "interrupt mode is used.",
  1338. flavor = "boolean",
  1339. file = "include/cfg/spi.h"
  1340. },
  1341. {
  1342. macro = "SPIBUS0_DOUBLE_BUFFER",
  1343. brief = "Double buffer IRQ (First Controller)",
  1344. description = "If enabled, the controller will use double buffered interrupt mode.\n\n"..
  1345. "By default a single buffer is used. Ignored when polling mode is enabled.",
  1346. flavor = "boolean",
  1347. file = "include/cfg/spi.h"
  1348. },
  1349. {
  1350. macro = "SPI0_CS0_PIO_ID",
  1351. brief = "CS0 Port (First Controller)",
  1352. description = "ID of the port used for SPI bus 0 chip select 0.",
  1353. requires = { "HW_GPIO" },
  1354. type = "enumerated",
  1355. choices = function() return GetAvrPorts() end,
  1356. flavor = "integer",
  1357. file = "include/cfg/arch/avrpio.h"
  1358. },
  1359. {
  1360. macro = "SPI0_CS0_PIO_BIT",
  1361. brief = "CS0 Port Bit (First Controller)",
  1362. description = "Port bit used for SPI bus 0 chip select 0.",
  1363. requires = { "HW_GPIO" },
  1364. type = "enumerated",
  1365. choices = function() return GetGpioBits() end,
  1366. flavor = "integer",
  1367. file = "include/cfg/arch/avrpio.h"
  1368. },
  1369. {
  1370. macro = "SPI0_CS1_PIO_ID",
  1371. brief = "CS1 Port (First Controller)",
  1372. description = "ID of the port used for SPI bus 0 chip select 1.",
  1373. requires = { "HW_GPIO" },
  1374. type = "enumerated",
  1375. choices = function() return GetAvrPorts() end,
  1376. flavor = "integer",
  1377. file = "include/cfg/arch/avrpio.h"
  1378. },
  1379. {
  1380. macro = "SPI0_CS1_PIO_BIT",
  1381. brief = "CS1 Port Bit (First Controller)",
  1382. description = "Port bit used for SPI bus 0 chip select 1.",
  1383. requires = { "HW_GPIO" },
  1384. type = "enumerated",
  1385. choices = function() return GetGpioBits() end,
  1386. flavor = "integer",
  1387. file = "include/cfg/arch/avrpio.h"
  1388. },
  1389. {
  1390. macro = "SPI0_CS2_PIO_ID",
  1391. brief = "CS2 Port (First Controller)",
  1392. description = "ID of the port used for SPI bus 0 chip select 2.",
  1393. requires = { "HW_GPIO" },
  1394. type = "enumerated",
  1395. choices = function() return GetAvrPorts() end,
  1396. flavor = "integer",
  1397. file = "include/cfg/arch/avrpio.h"
  1398. },
  1399. {
  1400. macro = "SPI0_CS2_PIO_BIT",
  1401. brief = "CS2 Port Bit (First Controller)",
  1402. description = "Port bit used for SPI bus 0 chip select 2.",
  1403. requires = { "HW_GPIO" },
  1404. type = "enumerated",
  1405. choices = function() return GetGpioBits() end,
  1406. flavor = "integer",
  1407. file = "include/cfg/arch/avrpio.h"
  1408. },
  1409. {
  1410. macro = "SPI0_CS3_PIO_ID",
  1411. brief = "CS3 Port (First Controller)",
  1412. description = "ID of the port used for SPI bus 0 chip select 3.",
  1413. requires = { "HW_GPIO" },
  1414. type = "enumerated",
  1415. choices = function() return GetAvrPorts() end,
  1416. flavor = "integer",
  1417. file = "include/cfg/arch/avrpio.h"
  1418. },
  1419. {
  1420. macro = "SPI0_CS3_PIO_BIT",
  1421. brief = "CS3 Port Bit (First Controller)",
  1422. description = "Port bit used for SPI bus 0 chip select 3.",
  1423. requires = { "HW_GPIO" },
  1424. type = "enumerated",
  1425. choices = function() return GetGpioBits() end,
  1426. flavor = "integer",
  1427. file = "include/cfg/arch/avrpio.h"
  1428. },
  1429. {
  1430. macro = "SPIBUS1_POLLING_MODE",
  1431. brief = "Polling Mode (Second Controller)",
  1432. description = "If enabled, the controller will use polling mode. By default "..
  1433. "interrupt mode is used.",
  1434. flavor = "boolean",
  1435. file = "include/cfg/spi.h"
  1436. },
  1437. {
  1438. macro = "SPIBUS1_DOUBLE_BUFFER",
  1439. brief = "Double buffer IRQ (Second Controller)",
  1440. description = "If enabled, the controller will use double buffered interrupt mode.\n\n"..
  1441. "By default a single buffer is used. Ignored when polling mode is enabled.",
  1442. flavor = "boolean",
  1443. file = "include/cfg/spi.h"
  1444. },
  1445. {
  1446. macro = "SPI1_CS0_PIO_ID",
  1447. brief = "CS0 Port (Second Controller)",
  1448. description = "ID of the port used for SPI bus 1 chip select 0.",
  1449. requires = { "HW_GPIO" },
  1450. type = "enumerated",
  1451. choices = function() return GetAvrPorts() end,
  1452. flavor = "integer",
  1453. file = "include/cfg/arch/avrpio.h"
  1454. },
  1455. {
  1456. macro = "SPI1_CS0_PIO_BIT",
  1457. brief = "CS0 Port Bit (Second Controller)",
  1458. description = "Port bit used for SPI bus 1 chip select 0.",
  1459. requires = { "HW_GPIO" },
  1460. type = "enumerated",
  1461. choices = function() return GetGpioBits() end,
  1462. flavor = "integer",
  1463. file = "include/cfg/arch/avrpio.h"
  1464. },
  1465. {
  1466. macro = "SPI1_CS1_PIO_ID",
  1467. brief = "CS1 Port (Second Controller)",
  1468. description = "ID of the port used for SPI bus 1 chip select 1.",
  1469. requires = { "HW_GPIO" },
  1470. type = "enumerated",
  1471. choices = function() return GetAvrPorts() end,
  1472. flavor = "integer",
  1473. file = "include/cfg/arch/avrpio.h"
  1474. },
  1475. {
  1476. macro = "SPI1_CS1_PIO_BIT",
  1477. brief = "CS1 Port Bit (Second Controller)",
  1478. description = "Port bit used for SPI bus 1 chip select 1.",
  1479. requires = { "HW_GPIO" },
  1480. type = "enumerated",
  1481. choices = function() return GetGpioBits() end,
  1482. flavor = "integer",
  1483. file = "include/cfg/arch/avrpio.h"
  1484. },
  1485. {
  1486. macro = "SPI1_CS2_PIO_ID",
  1487. brief = "CS2 Port (Second Controller)",
  1488. description = "ID of the port used for SPI bus 1 chip select 2.",
  1489. requires = { "HW_GPIO" },
  1490. type = "enumerated",
  1491. choices = function() return GetAvrPorts() end,
  1492. flavor = "integer",
  1493. file = "include/cfg/arch/avrpio.h"
  1494. },
  1495. {
  1496. macro = "SPI1_CS2_PIO_BIT",
  1497. brief = "CS2 Port Bit (Second Controller)",
  1498. description = "Port bit used for SPI bus 1 chip select 2.",
  1499. requires = { "HW_GPIO" },
  1500. type = "enumerated",
  1501. choices = function() return GetGpioBits() end,
  1502. flavor = "integer",
  1503. file = "include/cfg/arch/avrpio.h"
  1504. },
  1505. {
  1506. macro = "SPI1_CS3_PIO_ID",
  1507. brief = "CS3 Port (Second Controller)",
  1508. description = "ID of the port used for SPI bus 1 chip select 3.",
  1509. requires = { "HW_GPIO" },
  1510. type = "enumerated",
  1511. choices = function() return GetAvrPorts() end,
  1512. flavor = "integer",
  1513. file = "include/cfg/arch/avrpio.h"
  1514. },
  1515. {
  1516. macro = "SPI1_CS3_PIO_BIT",
  1517. brief = "CS3 Port Bit (Second Controller)",
  1518. description = "Port bit used for SPI bus 1 chip select 3.",
  1519. requires = { "HW_GPIO" },
  1520. type = "enumerated",
  1521. choices = function() return GetGpioBits() end,
  1522. flavor = "integer",
  1523. file = "include/cfg/arch/avrpio.h"
  1524. },
  1525. },
  1526. },
  1527. {
  1528. name = "nutdev_sppif0",
  1529. brief = "Polled SPI0 (AVR)",
  1530. description = "Polling hardware SPI driver, AVR and master mode only.",
  1531. requires = { "HW_MCU_AVR" },
  1532. provides = { "DEV_SPI" },
  1533. sources = { "avr/dev/sppif0.c" },
  1534. options =
  1535. {
  1536. {
  1537. macro = "SPPI0_CS0_AVRPORT",
  1538. brief = "CS0 Port",
  1539. description = "ID of the port used for SPI chip select 0.",
  1540. type = "enumerated",
  1541. choices = avr_port_choice,
  1542. flavor = "integer",
  1543. file = "include/cfg/arch/avrpio.h"
  1544. },
  1545. {
  1546. macro = "SPPI0_CS0_BIT",
  1547. brief = "CS0 Port Bit",
  1548. description = "Port bit used for SPI chip select 0.",
  1549. type = "enumerated",
  1550. choices = avr_bit_choice,
  1551. flavor = "integer",
  1552. file = "include/cfg/arch/avrpio.h"
  1553. },
  1554. {
  1555. macro = "SPPI0_CS1_AVRPORT",
  1556. brief = "CS1 Port",
  1557. description = "ID of the port used for SPI chip select 1.",
  1558. type = "enumerated",
  1559. choices = avr_port_choice,
  1560. flavor = "integer",
  1561. file = "include/cfg/arch/avrpio.h"
  1562. },
  1563. {
  1564. macro = "SPPI0_CS1_BIT",
  1565. brief = "CS1 Port Bit",
  1566. description = "Port bit used for SPI chip select 1.",
  1567. type = "enumerated",
  1568. choices = avr_bit_choice,
  1569. flavor = "integer",
  1570. file = "include/cfg/arch/avrpio.h"
  1571. },
  1572. {
  1573. macro = "SPPI0_CS2_AVRPORT",
  1574. brief = "CS2 Port",
  1575. description = "ID of the port used for SPI chip select 2.",
  1576. type = "enumerated",
  1577. choices = avr_port_choice,
  1578. flavor = "integer",
  1579. file = "include/cfg/arch/avrpio.h"
  1580. },
  1581. {
  1582. macro = "SPPI0_CS2_BIT",
  1583. brief = "CS2 Port Bit",
  1584. description = "Port bit used for SPI chip select 2.",
  1585. type = "enumerated",
  1586. choices = avr_bit_choice,
  1587. flavor = "integer",
  1588. file = "include/cfg/arch/avrpio.h"
  1589. },
  1590. {
  1591. macro = "SPPI0_CS3_AVRPORT",
  1592. brief = "CS3 Port",
  1593. description = "ID of the port used for SPI chip select 3.",
  1594. type = "enumerated",
  1595. choices = avr_port_choice,
  1596. flavor = "integer",
  1597. file = "include/cfg/arch/avrpio.h"
  1598. },
  1599. {
  1600. macro = "SPPI0_CS3_BIT",
  1601. brief = "CS3 Port Bit",
  1602. description = "Port bit used for SPI chip select 3.",
  1603. type = "enumerated",
  1604. choices = avr_bit_choice,
  1605. flavor = "integer",
  1606. file = "include/cfg/arch/avrpio.h"
  1607. },
  1608. {
  1609. macro = "SPPI0_RST0_AVRPORT",
  1610. brief = "RESET0 Port",
  1611. description = "ID of the port used for SPI chip reset 0.",
  1612. type = "enumerated",
  1613. choices = avr_port_choice,
  1614. flavor = "integer",
  1615. file = "include/cfg/arch/avrpio.h"
  1616. },
  1617. {
  1618. macro = "SPPI0_RST0_BIT",
  1619. brief = "RESET0 Port Bit",
  1620. description = "Port bit used for SPI chip reset 0.",
  1621. type = "enumerated",
  1622. choices = avr_bit_choice,
  1623. flavor = "integer",
  1624. file = "include/cfg/arch/avrpio.h"
  1625. },
  1626. {
  1627. macro = "SPPI0_RST1_AVRPORT",
  1628. brief = "RESET1 Port",
  1629. description = "ID of the port used for SPI chip reset 1.",
  1630. type = "enumerated",
  1631. choices = avr_port_choice,
  1632. flavor = "integer",
  1633. file = "include/cfg/arch/avrpio.h"
  1634. },
  1635. {
  1636. macro = "SPPI0_RST1_BIT",
  1637. brief = "RESET1 Port Bit",
  1638. description = "Port bit used for SPI chip reset 1.",
  1639. type = "enumerated",
  1640. choices = avr_bit_choice,
  1641. flavor = "integer",
  1642. file = "include/cfg/arch/avrpio.h"
  1643. },
  1644. {
  1645. macro = "SPPI0_RST2_AVRPORT",
  1646. brief = "RESET2 Port",
  1647. description = "ID of the port used for SPI chip reset 2.",
  1648. type = "enumerated",
  1649. choices = avr_port_choice,
  1650. flavor = "integer",
  1651. file = "include/cfg/arch/avrpio.h"
  1652. },
  1653. {
  1654. macro = "SPPI0_RST2_BIT",
  1655. brief = "RESET2 Port Bit",
  1656. description = "Port bit used for SPI chip reset 2.",
  1657. type = "enumerated",
  1658. choices = avr_bit_choice,
  1659. flavor = "integer",
  1660. file = "include/cfg/arch/avrpio.h"
  1661. },
  1662. {
  1663. macro = "SPPI0_RST3_AVRPORT",
  1664. brief = "RESET3 Port",
  1665. description = "ID of the port used for SPI chip reset 3.",
  1666. type = "enumerated",
  1667. choices = avr_port_choice,
  1668. flavor = "integer",
  1669. file = "include/cfg/arch/avrpio.h"
  1670. },
  1671. {
  1672. macro = "SPPI0_RST3_BIT",
  1673. brief = "RESET3 Port Bit",
  1674. description = "Port bit used for SPI chip reset 3.",
  1675. type = "enumerated",
  1676. choices = avr_bit_choice,
  1677. flavor = "integer",
  1678. file = "include/cfg/arch/avrpio.h"
  1679. },
  1680. },
  1681. },
  1682. {
  1683. name = "nutarch_avr_spidigio",
  1684. brief = "Shift Register I/O",
  1685. description = "Digital I/O using shift registers.\n"..
  1686. "This driver supports upto 32 digital inputs or outputs "..
  1687. "and occupies 5 port bits only:\n"..
  1688. "- Shift register data output\n"..
  1689. "- Shift register data input\n"..
  1690. "- Shift register clock output\n"..
  1691. "- Shift register input latch\n"..
  1692. "- Shift register output latch\n"..
  1693. "The hardware is very simple, using standard TTL 74165 "..
  1694. "shift registers for inputs and Allegro's UCN5841A for "..
  1695. "outputs. All shift are connected in series, with the "..
  1696. "first output register connected to the MCU data output "..
  1697. "and the last input register connected to the data input.",
  1698. sources = { "avr/dev/spidigio.c" },
  1699. requires = { "HW_MCU_AVR" },
  1700. options =
  1701. {
  1702. {
  1703. macro = "SPIDIGIO_SOUT_BIT",
  1704. brief = "Shift Output Bit",
  1705. description = "Bit number of the serial data output.\n"..
  1706. "Coconut uses bit 5 of PORTD.",
  1707. type = "enumerated",
  1708. choices = avr_bit_choice,
  1709. file = "include/cfg/arch/avrpio.h"
  1710. },
  1711. {
  1712. macro = "SPIDIGIO_SOUT_AVRPORT",
  1713. brief = "Shift Output Port",
  1714. description = "Port register name of serial data output.",
  1715. type = "enumerated",
  1716. choices = avr_port_choice,
  1717. file = "include/cfg/arch/avrpio.h"
  1718. },
  1719. {
  1720. macro = "SPIDIGIO_SIN_BIT",
  1721. brief = "Shift Input Bit",
  1722. description = "Bit number of the serial data input.\n"..
  1723. "Coconut uses bit 6 of PIND.",
  1724. type = "enumerated",
  1725. choices = avr_bit_choice,
  1726. file = "include/cfg/arch/avrpio.h"
  1727. },
  1728. {
  1729. macro = "SPIDIGIO_SIN_AVRPORT",
  1730. brief = "Shift Input Port",
  1731. description = "Port register name of serial data input.",
  1732. type = "enumerated",
  1733. choices = avr_port_choice,
  1734. file = "include/cfg/arch/avrpio.h"
  1735. },
  1736. {
  1737. macro = "SPIDIGIO_SCLK_BIT",
  1738. brief = "Clock Output Bit",
  1739. description = "Bit number of the serial clock output.\n"..
  1740. "Coconut uses bit 7 of PORTD.",
  1741. type = "enumerated",
  1742. choices = avr_bit_choice,
  1743. file = "include/cfg/arch/avrpio.h"
  1744. },
  1745. {
  1746. macro = "SPIDIGIO_SCLK_AVRPORT",
  1747. brief = "Clock Output Port",
  1748. description = "Port register name of serial clock output.",
  1749. type = "enumerated",
  1750. choices = avr_port_choice,
  1751. file = "include/cfg/arch/avrpio.h"
  1752. },
  1753. {
  1754. macro = "SPIDIGIO_LDI_BIT",
  1755. brief = "Input Latch Bit",
  1756. description = "Bit number of the input latch output.\n"..
  1757. "Coconut uses bit 7 of PORTB.",
  1758. type = "enumerated",
  1759. choices = avr_bit_choice,
  1760. file = "include/cfg/arch/avrpio.h"
  1761. },
  1762. {
  1763. macro = "SPIDIGIO_LDI_AVRPORT",
  1764. brief = "Input Latch Port",
  1765. description = "Port register name of the input latch output.",
  1766. type = "enumerated",
  1767. choices = avr_port_choice,
  1768. file = "include/cfg/arch/avrpio.h"
  1769. },
  1770. {
  1771. macro = "SPIDIGIO_LDO_BIT",
  1772. brief = "Output Latch Bit",
  1773. description = "Bit number of the output latch signal, which is "..
  1774. "connected to the strobe input of the UCN5841A\n"..
  1775. "Coconut uses bit 5 of PORTB.",
  1776. type = "enumerated",
  1777. choices = avr_bit_choice,
  1778. file = "include/cfg/arch/avrpio.h"
  1779. },
  1780. {
  1781. macro = "SPIDIGIO_LDO_AVRPORT",
  1782. brief = "Output Latch Port",
  1783. description = "Port register name of the output latch output.",
  1784. type = "enumerated",
  1785. choices = avr_port_choice,
  1786. file = "include/cfg/arch/avrpio.h"
  1787. },
  1788. }
  1789. },
  1790. {
  1791. name = "nutarch_avr_i2cbus",
  1792. brief = "I2C Bus Controller",
  1793. description = "Hardware dependent part of the I2C bus driver.\n\n"..
  1794. "The new NutI2cBusXXX API introduced in Nut/OS version 5 "..
  1795. "can be used with this controller driver.",
  1796. requires = { "HW_MCU_AVR_ENHANCED" },
  1797. provides = { "I2CBUS_CONTROLLER" },
  1798. sources = { "avr/dev/i2cbus_avr.c" }
  1799. },
  1800. {
  1801. name = "nutarch_avr_twif",
  1802. brief = "TWI Driver",
  1803. description = "This legacy TWI driver allows to use several I2C busses, "..
  1804. "as long as they are based on the same hardware. It is not "..
  1805. "possible, though, to mix bit-banging drivers and drivers "..
  1806. "based on the AVR TWI hardware.\n\n"..
  1807. "The driver is kept for backward compatibility. New applications "..
  1808. "should consider to use the I2C bus controller driver.",
  1809. requires = { "HW_MCU_AVR", "NUT_EVENT" },
  1810. provides = { "DEV_TWI" },
  1811. sources = { "avr/dev/twif.c" }
  1812. },
  1813. -- {
  1814. -- name = "nutarch_avr_vs1001k",
  1815. -- brief = "VS1001 Driver",
  1816. -- requires = { "NUT_SEGBUF", "HW_MCU_AVR" },
  1817. -- sources = { "avr/dev/vs1001k.c" }
  1818. -- },
  1819. {
  1820. name = "nutarch_avr_arthernet_cpld",
  1821. brief = "Arthernet CPLD",
  1822. requires = { "HW_MCU_AVR" },
  1823. options =
  1824. {
  1825. {
  1826. macro = "ARTHERCPLDSTART",
  1827. brief = "CPLD Base Address",
  1828. default = "0x1100",
  1829. file = "include/cfg/memory.h"
  1830. },
  1831. {
  1832. macro = "ARTHERCPLDSPI",
  1833. brief = "CPLD SPI Base Address",
  1834. default = "0x1200",
  1835. file = "include/cfg/memory.h"
  1836. }
  1837. }
  1838. },
  1839. {
  1840. name = "nutarch_avr_pcmcia",
  1841. brief = "PCMCIA Driver",
  1842. requires = { "HW_MCU_AVR" },
  1843. sources = { "avr/dev/pcmcia.c" },
  1844. },
  1845. {
  1846. name = "nutarch_avr_eeprom",
  1847. brief = "EEPROM Access",
  1848. requires = { "HW_MCU_AVR" },
  1849. provides = { "DEV_NVMEM" },
  1850. sources = { "avr/dev/eeprom.c" }
  1851. },
  1852. }