mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-01 05:52:32 +07:00
XMC4 driver: added IDE compatibility
This commit is contained in:
+12
-6
@@ -19869,10 +19869,16 @@ struct ETH_GLOBAL_TypeDef {
|
||||
#define ETH_DESC_CNT 4 // Descriptors count
|
||||
#define ETH_DS 4 // Descriptor size (words)
|
||||
|
||||
static uint8_t s_rxbuf[ETH_DESC_CNT][ETH_PKT_SIZE];
|
||||
static uint8_t s_txbuf[ETH_DESC_CNT][ETH_PKT_SIZE];
|
||||
static uint32_t s_rxdesc[ETH_DESC_CNT][ETH_DS]; // RX descriptors
|
||||
static uint32_t s_txdesc[ETH_DESC_CNT][ETH_DS]; // TX descriptors
|
||||
#ifndef ETH_RAM_SECTION
|
||||
// if no section is specified, then the data will be placed in the default
|
||||
// bss section
|
||||
#define ETH_RAM_SECTION
|
||||
#endif
|
||||
|
||||
static uint8_t s_rxbuf[ETH_DESC_CNT][ETH_PKT_SIZE] ETH_RAM_SECTION;
|
||||
static uint8_t s_txbuf[ETH_DESC_CNT][ETH_PKT_SIZE] ETH_RAM_SECTION;
|
||||
static uint32_t s_rxdesc[ETH_DESC_CNT][ETH_DS] ETH_RAM_SECTION; // RX descriptors
|
||||
static uint32_t s_txdesc[ETH_DESC_CNT][ETH_DS] ETH_RAM_SECTION; // TX descriptors
|
||||
static uint8_t s_txno; // Current TX descriptor
|
||||
static uint8_t s_rxno; // Current RX descriptor
|
||||
|
||||
@@ -20021,8 +20027,8 @@ static bool mg_tcpip_driver_xmc_up(struct mg_tcpip_if *ifp) {
|
||||
return up;
|
||||
}
|
||||
|
||||
void ETH0_IRQHandler(void);
|
||||
void ETH0_IRQHandler(void) {
|
||||
void ETH0_0_IRQHandler(void);
|
||||
void ETH0_0_IRQHandler(void) {
|
||||
uint32_t irq_status = ETH0->STATUS;
|
||||
|
||||
// check if a frame was received
|
||||
|
||||
+12
-6
@@ -35,10 +35,16 @@ struct ETH_GLOBAL_TypeDef {
|
||||
#define ETH_DESC_CNT 4 // Descriptors count
|
||||
#define ETH_DS 4 // Descriptor size (words)
|
||||
|
||||
static uint8_t s_rxbuf[ETH_DESC_CNT][ETH_PKT_SIZE];
|
||||
static uint8_t s_txbuf[ETH_DESC_CNT][ETH_PKT_SIZE];
|
||||
static uint32_t s_rxdesc[ETH_DESC_CNT][ETH_DS]; // RX descriptors
|
||||
static uint32_t s_txdesc[ETH_DESC_CNT][ETH_DS]; // TX descriptors
|
||||
#ifndef ETH_RAM_SECTION
|
||||
// if no section is specified, then the data will be placed in the default
|
||||
// bss section
|
||||
#define ETH_RAM_SECTION
|
||||
#endif
|
||||
|
||||
static uint8_t s_rxbuf[ETH_DESC_CNT][ETH_PKT_SIZE] ETH_RAM_SECTION;
|
||||
static uint8_t s_txbuf[ETH_DESC_CNT][ETH_PKT_SIZE] ETH_RAM_SECTION;
|
||||
static uint32_t s_rxdesc[ETH_DESC_CNT][ETH_DS] ETH_RAM_SECTION; // RX descriptors
|
||||
static uint32_t s_txdesc[ETH_DESC_CNT][ETH_DS] ETH_RAM_SECTION; // TX descriptors
|
||||
static uint8_t s_txno; // Current TX descriptor
|
||||
static uint8_t s_rxno; // Current RX descriptor
|
||||
|
||||
@@ -187,8 +193,8 @@ static bool mg_tcpip_driver_xmc_up(struct mg_tcpip_if *ifp) {
|
||||
return up;
|
||||
}
|
||||
|
||||
void ETH0_IRQHandler(void);
|
||||
void ETH0_IRQHandler(void) {
|
||||
void ETH0_0_IRQHandler(void);
|
||||
void ETH0_0_IRQHandler(void) {
|
||||
uint32_t irq_status = ETH0->STATUS;
|
||||
|
||||
// check if a frame was received
|
||||
|
||||
Reference in New Issue
Block a user