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 5072f4a553
commit c9ca9fc763
8 changed files with 1183 additions and 103 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
+8
View File
@@ -43,3 +43,11 @@ CONFIGURED_APPS += nshlib
# Applications configured as an NX built-in commands
ifeq ($(CONFIG_NET),y)
CONFIGURED_APPS += netutils/uiplib
CONFIGURED_APPS += netutils/resolv
CONFIGURED_APPS += netutils/webclient
CONFIGURED_APPS += netutils/tftpc
endif
+6 -5
View File
@@ -642,6 +642,7 @@ CONFIG_MMCSD_HAVECARDDETECT=n
#
# TCP/IP and UDP support via uIP
#
# CONFIG_NET - Enable or disable all network features
# CONFIG_NET_IPv6 - Build in support for IPv6
# CONFIG_NSOCKET_DESCRIPTORS - Maximum number of socket descriptors per task/thread.
@@ -668,17 +669,17 @@ CONFIG_MMCSD_HAVECARDDETECT=n
#
CONFIG_NET=n
CONFIG_NET_IPv6=n
CONFIG_NSOCKET_DESCRIPTORS=0
CONFIG_NSOCKET_DESCRIPTORS=10
CONFIG_NET_SOCKOPTS=y
CONFIG_NET_BUFSIZE=420
CONFIG_NET_TCP=n
CONFIG_NET_TCP=y
CONFIG_NET_TCP_CONNS=40
CONFIG_NET_MAX_LISTENPORTS=40
CONFIG_NET_UDP=n
CONFIG_NET_UDP=y
CONFIG_NET_UDP_CHECKSUMS=y
#CONFIG_NET_UDP_CONNS=10
CONFIG_NET_ICMP=n
CONFIG_NET_ICMP_PING=n
CONFIG_NET_ICMP=y
CONFIG_NET_ICMP_PING=y
#CONFIG_NET_PINGADDRCONF=0
CONFIG_NET_STATISTICS=y
#CONFIG_NET_RECEIVE_WINDOW=
+1 -1
View File
@@ -2,7 +2,7 @@
* drivers/net/skeleton.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions