1 /* 2 * Copyright (c) 2006-2024, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2021-09-09 WCH the first version 9 */ 10 11 #ifndef __DRV_ETH_H__ 12 #define __DRV_ETH_H__ 13 #include "rthw.h" 14 #include "rtthread.h" 15 #include "ch32v30x_eth.h" 16 17 18 /* MII/MDI interface select */ 19 #define PHY_ADDRESS 0x01 20 #define USE10BASE_T 21 22 #ifndef USE10BASE_T 23 #define USE_GIGA_MAC 24 #ifndef USE_GIGA_MAC 25 #define USE_FAST_MAC 26 #endif 27 #endif 28 29 #define ETH_RXBUFNB 6 30 #define ETH_TXBUFNB 6 31 32 typedef struct 33 { 34 u32 length; 35 u32 buffer; 36 ETH_DMADESCTypeDef *descriptor; 37 }FrameTypeDef; 38 39 #endif 40