feat: 完成TCP2UART透传核心集成

集成CH390驱动、LwIP协议栈和FreeRTOS多任务透传框架,确保TCP Server/Client与UART链路按配置稳定联动。
This commit is contained in:
2026-03-30 11:39:40 +08:00
parent d5803ca7dd
commit 4996b451d9
235 changed files with 80607 additions and 27 deletions
@@ -0,0 +1,27 @@
#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_ */