Skip to content

Commit

Permalink
Align the frame buffers to the structure alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
me-no-dev committed Jan 22, 2024
1 parent dba8da9 commit f00ca7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/cam_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static esp_err_t cam_dma_config(const camera_config_t *config)
cam_obj->dma_buffer = NULL;
cam_obj->dma = NULL;

cam_obj->frames = (cam_frame_t *)heap_caps_calloc(1, cam_obj->frame_cnt * sizeof(cam_frame_t), MALLOC_CAP_DEFAULT);
cam_obj->frames = (cam_frame_t *)heap_caps_aligned_calloc(alignof(cam_frame_t), 1, cam_obj->frame_cnt * sizeof(cam_frame_t), MALLOC_CAP_DEFAULT);
CAM_CHECK(cam_obj->frames != NULL, "frames malloc failed", ESP_FAIL);

uint8_t dma_align = 0;
Expand Down

0 comments on commit f00ca7d

Please sign in to comment.