fix(uhci): use UHCI_ALIGN_UP instead of ESP_ALIGN_UP on release branch

ESP_ALIGN_UP is not available on release/v6.0; restore the local macro.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
C.S.M
2026-09-15 11:00:25 +08:00
co-authored by Cursor
parent a704d945f7
commit dd2897b1ed
2 changed files with 2 additions and 2 deletions
+1 -2
View File
@@ -16,7 +16,6 @@
#include "esp_attr.h"
#include "esp_log.h"
#include "esp_check.h"
#include "esp_macros.h"
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include "freertos/queue.h"
@@ -136,7 +135,7 @@ static bool uhci_gdma_rx_callback_done(gdma_channel_handle_t dma_chan, gdma_even
// Round the invalidate size up to a full cache line. Each node buffer is itself cache-line
// aligned and a whole multiple of the cache line, so the extra bytes stay inside this same
// node buffer (never a neighbor) and only discard DMA scratch past the frame end.
sync_size = ESP_ALIGN_UP(rx_size, cache_line);
sync_size = UHCI_ALIGN_UP(rx_size, cache_line);
}
uhci_rx_event_data_t evt_data = {
@@ -22,6 +22,7 @@ extern "C" {
typedef struct uhci_controller_t uhci_controller_t;
#define UHCI_ALIGN_UP(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
#define UHCI_MAX(a, b) (((a)>(b))?(a):(b))
#define UHCI_PM_LOCK_NAME_LEN_MAX 16