Open FFBoard
Open source force feedback firmware
video_device.h File Reference

Go to the source code of this file.

Functions

bool tud_video_n_streaming (uint_fast8_t ctl_idx, uint_fast8_t stm_idx)
 
bool tud_video_n_frame_xfer (uint_fast8_t ctl_idx, uint_fast8_t stm_idx, void *buffer, size_t bufsize)
 
TU_ATTR_WEAK void tud_video_frame_xfer_complete_cb (uint_fast8_t ctl_idx, uint_fast8_t stm_idx)
 
TU_ATTR_WEAK int tud_video_power_mode_cb (uint_fast8_t ctl_idx, uint8_t power_mod)
 
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)
 
void videod_init (void)
 
bool videod_deinit (void)
 
void videod_reset (uint8_t rhport)
 
uint16_t videod_open (uint8_t rhport, tusb_desc_interface_t const *itf_desc, uint16_t max_len)
 
bool videod_control_xfer_cb (uint8_t rhport, uint8_t stage, tusb_control_request_t const *request)
 
bool videod_xfer_cb (uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes)
 

Function Documentation

◆ tud_video_commit_cb()

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 
)

Invoked when VS_COMMIT_CONTROL(SET_CUR) request received

Parameters
[in]ctl_idxDestination control interface index
[in]stm_idxDestination streaming interface index
[in]parametersVideo streaming parameters
Returns
video_error_code_t

◆ tud_video_frame_xfer_complete_cb()

TU_ATTR_WEAK void tud_video_frame_xfer_complete_cb ( uint_fast8_t  ctl_idx,
uint_fast8_t  stm_idx 
)

Invoked when compeletion of a frame transfer

Parameters
[in]ctl_idxDestination control interface index
[in]stm_idxDestination streaming interface index

◆ tud_video_n_frame_xfer()

bool tud_video_n_frame_xfer ( uint_fast8_t  ctl_idx,
uint_fast8_t  stm_idx,
void *  buffer,
size_t  bufsize 
)

Transfer a frame

Parameters
[in]ctl_idxDestination control interface index
[in]stm_idxDestination streaming interface index
[in]bufferFrame buffer. The caller must not use this buffer until the operation is completed.
[in]bufsizeByte size of the frame buffer

Definition at line 1202 of file video_device.c.

◆ tud_video_n_streaming()

bool tud_video_n_streaming ( uint_fast8_t  ctl_idx,
uint_fast8_t  stm_idx 
)

Return true if streaming

Parameters
[in]ctl_idxDestination control interface index
[in]stm_idxDestination streaming interface index

Definition at line 1182 of file video_device.c.

◆ tud_video_power_mode_cb()

TU_ATTR_WEAK int tud_video_power_mode_cb ( uint_fast8_t  ctl_idx,
uint8_t  power_mod 
)

Invoked when SET_POWER_MODE request received

Parameters
[in]ctl_idxDestination control interface index
[in]stm_idxDestination streaming interface index
Returns
video_error_code_t

◆ videod_control_xfer_cb()

bool videod_control_xfer_cb ( uint8_t  rhport,
uint8_t  stage,
tusb_control_request_t const *  request 
)

Definition at line 1342 of file video_device.c.

◆ videod_deinit()

bool videod_deinit ( void  )

Definition at line 1249 of file video_device.c.

◆ videod_init()

void videod_init ( void  )

Definition at line 1238 of file video_device.c.

◆ videod_open()

uint16_t videod_open ( uint8_t  rhport,
tusb_desc_interface_t const *  itf_desc,
uint16_t  max_len 
)

Definition at line 1265 of file video_device.c.

◆ videod_reset()

void videod_reset ( uint8_t  rhport)

Definition at line 1253 of file video_device.c.

◆ videod_xfer_cb()

bool videod_xfer_cb ( uint8_t  rhport,
uint8_t  ep_addr,
xfer_result_t  result,
uint32_t  xferred_bytes 
)

Definition at line 1380 of file video_device.c.