From 4ca466b00b05d50ec338712f82a5b8b16ae7ce09 Mon Sep 17 00:00:00 2001 From: kkitayam <45088311+kkitayam@users.noreply.github.com> Date: Wed, 29 Sep 2021 22:59:46 +0900 Subject: [PATCH] Update comments --- src/class/video/video_device.c | 4 +--- src/class/video/video_device.h | 15 ++++++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/class/video/video_device.c b/src/class/video/video_device.c index 28ac860e1..12ccbd165 100644 --- a/src/class/video/video_device.c +++ b/src/class/video/video_device.c @@ -554,6 +554,7 @@ static bool _open_vs_itf(uint8_t rhport, videod_streaming_interface_t *stm, uint return true; } +/** Prepare the next packet payload. */ static uint_fast16_t _prepare_in_payload(videod_streaming_interface_t *stm) { uint_fast16_t remaining = stm->bufsize - stm->offset; @@ -857,7 +858,6 @@ static int handle_video_stm_req(uint8_t rhport, uint8_t stage, // APPLICATION API //--------------------------------------------------------------------+ -/* ctl_idx instance number of video control interface */ bool tud_video_n_connected(uint_fast8_t ctl_idx) { TU_ASSERT(ctl_idx < CFG_TUD_VIDEO); @@ -867,8 +867,6 @@ bool tud_video_n_connected(uint_fast8_t ctl_idx) return false; } -/* ctl_idx instance number of video control interface - * stm_idx index number of streaming interface as per video control */ bool tud_video_n_streaming(uint_fast8_t ctl_idx, uint_fast8_t stm_idx) { TU_ASSERT(ctl_idx < CFG_TUD_VIDEO); diff --git a/src/class/video/video_device.h b/src/class/video/video_device.h index e5012ca7e..ee2fcb9d5 100644 --- a/src/class/video/video_device.h +++ b/src/class/video/video_device.h @@ -39,11 +39,15 @@ extern "C" { // Application API (Multiple Ports) // CFG_TUD_VIDEO > 1 //--------------------------------------------------------------------+ -/* ctl_idx instance number of control interface - * stm_idx instance number of streaming interface */ + +/** Return true if streaming + * + * @param[in] ctl_idx Destination control interface index + * @param[in] stm_idx Destination streaming interface index */ bool tud_video_n_streaming(uint_fast8_t ctl_idx, uint_fast8_t stm_idx); -/** +/** Transfer a frame + * * @param[in] ctl_idx Destination control interface index * @param[in] stm_idx Destination streaming interface index * @param[in] buffer Frame buffer. The caller must not use this buffer until the operation is completed. @@ -70,8 +74,9 @@ TU_ATTR_WEAK int tud_video_power_mode_cb(uint_fast8_t ctl_idx, uint8_t power_mod /** Invoked when VS_COMMIT_CONTROL(SET_CUR) request received * - * @param[in] ctl_idx Destination control interface index - * @param[in] stm_idx Destination streaming interface index + * @param[in] ctl_idx Destination control interface index + * @param[in] stm_idx Destination streaming interface index + * @param[in] parameters Video streaming parameters * @return video_error_code_t */ TU_ATTR_WEAK int tud_video_commit_cb(uint_fast8_t ctl_idx, uint_fast8_t stm_idx, video_probe_and_commit_control_t const *parameters);