]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/driverlib/pmap.h
Final V8.2.1 release ready for tagging:
[freertos] / FreeRTOS / Demo / CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil / driverlib / pmap.h
1 /*
2  * -------------------------------------------
3  *    MSP432 DriverLib - v01_04_00_18 
4  * -------------------------------------------
5  *
6  * --COPYRIGHT--,BSD,BSD
7  * Copyright (c) 2015, Texas Instruments Incorporated
8  * All rights reserved.
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 distribution.
20  *
21  * *  Neither the name of Texas Instruments Incorporated nor the names of
22  *    its contributors may be used to endorse or promote products derived
23  *    from this software without 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,
27  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
29  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
35  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  * --/COPYRIGHT--*/
37 #ifndef __PMAP_H__
38 #define __PMAP_H__
39
40 //*****************************************************************************
41 //
42 //! \addtogroup pmap_api
43 //! @{
44 //
45 //*****************************************************************************
46
47 //*****************************************************************************
48 //
49 // If building with a C++ compiler, make all of the definitions in this header
50 // have a C binding.
51 //
52 //*****************************************************************************
53 #ifdef __cplusplus
54 extern "C"
55 {
56 #endif
57
58 #include <stdint.h>
59 #include <msp.h>
60
61 //*****************************************************************************
62 //
63 //The following are values that can be passed to the PMAP_configurePorts() API
64 //as the portMapReconfigure parameter.
65 //
66 //*****************************************************************************
67 #define PMAP_ENABLE_RECONFIGURATION     PMAPRECFG
68 #define PMAP_DISABLE_RECONFIGURATION    0x00
69
70 //*****************************************************************************
71 //
72 //The following are values that can be passed to the PMAP_configurePorts() API
73 //as the portMapReconfigure parameter.
74 //
75 //*****************************************************************************
76 #define P1MAP OFS_P1MAP01
77 #define P2MAP OFS_P2MAP01
78 #define P3MAP OFS_P3MAP01
79 #define P4MAP OFS_P4MAP01
80 #define P5MAP OFS_P5MAP01
81 #define P6MAP OFS_P6MAP01
82 #define P7MAP OFS_P7MAP01
83
84
85 //*****************************************************************************
86 //
87 //Prototypes for the APIs.
88 //
89 //*****************************************************************************
90
91 //*****************************************************************************
92 //
93 //! This function configures the MSP432 Port Mapper
94 //!
95 //! \param portMapping is the pointer to init Data
96 //! \param pxMAPy is the Port Mapper to initialize
97 //! \param numberOfPorts is the number of Ports to initialize
98 //! \param portMapReconfigure is used to enable/disable reconfiguration
99 //!             Valid values are
100 //!             \b PMAP_ENABLE_RECONFIGURATION
101 //!             \b PMAP_DISABLE_RECONFIGURATION [Default value]
102 //! Modified registers are \b PMAPKEYID, \b PMAPCTL
103 //!
104 //! \return None
105 //
106 //*****************************************************************************
107 extern void PMAP_configurePorts(const uint8_t *portMapping, uint8_t pxMAPy,
108         uint8_t numberOfPorts, uint8_t portMapReconfigure);
109
110 /* Defines for future devices that might have multiple instances */
111 #define PMAP_configurePortsMultipleInstance(a,b,c,d,e) PMAP_configurePorts(b,c,d,e)
112
113 //*****************************************************************************
114 //
115 // Mark the end of the C bindings section for C++ compilers.
116 //
117 //*****************************************************************************
118 #ifdef __cplusplus
119 }
120 #endif
121
122 //*****************************************************************************
123 //
124 // Close the Doxygen group.
125 //! @}
126 //
127 //*****************************************************************************
128
129 #endif