14a532290d
Move runtime CH390 transactions behind a single ch390_runtime owner so main, lwIP glue, and EXTI no longer compete for SPI access. Keep the system stable under runtime load and capture the remaining CH390 readback failure as a credible low-level device-response issue in the handoff logs.
29 lines
650 B
C
29 lines
650 B
C
/**
|
|
* @file ethernetif.h
|
|
* @brief CH390 Ethernet interface for lwIP NO_SYS mode.
|
|
*/
|
|
|
|
#ifndef __ETHERNETIF_H__
|
|
#define __ETHERNETIF_H__
|
|
|
|
#include "lwip/err.h"
|
|
#include "lwip/netif.h"
|
|
#include "ch390_runtime.h"
|
|
|
|
struct ethernetif {
|
|
uint16_t rx_len;
|
|
uint8_t rx_status;
|
|
};
|
|
|
|
extern struct netif ch390_netif;
|
|
|
|
err_t ethernetif_init(struct netif *netif);
|
|
void ethernetif_input(struct netif *netif);
|
|
void lwip_netif_init(const ip4_addr_t *ipaddr, const ip4_addr_t *netmask, const ip4_addr_t *gw);
|
|
void ethernetif_check_link(void);
|
|
void ethernetif_poll(void);
|
|
void ethernetif_set_irq_pending(void);
|
|
uint8_t ethernetif_is_irq_pending(void);
|
|
|
|
#endif
|