2 * @brief GIO Driver Definition File
8 /* (c) Texas Instruments 2009-2012, All rights reserved. */
15 /** @enum Loopbacktype
16 * @brief Loopback type definition
18 /** @typedef Loopbacktype_t
19 * @brief Loopback type Type Definition
21 * This type is used to select the module Loopback type Digital or Analog loopback.
23 typedef enum Loopbacktype {
31 * @brief GIO Base Register Definition
33 * This structure is used to access the GIO module egisters.
35 /** @typedef gioBASE_t
36 * @brief GIO Register Frame Type Definition
38 * This type is used to access the GIO Registers.
40 typedef volatile struct gioBase
42 uint32_t GCR0; /**< 0x0000: Global Control Register */
43 uint32_t PWDN; /**< 0x0004: Power Down Register */
44 uint32_t INTDET; /**< 0x0008: Interrupt Detect Regsiter*/
45 uint32_t POL; /**< 0x000C: Interrupt Polarity Register */
46 uint32_t INTENASET; /**< 0x0010: Interrupt Enable Set Register */
47 uint32_t INTENACLR; /**< 0x0014: Interrupt Enable Clear Register */
48 uint32_t LVLSET; /**< 0x0018: Interrupt Priority Set Register */
49 uint32_t LVLCLR; /**< 0x001C: Interrupt Priority Clear Register */
50 uint32_t FLG; /**< 0x0020: Interrupt Flag Register */
51 uint32_t OFFSET0; /**< 0x0024: Interrupt Offset A Register */
52 uint32_t OFFSET1; /**< 0x0028: Interrupt Offset B Register */
57 * @brief GIO Port Register Definition
59 /** @typedef gioPORT_t
60 * @brief GIO Port Register Type Definition
62 * This type is used to access the GIO Port Registers.
64 typedef volatile struct gioPort
66 uint32_t DIR; /**< 0x0000: Data Direction Register */
67 uint32_t DIN; /**< 0x0004: Data Input Register */
68 uint32_t DOUT; /**< 0x0008: Data Output Register */
69 uint32_t DSET; /**< 0x000C: Data Output Set Register */
70 uint32_t DCLR; /**< 0x0010: Data Output Clear Register */
71 uint32_t PDR; /**< 0x0014: Open Drain Regsiter */
72 uint32_t PULDIS; /**< 0x0018: Pullup Disable Register */
73 uint32_t PSL; /**< 0x001C: Pull Up/Down Selection Register */
78 * @brief GIO Register Frame Pointer
80 * This pointer is used by the GIO driver to access the gio module registers.
82 #define gioREG ((gioBASE_t *)0xFFF7BC00U)
85 * @brief GIO Port (A) Register Pointer
87 * Pointer used by the GIO driver to access PORTA
89 #define gioPORTA ((gioPORT_t *)0xFFF7BC34U)
92 * @brief GIO Port (B) Register Pointer
94 * Pointer used by the GIO driver to access PORTB
96 #define gioPORTB ((gioPORT_t *)0xFFF7BC54U)
99 /* GIO Interface Functions */
101 void gioSetDirection(gioPORT_t *port, uint32_t dir);
102 void gioSetBit(gioPORT_t *port, uint32_t bit, uint32_t value);
103 void gioSetPort(gioPORT_t *port, uint32_t value);
104 uint32_t gioGetBit(gioPORT_t *port, uint32_t bit);
105 uint32_t gioGetPort(gioPORT_t *port);
106 void gioToggleBit(gioPORT_t *port, uint32_t bit);
107 void gioEnableNotification(uint32_t bit);
108 void gioDisableNotification(uint32_t bit);
109 void gioNotification(int bit);