mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 06:42:32 +08:00
Rename LM3S files, variables, and types from lm3s_ to lm_; Rename configuration variables from CONFIG_LM3S_ to CONFIG_LM_
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5497 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -2901,7 +2901,7 @@ extern void up_ledoff(int led);
|
|||||||
<li>
|
<li>
|
||||||
<p>
|
<p>
|
||||||
<b>Examples</b>:
|
<b>Examples</b>:
|
||||||
<code>arch/arm/src/chip/lm3s_serial.c</code>, <code>arch/arm/src/lpc214x/lpc214x_serial.c</code>, <code>arch/z16/src/z16f/z16f_serial.c</code>, etc.
|
<code>arch/arm/src/chip/lm_serial.c</code>, <code>arch/arm/src/lpc214x/lpc214x_serial.c</code>, <code>arch/z16/src/z16f/z16f_serial.c</code>, etc.
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -308,7 +308,7 @@
|
|||||||
* be disabled in order to reduce the size of the implemenation.
|
* be disabled in order to reduce the size of the implemenation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOA_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOA_IRQS
|
||||||
# define LM3S_IRQ_GPIOA_0 (NR_IRQS + 0)
|
# define LM3S_IRQ_GPIOA_0 (NR_IRQS + 0)
|
||||||
# define LM3S_IRQ_GPIOA_1 (NR_IRQS + 1)
|
# define LM3S_IRQ_GPIOA_1 (NR_IRQS + 1)
|
||||||
# define LM3S_IRQ_GPIOA_2 (NR_IRQS + 2)
|
# define LM3S_IRQ_GPIOA_2 (NR_IRQS + 2)
|
||||||
@@ -322,7 +322,7 @@
|
|||||||
# define _NGPIOAIRQS NR_IRQS
|
# define _NGPIOAIRQS NR_IRQS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOB_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOB_IRQS
|
||||||
# define LM3S_IRQ_GPIOB_0 (_NGPIOAIRQS + 0)
|
# define LM3S_IRQ_GPIOB_0 (_NGPIOAIRQS + 0)
|
||||||
# define LM3S_IRQ_GPIOB_1 (_NGPIOAIRQS + 1)
|
# define LM3S_IRQ_GPIOB_1 (_NGPIOAIRQS + 1)
|
||||||
# define LM3S_IRQ_GPIOB_2 (_NGPIOAIRQS + 2)
|
# define LM3S_IRQ_GPIOB_2 (_NGPIOAIRQS + 2)
|
||||||
@@ -336,7 +336,7 @@
|
|||||||
# define _NGPIOBIRQS _NGPIOAIRQS
|
# define _NGPIOBIRQS _NGPIOAIRQS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOC_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOC_IRQS
|
||||||
# define LM3S_IRQ_GPIOC_0 (_NGPIOBIRQS + 0)
|
# define LM3S_IRQ_GPIOC_0 (_NGPIOBIRQS + 0)
|
||||||
# define LM3S_IRQ_GPIOC_1 (_NGPIOBIRQS + 1)
|
# define LM3S_IRQ_GPIOC_1 (_NGPIOBIRQS + 1)
|
||||||
# define LM3S_IRQ_GPIOC_2 (_NGPIOBIRQS + 2)
|
# define LM3S_IRQ_GPIOC_2 (_NGPIOBIRQS + 2)
|
||||||
@@ -350,7 +350,7 @@
|
|||||||
# define _NGPIOCIRQS _NGPIOBIRQS
|
# define _NGPIOCIRQS _NGPIOBIRQS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOD_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOD_IRQS
|
||||||
# define LM3S_IRQ_GPIOD_0 (_NGPIOCIRQS + 0)
|
# define LM3S_IRQ_GPIOD_0 (_NGPIOCIRQS + 0)
|
||||||
# define LM3S_IRQ_GPIOD_1 (_NGPIOCIRQS + 1)
|
# define LM3S_IRQ_GPIOD_1 (_NGPIOCIRQS + 1)
|
||||||
# define LM3S_IRQ_GPIOD_2 (_NGPIOCIRQS + 2)
|
# define LM3S_IRQ_GPIOD_2 (_NGPIOCIRQS + 2)
|
||||||
@@ -364,7 +364,7 @@
|
|||||||
# define _NGPIODIRQS _NGPIOCIRQS
|
# define _NGPIODIRQS _NGPIOCIRQS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOE_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOE_IRQS
|
||||||
# define LM3S_IRQ_GPIOE_0 (_NGPIODIRQS + 0)
|
# define LM3S_IRQ_GPIOE_0 (_NGPIODIRQS + 0)
|
||||||
# define LM3S_IRQ_GPIOE_1 (_NGPIODIRQS + 1)
|
# define LM3S_IRQ_GPIOE_1 (_NGPIODIRQS + 1)
|
||||||
# define LM3S_IRQ_GPIOE_2 (_NGPIODIRQS + 2)
|
# define LM3S_IRQ_GPIOE_2 (_NGPIODIRQS + 2)
|
||||||
@@ -378,7 +378,7 @@
|
|||||||
# define _NGPIOEIRQS _NGPIODIRQS
|
# define _NGPIOEIRQS _NGPIODIRQS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOF_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOF_IRQS
|
||||||
# define LM3S_IRQ_GPIOF_0 (_NGPIOEIRQS + 0)
|
# define LM3S_IRQ_GPIOF_0 (_NGPIOEIRQS + 0)
|
||||||
# define LM3S_IRQ_GPIOF_1 (_NGPIOEIRQS + 1)
|
# define LM3S_IRQ_GPIOF_1 (_NGPIOEIRQS + 1)
|
||||||
# define LM3S_IRQ_GPIOF_2 (_NGPIOEIRQS + 2)
|
# define LM3S_IRQ_GPIOF_2 (_NGPIOEIRQS + 2)
|
||||||
@@ -392,7 +392,7 @@
|
|||||||
# define _NGPIOFIRQS _NGPIOEIRQS
|
# define _NGPIOFIRQS _NGPIOEIRQS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOG_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOG_IRQS
|
||||||
# define LM3S_IRQ_GPIOG_0 (_NGPIOFIRQS + 0)
|
# define LM3S_IRQ_GPIOG_0 (_NGPIOFIRQS + 0)
|
||||||
# define LM3S_IRQ_GPIOG_1 (_NGPIOFIRQS + 1)
|
# define LM3S_IRQ_GPIOG_1 (_NGPIOFIRQS + 1)
|
||||||
# define LM3S_IRQ_GPIOG_2 (_NGPIOFIRQS + 2)
|
# define LM3S_IRQ_GPIOG_2 (_NGPIOFIRQS + 2)
|
||||||
@@ -406,7 +406,7 @@
|
|||||||
# define _NGPIOGIRQS _NGPIOFIRQS
|
# define _NGPIOGIRQS _NGPIOFIRQS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOH_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOH_IRQS
|
||||||
# define LM3S_IRQ_GPIOH_0 (_NGPIOGIRQS + 0)
|
# define LM3S_IRQ_GPIOH_0 (_NGPIOGIRQS + 0)
|
||||||
# define LM3S_IRQ_GPIOH_1 (_NGPIOGIRQS + 1)
|
# define LM3S_IRQ_GPIOH_1 (_NGPIOGIRQS + 1)
|
||||||
# define LM3S_IRQ_GPIOH_2 (_NGPIOGIRQS + 2)
|
# define LM3S_IRQ_GPIOH_2 (_NGPIOGIRQS + 2)
|
||||||
@@ -420,7 +420,7 @@
|
|||||||
# define _NGPIOHIRQS _NGPIOGIRQS
|
# define _NGPIOHIRQS _NGPIOGIRQS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOJ_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOJ_IRQS
|
||||||
# define LM3S_IRQ_GPIOJ_0 (_NGPIOHIRQS + 0)
|
# define LM3S_IRQ_GPIOJ_0 (_NGPIOHIRQS + 0)
|
||||||
# define LM3S_IRQ_GPIOJ_1 (_NGPIOHIRQS + 1)
|
# define LM3S_IRQ_GPIOJ_1 (_NGPIOHIRQS + 1)
|
||||||
# define LM3S_IRQ_GPIOJ_2 (_NGPIOHIRQS + 2)
|
# define LM3S_IRQ_GPIOJ_2 (_NGPIOHIRQS + 2)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ ifeq ($(filter y, \
|
|||||||
endif
|
endif
|
||||||
ifeq ($(filter y, \
|
ifeq ($(filter y, \
|
||||||
$(CONFIG_KINETIS_BUILDROOT) \
|
$(CONFIG_KINETIS_BUILDROOT) \
|
||||||
$(CONFIG_LM3S_BUILDROOT) \
|
$(CONFIG_LM_BUILDROOT) \
|
||||||
$(CONFIG_LPC17_BUILDROOT) \
|
$(CONFIG_LPC17_BUILDROOT) \
|
||||||
$(CONFIG_LPC43_BUILDROOT) \
|
$(CONFIG_LPC43_BUILDROOT) \
|
||||||
$(CONFIG_SAM3U_BUILDROOT) \
|
$(CONFIG_SAM3U_BUILDROOT) \
|
||||||
@@ -77,7 +77,7 @@ ifeq ($(filter y, \
|
|||||||
endif
|
endif
|
||||||
ifeq ($(filter y, \
|
ifeq ($(filter y, \
|
||||||
$(CONFIG_KINETIS_CODESOURCERYL) \
|
$(CONFIG_KINETIS_CODESOURCERYL) \
|
||||||
$(CONFIG_LM3S_CODESOURCERYL) \
|
$(CONFIG_LM_CODESOURCERYL) \
|
||||||
$(CONFIG_LPC17_CODESOURCERYL) \
|
$(CONFIG_LPC17_CODESOURCERYL) \
|
||||||
$(CONFIG_LPC43_CODESOURCERYL) \
|
$(CONFIG_LPC43_CODESOURCERYL) \
|
||||||
$(CONFIG_SAM3U_CODESOURCERYL) \
|
$(CONFIG_SAM3U_CODESOURCERYL) \
|
||||||
@@ -88,7 +88,7 @@ ifeq ($(filter y, \
|
|||||||
endif
|
endif
|
||||||
ifeq ($(filter y, \
|
ifeq ($(filter y, \
|
||||||
$(CONFIG_KINETIS_CODESOURCERYW) \
|
$(CONFIG_KINETIS_CODESOURCERYW) \
|
||||||
$(CONFIG_LM3S_CODESOURCERYW) \
|
$(CONFIG_LM_CODESOURCERYW) \
|
||||||
$(CONFIG_LPC17_CODESOURCERYW) \
|
$(CONFIG_LPC17_CODESOURCERYW) \
|
||||||
$(CONFIG_LPC43_CODESOURCERYW) \
|
$(CONFIG_LPC43_CODESOURCERYW) \
|
||||||
$(CONFIG_SAM3U_CODESOURCERYW) \
|
$(CONFIG_SAM3U_CODESOURCERYW) \
|
||||||
@@ -99,7 +99,7 @@ ifeq ($(filter y, \
|
|||||||
endif
|
endif
|
||||||
ifeq ($(filter y, \
|
ifeq ($(filter y, \
|
||||||
$(CONFIG_KINETIS_DEVKITARM) \
|
$(CONFIG_KINETIS_DEVKITARM) \
|
||||||
$(CONFIG_LM3S_DEVKITARM) \
|
$(CONFIG_LM_DEVKITARM) \
|
||||||
$(CONFIG_LPC17_DEVKITARM) \
|
$(CONFIG_LPC17_DEVKITARM) \
|
||||||
$(CONFIG_LPC43_DEVKITARM) \
|
$(CONFIG_LPC43_DEVKITARM) \
|
||||||
$(CONFIG_SAM3U_DEVKITARM) \
|
$(CONFIG_SAM3U_DEVKITARM) \
|
||||||
|
|||||||
+28
-28
@@ -14,7 +14,7 @@ config ARCH_CHIP_LM3S6918
|
|||||||
bool "LM3S6918"
|
bool "LM3S6918"
|
||||||
select ARCH_CORTEXM3
|
select ARCH_CORTEXM3
|
||||||
select ARCH_CHIP_LM3S
|
select ARCH_CHIP_LM3S
|
||||||
select LM3S_HAVE_SSI1
|
select LM_HAVE_SSI1
|
||||||
|
|
||||||
config ARCH_CHIP_LM3S9B96
|
config ARCH_CHIP_LM3S9B96
|
||||||
bool "LM3S9B96"
|
bool "LM3S9B96"
|
||||||
@@ -46,28 +46,28 @@ config ARCH_CHIP_LM3S
|
|||||||
config ARCH_CHIP_LM4F
|
config ARCH_CHIP_LM4F
|
||||||
bool
|
bool
|
||||||
|
|
||||||
config LM3S_HAVE_SSI1
|
config LM_HAVE_SSI1
|
||||||
bool
|
bool
|
||||||
|
|
||||||
config LM3S_REVA2
|
config LM_REVA2
|
||||||
bool "Rev A2"
|
bool "Rev A2"
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
Some early silicon returned an increase LDO voltage or 2.75V to work
|
Some early silicon returned an increase LDO voltage or 2.75V to work
|
||||||
around a PLL bug
|
around a PLL bug
|
||||||
|
|
||||||
config LM3S_DFU
|
config LM_DFU
|
||||||
bool "DFU"
|
bool "DFU"
|
||||||
default y
|
default y
|
||||||
|
|
||||||
menu "Stellaris Peripheral Support"
|
menu "Stellaris Peripheral Support"
|
||||||
|
|
||||||
config LM3S_UART0
|
config LM_UART0
|
||||||
bool "UART0"
|
bool "UART0"
|
||||||
select ARCH_HAVE_UART0
|
select ARCH_HAVE_UART0
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config LM3S_UART1
|
config LM_UART1
|
||||||
bool "UART1"
|
bool "UART1"
|
||||||
select ARCH_HAVE_UART1
|
select ARCH_HAVE_UART1
|
||||||
default n
|
default n
|
||||||
@@ -80,12 +80,12 @@ config SSI1_DISABLE
|
|||||||
bool "Disable SSI1"
|
bool "Disable SSI1"
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config LM3S_UART2
|
config LM_UART2
|
||||||
bool "UART2"
|
bool "UART2"
|
||||||
select ARCH_HAVE_UART2
|
select ARCH_HAVE_UART2
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config LM3S_ETHERNET
|
config LM_ETHERNET
|
||||||
bool "Stellaris Ethernet"
|
bool "Stellaris Ethernet"
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
@@ -95,95 +95,95 @@ endmenu
|
|||||||
|
|
||||||
menu "Disable GPIO Interrupts"
|
menu "Disable GPIO Interrupts"
|
||||||
|
|
||||||
config LM3S_DISABLE_GPIOA_IRQS
|
config LM_DISABLE_GPIOA_IRQS
|
||||||
bool "Disable GPIOA IRQs"
|
bool "Disable GPIOA IRQs"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config LM3S_DISABLE_GPIOB_IRQS
|
config LM_DISABLE_GPIOB_IRQS
|
||||||
bool "Disable GPIOB IRQs"
|
bool "Disable GPIOB IRQs"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config LM3S_DISABLE_GPIOC_IRQS
|
config LM_DISABLE_GPIOC_IRQS
|
||||||
bool "Disable GPIOC IRQs"
|
bool "Disable GPIOC IRQs"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config LM3S_DISABLE_GPIOD_IRQS
|
config LM_DISABLE_GPIOD_IRQS
|
||||||
bool "Disable GPIOD IRQs"
|
bool "Disable GPIOD IRQs"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config LM3S_DISABLE_GPIOE_IRQS
|
config LM_DISABLE_GPIOE_IRQS
|
||||||
bool "Disable GPIOE IRQs"
|
bool "Disable GPIOE IRQs"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config LM3S_DISABLE_GPIOF_IRQS
|
config LM_DISABLE_GPIOF_IRQS
|
||||||
bool "Disable GPIOF IRQs"
|
bool "Disable GPIOF IRQs"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config LM3S_DISABLE_GPIOG_IRQS
|
config LM_DISABLE_GPIOG_IRQS
|
||||||
bool "Disable GPIOG IRQs"
|
bool "Disable GPIOG IRQs"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config LM3S_DISABLE_GPIOH_IRQS
|
config LM_DISABLE_GPIOH_IRQS
|
||||||
bool "Disable GPIOH IRQs"
|
bool "Disable GPIOH IRQs"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config LM3S_DISABLE_GPIOJ_IRQS
|
config LM_DISABLE_GPIOJ_IRQS
|
||||||
bool "Disable GPIOJ IRQs"
|
bool "Disable GPIOJ IRQs"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
if LM3S_ETHERNET
|
if LM_ETHERNET
|
||||||
menu "Stellaris Ethernet Configuration"
|
menu "Stellaris Ethernet Configuration"
|
||||||
|
|
||||||
config LM3S_ETHLEDS
|
config LM_ETHLEDS
|
||||||
bool "Ethernet LEDs"
|
bool "Ethernet LEDs"
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
Enable to use Ethernet LEDs on the board.
|
Enable to use Ethernet LEDs on the board.
|
||||||
|
|
||||||
config LM3S_BOARDMAC
|
config LM_BOARDMAC
|
||||||
bool "Board MAC"
|
bool "Board MAC"
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
If the board-specific logic can provide a MAC address (via
|
If the board-specific logic can provide a MAC address (via
|
||||||
lm3s_ethernetmac()), then this should be selected.
|
lm_ethernetmac()), then this should be selected.
|
||||||
|
|
||||||
config LM3S_ETHHDUPLEX
|
config LM_ETHHDUPLEX
|
||||||
bool "Force Half Duplex"
|
bool "Force Half Duplex"
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
Set to force half duplex operation
|
Set to force half duplex operation
|
||||||
|
|
||||||
config LM3S_ETHNOAUTOCRC
|
config LM_ETHNOAUTOCRC
|
||||||
bool "Disable auto-CRC"
|
bool "Disable auto-CRC"
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
Set to suppress auto-CRC generation
|
Set to suppress auto-CRC generation
|
||||||
|
|
||||||
config LM3S_ETHNOPAD
|
config LM_ETHNOPAD
|
||||||
bool "Disable Tx Padding"
|
bool "Disable Tx Padding"
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
Set to suppress Tx padding
|
Set to suppress Tx padding
|
||||||
|
|
||||||
config LM3S_MULTICAST
|
config LM_MULTICAST
|
||||||
bool "Enable Multicast"
|
bool "Enable Multicast"
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
Set to enable multicast frames
|
Set to enable multicast frames
|
||||||
|
|
||||||
config LM3S_PROMISCUOUS
|
config LM_PROMISCUOUS
|
||||||
bool "Enable Promiscuous Mode"
|
bool "Enable Promiscuous Mode"
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
Set to enable promiscuous mode
|
Set to enable promiscuous mode
|
||||||
|
|
||||||
config LM3S_TIMESTAMP
|
config LM_TIMESTAMP
|
||||||
bool "Enable Timestamping"
|
bool "Enable Timestamping"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config LM3S_BADCRC
|
config LM_BADCRC
|
||||||
bool "Enable Bad CRC Rejection"
|
bool "Enable Bad CRC Rejection"
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
HEAD_ASRC = lm3s_vectors.S
|
HEAD_ASRC = lm_vectors.S
|
||||||
|
|
||||||
CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_switchcontext.S \
|
CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_switchcontext.S \
|
||||||
vfork.S
|
vfork.S
|
||||||
@@ -55,10 +55,9 @@ CMN_CSRCS += up_elf.c
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
CHIP_ASRCS =
|
CHIP_ASRCS =
|
||||||
CHIP_CSRCS = lm3s_start.c lm3s_syscontrol.c lm3s_irq.c \
|
CHIP_CSRCS = lm_start.c lm_syscontrol.c lm_irq.c lm_gpio.c lm_gpioirq.c \
|
||||||
lm3s_gpio.c lm3s_gpioirq.c lm3s_timerisr.c lm3s_lowputc.c \
|
lm_timerisr.c lm_lowputc.c lm_serial.c lm_ssi.c lm_dumpgpio.c
|
||||||
lm3s_serial.c lm3s_ssi.c lm3s_dumpgpio.c
|
|
||||||
|
|
||||||
ifdef CONFIG_NET
|
ifdef CONFIG_NET
|
||||||
CHIP_CSRCS += lm3s_ethernet.c
|
CHIP_CSRCS += lm_ethernet.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -49,14 +49,14 @@
|
|||||||
|
|
||||||
/* Then get all of the register definitions */
|
/* Then get all of the register definitions */
|
||||||
|
|
||||||
#include "chip/lm_memorymap.h" /* Memory map */
|
#include "chip/lm_memorymap.h" /* Memory map */
|
||||||
#include "chip/lm3s_syscontrol.h" /* System control module */
|
#include "chip/lm_syscontrol.h" /* System control module */
|
||||||
#include "chip/lm3s_gpio.h" /* GPIO modules */
|
#include "chip/lm_gpio.h" /* GPIO modules */
|
||||||
#include "chip/lm3s_uart.h" /* UART modules */
|
#include "chip/lm_uart.h" /* UART modules */
|
||||||
#include "chip/lm3s_i2c.h" /* I2C modules */
|
#include "chip/lm_i2c.h" /* I2C modules */
|
||||||
#include "chip/lm3s_ssi.h" /* SSI modules */
|
#include "chip/lm_ssi.h" /* SSI modules */
|
||||||
#include "chip/lm3s_ethernet.h" /* Ethernet MAC and PHY */
|
#include "chip/lm_ethernet.h" /* Ethernet MAC and PHY */
|
||||||
#include "chip/lm3s_flash.h" /* FLASH */
|
#include "chip/lm_flash.h" /* FLASH */
|
||||||
|
|
||||||
/* The LM3S69xx only supports 8 priority levels. The hardware priority mechanism
|
/* The LM3S69xx only supports 8 priority levels. The hardware priority mechanism
|
||||||
* will only look at the upper N bits of the 8-bit priority level (where N is 3 for
|
* will only look at the upper N bits of the 8-bit priority level (where N is 3 for
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/* The following lists the input value to lm3s_configgpio to setup the alternate,
|
/* The following lists the input value to lm_configgpio to setup the alternate,
|
||||||
* hardware function for each pin.
|
* hardware function for each pin.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lm/chip/lm3s_epi.h
|
* arch/arm/src/lm/chip/lm_epi.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2013 Max Neklyudov. All rights reserved.
|
* Copyright (C) 2009-2013 Max Neklyudov. All rights reserved.
|
||||||
* Author: Max Neklyudov <macscomp@gmail.com>
|
* Author: Max Neklyudov <macscomp@gmail.com>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lm/chip/lm3s_ethernet.h
|
* arch/arm/src/lm/chip/lm_ethernet.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010, 2012-2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2012-2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lm/chip/lm3s_flash.h
|
* arch/arm/src/lm/chip/lm_flash.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lm/chip/lm3s_gpio.h
|
* arch/arm/src/lm/chip/lm_gpio.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lm/chip/lm3s_i2c.h
|
* arch/arm/src/lm/chip/lm_i2c.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lm/chip/lm3s_ssi.h
|
* arch/arm/src/lm/chip/lm_ssi.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lm/chip/lm3s_syscontrol.h
|
* arch/arm/src/lm/chip/lm_syscontrol.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lm/chip/lm3s_timer.h
|
* arch/arm/src/lm/chip/lm_timer.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Max Nekludov. All rights reserved.
|
* Copyright (C) 2012 Max Nekludov. All rights reserved.
|
||||||
* Author: Max Nekludov <macscomp@gmail.com>
|
* Author: Max Nekludov <macscomp@gmail.com>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lm/chip/lm3s_uart.h
|
* arch/arm/src/lm/chip/lm_uart.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lm/lm3s_dumpgpio.c
|
* arch/arm/src/lm/lm_dumpgpio.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* NOTE: this is duplicated in lm3s_gpio.c */
|
/* NOTE: this is duplicated in lm_gpio.c */
|
||||||
|
|
||||||
#ifdef LM3S_GPIOH_BASE
|
#ifdef LM3S_GPIOH_BASE
|
||||||
static const uint32_t g_gpiobase[8] =
|
static const uint32_t g_gpiobase[8] =
|
||||||
@@ -83,7 +83,7 @@ static const char g_portchar[8] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', '?' };
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_gpiobaseaddress
|
* Name: lm_gpiobaseaddress
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Given a GPIO enumeration value, return the base address of the
|
* Given a GPIO enumeration value, return the base address of the
|
||||||
@@ -91,13 +91,13 @@ static const char g_portchar[8] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', '?' };
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline uint32_t lm3s_gpiobaseaddress(int port)
|
static inline uint32_t lm_gpiobaseaddress(int port)
|
||||||
{
|
{
|
||||||
return g_gpiobase[port & 7];
|
return g_gpiobase[port & 7];
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_gpioport
|
* Name: lm_gpioport
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Given a GPIO enumeration value, return the base address of the
|
* Given a GPIO enumeration value, return the base address of the
|
||||||
@@ -105,7 +105,7 @@ static inline uint32_t lm3s_gpiobaseaddress(int port)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline uint8_t lm3s_gpioport(int port)
|
static inline uint8_t lm_gpioport(int port)
|
||||||
{
|
{
|
||||||
return g_portchar[port & 7];
|
return g_portchar[port & 7];
|
||||||
}
|
}
|
||||||
@@ -115,14 +115,14 @@ static inline uint8_t lm3s_gpioport(int port)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Function: lm3s_dumpgpio
|
* Function: lm_dumpgpio
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Dump all GPIO registers associated with the provided base address
|
* Dump all GPIO registers associated with the provided base address
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int lm3s_dumpgpio(uint32_t pinset, const char *msg)
|
int lm_dumpgpio(uint32_t pinset, const char *msg)
|
||||||
{
|
{
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
unsigned int port = (pinset & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT;
|
unsigned int port = (pinset & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT;
|
||||||
@@ -132,7 +132,7 @@ int lm3s_dumpgpio(uint32_t pinset, const char *msg)
|
|||||||
|
|
||||||
/* Get the base address associated with the GPIO port */
|
/* Get the base address associated with the GPIO port */
|
||||||
|
|
||||||
base = lm3s_gpiobaseaddress(port);
|
base = lm_gpiobaseaddress(port);
|
||||||
DEBUGASSERT(base != 0);
|
DEBUGASSERT(base != 0);
|
||||||
|
|
||||||
/* The following requires exclusive access to the GPIO registers */
|
/* The following requires exclusive access to the GPIO registers */
|
||||||
@@ -142,7 +142,7 @@ int lm3s_dumpgpio(uint32_t pinset, const char *msg)
|
|||||||
enabled = ((rcgc2 & SYSCON_RCGC2_GPIO(port)) != 0);
|
enabled = ((rcgc2 & SYSCON_RCGC2_GPIO(port)) != 0);
|
||||||
|
|
||||||
lldbg("GPIO%c pinset: %08x base: %08x -- %s\n",
|
lldbg("GPIO%c pinset: %08x base: %08x -- %s\n",
|
||||||
lm3s_gpioport(port), pinset, base, msg);
|
lm_gpioport(port), pinset, base, msg);
|
||||||
lldbg(" RCGC2: %08x (%s)\n",
|
lldbg(" RCGC2: %08x (%s)\n",
|
||||||
rcgc2, enabled ? "enabled" : "disabled" );
|
rcgc2, enabled ? "enabled" : "disabled" );
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -74,7 +74,7 @@ extern "C"
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Function: lm3s_ethinitialize
|
* Function: lm_ethinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Initialize the Ethernet driver for one interface. If the LM3S chip
|
* Initialize the Ethernet driver for one interface. If the LM3S chip
|
||||||
@@ -92,7 +92,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int lm3s_ethinitialize(int intf);
|
int lm_ethinitialize(int intf);
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lm/lm3s_gpio.c
|
* arch/arm/src/lm/lm_gpio.c
|
||||||
* arch/arm/src/chip/lm3s_gpio.c
|
* arch/arm/src/chip/lm_gpio.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -169,7 +169,7 @@ static const uint32_t g_gpiobase[LM3S_NPORTS] =
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_gpiobaseaddress
|
* Name: lm_gpiobaseaddress
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Given a GPIO enumeration value, return the base address of the
|
* Given a GPIO enumeration value, return the base address of the
|
||||||
@@ -177,7 +177,7 @@ static const uint32_t g_gpiobase[LM3S_NPORTS] =
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static uint32_t lm3s_gpiobaseaddress(unsigned int port)
|
static uint32_t lm_gpiobaseaddress(unsigned int port)
|
||||||
{
|
{
|
||||||
uint32_t gpiobase = 0;
|
uint32_t gpiobase = 0;
|
||||||
if (port < LM3S_NPORTS)
|
if (port < LM3S_NPORTS)
|
||||||
@@ -188,14 +188,14 @@ static uint32_t lm3s_gpiobaseaddress(unsigned int port)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_gpiofunc
|
* Name: lm_gpiofunc
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Configure GPIO registers for a specific function
|
* Configure GPIO registers for a specific function
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void lm3s_gpiofunc(uint32_t base, uint32_t pinno, const struct gpio_func_s *func)
|
static void lm_gpiofunc(uint32_t base, uint32_t pinno, const struct gpio_func_s *func)
|
||||||
{
|
{
|
||||||
uint32_t setbit;
|
uint32_t setbit;
|
||||||
uint32_t clrbit;
|
uint32_t clrbit;
|
||||||
@@ -305,14 +305,14 @@ static void lm3s_gpiofunc(uint32_t base, uint32_t pinno, const struct gpio_func_
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_gpiopadstrength
|
* Name: lm_gpiopadstrength
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Set up pad strength and pull-ups
|
* Set up pad strength and pull-ups
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline void lm3s_gpiopadstrength(uint32_t base, uint32_t pin, uint32_t cfgset)
|
static inline void lm_gpiopadstrength(uint32_t base, uint32_t pin, uint32_t cfgset)
|
||||||
{
|
{
|
||||||
int strength = (cfgset & GPIO_STRENGTH_MASK) >> GPIO_STRENGTH_SHIFT;
|
int strength = (cfgset & GPIO_STRENGTH_MASK) >> GPIO_STRENGTH_SHIFT;
|
||||||
uint32_t regoffset;
|
uint32_t regoffset;
|
||||||
@@ -392,19 +392,19 @@ static inline void lm3s_gpiopadstrength(uint32_t base, uint32_t pin, uint32_t cf
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_gpiopadtype
|
* Name: lm_gpiopadtype
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Set up pad strength and pull-ups. Some of these values may be over-
|
* Set up pad strength and pull-ups. Some of these values may be over-
|
||||||
* written by lm3s_gpiofunc, depending on the function selection. Others
|
* written by lm_gpiofunc, depending on the function selection. Others
|
||||||
* are optional for different function selections.
|
* are optional for different function selections.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline void lm3s_gpiopadtype(uint32_t base, uint32_t pin, uint32_t cfgset)
|
static inline void lm_gpiopadtype(uint32_t base, uint32_t pin, uint32_t cfgset)
|
||||||
{
|
{
|
||||||
int padtype = (cfgset & GPIO_PADTYPE_MASK) >> GPIO_PADTYPE_SHIFT;
|
int padtype = (cfgset & GPIO_PADTYPE_MASK) >> GPIO_PADTYPE_SHIFT;
|
||||||
#if 0 /* always overwritten by lm3s_gpiofunc */
|
#if 0 /* always overwritten by lm_gpiofunc */
|
||||||
uint32_t odrset;
|
uint32_t odrset;
|
||||||
uint32_t odrclr;
|
uint32_t odrclr;
|
||||||
#endif
|
#endif
|
||||||
@@ -412,7 +412,7 @@ static inline void lm3s_gpiopadtype(uint32_t base, uint32_t pin, uint32_t cfgset
|
|||||||
uint32_t purclr;
|
uint32_t purclr;
|
||||||
uint32_t pdrset;
|
uint32_t pdrset;
|
||||||
uint32_t pdrclr;
|
uint32_t pdrclr;
|
||||||
#if 0 /* always overwritten by lm3s_gpiofunc */
|
#if 0 /* always overwritten by lm_gpiofunc */
|
||||||
uint32_t denset;
|
uint32_t denset;
|
||||||
uint32_t denclr;
|
uint32_t denclr;
|
||||||
#endif
|
#endif
|
||||||
@@ -420,7 +420,7 @@ static inline void lm3s_gpiopadtype(uint32_t base, uint32_t pin, uint32_t cfgset
|
|||||||
|
|
||||||
/* Assume digital GPIO function, push-pull with no pull-up or pull-down */
|
/* Assume digital GPIO function, push-pull with no pull-up or pull-down */
|
||||||
|
|
||||||
#if 0 /* always overwritten by lm3s_gpiofunc */
|
#if 0 /* always overwritten by lm_gpiofunc */
|
||||||
odrset = 0;
|
odrset = 0;
|
||||||
odrclr = pin;
|
odrclr = pin;
|
||||||
#endif
|
#endif
|
||||||
@@ -428,7 +428,7 @@ static inline void lm3s_gpiopadtype(uint32_t base, uint32_t pin, uint32_t cfgset
|
|||||||
purclr = pin;
|
purclr = pin;
|
||||||
pdrset = 0;
|
pdrset = 0;
|
||||||
pdrclr = pin;
|
pdrclr = pin;
|
||||||
#if 0 /* always overwritten by lm3s_gpiofunc */
|
#if 0 /* always overwritten by lm_gpiofunc */
|
||||||
denset = pin;
|
denset = pin;
|
||||||
denclr = 0;
|
denclr = 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -455,7 +455,7 @@ static inline void lm3s_gpiopadtype(uint32_t base, uint32_t pin, uint32_t cfgset
|
|||||||
break;
|
break;
|
||||||
case 3: /* Open-drain */
|
case 3: /* Open-drain */
|
||||||
{
|
{
|
||||||
#if 0 /* always overwritten by lm3s_gpiofunc */
|
#if 0 /* always overwritten by lm_gpiofunc */
|
||||||
odrset = pin;
|
odrset = pin;
|
||||||
odrclr = 0;
|
odrclr = 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -463,7 +463,7 @@ static inline void lm3s_gpiopadtype(uint32_t base, uint32_t pin, uint32_t cfgset
|
|||||||
break;
|
break;
|
||||||
case 4: /* Open-drain with weak pull-up */
|
case 4: /* Open-drain with weak pull-up */
|
||||||
{
|
{
|
||||||
#if 0 /* always overwritten by lm3s_gpiofunc */
|
#if 0 /* always overwritten by lm_gpiofunc */
|
||||||
odrset = pin;
|
odrset = pin;
|
||||||
odrclr = 0;
|
odrclr = 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -473,7 +473,7 @@ static inline void lm3s_gpiopadtype(uint32_t base, uint32_t pin, uint32_t cfgset
|
|||||||
break;
|
break;
|
||||||
case 5: /* Open-drain with weak pull-down */
|
case 5: /* Open-drain with weak pull-down */
|
||||||
{
|
{
|
||||||
#if 0 /* always overwritten by lm3s_gpiofunc */
|
#if 0 /* always overwritten by lm_gpiofunc */
|
||||||
odrset = pin;
|
odrset = pin;
|
||||||
odrclr = 0;
|
odrclr = 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -483,7 +483,7 @@ static inline void lm3s_gpiopadtype(uint32_t base, uint32_t pin, uint32_t cfgset
|
|||||||
break;
|
break;
|
||||||
case 6: /* Analog comparator */
|
case 6: /* Analog comparator */
|
||||||
{
|
{
|
||||||
#if 0 /* always overwritten by lm3s_gpiofunc */
|
#if 0 /* always overwritten by lm_gpiofunc */
|
||||||
denset = 0;
|
denset = 0;
|
||||||
denclr = pin;
|
denclr = pin;
|
||||||
#endif
|
#endif
|
||||||
@@ -502,7 +502,7 @@ static inline void lm3s_gpiopadtype(uint32_t base, uint32_t pin, uint32_t cfgset
|
|||||||
* drain output when set to 1."
|
* drain output when set to 1."
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0 /* always overwritten by lm3s_gpiofunc */
|
#if 0 /* always overwritten by lm_gpiofunc */
|
||||||
regval = getreg32(base + LM3S_GPIO_ODR_OFFSET);
|
regval = getreg32(base + LM3S_GPIO_ODR_OFFSET);
|
||||||
regval &= ~odrclr;
|
regval &= ~odrclr;
|
||||||
regval |= odrset;
|
regval |= odrset;
|
||||||
@@ -540,7 +540,7 @@ static inline void lm3s_gpiopadtype(uint32_t base, uint32_t pin, uint32_t cfgset
|
|||||||
* corresponding GPIODEN bit must be set."
|
* corresponding GPIODEN bit must be set."
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0 /* always overwritten by lm3s_gpiofunc */
|
#if 0 /* always overwritten by lm_gpiofunc */
|
||||||
regval = getreg32(base + LM3S_GPIO_DEN_OFFSET);
|
regval = getreg32(base + LM3S_GPIO_DEN_OFFSET);
|
||||||
regval &= ~denclr;
|
regval &= ~denclr;
|
||||||
regval |= denset;
|
regval |= denset;
|
||||||
@@ -549,28 +549,28 @@ static inline void lm3s_gpiopadtype(uint32_t base, uint32_t pin, uint32_t cfgset
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_initoutput
|
* Name: lm_initoutput
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Set the GPIO output value
|
* Set the GPIO output value
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline void lm3s_initoutput(uint32_t cfgset)
|
static inline void lm_initoutput(uint32_t cfgset)
|
||||||
{
|
{
|
||||||
bool value = ((cfgset & GPIO_VALUE_MASK) != GPIO_VALUE_ZERO);
|
bool value = ((cfgset & GPIO_VALUE_MASK) != GPIO_VALUE_ZERO);
|
||||||
lm3s_gpiowrite(cfgset, value);
|
lm_gpiowrite(cfgset, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_interrupt
|
* Name: lm_interrupt
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Configure the interrupt pin.
|
* Configure the interrupt pin.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline void lm3s_interrupt(uint32_t base, uint32_t pin, uint32_t cfgset)
|
static inline void lm_interrupt(uint32_t base, uint32_t pin, uint32_t cfgset)
|
||||||
{
|
{
|
||||||
int inttype = (cfgset & GPIO_INT_MASK) >> GPIO_INT_SHIFT;
|
int inttype = (cfgset & GPIO_INT_MASK) >> GPIO_INT_SHIFT;
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
@@ -694,14 +694,14 @@ static inline void lm3s_interrupt(uint32_t base, uint32_t pin, uint32_t cfgset)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_configgpio
|
* Name: lm_configgpio
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Configure a GPIO pin based on bit-encoded description of the pin.
|
* Configure a GPIO pin based on bit-encoded description of the pin.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int lm3s_configgpio(uint32_t cfgset)
|
int lm_configgpio(uint32_t cfgset)
|
||||||
{
|
{
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
unsigned int func;
|
unsigned int func;
|
||||||
@@ -722,7 +722,7 @@ int lm3s_configgpio(uint32_t cfgset)
|
|||||||
|
|
||||||
/* Get the base address associated with the GPIO port */
|
/* Get the base address associated with the GPIO port */
|
||||||
|
|
||||||
base = lm3s_gpiobaseaddress(port);
|
base = lm_gpiobaseaddress(port);
|
||||||
DEBUGASSERT(base != 0);
|
DEBUGASSERT(base != 0);
|
||||||
|
|
||||||
/* The following requires exclusive access to the GPIO registers */
|
/* The following requires exclusive access to the GPIO registers */
|
||||||
@@ -742,25 +742,25 @@ int lm3s_configgpio(uint32_t cfgset)
|
|||||||
* to perform reconfiguration.
|
* to perform reconfiguration.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
lm3s_gpiofunc(base, pinno, &g_funcbits[0]);
|
lm_gpiofunc(base, pinno, &g_funcbits[0]);
|
||||||
|
|
||||||
/* Then set up pad strengths and pull-ups. These setups should be done before
|
/* Then set up pad strengths and pull-ups. These setups should be done before
|
||||||
* setting up the function because some function settings will over-ride these
|
* setting up the function because some function settings will over-ride these
|
||||||
* user options.
|
* user options.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
lm3s_gpiopadstrength(base, pin, cfgset);
|
lm_gpiopadstrength(base, pin, cfgset);
|
||||||
lm3s_gpiopadtype(base, pin, cfgset);
|
lm_gpiopadtype(base, pin, cfgset);
|
||||||
|
|
||||||
/* Then set up the real pin function */
|
/* Then set up the real pin function */
|
||||||
|
|
||||||
lm3s_gpiofunc(base, pinno, &g_funcbits[func]);
|
lm_gpiofunc(base, pinno, &g_funcbits[func]);
|
||||||
|
|
||||||
/* Special GPIO digital output pins */
|
/* Special GPIO digital output pins */
|
||||||
|
|
||||||
if (func == 1 || func == 3)
|
if (func == 1 || func == 3)
|
||||||
{
|
{
|
||||||
lm3s_initoutput(cfgset);
|
lm_initoutput(cfgset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -768,7 +768,7 @@ int lm3s_configgpio(uint32_t cfgset)
|
|||||||
|
|
||||||
else if (func == 7)
|
else if (func == 7)
|
||||||
{
|
{
|
||||||
lm3s_interrupt(base, pin, cfgset);
|
lm_interrupt(base, pin, cfgset);
|
||||||
}
|
}
|
||||||
|
|
||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
@@ -776,14 +776,14 @@ int lm3s_configgpio(uint32_t cfgset)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_gpiowrite
|
* Name: lm_gpiowrite
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Write one or zero to the selected GPIO pin
|
* Write one or zero to the selected GPIO pin
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void lm3s_gpiowrite(uint32_t pinset, bool value)
|
void lm_gpiowrite(uint32_t pinset, bool value)
|
||||||
{
|
{
|
||||||
unsigned int port;
|
unsigned int port;
|
||||||
unsigned int pinno;
|
unsigned int pinno;
|
||||||
@@ -796,7 +796,7 @@ void lm3s_gpiowrite(uint32_t pinset, bool value)
|
|||||||
|
|
||||||
/* Get the base address associated with the GPIO port */
|
/* Get the base address associated with the GPIO port */
|
||||||
|
|
||||||
base = lm3s_gpiobaseaddress(port);
|
base = lm_gpiobaseaddress(port);
|
||||||
|
|
||||||
/* "The GPIO DATA register is the data register. In software control mode,
|
/* "The GPIO DATA register is the data register. In software control mode,
|
||||||
* values written in the GPIO DATA register are transferred onto the GPIO
|
* values written in the GPIO DATA register are transferred onto the GPIO
|
||||||
@@ -814,14 +814,14 @@ void lm3s_gpiowrite(uint32_t pinset, bool value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_gpioread
|
* Name: lm_gpioread
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Read one or zero from the selected GPIO pin
|
* Read one or zero from the selected GPIO pin
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
bool lm3s_gpioread(uint32_t pinset, bool value)
|
bool lm_gpioread(uint32_t pinset, bool value)
|
||||||
{
|
{
|
||||||
unsigned int port;
|
unsigned int port;
|
||||||
unsigned int pinno;
|
unsigned int pinno;
|
||||||
@@ -834,7 +834,7 @@ bool lm3s_gpioread(uint32_t pinset, bool value)
|
|||||||
|
|
||||||
/* Get the base address associated with the GPIO port */
|
/* Get the base address associated with the GPIO port */
|
||||||
|
|
||||||
base = lm3s_gpiobaseaddress(port);
|
base = lm_gpiobaseaddress(port);
|
||||||
|
|
||||||
/* "... the values read from this register are determined for each bit
|
/* "... the values read from this register are determined for each bit
|
||||||
* by the mask bit derived from the address used to access the data register,
|
* by the mask bit derived from the address used to access the data register,
|
||||||
+21
-21
@@ -53,7 +53,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/* Bit-encoded input to lm3s_configgpio() *******************************************/
|
/* Bit-encoded input to lm_configgpio() *********************************************/
|
||||||
|
|
||||||
/* Encoding:
|
/* Encoding:
|
||||||
* FFFS SPPP IIIn nnnn nnnn nnnn VPPP PBBB
|
* FFFS SPPP IIIn nnnn nnnn nnnn VPPP PBBB
|
||||||
@@ -161,57 +161,57 @@ extern "C"
|
|||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/************************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
****************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm3s_configgpio
|
* Name: lm_configgpio
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Configure a GPIO pin based on bit-encoded description of the pin.
|
* Configure a GPIO pin based on bit-encoded description of the pin.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
int lm3s_configgpio(uint32_t cfgset);
|
int lm_configgpio(uint32_t cfgset);
|
||||||
|
|
||||||
/****************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm3s_gpiowrite
|
* Name: lm_gpiowrite
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Write one or zero to the selected GPIO pin
|
* Write one or zero to the selected GPIO pin
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void lm3s_gpiowrite(uint32_t pinset, bool value);
|
void lm_gpiowrite(uint32_t pinset, bool value);
|
||||||
|
|
||||||
/****************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm3s_gpioread
|
* Name: lm_gpioread
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Read one or zero from the selected GPIO pin
|
* Read one or zero from the selected GPIO pin
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
bool lm3s_gpioread(uint32_t pinset, bool value);
|
bool lm_gpioread(uint32_t pinset, bool value);
|
||||||
|
|
||||||
/****************************************************************************
|
/************************************************************************************
|
||||||
* Function: lm3s_dumpgpio
|
* Function: lm_dumpgpio
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Dump all GPIO registers associated with the provided base address
|
* Dump all GPIO registers associated with the provided base address
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
int lm3s_dumpgpio(uint32_t pinset, const char *msg);
|
int lm_dumpgpio(uint32_t pinset, const char *msg);
|
||||||
|
|
||||||
/****************************************************************************
|
/************************************************************************************
|
||||||
* Name: gpio_irqinitialize
|
* Name: gpio_irqinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Initialize all vectors to the unexpected interrupt handler
|
* Initialize all vectors to the unexpected interrupt handler
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
int weak_function gpio_irqinitialize(void);
|
int weak_function gpio_irqinitialize(void);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lm/lm3s_gpioirq.c
|
* arch/arm/src/lm/lm_gpioirq.c
|
||||||
* arch/arm/src/chip/lm3s_gpioirq.c
|
* arch/arm/src/chip/lm_gpioirq.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -72,25 +72,25 @@ static FAR xcpt_t g_gpioirqvector[NR_GPIO_IRQS];
|
|||||||
|
|
||||||
static const uint32_t g_gpiobase[] =
|
static const uint32_t g_gpiobase[] =
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOA_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOA_IRQS
|
||||||
LM3S_GPIOA_BASE,
|
LM3S_GPIOA_BASE,
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOB_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOB_IRQS
|
||||||
LM3S_GPIOB_BASE,
|
LM3S_GPIOB_BASE,
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOC_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOC_IRQS
|
||||||
LM3S_GPIOC_BASE,
|
LM3S_GPIOC_BASE,
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOD_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOD_IRQS
|
||||||
LM3S_GPIOD_BASE,
|
LM3S_GPIOD_BASE,
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOE_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOE_IRQS
|
||||||
LM3S_GPIOE_BASE,
|
LM3S_GPIOE_BASE,
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOF_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOF_IRQS
|
||||||
LM3S_GPIOF_BASE,
|
LM3S_GPIOF_BASE,
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOG_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOG_IRQS
|
||||||
LM3S_GPIOG_BASE,
|
LM3S_GPIOG_BASE,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -100,10 +100,10 @@ static const uint32_t g_gpiobase[] =
|
|||||||
* errors!
|
* errors!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOH_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOH_IRQS
|
||||||
LM3S_GPIOH_BASE,
|
LM3S_GPIOH_BASE,
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOJ_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOJ_IRQS
|
||||||
LM3S_GPIOJ_BASE,
|
LM3S_GPIOJ_BASE,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@@ -119,7 +119,7 @@ static const uint32_t g_gpiobase[] =
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_gpiobaseaddress
|
* Name: lm_gpiobaseaddress
|
||||||
*
|
*
|
||||||
* Input:
|
* Input:
|
||||||
* gpioirq - A pin number in the range of 0 to NR_GPIO_IRQS.
|
* gpioirq - A pin number in the range of 0 to NR_GPIO_IRQS.
|
||||||
@@ -131,7 +131,7 @@ static const uint32_t g_gpiobase[] =
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static uint32_t lm3s_gpiobaseaddress(unsigned int gpioirq)
|
static uint32_t lm_gpiobaseaddress(unsigned int gpioirq)
|
||||||
{
|
{
|
||||||
unsigned int ndx = gpioirq >> 3;
|
unsigned int ndx = gpioirq >> 3;
|
||||||
if (ndx < GPIO_NADDRS)
|
if (ndx < GPIO_NADDRS)
|
||||||
@@ -142,14 +142,14 @@ static uint32_t lm3s_gpiobaseaddress(unsigned int gpioirq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_gpio*handler
|
* Name: lm_gpio*handler
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Handle interrupts on each enabled GPIO port
|
* Handle interrupts on each enabled GPIO port
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int lm3s_gpiohandler(uint32_t regbase, int irqbase, void *context)
|
static int lm_gpiohandler(uint32_t regbase, int irqbase, void *context)
|
||||||
{
|
{
|
||||||
uint32_t mis;
|
uint32_t mis;
|
||||||
int irq;
|
int irq;
|
||||||
@@ -184,66 +184,66 @@ static int lm3s_gpiohandler(uint32_t regbase, int irqbase, void *context)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOA_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOA_IRQS
|
||||||
static int lm3s_gpioahandler(int irq, FAR void *context)
|
static int lm_gpioahandler(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
return lm3s_gpiohandler(LM3S_GPIOA_BASE, LM3S_IRQ_GPIOA_0, context);
|
return lm_gpiohandler(LM3S_GPIOA_BASE, LM3S_IRQ_GPIOA_0, context);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOB_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOB_IRQS
|
||||||
static int lm3s_gpiobhandler(int irq, FAR void *context)
|
static int lm_gpiobhandler(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
return lm3s_gpiohandler(LM3S_GPIOB_BASE, LM3S_IRQ_GPIOB_0, context);
|
return lm_gpiohandler(LM3S_GPIOB_BASE, LM3S_IRQ_GPIOB_0, context);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOC_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOC_IRQS
|
||||||
static int lm3s_gpiochandler(int irq, FAR void *context)
|
static int lm_gpiochandler(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
return lm3s_gpiohandler(LM3S_GPIOC_BASE, LM3S_IRQ_GPIOC_0, context);
|
return lm_gpiohandler(LM3S_GPIOC_BASE, LM3S_IRQ_GPIOC_0, context);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOD_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOD_IRQS
|
||||||
static int lm3s_gpiodhandler(int irq, FAR void *context)
|
static int lm_gpiodhandler(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
return lm3s_gpiohandler(LM3S_GPIOD_BASE, LM3S_IRQ_GPIOD_0, context);
|
return lm_gpiohandler(LM3S_GPIOD_BASE, LM3S_IRQ_GPIOD_0, context);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOE_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOE_IRQS
|
||||||
static int lm3s_gpioehandler(int irq, FAR void *context)
|
static int lm_gpioehandler(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
return lm3s_gpiohandler(LM3S_GPIOE_BASE, LM3S_IRQ_GPIOE_0, context);
|
return lm_gpiohandler(LM3S_GPIOE_BASE, LM3S_IRQ_GPIOE_0, context);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOF_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOF_IRQS
|
||||||
static int lm3s_gpiofhandler(int irq, FAR void *context)
|
static int lm_gpiofhandler(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
return lm3s_gpiohandler(LM3S_GPIOF_BASE, LM3S_IRQ_GPIOF_0, context);
|
return lm_gpiohandler(LM3S_GPIOF_BASE, LM3S_IRQ_GPIOF_0, context);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOG_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOG_IRQS
|
||||||
static int lm3s_gpioghandler(int irq, FAR void *context)
|
static int lm_gpioghandler(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
return lm3s_gpiohandler(LM3S_GPIOG_BASE, LM3S_IRQ_GPIOG_0, context);
|
return lm_gpiohandler(LM3S_GPIOG_BASE, LM3S_IRQ_GPIOG_0, context);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOH_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOH_IRQS
|
||||||
static int lm3s_gpiohhandler(int irq, FAR void *context)
|
static int lm_gpiohhandler(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
return lm3s_gpiohandler(LM3S_GPIOH_BASE, LM3S_IRQ_GPIOH_0, context);
|
return lm_gpiohandler(LM3S_GPIOH_BASE, LM3S_IRQ_GPIOH_0, context);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOJ_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOJ_IRQS
|
||||||
static int lm3s_gpiojhandler(int irq, FAR void *context)
|
static int lm_gpiojhandler(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
return lm3s_gpiohandler(LM3S_GPIOJ_BASE, LM3S_IRQ_GPIOJ_0, context);
|
return lm_gpiohandler(LM3S_GPIOJ_BASE, LM3S_IRQ_GPIOJ_0, context);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -274,40 +274,40 @@ int gpio_irqinitialize(void)
|
|||||||
* interrupts
|
* interrupts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOA_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOA_IRQS
|
||||||
irq_attach(LM3S_IRQ_GPIOA, lm3s_gpioahandler);
|
irq_attach(LM3S_IRQ_GPIOA, lm_gpioahandler);
|
||||||
up_enable_irq(LM3S_IRQ_GPIOA);
|
up_enable_irq(LM3S_IRQ_GPIOA);
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOB_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOB_IRQS
|
||||||
irq_attach(LM3S_IRQ_GPIOB, lm3s_gpiobhandler);
|
irq_attach(LM3S_IRQ_GPIOB, lm_gpiobhandler);
|
||||||
up_enable_irq(LM3S_IRQ_GPIOB);
|
up_enable_irq(LM3S_IRQ_GPIOB);
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOC_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOC_IRQS
|
||||||
irq_attach(LM3S_IRQ_GPIOC, lm3s_gpiochandler);
|
irq_attach(LM3S_IRQ_GPIOC, lm_gpiochandler);
|
||||||
up_enable_irq(LM3S_IRQ_GPIOC);
|
up_enable_irq(LM3S_IRQ_GPIOC);
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOD_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOD_IRQS
|
||||||
irq_attach(LM3S_IRQ_GPIOD, lm3s_gpiodhandler);
|
irq_attach(LM3S_IRQ_GPIOD, lm_gpiodhandler);
|
||||||
up_enable_irq(LM3S_IRQ_GPIOD);
|
up_enable_irq(LM3S_IRQ_GPIOD);
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOE_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOE_IRQS
|
||||||
irq_attach(LM3S_IRQ_GPIOE, lm3s_gpioehandler);
|
irq_attach(LM3S_IRQ_GPIOE, lm_gpioehandler);
|
||||||
up_enable_irq(LM3S_IRQ_GPIOE);
|
up_enable_irq(LM3S_IRQ_GPIOE);
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOF_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOF_IRQS
|
||||||
irq_attach(LM3S_IRQ_GPIOF, lm3s_gpiofhandler);
|
irq_attach(LM3S_IRQ_GPIOF, lm_gpiofhandler);
|
||||||
up_enable_irq(LM3S_IRQ_GPIOF);
|
up_enable_irq(LM3S_IRQ_GPIOF);
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOG_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOG_IRQS
|
||||||
irq_attach(LM3S_IRQ_GPIOG, lm3s_gpioghandler);
|
irq_attach(LM3S_IRQ_GPIOG, lm_gpioghandler);
|
||||||
up_enable_irq(LM3S_IRQ_GPIOG);
|
up_enable_irq(LM3S_IRQ_GPIOG);
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOH_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOH_IRQS
|
||||||
irq_attach(LM3S_IRQ_GPIOH, lm3s_gpiohhandler);
|
irq_attach(LM3S_IRQ_GPIOH, lm_gpiohhandler);
|
||||||
up_enable_irq(LM3S_IRQ_GPIOH);
|
up_enable_irq(LM3S_IRQ_GPIOH);
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIOJ_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIOJ_IRQS
|
||||||
irq_attach(LM3S_IRQ_GPIOJ, lm3s_gpiojhandler);
|
irq_attach(LM3S_IRQ_GPIOJ, lm_gpiojhandler);
|
||||||
up_enable_irq(LM3S_IRQ_GPIOJ);
|
up_enable_irq(LM3S_IRQ_GPIOJ);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -374,7 +374,7 @@ void gpio_irqenable(int irq)
|
|||||||
{
|
{
|
||||||
/* Get the base address of the GPIO module associated with this IRQ */
|
/* Get the base address of the GPIO module associated with this IRQ */
|
||||||
|
|
||||||
base = lm3s_gpiobaseaddress(gpioirq);
|
base = lm_gpiobaseaddress(gpioirq);
|
||||||
DEBUGASSERT(base != 0);
|
DEBUGASSERT(base != 0);
|
||||||
pin = (1 << (gpioirq & 7));
|
pin = (1 << (gpioirq & 7));
|
||||||
|
|
||||||
@@ -413,7 +413,7 @@ void gpio_irqdisable(int irq)
|
|||||||
{
|
{
|
||||||
/* Get the base address of the GPIO module associated with this IRQ */
|
/* Get the base address of the GPIO module associated with this IRQ */
|
||||||
|
|
||||||
base = lm3s_gpiobaseaddress(gpioirq);
|
base = lm_gpiobaseaddress(gpioirq);
|
||||||
DEBUGASSERT(base != 0);
|
DEBUGASSERT(base != 0);
|
||||||
pin = (1 << (gpioirq & 7));
|
pin = (1 << (gpioirq & 7));
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lm/lm3s_irq.c
|
* arch/arm/src/lm/lm_irq.c
|
||||||
* arch/arm/src/chip/lm3s_irq.c
|
* arch/arm/src/chip/lm_irq.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -88,7 +88,7 @@ volatile uint32_t *current_regs;
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_dumpnvic
|
* Name: lm_dumpnvic
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Dump some interesting NVIC registers
|
* Dump some interesting NVIC registers
|
||||||
@@ -96,7 +96,7 @@ volatile uint32_t *current_regs;
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(LM3S_IRQ_DEBUG) && defined (CONFIG_DEBUG)
|
#if defined(LM3S_IRQ_DEBUG) && defined (CONFIG_DEBUG)
|
||||||
static void lm3s_dumpnvic(const char *msg, int irq)
|
static void lm_dumpnvic(const char *msg, int irq)
|
||||||
{
|
{
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
@@ -126,12 +126,12 @@ static void lm3s_dumpnvic(const char *msg, int irq)
|
|||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# define lm3s_dumpnvic(msg, irq)
|
# define lm_dumpnvic(msg, irq)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_nmi, lm3s_busfault, lm3s_usagefault, lm3s_pendsv,
|
* Name: lm_nmi, lm_busfault, lm_usagefault, lm_pendsv,
|
||||||
* lm3s_dbgmonitor, lm3s_pendsv, lm3s_reserved
|
* lm_dbgmonitor, lm_pendsv, lm_reserved
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Handlers for various execptions. None are handled and all are fatal
|
* Handlers for various execptions. None are handled and all are fatal
|
||||||
@@ -141,7 +141,7 @@ static void lm3s_dumpnvic(const char *msg, int irq)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
static int lm3s_nmi(int irq, FAR void *context)
|
static int lm_nmi(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)irqsave();
|
||||||
dbg("PANIC!!! NMI received\n");
|
dbg("PANIC!!! NMI received\n");
|
||||||
@@ -149,7 +149,7 @@ static int lm3s_nmi(int irq, FAR void *context)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lm3s_busfault(int irq, FAR void *context)
|
static int lm_busfault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)irqsave();
|
||||||
dbg("PANIC!!! Bus fault recived\n");
|
dbg("PANIC!!! Bus fault recived\n");
|
||||||
@@ -157,7 +157,7 @@ static int lm3s_busfault(int irq, FAR void *context)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lm3s_usagefault(int irq, FAR void *context)
|
static int lm_usagefault(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)irqsave();
|
||||||
dbg("PANIC!!! Usage fault received\n");
|
dbg("PANIC!!! Usage fault received\n");
|
||||||
@@ -165,7 +165,7 @@ static int lm3s_usagefault(int irq, FAR void *context)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lm3s_pendsv(int irq, FAR void *context)
|
static int lm_pendsv(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)irqsave();
|
||||||
dbg("PANIC!!! PendSV received\n");
|
dbg("PANIC!!! PendSV received\n");
|
||||||
@@ -173,7 +173,7 @@ static int lm3s_pendsv(int irq, FAR void *context)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lm3s_dbgmonitor(int irq, FAR void *context)
|
static int lm_dbgmonitor(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)irqsave();
|
||||||
dbg("PANIC!!! Debug Monitor receieved\n");
|
dbg("PANIC!!! Debug Monitor receieved\n");
|
||||||
@@ -181,7 +181,7 @@ static int lm3s_dbgmonitor(int irq, FAR void *context)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lm3s_reserved(int irq, FAR void *context)
|
static int lm_reserved(int irq, FAR void *context)
|
||||||
{
|
{
|
||||||
(void)irqsave();
|
(void)irqsave();
|
||||||
dbg("PANIC!!! Reserved interrupt\n");
|
dbg("PANIC!!! Reserved interrupt\n");
|
||||||
@@ -191,7 +191,7 @@ static int lm3s_reserved(int irq, FAR void *context)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_irqinfo
|
* Name: lm_irqinfo
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Given an IRQ number, provide the register and bit setting to enable or
|
* Given an IRQ number, provide the register and bit setting to enable or
|
||||||
@@ -199,7 +199,7 @@ static int lm3s_reserved(int irq, FAR void *context)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int lm3s_irqinfo(int irq, uint32_t *regaddr, uint32_t *bit)
|
static int lm_irqinfo(int irq, uint32_t *regaddr, uint32_t *bit)
|
||||||
{
|
{
|
||||||
DEBUGASSERT(irq >= LM3S_IRQ_NMI && irq < NR_IRQS);
|
DEBUGASSERT(irq >= LM3S_IRQ_NMI && irq < NR_IRQS);
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ void up_irqinitialize(void)
|
|||||||
|
|
||||||
/* Initialize support for GPIO interrupts if included in this build */
|
/* Initialize support for GPIO interrupts if included in this build */
|
||||||
|
|
||||||
#ifndef CONFIG_LM3S_DISABLE_GPIO_IRQS
|
#ifndef CONFIG_LM_DISABLE_GPIO_IRQS
|
||||||
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
|
||||||
if (gpio_irqinitialize != NULL)
|
if (gpio_irqinitialize != NULL)
|
||||||
#endif
|
#endif
|
||||||
@@ -330,18 +330,18 @@ void up_irqinitialize(void)
|
|||||||
/* Attach all other processor exceptions (except reset and sys tick) */
|
/* Attach all other processor exceptions (except reset and sys tick) */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef CONFIG_DEBUG
|
||||||
irq_attach(LM3S_IRQ_NMI, lm3s_nmi);
|
irq_attach(LM3S_IRQ_NMI, lm_nmi);
|
||||||
#ifndef CONFIG_ARMV7M_MPU
|
#ifndef CONFIG_ARMV7M_MPU
|
||||||
irq_attach(LM3S_IRQ_MEMFAULT, up_memfault);
|
irq_attach(LM3S_IRQ_MEMFAULT, up_memfault);
|
||||||
#endif
|
#endif
|
||||||
irq_attach(LM3S_IRQ_BUSFAULT, lm3s_busfault);
|
irq_attach(LM3S_IRQ_BUSFAULT, lm_busfault);
|
||||||
irq_attach(LM3S_IRQ_USAGEFAULT, lm3s_usagefault);
|
irq_attach(LM3S_IRQ_USAGEFAULT, lm_usagefault);
|
||||||
irq_attach(LM3S_IRQ_PENDSV, lm3s_pendsv);
|
irq_attach(LM3S_IRQ_PENDSV, lm_pendsv);
|
||||||
irq_attach(LM3S_IRQ_DBGMONITOR, lm3s_dbgmonitor);
|
irq_attach(LM3S_IRQ_DBGMONITOR, lm_dbgmonitor);
|
||||||
irq_attach(LM3S_IRQ_RESERVED, lm3s_reserved);
|
irq_attach(LM3S_IRQ_RESERVED, lm_reserved);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lm3s_dumpnvic("initial", NR_IRQS);
|
lm_dumpnvic("initial", NR_IRQS);
|
||||||
|
|
||||||
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
#ifndef CONFIG_SUPPRESS_INTERRUPTS
|
||||||
|
|
||||||
@@ -366,7 +366,7 @@ void up_disable_irq(int irq)
|
|||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
uint32_t bit;
|
uint32_t bit;
|
||||||
|
|
||||||
if (lm3s_irqinfo(irq, ®addr, &bit) == 0)
|
if (lm_irqinfo(irq, ®addr, &bit) == 0)
|
||||||
{
|
{
|
||||||
/* Clear the appropriate bit in the register to enable the interrupt */
|
/* Clear the appropriate bit in the register to enable the interrupt */
|
||||||
|
|
||||||
@@ -374,7 +374,7 @@ void up_disable_irq(int irq)
|
|||||||
regval &= ~bit;
|
regval &= ~bit;
|
||||||
putreg32(regval, regaddr);
|
putreg32(regval, regaddr);
|
||||||
}
|
}
|
||||||
lm3s_dumpnvic("disable", irq);
|
lm_dumpnvic("disable", irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -391,7 +391,7 @@ void up_enable_irq(int irq)
|
|||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
uint32_t bit;
|
uint32_t bit;
|
||||||
|
|
||||||
if (lm3s_irqinfo(irq, ®addr, &bit) == 0)
|
if (lm_irqinfo(irq, ®addr, &bit) == 0)
|
||||||
{
|
{
|
||||||
/* Set the appropriate bit in the register to enable the interrupt */
|
/* Set the appropriate bit in the register to enable the interrupt */
|
||||||
|
|
||||||
@@ -399,7 +399,7 @@ void up_enable_irq(int irq)
|
|||||||
regval |= bit;
|
regval |= bit;
|
||||||
putreg32(regval, regaddr);
|
putreg32(regval, regaddr);
|
||||||
}
|
}
|
||||||
lm3s_dumpnvic("enable", irq);
|
lm_dumpnvic("enable", irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -452,7 +452,7 @@ int up_prioritize_irq(int irq, int priority)
|
|||||||
regval |= (priority << shift);
|
regval |= (priority << shift);
|
||||||
putreg32(regval, regaddr);
|
putreg32(regval, regaddr);
|
||||||
|
|
||||||
lm3s_dumpnvic("prioritize", irq);
|
lm_dumpnvic("prioritize", irq);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* arch/arm/src/lm/lm3s_lowputc.c
|
* arch/arm/src/lm/lm_lowputc.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -58,26 +58,26 @@
|
|||||||
/* Configuration **********************************************************/
|
/* Configuration **********************************************************/
|
||||||
|
|
||||||
#if LM3S_NUARTS < 2
|
#if LM3S_NUARTS < 2
|
||||||
# undef CONFIG_LM3S_UART1
|
# undef CONFIG_LM_UART1
|
||||||
# undef CONFIG_UART1_SERIAL_CONSOLE
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LM3S_NUARTS < 3
|
#if LM3S_NUARTS < 3
|
||||||
# undef CONFIG_LM3S_UART2
|
# undef CONFIG_LM_UART2
|
||||||
# undef CONFIG_UART2_SERIAL_CONSOLE
|
# undef CONFIG_UART2_SERIAL_CONSOLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Is there a serial console? */
|
/* Is there a serial console? */
|
||||||
|
|
||||||
#if defined(CONFIG_UART0_SERIAL_CONSOLE) && defined(CONFIG_LM3S_UART0)
|
#if defined(CONFIG_UART0_SERIAL_CONSOLE) && defined(CONFIG_LM_UART0)
|
||||||
# undef CONFIG_UART1_SERIAL_CONSOLE
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
# undef CONFIG_UART2_SERIAL_CONSOLE
|
# undef CONFIG_UART2_SERIAL_CONSOLE
|
||||||
# define HAVE_CONSOLE 1
|
# define HAVE_CONSOLE 1
|
||||||
#elif defined(CONFIG_UART1_SERIAL_CONSOLE) && defined(CONFIG_LM3S_UART1)
|
#elif defined(CONFIG_UART1_SERIAL_CONSOLE) && defined(CONFIG_LM_UART1)
|
||||||
# undef CONFIG_UART0_SERIAL_CONSOLE
|
# undef CONFIG_UART0_SERIAL_CONSOLE
|
||||||
# undef CONFIG_UART2_SERIAL_CONSOLE
|
# undef CONFIG_UART2_SERIAL_CONSOLE
|
||||||
# define HAVE_CONSOLE 1
|
# define HAVE_CONSOLE 1
|
||||||
#elif defined(CONFIG_UART2_SERIAL_CONSOLE) && defined(CONFIG_LM3S_UART2)
|
#elif defined(CONFIG_UART2_SERIAL_CONSOLE) && defined(CONFIG_LM_UART2)
|
||||||
# undef CONFIG_UART0_SERIAL_CONSOLE
|
# undef CONFIG_UART0_SERIAL_CONSOLE
|
||||||
# undef CONFIG_UART1_SERIAL_CONSOLE
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
# define HAVE_CONSOLE 1
|
# define HAVE_CONSOLE 1
|
||||||
@@ -259,22 +259,22 @@ void up_lowsetup(void)
|
|||||||
* this pin configuration -- whether or not a serial console is selected.
|
* this pin configuration -- whether or not a serial console is selected.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_LM3S_UART0
|
#ifdef CONFIG_LM_UART0
|
||||||
regval = getreg32(LM3S_SYSCON_RCGC1);
|
regval = getreg32(LM3S_SYSCON_RCGC1);
|
||||||
regval |= SYSCON_RCGC1_UART0;
|
regval |= SYSCON_RCGC1_UART0;
|
||||||
putreg32(regval, LM3S_SYSCON_RCGC1);
|
putreg32(regval, LM3S_SYSCON_RCGC1);
|
||||||
|
|
||||||
lm3s_configgpio(GPIO_UART0_RX);
|
lm_configgpio(GPIO_UART0_RX);
|
||||||
lm3s_configgpio(GPIO_UART0_TX);
|
lm_configgpio(GPIO_UART0_TX);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_LM3S_UART1
|
#ifdef CONFIG_LM_UART1
|
||||||
regval = getreg32(LM3S_SYSCON_RCGC1);
|
regval = getreg32(LM3S_SYSCON_RCGC1);
|
||||||
regval |= SYSCON_RCGC1_UART1;
|
regval |= SYSCON_RCGC1_UART1;
|
||||||
putreg32(regval, LM3S_SYSCON_RCGC1);
|
putreg32(regval, LM3S_SYSCON_RCGC1);
|
||||||
|
|
||||||
lm3s_configgpio(GPIO_UART1_RX);
|
lm_configgpio(GPIO_UART1_RX);
|
||||||
lm3s_configgpio(GPIO_UART1_TX);
|
lm_configgpio(GPIO_UART1_TX);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Enable the selected console device */
|
/* Enable the selected console device */
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lm/lm3s_lowputc.h
|
* arch/arm/src/lm/lm_lowputc.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lm/lm3s_serial.c
|
* arch/arm/src/lm/lm_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -67,32 +67,32 @@
|
|||||||
/* Some sanity checks *******************************************************/
|
/* Some sanity checks *******************************************************/
|
||||||
|
|
||||||
#if LM3S_NUARTS < 2
|
#if LM3S_NUARTS < 2
|
||||||
# undef CONFIG_LM3S_UART1
|
# undef CONFIG_LM_UART1
|
||||||
# undef CONFIG_UART1_SERIAL_CONSOLE
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LM3S_NUARTS < 3
|
#if LM3S_NUARTS < 3
|
||||||
# undef CONFIG_LM3S_UART2
|
# undef CONFIG_LM_UART2
|
||||||
# undef CONFIG_UART2_SERIAL_CONSOLE
|
# undef CONFIG_UART2_SERIAL_CONSOLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Is there a UART enabled? */
|
/* Is there a UART enabled? */
|
||||||
|
|
||||||
#if !defined(CONFIG_LM3S_UART0) && !defined(CONFIG_LM3S_UART1) && !defined(CONFIG_LM3S_UART2)
|
#if !defined(CONFIG_LM_UART0) && !defined(CONFIG_LM_UART1) && !defined(CONFIG_LM_UART2)
|
||||||
# error "No UARTs enabled"
|
# error "No UARTs enabled"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Is there a serial console? */
|
/* Is there a serial console? */
|
||||||
|
|
||||||
#if defined(CONFIG_UART0_SERIAL_CONSOLE) && defined(CONFIG_LM3S_UART0)
|
#if defined(CONFIG_UART0_SERIAL_CONSOLE) && defined(CONFIG_LM_UART0)
|
||||||
# undef CONFIG_UART1_SERIAL_CONSOLE
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
# undef CONFIG_UART2_SERIAL_CONSOLE
|
# undef CONFIG_UART2_SERIAL_CONSOLE
|
||||||
# define HAVE_CONSOLE 1
|
# define HAVE_CONSOLE 1
|
||||||
#elif defined(CONFIG_UART1_SERIAL_CONSOLE) && defined(CONFIG_LM3S_UART1)
|
#elif defined(CONFIG_UART1_SERIAL_CONSOLE) && defined(CONFIG_LM_UART1)
|
||||||
# undef CONFIG_UART0_SERIAL_CONSOLE
|
# undef CONFIG_UART0_SERIAL_CONSOLE
|
||||||
# undef CONFIG_UART2_SERIAL_CONSOLE
|
# undef CONFIG_UART2_SERIAL_CONSOLE
|
||||||
# define HAVE_CONSOLE 1
|
# define HAVE_CONSOLE 1
|
||||||
#elif defined(CONFIG_UART2_SERIAL_CONSOLE) && defined(CONFIG_LM3S_UART2)
|
#elif defined(CONFIG_UART2_SERIAL_CONSOLE) && defined(CONFIG_LM_UART2)
|
||||||
# undef CONFIG_UART0_SERIAL_CONSOLE
|
# undef CONFIG_UART0_SERIAL_CONSOLE
|
||||||
# undef CONFIG_UART1_SERIAL_CONSOLE
|
# undef CONFIG_UART1_SERIAL_CONSOLE
|
||||||
# define HAVE_CONSOLE 1
|
# define HAVE_CONSOLE 1
|
||||||
@@ -115,16 +115,16 @@
|
|||||||
#if defined(CONFIG_UART0_SERIAL_CONSOLE)
|
#if defined(CONFIG_UART0_SERIAL_CONSOLE)
|
||||||
# define CONSOLE_DEV g_uart0port /* UART0 is console */
|
# define CONSOLE_DEV g_uart0port /* UART0 is console */
|
||||||
# define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */
|
# define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */
|
||||||
# ifdef CONFIG_LM3S_UART1
|
# ifdef CONFIG_LM_UART1
|
||||||
# define TTYS1_DEV g_uart1port /* UART1 is ttyS1 */
|
# define TTYS1_DEV g_uart1port /* UART1 is ttyS1 */
|
||||||
# ifdef CONFIG_LM3S_UART2
|
# ifdef CONFIG_LM_UART2
|
||||||
# define TTYS2_DEV g_uart2port /* UART2 is ttyS2 */
|
# define TTYS2_DEV g_uart2port /* UART2 is ttyS2 */
|
||||||
# else
|
# else
|
||||||
# undef TTYS2_DEV /* No ttyS2 */
|
# undef TTYS2_DEV /* No ttyS2 */
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# undef TTYS2_DEV /* No ttyS2 */
|
# undef TTYS2_DEV /* No ttyS2 */
|
||||||
# ifdef CONFIG_LM3S_UART2
|
# ifdef CONFIG_LM_UART2
|
||||||
# define TTYS1_DEV g_uart2port /* UART2 is ttyS1 */
|
# define TTYS1_DEV g_uart2port /* UART2 is ttyS1 */
|
||||||
# else
|
# else
|
||||||
# undef TTYS1_DEV /* No ttyS1 */
|
# undef TTYS1_DEV /* No ttyS1 */
|
||||||
@@ -133,16 +133,16 @@
|
|||||||
#elif defined(CONFIG_UART1_SERIAL_CONSOLE)
|
#elif defined(CONFIG_UART1_SERIAL_CONSOLE)
|
||||||
# define CONSOLE_DEV g_uart1port /* UART1 is console */
|
# define CONSOLE_DEV g_uart1port /* UART1 is console */
|
||||||
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
|
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
|
||||||
# ifdef CONFIG_LM3S_UART0
|
# ifdef CONFIG_LM_UART0
|
||||||
# define TTYS1_DEV g_uart0port /* UART0 is ttyS1 */
|
# define TTYS1_DEV g_uart0port /* UART0 is ttyS1 */
|
||||||
# ifdef CONFIG_LM3S_UART2
|
# ifdef CONFIG_LM_UART2
|
||||||
# define TTYS2_DEV g_uart2port /* UART2 is ttyS2 */
|
# define TTYS2_DEV g_uart2port /* UART2 is ttyS2 */
|
||||||
# else
|
# else
|
||||||
# undef TTYS2_DEV /* No ttyS2 */
|
# undef TTYS2_DEV /* No ttyS2 */
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# undef TTYS2_DEV /* No ttyS2 */
|
# undef TTYS2_DEV /* No ttyS2 */
|
||||||
# ifdef CONFIG_LM3S_UART2
|
# ifdef CONFIG_LM_UART2
|
||||||
# define TTYS1_DEV g_uart2port /* UART2 is ttyS1 */
|
# define TTYS1_DEV g_uart2port /* UART2 is ttyS1 */
|
||||||
# else
|
# else
|
||||||
# undef TTYS1_DEV /* No ttyS1 */
|
# undef TTYS1_DEV /* No ttyS1 */
|
||||||
@@ -151,49 +151,49 @@
|
|||||||
#elif defined(CONFIG_UART2_SERIAL_CONSOLE)
|
#elif defined(CONFIG_UART2_SERIAL_CONSOLE)
|
||||||
# define CONSOLE_DEV g_uart2port /* UART2 is console */
|
# define CONSOLE_DEV g_uart2port /* UART2 is console */
|
||||||
# define TTYS0_DEV g_uart2port /* UART2 is ttyS0 */
|
# define TTYS0_DEV g_uart2port /* UART2 is ttyS0 */
|
||||||
# ifdef CONFIG_LM3S_UART0
|
# ifdef CONFIG_LM_UART0
|
||||||
# define TTYS1_DEV g_uart0port /* UART0 is ttyS1 */
|
# define TTYS1_DEV g_uart0port /* UART0 is ttyS1 */
|
||||||
# ifdef CONFIG_LM3S_UART2
|
# ifdef CONFIG_LM_UART2
|
||||||
# define TTYS2_DEV g_uart2port /* UART2 is ttyS2 */
|
# define TTYS2_DEV g_uart2port /* UART2 is ttyS2 */
|
||||||
# else
|
# else
|
||||||
# undef TTYS2_DEV /* No ttyS2 */
|
# undef TTYS2_DEV /* No ttyS2 */
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# undef TTYS2_DEV /* No ttyS2 */
|
# undef TTYS2_DEV /* No ttyS2 */
|
||||||
# ifdef CONFIG_LM3S_UART2
|
# ifdef CONFIG_LM_UART2
|
||||||
# define TTYS1_DEV g_uart2port /* UART2 is ttyS1 */
|
# define TTYS1_DEV g_uart2port /* UART2 is ttyS1 */
|
||||||
# else
|
# else
|
||||||
# undef TTYS1_DEV /* No ttyS1 */
|
# undef TTYS1_DEV /* No ttyS1 */
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#elifdefined(CONFIG_LM3S_UART0)
|
#elifdefined(CONFIG_LM_UART0)
|
||||||
# undef CONSOLE_DEV /* No console device */
|
# undef CONSOLE_DEV /* No console device */
|
||||||
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
|
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
|
||||||
# ifdef CONFIG_LM3S_UART1
|
# ifdef CONFIG_LM_UART1
|
||||||
# define TTYS1_DEV g_uart1port /* UART1 is ttyS1 */
|
# define TTYS1_DEV g_uart1port /* UART1 is ttyS1 */
|
||||||
# ifdef CONFIG_LM3S_UART2
|
# ifdef CONFIG_LM_UART2
|
||||||
# define TTYS2_DEV g_uart2port /* UART2 is ttyS2 */
|
# define TTYS2_DEV g_uart2port /* UART2 is ttyS2 */
|
||||||
# else
|
# else
|
||||||
# undef TTYS2_DEV /* No ttyS2 */
|
# undef TTYS2_DEV /* No ttyS2 */
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# undef TTYS2_DEV /* No ttyS2 */
|
# undef TTYS2_DEV /* No ttyS2 */
|
||||||
# ifdef CONFIG_LM3S_UART2
|
# ifdef CONFIG_LM_UART2
|
||||||
# define TTYS1_DEV g_uart2port /* UART2 is ttyS1 */
|
# define TTYS1_DEV g_uart2port /* UART2 is ttyS1 */
|
||||||
# else
|
# else
|
||||||
# undef TTYS1_DEV /* No ttyS1 */
|
# undef TTYS1_DEV /* No ttyS1 */
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#elifdefined(CONFIG_LM3S_UART1)
|
#elifdefined(CONFIG_LM_UART1)
|
||||||
# undef CONSOLE_DEV /* No console device */
|
# undef CONSOLE_DEV /* No console device */
|
||||||
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
|
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
|
||||||
# undef TTYS2_DEV /* No ttyS2 */
|
# undef TTYS2_DEV /* No ttyS2 */
|
||||||
# ifdef CONFIG_LM3S_UART2
|
# ifdef CONFIG_LM_UART2
|
||||||
# define TTYS1_DEV g_uart2port /* UART2 is ttyS1 */
|
# define TTYS1_DEV g_uart2port /* UART2 is ttyS1 */
|
||||||
# else
|
# else
|
||||||
# undef TTYS1_DEV /* No ttyS1 */
|
# undef TTYS1_DEV /* No ttyS1 */
|
||||||
# endif
|
# endif
|
||||||
#elifdefined(CONFIG_LM3S_UART2)
|
#elifdefined(CONFIG_LM_UART2)
|
||||||
# undef CONSOLE_DEV /* No console device */
|
# undef CONSOLE_DEV /* No console device */
|
||||||
# define TTYS0_DEV g_uart2port /* UART2 is ttyS0 */
|
# define TTYS0_DEV g_uart2port /* UART2 is ttyS0 */
|
||||||
# undef TTYS1_DEV /* No ttyS1 */
|
# undef TTYS1_DEV /* No ttyS1 */
|
||||||
@@ -261,22 +261,22 @@ struct uart_ops_s g_uart_ops =
|
|||||||
|
|
||||||
/* I/O buffers */
|
/* I/O buffers */
|
||||||
|
|
||||||
#ifdef CONFIG_LM3S_UART0
|
#ifdef CONFIG_LM_UART0
|
||||||
static char g_uart0rxbuffer[CONFIG_UART0_RXBUFSIZE];
|
static char g_uart0rxbuffer[CONFIG_UART0_RXBUFSIZE];
|
||||||
static char g_uart0txbuffer[CONFIG_UART0_TXBUFSIZE];
|
static char g_uart0txbuffer[CONFIG_UART0_TXBUFSIZE];
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_LM3S_UART1
|
#ifdef CONFIG_LM_UART1
|
||||||
static char g_uart1rxbuffer[CONFIG_UART1_RXBUFSIZE];
|
static char g_uart1rxbuffer[CONFIG_UART1_RXBUFSIZE];
|
||||||
static char g_uart1txbuffer[CONFIG_UART1_TXBUFSIZE];
|
static char g_uart1txbuffer[CONFIG_UART1_TXBUFSIZE];
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_LM3S_UART2
|
#ifdef CONFIG_LM_UART2
|
||||||
static char g_uart2rxbuffer[CONFIG_UART2_RXBUFSIZE];
|
static char g_uart2rxbuffer[CONFIG_UART2_RXBUFSIZE];
|
||||||
static char g_uart2txbuffer[CONFIG_UART2_TXBUFSIZE];
|
static char g_uart2txbuffer[CONFIG_UART2_TXBUFSIZE];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This describes the state of the LM3S uart0 port. */
|
/* This describes the state of the LM3S uart0 port. */
|
||||||
|
|
||||||
#ifdef CONFIG_LM3S_UART0
|
#ifdef CONFIG_LM_UART0
|
||||||
static struct up_dev_s g_uart0priv =
|
static struct up_dev_s g_uart0priv =
|
||||||
{
|
{
|
||||||
.uartbase = LM3S_UART0_BASE,
|
.uartbase = LM3S_UART0_BASE,
|
||||||
@@ -306,7 +306,7 @@ static uart_dev_t g_uart0port =
|
|||||||
|
|
||||||
/* This describes the state of the LM3S uart1 port. */
|
/* This describes the state of the LM3S uart1 port. */
|
||||||
|
|
||||||
#ifdef CONFIG_LM3S_UART1
|
#ifdef CONFIG_LM_UART1
|
||||||
static struct up_dev_s g_uart1priv =
|
static struct up_dev_s g_uart1priv =
|
||||||
{
|
{
|
||||||
.uartbase = LM3S_UART1_BASE,
|
.uartbase = LM3S_UART1_BASE,
|
||||||
@@ -336,7 +336,7 @@ static uart_dev_t g_uart1port =
|
|||||||
|
|
||||||
/* This describes the state of the LM3S uart1 port. */
|
/* This describes the state of the LM3S uart1 port. */
|
||||||
|
|
||||||
#ifdef CONFIG_LM3S_UART2
|
#ifdef CONFIG_LM_UART2
|
||||||
static struct up_dev_s g_uart2priv =
|
static struct up_dev_s g_uart2priv =
|
||||||
{
|
{
|
||||||
.uartbase = LM3S_UART2_BASE,
|
.uartbase = LM3S_UART2_BASE,
|
||||||
@@ -686,14 +686,14 @@ static int up_interrupt(int irq, void *context)
|
|||||||
int passes;
|
int passes;
|
||||||
bool handled;
|
bool handled;
|
||||||
|
|
||||||
#ifdef CONFIG_LM3S_UART0
|
#ifdef CONFIG_LM_UART0
|
||||||
if (g_uart0priv.irq == irq)
|
if (g_uart0priv.irq == irq)
|
||||||
{
|
{
|
||||||
dev = &g_uart0port;
|
dev = &g_uart0port;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_LM3S_UART1
|
#ifdef CONFIG_LM_UART1
|
||||||
if (g_uart1priv.irq == irq)
|
if (g_uart1priv.irq == irq)
|
||||||
{
|
{
|
||||||
dev = &g_uart1port;
|
dev = &g_uart1port;
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lm32/lm3s_ssi.c
|
* arch/arm/src/lm/lm_ssi.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
* Private Type Definitions
|
* Private Type Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
struct lm3s_ssidev_s
|
struct lm_ssidev_s
|
||||||
{
|
{
|
||||||
const struct spi_ops_s *ops; /* Common SPI operations */
|
const struct spi_ops_s *ops; /* Common SPI operations */
|
||||||
#ifndef CONFIG_SSI_POLLWAIT
|
#ifndef CONFIG_SSI_POLLWAIT
|
||||||
@@ -167,8 +167,8 @@ struct lm3s_ssidev_s
|
|||||||
* per word.
|
* per word.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void (*txword)(struct lm3s_ssidev_s *priv);
|
void (*txword)(struct lm_ssidev_s *priv);
|
||||||
void (*rxword)(struct lm3s_ssidev_s *priv);
|
void (*rxword)(struct lm_ssidev_s *priv);
|
||||||
|
|
||||||
#if NSSI_ENABLED > 1
|
#if NSSI_ENABLED > 1
|
||||||
uint32_t base; /* SSI register base address */
|
uint32_t base; /* SSI register base address */
|
||||||
@@ -202,15 +202,15 @@ struct lm3s_ssidev_s
|
|||||||
|
|
||||||
/* SSI register access */
|
/* SSI register access */
|
||||||
|
|
||||||
static inline uint32_t ssi_getreg(struct lm3s_ssidev_s *priv,
|
static inline uint32_t ssi_getreg(struct lm_ssidev_s *priv,
|
||||||
unsigned int offset);
|
unsigned int offset);
|
||||||
static inline void ssi_putreg(struct lm3s_ssidev_s *priv, unsigned int offset,
|
static inline void ssi_putreg(struct lm_ssidev_s *priv, unsigned int offset,
|
||||||
uint32_t value);
|
uint32_t value);
|
||||||
|
|
||||||
/* Misc helpers */
|
/* Misc helpers */
|
||||||
|
|
||||||
static uint32_t ssi_disable(struct lm3s_ssidev_s *priv);
|
static uint32_t ssi_disable(struct lm_ssidev_s *priv);
|
||||||
static void ssi_enable(struct lm3s_ssidev_s *priv, uint32_t enable);
|
static void ssi_enable(struct lm_ssidev_s *priv, uint32_t enable);
|
||||||
|
|
||||||
#ifndef CONFIG_SSI_POLLWAIT
|
#ifndef CONFIG_SSI_POLLWAIT
|
||||||
static void ssi_semtake(sem_t *sem);
|
static void ssi_semtake(sem_t *sem);
|
||||||
@@ -219,27 +219,27 @@ static void ssi_semtake(sem_t *sem);
|
|||||||
|
|
||||||
/* SSI data transfer */
|
/* SSI data transfer */
|
||||||
|
|
||||||
static void ssi_txnull(struct lm3s_ssidev_s *priv);
|
static void ssi_txnull(struct lm_ssidev_s *priv);
|
||||||
static void ssi_txuint16(struct lm3s_ssidev_s *priv);
|
static void ssi_txuint16(struct lm_ssidev_s *priv);
|
||||||
static void ssi_txuint8(struct lm3s_ssidev_s *priv);
|
static void ssi_txuint8(struct lm_ssidev_s *priv);
|
||||||
static void ssi_rxnull(struct lm3s_ssidev_s *priv);
|
static void ssi_rxnull(struct lm_ssidev_s *priv);
|
||||||
static void ssi_rxuint16(struct lm3s_ssidev_s *priv);
|
static void ssi_rxuint16(struct lm_ssidev_s *priv);
|
||||||
static void ssi_rxuint8(struct lm3s_ssidev_s *priv);
|
static void ssi_rxuint8(struct lm_ssidev_s *priv);
|
||||||
static inline bool ssi_txfifofull(struct lm3s_ssidev_s *priv);
|
static inline bool ssi_txfifofull(struct lm_ssidev_s *priv);
|
||||||
static inline bool ssi_rxfifoempty(struct lm3s_ssidev_s *priv);
|
static inline bool ssi_rxfifoempty(struct lm_ssidev_s *priv);
|
||||||
#if CONFIG_SSI_TXLIMIT == 1 && defined(CONFIG_SSI_POLLWAIT)
|
#if CONFIG_SSI_TXLIMIT == 1 && defined(CONFIG_SSI_POLLWAIT)
|
||||||
static inline int ssi_performtx(struct lm3s_ssidev_s *priv);
|
static inline int ssi_performtx(struct lm_ssidev_s *priv);
|
||||||
#else
|
#else
|
||||||
static int ssi_performtx(struct lm3s_ssidev_s *priv);
|
static int ssi_performtx(struct lm_ssidev_s *priv);
|
||||||
#endif
|
#endif
|
||||||
static inline void ssi_performrx(struct lm3s_ssidev_s *priv);
|
static inline void ssi_performrx(struct lm_ssidev_s *priv);
|
||||||
static int ssi_transfer(struct lm3s_ssidev_s *priv, const void *txbuffer,
|
static int ssi_transfer(struct lm_ssidev_s *priv, const void *txbuffer,
|
||||||
void *rxbuffer, unsigned int nwords);
|
void *rxbuffer, unsigned int nwords);
|
||||||
|
|
||||||
/* Interrupt handling */
|
/* Interrupt handling */
|
||||||
|
|
||||||
#ifndef CONFIG_SSI_POLLWAIT
|
#ifndef CONFIG_SSI_POLLWAIT
|
||||||
static inline struct lm3s_ssidev_s *ssi_mapirq(int irq);
|
static inline struct lm_ssidev_s *ssi_mapirq(int irq);
|
||||||
static int ssi_interrupt(int irq, void *context);
|
static int ssi_interrupt(int irq, void *context);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -248,14 +248,14 @@ static int ssi_interrupt(int irq, void *context);
|
|||||||
#ifndef CONFIG_SPI_OWNBUS
|
#ifndef CONFIG_SPI_OWNBUS
|
||||||
static int ssi_lock(FAR struct spi_dev_s *dev, bool lock);
|
static int ssi_lock(FAR struct spi_dev_s *dev, bool lock);
|
||||||
#endif
|
#endif
|
||||||
static uint32_t ssi_setfrequencyinternal(struct lm3s_ssidev_s *priv,
|
static uint32_t ssi_setfrequencyinternal(struct lm_ssidev_s *priv,
|
||||||
uint32_t frequency);
|
uint32_t frequency);
|
||||||
static uint32_t ssi_setfrequency(FAR struct spi_dev_s *dev,
|
static uint32_t ssi_setfrequency(FAR struct spi_dev_s *dev,
|
||||||
uint32_t frequency);
|
uint32_t frequency);
|
||||||
static void ssi_setmodeinternal(struct lm3s_ssidev_s *priv,
|
static void ssi_setmodeinternal(struct lm_ssidev_s *priv,
|
||||||
enum spi_mode_e mode);
|
enum spi_mode_e mode);
|
||||||
static void ssi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode);
|
static void ssi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode);
|
||||||
static void ssi_setbitsinternal(struct lm3s_ssidev_s *priv, int nbits);
|
static void ssi_setbitsinternal(struct lm_ssidev_s *priv, int nbits);
|
||||||
static void ssi_setbits(FAR struct spi_dev_s *dev, int nbits);
|
static void ssi_setbits(FAR struct spi_dev_s *dev, int nbits);
|
||||||
static uint16_t ssi_send(FAR struct spi_dev_s *dev, uint16_t wd);
|
static uint16_t ssi_send(FAR struct spi_dev_s *dev, uint16_t wd);
|
||||||
#ifdef CONFIG_SPI_EXCHANGE
|
#ifdef CONFIG_SPI_EXCHANGE
|
||||||
@@ -279,13 +279,13 @@ static const struct spi_ops_s g_spiops =
|
|||||||
#ifndef CONFIG_SPI_OWNBUS
|
#ifndef CONFIG_SPI_OWNBUS
|
||||||
.lock = ssi_lock,
|
.lock = ssi_lock,
|
||||||
#endif
|
#endif
|
||||||
.select = lm3s_spiselect, /* Provided externally by board logic */
|
.select = lm_spiselect, /* Provided externally by board logic */
|
||||||
.setfrequency = ssi_setfrequency,
|
.setfrequency = ssi_setfrequency,
|
||||||
.setmode = ssi_setmode,
|
.setmode = ssi_setmode,
|
||||||
.setbits = ssi_setbits,
|
.setbits = ssi_setbits,
|
||||||
.status = lm3s_spistatus, /* Provided externally by board logic */
|
.status = lm_spistatus, /* Provided externally by board logic */
|
||||||
#ifdef CONFIG_SPI_CMDDATA
|
#ifdef CONFIG_SPI_CMDDATA
|
||||||
.cmddata = lm3s_spicmddata,
|
.cmddata = lm_spicmddata,
|
||||||
#endif
|
#endif
|
||||||
.send = ssi_send,
|
.send = ssi_send,
|
||||||
#ifdef CONFIG_SPI_EXCHANGE
|
#ifdef CONFIG_SPI_EXCHANGE
|
||||||
@@ -298,7 +298,7 @@ static const struct spi_ops_s g_spiops =
|
|||||||
|
|
||||||
/* This supports is up to two SSI busses/ports */
|
/* This supports is up to two SSI busses/ports */
|
||||||
|
|
||||||
static struct lm3s_ssidev_s g_ssidev[] =
|
static struct lm_ssidev_s g_ssidev[] =
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_SSI0_DISABLE
|
#ifndef CONFIG_SSI0_DISABLE
|
||||||
{
|
{
|
||||||
@@ -347,7 +347,7 @@ static struct lm3s_ssidev_s g_ssidev[] =
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline uint32_t ssi_getreg(struct lm3s_ssidev_s *priv, unsigned int offset)
|
static inline uint32_t ssi_getreg(struct lm_ssidev_s *priv, unsigned int offset)
|
||||||
{
|
{
|
||||||
#if NSSI_ENABLED > 1
|
#if NSSI_ENABLED > 1
|
||||||
return getreg32(priv->base + offset);
|
return getreg32(priv->base + offset);
|
||||||
@@ -372,7 +372,7 @@ static inline uint32_t ssi_getreg(struct lm3s_ssidev_s *priv, unsigned int offse
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline void ssi_putreg(struct lm3s_ssidev_s *priv, unsigned int offset, uint32_t value)
|
static inline void ssi_putreg(struct lm_ssidev_s *priv, unsigned int offset, uint32_t value)
|
||||||
{
|
{
|
||||||
#if NSSI_ENABLED > 1
|
#if NSSI_ENABLED > 1
|
||||||
putreg32(value, priv->base + offset);
|
putreg32(value, priv->base + offset);
|
||||||
@@ -399,7 +399,7 @@ static inline void ssi_putreg(struct lm3s_ssidev_s *priv, unsigned int offset, u
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static uint32_t ssi_disable(struct lm3s_ssidev_s *priv)
|
static uint32_t ssi_disable(struct lm_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
uint32_t retval;
|
uint32_t retval;
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
@@ -428,7 +428,7 @@ static uint32_t ssi_disable(struct lm3s_ssidev_s *priv)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void ssi_enable(struct lm3s_ssidev_s *priv, uint32_t enable)
|
static void ssi_enable(struct lm_ssidev_s *priv, uint32_t enable)
|
||||||
{
|
{
|
||||||
uint32_t regval = ssi_getreg(priv, LM3S_SSI_CR1_OFFSET);
|
uint32_t regval = ssi_getreg(priv, LM3S_SSI_CR1_OFFSET);
|
||||||
regval &= ~SSI_CR1_SSE;
|
regval &= ~SSI_CR1_SSE;
|
||||||
@@ -481,13 +481,13 @@ static void ssi_semtake(sem_t *sem)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void ssi_txnull(struct lm3s_ssidev_s *priv)
|
static void ssi_txnull(struct lm_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
ssivdbg("TX: ->0xffff\n");
|
ssivdbg("TX: ->0xffff\n");
|
||||||
ssi_putreg(priv, LM3S_SSI_DR_OFFSET, 0xffff);
|
ssi_putreg(priv, LM3S_SSI_DR_OFFSET, 0xffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ssi_txuint16(struct lm3s_ssidev_s *priv)
|
static void ssi_txuint16(struct lm_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
uint16_t *ptr = (uint16_t*)priv->txbuffer;
|
uint16_t *ptr = (uint16_t*)priv->txbuffer;
|
||||||
ssivdbg("TX: %p->%04x\n", ptr, *ptr);
|
ssivdbg("TX: %p->%04x\n", ptr, *ptr);
|
||||||
@@ -495,7 +495,7 @@ static void ssi_txuint16(struct lm3s_ssidev_s *priv)
|
|||||||
priv->txbuffer = (void*)ptr;
|
priv->txbuffer = (void*)ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ssi_txuint8(struct lm3s_ssidev_s *priv)
|
static void ssi_txuint8(struct lm_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
uint8_t *ptr = (uint8_t*)priv->txbuffer;
|
uint8_t *ptr = (uint8_t*)priv->txbuffer;
|
||||||
ssivdbg("TX: %p->%02x\n", ptr, *ptr);
|
ssivdbg("TX: %p->%02x\n", ptr, *ptr);
|
||||||
@@ -520,7 +520,7 @@ static void ssi_txuint8(struct lm3s_ssidev_s *priv)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void ssi_rxnull(struct lm3s_ssidev_s *priv)
|
static void ssi_rxnull(struct lm_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
#if defined(SSI_DEBUG) && defined(CONFIG_DEBUG_VERBOSE)
|
#if defined(SSI_DEBUG) && defined(CONFIG_DEBUG_VERBOSE)
|
||||||
uint32_t regval = ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
uint32_t regval = ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
||||||
@@ -530,7 +530,7 @@ static void ssi_rxnull(struct lm3s_ssidev_s *priv)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ssi_rxuint16(struct lm3s_ssidev_s *priv)
|
static void ssi_rxuint16(struct lm_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
uint16_t *ptr = (uint16_t*)priv->rxbuffer;
|
uint16_t *ptr = (uint16_t*)priv->rxbuffer;
|
||||||
*ptr = (uint16_t)ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
*ptr = (uint16_t)ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
||||||
@@ -538,7 +538,7 @@ static void ssi_rxuint16(struct lm3s_ssidev_s *priv)
|
|||||||
priv->rxbuffer = (void*)(++ptr);
|
priv->rxbuffer = (void*)(++ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ssi_rxuint8(struct lm3s_ssidev_s *priv)
|
static void ssi_rxuint8(struct lm_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
uint8_t *ptr = (uint8_t*)priv->rxbuffer;
|
uint8_t *ptr = (uint8_t*)priv->rxbuffer;
|
||||||
*ptr = (uint8_t)ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
*ptr = (uint8_t)ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
||||||
@@ -560,7 +560,7 @@ static void ssi_rxuint8(struct lm3s_ssidev_s *priv)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline bool ssi_txfifofull(struct lm3s_ssidev_s *priv)
|
static inline bool ssi_txfifofull(struct lm_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
return (ssi_getreg(priv, LM3S_SSI_SR_OFFSET) & SSI_SR_TNF) == 0;
|
return (ssi_getreg(priv, LM3S_SSI_SR_OFFSET) & SSI_SR_TNF) == 0;
|
||||||
}
|
}
|
||||||
@@ -579,7 +579,7 @@ static inline bool ssi_txfifofull(struct lm3s_ssidev_s *priv)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline bool ssi_rxfifoempty(struct lm3s_ssidev_s *priv)
|
static inline bool ssi_rxfifoempty(struct lm_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
return (ssi_getreg(priv, LM3S_SSI_SR_OFFSET) & SSI_SR_RNE) == 0;
|
return (ssi_getreg(priv, LM3S_SSI_SR_OFFSET) & SSI_SR_RNE) == 0;
|
||||||
}
|
}
|
||||||
@@ -601,7 +601,7 @@ static inline bool ssi_rxfifoempty(struct lm3s_ssidev_s *priv)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if CONFIG_SSI_TXLIMIT == 1 && defined(CONFIG_SSI_POLLWAIT)
|
#if CONFIG_SSI_TXLIMIT == 1 && defined(CONFIG_SSI_POLLWAIT)
|
||||||
static inline int ssi_performtx(struct lm3s_ssidev_s *priv)
|
static inline int ssi_performtx(struct lm_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
/* Check if the Tx FIFO is full and more data to transfer */
|
/* Check if the Tx FIFO is full and more data to transfer */
|
||||||
|
|
||||||
@@ -618,7 +618,7 @@ static inline int ssi_performtx(struct lm3s_ssidev_s *priv)
|
|||||||
|
|
||||||
#else /* CONFIG_SSI_TXLIMIT == 1 CONFIG_SSI_POLLWAIT */
|
#else /* CONFIG_SSI_TXLIMIT == 1 CONFIG_SSI_POLLWAIT */
|
||||||
|
|
||||||
static int ssi_performtx(struct lm3s_ssidev_s *priv)
|
static int ssi_performtx(struct lm_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_SSI_POLLWAIT
|
#ifndef CONFIG_SSI_POLLWAIT
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
@@ -701,7 +701,7 @@ static int ssi_performtx(struct lm3s_ssidev_s *priv)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline void ssi_performrx(struct lm3s_ssidev_s *priv)
|
static inline void ssi_performrx(struct lm_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_SSI_POLLWAIT
|
#ifndef CONFIG_SSI_POLLWAIT
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
@@ -778,7 +778,7 @@ static inline void ssi_performrx(struct lm3s_ssidev_s *priv)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static int ssi_transfer(struct lm3s_ssidev_s *priv, const void *txbuffer,
|
static int ssi_transfer(struct lm_ssidev_s *priv, const void *txbuffer,
|
||||||
void *rxbuffer, unsigned int nwords)
|
void *rxbuffer, unsigned int nwords)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_SSI_POLLWAIT
|
#ifndef CONFIG_SSI_POLLWAIT
|
||||||
@@ -903,7 +903,7 @@ static int ssi_transfer(struct lm3s_ssidev_s *priv, const void *txbuffer,
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CONFIG_SSI_POLLWAIT
|
#ifndef CONFIG_SSI_POLLWAIT
|
||||||
static inline struct lm3s_ssidev_s *ssi_mapirq(int irq)
|
static inline struct lm_ssidev_s *ssi_mapirq(int irq)
|
||||||
{
|
{
|
||||||
switch (irq)
|
switch (irq)
|
||||||
{
|
{
|
||||||
@@ -944,7 +944,7 @@ static inline struct lm3s_ssidev_s *ssi_mapirq(int irq)
|
|||||||
#ifndef CONFIG_SSI_POLLWAIT
|
#ifndef CONFIG_SSI_POLLWAIT
|
||||||
static int ssi_interrupt(int irq, void *context)
|
static int ssi_interrupt(int irq, void *context)
|
||||||
{
|
{
|
||||||
struct lm3s_ssidev_s *priv = ssi_mapirq(irq);
|
struct lm_ssidev_s *priv = ssi_mapirq(irq);
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
int ntxd;
|
int ntxd;
|
||||||
|
|
||||||
@@ -1022,7 +1022,7 @@ static int ssi_interrupt(int irq, void *context)
|
|||||||
#ifndef CONFIG_SPI_OWNBUS
|
#ifndef CONFIG_SPI_OWNBUS
|
||||||
static int ssi_lock(FAR struct spi_dev_s *dev, bool lock)
|
static int ssi_lock(FAR struct spi_dev_s *dev, bool lock)
|
||||||
{
|
{
|
||||||
FAR struct lm3s_ssidev_s *priv = (FAR struct lm3s_ssidev_s *)dev;
|
FAR struct lm_ssidev_s *priv = (FAR struct lm_ssidev_s *)dev;
|
||||||
|
|
||||||
if (lock)
|
if (lock)
|
||||||
{
|
{
|
||||||
@@ -1063,7 +1063,7 @@ static int ssi_lock(FAR struct spi_dev_s *dev, bool lock)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static uint32_t ssi_setfrequencyinternal(struct lm3s_ssidev_s *priv, uint32_t frequency)
|
static uint32_t ssi_setfrequencyinternal(struct lm_ssidev_s *priv, uint32_t frequency)
|
||||||
{
|
{
|
||||||
uint32_t maxdvsr;
|
uint32_t maxdvsr;
|
||||||
uint32_t cpsdvsr;
|
uint32_t cpsdvsr;
|
||||||
@@ -1165,7 +1165,7 @@ static uint32_t ssi_setfrequencyinternal(struct lm3s_ssidev_s *priv, uint32_t fr
|
|||||||
|
|
||||||
static uint32_t ssi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
|
static uint32_t ssi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
|
||||||
{
|
{
|
||||||
struct lm3s_ssidev_s *priv = (struct lm3s_ssidev_s *)dev;
|
struct lm_ssidev_s *priv = (struct lm_ssidev_s *)dev;
|
||||||
uint32_t enable;
|
uint32_t enable;
|
||||||
uint32_t actual;
|
uint32_t actual;
|
||||||
|
|
||||||
@@ -1195,7 +1195,7 @@ static uint32_t ssi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void ssi_setmodeinternal(struct lm3s_ssidev_s *priv, enum spi_mode_e mode)
|
static void ssi_setmodeinternal(struct lm_ssidev_s *priv, enum spi_mode_e mode)
|
||||||
{
|
{
|
||||||
uint32_t modebits;
|
uint32_t modebits;
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
@@ -1251,7 +1251,7 @@ static void ssi_setmodeinternal(struct lm3s_ssidev_s *priv, enum spi_mode_e mode
|
|||||||
|
|
||||||
static void ssi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode)
|
static void ssi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode)
|
||||||
{
|
{
|
||||||
struct lm3s_ssidev_s *priv = (struct lm3s_ssidev_s *)dev;
|
struct lm_ssidev_s *priv = (struct lm_ssidev_s *)dev;
|
||||||
uint32_t enable;
|
uint32_t enable;
|
||||||
|
|
||||||
/* NOTE that the SSI must be disabled when setting any configuration registers. */
|
/* NOTE that the SSI must be disabled when setting any configuration registers. */
|
||||||
@@ -1279,7 +1279,7 @@ static void ssi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void ssi_setbitsinternal(struct lm3s_ssidev_s *priv, int nbits)
|
static void ssi_setbitsinternal(struct lm_ssidev_s *priv, int nbits)
|
||||||
{
|
{
|
||||||
uint32_t regval;
|
uint32_t regval;
|
||||||
|
|
||||||
@@ -1299,7 +1299,7 @@ static void ssi_setbitsinternal(struct lm3s_ssidev_s *priv, int nbits)
|
|||||||
|
|
||||||
static void ssi_setbits(FAR struct spi_dev_s *dev, int nbits)
|
static void ssi_setbits(FAR struct spi_dev_s *dev, int nbits)
|
||||||
{
|
{
|
||||||
struct lm3s_ssidev_s *priv = (struct lm3s_ssidev_s *)dev;
|
struct lm_ssidev_s *priv = (struct lm_ssidev_s *)dev;
|
||||||
uint32_t enable;
|
uint32_t enable;
|
||||||
|
|
||||||
/* NOTE that the SSI must be disabled when setting any configuration registers. */
|
/* NOTE that the SSI must be disabled when setting any configuration registers. */
|
||||||
@@ -1327,7 +1327,7 @@ static void ssi_setbits(FAR struct spi_dev_s *dev, int nbits)
|
|||||||
|
|
||||||
static uint16_t ssi_send(FAR struct spi_dev_s *dev, uint16_t wd)
|
static uint16_t ssi_send(FAR struct spi_dev_s *dev, uint16_t wd)
|
||||||
{
|
{
|
||||||
struct lm3s_ssidev_s *priv = (struct lm3s_ssidev_s*)dev;
|
struct lm_ssidev_s *priv = (struct lm_ssidev_s*)dev;
|
||||||
uint16_t response = 0;
|
uint16_t response = 0;
|
||||||
|
|
||||||
(void)ssi_transfer(priv, &wd, &response, 1);
|
(void)ssi_transfer(priv, &wd, &response, 1);
|
||||||
@@ -1358,7 +1358,7 @@ static uint16_t ssi_send(FAR struct spi_dev_s *dev, uint16_t wd)
|
|||||||
static void ssi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
|
static void ssi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
|
||||||
FAR void *rxbuffer, size_t nwords)
|
FAR void *rxbuffer, size_t nwords)
|
||||||
{
|
{
|
||||||
struct lm3s_ssidev_s *priv = (struct lm3s_ssidev_s *)dev;
|
struct lm_ssidev_s *priv = (struct lm_ssidev_s *)dev;
|
||||||
(void)ssi_transfer(priv, txbuffer, rxbuffer, nwords);
|
(void)ssi_transfer(priv, txbuffer, rxbuffer, nwords);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1385,7 +1385,7 @@ static void ssi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer,
|
|||||||
#ifndef CONFIG_SPI_EXCHANGE
|
#ifndef CONFIG_SPI_EXCHANGE
|
||||||
static void ssi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t nwords)
|
static void ssi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t nwords)
|
||||||
{
|
{
|
||||||
struct lm3s_ssidev_s *priv = (struct lm3s_ssidev_s *)dev;
|
struct lm_ssidev_s *priv = (struct lm_ssidev_s *)dev;
|
||||||
(void)ssi_transfer(priv, buffer, NULL, nwords);
|
(void)ssi_transfer(priv, buffer, NULL, nwords);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1412,7 +1412,7 @@ static void ssi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size
|
|||||||
#ifndef CONFIG_SPI_EXCHANGE
|
#ifndef CONFIG_SPI_EXCHANGE
|
||||||
static void ssi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nwords)
|
static void ssi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nwords)
|
||||||
{
|
{
|
||||||
struct lm3s_ssidev_s *priv = (struct lm3s_ssidev_s *)dev;
|
struct lm_ssidev_s *priv = (struct lm_ssidev_s *)dev;
|
||||||
(void)ssi_transfer(priv, NULL, buffer, nwords);
|
(void)ssi_transfer(priv, NULL, buffer, nwords);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1445,7 +1445,7 @@ static void ssi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw
|
|||||||
|
|
||||||
FAR struct spi_dev_s *up_spiinitialize(int port)
|
FAR struct spi_dev_s *up_spiinitialize(int port)
|
||||||
{
|
{
|
||||||
struct lm3s_ssidev_s *priv;
|
struct lm_ssidev_s *priv;
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
uint8_t regval;
|
uint8_t regval;
|
||||||
|
|
||||||
@@ -1473,10 +1473,10 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
|
|||||||
* logic in this file makes no assumptions about chip select)
|
* logic in this file makes no assumptions about chip select)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
lm3s_configgpio(GPIO_SSI0_CLK); /* PA2: SSI0 clock (SSI0Clk) */
|
lm_configgpio(GPIO_SSI0_CLK); /* PA2: SSI0 clock (SSI0Clk) */
|
||||||
/* lm3s_configgpio(GPIO_SSI0_FSS); PA3: SSI0 frame (SSI0Fss) */
|
/* lm_configgpio(GPIO_SSI0_FSS); PA3: SSI0 frame (SSI0Fss) */
|
||||||
lm3s_configgpio(GPIO_SSI0_RX); /* PA4: SSI0 receive (SSI0Rx) */
|
lm_configgpio(GPIO_SSI0_RX); /* PA4: SSI0 receive (SSI0Rx) */
|
||||||
lm3s_configgpio(GPIO_SSI0_TX); /* PA5: SSI0 transmit (SSI0Tx) */
|
lm_configgpio(GPIO_SSI0_TX); /* PA5: SSI0 transmit (SSI0Tx) */
|
||||||
break;
|
break;
|
||||||
#endif /* CONFIG_SSI0_DISABLE */
|
#endif /* CONFIG_SSI0_DISABLE */
|
||||||
|
|
||||||
@@ -1495,10 +1495,10 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
|
|||||||
|
|
||||||
/* Configure SSI1 GPIOs */
|
/* Configure SSI1 GPIOs */
|
||||||
|
|
||||||
lm3s_configgpio(GPIO_SSI1_CLK); /* PE0: SSI1 clock (SSI1Clk) */
|
lm_configgpio(GPIO_SSI1_CLK); /* PE0: SSI1 clock (SSI1Clk) */
|
||||||
/* lm3s_configgpio(GPIO_SSI1_FSS); PE1: SSI1 frame (SSI1Fss) */
|
/* lm_configgpio(GPIO_SSI1_FSS); PE1: SSI1 frame (SSI1Fss) */
|
||||||
lm3s_configgpio(GPIO_SSI1_RX); /* PE2: SSI1 receive (SSI1Rx) */
|
lm_configgpio(GPIO_SSI1_RX); /* PE2: SSI1 receive (SSI1Rx) */
|
||||||
lm3s_configgpio(GPIO_SSI1_TX); /* PE3: SSI1 transmit (SSI1Tx) */
|
lm_configgpio(GPIO_SSI1_TX); /* PE3: SSI1 transmit (SSI1Tx) */
|
||||||
break;
|
break;
|
||||||
#endif /* CONFIG_SSI1_DISABLE */
|
#endif /* CONFIG_SSI1_DISABLE */
|
||||||
|
|
||||||
@@ -73,20 +73,20 @@ extern "C"
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* The external functions, lm3s_spiselect, lm3s_spistatus, and
|
* The external functions, lm_spiselect, lm_spistatus, and
|
||||||
* lm3s_spicmddata must be provided by board-specific logic. These are
|
* lm_spicmddata must be provided by board-specific logic. These are
|
||||||
* implementations of the select, status, and cmddata methods of the SPI
|
* implementations of the select, status, and cmddata methods of the SPI
|
||||||
* interface defined by struct spi_ops_s (see include/nuttx/spi.h).
|
* interface defined by struct spi_ops_s (see include/nuttx/spi.h).
|
||||||
* All other methods (including up_spiinitialize()) are provided by common
|
* All other methods (including up_spiinitialize()) are provided by common
|
||||||
* logic. To use this common SPI logic on your board:
|
* logic. To use this common SPI logic on your board:
|
||||||
*
|
*
|
||||||
* 1. Provide logic in lm3s_boardinitialize() to configure SPI chip select
|
* 1. Provide logic in lm_boardinitialize() to configure SPI chip select
|
||||||
* pins.
|
* pins.
|
||||||
* 2. Provide lm3s_spiselect() and lm3s_spistatus() functions in your
|
* 2. Provide lm_spiselect() and lm_spistatus() functions in your
|
||||||
* board-specific logic. These functions will perform chip selection and
|
* board-specific logic. These functions will perform chip selection and
|
||||||
* status operations using GPIOs in the way your board is configured.
|
* status operations using GPIOs in the way your board is configured.
|
||||||
* 3. If CONFIG_SPI_CMDDATA is defined in your NuttX configuration, provide
|
* 3. If CONFIG_SPI_CMDDATA is defined in your NuttX configuration, provide
|
||||||
* the lm3s_spicmddata() function in your board-specific logic. This
|
* the lm_spicmddata() function in your board-specific logic. This
|
||||||
* functions will perform cmd/data selection operations using GPIOs in
|
* functions will perform cmd/data selection operations using GPIOs in
|
||||||
* the way your board is configured.
|
* the way your board is configured.
|
||||||
* 4. Add a call to up_spiinitialize() in your low level application
|
* 4. Add a call to up_spiinitialize() in your low level application
|
||||||
@@ -100,10 +100,10 @@ extern "C"
|
|||||||
|
|
||||||
struct spi_dev_s;
|
struct spi_dev_s;
|
||||||
enum spi_dev_e;
|
enum spi_dev_e;
|
||||||
void lm3s_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
void lm_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
|
||||||
uint8_t lm3s_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
uint8_t lm_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
|
||||||
#ifdef CONFIG_SPI_CMDDATA
|
#ifdef CONFIG_SPI_CMDDATA
|
||||||
int lm3s_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
int lm_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lm/lm3s_start.c
|
* arch/arm/src/lm/lm_start.c
|
||||||
* arch/arm/src/chip/lm3s_start.c
|
* arch/arm/src/chip/lm_start.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
* Public Data
|
* Public Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
extern void lm3s_vectors(void);
|
extern void lm_vectors(void);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
@@ -139,7 +139,7 @@ void __start(void)
|
|||||||
|
|
||||||
/* Initialize onboard resources */
|
/* Initialize onboard resources */
|
||||||
|
|
||||||
lm3s_boardinitialize();
|
lm_boardinitialize();
|
||||||
showprogress('E');
|
showprogress('E');
|
||||||
|
|
||||||
/* Then start NuttX */
|
/* Then start NuttX */
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lm/lm3s_syscontrol.c
|
* arch/arm/src/lm/lm_syscontrol.c
|
||||||
* arch/arm/src/chip/lm3s_syscontrol.c
|
* arch/arm/src/chip/lm_syscontrol.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_delay
|
* Name: lm_delay
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Wait for the newly selected oscillator(s) to settle. This is tricky because
|
* Wait for the newly selected oscillator(s) to settle. This is tricky because
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline void lm3s_delay(uint32_t delay)
|
static inline void lm_delay(uint32_t delay)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__("1:\n"
|
__asm__ __volatile__("1:\n"
|
||||||
"\tsubs %0, #1\n"
|
"\tsubs %0, #1\n"
|
||||||
@@ -96,7 +96,7 @@ static inline void lm3s_delay(uint32_t delay)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_oscdelay
|
* Name: lm_oscdelay
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Wait for the newly selected oscillator(s) to settle. This is tricky because
|
* Wait for the newly selected oscillator(s) to settle. This is tricky because
|
||||||
@@ -105,7 +105,7 @@ static inline void lm3s_delay(uint32_t delay)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline void lm3s_oscdelay(uint32_t rcc, uint32_t rcc2)
|
static inline void lm_oscdelay(uint32_t rcc, uint32_t rcc2)
|
||||||
{
|
{
|
||||||
/* Wait for the oscillator to stabilize. A smaller delay is used if the
|
/* Wait for the oscillator to stabilize. A smaller delay is used if the
|
||||||
* current clock rate is very slow.
|
* current clock rate is very slow.
|
||||||
@@ -138,18 +138,18 @@ static inline void lm3s_oscdelay(uint32_t rcc, uint32_t rcc2)
|
|||||||
|
|
||||||
/* Then delay that number of loops */
|
/* Then delay that number of loops */
|
||||||
|
|
||||||
lm3s_delay(delay);
|
lm_delay(delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_plllock
|
* Name: lm_plllock
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* The new RCC values have been selected... wait for the PLL to lock on
|
* The new RCC values have been selected... wait for the PLL to lock on
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static inline void lm3s_plllock(void)
|
static inline void lm_plllock(void)
|
||||||
{
|
{
|
||||||
volatile uint32_t delay;
|
volatile uint32_t delay;
|
||||||
|
|
||||||
@@ -175,7 +175,7 @@ static inline void lm3s_plllock(void)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_clockconfig
|
* Name: lm_clockconfig
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to change to new clock based on desired rcc and rcc2 settings.
|
* Called to change to new clock based on desired rcc and rcc2 settings.
|
||||||
@@ -184,7 +184,7 @@ static inline void lm3s_plllock(void)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void lm3s_clockconfig(uint32_t newrcc, uint32_t newrcc2)
|
void lm_clockconfig(uint32_t newrcc, uint32_t newrcc2)
|
||||||
{
|
{
|
||||||
uint32_t rcc;
|
uint32_t rcc;
|
||||||
uint32_t rcc2;
|
uint32_t rcc2;
|
||||||
@@ -221,7 +221,7 @@ void lm3s_clockconfig(uint32_t newrcc, uint32_t newrcc2)
|
|||||||
* clock setting, not the one that we are configuring.
|
* clock setting, not the one that we are configuring.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
lm3s_oscdelay(rcc, rcc2);
|
lm_oscdelay(rcc, rcc2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the new crystal value, oscillator source and PLL configuration */
|
/* Set the new crystal value, oscillator source and PLL configuration */
|
||||||
@@ -253,7 +253,7 @@ void lm3s_clockconfig(uint32_t newrcc, uint32_t newrcc2)
|
|||||||
|
|
||||||
/* Wait for the new crystal value and oscillator source to take effect */
|
/* Wait for the new crystal value and oscillator source to take effect */
|
||||||
|
|
||||||
lm3s_delay(16);
|
lm_delay(16);
|
||||||
|
|
||||||
/* Set the requested system divider and disable the non-selected osciallators */
|
/* Set the requested system divider and disable the non-selected osciallators */
|
||||||
|
|
||||||
@@ -269,7 +269,7 @@ void lm3s_clockconfig(uint32_t newrcc, uint32_t newrcc2)
|
|||||||
{
|
{
|
||||||
/* Yes, wail untill the PLL is locked */
|
/* Yes, wail untill the PLL is locked */
|
||||||
|
|
||||||
lm3s_plllock();
|
lm_plllock();
|
||||||
|
|
||||||
/* Then enable the PLL */
|
/* Then enable the PLL */
|
||||||
|
|
||||||
@@ -284,7 +284,7 @@ void lm3s_clockconfig(uint32_t newrcc, uint32_t newrcc2)
|
|||||||
|
|
||||||
/* Wait for the system divider to be effective */
|
/* Wait for the system divider to be effective */
|
||||||
|
|
||||||
lm3s_delay(6);
|
lm_delay(6);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -298,7 +298,7 @@ void lm3s_clockconfig(uint32_t newrcc, uint32_t newrcc2)
|
|||||||
|
|
||||||
void up_clockconfig(void)
|
void up_clockconfig(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_LM3S_REVA2
|
#ifdef CONFIG_LM_REVA2
|
||||||
/* Some early silicon returned an increase LDO voltage or 2.75V to work
|
/* Some early silicon returned an increase LDO voltage or 2.75V to work
|
||||||
* around a PLL bug
|
* around a PLL bug
|
||||||
*/
|
*/
|
||||||
@@ -310,6 +310,6 @@ void up_clockconfig(void)
|
|||||||
* header file
|
* header file
|
||||||
*/
|
*/
|
||||||
|
|
||||||
lm3s_clockconfig(LM3S_RCC_VALUE, LM3S_RCC2_VALUE);
|
lm_clockconfig(LM3S_RCC_VALUE, LM3S_RCC2_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/lm/lm3s_syscontrol.h
|
* arch/arm/src/lm/lm_syscontrol.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2010, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009-2010, 2013 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@@ -70,7 +70,7 @@ extern "C"
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: lm3s_clockconfig
|
* Name: lm_clockconfig
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to change to new clock based on desired rcc and rcc2 settings.
|
* Called to change to new clock based on desired rcc and rcc2 settings.
|
||||||
@@ -79,7 +79,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void lm3s_clockconfig(uint32_t newrcc, uint32_t newrcc2);
|
void lm_clockconfig(uint32_t newrcc, uint32_t newrcc2);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_clockconfig
|
* Name: up_clockconfig
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/lm/lm3s_timerisr.c
|
* arch/arm/src/lm/lm_timerisr.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
File diff suppressed because it is too large
Load Diff
+19
-19
@@ -334,15 +334,15 @@ Eagle100-specific Configuration Options
|
|||||||
Additional interrupt support can be disabled if desired to reduce memory
|
Additional interrupt support can be disabled if desired to reduce memory
|
||||||
footprint.
|
footprint.
|
||||||
|
|
||||||
CONFIG_LM3S_DISABLE_GPIOA_IRQS=n
|
CONFIG_LM_DISABLE_GPIOA_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOB_IRQS=n
|
CONFIG_LM_DISABLE_GPIOB_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOC_IRQS=n
|
CONFIG_LM_DISABLE_GPIOC_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOD_IRQS=n
|
CONFIG_LM_DISABLE_GPIOD_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOE_IRQS=n
|
CONFIG_LM_DISABLE_GPIOE_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOF_IRQS=n
|
CONFIG_LM_DISABLE_GPIOF_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOG_IRQS=n
|
CONFIG_LM_DISABLE_GPIOG_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOH_IRQS=y
|
CONFIG_LM_DISABLE_GPIOH_IRQS=y
|
||||||
CONFIG_LM3S_DISABLE_GPIOJ_IRQS=y
|
CONFIG_LM_DISABLE_GPIOJ_IRQS=y
|
||||||
|
|
||||||
LM3S6818 specific device driver settings
|
LM3S6818 specific device driver settings
|
||||||
|
|
||||||
@@ -367,18 +367,18 @@ Eagle100-specific Configuration Options
|
|||||||
value is large, then larger values of this setting may cause
|
value is large, then larger values of this setting may cause
|
||||||
Rx FIFO overrun errors. Default: half of the Tx FIFO size (4).
|
Rx FIFO overrun errors. Default: half of the Tx FIFO size (4).
|
||||||
|
|
||||||
CONFIG_LM3S_ETHERNET - This must be set (along with CONFIG_NET)
|
CONFIG_LM_ETHERNET - This must be set (along with CONFIG_NET)
|
||||||
to build the LM3S Ethernet driver
|
to build the LM3S Ethernet driver
|
||||||
CONFIG_LM3S_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
CONFIG_LM_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
||||||
CONFIG_LM3S_BOARDMAC - If the board-specific logic can provide
|
CONFIG_LM_BOARDMAC - If the board-specific logic can provide
|
||||||
a MAC address (via lm_ethernetmac()), then this should be selected.
|
a MAC address (via lm_ethernetmac()), then this should be selected.
|
||||||
CONFIG_LM3S_ETHHDUPLEX - Set to force half duplex operation
|
CONFIG_LM_ETHHDUPLEX - Set to force half duplex operation
|
||||||
CONFIG_LM3S_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
CONFIG_LM_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
||||||
CONFIG_LM3S_ETHNOPAD - Set to suppress Tx padding
|
CONFIG_LM_ETHNOPAD - Set to suppress Tx padding
|
||||||
CONFIG_LM3S_MULTICAST - Set to enable multicast frames
|
CONFIG_LM_MULTICAST - Set to enable multicast frames
|
||||||
CONFIG_LM3S_PROMISCUOUS - Set to enable promiscuous mode
|
CONFIG_LM_PROMISCUOUS - Set to enable promiscuous mode
|
||||||
CONFIG_LM3S_BADCRC - Set to enable bad CRC rejection.
|
CONFIG_LM_BADCRC - Set to enable bad CRC rejection.
|
||||||
CONFIG_LM3S_DUMPPACKET - Dump each packet received/sent to the console.
|
CONFIG_LM_DUMPPACKET - Dump each packet received/sent to the console.
|
||||||
|
|
||||||
Configurations
|
Configurations
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|||||||
@@ -58,21 +58,21 @@ CONFIG_ARCH_CALIBRATION=n
|
|||||||
# Disable support for interrupts on GPIOJ which does not
|
# Disable support for interrupts on GPIOJ which does not
|
||||||
# exist on the LM3S6918. Additional interrupt support can be
|
# exist on the LM3S6918. Additional interrupt support can be
|
||||||
# disabled if desired to reduce memory footprint.
|
# disabled if desired to reduce memory footprint.
|
||||||
CONFIG_LM3S_DISABLE_GPIOA_IRQS=n
|
CONFIG_LM_DISABLE_GPIOA_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOB_IRQS=n
|
CONFIG_LM_DISABLE_GPIOB_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOC_IRQS=n
|
CONFIG_LM_DISABLE_GPIOC_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOD_IRQS=n
|
CONFIG_LM_DISABLE_GPIOD_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOE_IRQS=n
|
CONFIG_LM_DISABLE_GPIOE_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOF_IRQS=n
|
CONFIG_LM_DISABLE_GPIOF_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOG_IRQS=n
|
CONFIG_LM_DISABLE_GPIOG_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOH_IRQS=n
|
CONFIG_LM_DISABLE_GPIOH_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOJ_IRQS=y
|
CONFIG_LM_DISABLE_GPIOJ_IRQS=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# LM3S6918 specific serial device driver settings
|
# LM3S6918 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_UART0=y
|
CONFIG_LM_UART0=y
|
||||||
CONFIG_LM3S_UART1=n
|
CONFIG_LM_UART1=n
|
||||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||||
CONFIG_UART1_SERIAL_CONSOLE=n
|
CONFIG_UART1_SERIAL_CONSOLE=n
|
||||||
CONFIG_UART0_TXBUFSIZE=256
|
CONFIG_UART0_TXBUFSIZE=256
|
||||||
@@ -99,16 +99,16 @@ CONFIG_SSI_POLLWAIT=y
|
|||||||
#
|
#
|
||||||
# LM3S6918 specific serial device driver settings
|
# LM3S6918 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_ETHERNET=y
|
CONFIG_LM_ETHERNET=y
|
||||||
CONFIG_LM3S_ETHLEDS=n
|
CONFIG_LM_ETHLEDS=n
|
||||||
CONFIG_LM3S_BOARDMAC=y
|
CONFIG_LM_BOARDMAC=y
|
||||||
CONFIG_LM3S_ETHHDUPLEX=n
|
CONFIG_LM_ETHHDUPLEX=n
|
||||||
CONFIG_LM3S_ETHNOAUTOCRC=n
|
CONFIG_LM_ETHNOAUTOCRC=n
|
||||||
CONFIG_LM3S_ETHNOPAD=n
|
CONFIG_LM_ETHNOPAD=n
|
||||||
CONFIG_LM3S_MULTICAST=n
|
CONFIG_LM_MULTICAST=n
|
||||||
CONFIG_LM3S_PROMISCUOUS=n
|
CONFIG_LM_PROMISCUOUS=n
|
||||||
CONFIG_LM3S_BADCRC=n
|
CONFIG_LM_BADCRC=n
|
||||||
CONFIG_LM3S_DUMPPACKET=n
|
CONFIG_LM_DUMPPACKET=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# General build options
|
# General build options
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm3s_boardinitialize
|
* Name: lm_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All LM3S architectures must provide the following entry point. This entry point
|
* All LM3S architectures must provide the following entry point. This entry point
|
||||||
@@ -121,21 +121,21 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void lm3s_boardinitialize(void);
|
extern void lm_boardinitialize(void);
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm3s_ethernetmac
|
* Name: lm_ethernetmac
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* For the Ethernet Eval Kits, the MAC address will be stored in the non-volatile
|
* For the Ethernet Eval Kits, the MAC address will be stored in the non-volatile
|
||||||
* USER0 and USER1 registers. If CONFIG_LM3S_BOARDMAC is defined, this function
|
* USER0 and USER1 registers. If CONFIG_LM_BOARDMAC is defined, this function
|
||||||
* will obtain the MAC address from these registers.
|
* will obtain the MAC address from these registers.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_LM3S_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
struct ether_addr;
|
struct ether_addr;
|
||||||
extern void lm3s_ethernetmac(struct ether_addr *ethaddr);
|
extern void lm_ethernetmac(struct ether_addr *ethaddr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|||||||
@@ -58,21 +58,21 @@ CONFIG_ARCH_CALIBRATION=n
|
|||||||
# Disable support for interrupts on GPIOJ which does not
|
# Disable support for interrupts on GPIOJ which does not
|
||||||
# exist on the LM3S6918. Additional interrupt support can be
|
# exist on the LM3S6918. Additional interrupt support can be
|
||||||
# disabled if desired to reduce memory footprint.
|
# disabled if desired to reduce memory footprint.
|
||||||
CONFIG_LM3S_DISABLE_GPIOA_IRQS=n
|
CONFIG_LM_DISABLE_GPIOA_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOB_IRQS=n
|
CONFIG_LM_DISABLE_GPIOB_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOC_IRQS=n
|
CONFIG_LM_DISABLE_GPIOC_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOD_IRQS=n
|
CONFIG_LM_DISABLE_GPIOD_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOE_IRQS=n
|
CONFIG_LM_DISABLE_GPIOE_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOF_IRQS=n
|
CONFIG_LM_DISABLE_GPIOF_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOG_IRQS=n
|
CONFIG_LM_DISABLE_GPIOG_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOH_IRQS=n
|
CONFIG_LM_DISABLE_GPIOH_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOJ_IRQS=y
|
CONFIG_LM_DISABLE_GPIOJ_IRQS=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# LM3S6918 specific serial device driver settings
|
# LM3S6918 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_UART0=y
|
CONFIG_LM_UART0=y
|
||||||
CONFIG_LM3S_UART1=n
|
CONFIG_LM_UART1=n
|
||||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||||
CONFIG_UART1_SERIAL_CONSOLE=n
|
CONFIG_UART1_SERIAL_CONSOLE=n
|
||||||
CONFIG_UART0_TXBUFSIZE=256
|
CONFIG_UART0_TXBUFSIZE=256
|
||||||
@@ -99,16 +99,16 @@ CONFIG_SSI_POLLWAIT=y
|
|||||||
#
|
#
|
||||||
# LM3S6918 specific serial device driver settings
|
# LM3S6918 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_ETHERNET=y
|
CONFIG_LM_ETHERNET=y
|
||||||
CONFIG_LM3S_ETHLEDS=n
|
CONFIG_LM_ETHLEDS=n
|
||||||
CONFIG_LM3S_BOARDMAC=y
|
CONFIG_LM_BOARDMAC=y
|
||||||
CONFIG_LM3S_ETHHDUPLEX=n
|
CONFIG_LM_ETHHDUPLEX=n
|
||||||
CONFIG_LM3S_ETHNOAUTOCRC=n
|
CONFIG_LM_ETHNOAUTOCRC=n
|
||||||
CONFIG_LM3S_ETHNOPAD=n
|
CONFIG_LM_ETHNOPAD=n
|
||||||
CONFIG_LM3S_MULTICAST=n
|
CONFIG_LM_MULTICAST=n
|
||||||
CONFIG_LM3S_PROMISCUOUS=n
|
CONFIG_LM_PROMISCUOUS=n
|
||||||
CONFIG_LM3S_BADCRC=n
|
CONFIG_LM_BADCRC=n
|
||||||
CONFIG_LM3S_DUMPPACKET=n
|
CONFIG_LM_DUMPPACKET=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# General build options
|
# General build options
|
||||||
|
|||||||
@@ -58,21 +58,21 @@ CONFIG_ARCH_CALIBRATION=n
|
|||||||
# Disable support for interrupts on GPIOJ which does not
|
# Disable support for interrupts on GPIOJ which does not
|
||||||
# exist on the LM3S6918. Additional interrupt support can be
|
# exist on the LM3S6918. Additional interrupt support can be
|
||||||
# disabled if desired to reduce memory footprint.
|
# disabled if desired to reduce memory footprint.
|
||||||
CONFIG_LM3S_DISABLE_GPIOA_IRQS=n
|
CONFIG_LM_DISABLE_GPIOA_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOB_IRQS=n
|
CONFIG_LM_DISABLE_GPIOB_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOC_IRQS=n
|
CONFIG_LM_DISABLE_GPIOC_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOD_IRQS=n
|
CONFIG_LM_DISABLE_GPIOD_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOE_IRQS=n
|
CONFIG_LM_DISABLE_GPIOE_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOF_IRQS=n
|
CONFIG_LM_DISABLE_GPIOF_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOG_IRQS=n
|
CONFIG_LM_DISABLE_GPIOG_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOH_IRQS=n
|
CONFIG_LM_DISABLE_GPIOH_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOJ_IRQS=y
|
CONFIG_LM_DISABLE_GPIOJ_IRQS=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# LM3S6918 specific serial device driver settings
|
# LM3S6918 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_UART0=y
|
CONFIG_LM_UART0=y
|
||||||
CONFIG_LM3S_UART1=n
|
CONFIG_LM_UART1=n
|
||||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||||
CONFIG_UART1_SERIAL_CONSOLE=n
|
CONFIG_UART1_SERIAL_CONSOLE=n
|
||||||
CONFIG_UART0_TXBUFSIZE=256
|
CONFIG_UART0_TXBUFSIZE=256
|
||||||
@@ -99,16 +99,16 @@ CONFIG_SSI_POLLWAIT=y
|
|||||||
#
|
#
|
||||||
# LM3S6918 specific serial device driver settings
|
# LM3S6918 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_ETHERNET=y
|
CONFIG_LM_ETHERNET=y
|
||||||
CONFIG_LM3S_ETHLEDS=n
|
CONFIG_LM_ETHLEDS=n
|
||||||
CONFIG_LM3S_BOARDMAC=y
|
CONFIG_LM_BOARDMAC=y
|
||||||
CONFIG_LM3S_ETHHDUPLEX=n
|
CONFIG_LM_ETHHDUPLEX=n
|
||||||
CONFIG_LM3S_ETHNOAUTOCRC=n
|
CONFIG_LM_ETHNOAUTOCRC=n
|
||||||
CONFIG_LM3S_ETHNOPAD=n
|
CONFIG_LM_ETHNOPAD=n
|
||||||
CONFIG_LM3S_MULTICAST=n
|
CONFIG_LM_MULTICAST=n
|
||||||
CONFIG_LM3S_PROMISCUOUS=n
|
CONFIG_LM_PROMISCUOUS=n
|
||||||
CONFIG_LM3S_BADCRC=n
|
CONFIG_LM_BADCRC=n
|
||||||
CONFIG_LM3S_DUMPPACKET=n
|
CONFIG_LM_DUMPPACKET=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# General build options
|
# General build options
|
||||||
|
|||||||
@@ -58,21 +58,21 @@ CONFIG_ARCH_CALIBRATION=n
|
|||||||
# Disable support for interrupts on GPIOJ which does not
|
# Disable support for interrupts on GPIOJ which does not
|
||||||
# exist on the LM3S6918. Additional interrupt support can be
|
# exist on the LM3S6918. Additional interrupt support can be
|
||||||
# disabled if desired to reduce memory footprint.
|
# disabled if desired to reduce memory footprint.
|
||||||
CONFIG_LM3S_DISABLE_GPIOA_IRQS=n
|
CONFIG_LM_DISABLE_GPIOA_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOB_IRQS=n
|
CONFIG_LM_DISABLE_GPIOB_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOC_IRQS=n
|
CONFIG_LM_DISABLE_GPIOC_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOD_IRQS=n
|
CONFIG_LM_DISABLE_GPIOD_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOE_IRQS=n
|
CONFIG_LM_DISABLE_GPIOE_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOF_IRQS=n
|
CONFIG_LM_DISABLE_GPIOF_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOG_IRQS=n
|
CONFIG_LM_DISABLE_GPIOG_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOH_IRQS=n
|
CONFIG_LM_DISABLE_GPIOH_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOJ_IRQS=y
|
CONFIG_LM_DISABLE_GPIOJ_IRQS=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# LM3S6918 specific serial device driver settings
|
# LM3S6918 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_UART0=y
|
CONFIG_LM_UART0=y
|
||||||
CONFIG_LM3S_UART1=n
|
CONFIG_LM_UART1=n
|
||||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||||
CONFIG_UART1_SERIAL_CONSOLE=n
|
CONFIG_UART1_SERIAL_CONSOLE=n
|
||||||
CONFIG_UART0_TXBUFSIZE=256
|
CONFIG_UART0_TXBUFSIZE=256
|
||||||
@@ -99,16 +99,16 @@ CONFIG_SSI_POLLWAIT=y
|
|||||||
#
|
#
|
||||||
# LM3S6918 specific serial device driver settings
|
# LM3S6918 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_ETHERNET=n
|
CONFIG_LM_ETHERNET=n
|
||||||
CONFIG_LM3S_ETHLEDS=n
|
CONFIG_LM_ETHLEDS=n
|
||||||
CONFIG_LM3S_BOARDMAC=y
|
CONFIG_LM_BOARDMAC=y
|
||||||
CONFIG_LM3S_ETHHDUPLEX=n
|
CONFIG_LM_ETHHDUPLEX=n
|
||||||
CONFIG_LM3S_ETHNOAUTOCRC=n
|
CONFIG_LM_ETHNOAUTOCRC=n
|
||||||
CONFIG_LM3S_ETHNOPAD=n
|
CONFIG_LM_ETHNOPAD=n
|
||||||
CONFIG_LM3S_MULTICAST=n
|
CONFIG_LM_MULTICAST=n
|
||||||
CONFIG_LM3S_PROMISCUOUS=n
|
CONFIG_LM_PROMISCUOUS=n
|
||||||
CONFIG_LM3S_BADCRC=n
|
CONFIG_LM_BADCRC=n
|
||||||
CONFIG_LM3S_DUMPPACKET=n
|
CONFIG_LM_DUMPPACKET=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# General build options
|
# General build options
|
||||||
|
|||||||
@@ -58,21 +58,21 @@ CONFIG_ARCH_CALIBRATION=n
|
|||||||
# Disable support for interrupts on GPIOJ which does not
|
# Disable support for interrupts on GPIOJ which does not
|
||||||
# exist on the LM3S6918. Additional interrupt support can be
|
# exist on the LM3S6918. Additional interrupt support can be
|
||||||
# disabled if desired to reduce memory footprint.
|
# disabled if desired to reduce memory footprint.
|
||||||
CONFIG_LM3S_DISABLE_GPIOA_IRQS=n
|
CONFIG_LM_DISABLE_GPIOA_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOB_IRQS=n
|
CONFIG_LM_DISABLE_GPIOB_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOC_IRQS=n
|
CONFIG_LM_DISABLE_GPIOC_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOD_IRQS=n
|
CONFIG_LM_DISABLE_GPIOD_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOE_IRQS=n
|
CONFIG_LM_DISABLE_GPIOE_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOF_IRQS=n
|
CONFIG_LM_DISABLE_GPIOF_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOG_IRQS=n
|
CONFIG_LM_DISABLE_GPIOG_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOH_IRQS=n
|
CONFIG_LM_DISABLE_GPIOH_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOJ_IRQS=y
|
CONFIG_LM_DISABLE_GPIOJ_IRQS=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# LM3S6918 specific serial device driver settings
|
# LM3S6918 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_UART0=y
|
CONFIG_LM_UART0=y
|
||||||
CONFIG_LM3S_UART1=n
|
CONFIG_LM_UART1=n
|
||||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||||
CONFIG_UART1_SERIAL_CONSOLE=n
|
CONFIG_UART1_SERIAL_CONSOLE=n
|
||||||
CONFIG_UART0_TXBUFSIZE=256
|
CONFIG_UART0_TXBUFSIZE=256
|
||||||
@@ -99,16 +99,16 @@ CONFIG_SSI_POLLWAIT=y
|
|||||||
#
|
#
|
||||||
# LM3S6918 specific serial device driver settings
|
# LM3S6918 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_ETHERNET=n
|
CONFIG_LM_ETHERNET=n
|
||||||
CONFIG_LM3S_ETHLEDS=n
|
CONFIG_LM_ETHLEDS=n
|
||||||
CONFIG_LM3S_BOARDMAC=y
|
CONFIG_LM_BOARDMAC=y
|
||||||
CONFIG_LM3S_ETHHDUPLEX=n
|
CONFIG_LM_ETHHDUPLEX=n
|
||||||
CONFIG_LM3S_ETHNOAUTOCRC=n
|
CONFIG_LM_ETHNOAUTOCRC=n
|
||||||
CONFIG_LM3S_ETHNOPAD=n
|
CONFIG_LM_ETHNOPAD=n
|
||||||
CONFIG_LM3S_MULTICAST=n
|
CONFIG_LM_MULTICAST=n
|
||||||
CONFIG_LM3S_PROMISCUOUS=n
|
CONFIG_LM_PROMISCUOUS=n
|
||||||
CONFIG_LM3S_BADCRC=n
|
CONFIG_LM_BADCRC=n
|
||||||
CONFIG_LM3S_DUMPPACKET=n
|
CONFIG_LM_DUMPPACKET=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# General build options
|
# General build options
|
||||||
|
|||||||
@@ -81,14 +81,14 @@
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm3s_ssiinitialize
|
* Name: lm_ssiinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the Eagle100 board.
|
* Called to configure SPI chip select GPIO pins for the Eagle100 board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void weak_function lm3s_ssiinitialize(void);
|
extern void weak_function lm_ssiinitialize(void);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: up_ledinit
|
* Name: up_ledinit
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm3s_boardinitialize
|
* Name: lm_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All LM3S architectures must provide the following entry point. This entry point
|
* All LM3S architectures must provide the following entry point. This entry point
|
||||||
@@ -68,18 +68,18 @@
|
|||||||
* and mapped but before any devices have been initialized.
|
* and mapped but before any devices have been initialized.
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void lm3s_boardinitialize(void)
|
void lm_boardinitialize(void)
|
||||||
{
|
{
|
||||||
/* Configure SPI chip selects if 1) SSI is not disabled, and 2) the weak function
|
/* Configure SPI chip selects if 1) SSI is not disabled, and 2) the weak function
|
||||||
* lm3s_ssiinitialize() has been brought into the link.
|
* lm_ssiinitialize() has been brought into the link.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* The Eagle100 microSD CS is on SSI0 */
|
/* The Eagle100 microSD CS is on SSI0 */
|
||||||
|
|
||||||
#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */
|
#if !defined(CONFIG_SSI0_DISABLE) /* || !defined(CONFIG_SSI1_DISABLE) */
|
||||||
if (lm3s_ssiinitialize)
|
if (lm_ssiinitialize)
|
||||||
{
|
{
|
||||||
lm3s_ssiinitialize();
|
lm_ssiinitialize();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -63,17 +63,17 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm3s_ethernetmac
|
* Name: lm_ethernetmac
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* For the Ethernet Eval Kits, the MAC address will be stored in the non-volatile
|
* For the Ethernet Eval Kits, the MAC address will be stored in the non-volatile
|
||||||
* USER0 and USER1 registers. If CONFIG_LM3S_BOARDMAC is defined, this function
|
* USER0 and USER1 registers. If CONFIG_LM_BOARDMAC is defined, this function
|
||||||
* will obtain the MAC address from these registers.
|
* will obtain the MAC address from these registers.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_LM3S_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
void lm3s_ethernetmac(struct ether_addr *ethaddr)
|
void lm_ethernetmac(struct ether_addr *ethaddr)
|
||||||
{
|
{
|
||||||
uint32_t user0;
|
uint32_t user0;
|
||||||
uint32_t user1;
|
uint32_t user1;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
/* Dump GPIO registers */
|
/* Dump GPIO registers */
|
||||||
|
|
||||||
#ifdef LED_DEBUG
|
#ifdef LED_DEBUG
|
||||||
# define led_dumpgpio(m) lm3s_dumpgpio(LED_GPIO, m)
|
# define led_dumpgpio(m) lm_dumpgpio(LED_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define led_dumpgpio(m)
|
# define led_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
@@ -106,9 +106,9 @@ void up_ledinit(void)
|
|||||||
|
|
||||||
/* Configure Port E, Bit 1 as an output, initial value=OFF */
|
/* Configure Port E, Bit 1 as an output, initial value=OFF */
|
||||||
|
|
||||||
led_dumpgpio("up_ledinit before lm3s_configgpio()");
|
led_dumpgpio("up_ledinit before lm_configgpio()");
|
||||||
lm3s_configgpio(LED_GPIO);
|
lm_configgpio(LED_GPIO);
|
||||||
led_dumpgpio("up_ledinit after lm3s_configgpio()");
|
led_dumpgpio("up_ledinit after lm_configgpio()");
|
||||||
g_nest = 0;
|
g_nest = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,9 +132,9 @@ void up_ledon(int led)
|
|||||||
g_nest++;
|
g_nest++;
|
||||||
case LED_IRQSENABLED:
|
case LED_IRQSENABLED:
|
||||||
case LED_STACKCREATED:
|
case LED_STACKCREATED:
|
||||||
led_dumpgpio("up_ledon: before lm3s_gpiowrite()");
|
led_dumpgpio("up_ledon: before lm_gpiowrite()");
|
||||||
lm3s_gpiowrite(LED_GPIO, false);
|
lm_gpiowrite(LED_GPIO, false);
|
||||||
led_dumpgpio("up_ledon: after lm3s_gpiowrite()");
|
led_dumpgpio("up_ledon: after lm_gpiowrite()");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -160,9 +160,9 @@ void up_ledoff(int led)
|
|||||||
case LED_PANIC:
|
case LED_PANIC:
|
||||||
if (--g_nest <= 0)
|
if (--g_nest <= 0)
|
||||||
{
|
{
|
||||||
led_dumpgpio("up_ledoff: before lm3s_gpiowrite()");
|
led_dumpgpio("up_ledoff: before lm_gpiowrite()");
|
||||||
lm3s_gpiowrite(LED_GPIO, true);
|
lm_gpiowrite(LED_GPIO, true);
|
||||||
led_dumpgpio("up_ledoff: after lm3s_gpiowrite()");
|
led_dumpgpio("up_ledoff: after lm_gpiowrite()");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
/* Dump GPIO registers */
|
/* Dump GPIO registers */
|
||||||
|
|
||||||
#ifdef SSI_VERBOSE
|
#ifdef SSI_VERBOSE
|
||||||
# define ssi_dumpgpio(m) lm3s_dumpgpio(SDCCS_GPIO, m)
|
# define ssi_dumpgpio(m) lm_dumpgpio(SDCCS_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define ssi_dumpgpio(m)
|
# define ssi_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
@@ -95,30 +95,30 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm3s_ssiinitialize
|
* Name: lm_ssiinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the Eagle100 board.
|
* Called to configure SPI chip select GPIO pins for the Eagle100 board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void weak_function lm3s_ssiinitialize(void)
|
void weak_function lm_ssiinitialize(void)
|
||||||
{
|
{
|
||||||
/* Configure the SPI-based microSD CS GPIO */
|
/* Configure the SPI-based microSD CS GPIO */
|
||||||
|
|
||||||
ssi_dumpgpio("lm3s_ssiinitialize() before lm3s_configgpio()");
|
ssi_dumpgpio("lm_ssiinitialize() before lm_configgpio()");
|
||||||
lm3s_configgpio(SDCCS_GPIO);
|
lm_configgpio(SDCCS_GPIO);
|
||||||
ssi_dumpgpio("lm3s_ssiinitialize() after lm3s_configgpio()");
|
ssi_dumpgpio("lm_ssiinitialize() after lm_configgpio()");
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* The external functions, lm3s_spiselect and lm3s_spistatus must be provided
|
* The external functions, lm_spiselect and lm_spistatus must be provided
|
||||||
* by board-specific logic. The are implementations of the select and status
|
* by board-specific logic. The are implementations of the select and status
|
||||||
* methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi.h).
|
* methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi.h).
|
||||||
* All othermethods (including up_spiinitialize()) are provided by common
|
* All othermethods (including up_spiinitialize()) are provided by common
|
||||||
* logic. To use this common SPI logic on your board:
|
* logic. To use this common SPI logic on your board:
|
||||||
*
|
*
|
||||||
* 1. Provide lm3s_spiselect() and lm3s_spistatus() functions in your
|
* 1. Provide lm_spiselect() and lm_spistatus() functions in your
|
||||||
* board-specific logic. This function will perform chip selection and
|
* board-specific logic. This function will perform chip selection and
|
||||||
* status operations using GPIOs in the way your board is configured.
|
* status operations using GPIOs in the way your board is configured.
|
||||||
* 2. Add a call to up_spiinitialize() in your low level initialization
|
* 2. Add a call to up_spiinitialize() in your low level initialization
|
||||||
@@ -130,20 +130,20 @@ void weak_function lm3s_ssiinitialize(void)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void lm3s_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
void lm_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||||
{
|
{
|
||||||
ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
ssidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
|
||||||
if (devid == SPIDEV_MMCSD)
|
if (devid == SPIDEV_MMCSD)
|
||||||
{
|
{
|
||||||
/* Assert the CS pin to the card */
|
/* Assert the CS pin to the card */
|
||||||
|
|
||||||
ssi_dumpgpio("lm3s_spiselect() before lm3s_gpiowrite()");
|
ssi_dumpgpio("lm_spiselect() before lm_gpiowrite()");
|
||||||
lm3s_gpiowrite(SDCCS_GPIO, !selected);
|
lm_gpiowrite(SDCCS_GPIO, !selected);
|
||||||
ssi_dumpgpio("lm3s_spiselect() after lm3s_gpiowrite()");
|
ssi_dumpgpio("lm_spiselect() after lm_gpiowrite()");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t lm3s_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
uint8_t lm_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||||
{
|
{
|
||||||
ssidbg("Returning SPI_STATUS_PRESENT\n");
|
ssidbg("Returning SPI_STATUS_PRESENT\n");
|
||||||
return SPI_STATUS_PRESENT;
|
return SPI_STATUS_PRESENT;
|
||||||
|
|||||||
@@ -58,21 +58,21 @@ CONFIG_ARCH_CALIBRATION=n
|
|||||||
# Disable support for interrupts on GPIOJ which does not
|
# Disable support for interrupts on GPIOJ which does not
|
||||||
# exist on the LM3S6918. Additional interrupt support can be
|
# exist on the LM3S6918. Additional interrupt support can be
|
||||||
# disabled if desired to reduce memory footprint.
|
# disabled if desired to reduce memory footprint.
|
||||||
CONFIG_LM3S_DISABLE_GPIOA_IRQS=n
|
CONFIG_LM_DISABLE_GPIOA_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOB_IRQS=n
|
CONFIG_LM_DISABLE_GPIOB_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOC_IRQS=n
|
CONFIG_LM_DISABLE_GPIOC_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOD_IRQS=n
|
CONFIG_LM_DISABLE_GPIOD_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOE_IRQS=n
|
CONFIG_LM_DISABLE_GPIOE_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOF_IRQS=n
|
CONFIG_LM_DISABLE_GPIOF_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOG_IRQS=n
|
CONFIG_LM_DISABLE_GPIOG_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOH_IRQS=n
|
CONFIG_LM_DISABLE_GPIOH_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOJ_IRQS=y
|
CONFIG_LM_DISABLE_GPIOJ_IRQS=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# LM3S6918 specific serial device driver settings
|
# LM3S6918 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_UART0=y
|
CONFIG_LM_UART0=y
|
||||||
CONFIG_LM3S_UART1=n
|
CONFIG_LM_UART1=n
|
||||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||||
CONFIG_UART1_SERIAL_CONSOLE=n
|
CONFIG_UART1_SERIAL_CONSOLE=n
|
||||||
CONFIG_UART0_TXBUFSIZE=256
|
CONFIG_UART0_TXBUFSIZE=256
|
||||||
@@ -99,16 +99,16 @@ CONFIG_SSI_POLLWAIT=y
|
|||||||
#
|
#
|
||||||
# LM3S6918 specific serial device driver settings
|
# LM3S6918 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_ETHERNET=y
|
CONFIG_LM_ETHERNET=y
|
||||||
CONFIG_LM3S_ETHLEDS=n
|
CONFIG_LM_ETHLEDS=n
|
||||||
CONFIG_LM3S_BOARDMAC=y
|
CONFIG_LM_BOARDMAC=y
|
||||||
CONFIG_LM3S_ETHHDUPLEX=n
|
CONFIG_LM_ETHHDUPLEX=n
|
||||||
CONFIG_LM3S_ETHNOAUTOCRC=n
|
CONFIG_LM_ETHNOAUTOCRC=n
|
||||||
CONFIG_LM3S_ETHNOPAD=n
|
CONFIG_LM_ETHNOPAD=n
|
||||||
CONFIG_LM3S_MULTICAST=n
|
CONFIG_LM_MULTICAST=n
|
||||||
CONFIG_LM3S_PROMISCUOUS=n
|
CONFIG_LM_PROMISCUOUS=n
|
||||||
CONFIG_LM3S_BADCRC=n
|
CONFIG_LM_BADCRC=n
|
||||||
CONFIG_LM3S_DUMPPACKET=n
|
CONFIG_LM_DUMPPACKET=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# General build options
|
# General build options
|
||||||
|
|||||||
@@ -102,12 +102,12 @@ GNU Toolchain Options
|
|||||||
the CodeSourcery or devkitARM, you simply need to add one of the following
|
the CodeSourcery or devkitARM, you simply need to add one of the following
|
||||||
configuration options to your .config (or defconfig) file:
|
configuration options to your .config (or defconfig) file:
|
||||||
|
|
||||||
CONFIG_LM3S_CODESOURCERYW=y : CodeSourcery under Windows
|
CONFIG_LM_CODESOURCERYW=y : CodeSourcery under Windows
|
||||||
CONFIG_LM3S_CODESOURCERYL=y : CodeSourcery under Linux
|
CONFIG_LM_CODESOURCERYL=y : CodeSourcery under Linux
|
||||||
CONFIG_LM3S_DEVKITARM=y : devkitARM under Windows
|
CONFIG_LM_DEVKITARM=y : devkitARM under Windows
|
||||||
CONFIG_LM3S_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default)
|
CONFIG_LM_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default)
|
||||||
|
|
||||||
If you are not using CONFIG_LM3S_BUILDROOT, then you may also have to modify
|
If you are not using CONFIG_LM_BUILDROOT, then you may also have to modify
|
||||||
the PATH in the setenv.h file if your make cannot find the tools.
|
the PATH in the setenv.h file if your make cannot find the tools.
|
||||||
|
|
||||||
NOTE: the CodeSourcery (for Windows) and devkitARM are Windows native toolchains.
|
NOTE: the CodeSourcery (for Windows) and devkitARM are Windows native toolchains.
|
||||||
@@ -352,15 +352,15 @@ Stellaris EKK-LM3S9B96 Evaluation Kit Configuration Options
|
|||||||
Additional interrupt support can be disabled if desired to reduce memory
|
Additional interrupt support can be disabled if desired to reduce memory
|
||||||
footprint.
|
footprint.
|
||||||
|
|
||||||
CONFIG_LM3S_DISABLE_GPIOA_IRQS=n
|
CONFIG_LM_DISABLE_GPIOA_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOB_IRQS=n
|
CONFIG_LM_DISABLE_GPIOB_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOC_IRQS=n
|
CONFIG_LM_DISABLE_GPIOC_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOD_IRQS=n
|
CONFIG_LM_DISABLE_GPIOD_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOE_IRQS=n
|
CONFIG_LM_DISABLE_GPIOE_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOF_IRQS=n
|
CONFIG_LM_DISABLE_GPIOF_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOG_IRQS=n
|
CONFIG_LM_DISABLE_GPIOG_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOH_IRQS=n
|
CONFIG_LM_DISABLE_GPIOH_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOJ_IRQS=y
|
CONFIG_LM_DISABLE_GPIOJ_IRQS=y
|
||||||
|
|
||||||
LM3S6818 specific device driver settings
|
LM3S6818 specific device driver settings
|
||||||
|
|
||||||
@@ -385,18 +385,18 @@ Stellaris EKK-LM3S9B96 Evaluation Kit Configuration Options
|
|||||||
value is large, then larger values of this setting may cause
|
value is large, then larger values of this setting may cause
|
||||||
Rx FIFO overrun errors. Default: half of the Tx FIFO size (4).
|
Rx FIFO overrun errors. Default: half of the Tx FIFO size (4).
|
||||||
|
|
||||||
CONFIG_LM3S_ETHERNET - This must be set (along with CONFIG_NET)
|
CONFIG_LM_ETHERNET - This must be set (along with CONFIG_NET)
|
||||||
to build the LM3S Ethernet driver
|
to build the LM3S Ethernet driver
|
||||||
CONFIG_LM3S_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
CONFIG_LM_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
||||||
CONFIG_LM3S_BOARDMAC - If the board-specific logic can provide
|
CONFIG_LM_BOARDMAC - If the board-specific logic can provide
|
||||||
a MAC address (via lm_ethernetmac()), then this should be selected.
|
a MAC address (via lm_ethernetmac()), then this should be selected.
|
||||||
CONFIG_LM3S_ETHHDUPLEX - Set to force half duplex operation
|
CONFIG_LM_ETHHDUPLEX - Set to force half duplex operation
|
||||||
CONFIG_LM3S_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
CONFIG_LM_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
||||||
CONFIG_LM3S_ETHNOPAD - Set to suppress Tx padding
|
CONFIG_LM_ETHNOPAD - Set to suppress Tx padding
|
||||||
CONFIG_LM3S_MULTICAST - Set to enable multicast frames
|
CONFIG_LM_MULTICAST - Set to enable multicast frames
|
||||||
CONFIG_LM3S_PROMISCUOUS - Set to enable promiscuous mode
|
CONFIG_LM_PROMISCUOUS - Set to enable promiscuous mode
|
||||||
CONFIG_LM3S_BADCRC - Set to enable bad CRC rejection.
|
CONFIG_LM_BADCRC - Set to enable bad CRC rejection.
|
||||||
CONFIG_LM3S_DUMPPACKET - Dump each packet received/sent to the console.
|
CONFIG_LM_DUMPPACKET - Dump each packet received/sent to the console.
|
||||||
|
|
||||||
Configurations
|
Configurations
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm3s_boardinitialize
|
* Name: lm_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All LM3S architectures must provide the following entry point. This entry point
|
* All LM3S architectures must provide the following entry point. This entry point
|
||||||
@@ -122,21 +122,21 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void lm3s_boardinitialize(void);
|
extern void lm_boardinitialize(void);
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm3s_ethernetmac
|
* Name: lm_ethernetmac
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* For the Ethernet Eval Kits, the MAC address will be stored in the non-volatile
|
* For the Ethernet Eval Kits, the MAC address will be stored in the non-volatile
|
||||||
* USER0 and USER1 registers. If CONFIG_LM3S_BOARDMAC is defined, this function
|
* USER0 and USER1 registers. If CONFIG_LM_BOARDMAC is defined, this function
|
||||||
* will obtain the MAC address from these registers.
|
* will obtain the MAC address from these registers.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_LM3S_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
struct ether_addr;
|
struct ether_addr;
|
||||||
extern void lm3s_ethernetmac(struct ether_addr *ethaddr);
|
extern void lm_ethernetmac(struct ether_addr *ethaddr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|||||||
@@ -57,32 +57,32 @@ CONFIG_ARCH_CALIBRATION=n
|
|||||||
#
|
#
|
||||||
# Identify toolchain and linker options
|
# Identify toolchain and linker options
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_CODESOURCERYW=n
|
CONFIG_LM_CODESOURCERYW=n
|
||||||
CONFIG_LM3S_CODESOURCERYL=n
|
CONFIG_LM_CODESOURCERYL=n
|
||||||
CONFIG_LM3S_DEVKITARM=n
|
CONFIG_LM_DEVKITARM=n
|
||||||
CONFIG_LM3S_BUILDROOT=y
|
CONFIG_LM_BUILDROOT=y
|
||||||
CONFIG_LM3S_DFU=y
|
CONFIG_LM_DFU=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# Disable support for interrupts on GPIOH and GPIOJ which do not
|
# Disable support for interrupts on GPIOH and GPIOJ which do not
|
||||||
# exist on the LM3S6B96. Additional interrupt support can be
|
# exist on the LM3S6B96. Additional interrupt support can be
|
||||||
# disabled if desired to reduce memory footprint.
|
# disabled if desired to reduce memory footprint.
|
||||||
CONFIG_LM3S_DISABLE_GPIOA_IRQS=n
|
CONFIG_LM_DISABLE_GPIOA_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOB_IRQS=n
|
CONFIG_LM_DISABLE_GPIOB_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOC_IRQS=n
|
CONFIG_LM_DISABLE_GPIOC_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOD_IRQS=n
|
CONFIG_LM_DISABLE_GPIOD_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOE_IRQS=n
|
CONFIG_LM_DISABLE_GPIOE_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOF_IRQS=n
|
CONFIG_LM_DISABLE_GPIOF_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOG_IRQS=n
|
CONFIG_LM_DISABLE_GPIOG_IRQS=n
|
||||||
CONFIG_LM3S_DISABLE_GPIOH_IRQS=y
|
CONFIG_LM_DISABLE_GPIOH_IRQS=y
|
||||||
CONFIG_LM3S_DISABLE_GPIOJ_IRQS=y
|
CONFIG_LM_DISABLE_GPIOJ_IRQS=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# LM3S6B96 specific serial device driver settings
|
# LM3S6B96 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_UART0=y
|
CONFIG_LM_UART0=y
|
||||||
CONFIG_LM3S_UART1=n
|
CONFIG_LM_UART1=n
|
||||||
CONFIG_LM3S_UART2=n
|
CONFIG_LM_UART2=n
|
||||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||||
CONFIG_UART1_SERIAL_CONSOLE=n
|
CONFIG_UART1_SERIAL_CONSOLE=n
|
||||||
CONFIG_UART2_SERIAL_CONSOLE=n
|
CONFIG_UART2_SERIAL_CONSOLE=n
|
||||||
@@ -116,16 +116,16 @@ CONFIG_SSI_POLLWAIT=y
|
|||||||
#
|
#
|
||||||
# LM3S6B96 specific serial device driver settings
|
# LM3S6B96 specific serial device driver settings
|
||||||
#
|
#
|
||||||
CONFIG_LM3S_ETHERNET=y
|
CONFIG_LM_ETHERNET=y
|
||||||
CONFIG_LM3S_ETHLEDS=n
|
CONFIG_LM_ETHLEDS=n
|
||||||
CONFIG_LM3S_BOARDMAC=n
|
CONFIG_LM_BOARDMAC=n
|
||||||
CONFIG_LM3S_ETHHDUPLEX=n
|
CONFIG_LM_ETHHDUPLEX=n
|
||||||
CONFIG_LM3S_ETHNOAUTOCRC=n
|
CONFIG_LM_ETHNOAUTOCRC=n
|
||||||
CONFIG_LM3S_ETHNOPAD=n
|
CONFIG_LM_ETHNOPAD=n
|
||||||
CONFIG_LM3S_MULTICAST=n
|
CONFIG_LM_MULTICAST=n
|
||||||
CONFIG_LM3S_PROMISCUOUS=n
|
CONFIG_LM_PROMISCUOUS=n
|
||||||
CONFIG_LM3S_BADCRC=n
|
CONFIG_LM_BADCRC=n
|
||||||
CONFIG_LM3S_DUMPPACKET=n
|
CONFIG_LM_DUMPPACKET=n
|
||||||
|
|
||||||
#
|
#
|
||||||
# General build options
|
# General build options
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user