Files
TCP2UART/Drivers/LwIP/src/include/netif/ethernetif.h
T
gaoro-xiao 4996b451d9 feat: 完成TCP2UART透传核心集成
集成CH390驱动、LwIP协议栈和FreeRTOS多任务透传框架,确保TCP Server/Client与UART链路按配置稳定联动。
2026-03-30 11:39:40 +08:00

28 lines
774 B
C

#ifndef _ETHERNETIF_H_
#define _ETHERNETIF_H_
#include "lwip/netif.h"
extern struct netif ch390_netif;
/**
* Helper struct to hold private data used to operate your ethernet interface.
* Keeping the ethernet address of the MAC in this struct is not necessary
* as it is already kept in the struct netif.
* But this is only an example, anyway...
*/
struct ethernetif {
// struct eth_addr *ethaddr;
/* Add whatever per-interface state that is needed here. */
uint16_t rx_len;
uint8_t rx_status;
};
void init_lwip_netif(const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw);
err_t ethernetif_init(struct netif *netif);
void ethernetif_input(struct netif *netif);
void print_netif(struct netif *netif);
#endif /* _ETHERNETIF_H_ */