Fix double buffer not disabled for smaller devices.

This commit is contained in:
HiFiPhile
2024-08-12 18:38:23 +02:00
committed by hathach
parent f565267daf
commit 96c5c72e97

View File

@@ -650,10 +650,11 @@ bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet
/* Create a packet memory buffer area. Enable double buffering for devices with 2048 bytes PMA, /* Create a packet memory buffer area. Enable double buffering for devices with 2048 bytes PMA,
for smaller devices double buffering occupy too much space. */ for smaller devices double buffering occupy too much space. */
uint32_t pma_addr = dcd_pma_alloc(largest_packet_size, true);
#if FSDEV_PMA_SIZE > 1024u #if FSDEV_PMA_SIZE > 1024u
uint32_t pma_addr = dcd_pma_alloc(largest_packet_size, true);
uint16_t pma_addr2 = pma_addr >> 16; uint16_t pma_addr2 = pma_addr >> 16;
#else #else
uint32_t pma_addr = dcd_pma_alloc(largest_packet_size, false);
uint16_t pma_addr2 = pma_addr; uint16_t pma_addr2 = pma_addr;
#endif #endif