1 /** @file reg_gio.h
2 *   @brief GIO Register Layer Header File
3 *   @date 29.May.2013
4 *   @version 03.05.02
5 *
6 *   This file contains:
7 *   - Definitions
8 *   - Types
9 *   - Interface Prototypes
10 *   .
11 *   which are relevant for the GIO driver.
12 */
13 
14 /* (c) Texas Instruments 2009-2013, All rights reserved. */
15 
16 #ifndef __REG_GIO_H__
17 #define __REG_GIO_H__
18 
19 #include "sys_common.h"
20 
21 
22 
23 /* USER CODE BEGIN (0) */
24 /* USER CODE END */
25 
26 /* Gio Register Frame Definition */
27 /** @struct gioBase
28 *   @brief GIO Base Register Definition
29 *
30 *   This structure is used to access the GIO module registers.
31 */
32 /** @typedef gioBASE_t
33 *   @brief GIO Register Frame Type Definition
34 *
35 *   This type is used to access the GIO Registers.
36 */
37 typedef volatile struct gioBase
38 {
39     uint32 GCR0;      /**< 0x0000: Global Control Register */
40     uint32 PWDN;      /**< 0x0004: Power Down Register */
41     uint32 INTDET;    /**< 0x0008: Interrupt Detect Register*/
42     uint32 POL;       /**< 0x000C: Interrupt Polarity Register */
43     uint32 INTENASET; /**< 0x0010: Interrupt Enable Set Register */
44     uint32 INTENACLR; /**< 0x0014: Interrupt Enable Clear Register */
45     uint32 LVLSET;    /**< 0x0018: Interrupt Priority Set Register */
46     uint32 LVLCLR;    /**< 0x001C: Interrupt Priority Clear Register */
47     uint32 FLG;       /**< 0x0020: Interrupt Flag Register */
48     uint32 OFFSET0;   /**< 0x0024: Interrupt Offset A Register */
49     uint32 OFFSET1;   /**< 0x0028: Interrupt Offset B Register */
50 } gioBASE_t;
51 
52 
53 /** @struct gioPort
54 *   @brief GIO Port Register Definition
55 */
56 /** @typedef gioPORT_t
57 *   @brief GIO Port Register Type Definition
58 *
59 *   This type is used to access the GIO Port Registers.
60 */
61 typedef volatile struct gioPort
62 {
63     uint32 DIR;    /**< 0x0000: Data Direction Register */
64     uint32 DIN;    /**< 0x0004: Data Input Register */
65     uint32 DOUT;   /**< 0x0008: Data Output Register */
66     uint32 DSET;   /**< 0x000C: Data Output Set Register */
67     uint32 DCLR;   /**< 0x0010: Data Output Clear Register */
68     uint32 PDR;    /**< 0x0014: Open Drain Register */
69     uint32 PULDIS; /**< 0x0018: Pullup Disable Register */
70     uint32 PSL;    /**< 0x001C: Pull Up/Down Selection Register */
71 } gioPORT_t;
72 
73 
74 /** @def gioREG
75 *   @brief GIO Register Frame Pointer
76 *
77 *   This pointer is used by the GIO driver to access the gio module registers.
78 */
79 #define gioREG   ((gioBASE_t *)0xFFF7BC00U)
80 
81 /** @def gioPORTA
82 *   @brief GIO Port (A) Register Pointer
83 *
84 *   Pointer used by the GIO driver to access PORTA
85 */
86 #define gioPORTA ((gioPORT_t *)0xFFF7BC34U)
87 
88 /** @def gioPORTB
89 *   @brief GIO Port (B) Register Pointer
90 *
91 *   Pointer used by the GIO driver to access PORTB
92 */
93 #define gioPORTB ((gioPORT_t *)0xFFF7BC54U)
94 
95 /* USER CODE BEGIN (1) */
96 /* USER CODE END */
97 
98 
99 #endif
100