collab/mm20
git clone https://git.julia.blue/collab/mm20
b47fcc8
firmware
1/* 2* Copyright (c) 2015, 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* @file EK_TM4C123GXL.h 34* 35* @brief EK_TM4C123GXL Board Specific APIs 36* 37* The EK_TM4C123GXL header file should be included in an application as 38* follows: 39* @code 40* #include <EK_TM4C123GXL.h> 41* @endcode 42* 43* ============================================================================ 44*/ 45#ifndef __EK_TM4C123GXL_H 46#define __EK_TM4C123GXL_H 47 48#ifdef __cplusplus 49extern "C" { 50#endif 51 52/* LEDs on EK_TM4C123GXL are active high. */ 53#define EK_TM4C123GXL_LED_OFF (0) 54#define EK_TM4C123GXL_LED_ON (1) 55 56/*! 57* @def EK_TM4C123GXL_GPIOName 58* @brief Enum of GPIO names on the EK_TM4C123GXL dev board 59*/ 60typedef enum EK_TM4C123GXL_GPIOName { 61EK_TM4C123GXL_SW1 = 0 , 62EK_TM4C123GXL_SW2 , 63EK_TM4C123GXL_LED_RED , 64EK_TM4C123GXL_LED_BLUE , 65EK_TM4C123GXL_LED_GREEN , 66 67EK_TM4C123GXL_GPIOCOUNT 68}EK_TM4C123GXL_GPIOName ; 69 70/*! 71* @def EK_TM4C123GXL_I2CName 72* @brief Enum of I2C names on the EK_TM4C123GXL dev board 73*/ 74typedef enum EK_TM4C123GXL_I2CName { 75EK_TM4C123GXL_I2C0 = 0 , 76EK_TM4C123GXL_I2C3 , 77 78EK_TM4C123GXL_I2CCOUNT 79}EK_TM4C123GXL_I2CName ; 80 81/*! 82* @def EK_TM4C123GXL_PWMName 83* @brief Enum of PWM names on the EK_TM4C123GXL dev board 84*/ 85typedef enum EK_TM4C123GXL_PWMName { 86EK_TM4C123GXL_PWM6 = 0 , 87EK_TM4C123GXL_PWM7 , 88 89EK_TM4C123GXL_PWMCOUNT 90}EK_TM4C123GXL_PWMName ; 91 92/*! 93* @def EK_TM4C123GXL_SDSPIName 94* @brief Enum of SDSPI names on the EK_TM4C123GXL dev board 95*/ 96typedef enum EK_TM4C123GXL_SDSPIName { 97EK_TM4C123GXL_SDSPI0 = 0 , 98 99EK_TM4C123GXL_SDSPICOUNT 100}EK_TM4C123GXL_SDSPIName ; 101 102/*! 103* @def EK_TM4C123GXL_SPIName 104* @brief Enum of SPI names on the EK_TM4C123GXL dev board 105*/ 106typedef enum EK_TM4C123GXL_SPIName { 107EK_TM4C123GXL_SPI0 = 0 , 108EK_TM4C123GXL_SPI2 , 109EK_TM4C123GXL_SPI3 , 110 111EK_TM4C123GXL_SPICOUNT 112}EK_TM4C123GXL_SPIName ; 113 114/*! 115* @def EK_TM4C123GXL_UARTName 116* @brief Enum of UARTs on the EK_TM4C123GXL dev board 117*/ 118typedef enum EK_TM4C123GXL_UARTName { 119EK_TM4C123GXL_UART0 = 0 , 120 121EK_TM4C123GXL_UARTCOUNT 122}EK_TM4C123GXL_UARTName ; 123 124/*! 125* @def EK_TM4C123GXL_USBMode 126* @brief Enum of USB setup function on the EK_TM4C123GXL dev board 127*/ 128typedef enum EK_TM4C123GXL_USBMode { 129EK_TM4C123GXL_USBDEVICE , 130EK_TM4C123GXL_USBHOST 131}EK_TM4C123GXL_USBMode ; 132 133/*! 134* @def EK_TM4C123GXL_WatchdogName 135* @brief Enum of Watchdogs on the EK_TM4C123GXL dev board 136*/ 137typedef enum EK_TM4C123GXL_WatchdogName { 138EK_TM4C123GXL_WATCHDOG0 = 0 , 139 140EK_TM4C123GXL_WATCHDOGCOUNT 141}EK_TM4C123GXL_WatchdogName ; 142 143/*! 144* @def EK_TM4C123GXL_WiFiName 145* @brief Enum of WiFi names on the EK_TM4C123GXL dev board 146*/ 147typedef enum EK_TM4C123GXL_WiFiName { 148EK_TM4C123GXL_WIFI = 0 , 149 150EK_TM4C123GXL_WIFICOUNT 151}EK_TM4C123GXL_WiFiName ; 152 153/*! 154* @brief Initialize board specific DMA settings 155* 156* This function creates a hwi in case the DMA controller creates an error 157* interrrupt, enables the DMA and supplies it with a uDMA control table. 158*/ 159extern void EK_TM4C123GXL_initDMA (void ); 160 161/*! 162* @brief Initialize the general board specific settings 163* 164* This function initializes the general board specific settings. 165* This includes: 166* - Flash wait states based on the process 167* - Disable clock source to watchdog module 168* - Enable clock sources for peripherals 169*/ 170extern void EK_TM4C123GXL_initGeneral (void ); 171 172/*! 173* @brief Initialize board specific GPIO settings 174* 175* This function initializes the board specific GPIO settings and 176* then calls the GPIO_init API to initialize the GPIO module. 177* 178* The GPIOs controlled by the GPIO module are determined by the GPIO_PinConfig 179* variable. 180*/ 181extern void EK_TM4C123GXL_initGPIO (void ); 182 183/*! 184* @brief Initialize board specific I2C settings 185* 186* This function initializes the board specific I2C settings and then calls 187* the I2C_init API to initialize the I2C module. 188* 189* The I2C peripherals controlled by the I2C module are determined by the 190* I2C_config variable. 191*/ 192extern void EK_TM4C123GXL_initI2C (void ); 193 194/*! 195* @brief Initialize board specific PWM settings 196* 197* This function initializes the board specific PWM settings and then calls 198* the PWM_init API to initialize the PWM module. 199* 200* The PWM peripherals controlled by the PWM module are determined by the 201* PWM_config variable. 202*/ 203extern void EK_TM4C123GXL_initPWM (void ); 204 205/*! 206* @brief Initialize board specific SDSPI settings 207* 208* This function initializes the board specific SDSPI settings and then calls 209* the SDSPI_init API to initialize the SDSPI module. 210* 211* The SDSPI peripherals controlled by the SDSPI module are determined by the 212* SDSPI_config variable. 213*/ 214extern void EK_TM4C123GXL_initSDSPI (void ); 215 216/*! 217* @brief Initialize board specific SPI settings 218* 219* This function initializes the board specific SPI settings and then calls 220* the SPI_init API to initialize the SPI module. 221* 222* The SPI peripherals controlled by the SPI module are determined by the 223* SPI_config variable. 224*/ 225extern void EK_TM4C123GXL_initSPI (void ); 226 227/*! 228* @brief Initialize board specific UART settings 229* 230* This function initializes the board specific UART settings and then calls 231* the UART_init API to initialize the UART module. 232* 233* The UART peripherals controlled by the UART module are determined by the 234* UART_config variable. 235*/ 236extern void EK_TM4C123GXL_initUART (void ); 237 238/*! 239* @brief Initialize board specific USB settings 240* 241* This function initializes the board specific USB settings and pins based on 242* the USB mode of operation. 243* 244* @param usbMode USB mode of operation 245*/ 246extern void EK_TM4C123GXL_initUSB (EK_TM4C123GXL_USBMode usbMode ); 247 248/*! 249* @brief Initialize board specific Watchdog settings 250* 251* This function initializes the board specific Watchdog settings and then 252* calls the Watchdog_init API to initialize the Watchdog module. 253* 254* The Watchdog peripherals controlled by the Watchdog module are determined 255* by the Watchdog_config variable. 256*/ 257extern void EK_TM4C123GXL_initWatchdog (void ); 258 259/*! 260* @brief Initialize board specific WiFi settings 261* 262* This function initializes the board specific WiFi settings and then calls 263* the WiFi_init API to initialize the WiFi module. 264* 265* The hardware resources controlled by the WiFi module are determined by the 266* WiFi_config variable. 267* 268* A SimpleLink CC3100 device or module is required and must be connected to 269* use the WiFi driver. 270*/ 271extern void EK_TM4C123GXL_initWiFi (void ); 272 273#ifdef __cplusplus 274} 275#endif 276 277#endif /* __EK_TM4C123GXL_H */