arm.nut 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731
  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. -- ARM Architecture
  33. --
  34. -- $Log$
  35. -- Revision 1.41 2010/12/15 21:46:28 ve2yag
  36. -- Add PWM interrupt support for AT91SAM7S and SE.
  37. --
  38. -- Revision 1.40 2009/09/20 13:24:58 ulrichprinz
  39. -- Added limited USART support for DBGU on SAM.
  40. --
  41. -- Revision 1.39 2009/02/17 09:32:25 haraldkipp
  42. -- A lot of clean-up had been done with SAM9260 initialization.
  43. -- Clock configurations should now work as expected. Note, that
  44. -- the CPU is running now at 198.6560 MHz with peripheral clock
  45. -- at 99.3280 MHz.
  46. --
  47. -- Revision 1.38 2009/02/06 15:57:05 haraldkipp
  48. -- Removed stack size defaults.
  49. --
  50. -- Revision 1.37 2009/01/18 16:46:18 haraldkipp
  51. -- Properly distinguish between PIO IDs and port numbers.
  52. -- Call internal Lua functions when needed only.
  53. --
  54. -- Revision 1.36 2009/01/16 19:44:05 haraldkipp
  55. -- ARM crash dump added.
  56. --
  57. -- Revision 1.35 2009/01/09 17:54:21 haraldkipp
  58. -- Added SPI bus controller for AVR and AT91.
  59. --
  60. -- Revision 1.34 2008/12/15 19:18:49 haraldkipp
  61. -- Enable DataFlash support for EIR board.
  62. --
  63. -- Revision 1.33 2008/10/23 08:51:22 haraldkipp
  64. -- Added MCU family macros and AT91 UART hardware handshake.
  65. --
  66. -- Revision 1.32 2008/10/05 16:51:46 haraldkipp
  67. -- Added suport for the TLV320 audio DAC.
  68. --
  69. -- Revision 1.31 2008/10/03 11:31:27 haraldkipp
  70. -- Added TWI support for the AT91SAM9260.
  71. --
  72. -- Revision 1.30 2008/09/23 07:25:47 haraldkipp
  73. -- Made AT91 SDRAM settings configurable.
  74. -- Simplified AT91 TWI configuration.
  75. -- Added AT91 reset controller module.
  76. --
  77. -- Revision 1.29 2008/09/02 14:29:37 haraldkipp
  78. -- Added a new MCU family macro to avoid these lengthy preprocessor
  79. -- conditionals.
  80. --
  81. -- Revision 1.28 2008/08/06 12:51:08 haraldkipp
  82. -- Added support for Ethernut 5 (AT91SAM9XE reference design).
  83. --
  84. -- Revision 1.27 2008/07/29 07:31:40 haraldkipp
  85. -- Re-enabled NUT_CONFIG_AT91EFC for the SAM7SE.
  86. --
  87. -- Revision 1.26 2008/06/06 10:28:22 haraldkipp
  88. -- ST7036 LCD controller settings moved from source to configuration files.
  89. --
  90. -- Revision 1.25 2008/04/18 13:24:57 haraldkipp
  91. -- Added Szemzo Andras' RS485 patch.
  92. --
  93. -- Revision 1.24 2008/02/15 17:05:53 haraldkipp
  94. -- AT91SAM7SE512 support added. Global MCU list simplifies exclusivity
  95. -- attribute. HW_EBI_AT91 added for MCUs with external bus interface.
  96. --
  97. -- Revision 1.23 2008/02/09 02:11:45 olereinhardt
  98. -- 2008-02-08 Ole Reinhardt <ole.reinhardt@embedded-it.de>
  99. -- * conf/arch/arm.nut: Added ih_at91spi for sam7x, Support for
  100. -- at91sam7s added
  101. --
  102. -- Revision 1.22 2008/01/31 09:22:32 haraldkipp
  103. -- Added first version of platform independent GPIO routines. Consider the
  104. -- AVR version untested.
  105. --
  106. -- Revision 1.21 2007/12/09 21:50:38 olereinhardt
  107. -- Added config options for at91 adc driver
  108. --
  109. -- Revision 1.20 2007/10/12 17:32:16 haraldkipp
  110. -- AT91 ADC code not yet available.
  111. --
  112. -- Revision 1.19 2007/10/04 21:06:27 olereinhardt
  113. -- Support for SAM7S256 added
  114. --
  115. -- Revision 1.18 2007/09/06 19:43:19 olereinhardt
  116. -- Added support for AT91 TWI driver
  117. --
  118. -- Revision 1.17 2007/02/15 16:04:34 haraldkipp
  119. -- Configurable AT91 EMAC buffer usage and link timeout.
  120. -- Port usage for HD44780 is now configurable. Data bits no longer need four
  121. -- consecutive port bits.
  122. -- Added support for ST7036 based displays. Tested with EA DOG-M LCDs.
  123. -- Support for AT91 system controller interrupts added.
  124. -- Support for AT91 periodic interval timer added.
  125. -- Configurable SAM7 and SAM9 runtime initialization.
  126. --
  127. -- Revision 1.16 2006/10/08 16:41:34 haraldkipp
  128. -- PHY address and power down bit are now configurable.
  129. --
  130. -- Revision 1.15 2006/09/29 12:34:59 haraldkipp
  131. -- Basic AT91 SPI support added.
  132. --
  133. -- Revision 1.14 2006/09/08 16:47:24 haraldkipp
  134. -- For some reason the SSC driver for SAM7X had not been included.
  135. --
  136. -- Revision 1.13 2006/09/07 09:03:43 haraldkipp
  137. -- Corrected descriptions. SAM7X and SAM9260 are both using the same
  138. -- Ethernet driver source. at91sam7x_emac.c will become obsolete.
  139. -- SSC driver code added to SAM7X build.
  140. --
  141. -- Revision 1.12 2006/09/05 12:29:59 haraldkipp
  142. -- SPI and MCI support added for SAM9260.
  143. --
  144. -- Revision 1.11 2006/08/31 19:04:08 haraldkipp
  145. -- Added support for the AT91SAM9260 and Atmel's AT91SAM9260 Evaluation Kit.
  146. --
  147. -- Revision 1.10 2006/07/26 11:19:06 haraldkipp
  148. -- Defining AT91_PLL_MAINCK will automatically determine SAM7X clock by
  149. -- reading PLL settings.
  150. -- Added MMC/SD-Card support for AT91SAM7X Evaluation Kit.
  151. --
  152. -- Revision 1.9 2006/07/05 08:02:17 haraldkipp
  153. -- SAM7X interrupt and EMAC support added.
  154. --
  155. -- Revision 1.8 2006/06/28 17:22:34 haraldkipp
  156. -- Make it compile for AT91SAM7X256.
  157. --
  158. -- Revision 1.7 2006/05/25 09:13:22 haraldkipp
  159. -- Platform independent watchdog API added.
  160. --
  161. -- Revision 1.6 2006/04/07 12:24:12 haraldkipp
  162. -- ARM driver for HD44780 LCD controller added.
  163. --
  164. -- Revision 1.5 2006/03/02 19:56:10 haraldkipp
  165. -- First attempt to compile with ICCARM. All compile errors fixed, but not
  166. -- a finished port yet. Many things are missing.
  167. -- Added MCU specific hardware initialization routine. For the AT91 the
  168. -- spurious interrupt handler has been added, which fixes SF 1440948.
  169. --
  170. -- Revision 1.4 2006/02/23 15:41:40 haraldkipp
  171. -- Added support for AT91 watchdog timer.
  172. --
  173. -- Revision 1.3 2005/11/20 14:40:28 haraldkipp
  174. -- Added interrupt driven UART driver for AT91.
  175. --
  176. -- Revision 1.2 2005/10/24 09:52:32 haraldkipp
  177. -- New AT91 interrupt handler routines.
  178. -- New DM9000E Ethernet driver for Ethernut 3 board.
  179. --
  180. -- Revision 1.1 2005/07/26 15:41:06 haraldkipp
  181. -- All target dependent code is has been moved to a new library named
  182. -- libnutarch. Each platform got its own script.
  183. --
  184. --
  185. nutarch_arm =
  186. {
  187. --
  188. -- MCU Family
  189. --
  190. {
  191. name = "nutarch_arm_family",
  192. brief = "MCU Family",
  193. options =
  194. {
  195. {
  196. macro = "MCU_AT91",
  197. brief = "Atmel AT91",
  198. type = "integer",
  199. default = 1,
  200. requires = { "HW_MCU_AT91" },
  201. file = "include/cfg/arch.h"
  202. }
  203. }
  204. },
  205. {
  206. name = "nutarch_at91_family",
  207. brief = "Atmel AT91 Family",
  208. requires = { "HW_MCU_AT91" },
  209. options =
  210. {
  211. {
  212. macro = "MCU_AT91SAM7S",
  213. brief = "Atmel AT91SAM7S",
  214. type = "integer",
  215. default = 1,
  216. requires = { "HW_MCU_AT91SAM7S" },
  217. file = "include/cfg/arch.h"
  218. },
  219. {
  220. macro = "MCU_AT91SAM7SE",
  221. brief = "Atmel AT91SAM7SE",
  222. type = "integer",
  223. default = 1,
  224. requires = { "HW_MCU_AT91SAM7SE" },
  225. file = "include/cfg/arch.h"
  226. },
  227. {
  228. macro = "MCU_AT91SAM7X",
  229. brief = "Atmel AT91SAM7X",
  230. type = "integer",
  231. default = 1,
  232. requires = { "HW_MCU_AT91SAM7X" },
  233. file = "include/cfg/arch.h"
  234. },
  235. {
  236. macro = "MCU_AT91SAM9XE",
  237. brief = "Atmel AT91SAM9XE",
  238. type = "integer",
  239. default = 1,
  240. requires = { "HW_MCU_AT91SAM9XE" },
  241. file = "include/cfg/arch.h"
  242. },
  243. {
  244. macro = "MCU_AT91SAM9G45",
  245. brief = "Atmel AT91SAM9G45",
  246. type = "integer",
  247. default = 1,
  248. requires = { "HW_MCU_AT91SAM9G45" },
  249. file = "include/cfg/arch.h"
  250. }
  251. }
  252. },
  253. --
  254. -- Runtime Initialization
  255. --
  256. {
  257. name = "nutarch_arm_cstartup",
  258. brief = "ARM-GCC Startup",
  259. sources = { "arm/init/crt$(LDNAME).S" },
  260. targets = { "arm/init/crt$(LDNAME).o" },
  261. -- ICCARM: FIXME!
  262. requires = { "TOOL_CC_ARM", "TOOL_GCC" },
  263. options =
  264. {
  265. {
  266. macro = "IRQ_STACK_SIZE",
  267. brief = "IRQ Stack Size",
  268. description = "Number of bytes reserved for interrupt stack\n"..
  269. "Default is 512 (128 words).",
  270. flavor = "booldata",
  271. file = "include/cfg/memory.h"
  272. },
  273. {
  274. macro = "FIQ_STACK_SIZE",
  275. brief = "FIQ Stack Size",
  276. description = "Number of bytes reserved for fast interrupt stack\n"..
  277. "Default is 256 (64 words).",
  278. flavor = "booldata",
  279. file = "include/cfg/memory.h"
  280. },
  281. {
  282. macro = "ABT_STACK_SIZE",
  283. brief = "ABT Stack Size",
  284. description = "Number of bytes reserved for abort exception stack\n"..
  285. "Default is 128 (32 words).",
  286. flavor = "booldata",
  287. file = "include/cfg/memory.h"
  288. },
  289. {
  290. macro = "UND_STACK_SIZE",
  291. brief = "UND Stack Size",
  292. description = "Number of bytes reserved for undefined exception stack\n"..
  293. "Default is 128 (32 words).",
  294. flavor = "booldata",
  295. file = "include/cfg/memory.h"
  296. },
  297. {
  298. macro = "PLL_DIV_VAL",
  299. brief = "PLL Divider",
  300. description = "Make sure to read the datasheet before modifying this value.\n\n"..
  301. "The main clock (crystal) will be divided by this value "..
  302. "and multiplied by the PLL multiplier value plus 1 to "..
  303. "generate the PLL output frequency.\n\n"..
  304. "Default values are\n"..
  305. "SAM7X: 14\n"..
  306. "SAM7S: 14\n"..
  307. "SAM7SE: 14\n"..
  308. "SAM9260: 9\n",
  309. requires = { "HW_PLL_AT91" },
  310. flavor = "booldata",
  311. file = "include/cfg/clock.h"
  312. },
  313. {
  314. macro = "PLL_MUL_VAL",
  315. brief = "PLL Multiplier",
  316. description = "Make sure to read the datasheet before modifying this value.\n\n"..
  317. "The main clock (crystal) will be divided by the PLL "..
  318. "divider value and multiplied by the specified multiplier "..
  319. " value plus 1 to generate the PLL output frequency.\n\n"..
  320. "Default values are\n"..
  321. "SAM7X: 72\n"..
  322. "SAM7S: 72\n"..
  323. "SAM7SE: 72\n"..
  324. "SAM9260: 96\n",
  325. requires = { "HW_PLL_AT91" },
  326. flavor = "booldata",
  327. file = "include/cfg/clock.h"
  328. },
  329. {
  330. macro = "MASTER_CLOCK_PRES",
  331. brief = "Master Clock Prescaler",
  332. description = "The selected clock will be divided by this value to generate "..
  333. "the master clock. Possible values are 1, 2 (default), 4, 8, 16, 32 or 64.",
  334. flavor = "booldata",
  335. file = "include/cfg/clock.h"
  336. },
  337. {
  338. macro = "NUTMEM_SDRAM_BASE",
  339. brief = "SDRAM Base Address",
  340. requires = { "HW_SDRAMC" },
  341. provides = { "HW_SDRAM" },
  342. default = "0x20000000",
  343. flavor = "booldata",
  344. file = "include/cfg/memory.h"
  345. },
  346. {
  347. macro = "NUTMEM_SDRAM_BANKS",
  348. brief = "SDRAM Banks",
  349. requires = { "HW_SDRAM" },
  350. default = "4",
  351. file = "include/cfg/memory.h"
  352. },
  353. {
  354. macro = "NUTMEM_SDRAM_COLBITS",
  355. brief = "SDRAM Column Address Bits",
  356. requires = { "HW_SDRAM" },
  357. default = "10",
  358. file = "include/cfg/memory.h"
  359. },
  360. {
  361. macro = "NUTMEM_SDRAM_ROWBITS",
  362. brief = "SDRAM Row Address Bits",
  363. requires = { "HW_SDRAM" },
  364. default = "13",
  365. file = "include/cfg/memory.h"
  366. },
  367. {
  368. macro = "NUTMEM_SDRAM_CASLAT",
  369. brief = "SDRAM CAS Latency",
  370. requires = { "HW_SDRAM" },
  371. default = "2",
  372. file = "include/cfg/memory.h"
  373. },
  374. {
  375. macro = "NUTMEM_SDRAM_TWR",
  376. brief = "SDRAM Write Recovery Cycles",
  377. requires = { "HW_SDRAM" },
  378. default = "2",
  379. file = "include/cfg/memory.h"
  380. },
  381. {
  382. macro = "NUTMEM_SDRAM_TRC",
  383. brief = "SDRAM Row Cycle Delay",
  384. requires = { "HW_SDRAM" },
  385. default = "4",
  386. file = "include/cfg/memory.h"
  387. },
  388. {
  389. macro = "NUTMEM_SDRAM_TRP",
  390. brief = "SDRAM Row Precharge Delay",
  391. requires = { "HW_SDRAM" },
  392. default = "4",
  393. file = "include/cfg/memory.h"
  394. },
  395. {
  396. macro = "NUTMEM_SDRAM_TRCD",
  397. brief = "SDRAM Row to Column Delay",
  398. requires = { "HW_SDRAM" },
  399. default = "2",
  400. file = "include/cfg/memory.h"
  401. },
  402. {
  403. macro = "NUTMEM_SDRAM_TRAS",
  404. brief = "SDRAM Active to Precharge Delay",
  405. requires = { "HW_SDRAM" },
  406. default = "3",
  407. file = "include/cfg/memory.h"
  408. },
  409. {
  410. macro = "NUTMEM_SDRAM_TXSR",
  411. brief = "SDRAM Self Refresh to Active Delay",
  412. requires = { "HW_SDRAM" },
  413. default = "4",
  414. file = "include/cfg/memory.h"
  415. },
  416. },
  417. },
  418. --
  419. -- Board Initialization
  420. --
  421. {
  422. name = "nutarch_arm_bs",
  423. brief = "Board Support",
  424. sources =
  425. function()
  426. return { "arm/board/"..string.lower(c_macro_edit("PLATFORM"))..".c" };
  427. end,
  428. requires = { "HW_BOARD_SUPPORT" },
  429. },
  430. --
  431. -- Context Switching
  432. --
  433. {
  434. name = "nutarch_arm_context",
  435. brief = "Context Switching",
  436. provides = { "NUT_CONTEXT_SWITCH" },
  437. requires = { "HW_MCU_ARM", "TOOL_GCC" },
  438. sources = { "arm/os/context.c" },
  439. },
  440. --
  441. -- System Timer Hardware
  442. --
  443. {
  444. name = "nutarch_ostimer_at91",
  445. brief = "System Timer (AT91)",
  446. requires = { "HW_TIMER_AT91" },
  447. provides = { "NUT_OSTIMER_DEV" },
  448. sources = { "arm/dev/atmel/ostimer_at91.c" },
  449. options =
  450. {
  451. {
  452. macro = "AT91_PLL_MAINCK",
  453. brief = "AT91 Main Clock",
  454. description = "Frequency of the external crystal. If this option is "..
  455. "enabled and NUT_CPU_FREQ is not enabled, then the "..
  456. "specified value will be used together with "..
  457. "the PLL register settings to determine the CPU master clock. "..
  458. "Otherwise you must specify NUT_CPU_FREQ.",
  459. requires = { "HW_PLL_AT91" },
  460. flavor = "booldata",
  461. file = "include/cfg/clock.h"
  462. },
  463. {
  464. macro = "NUT_TICK_AT91PIT",
  465. brief = "Use PIT",
  466. description = "If selected, the AT91 periodic interval timer is used "..
  467. "to generate system ticks. Otherwise timer 0 is used. ",
  468. requires = { "HW_PIT_AT91" },
  469. flavor = "booldata",
  470. file = "include/cfg/clock.h"
  471. },
  472. },
  473. },
  474. {
  475. name = "nutarch_ostimer_gba",
  476. brief = "System Timer (GBA)",
  477. requires = { "HW_TIMER_GBA" },
  478. provides = { "NUT_OSTIMER_DEV" },
  479. sources = { "arm/dev/gba/ostimer_gba.c" },
  480. },
  481. {
  482. name = "nutarch_wdt_at91",
  483. brief = "Watchdog Timer (AT91)",
  484. requires = { "HW_WDOG_AT91" },
  485. sources = { "arm/dev/atmel/wdt_at91.c" },
  486. },
  487. {
  488. name = "nutarch_ostimer_zero",
  489. brief = "System Timer (Zero)",
  490. requires = { "HW_TIMER_ZERO" },
  491. provides = { "NUT_OSTIMER_DEV" },
  492. sources = { "arm/dev/zero/os_timer.c" },
  493. },
  494. --
  495. -- Interrupt handling.
  496. --
  497. {
  498. name = "nutarch_arm_irqgba",
  499. brief = "Interrupt Handler (GBA)",
  500. requires = { "HW_MCU_GBA" },
  501. provides = { "DEV_IRQ_GBA" },
  502. sources = { "arm/dev/gba/ihndlr_gba.c" },
  503. },
  504. {
  505. name = "nutarch_arm_irqat91x40",
  506. brief = "Interrupt Handler (AT91R40XX)",
  507. requires = { "HW_MCU_AT91R40008" },
  508. provides = { "DEV_IRQ_AT91" },
  509. sources =
  510. {
  511. "arm/dev/atmel/ih_at91fiq.c",
  512. "arm/dev/atmel/ih_at91irq0.c",
  513. "arm/dev/atmel/ih_at91irq1.c",
  514. "arm/dev/atmel/ih_at91irq2.c",
  515. "arm/dev/atmel/ih_at91pio.c",
  516. "arm/dev/atmel/ih_at91swirq.c",
  517. "arm/dev/atmel/ih_at91tc0.c",
  518. "arm/dev/atmel/ih_at91tc1.c",
  519. "arm/dev/atmel/ih_at91tc2.c",
  520. "arm/dev/atmel/ih_at91uart0.c",
  521. "arm/dev/atmel/ih_at91uart1.c",
  522. "arm/dev/atmel/ih_at91wdi.c"
  523. },
  524. },
  525. {
  526. name = "nutarch_arm_irqat91sam7x",
  527. brief = "Interrupt Handler (SAM7X)",
  528. requires = { "HW_MCU_AT91SAM7X" },
  529. provides = { "DEV_IRQ_AT91" },
  530. sources =
  531. {
  532. "arm/dev/atmel/ih_at91fiq.c",
  533. "arm/dev/atmel/ih_at91sys.c",
  534. "arm/dev/atmel/ih_at91irq0.c",
  535. "arm/dev/atmel/ih_at91irq1.c",
  536. "arm/dev/atmel/ih_at91irq2.c",
  537. "arm/dev/atmel/ih_at91pioa.c",
  538. "arm/dev/atmel/ih_at91piob.c",
  539. "arm/dev/atmel/ih_at91pioc.c",
  540. "arm/dev/atmel/ih_at91spi0.c",
  541. "arm/dev/atmel/ih_at91spi1.c",
  542. "arm/dev/atmel/ih_at91ssc.c",
  543. "arm/dev/atmel/ih_at91swirq.c",
  544. "arm/dev/atmel/ih_at91tc0.c",
  545. "arm/dev/atmel/ih_at91tc1.c",
  546. "arm/dev/atmel/ih_at91tc2.c",
  547. "arm/dev/atmel/ih_at91adc.c",
  548. "arm/dev/atmel/ih_at91twi.c",
  549. "arm/dev/atmel/ih_at91uart0.c",
  550. "arm/dev/atmel/ih_at91uart1.c",
  551. "arm/dev/atmel/ih_at91emac.c",
  552. "arm/dev/atmel/ih_at91wdi.c",
  553. },
  554. },
  555. {
  556. name = "nutarch_arm_irqat91sam7s",
  557. brief = "Interrupt Handler (SAM7S)",
  558. requires = { "HW_MCU_AT91SAM7S" },
  559. provides = { "DEV_IRQ_AT91" },
  560. sources =
  561. {
  562. "arm/dev/atmel/ih_at91fiq.c",
  563. "arm/dev/atmel/ih_at91sys.c",
  564. "arm/dev/atmel/ih_at91irq0.c",
  565. "arm/dev/atmel/ih_at91irq1.c",
  566. "arm/dev/atmel/ih_at91irq2.c",
  567. "arm/dev/atmel/ih_at91pio.c",
  568. "arm/dev/atmel/ih_at91pioa.c",
  569. "arm/dev/atmel/ih_at91spi0.c",
  570. "arm/dev/atmel/ih_at91ssc.c",
  571. "arm/dev/atmel/ih_at91swirq.c",
  572. "arm/dev/atmel/ih_at91tc0.c",
  573. "arm/dev/atmel/ih_at91tc1.c",
  574. "arm/dev/atmel/ih_at91tc2.c",
  575. "arm/dev/atmel/ih_at91pwmc.c",
  576. "arm/dev/atmel/ih_at91adc.c",
  577. "arm/dev/atmel/ih_at91twi.c",
  578. "arm/dev/atmel/ih_at91uart0.c",
  579. "arm/dev/atmel/ih_at91uart1.c",
  580. "arm/dev/atmel/ih_at91wdi.c"
  581. },
  582. },
  583. {
  584. name = "nutarch_arm_irqat91sam7se",
  585. brief = "Interrupt Handler (SAM7SE)",
  586. requires = { "HW_MCU_AT91SAM7SE" },
  587. provides = { "DEV_IRQ_AT91" },
  588. sources =
  589. {
  590. "arm/dev/atmel/ih_at91fiq.c",
  591. "arm/dev/atmel/ih_at91sys.c",
  592. "arm/dev/atmel/ih_at91irq0.c",
  593. "arm/dev/atmel/ih_at91irq1.c",
  594. "arm/dev/atmel/ih_at91irq2.c",
  595. "arm/dev/atmel/ih_at91pio.c",
  596. "arm/dev/atmel/ih_at91pioa.c",
  597. "arm/dev/atmel/ih_at91piob.c",
  598. "arm/dev/atmel/ih_at91pioc.c",
  599. "arm/dev/atmel/ih_at91spi0.c",
  600. "arm/dev/atmel/ih_at91ssc.c",
  601. "arm/dev/atmel/ih_at91swirq.c",
  602. "arm/dev/atmel/ih_at91tc0.c",
  603. "arm/dev/atmel/ih_at91tc1.c",
  604. "arm/dev/atmel/ih_at91tc2.c",
  605. "arm/dev/atmel/ih_at91pwmc.c",
  606. "arm/dev/atmel/ih_at91adc.c",
  607. "arm/dev/atmel/ih_at91twi.c",
  608. "arm/dev/atmel/ih_at91uart0.c",
  609. "arm/dev/atmel/ih_at91uart1.c",
  610. "arm/dev/atmel/ih_at91wdi.c"
  611. },
  612. },
  613. {
  614. name = "nutarch_arm_irqat91sam926x",
  615. brief = "Interrupt Handler (SAM926X)",
  616. requires = { "HW_MCU_AT91SAM9260" },
  617. provides = { "DEV_IRQ_AT91" },
  618. sources =
  619. {
  620. "arm/dev/atmel/ih_at91emac.c",
  621. "arm/dev/atmel/ih_at91fiq.c",
  622. "arm/dev/atmel/ih_at91irq0.c",
  623. "arm/dev/atmel/ih_at91irq1.c",
  624. "arm/dev/atmel/ih_at91irq2.c",
  625. "arm/dev/atmel/ih_at91pioa.c",
  626. "arm/dev/atmel/ih_at91piob.c",
  627. "arm/dev/atmel/ih_at91pioc.c",
  628. "arm/dev/atmel/ih_at91spi0.c",
  629. "arm/dev/atmel/ih_at91spi1.c",
  630. "arm/dev/atmel/ih_at91ssc.c",
  631. "arm/dev/atmel/ih_at91swirq.c",
  632. "arm/dev/atmel/ih_at91tc0.c",
  633. "arm/dev/atmel/ih_at91tc1.c",
  634. "arm/dev/atmel/ih_at91tc2.c",
  635. "arm/dev/atmel/ih_at91twi.c",
  636. "arm/dev/atmel/ih_at91uart0.c",
  637. "arm/dev/atmel/ih_at91uart1.c",
  638. },
  639. },
  640. {
  641. name = "nutarch_arm_irqat91sam9g45",
  642. brief = "Interrupt Handler (SAM9G45)",
  643. requires = { "HW_MCU_AT91SAM9G45" },
  644. provides = { "DEV_IRQ_AT91" },
  645. sources =
  646. {
  647. "arm/dev/atmel/ih_at91sys.c",
  648. "arm/dev/atmel/ih_at91emac.c",
  649. "arm/dev/atmel/ih_at91fiq.c",
  650. "arm/dev/atmel/ih_at91irq0.c",
  651. "arm/dev/atmel/ih_at91pioa.c",
  652. "arm/dev/atmel/ih_at91piob.c",
  653. "arm/dev/atmel/ih_at91pioc.c",
  654. "arm/dev/atmel/ih_at91spi0.c",
  655. "arm/dev/atmel/ih_at91spi1.c",
  656. "arm/dev/atmel/ih_at91ssc.c",
  657. "arm/dev/atmel/ih_at91swirq.c",
  658. "arm/dev/atmel/ih_at91tc0.c",
  659. "arm/dev/atmel/ih_at91tc1.c",
  660. "arm/dev/atmel/ih_at91tc2.c",
  661. "arm/dev/atmel/ih_at91twi.c",
  662. "arm/dev/atmel/ih_at91uart0.c",
  663. "arm/dev/atmel/ih_at91uart1.c",
  664. },
  665. },
  666. {
  667. name = "nutarch_arm_irqat91sam9xe",
  668. brief = "Interrupt Handler (SAM9XE)",
  669. requires = { "HW_MCU_AT91SAM9XE" },
  670. provides = { "DEV_IRQ_AT91" },
  671. sources =
  672. {
  673. "arm/dev/atmel/ih_at91sys.c",
  674. "arm/dev/atmel/ih_at91emac.c",
  675. "arm/dev/atmel/ih_at91fiq.c",
  676. "arm/dev/atmel/ih_at91irq0.c",
  677. "arm/dev/atmel/ih_at91irq1.c",
  678. "arm/dev/atmel/ih_at91irq2.c",
  679. "arm/dev/atmel/ih_at91pioa.c",
  680. "arm/dev/atmel/ih_at91piob.c",
  681. "arm/dev/atmel/ih_at91pioc.c",
  682. "arm/dev/atmel/ih_at91spi0.c",
  683. "arm/dev/atmel/ih_at91spi1.c",
  684. "arm/dev/atmel/ih_at91ssc.c",
  685. "arm/dev/atmel/ih_at91swirq.c",
  686. "arm/dev/atmel/ih_at91tc0.c",
  687. "arm/dev/atmel/ih_at91tc1.c",
  688. "arm/dev/atmel/ih_at91tc2.c",
  689. "arm/dev/atmel/ih_at91twi.c",
  690. "arm/dev/atmel/ih_at91uart0.c",
  691. "arm/dev/atmel/ih_at91uart1.c",
  692. },
  693. },
  694. {
  695. name = "nutarch_arm_except_ent",
  696. brief = "Debug Exception Entries",
  697. sources =
  698. {
  699. "arm/debug/arm-da.S",
  700. "arm/debug/arm-pfa.S",
  701. "arm/debug/arm-swi.S",
  702. "arm/debug/arm-udf.S"
  703. },
  704. targets =
  705. {
  706. "arm/debug/arm-da.o",
  707. "arm/debug/arm-pfa.o",
  708. "arm/debug/arm-swi.o",
  709. "arm/debug/arm-udf.o"
  710. },
  711. },
  712. {
  713. name = "nutarch_arm_except_hdl",
  714. brief = "Debug Exception Handler",
  715. sources =
  716. {
  717. "arm/debug/common_xxx_handler.c",
  718. "arm/debug/default_da_handler.c",
  719. "arm/debug/default_pfa_handler.c",
  720. "arm/debug/default_swi_handler.c",
  721. "arm/debug/default_udf_handler.c",
  722. "arm/debug/reg-dump.c",
  723. "arm/debug/stackdump.c"
  724. },
  725. },
  726. --
  727. -- Device Drivers
  728. --
  729. {
  730. name = "nutarch_arm_debug",
  731. brief = "UART Debug Output (AT91)",
  732. requires = { "HW_UART_AT91" },
  733. provides = { "DEV_UART", "DEV_FILE", "DEV_WRITE" },
  734. sources = { "arm/dev/atmel/debug_at91.c",
  735. "arm/dev/atmel/at91_dbg0.c",
  736. "arm/dev/atmel/at91_dbg1.c",
  737. "arm/dev/atmel/at91_dbgu.c" }
  738. },
  739. {
  740. name = "nutarch_arm_usart0",
  741. brief = "USART0 Driver",
  742. description = "Hardware specific USART driver. Implements hardware "..
  743. "functions for the generic driver framework.",
  744. requires = { "HW_UART_AT91", "DEV_IRQ_AT91", "NUT_EVENT", "CRT_HEAPMEM" },
  745. provides =
  746. {
  747. "DEV_UART_SPECIFIC",
  748. "DEV_UART0_GPIO_RTS",
  749. "DEV_UART0_GPIO_CTS",
  750. "DEV_UART0_GPIO_HDX"
  751. },
  752. sources = { "arm/dev/atmel/usart0at91.c" },
  753. -- options =
  754. -- {
  755. -- {
  756. -- macro = "UART0_RXTX_ONLY",
  757. -- brief = "Receive/Transmit Only",
  758. -- description = "When selected, the driver will not support any handshake signals.",
  759. -- flavor = "boolean",
  760. -- exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
  761. -- file = "include/cfg/uart.h"
  762. -- },
  763. -- {
  764. -- macro = "UART0_HARDWARE_HANDSHAKE",
  765. -- brief = "Hardware Handshake",
  766. -- description = "When selected, the driver will support RTS/CTS hardware handshake. "..
  767. -- "Make sure, that the related peripheral pins are available.",
  768. -- flavor = "boolean",
  769. -- exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
  770. -- requires = { "HW_UART0_RTSCTS" },
  771. -- file = "include/cfg/uart.h"
  772. -- },
  773. -- {
  774. -- macro = "UART0_MODEM_CONTROL",
  775. -- brief = "Full Modem Control",
  776. -- description = "When selected, the driver will support full modem control. "..
  777. -- "Make sure, that all related peripheral pins are available.",
  778. -- flavor = "boolean",
  779. -- exclusivity = { "UART0_RXTX_ONLY", "UART0_HARDWARE_HANDSHAKE", "UART0_MODEM_CONTROL" },
  780. -- requires = { "HW_UART0_MODEM" },
  781. -- file = "include/cfg/uart.h"
  782. -- },
  783. -- },
  784. },
  785. {
  786. name = "nutarch_arm_usart1",
  787. brief = "USART1 Driver",
  788. description = "Hardware specific USART driver. Implements hardware "..
  789. "functions for the generic driver framework.",
  790. requires = { "HW_UART_AT91", "DEV_IRQ_AT91", "NUT_EVENT", "CRT_HEAPMEM" },
  791. provides =
  792. {
  793. "DEV_UART_SPECIFIC",
  794. "DEV_UART1_GPIO_RTS",
  795. "DEV_UART1_GPIO_CTS",
  796. "DEV_UART1_GPIO_HDX"
  797. },
  798. sources = { "arm/dev/atmel/usart1at91.c" },
  799. -- options =
  800. -- {
  801. -- {
  802. -- macro = "UART1_RXTX_ONLY",
  803. -- brief = "Receive/Transmit Only",
  804. -- description = "When selected, the driver will not support any handshake signals.",
  805. -- flavor = "boolean",
  806. -- exclusivity = { "UART1_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
  807. -- file = "include/cfg/uart.h"
  808. -- },
  809. -- {
  810. -- macro = "UART1_HARDWARE_HANDSHAKE",
  811. -- brief = "Hardware Handshake",
  812. -- description = "When selected, the driver will support RTS/CTS hardware handshake. "..
  813. -- "Make sure, that the related peripheral pins are available.",
  814. -- flavor = "boolean",
  815. -- exclusivity = { "UART1_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
  816. -- requires = { "HW_UART1_RTSCTS" },
  817. -- file = "include/cfg/uart.h"
  818. -- },
  819. -- {
  820. -- macro = "UART1_MODEM_CONTROL",
  821. -- brief = "Full Modem Control",
  822. -- description = "When selected, the driver will support full modem control. "..
  823. -- "Make sure, that all related peripheral pins are available.",
  824. -- flavor = "boolean",
  825. -- exclusivity = { "UART1_RXTX_ONLY", "UART1_HARDWARE_HANDSHAKE", "UART1_MODEM_CONTROL" },
  826. -- requires = { "HW_UART1_MODEM" },
  827. -- file = "include/cfg/uart.h"
  828. -- },
  829. -- },
  830. },
  831. {
  832. name = "nutarch_arm_usartd",
  833. brief = "DBGU USART Driver",
  834. description = "Hardware specific USART driver. Implements hardware "..
  835. "functions for the generic driver framework.",
  836. requires = { "HW_DBGU_AT91", "DEV_IRQ_AT91", "NUT_EVENT", "CRT_HEAPMEM" },
  837. provides =
  838. {
  839. "DEV_UART_SPECIFIC",
  840. "DEV_UARTD_GPIO_RTS",
  841. "DEV_UARTD_GPIO_CTS",
  842. "DEV_UARTD_GPIO_HDX"
  843. },
  844. sources = { "arm/dev/atmel/usartDat91.c" },
  845. -- options =
  846. -- {
  847. -- {
  848. -- macro = "UARTD_RXTX_ONLY",
  849. -- brief = "Receive/Transmit Only",
  850. -- description = "When selected, the driver will not support any handshake signals.",
  851. -- flavor = "boolean",
  852. -- file = "include/cfg/uart.h"
  853. -- },
  854. -- },
  855. },
  856. {
  857. name = "nutarch_arm_usartcb_at91ctl",
  858. brief = "USART Hardware Control",
  859. requires = { "HW_UART_AT91" },
  860. provides = { "DEV_UART_HWCTRL" },
  861. sources = { "arm/dev/atmel/usart_at91ctl.c" }
  862. },
  863. {
  864. name = "nutarch_arm_usartcb_at91npl",
  865. brief = "USART NPL Support",
  866. description = "Currently available for AT91R40008 CPUs only.",
  867. requires = { "HW_MCU_AT91R40008", "DEV_UART_HWCTRL", "DEV_NPL", "HW_UART_AT91", "DEV_IRQ_AT91", "NUT_EVENT" },
  868. provides = { "DEV_UART_CBRXTX" },
  869. sources = {
  870. "arm/dev/atmel/usart_cb_at91npl.c",
  871. "arm/dev/atmel/usart0cb_at91npl.c"
  872. }
  873. },
  874. {
  875. name = "nutarch_arm_ahdlc",
  876. brief = "AHDLC Protocol",
  877. description = "HDLC driver, required for PPP. This is an EXPERIMENTAL driver!",
  878. requires = { "HW_UART_AT91", "HW_PDC_AT91", "NUT_EVENT" },
  879. provides = { "PROTO_HDLC" },
  880. sources = { "arm/dev/atmel/at91_ahdlc.c" },
  881. options =
  882. {
  883. {
  884. macro = "NUT_THREAD_AHDLCRXSTACK",
  885. brief = "Receiver Thread Stack",
  886. description = "Number of bytes to be allocated for the stack of the AHDLC receive thread.",
  887. default = "1024",
  888. type = "integer",
  889. file = "include/cfg/ahdlc.h"
  890. },
  891. {
  892. macro = "NUT_AHDLC_RECV_DMA_SIZE",
  893. brief = "AT91 RXDMA Size",
  894. description = "Number of bytes to be allocated for the USART receive DMA buffer.",
  895. default = "64",
  896. type = "integer",
  897. file = "include/cfg/ahdlc.h"
  898. }
  899. }
  900. },
  901. {
  902. name = "nutarch_at91_chlcd",
  903. brief = "Character LCD Driver (AT91)",
  904. description = "Parallel or serial connected displays like\n"..
  905. "HD44780, KS0066, KS0073 and others.\n",
  906. requires = { "HW_MCU_AT91" },
  907. provides = { "DEV_FILE", "DEV_WRITE" },
  908. sources = { "arm/dev/atmel/charlcd_at91.c" },
  909. options =
  910. {
  911. --
  912. -- Define selection of supported driver chips
  913. --
  914. {
  915. macro = "LCD_HD44780",
  916. brief = "HD44780 Driver",
  917. description = "Tested on the EIR 1.0 with 2x16 and 4x20 character LCD.",
  918. exclusivity = { "LCD_HD44780", "LCD_KS0066", "LCD_KS0073", "LCD_ST7036" },
  919. flavor = "booldata",
  920. provides = { "LCD_GPIO" },
  921. file = "include/cfg/lcd.h",
  922. },
  923. {
  924. macro = "LCD_KS0066",
  925. brief = "KS0066 Driver",
  926. description = "Currently not tested.",
  927. exclusivity = { "LCD_HD44780", "LCD_KS0066", "LCD_KS0073", "LCD_ST7036" },
  928. flavor = "booldata",
  929. provides = { "LCD_GPIO" },
  930. file = "include/cfg/lcd.h",
  931. },
  932. {
  933. macro = "LCD_KS0073",
  934. brief = "KS0073 Driver",
  935. description = "Currently not tested.",
  936. exclusivity = { "LCD_HD44780", "LCD_KS0066", "LCD_KS0073", "LCD_ST7036" },
  937. flavor = "booldata",
  938. provides = { "LCD_GPIO" },
  939. file = "include/cfg/lcd.h",
  940. },
  941. {
  942. macro = "LCD_ST7036",
  943. brief = "ST7036 Driver",
  944. description = "Serial connected display via SPI.\nCurrently not tested.",
  945. exclusivity = { "LCD_HD44780", "LCD_KS0066", "LCD_KS0073", "LCD_ST7036" },
  946. flavor = "booldata",
  947. provides = { "LCD_SPI" },
  948. file = "include/cfg/lcd.h",
  949. },
  950. --
  951. -- Support for timing related parameters
  952. --
  953. {
  954. macro = "LCD_ROWS",
  955. brief = "Rows",
  956. description = "The number of available display rows, either 1, 2 or 4.",
  957. default = "2",
  958. flavor = "integer",
  959. file = "include/cfg/lcd.h"
  960. },
  961. {
  962. macro = "LCD_COLS",
  963. brief = "Columns",
  964. description = "The number of available display colums, either 8, 16, 20 or 40.",
  965. default = "16",
  966. flavor = "integer",
  967. file = "include/cfg/lcd.h"
  968. },
  969. {
  970. macro = "LCD_PW_EH",
  971. brief = "Enable Pulse Stretch",
  972. description = "Set a value here if the system is to fast to guarantee a minimum enable high time:\n"..
  973. "For HD44780 with Vcc=5.0V this is 230ns\n"..
  974. "For HD44780 with Vcc=3.3V this is 500ns\n\n"..
  975. "This value uses a NOP-Loop to stretch the enable Pulse and is directly dependand on the "..
  976. "systems CPU speed. It also may differ for other chips.\n\n"..
  977. "For a 5V driven display connected to EIR 1.0, this value can be left empty while it must "..
  978. "be set to about 5 for a 3.3V driven HD44780 LCD.",
  979. requires = { "LCD_GPIO" },
  980. flavor = "integer",
  981. file = "include/cfg/lcd.h"
  982. },
  983. {
  984. macro = "LCD_E2E_DLY",
  985. brief = "Enable to Enable Delay",
  986. description = "Time for Enable to Enable delay in µs. This is the timespan between two\n"..
  987. "consecutive accesses of the 4-bit or 8-bit bus.\n For SPI-bus driven chips, this "..
  988. "is the /CS to /CS delay. This function uses NutMicroDelay()",
  989. default = "80",
  990. flavor = "integer",
  991. file = "include/cfg/lcd.h"
  992. },
  993. {
  994. macro = "LCD_SLEEP_DLY",
  995. brief = "Sleep after Data",
  996. description = "Enable this option on a timing critical system.\n"..
  997. "Instead of cosecutive accessing the display this option will enable a NutSleep(1)\n"..
  998. "After each data or command written out to the LCD.",
  999. flavor = "boolean",
  1000. file = "include/cfg/lcd.h"
  1001. },
  1002. --
  1003. -- Selection of parallel interface parameters
  1004. --
  1005. {
  1006. macro = "LCD_IF_8BIT",
  1007. brief = "8-Bit Mode",
  1008. description = "Select parallel bus width is 8 bit.\n"..
  1009. "Splitting single bus lines accross ports is not "..
  1010. "supported for data bit lines.\n"..
  1011. "In 8 bit mode all data lines have to be aligned "..
  1012. "in one row.\n"..
  1013. "This option is actually not supported in this driver.",
  1014. requires = { "LCD_GPIO" },
  1015. flavor = "booldata",
  1016. exclusivity = { "LCD_IF_8BIT", "LCD_IF_4BIT" },
  1017. provides = { "LCD_IF_8BIT" },
  1018. file = "include/cfg/lcd.h"
  1019. },
  1020. {
  1021. macro = "LCD_IF_4BIT",
  1022. brief = "Use 4-Bit Mode",
  1023. description = "Select parallel bus width is 4 bit."..
  1024. "Splitting single bus lines accross ports is not"..
  1025. "supported for data bit lines.",
  1026. requires = { "LCD_GPIO" },
  1027. flavor = "booldata",
  1028. exclusivity = { "LCD_IF_8BIT", "LCD_IF_4BIT" },
  1029. provides = { "LCD_IF_4BIT" },
  1030. file = "include/cfg/lcd.h"
  1031. },
  1032. --
  1033. -- Selection of parallel interface parameters
  1034. --
  1035. {
  1036. macro = "LCD_DATA_PIO_ID",
  1037. brief = "Port of LCD data pins",
  1038. requires = { "LCD_GPIO" },
  1039. description = "Port of the below defined data pins. Valid for "..
  1040. "both, single bit definitions or LSB.",
  1041. type = "enumerated",
  1042. choices = at91_pio_id_choice,
  1043. file = "include/cfg/arch/armpio.h"
  1044. },
  1045. {
  1046. macro = "LCD_DATA_LSB",
  1047. brief = "Least Significant Data Bit",
  1048. requires = { "LCD_GPIO" },
  1049. description = "Bit number of the least significant data bit. The remaining "..
  1050. "data bits must be connected to the following port bits.",
  1051. type = "enumerated",
  1052. flavor = "booldata",
  1053. choices = mcu_32bit_choice,
  1054. file = "include/cfg/arch/armpio.h"
  1055. },
  1056. {
  1057. macro = "LCD_DATA_BIT0",
  1058. brief = "Data Bit 0",
  1059. requires = { "LCD_GPIO", "LCD_IF_4BIT" },
  1060. description = "Port bit connected to LCD data bit 0.\n"..
  1061. "Not used if LCD_DATA_LSB is defined.\n",
  1062. type = "enumerated",
  1063. choices = mcu_32bit_choice,
  1064. file = "include/cfg/arch/armpio.h"
  1065. },
  1066. {
  1067. macro = "LCD_DATA_BIT1",
  1068. brief = "Data Bit 1",
  1069. requires = { "LCD_GPIO", "LCD_IF_4BIT" },
  1070. type = "enumerated",
  1071. requires = { "LCD_IF_4BIT" },
  1072. choices = mcu_32bit_choice,
  1073. file = "include/cfg/arch/armpio.h"
  1074. },
  1075. {
  1076. macro = "LCD_DATA_BIT2",
  1077. brief = "Data Bit 2",
  1078. requires = { "LCD_GPIO", "LCD_IF_4BIT" },
  1079. type = "enumerated",
  1080. choices = mcu_32bit_choice,
  1081. file = "include/cfg/arch/armpio.h"
  1082. },
  1083. {
  1084. macro = "LCD_DATA_BIT3",
  1085. brief = "Data Bit 3",
  1086. requires = { "LCD_GPIO", "LCD_IF_4BIT" },
  1087. type = "enumerated",
  1088. choices = mcu_32bit_choice,
  1089. file = "include/cfg/arch/armpio.h"
  1090. },
  1091. --
  1092. -- Selection of serial interface parameters
  1093. --
  1094. {
  1095. macro = "LCD_CLK_PIO_ID",
  1096. brief = "SPI Clock Port",
  1097. description = "Port ID of the SPI clock line.\n",
  1098. requires = { "LCD_SPI" },
  1099. type = "enumerated",
  1100. choices = at91_pio_id_choice,
  1101. file = "include/cfg/arch/armpio.h"
  1102. },
  1103. {
  1104. macro = "LCD_CLK_BIT",
  1105. brief = "SPI Clock Bit",
  1106. description = "Port bit of the SPI clock line. ",
  1107. requires = { "LCD_SPI" },
  1108. type = "enumerated",
  1109. choices = mcu_32bit_choice,
  1110. file = "include/cfg/arch/armpio.h"
  1111. },
  1112. {
  1113. macro = "LCD_MOSI_PIO_ID",
  1114. brief = "SPI Clock Port",
  1115. description = "Port ID of the SPI MOSI line.\n",
  1116. requires = { "LCD_SPI" },
  1117. type = "enumerated",
  1118. choices = at91_pio_id_choice,
  1119. file = "include/cfg/arch/armpio.h"
  1120. },
  1121. {
  1122. macro = "LCD_MOSI_BIT",
  1123. brief = "SPI MOSI Bit",
  1124. description = "Port bit of the SPI clock line. ",
  1125. requires = { "LCD_SPI" },
  1126. type = "enumerated",
  1127. choices = mcu_32bit_choice,
  1128. file = "include/cfg/arch/armpio.h"
  1129. },
  1130. --
  1131. -- Selection of display control lines
  1132. --
  1133. {
  1134. macro = "LCD_EN_PIO_ID",
  1135. brief = "LCD Enable Port",
  1136. description = "Port ID of the Enable line.\n"..
  1137. "For parallel chips this is the active high enable signal.\n"..
  1138. "For serial chips this is the active low chip select line.",
  1139. type = "enumerated",
  1140. choices = at91_pio_id_choice,
  1141. file = "include/cfg/arch/armpio.h"
  1142. },
  1143. {
  1144. macro = "LCD_EN_BIT",
  1145. brief = "Enable Bit",
  1146. description = "Port bit of the LCD enable line. "..
  1147. "This line must be exclusively reserved."..
  1148. "For parallel chips this is the active high enable signal.\n"..
  1149. "For serial chips this is the active low chip select line.",
  1150. default = "4",
  1151. type = "enumerated",
  1152. choices = mcu_32bit_choice,
  1153. file = "include/cfg/arch/armpio.h"
  1154. },
  1155. {
  1156. macro = "LCD_RS_PIO_ID",
  1157. brief = "LCD Register Select Port",
  1158. description = "Port ID of the Register Select line.",
  1159. type = "enumerated",
  1160. choices = at91_pio_id_choice,
  1161. flavor = "integer",
  1162. file = "include/cfg/arch/armpio.h"
  1163. },
  1164. {
  1165. macro = "LCD_RS_BIT",
  1166. brief = "Register Select Bit",
  1167. description = "Port bit of the LCD register select line. "..
  1168. "May be shared.",
  1169. default = "7",
  1170. type = "enumerated",
  1171. choices = mcu_32bit_choice,
  1172. file = "include/cfg/arch/armpio.h"
  1173. },
  1174. --
  1175. -- Selection of optional display control lines
  1176. --
  1177. {
  1178. macro = "LCD_RW_PIO_ID",
  1179. brief = "LCD Read/Write Select Port",
  1180. description = "Optional port base of the Read/Write Select line."..
  1181. "Driver supports display confiurations with R/W tied to 0.\n"..
  1182. "For this, leave this entry blank.",
  1183. type = "enumerated",
  1184. choices = at91_pio_id_choice,
  1185. flavor = "integer",
  1186. file = "include/cfg/arch/armpio.h"
  1187. },
  1188. {
  1189. macro = "LCD_RW_BIT",
  1190. brief = "Read/Write Bit",
  1191. description = "Optional port ID of the Read/Write Select line."..
  1192. "Driver supports display confiurations with R/W tied to 0.\n"..
  1193. "For this, leave this entry blank.",
  1194. type = "enumerated",
  1195. choices = mcu_32bit_choice,
  1196. file = "include/cfg/arch/armpio.h"
  1197. },
  1198. {
  1199. macro = "LCD_EN2_PIO_ID",
  1200. brief = "LCD Enable Port 2",
  1201. requires = { "LCD_GPIO" },
  1202. description = "Optional port base of the 2nd Enable line. "..
  1203. "This line must be exclusively reserved.\n"..
  1204. "This is only used on large 4x40 character displays.",
  1205. type = "enumerated",
  1206. choices = at91_pio_id_choice,
  1207. file = "include/cfg/arch/armpio.h"
  1208. },
  1209. {
  1210. macro = "LCD_EN2_BIT",
  1211. brief = "LCD Enable-2 Bit",
  1212. requires = { "LCD_GPIO" },
  1213. description = "Optional port bit of the 2nd LCD enable line. "..
  1214. "This is only used on large 4x40 character displays.\n"..
  1215. "This line must be exclusively reserved.",
  1216. type = "enumerated",
  1217. choices = mcu_32bit_choice,
  1218. file = "include/cfg/arch/armpio.h"
  1219. },
  1220. {
  1221. macro = "LCD_RST_PIO_ID",
  1222. brief = "LCD Reset Port",
  1223. description = "Optional port base of the LCD Reset line. "..
  1224. "This line must be exclusively reserved.\n"..
  1225. "Some LCD Drivers support an optional reset line.\n"..
  1226. "This is currently not supported by this driver!",
  1227. type = "enumerated",
  1228. choices = at91_pio_id_choice,
  1229. file = "include/cfg/arch/armpio.h"
  1230. },
  1231. {
  1232. macro = "LCD_RST_BIT",
  1233. brief = "LCD Reset Bit",
  1234. description = "Optional port bit of the 2nd LCD enable line. "..
  1235. "This line must be exclusively reserved.\n"..
  1236. "Some LCD Drivers support an optional reset line.\n"..
  1237. "This is currently not supported by this driver!",
  1238. type = "enumerated",
  1239. choices = mcu_32bit_choice,
  1240. file = "include/cfg/arch/armpio.h"
  1241. },
  1242. },
  1243. },
  1244. {
  1245. name = "nutarch_gba_debug",
  1246. brief = "LCD Debug Output (GBA)",
  1247. requires = { "HW_LCD_GBA" },
  1248. provides = { "DEV_UART", "DEV_FILE", "DEV_WRITE" },
  1249. sources = { "arm/dev/gba/debug_gba.c" }
  1250. },
  1251. {
  1252. name = "nutarch_arm_ax88796",
  1253. brief = "AX88796 Driver (AT91)",
  1254. description = "LAN driver for Asix 88796. AT91 only.",
  1255. requires = { "HW_MCU_AT91R40008", "NUT_EVENT", "NUT_TIMER" },
  1256. provides = { "NET_MAC" },
  1257. sources = { "arm/dev/ax88796.c" },
  1258. },
  1259. {
  1260. name = "nutarch_arm_dm9000e",
  1261. brief = "DM9000E Driver (AT91)",
  1262. description = "LAN driver for Davicom DM9000E. AT91 only.",
  1263. requires = { "HW_EBI_AT91", "NUT_EVENT", "NUT_TIMER" },
  1264. provides = { "NET_MAC" },
  1265. sources = { "arm/dev/dm9000e.c" },
  1266. options =
  1267. {
  1268. {
  1269. macro = "NIC_BASE_ADDR",
  1270. brief = "Controller Base Address",
  1271. description = "The driver supports memory mapped controllers only, using "..
  1272. "the specified based address.\n\n"..
  1273. "The Ethernut 3 reference design uses 0x20000000.\n"..
  1274. "The ELEKTOR Internet Radio uses 0x30000000.\n",
  1275. file = "include/cfg/memory.h"
  1276. },
  1277. {
  1278. macro = "NIC_SIGNAL_IRQ",
  1279. brief = "Ethernet Interrupt",
  1280. description = "Ethernet controller interrupt.",
  1281. type = "enumerated",
  1282. choices = avr_irq_choice,
  1283. file = "include/cfg/arch/armpio.h"
  1284. }
  1285. }
  1286. },
  1287. {
  1288. name = "nutarch_arm_at91_emac",
  1289. brief = "AT91 EMAC Driver",
  1290. description = "LAN driver for AT91SAM7X and AT91SAM9260 and AT91SAM9G45.",
  1291. requires = { "HW_EMAC_AT91", "NUT_EVENT", "NUT_TIMER" },
  1292. provides = { "NET_MAC" },
  1293. sources = { "arm/dev/atmel/at91_emac.c" },
  1294. options =
  1295. {
  1296. {
  1297. macro = "PHY_PWRDN_BIT",
  1298. brief = "PHY Power Down Bit",
  1299. description = "For the SAM7X default is 18.\n\n",
  1300. provides = { "PHY_PWRDN_CONTROL" },
  1301. flavor = "booldata",
  1302. type = "enumerated",
  1303. choices = mcu_32bit_choice,
  1304. file = "include/cfg/arch/armpio.h"
  1305. },
  1306. {
  1307. macro = "PHY_PWRDN_NEGPOL",
  1308. brief = "PHY Power Down Polarity",
  1309. description = "Select this, if the PHY is powered down by a low signal.",
  1310. requires = { "PHY_PWRDN_CONTROL" },
  1311. flavor = "boolean",
  1312. file = "include/cfg/arch/armpio.h"
  1313. },
  1314. {
  1315. macro = "NUT_THREAD_NICRXSTACK",
  1316. brief = "Receiver Thread Stack",
  1317. description = "Number of bytes to be allocated for the stack of the NIC receive thread.",
  1318. flavor = "booldata",
  1319. type = "integer",
  1320. file = "include/cfg/dev.h"
  1321. },
  1322. {
  1323. macro = "EMAC_RX_BUFFERS",
  1324. brief = "Receive Buffers",
  1325. description = "Number of 128 byte receive buffers.\n"..
  1326. "Increase to handle high traffic situations.\n"..
  1327. "Decrease to handle low memory situations.\n"..
  1328. "Default is 32.\n",
  1329. flavor = "booldata",
  1330. type = "integer",
  1331. file = "include/cfg/dev.h"
  1332. },
  1333. {
  1334. macro = "EMAC_TX_BUFSIZ",
  1335. brief = "Transmit Buffer Size",
  1336. description = "The driver will allocate two transmit buffers.\n"..
  1337. "Can be decreased in low memory situations. Be aware, "..
  1338. "that this may break your network application. Do not "..
  1339. "change this without exactly knowing the consequences.\n"..
  1340. "Default is 1536.\n",
  1341. flavor = "booldata",
  1342. type = "integer",
  1343. file = "include/cfg/dev.h"
  1344. },
  1345. {
  1346. macro = "EMAC_LINK_LOOPS",
  1347. brief = "Link Polling Loops",
  1348. description = "This simple implementation runs a dumb polling loop "..
  1349. "while waiting for the Ethernet link status.\n"..
  1350. "If you experience link problems, increasing this value "..
  1351. "may help.\n"..
  1352. "Default is 10000.\n",
  1353. flavor = "booldata",
  1354. type = "integer",
  1355. file = "include/cfg/dev.h"
  1356. },
  1357. }
  1358. },
  1359. {
  1360. name = "nutarch_arm_twi_at91",
  1361. brief = "AT91 TWI",
  1362. description = "AT91 hardware TWI support.",
  1363. requires = { "HW_TWI_AT91" },
  1364. provides = { "DEV_TWI" },
  1365. sources = { "arm/dev/atmel/at91_twi.c" },
  1366. options =
  1367. {
  1368. {
  1369. macro = "I2C_DEFAULT_SPEED",
  1370. brief = "Default Speed",
  1371. description = "Default speed for this bus. Different speeds can be set by software.\n",
  1372. default = "100",
  1373. type = "enumerated",
  1374. choices = { "", "75", "100", "400" },
  1375. file = "include/cfg/twi.h"
  1376. },
  1377. },
  1378. },
  1379. {
  1380. name = "nutarch_arm_i2cbus_at91",
  1381. brief = "AT91 I2C Bus Controller",
  1382. description = "Early version of the AT91 hardware based I2C bus controller.",
  1383. requires = { "HW_TWI_AT91" },
  1384. provides = { "I2CBUS_CONTROLLER" },
  1385. sources = { "arm/dev/atmel/i2cbus_at91.c" },
  1386. },
  1387. {
  1388. name = "nutarch_arm_adc_at91",
  1389. brief = "AT91 ADC",
  1390. description = "ADC interface for AT91 (currently SAM7 only).",
  1391. requires = { "HW_MCU_AT91SAM7X" },
  1392. provides = { "DEV_ADC" },
  1393. sources = { "arm/dev/atmel/at91_adc.c" },
  1394. },
  1395. {
  1396. name = "nutarch_arm_spimmc_at91",
  1397. brief = "AT91 SPI MMC Access",
  1398. description = "Low level MMC interface for AT91.",
  1399. requires = { "HW_SPI_AT91" },
  1400. provides = { "DEV_MMCLL" },
  1401. sources = { "arm/dev/atmel/spimmc_at91.c" },
  1402. },
  1403. {
  1404. name = "nutarch_arm_mci_at91",
  1405. brief = "AT91 MCI Device",
  1406. description = "MCI based block device driver.",
  1407. requires = { "HW_MCI_AT91" },
  1408. provides = { "DEV_BLOCK" },
  1409. sources = { "arm/dev/atmel/at91_mci.c" },
  1410. options =
  1411. {
  1412. {
  1413. macro = "MCI0_PIN_SHARING",
  1414. brief = "Share Pins",
  1415. description = "If enabled, the controller will release the peripheral pins when the MCI "..
  1416. "is not used and the pins may be used for other purposes.",
  1417. flavor = "boolean",
  1418. file = "include/cfg/arch/armpio.h"
  1419. },
  1420. {
  1421. macro = "MCI_SLOTA",
  1422. brief = "Use Slot A",
  1423. description = "If enabled, MCI slot A will be used. Otherwise the driver will use slot B.",
  1424. flavor = "boolean",
  1425. file = "include/cfg/mmci.h"
  1426. },
  1427. },
  1428. },
  1429. --
  1430. -- Special Functions
  1431. --
  1432. {
  1433. name = "nutarch__arm_init",
  1434. brief = "AT91 Initialization",
  1435. description = "Contains spurious interrupt handler.",
  1436. requires = { "HW_MCU_AT91" },
  1437. sources = { "arm/dev/atmel/at91init.c" },
  1438. },
  1439. {
  1440. name = "nutarch_arm_rstc",
  1441. brief = "AT91 Reset Controller",
  1442. description = "AT91 reset controller support.",
  1443. requires = { "HW_MCU_AT91" },
  1444. provides = { "DEV_MCU_RESET" },
  1445. sources = { "arm/dev/atmel/at91_reset.c" },
  1446. },
  1447. {
  1448. name = "nutarch__arm_gpio_at91",
  1449. brief = "AT91 GPIO",
  1450. description = "Generic port I/O API.",
  1451. requires = { "HW_MCU_AT91" },
  1452. sources =
  1453. {
  1454. "arm/dev/atmel/gpio_at91.c" ,
  1455. "arm/dev/atmel/gpioa_at91.c",
  1456. "arm/dev/atmel/gpiob_at91.c",
  1457. "arm/dev/atmel/gpioc_at91.c"
  1458. },
  1459. },
  1460. {
  1461. name = "nutarch_arm_spibus_at91",
  1462. brief = "AT91 SPI Bus Controller",
  1463. description = "Supports up to two bus controllers.\n\n"..
  1464. "This early release had been tested on the AT91SAM7SE only."..
  1465. "Due to the SDRAM issue on this die, the PDC mode had been "..
  1466. "left unfinished.",
  1467. requires = { "HW_SPI_AT91" },
  1468. provides = { "SPIBUS_CONTROLLER" },
  1469. sources =
  1470. {
  1471. "arm/dev/atmel/spibus_at91.c",
  1472. "arm/dev/atmel/spibus0at91.c",
  1473. "arm/dev/atmel/spibus1at91.c"
  1474. },
  1475. options =
  1476. {
  1477. {
  1478. macro = "SPIBUS0_POLLING_MODE",
  1479. brief = "Polling Mode (First Controller)",
  1480. description = "If enabled, the controller will use polling mode. By default "..
  1481. "interrupt mode is used.",
  1482. flavor = "boolean",
  1483. file = "include/cfg/spi.h"
  1484. },
  1485. {
  1486. macro = "SPIBUS0_DOUBLE_BUFFER",
  1487. brief = "PDC Mode (First Controller)",
  1488. description = "If enabled, the controller will use PDC mode.\n\n"..
  1489. "Under development. Works fine on SAM7X",
  1490. provides = { "SPIBUS0_DOUBLE_BUFFER" },
  1491. flavor = "boolean",
  1492. file = "include/cfg/spi.h"
  1493. },
  1494. {
  1495. macro = "SPIBUS0_DOUBLE_BUFFER_HEURISTIC",
  1496. brief = "Heuristicaly use polling mode for short transfers instead of PDC",
  1497. description = "If enabled, the controller will use the polling mode instead of PDC mode for short "..
  1498. "transfers (currently less that 4 byte), as setup of PDC might result in larger overhead. "..
  1499. "Depends on the selected SPI clock\n\n",
  1500. requires = { "SPIBUS0_DOUBLE_BUFFER" },
  1501. flavor = "boolean",
  1502. file = "include/cfg/spi.h"
  1503. },
  1504. {
  1505. macro = "SPIBUS0_PIN_SHARING",
  1506. brief = "Share Pins (First Controller)",
  1507. description = "If enabled, the controller will release the peripheral pins when releasing "..
  1508. "the bus. This way the pins may be used for other purposes when SPI is inactive.",
  1509. flavor = "boolean",
  1510. file = "include/cfg/arch/armpio.h"
  1511. },
  1512. {
  1513. macro = "SPI0_CS0_PIO_ID",
  1514. brief = "CS0 Port ID (First Controller)",
  1515. description = "ID of the port used for SPI bus 0 chip select 0.",
  1516. type = "enumerated",
  1517. choices = function() return GetAt91PioIds() end,
  1518. file = "include/cfg/arch/armpio.h"
  1519. },
  1520. {
  1521. macro = "SPI0_CS0_PIO_BIT",
  1522. brief = "CS0 Port Bit (First Controller)",
  1523. description = "Port bit used for SPI bus 0 chip select 0.",
  1524. type = "enumerated",
  1525. choices = mcu_32bit_choice,
  1526. flavor = "integer",
  1527. file = "include/cfg/arch/armpio.h"
  1528. },
  1529. {
  1530. macro = "SPI0_CS1_PIO_ID",
  1531. brief = "CS1 Port ID (First Controller)",
  1532. description = "ID of the port used for SPI bus 0 chip select 1.",
  1533. type = "enumerated",
  1534. choices = function() return GetAt91PioIds() end,
  1535. file = "include/cfg/arch/armpio.h"
  1536. },
  1537. {
  1538. macro = "SPI0_CS1_PIO_BIT",
  1539. brief = "CS1 Port Bit (First Controller)",
  1540. description = "Port bit used for SPI bus 0 chip select 1.",
  1541. type = "enumerated",
  1542. choices = mcu_32bit_choice,
  1543. flavor = "integer",
  1544. file = "include/cfg/arch/armpio.h"
  1545. },
  1546. {
  1547. macro = "SPI0_CS2_PIO_ID",
  1548. brief = "CS2 Port ID (First Controller)",
  1549. description = "ID of the port used for SPI bus 0 chip select 2.",
  1550. type = "enumerated",
  1551. choices = function() return GetAt91PioIds() end,
  1552. file = "include/cfg/arch/armpio.h"
  1553. },
  1554. {
  1555. macro = "SPI0_CS2_PIO_BIT",
  1556. brief = "CS2 Port Bit (First Controller)",
  1557. description = "Port bit used for SPI bus 0 chip select 2.",
  1558. type = "enumerated",
  1559. choices = mcu_32bit_choice,
  1560. flavor = "integer",
  1561. file = "include/cfg/arch/armpio.h"
  1562. },
  1563. {
  1564. macro = "SPI0_CS3_PIO_ID",
  1565. brief = "CS3 Port ID (First Controller)",
  1566. description = "ID of the port used for SPI bus 0 chip select 3.",
  1567. type = "enumerated",
  1568. choices = function() return GetAt91PioIds() end,
  1569. file = "include/cfg/arch/armpio.h"
  1570. },
  1571. {
  1572. macro = "SPI0_CS3_PIO_BIT",
  1573. brief = "CS3 Port Bit (First Controller)",
  1574. description = "Port bit used for SPI bus 0 chip select 3.",
  1575. type = "enumerated",
  1576. choices = mcu_32bit_choice,
  1577. flavor = "integer",
  1578. file = "include/cfg/arch/armpio.h"
  1579. },
  1580. {
  1581. macro = "SPIBUS1_POLLING_MODE",
  1582. brief = "Polling Mode (Second Controller)",
  1583. description = "If enabled, the controller will use polling mode. By default "..
  1584. "interrupt mode is used.",
  1585. flavor = "boolean",
  1586. file = "include/cfg/spi.h"
  1587. },
  1588. {
  1589. macro = "SPIBUS1_DOUBLE_BUFFER",
  1590. brief = "PDC Mode (Second Controller)",
  1591. description = "If enabled, the controller will use PDC mode.\n\n"..
  1592. "Under development. Works fine on SAM7X",
  1593. provides = { "SPIBUS1_DOUBLE_BUFFER" },
  1594. flavor = "boolean",
  1595. file = "include/cfg/spi.h"
  1596. },
  1597. {
  1598. macro = "SPIBUS1_DOUBLE_BUFFER_HEURISTIC",
  1599. brief = "Heuristicaly use polling mode for short transfers instead of PDC",
  1600. description = "If enabled, the controller will use the polling mode instead of PDC mode for short "..
  1601. "transfers (currently less that 4 byte), as setup of PDC might result in larger overhead. "..
  1602. "Depends on the selected SPI clock\n\n",
  1603. requires = { "SPIBUS1_DOUBLE_BUFFER" },
  1604. flavor = "boolean",
  1605. file = "include/cfg/spi.h"
  1606. },
  1607. {
  1608. macro = "SPI1_CS0_PIO_ID",
  1609. brief = "CS0 Port ID (Second Controller)",
  1610. description = "ID of the port used for SPI bus 1 chip select 0.",
  1611. type = "enumerated",
  1612. choices = function() return GetAt91PioIds() end,
  1613. file = "include/cfg/arch/armpio.h"
  1614. },
  1615. {
  1616. macro = "SPI1_CS0_PIO_BIT",
  1617. brief = "CS0 Port Bit (Second Controller)",
  1618. description = "Port bit used for SPI bus 1 chip select 0.",
  1619. type = "enumerated",
  1620. choices = mcu_32bit_choice,
  1621. flavor = "integer",
  1622. file = "include/cfg/arch/armpio.h"
  1623. },
  1624. {
  1625. macro = "SPI1_CS1_PIO_ID",
  1626. brief = "CS1 Port ID (Second Controller)",
  1627. description = "ID of the port used for SPI bus 1 chip select 1.",
  1628. type = "enumerated",
  1629. choices = function() return GetAt91PioIds() end,
  1630. file = "include/cfg/arch/armpio.h"
  1631. },
  1632. {
  1633. macro = "SPI1_CS1_PIO_BIT",
  1634. brief = "CS1 Port Bit (Second Controller)",
  1635. description = "Port bit used for SPI bus 1 chip select 1.",
  1636. type = "enumerated",
  1637. choices = mcu_32bit_choice,
  1638. flavor = "integer",
  1639. file = "include/cfg/arch/armpio.h"
  1640. },
  1641. {
  1642. macro = "SPI1_CS2_PIO_ID",
  1643. brief = "CS2 Port ID (Second Controller)",
  1644. description = "ID of the port used for SPI bus 1 chip select 2.",
  1645. type = "enumerated",
  1646. choices = function() return GetAt91PioIds() end,
  1647. file = "include/cfg/arch/armpio.h"
  1648. },
  1649. {
  1650. macro = "SPI1_CS2_PIO_BIT",
  1651. brief = "CS2 Port Bit (Second Controller)",
  1652. description = "Port bit used for SPI bus 1 chip select 2.",
  1653. type = "enumerated",
  1654. choices = mcu_32bit_choice,
  1655. flavor = "integer",
  1656. file = "include/cfg/arch/armpio.h"
  1657. },
  1658. {
  1659. macro = "SPI1_CS3_PIO_ID",
  1660. brief = "CS3 Port ID (Second Controller)",
  1661. description = "ID of the port used for SPI bus 1 chip select 3.",
  1662. type = "enumerated",
  1663. choices = function() return GetAt91PioIds() end,
  1664. file = "include/cfg/arch/armpio.h"
  1665. },
  1666. {
  1667. macro = "SPI1_CS3_PIO_BIT",
  1668. brief = "CS3 Port Bit (Second Controller)",
  1669. description = "Port bit used for SPI bus 1 chip select 3.",
  1670. type = "enumerated",
  1671. choices = mcu_32bit_choice,
  1672. flavor = "integer",
  1673. file = "include/cfg/arch/armpio.h"
  1674. },
  1675. },
  1676. },
  1677. {
  1678. name = "nutarch_arm_spibus_at91ssc",
  1679. brief = "AT91SSC SPI Bus Controller",
  1680. description = "This early release had been tested on the AT91SAM7SE only. "..
  1681. "The driver uses the SSC hardware to implement an SPI bus driver. "..
  1682. "Only polling mode and SPI mode 3 are available.",
  1683. requires = { "HW_SSC_AT91" },
  1684. provides = { "SPIBUS_CONTROLLER" },
  1685. sources =
  1686. {
  1687. "arm/dev/atmel/spibus_at91ssc.c",
  1688. "arm/dev/atmel/spibus0at91ssc.c"
  1689. }
  1690. },
  1691. {
  1692. name = "nutarch__arm_at91spi",
  1693. brief = "AT91 SPI Support",
  1694. description = "Preliminary SPI routines.",
  1695. requires = { "HW_SPI_AT91", "HW_PDC_AT91" },
  1696. sources = { "arm/dev/atmel/at91_spi.c" },
  1697. },
  1698. {
  1699. name = "nutarch__arm_at91efc",
  1700. brief = "AT91 Embedded Flash Controller",
  1701. description = "Routines for reading and writing embedded flash memory.",
  1702. requires = { "HW_EFC_AT91" },
  1703. sources = { "arm/dev/atmel/at91_efc.c" },
  1704. },
  1705. {
  1706. name = "nutarch_arm_tlv320",
  1707. brief = "TLV320 DAC",
  1708. requires = { "HW_EXT_CALYPSO" },
  1709. provides = { "HW_AUDIO_DAC" },
  1710. sources = { "arm/dev/tlv320dac.c" },
  1711. },
  1712. {
  1713. name = "nutarch_zero_debug",
  1714. brief = "UART Debug Output (Zero)",
  1715. description = "Polling UART driver sample for imaginary Zero CPU.",
  1716. requires = { "HW_UART_ZERO" },
  1717. provides = { "DEV_UART", "DEV_FILE", "DEV_WRITE" },
  1718. sources = { "arm/dev/zero/dev_debug.c" }
  1719. },
  1720. }