]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - iotdev/azure-iot-pal-simplelink.git/blob - sample/CC3220S_LAUNCHXL/Board.h
Initial PAL implementation for TI SimpleLink
[iotdev/azure-iot-pal-simplelink.git] / sample / CC3220S_LAUNCHXL / Board.h
1 /*
2  * Copyright (c) 2016-2018, 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  */
33 #ifndef __BOARD_H
34 #define __BOARD_H
36 #define Board_CC3220S_LAUNCHXL
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
42 #include "CC3220S_LAUNCHXL.h"
44 #define Board_initGeneral            CC3220S_LAUNCHXL_initGeneral
46 /* These #defines allow us to reuse TI-RTOS across other device families */
48 #define Board_ADC0                   CC3220S_LAUNCHXL_ADC0
49 #define Board_ADC1                   CC3220S_LAUNCHXL_ADC1
51 #define Board_CAPTURE0               CC3220S_LAUNCHXL_CAPTURE0
52 #define Board_CAPTURE1               CC3220S_LAUNCHXL_CAPTURE1
54 #define Board_CRYPTO0                CC3220S_LAUNCHXL_CRYPTO0
56 #define Board_GPIO_LED_ON            CC3220S_LAUNCHXL_GPIO_LED_ON
57 #define Board_GPIO_LED_OFF           CC3220S_LAUNCHXL_GPIO_LED_OFF
58 #define Board_GPIO_LED0              CC3220S_LAUNCHXL_GPIO_LED_D7
59 /*
60  *  CC3220S_LAUNCHXL_GPIO_LED_D5 and CC3220S_LAUNCHXL_GPIO_LED_D6 are shared with the I2C
61  *  and PWM peripherals. In order for those examples to work, these LEDs are
62  *  taken out of gpioPinCOnfig[]
63  */
64 #define Board_GPIO_LED1              CC3220S_LAUNCHXL_GPIO_LED_D7
65 #define Board_GPIO_LED2              CC3220S_LAUNCHXL_GPIO_LED_D7
67 #define Board_GPIO_BUTTON0           CC3220S_LAUNCHXL_GPIO_SW2
68 #define Board_GPIO_BUTTON1           CC3220S_LAUNCHXL_GPIO_SW3
70 #define Board_I2C0                   CC3220S_LAUNCHXL_I2C0
71 #define Board_I2C_TMP                CC3220S_LAUNCHXL_I2C0
73 #define Board_I2S0                   CC3220S_LAUNCHXL_I2S0
75 #define Board_PWM0                   CC3220S_LAUNCHXL_PWM6
76 #define Board_PWM1                   CC3220S_LAUNCHXL_PWM7
78 #define Board_SD0                    CC3220S_LAUNCHXL_SD0
80 #define Board_SDFatFS0               CC3220S_LAUNCHXL_SD0
82 /* CC3220S_LAUNCHXL_SPI0 is reserved for the NWP */
83 #define Board_SPI0                   CC3220S_LAUNCHXL_SPI1
85 #define Board_SPI_MASTER             CC3220S_LAUNCHXL_SPI1
86 #define Board_SPI_SLAVE              CC3220S_LAUNCHXL_SPI1
87 #define Board_SPI_MASTER_READY       CC3220S_LAUNCHXL_SPI_MASTER_READY
88 #define Board_SPI_SLAVE_READY        CC3220S_LAUNCHXL_SPI_SLAVE_READY
90 #define Board_TIMER0                 CC3220S_LAUNCHXL_TIMER0
91 #define Board_TIMER1                 CC3220S_LAUNCHXL_TIMER1
92 #define Board_TIMER2                 CC3220S_LAUNCHXL_TIMER2
94 #define Board_UART0                  CC3220S_LAUNCHXL_UART0
95 #define Board_UART1                  CC3220S_LAUNCHXL_UART1
97 #define Board_WATCHDOG0              CC3220S_LAUNCHXL_WATCHDOG0
99 /* Board specific I2C addresses */
100 #define Board_TMP_ADDR               (0x41)
101 #define Board_SENSORS_BP_TMP_ADDR    (0x40)
103 #ifdef __cplusplus
105 #endif
107 #endif /* __BOARD_H */