forked from Imagelibrary/rtems
bsp/atsam: Add network interface driver
This commit is contained in:
committed by
Sebastian Huber
parent
0bd49f1535
commit
fb29ca55ea
@@ -420,6 +420,11 @@ libbsp_a_SOURCES += ../../../libcpu/shared/src/cache_manager.c
|
||||
libbsp_a_SOURCES += ../shared/armv7m/include/cache_.h
|
||||
libbsp_a_CPPFLAGS += -I$(srcdir)/../shared/armv7m/include
|
||||
|
||||
# Network
|
||||
if HAS_NETWORKING
|
||||
libbsp_a_SOURCES += network/if_atsam.c
|
||||
endif
|
||||
|
||||
# Includes
|
||||
libbsp_a_CPPFLAGS += -I$(srcdir)/../shared/CMSIS/Include
|
||||
libbsp_a_CPPFLAGS += -I$(srcdir)/libraries/libboard
|
||||
|
||||
@@ -34,6 +34,31 @@ uint32_t atsam_systick_frequency(void);
|
||||
|
||||
#define BSP_ARMV7M_SYSTICK_FREQUENCY atsam_systick_frequency()
|
||||
|
||||
struct rtems_bsdnet_ifconfig;
|
||||
|
||||
int if_atsam_attach(struct rtems_bsdnet_ifconfig *config, int attaching);
|
||||
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME "atsam0"
|
||||
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH if_atsam_attach
|
||||
|
||||
/**
|
||||
* @brief Interface driver configuration.
|
||||
*/
|
||||
typedef struct {
|
||||
/**
|
||||
* @brief Maximum retries for MDIO communication.
|
||||
*/
|
||||
uint32_t mdio_retries;
|
||||
|
||||
/**
|
||||
* @brief Address of PHY.
|
||||
*
|
||||
* Use -1 to search for a PHY.
|
||||
*/
|
||||
int phy_addr;
|
||||
} if_atsam_config;
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
1292
c/src/lib/libbsp/arm/atsam/network/if_atsam.c
Normal file
1292
c/src/lib/libbsp/arm/atsam/network/if_atsam.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user