1 /**
2 * \file GPIO_board.c
3 *
4 * \brief K2E EVM board specific GPIO parameters.
5 *
6 */
8 /*
9 * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 *
15 * Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 *
18 * Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the
21 * distribution.
22 *
23 * Neither the name of Texas Instruments Incorporated nor the names of
24 * its contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 *
39 */
41 #include <ti/csl/soc.h>
42 #include <ti/csl/csl_types.h>
43 #include <ti/drv/gpio/GPIO.h>
44 #include <ti/drv/gpio/soc/GPIO_soc.h>
45 #include <ti/drv/gpio/test/led_blink/src/GPIO_board.h>
48 /* GPIO Driver board specific pin configuration structure */
49 GPIO_PinConfig gpioPinConfigs[] =
50 {
51 /* Input pin with interrupt enabled */
52 GPIO_DEVICE_CONFIG(GPIO_LED0_PORT_NUM, GPIO_LED0_PIN_NUM) |
53 GPIO_CFG_IN_INT_RISING | GPIO_CFG_OUTPUT,
55 /* Output pin */
56 GPIO_DEVICE_CONFIG(GPIO_LED1_PORT_NUM, GPIO_LED1_PIN_NUM) |
57 GPIO_CFG_OUTPUT
58 };
60 /* GPIO Driver call back functions */
61 GPIO_CallbackFxn gpioCallbackFunctions[] =
62 {
63 NULL,
64 NULL
65 };
67 /* GPIO Driver configuration structure */
68 GPIO_v0_Config GPIO_v0_config =
69 {
70 gpioPinConfigs,
71 gpioCallbackFunctions,
72 sizeof(gpioPinConfigs) / sizeof(GPIO_PinConfig),
73 sizeof(gpioCallbackFunctions) / sizeof(GPIO_CallbackFxn),
74 0,
75 };