CC26xx Driver Library
ioc.h
Go to the documentation of this file.
1 /******************************************************************************
2 * Filename: ioc.h
3 * Revised: 2015-07-16 12:12:04 +0200 (Thu, 16 Jul 2015)
4 * Revision: 44151
5 *
6 * Description: Defines and prototypes for the IO Controller.
7 *
8 * Copyright (c) 2015, Texas Instruments Incorporated
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions are met:
13 *
14 * 1) Redistributions of source code must retain the above copyright notice,
15 * this list of conditions and the following disclaimer.
16 *
17 * 2) Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 *
21 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may
22 * be used to endorse or promote products derived from this software without
23 * specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 ******************************************************************************/
38 
39 //*****************************************************************************
40 //
45 //
46 //*****************************************************************************
47 
48 #ifndef __IOC_H__
49 #define __IOC_H__
50 
51 //*****************************************************************************
52 //
53 // If building with a C++ compiler, make all of the definitions in this header
54 // have a C binding.
55 //
56 //*****************************************************************************
57 #ifdef __cplusplus
58 extern "C"
59 {
60 #endif
61 
62 #include <stdbool.h>
63 #include <stdint.h>
64 #include <inc/hw_types.h>
65 #include <inc/hw_memmap.h>
66 #include <inc/hw_ioc.h>
67 #include <inc/hw_ints.h>
68 #include <driverlib/interrupt.h>
69 #include <driverlib/debug.h>
70 #include <driverlib/gpio.h>
71 
72 //*****************************************************************************
73 //
74 // Support for DriverLib in ROM:
75 // This section renames all functions that are not "static inline", so that
76 // calling these functions will default to implementation in flash. At the end
77 // of this file a second renaming will change the defaults to implementation in
78 // ROM for available functions.
79 //
80 // To force use of the implementation in flash, e.g. for debugging:
81 // - Globally: Define DRIVERLIB_NOROM at project level
82 // - Per function: Use prefix "NOROM_" when calling the function
83 //
84 //*****************************************************************************
85 #if !defined(DOXYGEN)
86  #define IOCPortConfigureSet NOROM_IOCPortConfigureSet
87  #define IOCPortConfigureGet NOROM_IOCPortConfigureGet
88  #define IOCIOShutdownSet NOROM_IOCIOShutdownSet
89  #define IOCIOModeSet NOROM_IOCIOModeSet
90  #define IOCIOIntSet NOROM_IOCIOIntSet
91  #define IOCIOPortPullSet NOROM_IOCIOPortPullSet
92  #define IOCIOHystSet NOROM_IOCIOHystSet
93  #define IOCIOInputSet NOROM_IOCIOInputSet
94  #define IOCIOSlewCtrlSet NOROM_IOCIOSlewCtrlSet
95  #define IOCIODrvStrengthSet NOROM_IOCIODrvStrengthSet
96  #define IOCIOPortIdSet NOROM_IOCIOPortIdSet
97  #define IOCIntEnable NOROM_IOCIntEnable
98  #define IOCIntDisable NOROM_IOCIntDisable
99  #define IOCPinTypeGpioInput NOROM_IOCPinTypeGpioInput
100  #define IOCPinTypeGpioOutput NOROM_IOCPinTypeGpioOutput
101  #define IOCPinTypeUart NOROM_IOCPinTypeUart
102  #define IOCPinTypeSsiMaster NOROM_IOCPinTypeSsiMaster
103  #define IOCPinTypeSsiSlave NOROM_IOCPinTypeSsiSlave
104  #define IOCPinTypeI2c NOROM_IOCPinTypeI2c
105  #define IOCPinTypeSpis NOROM_IOCPinTypeSpis
106  #define IOCPinTypeAux NOROM_IOCPinTypeAux
107 #endif
108 
109 //*****************************************************************************
110 //
111 // Number of IOs (max. total of 32)
112 //
113 //*****************************************************************************
114 #define NUM_IO_MAX 32
115 
116 //*****************************************************************************
117 //
118 // The following fields are IO Id for the IOC module
119 //
120 //*****************************************************************************
121 #define IOID_0 0x00000000 // IO Id 0
122 #define IOID_1 0x00000001 // IO Id 1
123 #define IOID_2 0x00000002 // IO Id 2
124 #define IOID_3 0x00000003 // IO Id 3
125 #define IOID_4 0x00000004 // IO Id 4
126 #define IOID_5 0x00000005 // IO Id 5
127 #define IOID_6 0x00000006 // IO Id 6
128 #define IOID_7 0x00000007 // IO Id 7
129 #define IOID_8 0x00000008 // IO Id 8
130 #define IOID_9 0x00000009 // IO Id 9
131 #define IOID_10 0x0000000A // IO Id 10
132 #define IOID_11 0x0000000B // IO Id 11
133 #define IOID_12 0x0000000C // IO Id 12
134 #define IOID_13 0x0000000D // IO Id 13
135 #define IOID_14 0x0000000E // IO Id 14
136 #define IOID_15 0x0000000F // IO Id 15
137 #define IOID_16 0x00000010 // IO Id 16
138 #define IOID_17 0x00000011 // IO Id 17
139 #define IOID_18 0x00000012 // IO Id 18
140 #define IOID_19 0x00000013 // IO Id 19
141 #define IOID_20 0x00000014 // IO Id 20
142 #define IOID_21 0x00000015 // IO Id 21
143 #define IOID_22 0x00000016 // IO Id 22
144 #define IOID_23 0x00000017 // IO Id 23
145 #define IOID_24 0x00000018 // IO Id 24
146 #define IOID_25 0x00000019 // IO Id 25
147 #define IOID_26 0x0000001A // IO Id 26
148 #define IOID_27 0x0000001B // IO Id 27
149 #define IOID_28 0x0000001C // IO Id 28
150 #define IOID_29 0x0000001D // IO Id 29
151 #define IOID_30 0x0000001E // IO Id 30
152 #define IOID_31 0x0000001F // IO Id 31
153 #define IOID_UNUSED 0xFFFFFFFF // Unused IO Id
154 
155 #define IOC_IOID_MASK 0x000000FF // IOC IO Id bit mask
156 
157 //*****************************************************************************
158 //
159 // Number of IO ports
160 //
161 //*****************************************************************************
162 #define NUM_IO_PORTS 56
163 
164 //*****************************************************************************
165 //
166 // IOC Peripheral Port Mapping
167 //
168 //*****************************************************************************
169 #define IOC_PORT_GPIO 0x00000000 // Default general purpose IO usage
170 #define IOC_PORT_AON_SCS 0x00000001 // AON SPI-S SCS Pin
171 #define IOC_PORT_AON_SCK 0x00000002 // AON SPI-S SCK Pin
172 #define IOC_PORT_AON_SDI 0x00000003 // AON SPI-S SDI Pin
173 #define IOC_PORT_AON_SDO 0x00000004 // AON SPI-S SDO Pin
174 #define IOC_PORT_AON_CLK32K 0x00000007 // AON External 32kHz clock
175 #define IOC_PORT_AUX_IO 0x00000008 // AUX IO Pin
176 #define IOC_PORT_MCU_SSI0_RX 0x00000009 // MCU SSI0 Receive Pin
177 #define IOC_PORT_MCU_SSI0_TX 0x0000000A // MCU SSI0 Transmit Pin
178 #define IOC_PORT_MCU_SSI0_FSS 0x0000000B // MCU SSI0 FSS Pin
179 #define IOC_PORT_MCU_SSI0_CLK 0x0000000C // MCU SSI0 Clock Pin
180 #define IOC_PORT_MCU_I2C_MSSDA 0x0000000D // MCU I2C Data Pin
181 #define IOC_PORT_MCU_I2C_MSSCL 0x0000000E // MCU I2C Clock Pin
182 #define IOC_PORT_MCU_UART0_RX 0x0000000F // MCU UART0 Receive Pin
183 #define IOC_PORT_MCU_UART0_TX 0x00000010 // MCU UART0 Transmit Pin
184 #define IOC_PORT_MCU_UART0_CTS 0x00000011 // MCU UART0 Clear To Send Pin
185 #define IOC_PORT_MCU_UART0_RTS 0x00000012 // MCU UART0 Request To Send Pin
186 #define IOC_PORT_MCU_PORT_EVENT0 0x00000017 // MCU PORT EVENT 0
187 #define IOC_PORT_MCU_PORT_EVENT1 0x00000018 // MCU PORT EVENT 1
188 #define IOC_PORT_MCU_PORT_EVENT2 0x00000019 // MCU PORT EVENT 2
189 #define IOC_PORT_MCU_PORT_EVENT3 0x0000001A // MCU PORT EVENT 3
190 #define IOC_PORT_MCU_PORT_EVENT4 0x0000001B // MCU PORT EVENT 4
191 #define IOC_PORT_MCU_PORT_EVENT5 0x0000001C // MCU PORT EVENT 5
192 #define IOC_PORT_MCU_PORT_EVENT6 0x0000001D // MCU PORT EVENT 6
193 #define IOC_PORT_MCU_PORT_EVENT7 0x0000001E // MCU PORT EVENT 7
194 #define IOC_PORT_MCU_SWV 0x00000020 // Serial Wire Viewer
195 #define IOC_PORT_MCU_SSI1_RX 0x00000021 // MCU SSI1 Receive Pin
196 #define IOC_PORT_MCU_SSI1_TX 0x00000022 // MCU SSI1 Transmit Pin
197 #define IOC_PORT_MCU_SSI1_FSS 0x00000023 // MCU SSI1 FSS Pin
198 #define IOC_PORT_MCU_SSI1_CLK 0x00000024 // MCU SSI1 Clock Pin
199 #define IOC_PORT_MCU_I2S_AD0 0x00000025 // MCU I2S Data Pin 0
200 #define IOC_PORT_MCU_I2S_AD1 0x00000026 // MCU I2S Data Pin 1
201 #define IOC_PORT_MCU_I2S_WCLK 0x00000027 // MCU I2S Frame/Word Clock
202 #define IOC_PORT_MCU_I2S_BCLK 0x00000028 // MCU I2S Bit Clock
203 #define IOC_PORT_MCU_I2S_MCLK 0x00000029 // MCU I2S Master clock 2
204 #define IOC_PORT_RFC_TRC 0x0000002E // RF Core Tracer
205 #define IOC_PORT_RFC_GPO0 0x0000002F // RC Core Data Out Pin 0
206 #define IOC_PORT_RFC_GPO1 0x00000030 // RC Core Data Out Pin 1
207 #define IOC_PORT_RFC_GPO2 0x00000031 // RC Core Data Out Pin 2
208 #define IOC_PORT_RFC_GPO3 0x00000032 // RC Core Data Out Pin 3
209 #define IOC_PORT_RFC_GPI0 0x00000033 // RC Core Data In Pin 0
210 #define IOC_PORT_RFC_GPI1 0x00000034 // RC Core Data In Pin 1
211 
212 //*****************************************************************************
213 //
214 // Defines for enabling/disabling an IO
215 //
216 //*****************************************************************************
217 #define IOC_SLEW_ENABLE 0x00001000
218 #define IOC_SLEW_DISABLE 0x00000000
219 #define IOC_INPUT_ENABLE 0x20000000
220 #define IOC_INPUT_DISABLE 0x00000000
221 #define IOC_HYST_ENABLE 0x40000000
222 #define IOC_HYST_DISABLE 0x00000000
223 
224 //*****************************************************************************
225 //
226 // Values that can be used to set the shutdown mode of an IO
227 //
228 //*****************************************************************************
229 #define IOC_NO_WAKE_UP 0x00000000
230 #define IOC_WAKE_ON_LOW 0x10000000
231 #define IOC_WAKE_ON_HIGH 0x18000000
232 
233 //*****************************************************************************
234 //
235 // Values that can be used to set the IO Mode of an IO
236 //
237 //*****************************************************************************
238 #define IOC_IOMODE_NORMAL 0x00000000 // Normal Input/Output
239 #define IOC_IOMODE_INV 0x01000000 // Inverted Input/Output
240 #define IOC_IOMODE_OPEN_DRAIN_NORMAL \
241  0x04000000 // Open Drain, Normal Input/Output
242 #define IOC_IOMODE_OPEN_DRAIN_INV \
243  0x05000000 // Open Drain, Inverted
244  // Input/Output
245 #define IOC_IOMODE_OPEN_SRC_NORMAL \
246  0x06000000 // Open Source, Normal Input/Output
247 #define IOC_IOMODE_OPEN_SRC_INV \
248  0x07000000 // Open Source, Inverted
249  // Input/Output
250 
251 //*****************************************************************************
252 //
253 // Values that can be used to set the edge detection on an IO
254 //
255 //*****************************************************************************
256 #define IOC_NO_EDGE 0x00000000 // No edge detection
257 #define IOC_FALLING_EDGE 0x00010000 // Edge detection on falling edge
258 #define IOC_RISING_EDGE 0x00020000 // Edge detection on rising edge
259 #define IOC_BOTH_EDGES 0x00030000 // Edge detection on both edges
260 #define IOC_INT_ENABLE 0x00040000 // Enable interrupt on edge detect
261 #define IOC_INT_DISABLE 0x00000000 // Disable interrupt on edge detect
262 #define IOC_INT_M 0x00070000 // Int config mask
263 
264 //*****************************************************************************
265 //
266 // Values that be used to set pull on an IO
267 //
268 //*****************************************************************************
269 #define IOC_NO_IOPULL 0x00006000 // No IO pull
270 #define IOC_IOPULL_UP 0x00004000 // Pull up
271 #define IOC_IOPULL_DOWN 0x00002000 // Pull down
272 #define IOC_IOPULL_M 0x00006000 // Pull config mask
273 #define IOC_IOPULL_M 0x00006000
274 
275 //*****************************************************************************
276 //
277 // Values that can be used to select the drive strength of an IO
278 //
279 //*****************************************************************************
280 #define IOC_CURRENT_2MA 0x00000000 // 2mA drive strength
281 #define IOC_CURRENT_4MA 0x00000400 // 4mA drive strength
282 #define IOC_CURRENT_8MA 0x00000800 // 4 or 8mA drive strength
283 #define IOC_CURRENT_16MA 0x00000C00 // Up to 16mA drive strength
284 
285 #define IOC_STRENGTH_AUTO 0x00000000 // Automatic Drive Strength
286  // (2/4/8 mA @ VVDS)
287 #define IOC_STRENGTH_MAX 0x00000300 // Maximum Drive Strength
288  // (2/4/8 mA @ 1.8V)
289 #define IOC_STRENGTH_MED 0x00000200 // Medium Drive Strength
290  // (2/4/8 mA @ 2.5V)
291 #define IOC_STRENGTH_MIN 0x00000100 // Minimum Drive Strength
292  // (2/4/8 mA @ 3.3V)
293 //*****************************************************************************
294 //
295 // Defines for standard IO setup
296 //
297 //*****************************************************************************
298 #define IOC_STD_INPUT (IOC_CURRENT_2MA | IOC_STRENGTH_AUTO | \
299  IOC_NO_IOPULL | IOC_SLEW_DISABLE | \
300  IOC_HYST_DISABLE | IOC_NO_EDGE | \
301  IOC_INT_DISABLE | IOC_IOMODE_NORMAL | \
302  IOC_NO_WAKE_UP | IOC_INPUT_ENABLE )
303 #define IOC_STD_OUTPUT (IOC_CURRENT_2MA | IOC_STRENGTH_AUTO | \
304  IOC_NO_IOPULL | IOC_SLEW_DISABLE | \
305  IOC_HYST_DISABLE | IOC_NO_EDGE | \
306  IOC_INT_DISABLE | IOC_IOMODE_NORMAL | \
307  IOC_NO_WAKE_UP | IOC_INPUT_DISABLE )
308 
309 //*****************************************************************************
310 //
311 // API Functions and prototypes
312 //
313 //*****************************************************************************
314 
315 //*****************************************************************************
316 //
428 //
429 //*****************************************************************************
430 extern void IOCPortConfigureSet(uint32_t ui32IOId, uint32_t ui32PortId,
431  uint32_t ui32IOConfig);
432 
433 //*****************************************************************************
434 //
449 //
450 //*****************************************************************************
451 extern uint32_t IOCPortConfigureGet(uint32_t ui32IOId);
452 
453 //*****************************************************************************
454 //
469 //
470 //*****************************************************************************
471 extern void IOCIOShutdownSet(uint32_t ui32IOId, uint32_t ui32IOShutdown);
472 
473 
474 //*****************************************************************************
475 //
493 //
494 //*****************************************************************************
495 extern void IOCIOModeSet(uint32_t ui32IOId, uint32_t ui32IOMode);
496 
497 //*****************************************************************************
498 //
517 //
518 //*****************************************************************************
519 extern void IOCIOIntSet(uint32_t ui32IOId, uint32_t ui32Int,
520  uint32_t ui32EdgeDet);
521 
522 //*****************************************************************************
523 //
538 //
539 //*****************************************************************************
540 extern void IOCIOPortPullSet(uint32_t ui32IOId, uint32_t ui32Pull);
541 
542 //*****************************************************************************
543 //
557 //
558 //*****************************************************************************
559 extern void IOCIOHystSet(uint32_t ui32IOId, uint32_t ui32Hysteresis);
560 
561 //*****************************************************************************
562 //
576 //
577 //*****************************************************************************
578 extern void IOCIOInputSet(uint32_t ui32IOId, uint32_t ui32Input);
579 
580 //*****************************************************************************
581 //
595 //
596 //*****************************************************************************
597 extern void IOCIOSlewCtrlSet(uint32_t ui32IOId, uint32_t ui32SlewEnable);
598 
599 //*****************************************************************************
600 //
621 //
622 //*****************************************************************************
623 extern void IOCIODrvStrengthSet(uint32_t ui32IOId, uint32_t ui32IOCurrent,
624  uint32_t ui32DrvStrength);
625 
626 //*****************************************************************************
627 //
682 //
683 //*****************************************************************************
684 extern void IOCIOPortIdSet(uint32_t ui32IOId, uint32_t ui32PortId);
685 
686 //*****************************************************************************
687 //
702 //
703 //*****************************************************************************
704 __STATIC_INLINE void
705 IOCIntRegister(void (*pfnHandler)(void))
706 {
707  //
708  // Register the interrupt handler.
709  //
710  IntRegister(INT_EDGE_DETECT, pfnHandler);
711 
712  //
713  // Enable the IO edge interrupt.
714  //
715  IntEnable(INT_EDGE_DETECT);
716 }
717 
718 //*****************************************************************************
719 //
729 //
730 //*****************************************************************************
731 __STATIC_INLINE void
733 {
734  //
735  // Disable the interrupts.
736  //
737  IntDisable(INT_EDGE_DETECT);
738 
739  //
740  // Unregister the interrupt handler.
741  //
742  IntUnregister(INT_EDGE_DETECT);
743 }
744 
745 //*****************************************************************************
746 //
756 //
757 //*****************************************************************************
758 extern void IOCIntEnable(uint32_t ui32IOId);
759 
760 //*****************************************************************************
761 //
774 //
775 //*****************************************************************************
776 extern void IOCIntDisable(uint32_t ui32IOId);
777 
778 //*****************************************************************************
779 //
801 //
802 //*****************************************************************************
803 __STATIC_INLINE void
804 IOCIntClear(uint32_t ui32IOId)
805 {
806  //
807  // Check the arguments.
808  //
809  ASSERT(ui32IOId <= IOID_31);
810 
811  //
812  // Clear the requested interrupt source by clearing the event.
813  //
814  GPIOEventClear(1 << ui32IOId);
815 }
816 
817 //*****************************************************************************
818 //
827 //
828 //*****************************************************************************
829 __STATIC_INLINE uint32_t
830 IOCIntStatus(uint32_t ui32IOId)
831 {
832  //
833  // Check the arguments.
834  //
835  ASSERT(ui32IOId <= IOID_31);
836 
837  //
838  // Get the event status.
839  //
840  return (GPIOEventGet(1 << ui32IOId));
841 }
842 
843 
844 //*****************************************************************************
845 //
869 //
870 //*****************************************************************************
871 extern void IOCPinTypeGpioInput(uint32_t ui32IOId);
872 
873 //*****************************************************************************
874 //
898 //
899 //*****************************************************************************
900 extern void IOCPinTypeGpioOutput(uint32_t ui32IOId);
901 
902 //*****************************************************************************
903 //
937 //
938 //*****************************************************************************
939 extern void IOCPinTypeUart(uint32_t ui32Base, uint32_t ui32Rx,
940  uint32_t ui32Tx, uint32_t ui32Cts,
941  uint32_t ui32Rts);
942 
943 //*****************************************************************************
944 //
970 //
971 //*****************************************************************************
972 extern void IOCPinTypeSsiMaster(uint32_t ui32Base, uint32_t ui32Rx,
973  uint32_t ui32Tx, uint32_t ui32Fss,
974  uint32_t ui32Clk);
975 
976 //*****************************************************************************
977 //
999 //
1000 //*****************************************************************************
1001 extern void IOCPinTypeSsiSlave(uint32_t ui32Base, uint32_t ui32Rx,
1002  uint32_t ui32Tx, uint32_t ui32Fss,
1003  uint32_t ui32Clk);
1004 
1005 //*****************************************************************************
1006 //
1022 //
1023 //*****************************************************************************
1024 extern void IOCPinTypeI2c(uint32_t ui32Base, uint32_t ui32Data,
1025  uint32_t ui32Clk);
1026 
1027 //*****************************************************************************
1028 //
1053 //
1054 //*****************************************************************************
1055 extern void IOCPinTypeSpis(uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Fss,
1056  uint32_t ui32Clk);
1057 
1058 //*****************************************************************************
1059 //
1076 //
1077 //*****************************************************************************
1078 extern void IOCPinTypeAux(uint32_t ui32IOId);
1079 
1080 //*****************************************************************************
1081 //
1082 // Support for DriverLib in ROM:
1083 // Redirect to implementation in ROM when available.
1084 //
1085 //*****************************************************************************
1086 #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
1087  #include <driverlib/rom.h>
1088  #ifdef ROM_IOCPortConfigureSet
1089  #undef IOCPortConfigureSet
1090  #define IOCPortConfigureSet ROM_IOCPortConfigureSet
1091  #endif
1092  #ifdef ROM_IOCPortConfigureGet
1093  #undef IOCPortConfigureGet
1094  #define IOCPortConfigureGet ROM_IOCPortConfigureGet
1095  #endif
1096  #ifdef ROM_IOCIOShutdownSet
1097  #undef IOCIOShutdownSet
1098  #define IOCIOShutdownSet ROM_IOCIOShutdownSet
1099  #endif
1100  #ifdef ROM_IOCIOModeSet
1101  #undef IOCIOModeSet
1102  #define IOCIOModeSet ROM_IOCIOModeSet
1103  #endif
1104  #ifdef ROM_IOCIOIntSet
1105  #undef IOCIOIntSet
1106  #define IOCIOIntSet ROM_IOCIOIntSet
1107  #endif
1108  #ifdef ROM_IOCIOPortPullSet
1109  #undef IOCIOPortPullSet
1110  #define IOCIOPortPullSet ROM_IOCIOPortPullSet
1111  #endif
1112  #ifdef ROM_IOCIOHystSet
1113  #undef IOCIOHystSet
1114  #define IOCIOHystSet ROM_IOCIOHystSet
1115  #endif
1116  #ifdef ROM_IOCIOInputSet
1117  #undef IOCIOInputSet
1118  #define IOCIOInputSet ROM_IOCIOInputSet
1119  #endif
1120  #ifdef ROM_IOCIOSlewCtrlSet
1121  #undef IOCIOSlewCtrlSet
1122  #define IOCIOSlewCtrlSet ROM_IOCIOSlewCtrlSet
1123  #endif
1124  #ifdef ROM_IOCIODrvStrengthSet
1125  #undef IOCIODrvStrengthSet
1126  #define IOCIODrvStrengthSet ROM_IOCIODrvStrengthSet
1127  #endif
1128  #ifdef ROM_IOCIOPortIdSet
1129  #undef IOCIOPortIdSet
1130  #define IOCIOPortIdSet ROM_IOCIOPortIdSet
1131  #endif
1132  #ifdef ROM_IOCIntEnable
1133  #undef IOCIntEnable
1134  #define IOCIntEnable ROM_IOCIntEnable
1135  #endif
1136  #ifdef ROM_IOCIntDisable
1137  #undef IOCIntDisable
1138  #define IOCIntDisable ROM_IOCIntDisable
1139  #endif
1140  #ifdef ROM_IOCPinTypeGpioInput
1141  #undef IOCPinTypeGpioInput
1142  #define IOCPinTypeGpioInput ROM_IOCPinTypeGpioInput
1143  #endif
1144  #ifdef ROM_IOCPinTypeGpioOutput
1145  #undef IOCPinTypeGpioOutput
1146  #define IOCPinTypeGpioOutput ROM_IOCPinTypeGpioOutput
1147  #endif
1148  #ifdef ROM_IOCPinTypeUart
1149  #undef IOCPinTypeUart
1150  #define IOCPinTypeUart ROM_IOCPinTypeUart
1151  #endif
1152  #ifdef ROM_IOCPinTypeSsiMaster
1153  #undef IOCPinTypeSsiMaster
1154  #define IOCPinTypeSsiMaster ROM_IOCPinTypeSsiMaster
1155  #endif
1156  #ifdef ROM_IOCPinTypeSsiSlave
1157  #undef IOCPinTypeSsiSlave
1158  #define IOCPinTypeSsiSlave ROM_IOCPinTypeSsiSlave
1159  #endif
1160  #ifdef ROM_IOCPinTypeI2c
1161  #undef IOCPinTypeI2c
1162  #define IOCPinTypeI2c ROM_IOCPinTypeI2c
1163  #endif
1164  #ifdef ROM_IOCPinTypeSpis
1165  #undef IOCPinTypeSpis
1166  #define IOCPinTypeSpis ROM_IOCPinTypeSpis
1167  #endif
1168  #ifdef ROM_IOCPinTypeAux
1169  #undef IOCPinTypeAux
1170  #define IOCPinTypeAux ROM_IOCPinTypeAux
1171  #endif
1172 #endif
1173 
1174 //*****************************************************************************
1175 //
1176 // Mark the end of the C bindings section for C++ compilers.
1177 //
1178 //*****************************************************************************
1179 #ifdef __cplusplus
1180 }
1181 #endif
1182 
1183 #endif // __IOC_H__
1184 
1185 //*****************************************************************************
1186 //
1190 //
1191 //*****************************************************************************
void IOCIntDisable(uint32_t ui32IOId)
Disables individual IO edge interrupt sources.
Definition: ioc.c:494
void IOCIOSlewCtrlSet(uint32_t ui32IOId, uint32_t ui32SlewEnable)
Enable/disable the slew control on an IO port.
Definition: ioc.c:366
void IOCPinTypeSsiMaster(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Fss, uint32_t ui32Clk)
Configure a set of IOs for standard SSI peripheral master control.
Definition: ioc.c:610
void IOCPinTypeI2c(uint32_t ui32Base, uint32_t ui32Data, uint32_t ui32Clk)
Configure a set of IOs for standard I2C peripheral control.
Definition: ioc.c:734
void IOCIOShutdownSet(uint32_t ui32IOId, uint32_t ui32IOShutdown)
Set wake-up on an IO port.
Definition: ioc.c:169
void IOCPinTypeSsiSlave(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Fss, uint32_t ui32Clk)
Configure a set of IOs for standard SSI peripheral slave control.
Definition: ioc.c:672
void IOCIOHystSet(uint32_t ui32IOId, uint32_t ui32Hysteresis)
Configure hysteresis on and IO port.
Definition: ioc.c:304
void IOCIOInputSet(uint32_t ui32IOId, uint32_t ui32Input)
Enable/disable IO port as input.
Definition: ioc.c:335
void IOCIntEnable(uint32_t ui32IOId)
Enables individual IO edge detect interrupt.
Definition: ioc.c:465
static uint32_t IOCIntStatus(uint32_t ui32IOId)
Returns the status of the IO interrupts.
Definition: ioc.h:830
void IOCIODrvStrengthSet(uint32_t ui32IOId, uint32_t ui32IOCurrent, uint32_t ui32DrvStrength)
Configure the drive strength and maximum current of an IO port.
Definition: ioc.c:397
static uint32_t GPIOEventGet(uint32_t ui32Pin)
Get the event status of a specific pin.
Definition: gpio.h:350
static void GPIOEventClear(uint32_t ui32Pins)
Clear an IO event on a pin.
Definition: gpio.h:377
void IOCPinTypeAux(uint32_t ui32IOId)
Configure an IO for AUX control.
Definition: ioc.c:803
void IOCIOIntSet(uint32_t ui32IOId, uint32_t ui32Int, uint32_t ui32EdgeDet)
Setup interrupt detection on an IO Port.
Definition: ioc.c:237
#define ASSERT(expr)
Definition: debug.h:74
uint32_t IOCPortConfigureGet(uint32_t ui32IOId)
Get the configuration of an IO port.
Definition: ioc.c:143
void IOCPortConfigureSet(uint32_t ui32IOId, uint32_t ui32PortId, uint32_t ui32IOConfig)
Set the configuration of an IO port.
Definition: ioc.c:115
void IOCPinTypeGpioOutput(uint32_t ui32IOId)
Setup an IO for standard GPIO output.
Definition: ioc.c:547
static void IOCIntUnregister(void)
Unregisters an interrupt handler for a IO edge interrupt.
Definition: ioc.h:732
void IOCIOPortIdSet(uint32_t ui32IOId, uint32_t ui32PortId)
Setup the Port ID for this IO.
Definition: ioc.c:435
void IOCPinTypeGpioInput(uint32_t ui32IOId)
Setup an IO for standard GPIO input.
Definition: ioc.c:523
void IntUnregister(uint32_t ui32Interrupt)
Unregisters the function to be called when an interrupt occurs.
Definition: interrupt.c:203
static void IOCIntClear(uint32_t ui32IOId)
Clears the IO edge interrupt source.
Definition: ioc.h:804
#define IOID_31
Definition: ioc.h:152
void IOCPinTypeUart(uint32_t ui32Base, uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Cts, uint32_t ui32Rts)
Configure a set of IOs for standard UART peripheral control.
Definition: ioc.c:571
void IOCIOModeSet(uint32_t ui32IOId, uint32_t ui32IOMode)
Set the IO Mode of an IO Port.
Definition: ioc.c:202
void IntDisable(uint32_t ui32Interrupt)
Disables an interrupt.
Definition: interrupt.c:381
void IntRegister(uint32_t ui32Interrupt, void(*pfnHandler)(void))
Registers a function to be called when an interrupt occurs.
Definition: interrupt.c:155
static void IOCIntRegister(void(*pfnHandler)(void))
Register an interrupt handler for an IO edge interrupt.
Definition: ioc.h:705
void IOCIOPortPullSet(uint32_t ui32IOId, uint32_t ui32Pull)
Set the pull on an IO port.
Definition: ioc.c:272
void IntEnable(uint32_t ui32Interrupt)
Enables an interrupt.
Definition: interrupt.c:321
void IOCPinTypeSpis(uint32_t ui32Rx, uint32_t ui32Tx, uint32_t ui32Fss, uint32_t ui32Clk)
Configure a set of IOs for standard SPIS peripheral control.
Definition: ioc.c:765