fix(class): change ifdef to if for LWIP_TCPIP_CORE_LOCKING_INPUT

This commit is contained in:
sakumisu
2024-05-14 13:59:39 +08:00
parent 207fb7b128
commit 490cac1a0f
5 changed files with 10 additions and 10 deletions

View File

@@ -657,7 +657,7 @@ void usbh_asix_rx_thread(void *argument)
uint16_t len;
uint16_t len_crc;
struct pbuf *p;
#ifdef LWIP_TCPIP_CORE_LOCKING_INPUT
#if LWIP_TCPIP_CORE_LOCKING_INPUT
pbuf_type type = PBUF_ROM;
#else
pbuf_type type = PBUF_POOL;
@@ -704,7 +704,7 @@ find_class:
p = pbuf_alloc(PBUF_RAW, len, type);
if (p != NULL) {
#ifdef LWIP_TCPIP_CORE_LOCKING_INPUT
#if LWIP_TCPIP_CORE_LOCKING_INPUT
p->payload = (uint8_t *)&g_asix_rx_buffer[4];
#else
memcpy(p->payload, (uint8_t *)&g_asix_rx_buffer[4], len);

View File

@@ -2133,7 +2133,7 @@ void usbh_rtl8152_rx_thread(void *argument)
uint16_t len;
uint16_t data_offset;
struct pbuf *p;
#ifdef LWIP_TCPIP_CORE_LOCKING_INPUT
#if LWIP_TCPIP_CORE_LOCKING_INPUT
pbuf_type type = PBUF_ROM;
#else
pbuf_type type = PBUF_POOL;
@@ -2190,7 +2190,7 @@ find_class:
p = pbuf_alloc(PBUF_RAW, len, type);
if (p != NULL) {
#ifdef LWIP_TCPIP_CORE_LOCKING_INPUT
#if LWIP_TCPIP_CORE_LOCKING_INPUT
p->payload = (uint8_t *)&g_rtl8152_rx_buffer[data_offset + sizeof(struct rx_desc)];
#else
memcpy(p->payload, (uint8_t *)&g_rtl8152_rx_buffer[data_offset + sizeof(struct rx_desc)], len);