Skip to content

Commit

Permalink
samples: video: capture: add support for SMARTDMA
Browse files Browse the repository at this point in the history
Add support for using the SMARTDMA engine on the FRDM-MCXN947 board with
the video capture sample.

Signed-off-by: Daniel DeGrasse <[email protected]>
  • Loading branch information
danieldegrasse committed Jun 7, 2024
1 parent f08584f commit bb59e5e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions samples/subsys/video/capture/boards/frdm_mcxn947_cpu0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CONFIG_VIDEO_BUFFER_POOL_SZ_MAX=40000
CONFIG_VIDEO_BUFFER_POOL_NUM_MAX=2
# Workaround for issue where SDMA driver needs to start before camera, so that
# clock output will be generated for camera device
CONFIG_CHECK_INIT_PRIORITIES=n
9 changes: 9 additions & 0 deletions samples/subsys/video/capture/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ int main(void)
return 0;
}

video = dev;
#elif defined(CONFIG_VIDEO_MCUX_SDMA)
const struct device *const dev = DEVICE_DT_GET_ONE(nxp_video_smartdma);

if (!device_is_ready(dev)) {
LOG_ERR("%s: device not ready.\n", dev->name);
return 0;
}

video = dev;
#endif

Expand Down

0 comments on commit bb59e5e

Please sign in to comment.