mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
All files and functions beginning with lm_ changed to tiva_
This commit is contained in:
@@ -334,7 +334,7 @@ Eagle100-specific Configuration Options
|
|||||||
to build the Stellaris Ethernet driver
|
to build the Stellaris Ethernet driver
|
||||||
CONFIG_LM_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
CONFIG_LM_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
||||||
CONFIG_LM_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 tiva_ethernetmac()), then this should be selected.
|
||||||
CONFIG_LM_ETHHDUPLEX - Set to force half duplex operation
|
CONFIG_LM_ETHHDUPLEX - Set to force half duplex operation
|
||||||
CONFIG_LM_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
CONFIG_LM_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
||||||
CONFIG_LM_ETHNOPAD - Set to suppress Tx padding
|
CONFIG_LM_ETHNOPAD - Set to suppress Tx padding
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_boardinitialize
|
* Name: tiva_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All Stellaris architectures must provide the following entry point. This entry
|
* All Stellaris architectures must provide the following entry point. This entry
|
||||||
@@ -121,10 +121,10 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void lm_boardinitialize(void);
|
void tiva_boardinitialize(void);
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_ethernetmac
|
* Name: tiva_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
|
||||||
@@ -135,7 +135,7 @@ extern void lm_boardinitialize(void);
|
|||||||
|
|
||||||
#ifdef CONFIG_LM_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
struct ether_addr;
|
struct ether_addr;
|
||||||
extern void lm_ethernetmac(struct ether_addr *ethaddr);
|
void tiva_ethernetmac(struct ether_addr *ethaddr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
#include <nuttx/compiler.h>
|
#include <nuttx/compiler.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void weak_function lm_ssiinitialize(void);
|
void weak_function lm_ssiinitialize(void);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: board_led_initialize
|
* Name: board_led_initialize
|
||||||
@@ -99,7 +99,7 @@ extern void weak_function lm_ssiinitialize(void);
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
extern void board_led_initialize(void);
|
void board_led_initialize(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_boardinitialize
|
* Name: tiva_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All Stellaris architectures must provide the following entry point. This entry
|
* All Stellaris architectures must provide the following entry point. This entry
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void lm_boardinitialize(void)
|
void tiva_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
|
||||||
* lm_ssiinitialize() has been brought into the link.
|
* lm_ssiinitialize() has been brought into the link.
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_ethernetmac
|
* Name: tiva_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
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_LM_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
void lm_ethernetmac(struct ether_addr *ethaddr)
|
void tiva_ethernetmac(struct ether_addr *ethaddr)
|
||||||
{
|
{
|
||||||
uint32_t user0;
|
uint32_t user0;
|
||||||
uint32_t user1;
|
uint32_t user1;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "eagle100_internal.h"
|
#include "eagle100_internal.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
/* Dump GPIO registers */
|
/* Dump GPIO registers */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LEDS
|
#ifdef CONFIG_DEBUG_LEDS
|
||||||
# define led_dumpgpio(m) lm_dumpgpio(LED_GPIO, m)
|
# define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define led_dumpgpio(m)
|
# define led_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
@@ -104,9 +104,9 @@ void board_led_initialize(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("board_led_initialize before lm_configgpio()");
|
led_dumpgpio("board_led_initialize before tiva_configgpio()");
|
||||||
lm_configgpio(LED_GPIO);
|
tiva_configgpio(LED_GPIO);
|
||||||
led_dumpgpio("board_led_initialize after lm_configgpio()");
|
led_dumpgpio("board_led_initialize after tiva_configgpio()");
|
||||||
g_nest = 0;
|
g_nest = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,9 +130,9 @@ void board_led_on(int led)
|
|||||||
g_nest++;
|
g_nest++;
|
||||||
case LED_IRQSENABLED:
|
case LED_IRQSENABLED:
|
||||||
case LED_STACKCREATED:
|
case LED_STACKCREATED:
|
||||||
led_dumpgpio("board_led_on: before lm_gpiowrite()");
|
led_dumpgpio("board_led_on: before tiva_gpiowrite()");
|
||||||
lm_gpiowrite(LED_GPIO, false);
|
tiva_gpiowrite(LED_GPIO, false);
|
||||||
led_dumpgpio("board_led_on: after lm_gpiowrite()");
|
led_dumpgpio("board_led_on: after tiva_gpiowrite()");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -158,9 +158,9 @@ void board_led_off(int led)
|
|||||||
case LED_PANIC:
|
case LED_PANIC:
|
||||||
if (--g_nest <= 0)
|
if (--g_nest <= 0)
|
||||||
{
|
{
|
||||||
led_dumpgpio("board_led_off: before lm_gpiowrite()");
|
led_dumpgpio("board_led_off: before tiva_gpiowrite()");
|
||||||
lm_gpiowrite(LED_GPIO, true);
|
tiva_gpiowrite(LED_GPIO, true);
|
||||||
led_dumpgpio("board_led_off: after lm_gpiowrite()");
|
led_dumpgpio("board_led_off: after tiva_gpiowrite()");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "eagle100_internal.h"
|
#include "eagle100_internal.h"
|
||||||
|
|
||||||
/* The Eagle100 microSD CS is on SSI0 */
|
/* The Eagle100 microSD CS is on SSI0 */
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
/* Dump GPIO registers */
|
/* Dump GPIO registers */
|
||||||
|
|
||||||
#ifdef SSI_VERBOSE
|
#ifdef SSI_VERBOSE
|
||||||
# define ssi_dumpgpio(m) lm_dumpgpio(SDCCS_GPIO, m)
|
# define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define ssi_dumpgpio(m)
|
# define ssi_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
@@ -106,19 +106,19 @@ void weak_function lm_ssiinitialize(void)
|
|||||||
{
|
{
|
||||||
/* Configure the SPI-based microSD CS GPIO */
|
/* Configure the SPI-based microSD CS GPIO */
|
||||||
|
|
||||||
ssi_dumpgpio("lm_ssiinitialize() before lm_configgpio()");
|
ssi_dumpgpio("lm_ssiinitialize() before tiva_configgpio()");
|
||||||
lm_configgpio(SDCCS_GPIO);
|
tiva_configgpio(SDCCS_GPIO);
|
||||||
ssi_dumpgpio("lm_ssiinitialize() after lm_configgpio()");
|
ssi_dumpgpio("lm_ssiinitialize() after tiva_configgpio()");
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* The external functions, lm_spiselect and lm_spistatus must be provided
|
* The external functions, tiva_spiselect and tiva_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/spi.h).
|
* methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi/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 lm_spiselect() and lm_spistatus() functions in your
|
* 1. Provide tiva_spiselect() and tiva_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 lm_ssiinitialize(void)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void lm_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
void tiva_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("lm_spiselect() before lm_gpiowrite()");
|
ssi_dumpgpio("tiva_spiselect() before tiva_gpiowrite()");
|
||||||
lm_gpiowrite(SDCCS_GPIO, !selected);
|
tiva_gpiowrite(SDCCS_GPIO, !selected);
|
||||||
ssi_dumpgpio("lm_spiselect() after lm_gpiowrite()");
|
ssi_dumpgpio("tiva_spiselect() after tiva_gpiowrite()");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t lm_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
uint8_t tiva_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;
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ IDEs
|
|||||||
on the command line.
|
on the command line.
|
||||||
|
|
||||||
Startup files will probably cause you some headaches. The NuttX startup file
|
Startup files will probably cause you some headaches. The NuttX startup file
|
||||||
is arch/arm/src/lm/lm_vectors.S.
|
is arch/arm/src/tiva/tiva_vectors.S.
|
||||||
|
|
||||||
NuttX EABI "buildroot" Toolchain
|
NuttX EABI "buildroot" Toolchain
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@@ -389,7 +389,7 @@ Stellaris EKK-LM3S9B96 Evaluation Kit Configuration Options
|
|||||||
to build the Stellaris Ethernet driver
|
to build the Stellaris Ethernet driver
|
||||||
CONFIG_LM_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
CONFIG_LM_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
||||||
CONFIG_LM_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 tiva_ethernetmac()), then this should be selected.
|
||||||
CONFIG_LM_ETHHDUPLEX - Set to force half duplex operation
|
CONFIG_LM_ETHHDUPLEX - Set to force half duplex operation
|
||||||
CONFIG_LM_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
CONFIG_LM_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
||||||
CONFIG_LM_ETHNOPAD - Set to suppress Tx padding
|
CONFIG_LM_ETHNOPAD - Set to suppress Tx padding
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_boardinitialize
|
* Name: tiva_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All Stellaris architectures must provide the following entry point. This entry
|
* All Stellaris architectures must provide the following entry point. This entry
|
||||||
@@ -122,10 +122,10 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void lm_boardinitialize(void);
|
void tiva_boardinitialize(void);
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_ethernetmac
|
* Name: tiva_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
|
||||||
@@ -136,7 +136,7 @@ extern void lm_boardinitialize(void);
|
|||||||
|
|
||||||
#ifdef CONFIG_LM_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
struct ether_addr;
|
struct ether_addr;
|
||||||
extern void lm_ethernetmac(struct ether_addr *ethaddr);
|
void tiva_ethernetmac(struct ether_addr *ethaddr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
#include <nuttx/compiler.h>
|
#include <nuttx/compiler.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_boardinitialize
|
* Name: tiva_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All Stellaris architectures must provide the following entry point. This entry
|
* All Stellaris architectures must provide the following entry point. This entry
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void lm_boardinitialize(void)
|
void tiva_boardinitialize(void)
|
||||||
{
|
{
|
||||||
/* Configure chip selects if 1) SSI is not disabled, and 2) the weak function
|
/* Configure chip selects if 1) SSI is not disabled, and 2) the weak function
|
||||||
* lm_ssiinitialize() has been brought into the link.
|
* lm_ssiinitialize() has been brought into the link.
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_ethernetmac
|
* Name: tiva_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
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_LM_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
void lm_ethernetmac(struct ether_addr *ethaddr)
|
void tiva_ethernetmac(struct ether_addr *ethaddr)
|
||||||
{
|
{
|
||||||
uint32_t user0;
|
uint32_t user0;
|
||||||
uint32_t user1;
|
uint32_t user1;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "ekklm3s9b96_internal.h"
|
#include "ekklm3s9b96_internal.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
/* Dump GPIO registers */
|
/* Dump GPIO registers */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LEDS
|
#ifdef CONFIG_DEBUG_LEDS
|
||||||
# define led_dumpgpio(m) lm_dumpgpio(LED_GPIO, m)
|
# define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define led_dumpgpio(m)
|
# define led_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
@@ -101,9 +101,9 @@ void board_led_initialize(void)
|
|||||||
|
|
||||||
/* Configure Port D, Bit 0 as an output, initial value=OFF */
|
/* Configure Port D, Bit 0 as an output, initial value=OFF */
|
||||||
|
|
||||||
led_dumpgpio("board_led_initialize before lm_configgpio()");
|
led_dumpgpio("board_led_initialize before tiva_configgpio()");
|
||||||
lm_configgpio(LED_GPIO);
|
tiva_configgpio(LED_GPIO);
|
||||||
led_dumpgpio("board_led_initialize after lm_configgpio()");
|
led_dumpgpio("board_led_initialize after tiva_configgpio()");
|
||||||
g_nest = 0;
|
g_nest = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,9 +127,9 @@ void board_led_on(int led)
|
|||||||
g_nest++;
|
g_nest++;
|
||||||
case LED_IRQSENABLED:
|
case LED_IRQSENABLED:
|
||||||
case LED_STACKCREATED:
|
case LED_STACKCREATED:
|
||||||
led_dumpgpio("board_led_on: before lm_gpiowrite()");
|
led_dumpgpio("board_led_on: before tiva_gpiowrite()");
|
||||||
lm_gpiowrite(LED_GPIO, false);
|
tiva_gpiowrite(LED_GPIO, false);
|
||||||
led_dumpgpio("board_led_on: after lm_gpiowrite()");
|
led_dumpgpio("board_led_on: after tiva_gpiowrite()");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -155,9 +155,9 @@ void board_led_off(int led)
|
|||||||
case LED_PANIC:
|
case LED_PANIC:
|
||||||
if (--g_nest <= 0)
|
if (--g_nest <= 0)
|
||||||
{
|
{
|
||||||
led_dumpgpio("board_led_off: before lm_gpiowrite()");
|
led_dumpgpio("board_led_off: before tiva_gpiowrite()");
|
||||||
lm_gpiowrite(LED_GPIO, true);
|
tiva_gpiowrite(LED_GPIO, true);
|
||||||
led_dumpgpio("board_led_off: after lm_gpiowrite()");
|
led_dumpgpio("board_led_off: after tiva_gpiowrite()");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "ekklm3s9b96_internal.h"
|
#include "ekklm3s9b96_internal.h"
|
||||||
|
|
||||||
#if !defined(CONFIG_SSI0_DISABLE) || !defined(CONFIG_SSI1_DISABLE)
|
#if !defined(CONFIG_SSI0_DISABLE) || !defined(CONFIG_SSI1_DISABLE)
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
#ifdef SSI_VERBOSE
|
#ifdef SSI_VERBOSE
|
||||||
#if 0
|
#if 0
|
||||||
# define ssi_dumpgpio(m) lm_dumpgpio(SDCCS_GPIO, m)
|
# define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m)
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
# define ssi_dumpgpio(m)
|
# define ssi_dumpgpio(m)
|
||||||
@@ -114,13 +114,13 @@ void weak_function lm_ssiinitialize(void)
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* The external functions, lm_spiselect and lm_spistatus must be provided
|
* The external functions, tiva_spiselect and tiva_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/spi.h).
|
* methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi/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 lm_spiselect() and lm_spistatus() functions in your
|
* 1. Provide tiva_spiselect() and tiva_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
|
||||||
@@ -132,28 +132,28 @@ void weak_function lm_ssiinitialize(void)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void lm_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
void tiva_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");
|
||||||
ssi_dumpgpio("lm_spiselect() Entry");
|
ssi_dumpgpio("tiva_spiselect() Entry");
|
||||||
if (devid == SPIDEV_MMCSD)
|
if (devid == SPIDEV_MMCSD)
|
||||||
{
|
{
|
||||||
/* Assert the CS pin to the card */
|
/* Assert the CS pin to the card */
|
||||||
|
|
||||||
lm_gpiowrite(SDCCS_GPIO, !selected);
|
tiva_gpiowrite(SDCCS_GPIO, !selected);
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_NX_LCDDRIVER
|
#ifdef CONFIG_NX_LCDDRIVER
|
||||||
else if (devid == SPIDEV_DISPLAY)
|
else if (devid == SPIDEV_DISPLAY)
|
||||||
{
|
{
|
||||||
/* Assert the CS pin to the display */
|
/* Assert the CS pin to the display */
|
||||||
|
|
||||||
lm_gpiowrite(OLEDCS_GPIO, !selected);
|
tiva_gpiowrite(OLEDCS_GPIO, !selected);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ssi_dumpgpio("lm_spiselect() Exit");
|
ssi_dumpgpio("tiva_spiselect() Exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t lm_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
uint8_t tiva_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;
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ IDEs
|
|||||||
on the command line.
|
on the command line.
|
||||||
|
|
||||||
Startup files will probably cause you some headaches. The NuttX startup file
|
Startup files will probably cause you some headaches. The NuttX startup file
|
||||||
is arch/arm/src/lm/lm_vectors.S.
|
is arch/arm/src/tiva/tiva_vectors.S.
|
||||||
|
|
||||||
NuttX EABI "buildroot" Toolchain
|
NuttX EABI "buildroot" Toolchain
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_boardinitialize
|
* Name: tiva_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All Stellaris architectures must provide the following entry point. This entry
|
* All Stellaris architectures must provide the following entry point. This entry
|
||||||
@@ -123,10 +123,10 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void lm_boardinitialize(void);
|
extern void tiva_boardinitialize(void);
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_ethernetmac
|
* Name: tiva_ethernetmac
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* For the MDL-S2E Reference Design, the MAC address will be stored in the
|
* For the MDL-S2E Reference Design, the MAC address will be stored in the
|
||||||
@@ -137,7 +137,7 @@ extern void lm_boardinitialize(void);
|
|||||||
|
|
||||||
#ifdef CONFIG_LM_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
struct ether_addr;
|
struct ether_addr;
|
||||||
extern void lm_ethernetmac(struct ether_addr *ethaddr);
|
extern void tiva_ethernetmac(struct ether_addr *ethaddr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#include <nuttx/compiler.h>
|
#include <nuttx/compiler.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void weak_function lm_ssiinitialize(void);
|
void weak_function lm_ssiinitialize(void);
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif /* __CONFIGS_LM3S6432_S2E_SRC_LM3S6432S2E_INTERNAL_H */
|
#endif /* __CONFIGS_LM3S6432_S2E_SRC_LM3S6432S2E_INTERNAL_H */
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "lm3s6432s2e_internal.h"
|
#include "lm3s6432s2e_internal.h"
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_boardinitialize
|
* Name: tiva_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All Stellaris architectures must provide the following entry point. This entry
|
* All Stellaris architectures must provide the following entry point. This entry
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void lm_boardinitialize(void)
|
void tiva_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
|
||||||
* lm_ssiinitialize() has been brought into the link.
|
* lm_ssiinitialize() has been brought into the link.
|
||||||
@@ -97,8 +97,8 @@ void lm_boardinitialize(void)
|
|||||||
|
|
||||||
/* Configure serial transciever */
|
/* Configure serial transciever */
|
||||||
|
|
||||||
lm_configgpio(XCVR_INV_GPIO);
|
tiva_configgpio(XCVR_INV_GPIO);
|
||||||
lm_configgpio(XCVR_ENA_GPIO);
|
tiva_configgpio(XCVR_ENA_GPIO);
|
||||||
lm_configgpio(XCVR_ON_GPIO);
|
tiva_configgpio(XCVR_ON_GPIO);
|
||||||
lm_configgpio(XCVR_OFF_GPIO);
|
tiva_configgpio(XCVR_OFF_GPIO);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_ethernetmac
|
* Name: tiva_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
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_LM_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
void lm_ethernetmac(struct ether_addr *ethaddr)
|
void tiva_ethernetmac(struct ether_addr *ethaddr)
|
||||||
{
|
{
|
||||||
uint32_t user0;
|
uint32_t user0;
|
||||||
uint32_t user1;
|
uint32_t user1;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "lm3s6432s2e_internal.h"
|
#include "lm3s6432s2e_internal.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
/* Dump GPIO registers */
|
/* Dump GPIO registers */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LEDS
|
#ifdef CONFIG_DEBUG_LEDS
|
||||||
# define led_dumpgpio(m) lm_dumpgpio(LED_GPIO, m)
|
# define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define led_dumpgpio(m)
|
# define led_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
@@ -100,10 +100,10 @@ void board_led_initialize(void)
|
|||||||
|
|
||||||
/* Configure Port F, Bit 2 as an output, initial value=OFF */
|
/* Configure Port F, Bit 2 as an output, initial value=OFF */
|
||||||
|
|
||||||
led_dumpgpio("board_led_initialize before lm_configgpio()");
|
led_dumpgpio("board_led_initialize before tiva_configgpio()");
|
||||||
lm_configgpio(LED0_GPIO);
|
tiva_configgpio(LED0_GPIO);
|
||||||
lm_configgpio(LED1_GPIO);
|
tiva_configgpio(LED1_GPIO);
|
||||||
led_dumpgpio("board_led_initialize after lm_configgpio()");
|
led_dumpgpio("board_led_initialize after tiva_configgpio()");
|
||||||
g_nest = 0;
|
g_nest = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,9 +127,9 @@ void board_led_on(int led)
|
|||||||
g_nest++;
|
g_nest++;
|
||||||
case LED_IRQSENABLED:
|
case LED_IRQSENABLED:
|
||||||
case LED_STACKCREATED:
|
case LED_STACKCREATED:
|
||||||
led_dumpgpio("board_led_on: before lm_gpiowrite()");
|
led_dumpgpio("board_led_on: before tiva_gpiowrite()");
|
||||||
lm_gpiowrite(LED1_GPIO, false);
|
tiva_gpiowrite(LED1_GPIO, false);
|
||||||
led_dumpgpio("board_led_on: after lm_gpiowrite()");
|
led_dumpgpio("board_led_on: after tiva_gpiowrite()");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -155,9 +155,9 @@ void board_led_off(int led)
|
|||||||
case LED_PANIC:
|
case LED_PANIC:
|
||||||
if (--g_nest <= 0)
|
if (--g_nest <= 0)
|
||||||
{
|
{
|
||||||
led_dumpgpio("board_led_off: before lm_gpiowrite()");
|
led_dumpgpio("board_led_off: before tiva_gpiowrite()");
|
||||||
lm_gpiowrite(LED1_GPIO, true);
|
tiva_gpiowrite(LED1_GPIO, true);
|
||||||
led_dumpgpio("board_led_off: after lm_gpiowrite()");
|
led_dumpgpio("board_led_off: after tiva_gpiowrite()");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "lm3s6432s2e_internal.h"
|
#include "lm3s6432s2e_internal.h"
|
||||||
|
|
||||||
#if !defined(CONFIG_SSI0_DISABLE)
|
#if !defined(CONFIG_SSI0_DISABLE)
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
/* Dump GPIO registers */
|
/* Dump GPIO registers */
|
||||||
|
|
||||||
#ifdef SSI_VERBOSE
|
#ifdef SSI_VERBOSE
|
||||||
# define ssi_dumpgpio(m) lm_dumpgpio(SDCCS_GPIO, m)
|
# define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define ssi_dumpgpio(m)
|
# define ssi_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
@@ -105,18 +105,18 @@ void weak_function lm_ssiinitialize(void)
|
|||||||
/* Configure the SPI CS GPIO */
|
/* Configure the SPI CS GPIO */
|
||||||
|
|
||||||
ssi_dumpgpio("lm_ssiinitialize() Entry)");
|
ssi_dumpgpio("lm_ssiinitialize() Entry)");
|
||||||
lm_configgpio(SSICS_GPIO);
|
tiva_configgpio(SSICS_GPIO);
|
||||||
ssi_dumpgpio("lm_ssiinitialize() Exit");
|
ssi_dumpgpio("lm_ssiinitialize() Exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* The external functions, lm_spiselect and lm_spistatus must be provided
|
* The external functions, tiva_spiselect and tiva_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/spi.h).
|
* methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi/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 lm_spiselect() and lm_spistatus() functions in your
|
* 1. Provide tiva_spiselect() and tiva_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
|
||||||
@@ -128,21 +128,22 @@ void weak_function lm_ssiinitialize(void)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void lm_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
void tiva_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");
|
||||||
ssi_dumpgpio("lm_spiselect() Entry");
|
ssi_dumpgpio("tiva_spiselect() Entry");
|
||||||
|
|
||||||
if (devid == SPIDEV_MMCSD)
|
if (devid == SPIDEV_MMCSD)
|
||||||
{
|
{
|
||||||
/* Assert the CS pin to the card */
|
/* Assert the CS pin to the card */
|
||||||
|
|
||||||
lm_gpiowrite(SDCCS_GPIO, !selected);
|
tiva_gpiowrite(SDCCS_GPIO, !selected);
|
||||||
}
|
}
|
||||||
ssi_dumpgpio("lm_spiselect() Exit");
|
|
||||||
|
ssi_dumpgpio("tiva_spiselect() Exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t lm_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
uint8_t tiva_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;
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ IDEs
|
|||||||
on the command line.
|
on the command line.
|
||||||
|
|
||||||
Startup files will probably cause you some headaches. The NuttX startup file
|
Startup files will probably cause you some headaches. The NuttX startup file
|
||||||
is arch/arm/src/lm/lm_vectors.S.
|
is arch/arm/src/tiva/tiva_vectors.S.
|
||||||
|
|
||||||
NuttX EABI "buildroot" Toolchain
|
NuttX EABI "buildroot" Toolchain
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@@ -532,7 +532,7 @@ Stellaris LM3S6965 Evaluation Kit Configuration Options
|
|||||||
to build the Stellaris Ethernet driver
|
to build the Stellaris Ethernet driver
|
||||||
CONFIG_LM_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
CONFIG_LM_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
||||||
CONFIG_LM_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 tiva_ethernetmac()), then this should be selected.
|
||||||
CONFIG_LM_ETHHDUPLEX - Set to force half duplex operation
|
CONFIG_LM_ETHHDUPLEX - Set to force half duplex operation
|
||||||
CONFIG_LM_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
CONFIG_LM_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
||||||
CONFIG_LM_ETHNOPAD - Set to suppress Tx padding
|
CONFIG_LM_ETHNOPAD - Set to suppress Tx padding
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_boardinitialize
|
* Name: tiva_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All Stellaris architectures must provide the following entry point. This entry
|
* All Stellaris architectures must provide the following entry point. This entry
|
||||||
@@ -121,10 +121,10 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void lm_boardinitialize(void);
|
void tiva_boardinitialize(void);
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_ethernetmac
|
* Name: tiva_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
|
||||||
@@ -135,7 +135,7 @@ extern void lm_boardinitialize(void);
|
|||||||
|
|
||||||
#ifdef CONFIG_LM_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
struct ether_addr;
|
struct ether_addr;
|
||||||
extern void lm_ethernetmac(struct ether_addr *ethaddr);
|
void tiva_ethernetmac(struct ether_addr *ethaddr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
#include <nuttx/compiler.h>
|
#include <nuttx/compiler.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void weak_function lm_ssiinitialize(void);
|
void weak_function lm_ssiinitialize(void);
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif /* __CONFIGS_LM3S6965_EK_SRC_LM3S6965EK_INTERNAL_H */
|
#endif /* __CONFIGS_LM3S6965_EK_SRC_LM3S6965EK_INTERNAL_H */
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_boardinitialize
|
* Name: tiva_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All Stellaris architectures must provide the following entry point. This entry
|
* All Stellaris architectures must provide the following entry point. This entry
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void lm_boardinitialize(void)
|
void tiva_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
|
||||||
* lm_ssiinitialize() has been brought into the link.
|
* lm_ssiinitialize() has been brought into the link.
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_ethernetmac
|
* Name: tiva_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
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_LM_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
void lm_ethernetmac(struct ether_addr *ethaddr)
|
void tiva_ethernetmac(struct ether_addr *ethaddr)
|
||||||
{
|
{
|
||||||
uint32_t user0;
|
uint32_t user0;
|
||||||
uint32_t user1;
|
uint32_t user1;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "lm3s6965ek_internal.h"
|
#include "lm3s6965ek_internal.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
/* Dump GPIO registers */
|
/* Dump GPIO registers */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LEDS
|
#ifdef CONFIG_DEBUG_LEDS
|
||||||
# define led_dumpgpio(m) lm_dumpgpio(LED_GPIO, m)
|
# define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define led_dumpgpio(m)
|
# define led_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
@@ -100,9 +100,9 @@ void board_led_initialize(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("board_led_initialize before lm_configgpio()");
|
led_dumpgpio("board_led_initialize before tiva_configgpio()");
|
||||||
lm_configgpio(LED_GPIO);
|
tiva_configgpio(LED_GPIO);
|
||||||
led_dumpgpio("board_led_initialize after lm_configgpio()");
|
led_dumpgpio("board_led_initialize after tiva_configgpio()");
|
||||||
g_nest = 0;
|
g_nest = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,9 +126,9 @@ void board_led_on(int led)
|
|||||||
g_nest++;
|
g_nest++;
|
||||||
case LED_IRQSENABLED:
|
case LED_IRQSENABLED:
|
||||||
case LED_STACKCREATED:
|
case LED_STACKCREATED:
|
||||||
led_dumpgpio("board_led_on: before lm_gpiowrite()");
|
led_dumpgpio("board_led_on: before tiva_gpiowrite()");
|
||||||
lm_gpiowrite(LED_GPIO, false);
|
tiva_gpiowrite(LED_GPIO, false);
|
||||||
led_dumpgpio("board_led_on: after lm_gpiowrite()");
|
led_dumpgpio("board_led_on: after tiva_gpiowrite()");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -154,9 +154,9 @@ void board_led_off(int led)
|
|||||||
case LED_PANIC:
|
case LED_PANIC:
|
||||||
if (--g_nest <= 0)
|
if (--g_nest <= 0)
|
||||||
{
|
{
|
||||||
led_dumpgpio("board_led_off: before lm_gpiowrite()");
|
led_dumpgpio("board_led_off: before tiva_gpiowrite()");
|
||||||
lm_gpiowrite(LED_GPIO, true);
|
tiva_gpiowrite(LED_GPIO, true);
|
||||||
led_dumpgpio("board_led_off: after lm_gpiowrite()");
|
led_dumpgpio("board_led_off: after tiva_gpiowrite()");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include <nuttx/lcd/lcd.h>
|
#include <nuttx/lcd/lcd.h>
|
||||||
#include <nuttx/lcd/p14201.h>
|
#include <nuttx/lcd/p14201.h>
|
||||||
|
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "lm3s6965ek_internal.h"
|
#include "lm3s6965ek_internal.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -72,8 +72,8 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_LCD_RITDEBUG
|
#ifdef CONFIG_LCD_RITDEBUG
|
||||||
# define ritdbg(format, arg...) vdbg(format, ##arg)
|
# define ritdbg(format, arg...) vdbg(format, ##arg)
|
||||||
# define oleddc_dumpgpio(m) lm_dumpgpio(OLEDDC_GPIO, m)
|
# define oleddc_dumpgpio(m) tiva_dumpgpio(OLEDDC_GPIO, m)
|
||||||
# define oledcs_dumpgpio(m) lm_dumpgpio(OLEDCS_GPIO, m)
|
# define oledcs_dumpgpio(m) tiva_dumpgpio(OLEDCS_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define ritdbg(x...)
|
# define ritdbg(x...)
|
||||||
# define oleddc_dumpgpio(m)
|
# define oleddc_dumpgpio(m)
|
||||||
@@ -102,8 +102,8 @@ FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
|
|||||||
oledcs_dumpgpio("up_nxdrvinit: After OLEDCS setup");
|
oledcs_dumpgpio("up_nxdrvinit: After OLEDCS setup");
|
||||||
oleddc_dumpgpio("up_nxdrvinit: On entry");
|
oleddc_dumpgpio("up_nxdrvinit: On entry");
|
||||||
|
|
||||||
lm_configgpio(OLEDDC_GPIO); /* PC7: OLED display data/control select (D/Cn) */
|
tiva_configgpio(OLEDDC_GPIO); /* PC7: OLED display data/control select (D/Cn) */
|
||||||
lm_configgpio(OLEDEN_GPIO); /* PC6: Enable +15V needed by OLED (EN+15V) */
|
tiva_configgpio(OLEDEN_GPIO); /* PC6: Enable +15V needed by OLED (EN+15V) */
|
||||||
|
|
||||||
oleddc_dumpgpio("up_nxdrvinit: After OLEDDC/EN setup");
|
oleddc_dumpgpio("up_nxdrvinit: After OLEDDC/EN setup");
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Name: lm_spicmddata
|
* Name: tiva_spicmddata
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Set or clear the SD1329 D/Cn bit to select data (true) or command
|
* Set or clear the SD1329 D/Cn bit to select data (true) or command
|
||||||
@@ -159,14 +159,15 @@ FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
|
|||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
int lm_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
int tiva_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||||
{
|
{
|
||||||
if (devid == SPIDEV_DISPLAY)
|
if (devid == SPIDEV_DISPLAY)
|
||||||
{
|
{
|
||||||
/* Set GPIO to 1 for data, 0 for command */
|
/* Set GPIO to 1 for data, 0 for command */
|
||||||
|
|
||||||
lm_gpiowrite(OLEDDC_GPIO, !cmd);
|
tiva_gpiowrite(OLEDDC_GPIO, !cmd);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "lm3s6965ek_internal.h"
|
#include "lm3s6965ek_internal.h"
|
||||||
|
|
||||||
/* The LM3S6965 Eval Kit microSD CS is on SSI0 */
|
/* The LM3S6965 Eval Kit microSD CS is on SSI0 */
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
/* Dump GPIO registers */
|
/* Dump GPIO registers */
|
||||||
|
|
||||||
#ifdef SSI_VERBOSE
|
#ifdef SSI_VERBOSE
|
||||||
# define ssi_dumpgpio(m) lm_dumpgpio(SDCCS_GPIO, m)
|
# define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define ssi_dumpgpio(m)
|
# define ssi_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_ssiinitialize
|
* Name: tiva_ssiinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the LM3S6965 Eval Kit.
|
* Called to configure SPI chip select GPIO pins for the LM3S6965 Eval Kit.
|
||||||
@@ -107,21 +107,21 @@ void weak_function lm_ssiinitialize(void)
|
|||||||
/* Configure the SPI-based microSD CS GPIO */
|
/* Configure the SPI-based microSD CS GPIO */
|
||||||
|
|
||||||
ssi_dumpgpio("lm_ssiinitialize() Entry)");
|
ssi_dumpgpio("lm_ssiinitialize() Entry)");
|
||||||
lm_configgpio(SDCCS_GPIO);
|
tiva_configgpio(SDCCS_GPIO);
|
||||||
#ifdef CONFIG_NX_LCDDRIVER
|
#ifdef CONFIG_NX_LCDDRIVER
|
||||||
lm_configgpio(OLEDCS_GPIO);
|
tiva_configgpio(OLEDCS_GPIO);
|
||||||
#endif
|
#endif
|
||||||
ssi_dumpgpio("lm_ssiinitialize() Exit");
|
ssi_dumpgpio("lm_ssiinitialize() Exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* The external functions, lm_spiselect and lm_spistatus must be provided
|
* The external functions, tiva_spiselect and tiva_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/spi.h).
|
* methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi/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 lm_spiselect() and lm_spistatus() functions in your
|
* 1. Provide tiva_spiselect() and tiva_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
|
||||||
@@ -133,29 +133,29 @@ void weak_function lm_ssiinitialize(void)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void lm_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
void tiva_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");
|
||||||
ssi_dumpgpio("lm_spiselect() Entry");
|
ssi_dumpgpio("tiva_spiselect() Entry");
|
||||||
|
|
||||||
if (devid == SPIDEV_MMCSD)
|
if (devid == SPIDEV_MMCSD)
|
||||||
{
|
{
|
||||||
/* Assert the CS pin to the card */
|
/* Assert the CS pin to the card */
|
||||||
|
|
||||||
lm_gpiowrite(SDCCS_GPIO, !selected);
|
tiva_gpiowrite(SDCCS_GPIO, !selected);
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_NX_LCDDRIVER
|
#ifdef CONFIG_NX_LCDDRIVER
|
||||||
else if (devid == SPIDEV_DISPLAY)
|
else if (devid == SPIDEV_DISPLAY)
|
||||||
{
|
{
|
||||||
/* Assert the CS pin to the display */
|
/* Assert the CS pin to the display */
|
||||||
|
|
||||||
lm_gpiowrite(OLEDCS_GPIO, !selected);
|
tiva_gpiowrite(OLEDCS_GPIO, !selected);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ssi_dumpgpio("lm_spiselect() Exit");
|
ssi_dumpgpio("tiva_spiselect() Exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t lm_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
uint8_t tiva_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;
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ IDEs
|
|||||||
on the command line.
|
on the command line.
|
||||||
|
|
||||||
Startup files will probably cause you some headaches. The NuttX startup file
|
Startup files will probably cause you some headaches. The NuttX startup file
|
||||||
is arch/arm/src/lm/lm_vectors.S.
|
is arch/arm/src/tiva/tiva_vectors.S.
|
||||||
|
|
||||||
NuttX EABI "buildroot" Toolchain
|
NuttX EABI "buildroot" Toolchain
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@@ -436,7 +436,7 @@ Stellaris LM3S8962 Evaluation Kit Configuration Options
|
|||||||
to build the Stellaris Ethernet driver
|
to build the Stellaris Ethernet driver
|
||||||
CONFIG_LM_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
CONFIG_LM_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
||||||
CONFIG_LM_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 tiva_ethernetmac()), then this should be selected.
|
||||||
CONFIG_LM_ETHHDUPLEX - Set to force half duplex operation
|
CONFIG_LM_ETHHDUPLEX - Set to force half duplex operation
|
||||||
CONFIG_LM_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
CONFIG_LM_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
||||||
CONFIG_LM_ETHNOPAD - Set to suppress Tx padding
|
CONFIG_LM_ETHNOPAD - Set to suppress Tx padding
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_boardinitialize
|
* Name: tiva_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All Stellaris architectures must provide the following entry point. This entry
|
* All Stellaris architectures must provide the following entry point. This entry
|
||||||
@@ -121,10 +121,10 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void lm_boardinitialize(void);
|
void tiva_boardinitialize(void);
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_ethernetmac
|
* Name: tiva_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
|
||||||
@@ -135,7 +135,7 @@ extern void lm_boardinitialize(void);
|
|||||||
|
|
||||||
#ifdef CONFIG_LM_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
struct ether_addr;
|
struct ether_addr;
|
||||||
extern void lm_ethernetmac(struct ether_addr *ethaddr);
|
void tiva_ethernetmac(struct ether_addr *ethaddr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
#include <nuttx/compiler.h>
|
#include <nuttx/compiler.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
extern void weak_function lm_ssiinitialize(void);
|
void weak_function lm_ssiinitialize(void);
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif /* __CONFIGS_LM3S8962_EK_SRC_LM3S8962EK_INTERNAL_H */
|
#endif /* __CONFIGS_LM3S8962_EK_SRC_LM3S8962EK_INTERNAL_H */
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_boardinitialize
|
* Name: tiva_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All Stellaris architectures must provide the following entry point. This entry
|
* All Stellaris architectures must provide the following entry point. This entry
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void lm_boardinitialize(void)
|
void tiva_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
|
||||||
* lm_ssiinitialize() has been brought into the link.
|
* lm_ssiinitialize() has been brought into the link.
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_ethernetmac
|
* Name: tiva_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
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_LM_BOARDMAC
|
#ifdef CONFIG_LM_BOARDMAC
|
||||||
void lm_ethernetmac(struct ether_addr *ethaddr)
|
void tiva_ethernetmac(struct ether_addr *ethaddr)
|
||||||
{
|
{
|
||||||
uint32_t user0;
|
uint32_t user0;
|
||||||
uint32_t user1;
|
uint32_t user1;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "lm3s8962ek_internal.h"
|
#include "lm3s8962ek_internal.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
/* Dump GPIO registers */
|
/* Dump GPIO registers */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LEDS
|
#ifdef CONFIG_DEBUG_LEDS
|
||||||
# define led_dumpgpio(m) lm_dumpgpio(LED_GPIO, m)
|
# define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define led_dumpgpio(m)
|
# define led_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
@@ -100,9 +100,9 @@ void board_led_initialize(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("board_led_initialize before lm_configgpio()");
|
led_dumpgpio("board_led_initialize before tiva_configgpio()");
|
||||||
lm_configgpio(LED_GPIO);
|
tiva_configgpio(LED_GPIO);
|
||||||
led_dumpgpio("board_led_initialize after lm_configgpio()");
|
led_dumpgpio("board_led_initialize after tiva_configgpio()");
|
||||||
g_nest = 0;
|
g_nest = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,9 +126,9 @@ void board_led_on(int led)
|
|||||||
g_nest++;
|
g_nest++;
|
||||||
case LED_IRQSENABLED:
|
case LED_IRQSENABLED:
|
||||||
case LED_STACKCREATED:
|
case LED_STACKCREATED:
|
||||||
led_dumpgpio("board_led_on: before lm_gpiowrite()");
|
led_dumpgpio("board_led_on: before tiva_gpiowrite()");
|
||||||
lm_gpiowrite(LED_GPIO, false);
|
tiva_gpiowrite(LED_GPIO, false);
|
||||||
led_dumpgpio("board_led_on: after lm_gpiowrite()");
|
led_dumpgpio("board_led_on: after tiva_gpiowrite()");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -154,9 +154,9 @@ void board_led_off(int led)
|
|||||||
case LED_PANIC:
|
case LED_PANIC:
|
||||||
if (--g_nest <= 0)
|
if (--g_nest <= 0)
|
||||||
{
|
{
|
||||||
led_dumpgpio("board_led_off: before lm_gpiowrite()");
|
led_dumpgpio("board_led_off: before tiva_gpiowrite()");
|
||||||
lm_gpiowrite(LED_GPIO, true);
|
tiva_gpiowrite(LED_GPIO, true);
|
||||||
led_dumpgpio("board_led_off: after lm_gpiowrite()");
|
led_dumpgpio("board_led_off: after tiva_gpiowrite()");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include <nuttx/lcd/lcd.h>
|
#include <nuttx/lcd/lcd.h>
|
||||||
#include <nuttx/lcd/p14201.h>
|
#include <nuttx/lcd/p14201.h>
|
||||||
|
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "lm3s8962ek_internal.h"
|
#include "lm3s8962ek_internal.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -72,8 +72,8 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_LCD_RITDEBUG
|
#ifdef CONFIG_LCD_RITDEBUG
|
||||||
# define ritdbg(format, arg...) vdbg(format, ##arg)
|
# define ritdbg(format, arg...) vdbg(format, ##arg)
|
||||||
# define oleddc_dumpgpio(m) lm_dumpgpio(OLEDDC_GPIO, m)
|
# define oleddc_dumpgpio(m) tiva_dumpgpio(OLEDDC_GPIO, m)
|
||||||
# define oledcs_dumpgpio(m) lm_dumpgpio(OLEDCS_GPIO, m)
|
# define oledcs_dumpgpio(m) tiva_dumpgpio(OLEDCS_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define ritdbg(x...)
|
# define ritdbg(x...)
|
||||||
# define oleddc_dumpgpio(m)
|
# define oleddc_dumpgpio(m)
|
||||||
@@ -102,8 +102,8 @@ FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
|
|||||||
oledcs_dumpgpio("up_nxdrvinit: After OLEDCS setup");
|
oledcs_dumpgpio("up_nxdrvinit: After OLEDCS setup");
|
||||||
oleddc_dumpgpio("up_nxdrvinit: On entry");
|
oleddc_dumpgpio("up_nxdrvinit: On entry");
|
||||||
|
|
||||||
lm_configgpio(OLEDDC_GPIO); /* PC7: OLED display data/control select (D/Cn) */
|
tiva_configgpio(OLEDDC_GPIO); /* PC7: OLED display data/control select (D/Cn) */
|
||||||
lm_configgpio(OLEDEN_GPIO); /* PC6: Enable +15V needed by OLED (EN+15V) */
|
tiva_configgpio(OLEDEN_GPIO); /* PC6: Enable +15V needed by OLED (EN+15V) */
|
||||||
|
|
||||||
oleddc_dumpgpio("up_nxdrvinit: After OLEDDC/EN setup");
|
oleddc_dumpgpio("up_nxdrvinit: After OLEDDC/EN setup");
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Name: lm_spicmddata
|
* Name: tiva_spicmddata
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Set or clear the SD1329 D/Cn bit to select data (true) or command
|
* Set or clear the SD1329 D/Cn bit to select data (true) or command
|
||||||
@@ -159,14 +159,15 @@ FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
|
|||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
int lm_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
int tiva_spicmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
|
||||||
{
|
{
|
||||||
if (devid == SPIDEV_DISPLAY)
|
if (devid == SPIDEV_DISPLAY)
|
||||||
{
|
{
|
||||||
/* Set GPIO to 1 for data, 0 for command */
|
/* Set GPIO to 1 for data, 0 for command */
|
||||||
|
|
||||||
lm_gpiowrite(OLEDDC_GPIO, !cmd);
|
tiva_gpiowrite(OLEDDC_GPIO, !cmd);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "lm3s8962ek_internal.h"
|
#include "lm3s8962ek_internal.h"
|
||||||
|
|
||||||
/* The LM3S8962 Eval Kit microSD CS is on SSI0 */
|
/* The LM3S8962 Eval Kit microSD CS is on SSI0 */
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
/* Dump GPIO registers */
|
/* Dump GPIO registers */
|
||||||
|
|
||||||
#ifdef SSI_VERBOSE
|
#ifdef SSI_VERBOSE
|
||||||
# define ssi_dumpgpio(m) lm_dumpgpio(SDCCS_GPIO, m)
|
# define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define ssi_dumpgpio(m)
|
# define ssi_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_ssiinitialize
|
* Name: tiva_ssiinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to configure SPI chip select GPIO pins for the LM3S8962 Eval Kit.
|
* Called to configure SPI chip select GPIO pins for the LM3S8962 Eval Kit.
|
||||||
@@ -107,21 +107,21 @@ void weak_function lm_ssiinitialize(void)
|
|||||||
/* Configure the SPI-based microSD CS GPIO */
|
/* Configure the SPI-based microSD CS GPIO */
|
||||||
|
|
||||||
ssi_dumpgpio("lm_ssiinitialize() Entry)");
|
ssi_dumpgpio("lm_ssiinitialize() Entry)");
|
||||||
lm_configgpio(SDCCS_GPIO);
|
tiva_configgpio(SDCCS_GPIO);
|
||||||
#ifdef CONFIG_NX_LCDDRIVER
|
#ifdef CONFIG_NX_LCDDRIVER
|
||||||
lm_configgpio(OLEDCS_GPIO);
|
tiva_configgpio(OLEDCS_GPIO);
|
||||||
#endif
|
#endif
|
||||||
ssi_dumpgpio("lm_ssiinitialize() Exit");
|
ssi_dumpgpio("lm_ssiinitialize() Exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* The external functions, lm_spiselect and lm_spistatus must be provided
|
* The external functions, tiva_spiselect and tiva_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/spi.h).
|
* methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi/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 lm_spiselect() and lm_spistatus() functions in your
|
* 1. Provide tiva_spiselect() and tiva_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
|
||||||
@@ -133,29 +133,29 @@ void weak_function lm_ssiinitialize(void)
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void lm_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
void tiva_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");
|
||||||
ssi_dumpgpio("lm_spiselect() Entry");
|
ssi_dumpgpio("tiva_spiselect() Entry");
|
||||||
|
|
||||||
if (devid == SPIDEV_MMCSD)
|
if (devid == SPIDEV_MMCSD)
|
||||||
{
|
{
|
||||||
/* Assert the CS pin to the card */
|
/* Assert the CS pin to the card */
|
||||||
|
|
||||||
lm_gpiowrite(SDCCS_GPIO, !selected);
|
tiva_gpiowrite(SDCCS_GPIO, !selected);
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_NX_LCDDRIVER
|
#ifdef CONFIG_NX_LCDDRIVER
|
||||||
else if (devid == SPIDEV_DISPLAY)
|
else if (devid == SPIDEV_DISPLAY)
|
||||||
{
|
{
|
||||||
/* Assert the CS pin to the display */
|
/* Assert the CS pin to the display */
|
||||||
|
|
||||||
lm_gpiowrite(OLEDCS_GPIO, !selected);
|
tiva_gpiowrite(OLEDCS_GPIO, !selected);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ssi_dumpgpio("lm_spiselect() Exit");
|
ssi_dumpgpio("tiva_spiselect() Exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t lm_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
uint8_t tiva_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;
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ IDEs
|
|||||||
on the command line.
|
on the command line.
|
||||||
|
|
||||||
Startup files will probably cause you some headaches. The NuttX startup file
|
Startup files will probably cause you some headaches. The NuttX startup file
|
||||||
is arch/arm/src/lm/lm_vectors.S.
|
is arch/arm/src/tiva/tiva_vectors.S.
|
||||||
|
|
||||||
NuttX EABI "buildroot" Toolchain
|
NuttX EABI "buildroot" Toolchain
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@@ -663,7 +663,7 @@ LM4F120 LaunchPad Configuration Options
|
|||||||
to build the Stellaris Ethernet driver
|
to build the Stellaris Ethernet driver
|
||||||
CONFIG_LM_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
CONFIG_LM_ETHLEDS - Enable to use Ethernet LEDs on the board.
|
||||||
CONFIG_LM_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 tiva_ethernetmac()), then this should be selected.
|
||||||
CONFIG_LM_ETHHDUPLEX - Set to force half duplex operation
|
CONFIG_LM_ETHHDUPLEX - Set to force half duplex operation
|
||||||
CONFIG_LM_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
CONFIG_LM_ETHNOAUTOCRC - Set to suppress auto-CRC generation
|
||||||
CONFIG_LM_ETHNOPAD - Set to suppress Tx padding
|
CONFIG_LM_ETHNOPAD - Set to suppress Tx padding
|
||||||
|
|||||||
@@ -191,7 +191,7 @@
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_boardinitialize
|
* Name: tiva_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All Stellaris architectures must provide the following entry point. This entry
|
* All Stellaris architectures must provide the following entry point. This entry
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void lm_boardinitialize(void);
|
void tiva_boardinitialize(void);
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm4f_ledinit, lm4f_setled, and lm4f_setleds
|
* Name: lm4f_ledinit, lm4f_setled, and lm4f_setleds
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "lmf4120-launchpad.h"
|
#include "lmf4120-launchpad.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
/* Dump GPIO registers */
|
/* Dump GPIO registers */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LEDS
|
#ifdef CONFIG_DEBUG_LEDS
|
||||||
# define led_dumpgpio(m) lm_dumpgpio(LED_GPIO, m)
|
# define led_dumpgpio(m) tiva_dumpgpio(LED_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define led_dumpgpio(m)
|
# define led_dumpgpio(m)
|
||||||
#endif
|
#endif
|
||||||
@@ -144,11 +144,11 @@ void lm4f_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("lm4f_ledinit before lm_configgpio()");
|
led_dumpgpio("lm4f_ledinit before tiva_configgpio()");
|
||||||
lm_configgpio(GPIO_LED_R);
|
tiva_configgpio(GPIO_LED_R);
|
||||||
lm_configgpio(GPIO_LED_G);
|
tiva_configgpio(GPIO_LED_G);
|
||||||
lm_configgpio(GPIO_LED_B);
|
tiva_configgpio(GPIO_LED_B);
|
||||||
led_dumpgpio("lm4f_ledinit after lm_configgpio()");
|
led_dumpgpio("lm4f_ledinit after tiva_configgpio()");
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -168,25 +168,25 @@ void board_led_on(int led)
|
|||||||
/* The GREEN component is illuminated at the final initialization step */
|
/* The GREEN component is illuminated at the final initialization step */
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
lm_gpiowrite(GPIO_LED_G, false);
|
tiva_gpiowrite(GPIO_LED_G, false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* These will illuminate the BLUE component with on effect no RED and GREEN */
|
/* These will illuminate the BLUE component with on effect no RED and GREEN */
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
lm_gpiowrite(GPIO_LED_B, false);
|
tiva_gpiowrite(GPIO_LED_B, false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* This will turn off RED and GREEN and turn RED on */
|
/* This will turn off RED and GREEN and turn RED on */
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
lm_gpiowrite(GPIO_LED_G, true);
|
tiva_gpiowrite(GPIO_LED_G, true);
|
||||||
lm_gpiowrite(GPIO_LED_B, true);
|
tiva_gpiowrite(GPIO_LED_B, true);
|
||||||
|
|
||||||
/* This will illuminate the RED component with no effect on RED and GREEN */
|
/* This will illuminate the RED component with no effect on RED and GREEN */
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
lm_gpiowrite(GPIO_LED_R, false);
|
tiva_gpiowrite(GPIO_LED_R, false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -209,14 +209,14 @@ void board_led_off(int led)
|
|||||||
/* These will extinguish the BLUE component with no effect on RED and GREEN */
|
/* These will extinguish the BLUE component with no effect on RED and GREEN */
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
lm_gpiowrite(GPIO_LED_B, true);
|
tiva_gpiowrite(GPIO_LED_B, true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* These will extinguish the RED component with on effect on RED and GREEN */
|
/* These will extinguish the RED component with on effect on RED and GREEN */
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
case 4:
|
case 4:
|
||||||
lm_gpiowrite(GPIO_LED_R, true);
|
tiva_gpiowrite(GPIO_LED_R, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Name: lm_boardinitialize
|
* Name: tiva_boardinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* All Stellaris architectures must provide the following entry point. This entry
|
* All Stellaris architectures must provide the following entry point. This entry
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
void lm_boardinitialize(void)
|
void tiva_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
|
||||||
* lm_ssiinitialize() has been brought into the link.
|
* lm_ssiinitialize() has been brought into the link.
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
#include "lmf4120-launchpad.h"
|
#include "lmf4120-launchpad.h"
|
||||||
|
|
||||||
/* The LM4F LaunchPad microSD CS is on SSI0 */
|
/* The LM4F LaunchPad microSD CS is on SSI0 */
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE)
|
#if defined(CONFIG_DEBUG_SPI) && defined(CONFIG_DEBUG_VERBOSE)
|
||||||
# define ssivdbg lldbg
|
# define ssivdbg lldbg
|
||||||
# define ssi_dumpgpio(m) lm_dumpgpio(SDCCS_GPIO, m)
|
# define ssi_dumpgpio(m) tiva_dumpgpio(SDCCS_GPIO, m)
|
||||||
#else
|
#else
|
||||||
# define ssivdbg(x...)
|
# define ssivdbg(x...)
|
||||||
# define ssi_dumpgpio(m)
|
# define ssi_dumpgpio(m)
|
||||||
@@ -99,32 +99,32 @@ void weak_function lm4f_ssiinitialize(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* The external functions, lm_spiselect and lm_spistatus must be provided
|
* The external functions, tiva_spiselect and tiva_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/spi.h).
|
* methods SPI interface defined by struct spi_ops_s (see include/nuttx/spi/spi.h).
|
||||||
* All othermethods (including lm_spiinitialize()) are provided by common
|
* All othermethods (including tiva_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 lm_spiselect() and lm_spistatus() functions in your
|
* 1. Provide tiva_spiselect() and tiva_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 lm_spiinitialize() in your low level initialization
|
* 2. Add a call to tiva_spiinitialize() in your low level initialization
|
||||||
* logic
|
* logic
|
||||||
* 3. The handle returned by lm_spiinitialize() may then be used to bind the
|
* 3. The handle returned by tiva_spiinitialize() may then be used to bind the
|
||||||
* SPI driver to higher level logic (e.g., calling
|
* SPI driver to higher level logic (e.g., calling
|
||||||
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
|
||||||
* the SPI MMC/SD driver).
|
* the SPI MMC/SD driver).
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void lm_spiselect(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
void tiva_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");
|
||||||
ssi_dumpgpio("lm_spiselect() Entry");
|
ssi_dumpgpio("tiva_spiselect() Entry");
|
||||||
ssi_dumpgpio("lm_spiselect() Exit");
|
ssi_dumpgpio("tiva_spiselect() Exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t lm_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
uint8_t tiva_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;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
#include <nuttx/compiler.h>
|
#include <nuttx/compiler.h>
|
||||||
|
|
||||||
#include "chip.h"
|
#include "chip.h"
|
||||||
#include "lm_gpio.h"
|
#include "tiva_gpio.h"
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Definitions
|
* Definitions
|
||||||
|
|||||||
Reference in New Issue
Block a user