CC3200 Peripheral Driver Library User's Guide: D:/D-Drive/ti/CC3200SDK_1.2.0/driverlib/pin.h Source File

CC3200 Peripheral Driver

CC3200 Peripheral Driver Library User's Guide  1.2.0
pin.h
1 //*****************************************************************************
2 //
3 // pin.h
4 //
5 // Defines and Macros for the pin mux module
6 //
7 // Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
8 //
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions
12 // are met:
13 //
14 // Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the
20 // distribution.
21 //
22 // Neither the name of Texas Instruments Incorporated nor the names of
23 // its contributors may be used to endorse or promote products derived
24 // from this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
30 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 //*****************************************************************************
39 
40 #ifndef __PIN_H__
41 #define __PIN_H__
42 
43 //*****************************************************************************
44 //
45 // If building with a C++ compiler, make all of the definitions in this header
46 // have a C binding.
47 //
48 //*****************************************************************************
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif
53 
54 //*****************************************************************************
55 // Macros Defining Pins
56 //*****************************************************************************
57 
58 #define PIN_01 0x00000000
59 #define PIN_02 0x00000001
60 #define PIN_03 0x00000002
61 #define PIN_04 0x00000003
62 #define PIN_05 0x00000004
63 #define PIN_06 0x00000005
64 #define PIN_07 0x00000006
65 #define PIN_08 0x00000007
66 #define PIN_11 0x0000000A
67 #define PIN_12 0x0000000B
68 #define PIN_13 0x0000000C
69 #define PIN_14 0x0000000D
70 #define PIN_15 0x0000000E
71 #define PIN_16 0x0000000F
72 #define PIN_17 0x00000010
73 #define PIN_18 0x00000011
74 #define PIN_19 0x00000012
75 #define PIN_20 0x00000013
76 #define PIN_21 0x00000014
77 #define PIN_45 0x0000002C
78 #define PIN_46 0x0000002D
79 #define PIN_47 0x0000002E
80 #define PIN_48 0x0000002F
81 #define PIN_49 0x00000030
82 #define PIN_50 0x00000031
83 #define PIN_52 0x00000033
84 #define PIN_53 0x00000034
85 #define PIN_55 0x00000036
86 #define PIN_56 0x00000037
87 #define PIN_57 0x00000038
88 #define PIN_58 0x00000039
89 #define PIN_59 0x0000003A
90 #define PIN_60 0x0000003B
91 #define PIN_61 0x0000003C
92 #define PIN_62 0x0000003D
93 #define PIN_63 0x0000003E
94 #define PIN_64 0x0000003F
95 
96 
97 
98 //*****************************************************************************
99 // Macros that can be used with PinConfigSet(), PinTypeGet(), PinStrengthGet()
100 //*****************************************************************************
101 
102 #define PIN_MODE_0 0x00000000
103 #define PIN_MODE_1 0x00000001
104 #define PIN_MODE_2 0x00000002
105 #define PIN_MODE_3 0x00000003
106 #define PIN_MODE_4 0x00000004
107 #define PIN_MODE_5 0x00000005
108 #define PIN_MODE_6 0x00000006
109 #define PIN_MODE_7 0x00000007
110 #define PIN_MODE_8 0x00000008
111 #define PIN_MODE_9 0x00000009
112 #define PIN_MODE_10 0x0000000A
113 #define PIN_MODE_11 0x0000000B
114 #define PIN_MODE_12 0x0000000C
115 #define PIN_MODE_13 0x0000000D
116 #define PIN_MODE_14 0x0000000E
117 #define PIN_MODE_15 0x0000000F
118 // Note : PIN_MODE_255 is a dummy define for pinmux utility code generation
119 // PIN_MODE_255 should never be used in any user code.
120 #define PIN_MODE_255 0x000000FF
121 
122 //*****************************************************************************
123 // Macros that can be used with PinDirModeSet() and returned from
124 // PinDirModeGet().
125 //*****************************************************************************
126 #define PIN_DIR_MODE_IN 0x00000C00 // Pin is input
127 #define PIN_DIR_MODE_OUT 0x00000800 // Pin is output
128 #define PIN_DIR_MODE_HW 0x00000000 // Pin is peripheral function
129 
130 //*****************************************************************************
131 // Macros that can be used with PinConfigSet()
132 //*****************************************************************************
133 #define PIN_STRENGTH_2MA 0x00000020
134 #define PIN_STRENGTH_4MA 0x00000040
135 #define PIN_STRENGTH_6MA 0x00000060
136 
137 #define PIN_TYPE_STD 0x00000000
138 #define PIN_TYPE_STD_PU 0x00000100
139 #define PIN_TYPE_STD_PD 0x00000200
140 
141 #define PIN_TYPE_OD 0x00000010
142 #define PIN_TYPE_OD_PU 0x00000110
143 #define PIN_TYPE_OD_PD 0x00000210
144 #define PIN_TYPE_ANALOG 0x10000000
145 
146 
147 //*****************************************************************************
148 //
149 // API Function prototypes
150 //
151 //*****************************************************************************
152 extern void PinModeSet(unsigned long ulPin, unsigned long ulPinMode);
153 extern void PinDirModeSet(unsigned long ulPin, unsigned long ulPinIO);
154 extern unsigned long PinDirModeGet(unsigned long ulPin);
155 extern unsigned long PinModeGet(unsigned long ulPin);
156 extern void PinConfigGet(unsigned long ulPin,unsigned long *pulPinStrength,
157  unsigned long *pulPinType);
158 extern void PinConfigSet(unsigned long ulPin,unsigned long ulPinStrength,
159  unsigned long ulPinType);
160 extern void PinTypeUART(unsigned long ulPin,unsigned long ulPinMode);
161 extern void PinTypeI2C(unsigned long ulPin,unsigned long ulPinMode);
162 extern void PinTypeSPI(unsigned long ulPin,unsigned long ulPinMode);
163 extern void PinTypeI2S(unsigned long ulPin,unsigned long ulPinMode);
164 extern void PinTypeTimer(unsigned long ulPin,unsigned long ulPinMode);
165 extern void PinTypeCamera(unsigned long ulPin,unsigned long ulPinMode);
166 extern void PinTypeGPIO(unsigned long ulPin,unsigned long ulPinMode,
167  tBoolean bOpenDrain);
168 extern void PinTypeADC(unsigned long ulPin,unsigned long ulPinMode);
169 extern void PinTypeSDHost(unsigned long ulPin,unsigned long ulPinMode);
170 
171 
172 #ifdef __cplusplus
173 }
174 #endif
175 
176 #endif //__PIN_H__
void PinTypeSPI(unsigned long ulPin, unsigned long ulPinMode)
Definition: pin.c:448
void PinTypeADC(unsigned long ulPin, unsigned long ulPinMode)
Definition: pin.c:622
void PinConfigSet(unsigned long ulPin, unsigned long ulPinStrength, unsigned long ulPinType)
Definition: pin.c:308
void PinTypeSDHost(unsigned long ulPin, unsigned long ulPinMode)
Definition: pin.c:648
void PinModeSet(unsigned long ulPin, unsigned long ulPinMode)
Definition: pin.c:90
void PinConfigGet(unsigned long ulPin, unsigned long *pulPinStrength, unsigned long *pulPinType)
Definition: pin.c:244
void PinTypeI2S(unsigned long ulPin, unsigned long ulPinMode)
Definition: pin.c:482
void PinDirModeSet(unsigned long ulPin, unsigned long ulPinIO)
Definition: pin.c:173
void PinTypeI2C(unsigned long ulPin, unsigned long ulPinMode)
Definition: pin.c:415
unsigned long PinDirModeGet(unsigned long ulPin)
Definition: pin.c:208
void PinTypeGPIO(unsigned long ulPin, unsigned long ulPinMode, tBoolean bOpenDrain)
Definition: pin.c:582
unsigned long PinModeGet(unsigned long ulPin)
Definition: pin.c:123
void PinTypeUART(unsigned long ulPin, unsigned long ulPinMode)
Definition: pin.c:382
void PinTypeTimer(unsigned long ulPin, unsigned long ulPinMode)
Definition: pin.c:517
void PinTypeCamera(unsigned long ulPin, unsigned long ulPinMode)
Definition: pin.c:550
Generated on Thu Feb 18 2016 13:22:02 for CC3200 Peripheral Driver Library User's Guide by   doxygen 1.8.11