Skip to content

Commit eaf2def

Browse files
committed
esp32s2: fix build errors in cam.c
1 parent dc6472b commit eaf2def

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/esp32s2/cam.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,13 +435,13 @@ void cam_dma_config(const cam_config_t *config) {
435435
cam_obj->dma = (lldesc_t *)heap_caps_malloc(cam_obj->node_cnt * sizeof(lldesc_t), MALLOC_CAP_DMA);
436436
cam_obj->buffer = (uint8_t *)heap_caps_malloc(cam_obj->buffer_size * sizeof(uint8_t), MALLOC_CAP_DMA);
437437

438-
for (int x = 0; x < cam_obj->node_cnt; x++) {
438+
for (uint32_t x = 0; x < cam_obj->node_cnt; x++) {
439439
cam_obj->dma[x].size = cam_obj->dma_size;
440440
cam_obj->dma[x].length = cam_obj->dma_size;
441441
cam_obj->dma[x].eof = 0;
442442
cam_obj->dma[x].owner = 1;
443443
cam_obj->dma[x].buf = (cam_obj->buffer + cam_obj->dma_size * x);
444-
cam_obj->dma[x].empty = &cam_obj->dma[(x + 1) % cam_obj->node_cnt];
444+
cam_obj->dma[x].empty = (intptr_t)&cam_obj->dma[(x + 1) % cam_obj->node_cnt];
445445
}
446446

447447
I2S0.in_link.addr = ((uint32_t)&cam_obj->dma[0]) & 0xfffff;

0 commit comments

Comments
 (0)