Finish STM32 Ethernet header file; Add ethernet driver skeleton

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4147 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-12-08 18:02:38 +00:00
parent bc6dc3a88d
commit 690a6c3086
5 changed files with 1168 additions and 97 deletions
+4
View File
@@ -59,6 +59,10 @@ CHIP_CSRCS = stm32_allocateheap.c stm32_start.c stm32_rcc.c stm32_lse.c \
stm32_spi.c stm32_usbdev.c stm32_sdio.c stm32_tim.c stm32_i2c.c \
stm32_pwr.c stm32_idle.c stm32_waste.c
ifeq ($(CONFIG_STM32_ETHMAC),y)
CHIP_CSRCS += stm32_eth.c
endif
ifeq ($(CONFIG_STM32_RCCLOCK),y)
CHIP_CSRCS += stm32_rcclock.c
endif
File diff suppressed because it is too large Load Diff
+730
View File
File diff suppressed because it is too large Load Diff
+8 -5
View File
@@ -44,7 +44,7 @@
#include "chip.h"
#if STM32_NETHERNET > 1
#if STM32_NETHERNET > 0
#include "chip/stm32_eth.h"
@@ -67,12 +67,13 @@ extern "C" {
*
* Description:
* Initialize the Ethernet driver for one interface. If the STM32 chip
* supports multiple Ethernet controllers, then bould specific logic
* supports multiple Ethernet controllers, then board specific logic
* must implement up_netinitialize() and call this function to initialize
* the desiresed interfaces.
* the desired interfaces.
*
* Parameters:
* None
* intf - In the case where there are multiple EMACs, this value
* identifies which EMAC is to be initialized.
*
* Returned Value:
* OK on success; Negated errno on failure.
@@ -81,7 +82,9 @@ extern "C" {
*
************************************************************************************/
#if STM32_NETHERNET > 1
EXTERN int stm32_ethinitialize(int intf);
#endif
#undef EXTERN
#if defined(__cplusplus)
@@ -89,6 +92,6 @@ EXTERN int stm32_ethinitialize(int intf);
#endif
#endif /* __ASSEMBLY__ */
#endif /* STM32_NETHERNET > 1 */
#endif /* STM32_NETHERNET > 0 */
#endif /* __ARCH_ARM_SRC_STM32_STM32_ETH_H */
+1 -1
View File
@@ -185,7 +185,7 @@ static inline void rcc_enableahb1(void)
/* Ethernet MAC clocking */
regval |= (RCC_AHB1ENR_ETHMACEN|RCC_AHB1ENR_ETHMACTXEN|
RCC_AHB1ENR_ETHMACRXEN|RCC_AHB1ENR_ETHMACPTPEN)
RCC_AHB1ENR_ETHMACRXEN|RCC_AHB1ENR_ETHMACPTPEN);
#endif
#ifdef CONFIG_STM32_OTGHS