hw_gpio.h 70 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299
  1. /******************************************************************************
  2. * Filename: hw_gpio.h
  3. * Revised: $Date: 2013-04-30 17:13:44 +0200 (Tue, 30 Apr 2013) $
  4. * Revision: $Revision: 9943 $
  5. *
  6. * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
  7. *
  8. *
  9. * Redistribution and use in source and binary forms, with or without
  10. * modification, are permitted provided that the following conditions
  11. * are met:
  12. *
  13. * Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions and the following disclaimer.
  15. *
  16. * Redistributions in binary form must reproduce the above copyright
  17. * notice, this list of conditions and the following disclaimer in the
  18. * documentation and/or other materials provided with the distribution.
  19. *
  20. * Neither the name of Texas Instruments Incorporated nor the names of
  21. * its contributors may be used to endorse or promote products derived
  22. * from this software without specific prior written permission.
  23. *
  24. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  25. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  26. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  27. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  28. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  30. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  31. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  32. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  33. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. *
  36. ******************************************************************************/
  37. #ifndef __HW_GPIO_H__
  38. #define __HW_GPIO_H__
  39. //*****************************************************************************
  40. //
  41. // The following are defines for the GPIO register offsets.
  42. //
  43. //*****************************************************************************
  44. #define GPIO_O_DATA 0x00000000 // This is the data register. In
  45. // software control mode, values
  46. // written in the GPIODATA register
  47. // are transferred onto the GPOUT
  48. // pins if the respective pins have
  49. // been configured as outputs
  50. // through the GPIODIR register. A
  51. // read from GPIODATA returns the
  52. // last bit value written if the
  53. // respective pins are configured
  54. // as output, or it returns the
  55. // value on the corresponding input
  56. // GPIN bit when these are
  57. // configured as inputs.
  58. #define GPIO_O_DIR 0x00000400 // The DIR register is the data
  59. // direction register. All bits are
  60. // cleared by a reset; therefore,
  61. // the GPIO pins are input by
  62. // default.
  63. #define GPIO_O_IS 0x00000404 // The IS register is the
  64. // interrupt sense register.
  65. #define GPIO_O_IBE 0x00000408 // The IBE register is the
  66. // interrupt both-edges register.
  67. // When the corresponding bit in IS
  68. // is set to detect edges, bits set
  69. // to high in IBE configure the
  70. // corresponding pin to detect both
  71. // rising and falling edges,
  72. // regardless of the corresponding
  73. // bit in the IEV (interrupt event
  74. // register). Clearing a bit
  75. // configures the pin to be
  76. // controlled by IEV.
  77. #define GPIO_O_IEV 0x0000040C // The IEV register is the
  78. // interrupt event register. Bits
  79. // set to high in IEV configure the
  80. // corresponding pin to detect
  81. // rising edges or high levels,
  82. // depending on the corresponding
  83. // bit value in IS. Clearing a bit
  84. // configures the pin to detect
  85. // falling edges or low levels,
  86. // depending on the corresponding
  87. // bit value in IS.
  88. #define GPIO_O_IE 0x00000410 // The IE register is the
  89. // interrupt mask register. Bits
  90. // set to high in IE allow the
  91. // corresponding pins to trigger
  92. // their individual interrupts and
  93. // the combined GPIOINTR line.
  94. // Clearing a bit disables
  95. // interrupt triggering on that
  96. // pin.
  97. #define GPIO_O_RIS 0x00000414 // The RIS register is the raw
  98. // interrupt status register. Bits
  99. // read high in RIS reflect the
  100. // status of interrupts trigger
  101. // conditions detected (raw, before
  102. // masking), indicating that all
  103. // the requirements are met, before
  104. // they are finally allowed to
  105. // trigger by IE. Bits read as 0
  106. // indicate that corresponding
  107. // input pins have not initiated an
  108. // interrupt.
  109. #define GPIO_O_MIS 0x00000418 // The MIS register is the masked
  110. // interrupt status register. Bits
  111. // read high in MIS reflect the
  112. // status of input lines triggering
  113. // an interrupt. Bits read as low
  114. // indicate that either no
  115. // interrupt has been generated, or
  116. // the interrupt is masked. MIS is
  117. // the state of the interrupt after
  118. // masking.
  119. #define GPIO_O_IC 0x0000041C // The IC register is the
  120. // interrupt clear register.
  121. // Writing 1 to a bit in this
  122. // register clears the
  123. // corresponding interrupt edge
  124. // detection logic register.
  125. // Writing 0 has no effect.
  126. #define GPIO_O_AFSEL 0x00000420 // The AFSEL register is the mode
  127. // control select register. Writing
  128. // 1 to any bit in this register
  129. // selects the hardware
  130. // (peripheral) control for the
  131. // corresponding GPIO line. All
  132. // bits are cleared by a reset,
  133. // therefore no GPIO line is set to
  134. // hardware control by default.
  135. #define GPIO_O_GPIOLOCK 0x00000520 // A write of the value 0x4C4F434B
  136. // to the GPIOLOCK register unlocks
  137. // the GPIO commit register
  138. // (GPIOCR) for write access. A
  139. // write of any other value
  140. // reapplies the lock, preventing
  141. // any register updates. Any write
  142. // to the commit register (GPIOCR)
  143. // causes the lock register to be
  144. // locked.
  145. #define GPIO_O_GPIOCR 0x00000524 // The GPIOCR register is the
  146. // commit register. The value of
  147. // the GPIOCR register determines
  148. // which bits of the AFSEL register
  149. // is committed when a write to the
  150. // AFSEL register is performed. If
  151. // a bit in the GPIOCR register is
  152. // 0, the data being written to the
  153. // corresponding bit in the AFSEL
  154. // register is not committed and
  155. // retains its previous value. If a
  156. // bit in the GPIOCR register is
  157. // set to 1, the data being written
  158. // to the corresponding bit of the
  159. // AFSEL register is committed to
  160. // the register and will reflect
  161. // the new value. The contents of
  162. // the GPIOCR register can only be
  163. // modified if the GPIOLOCK
  164. // register is unlocked. Writes to
  165. // the GPIOCR register will be
  166. // ignored if the GPIOLOCK register
  167. // is locked. Any write to the
  168. // commit register causes the lock
  169. // register to be locked.
  170. #define GPIO_O_PMUX 0x00000700 // The PMUX register can be used
  171. // to output external decouple
  172. // control and clock_32k on I/O
  173. // pins. Decouple control can be
  174. // output on specific PB pins and
  175. // clock_32k can be output on a
  176. // specific PA or PB pin. These
  177. // features override the current
  178. // setting of the selected pin when
  179. // enabled. The pin is set to
  180. // output, pull-up and -down
  181. // disabled, and analog mode
  182. // disabled.
  183. #define GPIO_O_P_EDGE_CTRL 0x00000704 // The port edge control register
  184. // is used to control which edge of
  185. // each port input causes that port
  186. // to generate a power-up interrupt
  187. // to the system.
  188. #define GPIO_O_USB_CTRL 0x00000708 // This register is used to
  189. // control which edge of the USB
  190. // controller input generates a
  191. // power-up interrupt to the
  192. // system.
  193. #define GPIO_O_PI_IEN 0x00000710 // The power-up interrupt enable
  194. // register selects, for its
  195. // corresponding port A-D pin,
  196. // whether interrupts are enabled
  197. // or disabled.
  198. #define GPIO_O_IRQ_DETECT_ACK 0x00000718 // If the IRQ detect ACK register
  199. // is read, the value returned can
  200. // be used to determine which
  201. // enabled I/O port is responsible
  202. // for creating a power-up
  203. // interrupt to the system. Writing
  204. // the IRQ detect ACK register is
  205. // used to clear any number of
  206. // individual port bits that may be
  207. // signaling that an edge was
  208. // detected as configured by the
  209. // port edge control register and
  210. // the interrupt control register.
  211. // There is a self-clearing
  212. // function to this register that
  213. // generates a reset pulse to clear
  214. // any interrupt which has its
  215. // corresponding bit set to 1.
  216. #define GPIO_O_USB_IRQ_ACK 0x0000071C // Same functionality as
  217. // IRQ_DETECT_ACK, but for USB
  218. #define GPIO_O_IRQ_DETECT_UNMASK \
  219. 0x00000720 // Same functionality as
  220. // IRQ_DETECT_ACK, but this
  221. // register handles masked
  222. // interrupts
  223. //*****************************************************************************
  224. //
  225. // The following are defines for the bit fields in the GPIO_O_DATA register.
  226. //
  227. //*****************************************************************************
  228. #define GPIO_DATA_DATA_M 0x000000FF // Input and output data
  229. #define GPIO_DATA_DATA_S 0
  230. //*****************************************************************************
  231. //
  232. // The following are defines for the bit fields in the GPIO_O_DIR register.
  233. //
  234. //*****************************************************************************
  235. #define GPIO_DIR_DIR_M 0x000000FF // Bits set: Corresponding pin is
  236. // output Bits cleared:
  237. // Corresponding pin is input
  238. #define GPIO_DIR_DIR_S 0
  239. //*****************************************************************************
  240. //
  241. // The following are defines for the bit fields in the GPIO_O_IS register.
  242. //
  243. //*****************************************************************************
  244. #define GPIO_IS_IS_M 0x000000FF // Bits set: Level on
  245. // corresponding pin is detected
  246. // Bits cleared: Edge on
  247. // corresponding pin is detected
  248. #define GPIO_IS_IS_S 0
  249. //*****************************************************************************
  250. //
  251. // The following are defines for the bit fields in the GPIO_O_IBE register.
  252. //
  253. //*****************************************************************************
  254. #define GPIO_IBE_IBE_M 0x000000FF // Bits set: Both edges on
  255. // corresponding pin trigger an
  256. // interrupt Bits cleared:
  257. // Interrupt generation event is
  258. // controlled by GPIOIEV Single
  259. // edge: Determined by
  260. // corresponding bit in GPIOIEV
  261. // register
  262. #define GPIO_IBE_IBE_S 0
  263. //*****************************************************************************
  264. //
  265. // The following are defines for the bit fields in the GPIO_O_IEV register.
  266. //
  267. //*****************************************************************************
  268. #define GPIO_IEV_IEV_M 0x000000FF // Bits set: Rising edges or high
  269. // levels on corresponding pin
  270. // trigger interrupts Bits cleared:
  271. // Falling edges or low levels on
  272. // corresponding pin trigger
  273. // interrupts
  274. #define GPIO_IEV_IEV_S 0
  275. //*****************************************************************************
  276. //
  277. // The following are defines for the bit fields in the GPIO_O_IE register.
  278. //
  279. //*****************************************************************************
  280. #define GPIO_IE_IE_M 0x000000FF // Bits set: Corresponding pin is
  281. // not masked Bits cleared:
  282. // Corresponding pin is masked
  283. #define GPIO_IE_IE_S 0
  284. //*****************************************************************************
  285. //
  286. // The following are defines for the bit fields in the GPIO_O_RIS register.
  287. //
  288. //*****************************************************************************
  289. #define GPIO_RIS_RIS_M 0x000000FF // Reflects the status of
  290. // interrupts trigger conditions
  291. // detected on pins (raw, before
  292. // masking) Bits set: Requirements
  293. // met by corresponding pins Bits
  294. // clear: Requirements not met
  295. #define GPIO_RIS_RIS_S 0
  296. //*****************************************************************************
  297. //
  298. // The following are defines for the bit fields in the GPIO_O_MIS register.
  299. //
  300. //*****************************************************************************
  301. #define GPIO_MIS_MIS_M 0x000000FF // Masked value of interrupt due
  302. // to corresponding pin Bits clear:
  303. // GPIO line interrupt not active
  304. // Bits set: GPIO line asserting
  305. // interrupt
  306. #define GPIO_MIS_MIS_S 0
  307. //*****************************************************************************
  308. //
  309. // The following are defines for the bit fields in the GPIO_O_IC register.
  310. //
  311. //*****************************************************************************
  312. #define GPIO_IC_IC_M 0x000000FF // Bit written as 1: Clears edge
  313. // detection logic Bit written as
  314. // 0: Has no effect
  315. #define GPIO_IC_IC_S 0
  316. //*****************************************************************************
  317. //
  318. // The following are defines for the bit fields in the GPIO_O_AFSEL register.
  319. //
  320. //*****************************************************************************
  321. #define GPIO_AFSEL_AFSEL_M 0x000000FF // Bit set: Enables hardware
  322. // (peripheral) control mode Bit
  323. // cleared: Enables software
  324. // control mode
  325. #define GPIO_AFSEL_AFSEL_S 0
  326. //*****************************************************************************
  327. //
  328. // The following are defines for the bit fields in the
  329. // GPIO_O_GPIOLOCK register.
  330. //
  331. //*****************************************************************************
  332. #define GPIO_GPIOLOCK_LOCK_M 0xFFFFFFFF // A read of this register returns
  333. // the following values: Locked:
  334. // 0x00000001 Unlocked: 0x00000000
  335. #define GPIO_GPIOLOCK_LOCK_S 0
  336. //*****************************************************************************
  337. //
  338. // The following are defines for the bit fields in the GPIO_O_GPIOCR register.
  339. //
  340. //*****************************************************************************
  341. #define GPIO_GPIOCR_CR_M 0x000000FF // On a bit-wise basis, any bit
  342. // set allows the corresponding
  343. // GPIOAFSEL bit to be set to its
  344. // alternate function.
  345. #define GPIO_GPIOCR_CR_S 0
  346. //*****************************************************************************
  347. //
  348. // The following are defines for the bit fields in the GPIO_O_PMUX register.
  349. //
  350. //*****************************************************************************
  351. #define GPIO_PMUX_CKOEN 0x00000080 // Clock out enable When this bit
  352. // is set, the 32-kHz clock is
  353. // routed to either PA[0] or PB[7]
  354. // pins. PMUX.CKOPIN selects the
  355. // pin to use. This overrides the
  356. // current configuration setting
  357. // for this pin. The pullup or
  358. // pulldown is disabled and the
  359. // direction is set to output for
  360. // this pin.
  361. #define GPIO_PMUX_CKOEN_M 0x00000080
  362. #define GPIO_PMUX_CKOEN_S 7
  363. #define GPIO_PMUX_CKOPIN 0x00000010 // Decouple control pin select
  364. // This control only has relevance
  365. // when CKOEN is set. When 0, PA[0]
  366. // becomes the 32-kHz clock output.
  367. // When 1, PB[7] becomes the 32-kHz
  368. // clock output.
  369. #define GPIO_PMUX_CKOPIN_M 0x00000010
  370. #define GPIO_PMUX_CKOPIN_S 4
  371. #define GPIO_PMUX_DCEN 0x00000008 // Decouple control enable When
  372. // this bit is set, the on-die
  373. // digital regulator status is
  374. // routed to either PB[1] or PB[0]
  375. // pins. PMUX.DCPIN selects the pin
  376. // to use. This overrides the
  377. // current configuration setting
  378. // for this pin. The pullup or
  379. // pulldown is disabled and the
  380. // direction is set to output for
  381. // this pin.
  382. #define GPIO_PMUX_DCEN_M 0x00000008
  383. #define GPIO_PMUX_DCEN_S 3
  384. #define GPIO_PMUX_DCPIN 0x00000001 // Decouple control pin select
  385. // This control has relevance only
  386. // when DCEN is set. When 0, PB[1]
  387. // becomes the on-die digital
  388. // regulator status (1 indicates
  389. // the on-die digital regulator is
  390. // active); when 1, PB[0] becomes
  391. // the on-die digital regulator
  392. // status. NOTE: PB[1] and PB[0]
  393. // can also be controlled with
  394. // other override features. In
  395. // priority order for PB[1]: When
  396. // POR/BOD test mode is active,
  397. // PB[1] becomes the active low
  398. // brown-out detected indicator.
  399. // When DCEN is set and DCPIN is
  400. // not set, PB[1] becomes the
  401. // on-dir digital regulator status.
  402. // In priority order for PB[0]:
  403. // When POR/BOD test mode is
  404. // active, PB[0] becomes the
  405. // power-on-reset indicator. When
  406. // DCEN and DCPIN are set, PB[0]
  407. // becomes the on-die digital
  408. // regulator status.
  409. #define GPIO_PMUX_DCPIN_M 0x00000001
  410. #define GPIO_PMUX_DCPIN_S 0
  411. //*****************************************************************************
  412. //
  413. // The following are defines for the bit fields in the
  414. // GPIO_O_P_EDGE_CTRL register.
  415. //
  416. //*****************************************************************************
  417. #define GPIO_P_EDGE_CTRL_PDIRC7 0x80000000 // Port D bit 7 interrupt request
  418. // condition: 0: Rising 1: Falling
  419. // edge
  420. #define GPIO_P_EDGE_CTRL_PDIRC7_M \
  421. 0x80000000
  422. #define GPIO_P_EDGE_CTRL_PDIRC7_S 31
  423. #define GPIO_P_EDGE_CTRL_PDIRC6 0x40000000 // Port D bit 6 interrupt request
  424. // condition: 0: Rising 1: Falling
  425. // edge
  426. #define GPIO_P_EDGE_CTRL_PDIRC6_M \
  427. 0x40000000
  428. #define GPIO_P_EDGE_CTRL_PDIRC6_S 30
  429. #define GPIO_P_EDGE_CTRL_PDIRC5 0x20000000 // Port D bit 5 interrupt request
  430. // condition: 0: Rising 1: Falling
  431. // edge
  432. #define GPIO_P_EDGE_CTRL_PDIRC5_M \
  433. 0x20000000
  434. #define GPIO_P_EDGE_CTRL_PDIRC5_S 29
  435. #define GPIO_P_EDGE_CTRL_PDIRC4 0x10000000 // Port D bit 4 interrupt request
  436. // condition: 0: Rising 1: Falling
  437. // edge
  438. #define GPIO_P_EDGE_CTRL_PDIRC4_M \
  439. 0x10000000
  440. #define GPIO_P_EDGE_CTRL_PDIRC4_S 28
  441. #define GPIO_P_EDGE_CTRL_PDIRC3 0x08000000 // Port D bit 3 interrupt request
  442. // condition: 0: Rising 1: Falling
  443. // edge
  444. #define GPIO_P_EDGE_CTRL_PDIRC3_M \
  445. 0x08000000
  446. #define GPIO_P_EDGE_CTRL_PDIRC3_S 27
  447. #define GPIO_P_EDGE_CTRL_PDIRC2 0x04000000 // Port D bit 2 interrupt request
  448. // condition: 0: Rising 1: Falling
  449. // edge
  450. #define GPIO_P_EDGE_CTRL_PDIRC2_M \
  451. 0x04000000
  452. #define GPIO_P_EDGE_CTRL_PDIRC2_S 26
  453. #define GPIO_P_EDGE_CTRL_PDIRC1 0x02000000 // Port D bit 1 interrupt request
  454. // condition: 0: Rising 1: Falling
  455. // edge
  456. #define GPIO_P_EDGE_CTRL_PDIRC1_M \
  457. 0x02000000
  458. #define GPIO_P_EDGE_CTRL_PDIRC1_S 25
  459. #define GPIO_P_EDGE_CTRL_PDIRC0 0x01000000 // Port D bit 0 interrupt request
  460. // condition: 0: Rising 1: Falling
  461. // edge
  462. #define GPIO_P_EDGE_CTRL_PDIRC0_M \
  463. 0x01000000
  464. #define GPIO_P_EDGE_CTRL_PDIRC0_S 24
  465. #define GPIO_P_EDGE_CTRL_PCIRC7 0x00800000 // Port C bit 7 interrupt request
  466. // condition: 0: Rising 1: Falling
  467. // edge
  468. #define GPIO_P_EDGE_CTRL_PCIRC7_M \
  469. 0x00800000
  470. #define GPIO_P_EDGE_CTRL_PCIRC7_S 23
  471. #define GPIO_P_EDGE_CTRL_PCIRC6 0x00400000 // Port C bit 6 interrupt request
  472. // condition: 0: Rising 1: Falling
  473. // edge
  474. #define GPIO_P_EDGE_CTRL_PCIRC6_M \
  475. 0x00400000
  476. #define GPIO_P_EDGE_CTRL_PCIRC6_S 22
  477. #define GPIO_P_EDGE_CTRL_PCIRC5 0x00200000 // Port C bit 5 interrupt request
  478. // condition: 0: Rising 1: Falling
  479. // edge
  480. #define GPIO_P_EDGE_CTRL_PCIRC5_M \
  481. 0x00200000
  482. #define GPIO_P_EDGE_CTRL_PCIRC5_S 21
  483. #define GPIO_P_EDGE_CTRL_PCIRC4 0x00100000 // Port C bit 4 interrupt request
  484. // condition: 0: Rising 1: Falling
  485. // edge
  486. #define GPIO_P_EDGE_CTRL_PCIRC4_M \
  487. 0x00100000
  488. #define GPIO_P_EDGE_CTRL_PCIRC4_S 20
  489. #define GPIO_P_EDGE_CTRL_PCIRC3 0x00080000 // Port C bit 3 interrupt request
  490. // condition: 0: Rising 1: Falling
  491. // edge
  492. #define GPIO_P_EDGE_CTRL_PCIRC3_M \
  493. 0x00080000
  494. #define GPIO_P_EDGE_CTRL_PCIRC3_S 19
  495. #define GPIO_P_EDGE_CTRL_PCIRC2 0x00040000 // Port C bit 2 interrupt request
  496. // condition: 0: Rising 1: Falling
  497. // edge
  498. #define GPIO_P_EDGE_CTRL_PCIRC2_M \
  499. 0x00040000
  500. #define GPIO_P_EDGE_CTRL_PCIRC2_S 18
  501. #define GPIO_P_EDGE_CTRL_PCIRC1 0x00020000 // Port C bit 1 interrupt request
  502. // condition: 0: Rising 1: Falling
  503. // edge
  504. #define GPIO_P_EDGE_CTRL_PCIRC1_M \
  505. 0x00020000
  506. #define GPIO_P_EDGE_CTRL_PCIRC1_S 17
  507. #define GPIO_P_EDGE_CTRL_PCIRC0 0x00010000 // Port C bit 0 interrupt request
  508. // condition: 0: Rising 1: Falling
  509. // edge
  510. #define GPIO_P_EDGE_CTRL_PCIRC0_M \
  511. 0x00010000
  512. #define GPIO_P_EDGE_CTRL_PCIRC0_S 16
  513. #define GPIO_P_EDGE_CTRL_PBIRC7 0x00008000 // Port B bit 7 interrupt request
  514. // condition: 0: Rising 1: Falling
  515. // edge
  516. #define GPIO_P_EDGE_CTRL_PBIRC7_M \
  517. 0x00008000
  518. #define GPIO_P_EDGE_CTRL_PBIRC7_S 15
  519. #define GPIO_P_EDGE_CTRL_PBIRC6 0x00004000 // Port B bit 6 interrupt request
  520. // condition: 0: Rising 1: Falling
  521. // edge
  522. #define GPIO_P_EDGE_CTRL_PBIRC6_M \
  523. 0x00004000
  524. #define GPIO_P_EDGE_CTRL_PBIRC6_S 14
  525. #define GPIO_P_EDGE_CTRL_PBIRC5 0x00002000 // Port B bit 5 interrupt request
  526. // condition: 0: Rising 1: Falling
  527. // edge
  528. #define GPIO_P_EDGE_CTRL_PBIRC5_M \
  529. 0x00002000
  530. #define GPIO_P_EDGE_CTRL_PBIRC5_S 13
  531. #define GPIO_P_EDGE_CTRL_PBIRC4 0x00001000 // Port B bit 4 interrupt request
  532. // condition: 0: Rising 1: Falling
  533. // edge
  534. #define GPIO_P_EDGE_CTRL_PBIRC4_M \
  535. 0x00001000
  536. #define GPIO_P_EDGE_CTRL_PBIRC4_S 12
  537. #define GPIO_P_EDGE_CTRL_PBIRC3 0x00000800 // Port B bit 3 interrupt request
  538. // condition: 0: Rising 1: Falling
  539. // edge
  540. #define GPIO_P_EDGE_CTRL_PBIRC3_M \
  541. 0x00000800
  542. #define GPIO_P_EDGE_CTRL_PBIRC3_S 11
  543. #define GPIO_P_EDGE_CTRL_PBIRC2 0x00000400 // Port B bit 2 interrupt request
  544. // condition: 0: Rising 1: Falling
  545. // edge
  546. #define GPIO_P_EDGE_CTRL_PBIRC2_M \
  547. 0x00000400
  548. #define GPIO_P_EDGE_CTRL_PBIRC2_S 10
  549. #define GPIO_P_EDGE_CTRL_PBIRC1 0x00000200 // Port B bit 1 interrupt request
  550. // condition: 0: Rising 1: Falling
  551. // edge
  552. #define GPIO_P_EDGE_CTRL_PBIRC1_M \
  553. 0x00000200
  554. #define GPIO_P_EDGE_CTRL_PBIRC1_S 9
  555. #define GPIO_P_EDGE_CTRL_PBIRC0 0x00000100 // Port B bit 0 interrupt request
  556. // condition: 0: Rising 1: Falling
  557. // edge
  558. #define GPIO_P_EDGE_CTRL_PBIRC0_M \
  559. 0x00000100
  560. #define GPIO_P_EDGE_CTRL_PBIRC0_S 8
  561. #define GPIO_P_EDGE_CTRL_PAIRC7 0x00000080 // Port A bit 7 interrupt request
  562. // condition: 0: Rising 1: Falling
  563. // edge
  564. #define GPIO_P_EDGE_CTRL_PAIRC7_M \
  565. 0x00000080
  566. #define GPIO_P_EDGE_CTRL_PAIRC7_S 7
  567. #define GPIO_P_EDGE_CTRL_PAIRC6 0x00000040 // Port A bit 6 interrupt request
  568. // condition: 0: Rising 1: Falling
  569. // edge
  570. #define GPIO_P_EDGE_CTRL_PAIRC6_M \
  571. 0x00000040
  572. #define GPIO_P_EDGE_CTRL_PAIRC6_S 6
  573. #define GPIO_P_EDGE_CTRL_PAIRC5 0x00000020 // Port A bit 5 interrupt request
  574. // condition: 0: Rising 1: Falling
  575. // edge
  576. #define GPIO_P_EDGE_CTRL_PAIRC5_M \
  577. 0x00000020
  578. #define GPIO_P_EDGE_CTRL_PAIRC5_S 5
  579. #define GPIO_P_EDGE_CTRL_PAIRC4 0x00000010 // Port A bit 4 interrupt request
  580. // condition: 0: Rising 1: Falling
  581. // edge
  582. #define GPIO_P_EDGE_CTRL_PAIRC4_M \
  583. 0x00000010
  584. #define GPIO_P_EDGE_CTRL_PAIRC4_S 4
  585. #define GPIO_P_EDGE_CTRL_PAIRC3 0x00000008 // Port A bit 3 interrupt request
  586. // condition: 0: Rising 1: Falling
  587. // edge
  588. #define GPIO_P_EDGE_CTRL_PAIRC3_M \
  589. 0x00000008
  590. #define GPIO_P_EDGE_CTRL_PAIRC3_S 3
  591. #define GPIO_P_EDGE_CTRL_PAIRC2 0x00000004 // Port A bit 2 interrupt request
  592. // condition: 0: Rising 1: Falling
  593. // edge
  594. #define GPIO_P_EDGE_CTRL_PAIRC2_M \
  595. 0x00000004
  596. #define GPIO_P_EDGE_CTRL_PAIRC2_S 2
  597. #define GPIO_P_EDGE_CTRL_PAIRC1 0x00000002 // Port A bit 1 interrupt request
  598. // condition: 0: Rising 1: Falling
  599. // edge
  600. #define GPIO_P_EDGE_CTRL_PAIRC1_M \
  601. 0x00000002
  602. #define GPIO_P_EDGE_CTRL_PAIRC1_S 1
  603. #define GPIO_P_EDGE_CTRL_PAIRC0 0x00000001 // Port A bit 0 interrupt request
  604. // condition: 0: Rising 1: Falling
  605. // edge
  606. #define GPIO_P_EDGE_CTRL_PAIRC0_M \
  607. 0x00000001
  608. #define GPIO_P_EDGE_CTRL_PAIRC0_S 0
  609. //*****************************************************************************
  610. //
  611. // The following are defines for the bit fields in the
  612. // GPIO_O_USB_CTRL register.
  613. //
  614. //*****************************************************************************
  615. #define GPIO_USB_CTRL_USB_EDGE_CTL \
  616. 0x00000001 // Used to set the edge which
  617. // triggers the USB power up
  618. // interrupt 0: Rising 1: Falling
  619. #define GPIO_USB_CTRL_USB_EDGE_CTL_M \
  620. 0x00000001
  621. #define GPIO_USB_CTRL_USB_EDGE_CTL_S 0
  622. //*****************************************************************************
  623. //
  624. // The following are defines for the bit fields in the GPIO_O_PI_IEN register.
  625. //
  626. //*****************************************************************************
  627. #define GPIO_PI_IEN_PDIEN7 0x80000000 // Port D bit 7 interrupt enable:
  628. // 1: Enabled 2: Disabled
  629. #define GPIO_PI_IEN_PDIEN7_M 0x80000000
  630. #define GPIO_PI_IEN_PDIEN7_S 31
  631. #define GPIO_PI_IEN_PDIEN6 0x40000000 // Port D bit 6 interrupt enable:
  632. // 1: Enabled 2: Disabled
  633. #define GPIO_PI_IEN_PDIEN6_M 0x40000000
  634. #define GPIO_PI_IEN_PDIEN6_S 30
  635. #define GPIO_PI_IEN_PDIEN5 0x20000000 // Port D bit 5 interrupt enable:
  636. // 1: Enabled 2: Disabled
  637. #define GPIO_PI_IEN_PDIEN5_M 0x20000000
  638. #define GPIO_PI_IEN_PDIEN5_S 29
  639. #define GPIO_PI_IEN_PDIEN4 0x10000000 // Port D bit 4 interrupt enable:
  640. // 1: Enabled 2: Disabled
  641. #define GPIO_PI_IEN_PDIEN4_M 0x10000000
  642. #define GPIO_PI_IEN_PDIEN4_S 28
  643. #define GPIO_PI_IEN_PDIEN3 0x08000000 // Port D bit 3 interrupt enable:
  644. // 1: Enabled 2: Disabled
  645. #define GPIO_PI_IEN_PDIEN3_M 0x08000000
  646. #define GPIO_PI_IEN_PDIEN3_S 27
  647. #define GPIO_PI_IEN_PDIEN2 0x04000000 // Port D bit 2 interrupt enable:
  648. // 1: Enabled 2: Disabled
  649. #define GPIO_PI_IEN_PDIEN2_M 0x04000000
  650. #define GPIO_PI_IEN_PDIEN2_S 26
  651. #define GPIO_PI_IEN_PDIEN1 0x02000000 // Port D bit 1 interrupt enable:
  652. // 1: Enabled 2: Disabled
  653. #define GPIO_PI_IEN_PDIEN1_M 0x02000000
  654. #define GPIO_PI_IEN_PDIEN1_S 25
  655. #define GPIO_PI_IEN_PDIEN0 0x01000000 // Port D bit 0 interrupt enable:
  656. // 1: Enabled 2: Disabled
  657. #define GPIO_PI_IEN_PDIEN0_M 0x01000000
  658. #define GPIO_PI_IEN_PDIEN0_S 24
  659. #define GPIO_PI_IEN_PCIEN7 0x00800000 // Port C bit 7 interrupt enable:
  660. // 1: Enabled 2: Disabled
  661. #define GPIO_PI_IEN_PCIEN7_M 0x00800000
  662. #define GPIO_PI_IEN_PCIEN7_S 23
  663. #define GPIO_PI_IEN_PCIEN6 0x00400000 // Port C bit 6 interrupt enable:
  664. // 1: Enabled 2: Disabled
  665. #define GPIO_PI_IEN_PCIEN6_M 0x00400000
  666. #define GPIO_PI_IEN_PCIEN6_S 22
  667. #define GPIO_PI_IEN_PCIEN5 0x00200000 // Port C bit 5 interrupt enable:
  668. // 1: Enabled 2: Disabled
  669. #define GPIO_PI_IEN_PCIEN5_M 0x00200000
  670. #define GPIO_PI_IEN_PCIEN5_S 21
  671. #define GPIO_PI_IEN_PCIEN4 0x00100000 // Port C bit 4 interrupt enable:
  672. // 1: Enabled 2: Disabled
  673. #define GPIO_PI_IEN_PCIEN4_M 0x00100000
  674. #define GPIO_PI_IEN_PCIEN4_S 20
  675. #define GPIO_PI_IEN_PCIEN3 0x00080000 // Port C bit 3 interrupt enable:
  676. // 1: Enabled 2: Disabled
  677. #define GPIO_PI_IEN_PCIEN3_M 0x00080000
  678. #define GPIO_PI_IEN_PCIEN3_S 19
  679. #define GPIO_PI_IEN_PCIEN2 0x00040000 // Port C bit 2 interrupt enable:
  680. // 1: Enabled 2: Disabled
  681. #define GPIO_PI_IEN_PCIEN2_M 0x00040000
  682. #define GPIO_PI_IEN_PCIEN2_S 18
  683. #define GPIO_PI_IEN_PCIEN1 0x00020000 // Port C bit 1 interrupt enable:
  684. // 1: Enabled 2: Disabled
  685. #define GPIO_PI_IEN_PCIEN1_M 0x00020000
  686. #define GPIO_PI_IEN_PCIEN1_S 17
  687. #define GPIO_PI_IEN_PCIEN0 0x00010000 // Port C bit 0 interrupt enable:
  688. // 1: Enabled 2: Disabled
  689. #define GPIO_PI_IEN_PCIEN0_M 0x00010000
  690. #define GPIO_PI_IEN_PCIEN0_S 16
  691. #define GPIO_PI_IEN_PBIEN7 0x00008000 // Port B bit 7 interrupt enable:
  692. // 1: Enabled 2: Disabled
  693. #define GPIO_PI_IEN_PBIEN7_M 0x00008000
  694. #define GPIO_PI_IEN_PBIEN7_S 15
  695. #define GPIO_PI_IEN_PBIEN6 0x00004000 // Port B bit 6 interrupt enable:
  696. // 1: Enabled 2: Disabled
  697. #define GPIO_PI_IEN_PBIEN6_M 0x00004000
  698. #define GPIO_PI_IEN_PBIEN6_S 14
  699. #define GPIO_PI_IEN_PBIEN5 0x00002000 // Port B bit 5 interrupt enable:
  700. // 1: Enabled 2: Disabled
  701. #define GPIO_PI_IEN_PBIEN5_M 0x00002000
  702. #define GPIO_PI_IEN_PBIEN5_S 13
  703. #define GPIO_PI_IEN_PBIEN4 0x00001000 // Port B bit 4 interrupt enable:
  704. // 1: Enabled 2: Disabled
  705. #define GPIO_PI_IEN_PBIEN4_M 0x00001000
  706. #define GPIO_PI_IEN_PBIEN4_S 12
  707. #define GPIO_PI_IEN_PBIEN3 0x00000800 // Port B bit 3 interrupt enable:
  708. // 1: Enabled 2: Disabled
  709. #define GPIO_PI_IEN_PBIEN3_M 0x00000800
  710. #define GPIO_PI_IEN_PBIEN3_S 11
  711. #define GPIO_PI_IEN_PBIEN2 0x00000400 // Port B bit 2 interrupt enable:
  712. // 1: Enabled 2: Disabled
  713. #define GPIO_PI_IEN_PBIEN2_M 0x00000400
  714. #define GPIO_PI_IEN_PBIEN2_S 10
  715. #define GPIO_PI_IEN_PBIEN1 0x00000200 // Port B bit 1 interrupt enable:
  716. // 1: Enabled 2: Disabled
  717. #define GPIO_PI_IEN_PBIEN1_M 0x00000200
  718. #define GPIO_PI_IEN_PBIEN1_S 9
  719. #define GPIO_PI_IEN_PBIEN0 0x00000100 // Port B bit 0 interrupt enable:
  720. // 1: Enabled 2: Disabled
  721. #define GPIO_PI_IEN_PBIEN0_M 0x00000100
  722. #define GPIO_PI_IEN_PBIEN0_S 8
  723. #define GPIO_PI_IEN_PAIEN7 0x00000080 // Port A bit 7 interrupt enable:
  724. // 1: Enabled 2: Disabled
  725. #define GPIO_PI_IEN_PAIEN7_M 0x00000080
  726. #define GPIO_PI_IEN_PAIEN7_S 7
  727. #define GPIO_PI_IEN_PAIEN6 0x00000040 // Port A bit 6 interrupt enable:
  728. // 1: Enabled 2: Disabled
  729. #define GPIO_PI_IEN_PAIEN6_M 0x00000040
  730. #define GPIO_PI_IEN_PAIEN6_S 6
  731. #define GPIO_PI_IEN_PAIEN5 0x00000020 // Port A bit 5 interrupt enable:
  732. // 1: Enabled 2: Disabled
  733. #define GPIO_PI_IEN_PAIEN5_M 0x00000020
  734. #define GPIO_PI_IEN_PAIEN5_S 5
  735. #define GPIO_PI_IEN_PAIEN4 0x00000010 // Port A bit 4 interrupt enable:
  736. // 1: Enabled 2: Disabled
  737. #define GPIO_PI_IEN_PAIEN4_M 0x00000010
  738. #define GPIO_PI_IEN_PAIEN4_S 4
  739. #define GPIO_PI_IEN_PAIEN3 0x00000008 // Port A bit 3 interrupt enable:
  740. // 1: Enabled 2: Disabled
  741. #define GPIO_PI_IEN_PAIEN3_M 0x00000008
  742. #define GPIO_PI_IEN_PAIEN3_S 3
  743. #define GPIO_PI_IEN_PAIEN2 0x00000004 // Port A bit 2 interrupt enable:
  744. // 1: Enabled 2: Disabled
  745. #define GPIO_PI_IEN_PAIEN2_M 0x00000004
  746. #define GPIO_PI_IEN_PAIEN2_S 2
  747. #define GPIO_PI_IEN_PAIEN1 0x00000002 // Port A bit 1 interrupt enable:
  748. // 1: Enabled 2: Disabled
  749. #define GPIO_PI_IEN_PAIEN1_M 0x00000002
  750. #define GPIO_PI_IEN_PAIEN1_S 1
  751. #define GPIO_PI_IEN_PAIEN0 0x00000001 // Port A bit 0 interrupt enable:
  752. // 1: Enabled 2: Disabled
  753. #define GPIO_PI_IEN_PAIEN0_M 0x00000001
  754. #define GPIO_PI_IEN_PAIEN0_S 0
  755. //*****************************************************************************
  756. //
  757. // The following are defines for the bit fields in the
  758. // GPIO_O_IRQ_DETECT_ACK register.
  759. //
  760. //*****************************************************************************
  761. #define GPIO_IRQ_DETECT_ACK_PDIACK7 \
  762. 0x80000000 // Port D bit 7 masked interrupt
  763. // status: 1: Detected 0: Not
  764. // detected
  765. #define GPIO_IRQ_DETECT_ACK_PDIACK7_M \
  766. 0x80000000
  767. #define GPIO_IRQ_DETECT_ACK_PDIACK7_S 31
  768. #define GPIO_IRQ_DETECT_ACK_PDIACK6 \
  769. 0x40000000 // Port D bit 6 masked interrupt
  770. // status: 1: Detected 0: Not
  771. // detected
  772. #define GPIO_IRQ_DETECT_ACK_PDIACK6_M \
  773. 0x40000000
  774. #define GPIO_IRQ_DETECT_ACK_PDIACK6_S 30
  775. #define GPIO_IRQ_DETECT_ACK_PDIACK5 \
  776. 0x20000000 // Port D bit 5 masked interrupt
  777. // status: 1: Detected 0: Not
  778. // detected
  779. #define GPIO_IRQ_DETECT_ACK_PDIACK5_M \
  780. 0x20000000
  781. #define GPIO_IRQ_DETECT_ACK_PDIACK5_S 29
  782. #define GPIO_IRQ_DETECT_ACK_PDIACK4 \
  783. 0x10000000 // Port D bit 4 masked interrupt
  784. // status: 1: Detected 0: Not
  785. // detected
  786. #define GPIO_IRQ_DETECT_ACK_PDIACK4_M \
  787. 0x10000000
  788. #define GPIO_IRQ_DETECT_ACK_PDIACK4_S 28
  789. #define GPIO_IRQ_DETECT_ACK_PDIACK3 \
  790. 0x08000000 // Port D bit 3 masked interrupt
  791. // status: 1: Detected 0: Not
  792. // detected
  793. #define GPIO_IRQ_DETECT_ACK_PDIACK3_M \
  794. 0x08000000
  795. #define GPIO_IRQ_DETECT_ACK_PDIACK3_S 27
  796. #define GPIO_IRQ_DETECT_ACK_PDIACK2 \
  797. 0x04000000 // Port D bit 2 masked interrupt
  798. // status: 1: Detected 0: Not
  799. // detected
  800. #define GPIO_IRQ_DETECT_ACK_PDIACK2_M \
  801. 0x04000000
  802. #define GPIO_IRQ_DETECT_ACK_PDIACK2_S 26
  803. #define GPIO_IRQ_DETECT_ACK_PDIACK1 \
  804. 0x02000000 // Port D bit 1 masked interrupt
  805. // status: 1: Detected0: Not
  806. // detected
  807. #define GPIO_IRQ_DETECT_ACK_PDIACK1_M \
  808. 0x02000000
  809. #define GPIO_IRQ_DETECT_ACK_PDIACK1_S 25
  810. #define GPIO_IRQ_DETECT_ACK_PDIACK0 \
  811. 0x01000000 // Port D bit 0 masked interrupt
  812. // status: 1: Detected 0: Not
  813. // detected
  814. #define GPIO_IRQ_DETECT_ACK_PDIACK0_M \
  815. 0x01000000
  816. #define GPIO_IRQ_DETECT_ACK_PDIACK0_S 24
  817. #define GPIO_IRQ_DETECT_ACK_PCIACK7 \
  818. 0x00800000 // Port C bit 7 masked interrupt
  819. // status: 1: Detected 0: Not
  820. // detected
  821. #define GPIO_IRQ_DETECT_ACK_PCIACK7_M \
  822. 0x00800000
  823. #define GPIO_IRQ_DETECT_ACK_PCIACK7_S 23
  824. #define GPIO_IRQ_DETECT_ACK_PCIACK6 \
  825. 0x00400000 // Port C bit 6 masked interrupt
  826. // status: 1: Detected 0: Not
  827. // detected
  828. #define GPIO_IRQ_DETECT_ACK_PCIACK6_M \
  829. 0x00400000
  830. #define GPIO_IRQ_DETECT_ACK_PCIACK6_S 22
  831. #define GPIO_IRQ_DETECT_ACK_PCIACK5 \
  832. 0x00200000 // Port C bit 5 masked interrupt
  833. // status: 1: Detected 0: Not
  834. // detected
  835. #define GPIO_IRQ_DETECT_ACK_PCIACK5_M \
  836. 0x00200000
  837. #define GPIO_IRQ_DETECT_ACK_PCIACK5_S 21
  838. #define GPIO_IRQ_DETECT_ACK_PCIACK4 \
  839. 0x00100000 // Port C bit 4 masked interrupt
  840. // status: 1: Detected 0: Not
  841. // detected
  842. #define GPIO_IRQ_DETECT_ACK_PCIACK4_M \
  843. 0x00100000
  844. #define GPIO_IRQ_DETECT_ACK_PCIACK4_S 20
  845. #define GPIO_IRQ_DETECT_ACK_PCIACK3 \
  846. 0x00080000 // Port C bit 3 masked interrupt
  847. // status: 1: Detected 0: Not
  848. // detected
  849. #define GPIO_IRQ_DETECT_ACK_PCIACK3_M \
  850. 0x00080000
  851. #define GPIO_IRQ_DETECT_ACK_PCIACK3_S 19
  852. #define GPIO_IRQ_DETECT_ACK_PCIACK2 \
  853. 0x00040000 // Port C bit 2 masked interrupt
  854. // status: 1: Detected 0: Not
  855. // detected
  856. #define GPIO_IRQ_DETECT_ACK_PCIACK2_M \
  857. 0x00040000
  858. #define GPIO_IRQ_DETECT_ACK_PCIACK2_S 18
  859. #define GPIO_IRQ_DETECT_ACK_PCIACK1 \
  860. 0x00020000 // Port C bit 1 masked interrupt
  861. // status: 1: Detected 0: Not
  862. // detected
  863. #define GPIO_IRQ_DETECT_ACK_PCIACK1_M \
  864. 0x00020000
  865. #define GPIO_IRQ_DETECT_ACK_PCIACK1_S 17
  866. #define GPIO_IRQ_DETECT_ACK_PCIACK0 \
  867. 0x00010000 // Port C bit 0 masked interrupt
  868. // status: 1: Detected 0: Not
  869. // detected
  870. #define GPIO_IRQ_DETECT_ACK_PCIACK0_M \
  871. 0x00010000
  872. #define GPIO_IRQ_DETECT_ACK_PCIACK0_S 16
  873. #define GPIO_IRQ_DETECT_ACK_PBIACK7 \
  874. 0x00008000 // Port B bit 7 masked interrupt
  875. // status: 1: Detected 0: Not
  876. // detected
  877. #define GPIO_IRQ_DETECT_ACK_PBIACK7_M \
  878. 0x00008000
  879. #define GPIO_IRQ_DETECT_ACK_PBIACK7_S 15
  880. #define GPIO_IRQ_DETECT_ACK_PBIACK6 \
  881. 0x00004000 // Port B bit 6 masked interrupt
  882. // status: 1: Detected 0: Not
  883. // detected
  884. #define GPIO_IRQ_DETECT_ACK_PBIACK6_M \
  885. 0x00004000
  886. #define GPIO_IRQ_DETECT_ACK_PBIACK6_S 14
  887. #define GPIO_IRQ_DETECT_ACK_PBIACK5 \
  888. 0x00002000 // Port B bit 5 masked interrupt
  889. // status: 1: Detected 0: Not
  890. // detected
  891. #define GPIO_IRQ_DETECT_ACK_PBIACK5_M \
  892. 0x00002000
  893. #define GPIO_IRQ_DETECT_ACK_PBIACK5_S 13
  894. #define GPIO_IRQ_DETECT_ACK_PBIACK4 \
  895. 0x00001000 // Port B bit 4 masked interrupt
  896. // status: 1: Detected 0: Not
  897. // detected
  898. #define GPIO_IRQ_DETECT_ACK_PBIACK4_M \
  899. 0x00001000
  900. #define GPIO_IRQ_DETECT_ACK_PBIACK4_S 12
  901. #define GPIO_IRQ_DETECT_ACK_PBIACK3 \
  902. 0x00000800 // Port B bit 3 masked interrupt
  903. // status: 1: Detected 0: Not
  904. // detected
  905. #define GPIO_IRQ_DETECT_ACK_PBIACK3_M \
  906. 0x00000800
  907. #define GPIO_IRQ_DETECT_ACK_PBIACK3_S 11
  908. #define GPIO_IRQ_DETECT_ACK_PBIACK2 \
  909. 0x00000400 // Port B bit 2 masked interrupt
  910. // status: 1: Detected 0: Not
  911. // detected
  912. #define GPIO_IRQ_DETECT_ACK_PBIACK2_M \
  913. 0x00000400
  914. #define GPIO_IRQ_DETECT_ACK_PBIACK2_S 10
  915. #define GPIO_IRQ_DETECT_ACK_PBIACK1 \
  916. 0x00000200 // Port B bit 1 masked interrupt
  917. // status: 1: Detected 0: Not
  918. // detected
  919. #define GPIO_IRQ_DETECT_ACK_PBIACK1_M \
  920. 0x00000200
  921. #define GPIO_IRQ_DETECT_ACK_PBIACK1_S 9
  922. #define GPIO_IRQ_DETECT_ACK_PBIACK0 \
  923. 0x00000100 // Port B bit 0 masked interrupt
  924. // status: 1: Detected 0: Not
  925. // detected
  926. #define GPIO_IRQ_DETECT_ACK_PBIACK0_M \
  927. 0x00000100
  928. #define GPIO_IRQ_DETECT_ACK_PBIACK0_S 8
  929. #define GPIO_IRQ_DETECT_ACK_PAIACK7 \
  930. 0x00000080 // Port A bit 7 masked interrupt
  931. // status: 1: Detected 0: Not
  932. // detected
  933. #define GPIO_IRQ_DETECT_ACK_PAIACK7_M \
  934. 0x00000080
  935. #define GPIO_IRQ_DETECT_ACK_PAIACK7_S 7
  936. #define GPIO_IRQ_DETECT_ACK_PAIACK6 \
  937. 0x00000040 // Port A bit 6 masked interrupt
  938. // status: 1: Detected 0: Not
  939. // detected
  940. #define GPIO_IRQ_DETECT_ACK_PAIACK6_M \
  941. 0x00000040
  942. #define GPIO_IRQ_DETECT_ACK_PAIACK6_S 6
  943. #define GPIO_IRQ_DETECT_ACK_PAIACK5 \
  944. 0x00000020 // Port A bit 5 masked interrupt
  945. // status: 1: Detected 0: Not
  946. // detected
  947. #define GPIO_IRQ_DETECT_ACK_PAIACK5_M \
  948. 0x00000020
  949. #define GPIO_IRQ_DETECT_ACK_PAIACK5_S 5
  950. #define GPIO_IRQ_DETECT_ACK_PAIACK4 \
  951. 0x00000010 // Port A bit 4 masked interrupt
  952. // status: 1: Detected 0: Not
  953. // detected
  954. #define GPIO_IRQ_DETECT_ACK_PAIACK4_M \
  955. 0x00000010
  956. #define GPIO_IRQ_DETECT_ACK_PAIACK4_S 4
  957. #define GPIO_IRQ_DETECT_ACK_PAIACK3 \
  958. 0x00000008 // Port A bit 3 masked interrupt
  959. // status: 1: Detected 0: Not
  960. // detected
  961. #define GPIO_IRQ_DETECT_ACK_PAIACK3_M \
  962. 0x00000008
  963. #define GPIO_IRQ_DETECT_ACK_PAIACK3_S 3
  964. #define GPIO_IRQ_DETECT_ACK_PAIACK2 \
  965. 0x00000004 // Port A bit 2 masked interrupt
  966. // status: 1: Detected 0: Not
  967. // detected
  968. #define GPIO_IRQ_DETECT_ACK_PAIACK2_M \
  969. 0x00000004
  970. #define GPIO_IRQ_DETECT_ACK_PAIACK2_S 2
  971. #define GPIO_IRQ_DETECT_ACK_PAIACK1 \
  972. 0x00000002 // Port A bit 1 masked interrupt
  973. // status: 1: Detected 0: Not
  974. // detected
  975. #define GPIO_IRQ_DETECT_ACK_PAIACK1_M \
  976. 0x00000002
  977. #define GPIO_IRQ_DETECT_ACK_PAIACK1_S 1
  978. #define GPIO_IRQ_DETECT_ACK_PAIACK0 \
  979. 0x00000001 // Port A bit 0 masked interrupt
  980. // status: 1: Detected 0: Not
  981. // detected
  982. #define GPIO_IRQ_DETECT_ACK_PAIACK0_M \
  983. 0x00000001
  984. #define GPIO_IRQ_DETECT_ACK_PAIACK0_S 0
  985. //*****************************************************************************
  986. //
  987. // The following are defines for the bit fields in the
  988. // GPIO_O_USB_IRQ_ACK register.
  989. //
  990. //*****************************************************************************
  991. #define GPIO_USB_IRQ_ACK_USBACK 0x00000001 // USB masked interrupt status: 1:
  992. // Detected 0: Not detected
  993. #define GPIO_USB_IRQ_ACK_USBACK_M \
  994. 0x00000001
  995. #define GPIO_USB_IRQ_ACK_USBACK_S 0
  996. //*****************************************************************************
  997. //
  998. // The following are defines for the bit fields in the
  999. // GPIO_O_IRQ_DETECT_UNMASK register.
  1000. //
  1001. //*****************************************************************************
  1002. #define GPIO_IRQ_DETECT_UNMASK_PDIACK7 \
  1003. 0x80000000 // Port D bit 7 unmasked interrupt
  1004. // status: 1: Detected 0:
  1005. // Undetected
  1006. #define GPIO_IRQ_DETECT_UNMASK_PDIACK7_M \
  1007. 0x80000000
  1008. #define GPIO_IRQ_DETECT_UNMASK_PDIACK7_S 31
  1009. #define GPIO_IRQ_DETECT_UNMASK_PDIACK6 \
  1010. 0x40000000 // Port D bit 6 unmasked interrupt
  1011. // status: 1: Detected 0:
  1012. // Undetected
  1013. #define GPIO_IRQ_DETECT_UNMASK_PDIACK6_M \
  1014. 0x40000000
  1015. #define GPIO_IRQ_DETECT_UNMASK_PDIACK6_S 30
  1016. #define GPIO_IRQ_DETECT_UNMASK_PDIACK5 \
  1017. 0x20000000 // Port D bit 5 unmasked interrupt
  1018. // status: 1: Detected 0:
  1019. // Undetected
  1020. #define GPIO_IRQ_DETECT_UNMASK_PDIACK5_M \
  1021. 0x20000000
  1022. #define GPIO_IRQ_DETECT_UNMASK_PDIACK5_S 29
  1023. #define GPIO_IRQ_DETECT_UNMASK_PDIACK4 \
  1024. 0x10000000 // Port D bit 4 unmasked interrupt
  1025. // status: 1: Detected 0:
  1026. // Undetected
  1027. #define GPIO_IRQ_DETECT_UNMASK_PDIACK4_M \
  1028. 0x10000000
  1029. #define GPIO_IRQ_DETECT_UNMASK_PDIACK4_S 28
  1030. #define GPIO_IRQ_DETECT_UNMASK_PDIACK3 \
  1031. 0x08000000 // Port D bit 3 unmasked interrupt
  1032. // status: 1: Detected 0:
  1033. // Undetected
  1034. #define GPIO_IRQ_DETECT_UNMASK_PDIACK3_M \
  1035. 0x08000000
  1036. #define GPIO_IRQ_DETECT_UNMASK_PDIACK3_S 27
  1037. #define GPIO_IRQ_DETECT_UNMASK_PDIACK2 \
  1038. 0x04000000 // Port D bit 2 unmasked interrupt
  1039. // status: 1: Detected 0:
  1040. // Undetected
  1041. #define GPIO_IRQ_DETECT_UNMASK_PDIACK2_M \
  1042. 0x04000000
  1043. #define GPIO_IRQ_DETECT_UNMASK_PDIACK2_S 26
  1044. #define GPIO_IRQ_DETECT_UNMASK_PDIACK1 \
  1045. 0x02000000 // Port D bit 1 unmasked interrupt
  1046. // status: 1: Detected 0:
  1047. // Undetected
  1048. #define GPIO_IRQ_DETECT_UNMASK_PDIACK1_M \
  1049. 0x02000000
  1050. #define GPIO_IRQ_DETECT_UNMASK_PDIACK1_S 25
  1051. #define GPIO_IRQ_DETECT_UNMASK_PDIACK0 \
  1052. 0x01000000 // Port D bit 0 unmasked interrupt
  1053. // status: 1: Detected 0:
  1054. // Undetected
  1055. #define GPIO_IRQ_DETECT_UNMASK_PDIACK0_M \
  1056. 0x01000000
  1057. #define GPIO_IRQ_DETECT_UNMASK_PDIACK0_S 24
  1058. #define GPIO_IRQ_DETECT_UNMASK_PCIACK7 \
  1059. 0x00800000 // Port C bit 7 unmasked interrupt
  1060. // status: 1: Detected 0:
  1061. // Undetected
  1062. #define GPIO_IRQ_DETECT_UNMASK_PCIACK7_M \
  1063. 0x00800000
  1064. #define GPIO_IRQ_DETECT_UNMASK_PCIACK7_S 23
  1065. #define GPIO_IRQ_DETECT_UNMASK_PCIACK6 \
  1066. 0x00400000 // Port C bit 6 unmasked interrupt
  1067. // status: 1: Detected 0:
  1068. // Undetected
  1069. #define GPIO_IRQ_DETECT_UNMASK_PCIACK6_M \
  1070. 0x00400000
  1071. #define GPIO_IRQ_DETECT_UNMASK_PCIACK6_S 22
  1072. #define GPIO_IRQ_DETECT_UNMASK_PCIACK5 \
  1073. 0x00200000 // Port C bit 5 unmasked interrupt
  1074. // status: 1: Detected 0:
  1075. // Undetected
  1076. #define GPIO_IRQ_DETECT_UNMASK_PCIACK5_M \
  1077. 0x00200000
  1078. #define GPIO_IRQ_DETECT_UNMASK_PCIACK5_S 21
  1079. #define GPIO_IRQ_DETECT_UNMASK_PCIACK4 \
  1080. 0x00100000 // Port C bit 4 unmasked interrupt
  1081. // status: 1: Detected 0:
  1082. // Undetected
  1083. #define GPIO_IRQ_DETECT_UNMASK_PCIACK4_M \
  1084. 0x00100000
  1085. #define GPIO_IRQ_DETECT_UNMASK_PCIACK4_S 20
  1086. #define GPIO_IRQ_DETECT_UNMASK_PCIACK3 \
  1087. 0x00080000 // Port C bit 3 unmasked interrupt
  1088. // status: 1: Detected 0:
  1089. // Undetected
  1090. #define GPIO_IRQ_DETECT_UNMASK_PCIACK3_M \
  1091. 0x00080000
  1092. #define GPIO_IRQ_DETECT_UNMASK_PCIACK3_S 19
  1093. #define GPIO_IRQ_DETECT_UNMASK_PCIACK2 \
  1094. 0x00040000 // Port C bit 2 unmasked interrupt
  1095. // status: 1: Detected 0:
  1096. // Undetected
  1097. #define GPIO_IRQ_DETECT_UNMASK_PCIACK2_M \
  1098. 0x00040000
  1099. #define GPIO_IRQ_DETECT_UNMASK_PCIACK2_S 18
  1100. #define GPIO_IRQ_DETECT_UNMASK_PCIACK1 \
  1101. 0x00020000 // Port C bit 1 unmasked interrupt
  1102. // status: 1: Detected 0:
  1103. // Undetected
  1104. #define GPIO_IRQ_DETECT_UNMASK_PCIACK1_M \
  1105. 0x00020000
  1106. #define GPIO_IRQ_DETECT_UNMASK_PCIACK1_S 17
  1107. #define GPIO_IRQ_DETECT_UNMASK_PCIACK0 \
  1108. 0x00010000 // Port C bit 0 unmasked interrupt
  1109. // status: 1: Detected 0:
  1110. // Undetected
  1111. #define GPIO_IRQ_DETECT_UNMASK_PCIACK0_M \
  1112. 0x00010000
  1113. #define GPIO_IRQ_DETECT_UNMASK_PCIACK0_S 16
  1114. #define GPIO_IRQ_DETECT_UNMASK_PBIACK7 \
  1115. 0x00008000 // Port B bit 7 unmasked interrupt
  1116. // status: 1: Detected 0:
  1117. // Undetected
  1118. #define GPIO_IRQ_DETECT_UNMASK_PBIACK7_M \
  1119. 0x00008000
  1120. #define GPIO_IRQ_DETECT_UNMASK_PBIACK7_S 15
  1121. #define GPIO_IRQ_DETECT_UNMASK_PBIACK6 \
  1122. 0x00004000 // Port B bit 6 unmasked interrupt
  1123. // status: 1: Detected 0:
  1124. // Undetected
  1125. #define GPIO_IRQ_DETECT_UNMASK_PBIACK6_M \
  1126. 0x00004000
  1127. #define GPIO_IRQ_DETECT_UNMASK_PBIACK6_S 14
  1128. #define GPIO_IRQ_DETECT_UNMASK_PBIACK5 \
  1129. 0x00002000 // Port B bit 5 unmasked interrupt
  1130. // status: 1: Detected 0:
  1131. // Undetected
  1132. #define GPIO_IRQ_DETECT_UNMASK_PBIACK5_M \
  1133. 0x00002000
  1134. #define GPIO_IRQ_DETECT_UNMASK_PBIACK5_S 13
  1135. #define GPIO_IRQ_DETECT_UNMASK_PBIACK4 \
  1136. 0x00001000 // Port B bit 4 unmasked interrupt
  1137. // status: 1: Detected 0:
  1138. // Undetected
  1139. #define GPIO_IRQ_DETECT_UNMASK_PBIACK4_M \
  1140. 0x00001000
  1141. #define GPIO_IRQ_DETECT_UNMASK_PBIACK4_S 12
  1142. #define GPIO_IRQ_DETECT_UNMASK_PBIACK3 \
  1143. 0x00000800 // Port B bit 3 unmasked interrupt
  1144. // status: 1: Detected 0:
  1145. // Undetected
  1146. #define GPIO_IRQ_DETECT_UNMASK_PBIACK3_M \
  1147. 0x00000800
  1148. #define GPIO_IRQ_DETECT_UNMASK_PBIACK3_S 11
  1149. #define GPIO_IRQ_DETECT_UNMASK_PBIACK2 \
  1150. 0x00000400 // Port B bit 2 unmasked interrupt
  1151. // status: 1: Detected 0:
  1152. // Undetected
  1153. #define GPIO_IRQ_DETECT_UNMASK_PBIACK2_M \
  1154. 0x00000400
  1155. #define GPIO_IRQ_DETECT_UNMASK_PBIACK2_S 10
  1156. #define GPIO_IRQ_DETECT_UNMASK_PBIACK1 \
  1157. 0x00000200 // Port B bit 1 unmasked interrupt
  1158. // status: 1: Detected 0:
  1159. // Undetected
  1160. #define GPIO_IRQ_DETECT_UNMASK_PBIACK1_M \
  1161. 0x00000200
  1162. #define GPIO_IRQ_DETECT_UNMASK_PBIACK1_S 9
  1163. #define GPIO_IRQ_DETECT_UNMASK_PBIACK0 \
  1164. 0x00000100 // Port B bit 0 unmasked interrupt
  1165. // status: 1: Detected 0:
  1166. // Undetected
  1167. #define GPIO_IRQ_DETECT_UNMASK_PBIACK0_M \
  1168. 0x00000100
  1169. #define GPIO_IRQ_DETECT_UNMASK_PBIACK0_S 8
  1170. #define GPIO_IRQ_DETECT_UNMASK_PAIACK7 \
  1171. 0x00000080 // Port A bit 7 unmasked interrupt
  1172. // status: 1: Detected 0:
  1173. // Undetected
  1174. #define GPIO_IRQ_DETECT_UNMASK_PAIACK7_M \
  1175. 0x00000080
  1176. #define GPIO_IRQ_DETECT_UNMASK_PAIACK7_S 7
  1177. #define GPIO_IRQ_DETECT_UNMASK_PAIACK6 \
  1178. 0x00000040 // Port A bit 6 unmasked interrupt
  1179. // status: 1: Detected 0:
  1180. // Undetected
  1181. #define GPIO_IRQ_DETECT_UNMASK_PAIACK6_M \
  1182. 0x00000040
  1183. #define GPIO_IRQ_DETECT_UNMASK_PAIACK6_S 6
  1184. #define GPIO_IRQ_DETECT_UNMASK_PAIACK5 \
  1185. 0x00000020 // Port A bit 5 unmasked interrupt
  1186. // status: 1: Detected 0:
  1187. // Undetected
  1188. #define GPIO_IRQ_DETECT_UNMASK_PAIACK5_M \
  1189. 0x00000020
  1190. #define GPIO_IRQ_DETECT_UNMASK_PAIACK5_S 5
  1191. #define GPIO_IRQ_DETECT_UNMASK_PAIACK4 \
  1192. 0x00000010 // Port A bit 4 unmasked interrupt
  1193. // status: 1: Detected 0:
  1194. // Undetected
  1195. #define GPIO_IRQ_DETECT_UNMASK_PAIACK4_M \
  1196. 0x00000010
  1197. #define GPIO_IRQ_DETECT_UNMASK_PAIACK4_S 4
  1198. #define GPIO_IRQ_DETECT_UNMASK_PAIACK3 \
  1199. 0x00000008 // Port A bit 3 unmasked interrupt
  1200. // status: 1: Detected 0:
  1201. // Undetected
  1202. #define GPIO_IRQ_DETECT_UNMASK_PAIACK3_M \
  1203. 0x00000008
  1204. #define GPIO_IRQ_DETECT_UNMASK_PAIACK3_S 3
  1205. #define GPIO_IRQ_DETECT_UNMASK_PAIACK2 \
  1206. 0x00000004 // Port A bit 2 unmasked interrupt
  1207. // status: 1: Detected 0:
  1208. // Undetected
  1209. #define GPIO_IRQ_DETECT_UNMASK_PAIACK2_M \
  1210. 0x00000004
  1211. #define GPIO_IRQ_DETECT_UNMASK_PAIACK2_S 2
  1212. #define GPIO_IRQ_DETECT_UNMASK_PAIACK1 \
  1213. 0x00000002 // Port A bit 1 unmasked interrupt
  1214. // status: 1: Detected 0:
  1215. // Undetected
  1216. #define GPIO_IRQ_DETECT_UNMASK_PAIACK1_M \
  1217. 0x00000002
  1218. #define GPIO_IRQ_DETECT_UNMASK_PAIACK1_S 1
  1219. #define GPIO_IRQ_DETECT_UNMASK_PAIACK0 \
  1220. 0x00000001 // Port A bit 0 unmasked interrupt
  1221. // status: 1: Detected 0:
  1222. // Undetected
  1223. #define GPIO_IRQ_DETECT_UNMASK_PAIACK0_M \
  1224. 0x00000001
  1225. #define GPIO_IRQ_DETECT_UNMASK_PAIACK0_S 0
  1226. #endif // __HW_GPIO_H__