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

@@ -258,7 +258,7 @@ void usbh_cdc_ncm_rx_thread(void *argument)
int ret;
err_t err;
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;
@@ -321,7 +321,7 @@ find_class:
p = pbuf_alloc(PBUF_RAW, ndp16_datagram->wDatagramLength, type);
if (p != NULL) {
#ifdef LWIP_TCPIP_CORE_LOCKING_INPUT
#if LWIP_TCPIP_CORE_LOCKING_INPUT
p->payload = (uint8_t *)&g_cdc_ncm_rx_buffer[ndp16_datagram->wDatagramIndex];
#else
memcpy(p->payload, (uint8_t *)&g_cdc_ncm_rx_buffer[ndp16_datagram->wDatagramIndex], ndp16_datagram->wDatagramLength);