]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M4_SimpleLink_CC3220SF_CCS/ti/boards/CC3220SF_LAUNCHXL/Board.h
Add SimpleLink CC3220SF demo.
[freertos] / FreeRTOS / Demo / CORTEX_M4_SimpleLink_CC3220SF_CCS / ti / boards / CC3220SF_LAUNCHXL / Board.h
1 /*
2  * Copyright (c) 2016, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * *  Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  *
12  * *  Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * *  Neither the name of Texas Instruments Incorporated nor the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32
33 #ifndef __BOARD_H
34 #define __BOARD_H
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 #include <ti/drivers/ADC.h>
41 #include <ti/drivers/GPIO.h>
42 #include <ti/drivers/I2C.h>
43 #include <ti/drivers/I2S.h>
44 #include <ti/drivers/PWM.h>
45 #include <ti/drivers/SDSPI.h>
46 #include <ti/drivers/SD.h>
47 #include <ti/drivers/SPI.h>
48 #include <ti/drivers/UART.h>
49 #include <ti/drivers/Watchdog.h>
50
51 #include "CC3220SF_LAUNCHXL.h"
52
53 #define Board_initGeneral            CC3220SF_LAUNCHXL_initGeneral
54
55 #define Board_ADC0                   CC3220SF_LAUNCHXL_ADC0
56 #define Board_ADC1                   CC3220SF_LAUNCHXL_ADC1
57
58 #define Board_CRYPTO0                CC3220SF_LAUNCHXL_CRYPTO0
59
60 #define Board_GPIO_LED_ON            CC3220SF_LAUNCHXL_GPIO_LED_ON
61 #define Board_GPIO_LED_OFF           CC3220SF_LAUNCHXL_GPIO_LED_OFF
62 #define Board_GPIO_LED0              CC3220SF_LAUNCHXL_GPIO_LED_D7
63 /*
64  *  CC3220SF_LAUNCHXL_GPIO_LED_D5 and CC3220SF_LAUNCHXL_GPIO_LED_D6 are shared with the I2C
65  *  and PWM peripherals. In order for those examples to work, these LEDs are
66  *  taken out of gpioPinCOnfig[]
67  */
68 #define Board_GPIO_LED1              CC3220SF_LAUNCHXL_GPIO_LED_D7
69 #define Board_GPIO_LED2              CC3220SF_LAUNCHXL_GPIO_LED_D7
70
71 #define Board_GPIO_BUTTON0           CC3220SF_LAUNCHXL_GPIO_SW2
72 #define Board_GPIO_BUTTON1           CC3220SF_LAUNCHXL_GPIO_SW3
73
74 #define Board_I2C0                   CC3220SF_LAUNCHXL_I2C0
75 #define Board_I2C_TMP                CC3220SF_LAUNCHXL_I2C0
76
77 #define Board_I2S0                   CC3220SF_LAUNCHXL_I2S0
78
79 #define Board_PWM0                   CC3220SF_LAUNCHXL_PWM6
80 #define Board_PWM1                   CC3220SF_LAUNCHXL_PWM7
81
82 #define Board_SDSPI0                 CC3220SF_LAUNCHXL_SDSPI0
83
84 #define Board_SD0                    CC3220SF_LAUNCHXL_SD0
85
86 #define Board_SDFatFS0               CC3220SF_LAUNCHXL_SD0
87
88 /* CC3220SF_LAUNCHXL_SPI0 is reserved for the NWP */
89 #define Board_SPI0                   CC3220SF_LAUNCHXL_SPI1
90
91 #define Board_UART0                  CC3220SF_LAUNCHXL_UART0
92 #define Board_UART1                  CC3220SF_LAUNCHXL_UART1
93
94 #define Board_WATCHDOG0              CC3220SF_LAUNCHXL_WATCHDOG0
95
96 /* Board specific I2C addresses */
97 #define Board_TMP_ADDR               (0x41)
98 #define Board_SENSORS_BP_TMP_ADDR    (0x40)
99
100 /*
101  * These macros are provided for backwards compatibility.
102  * Please use the <Driver>_init functions directly rather
103  * than Board_init<Driver>.
104  */
105 #define Board_initADC                ADC_init
106 #define Board_initGPIO               GPIO_init
107 #define Board_initI2C                I2C_init
108 #define Board_initI2S                I2S_init
109 #define Board_initPWM                PWM_init
110 #define Board_initSDSPI              SDSPI_init
111 #define Board_initSD                 SD_init
112 #define Board_initSDFatFS            SDFatFS_init
113 #define Board_initSPI                SPI_init
114 #define Board_initUART               UART_init
115 #define Board_initWatchdog           Watchdog_init
116
117 /*
118  * These macros are provided for backwards compatibility.
119  * Please use the corresponding 'Board_GPIO_xxx' macros as the macros
120  * below are deprecated.
121  */
122 #define Board_LED_ON                 Board_GPIO_LED_ON
123 #define Board_LED_OFF                Board_GPIO_LED_OFF
124 #define Board_LED0                   Board_GPIO_LED0
125 #define Board_LED1                   Board_GPIO_LED1
126 #define Board_LED2                   Board_GPIO_LED2
127 #define Board_BUTTON0                Board_GPIO_BUTTON0
128 #define Board_BUTTON1                Board_GPIO_BUTTON1
129 #define Board_TMP006_ADDR            Board_TMP_ADDR
130
131 #ifdef __cplusplus
132 }
133 #endif
134
135 #endif /* __BOARD_H */