git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1862 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-06-08 14:18:41 +00:00
parent c15f971c67
commit adccaae54e
2 changed files with 14 additions and 12 deletions

View File

@ -1262,7 +1262,7 @@ static int lm3s_txavail(struct uip_driver_s *dev)
****************************************************************************/
/****************************************************************************
* Function: lm3s_initialize
* Function: lm3s_ethinitialize
*
* Description:
* Initialize the Ethernet driver for one interface
@ -1278,9 +1278,9 @@ static int lm3s_txavail(struct uip_driver_s *dev)
****************************************************************************/
#if LM3S_NETHCONTROLLERS > 1
int lm3s_initialize(int intf)
int lm3s_ethinitialize(int intf)
#else
static inline int lm3s_initialize(int intf)
static inline int lm3s_ethinitialize(int intf)
#endif
{
struct lm3s_driver_s *priv = &g_lm3sdev[intf];
@ -1366,7 +1366,7 @@ static inline int lm3s_initialize(int intf)
#if LM3S_NETHCONTROLLERS == 1
void up_netinitialize(void)
{
(void)lm3s_initialize(0);
(void)lm3s_ethinitialize(0);
}
#endif

View File

@ -300,7 +300,7 @@ EXTERN int lm3s_dumpgpio(uint32 pinset, const char *msg);
EXTERN int weak_function gpio_irqinitialize(void);
/****************************************************************************
* Function: lm3s_initialize
* Function: lm3s_ethinitialize
*
* Description:
* Initialize the Ethernet driver for one interface. If the LM3S chip
@ -319,7 +319,7 @@ EXTERN int weak_function gpio_irqinitialize(void);
****************************************************************************/
#if LM3S_NETHCONTROLLERS > 1
EXTERN int lm3s_initialize(int intf);
EXTERN int lm3s_ethinitialize(int intf);
#endif
/****************************************************************************
@ -329,12 +329,14 @@ EXTERN int lm3s_initialize(int intf);
* All other methods (including up_spiinitialize()) are provided by common
* logic. To use this common SPI logic on your board:
*
* 1. Provide lm3s_spiselect() and lm3s_spistatus() functions in your
* board-specific logic. This function will perform chip selection and
* 1. Provide logic in lm3s_boardinitialize() to configure SPI chip select
* pins.
* 2. Provide lm3s_spiselect() and lm3s_spistatus() functions in your
* board-specific logic. These functions will perform chip selection and
* status operations using GPIOs in the way your board is configured.
* 2. Add a call to up_spiinitialize() in your low level initialization
* logic
* 3. The handle returned by up_spiinitialize() may then be used to bind the
* 3. Add a call to up_spiinitialize() in your low level application
* initialization logic
* 4. The handle returned by up_spiinitialize() may then be used to bind the
* SPI driver to higher level logic (e.g., calling
* mmcsd_spislotinitialize(), for example, will bind the SPI driver to
* the SPI MMC/SD driver).