feat add ethernet driver for hc32f4a0 board, compile OK and PHY Loop-Back test OK

This commit is contained in:
Liu_Weichao
2022-12-05 17:46:56 +08:00
parent dc8244cc5d
commit 465241e569
12 changed files with 1033 additions and 3 deletions
@@ -68,7 +68,6 @@
#include "board.h"
#include "ethernet.h"
#include "connect_ethernet.h"
#include <transform.h>
char lwip_ipaddr[20] = {192, 168, 131, 77};
char lwip_netmask[20] = {255, 255, 254, 0};
@@ -18,8 +18,8 @@
* @date 2021.12.15
*/
#include "board.h"
#include "sys_arch.h"
#include <board.h>
#include <sys_arch.h>
#include <shell.h>
#include <sys.h>
#include <string.h>
@@ -73,7 +73,9 @@ SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) |
void LwipShowIPTask(int argc, char *argv[])
{
#ifdef configMAC_ADDR
char mac_addr0[] = configMAC_ADDR;
#endif
lw_notice("\r\n************************************************\r\n");
lw_notice(" Network Configuration\r\n");
@@ -84,8 +86,10 @@ void LwipShowIPTask(int argc, char *argv[])
((u8_t *)&lwip_eth0_netmask)[2], ((u8_t *)&lwip_eth0_netmask)[3]);
lw_notice(" ETH0 IPv4 Gateway : %u.%u.%u.%u\r\n", ((u8_t *)&lwip_gwaddr)[0], ((u8_t *)&lwip_eth0_gwaddr)[1],
((u8_t *)&lwip_eth0_gwaddr)[2], ((u8_t *)&lwip_eth0_gwaddr)[3]);
#ifdef configMAC_ADDR
lw_notice(" ETH0 MAC Address : %x:%x:%x:%x:%x:%x\r\n", mac_addr0[0], mac_addr0[1], mac_addr0[2],
mac_addr0[3], mac_addr0[4], mac_addr0[5]);
#endif
#ifdef BOARD_NET_COUNT
if(BOARD_NET_COUNT > 1)
{