arch/arm/src/tiva: A few more changes to get past pin definition compile problems.
This commit is contained in:
parent
df2241f816
commit
d68bff3256
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
/* Encoding:
|
/* Encoding:
|
||||||
*
|
*
|
||||||
* PPPP PPIO WCCR SSHS PPAA GIII EEVD DDDD
|
* PPPP PPIO WCCR SSHS PPAA GIII EEVD DDDD
|
||||||
*
|
*
|
||||||
* PPPPPP - 6 bits. Port ID (see definitions in hardware/c13x0/c13x0_ioc.h
|
* PPPPPP - 6 bits. Port ID (see definitions in hardware/c13x0/c13x0_ioc.h
|
||||||
* and hardware.cc13x2_cc26x2/cc13x2_cc26x2_ioc)
|
* and hardware.cc13x2_cc26x2/cc13x2_cc26x2_ioc)
|
||||||
@ -74,14 +74,14 @@
|
|||||||
* 2 - 1 bit Edge asserts AON_PROG2 (CC13x2/CC26x only) NOTE 1
|
* 2 - 1 bit Edge asserts AON_PROG2 (CC13x2/CC26x only) NOTE 1
|
||||||
* V - 1 bit GPIO output initial value
|
* V - 1 bit GPIO output initial value
|
||||||
* DDDDD - 5 bits DIO 0-31
|
* DDDDD - 5 bits DIO 0-31
|
||||||
*t
|
*
|
||||||
* NOTE 1: Not currently implemented because no bits are available in
|
* NOTE 1: Not currently implemented because no bits are available in
|
||||||
* the uint32_t. We need more bits!
|
* the uint32_t. We need more bits!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Port ID
|
/* Port ID
|
||||||
*
|
*
|
||||||
* PPPP PP.. .... .... .... .... .... ....
|
* PPPP PP.. .... .... .... .... .... ....
|
||||||
*
|
*
|
||||||
* See PORTID definitions in the IOC register definitions file.
|
* See PORTID definitions in the IOC register definitions file.
|
||||||
*/
|
*/
|
||||||
@ -92,21 +92,23 @@
|
|||||||
|
|
||||||
/* Input Enable:
|
/* Input Enable:
|
||||||
*
|
*
|
||||||
* .... ..I. .... .... .... .... .... ....
|
* .... ..I. .... .... .... .... .... ....
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_IE (1 << 25) /* Bit 25: Input Enable */
|
#define GPIO_IE (1 << 25) /* Bit 25: Input Enable */
|
||||||
[
|
|
||||||
/* GPIO output:
|
/* GPIO output:
|
||||||
*
|
*
|
||||||
* .... ...O .... .... .... .... .... ....
|
* .... ...O .... .... .... .... .... ....
|
||||||
|
*
|
||||||
|
* Valid only if Port ID=IOC_IOCFG_PORTID_GPIO
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_OUTPUT (1 << 24) /* Bit 24: Input Enable */
|
#define GPIO_OUTPUT (1 << 24) /* Bit 24: Input Enable */
|
||||||
|
|
||||||
/* Wakeup enable (CC13x2/CC26x only):
|
/* Wakeup enable (CC13x2/CC26x only):
|
||||||
*
|
*
|
||||||
* .... .... W... .... .... .... .... ....
|
* .... .... W... .... .... .... .... ....
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_WUEN (1 << 23) /* Bit 23: Input edge asserts MCU_WU event */
|
#define GPIO_WUEN (1 << 23) /* Bit 23: Input edge asserts MCU_WU event */
|
||||||
@ -169,7 +171,7 @@
|
|||||||
|
|
||||||
/* Current mode:
|
/* Current mode:
|
||||||
*
|
*
|
||||||
* .... .... .... .... ..AA .... .... ....
|
* .... .... .... .... ..AA .... .... ....
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_IOCURR_SHIFT (12) /* Bits 12-13: I/O current mode */
|
#define GPIO_IOCURR_SHIFT (12) /* Bits 12-13: I/O current mode */
|
||||||
@ -180,14 +182,14 @@
|
|||||||
|
|
||||||
/* Enable edge interrupt generation:
|
/* Enable edge interrupt generation:
|
||||||
*
|
*
|
||||||
* .... .... .... .... .... G... .... ....
|
* .... .... .... .... .... G... .... ....
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_EDGE_IRQEN (1 << 11) /* Bit 11: Enable edge interrupt generation */
|
#define GPIO_EDGE_IRQEN (1 << 11) /* Bit 11: Enable edge interrupt generation */
|
||||||
|
|
||||||
/* I/O mode:
|
/* I/O mode:
|
||||||
*
|
*
|
||||||
* .... .... .... .... .... .III .... ....
|
* .... .... .... .... .... .III .... ....
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_IOMODE_SHIFT (8) /* Bits 8-10: I/O Mode */
|
#define GPIO_IOMODE_SHIFT (8) /* Bits 8-10: I/O Mode */
|
||||||
@ -201,7 +203,7 @@
|
|||||||
|
|
||||||
/* Edge detect mode
|
/* Edge detect mode
|
||||||
*
|
*
|
||||||
* .... .... .... .... .... .... EE.. ....
|
* .... .... .... .... .... .... EE.. ....
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_EDGE_SHIFT (6) /* Bits 6-7: Enable edge events generation */
|
#define GPIO_EDGE_SHIFT (6) /* Bits 6-7: Enable edge events generation */
|
||||||
@ -214,7 +216,7 @@
|
|||||||
#if 0 /* Need more bits! */
|
#if 0 /* Need more bits! */
|
||||||
/* Edge asserts AON_PROG0/1/2 (CC13x2/CC26x only):
|
/* Edge asserts AON_PROG0/1/2 (CC13x2/CC26x only):
|
||||||
*
|
*
|
||||||
* .... .... .... .... .... .... .... ....
|
* .... .... .... .... .... .... .... ....
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_AON_PROG0 (1 << xx) /* Bit xx: Input edge asserts AON_PROG0 */
|
#define GPIO_AON_PROG0 (1 << xx) /* Bit xx: Input edge asserts AON_PROG0 */
|
||||||
@ -225,7 +227,9 @@
|
|||||||
|
|
||||||
/* GPIO output initial value:
|
/* GPIO output initial value:
|
||||||
*
|
*
|
||||||
* .... .... .... .... .... .... ..V. ....
|
* .... .... .... .... .... .... ..V. ....
|
||||||
|
*
|
||||||
|
* Valid only if Port ID=IOC_IOCFG_PORTID_GPIO and GPIO_OUTPUT selected.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_VALUE_SHIFT 8 /* Bit 5: If output, inital value of output */
|
#define GPIO_VALUE_SHIFT 8 /* Bit 5: If output, inital value of output */
|
||||||
@ -235,7 +239,7 @@
|
|||||||
|
|
||||||
/* DIO:
|
/* DIO:
|
||||||
*
|
*
|
||||||
* .... .... .... .... .... .... ...D DDDD
|
* .... .... .... .... .... .... ...D DDDD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define GPIO_DIO_SHIFT (0) /* Bits 0-4: DIO */
|
#define GPIO_DIO_SHIFT (0) /* Bits 0-4: DIO */
|
||||||
|
67
arch/arm/src/tiva/hardware/cc13x0/cc13x0_timer.h
Normal file
67
arch/arm/src/tiva/hardware/cc13x0/cc13x0_timer.h
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/************************************************************************************
|
||||||
|
* arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_timer.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||||
|
* Authors: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
* the documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
* used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_TIMER_H
|
||||||
|
#define __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_TIMER_H
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Included Files
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
/* TIMER Register Offsets ***********************************************************/
|
||||||
|
|
||||||
|
/* TIMER Register Addresses *********************************************************/
|
||||||
|
|
||||||
|
/* TIMER Register Bitfield Definitions **********************************************/
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Public Types
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Public Data
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Public Function Prototypes
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
#endif /* __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_TIMER_H */
|
@ -0,0 +1,67 @@
|
|||||||
|
/************************************************************************************
|
||||||
|
* arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_timer.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
|
||||||
|
* Authors: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in
|
||||||
|
* the documentation and/or other materials provided with the
|
||||||
|
* distribution.
|
||||||
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
* used to endorse or promote products derived from this software
|
||||||
|
* without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_TIMER_H
|
||||||
|
#define __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_TIMER_H
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Included Files
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
/* TIMER Register Offsets ***********************************************************/
|
||||||
|
|
||||||
|
/* TIMER Register Addresses *********************************************************/
|
||||||
|
|
||||||
|
/* TIMER Register Bitfield Definitions **********************************************/
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Public Types
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Public Data
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
/************************************************************************************
|
||||||
|
* Public Function Prototypes
|
||||||
|
************************************************************************************/
|
||||||
|
|
||||||
|
#endif /* __ARCH_ARM_SRC_TIVA_HARDWARE_CC13X2_CC26X2_CC13X2_CC26X2_TIMER_H */
|
@ -66,10 +66,8 @@
|
|||||||
# include "lm/lm4f_gpio.h"
|
# include "lm/lm4f_gpio.h"
|
||||||
#elif defined(CONFIG_ARCH_CHIP_TM4C)
|
#elif defined(CONFIG_ARCH_CHIP_TM4C)
|
||||||
# include "tm4c/tm4c_gpio.h"
|
# include "tm4c/tm4c_gpio.h"
|
||||||
#elif defined(CONFIG_ARCH_CHIP_CC13X0)
|
#elif defined(CONFIG_ARCH_CHIP_CC13X0) || defined(CONFIG_ARCH_CHIP_CC13X2)
|
||||||
# include "cc13x0/cc13x0_gpio.h"
|
# include "cc13xx/cc13xx_gpio.h"
|
||||||
#elif defined(CONFIG_ARCH_CHIP_CC13X2)
|
|
||||||
# include "cc13x2_cc26x2/cc13x2_cc26x2_gpio.h"
|
|
||||||
#else
|
#else
|
||||||
# error "Unsupported Tiva/Stellaris system GPIO"
|
# error "Unsupported Tiva/Stellaris system GPIO"
|
||||||
#endif
|
#endif
|
||||||
|
@ -102,6 +102,16 @@
|
|||||||
|
|
||||||
/* Pin Disambiguation *******************************************************/
|
/* Pin Disambiguation *******************************************************/
|
||||||
|
|
||||||
|
/* UART0:
|
||||||
|
*
|
||||||
|
* The on-board XDS110 Debugger provide a USB virtual serial console using
|
||||||
|
* UART0 (PA0/U0RX and PA1/U0TX).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define GPIO_UART0_RX (GPIO_PORTID(IOC_IOCFG_PORTID_UART0_RX) | IOC_IOCFG_IE | \
|
||||||
|
GPIO_DIO(0))
|
||||||
|
#define GPIO_UART0_TX (GPIO_PORTID(IOC_IOCFG_PORTID_UART0_TX) | GPIO_DIO(1))
|
||||||
|
|
||||||
/* DMA **********************************************************************/
|
/* DMA **********************************************************************/
|
||||||
|
|
||||||
#endif /* __CONFIG_NUCLEO_F303ZE_INCLUDE_BOARD_H */
|
#endif /* __CONFIG_NUCLEO_F303ZE_INCLUDE_BOARD_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user