drv_eth.h 684 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. #ifndef __DRV_ETH_H__
  11. #define __DRV_ETH_H__
  12. #include "rthw.h"
  13. #include "rtthread.h"
  14. #include "ch32v30x_eth.h"
  15. /* MII/MDI interface select */
  16. #define PHY_ADDRESS 0x01
  17. #define USE10BASE_T
  18. #ifndef USE10BASE_T
  19. #define USE_GIGA_MAC
  20. #ifndef USE_GIGA_MAC
  21. #define USE_FAST_MAC
  22. #endif
  23. #endif
  24. #define ETH_RXBUFNB 6
  25. #define ETH_TXBUFNB 6
  26. typedef struct
  27. {
  28. u32 length;
  29. u32 buffer;
  30. ETH_DMADESCTypeDef *descriptor;
  31. }FrameTypeDef;
  32. #endif