Refactor packet handling

This commit is contained in:
kkitayam
2021-09-25 16:59:17 +09:00
parent a978828c3a
commit d88cc23ca5
3 changed files with 90 additions and 95 deletions

View File

@@ -141,10 +141,10 @@ void video_task(void)
}
}
int tud_video_frame_xfer_complete_cb(void)
int tud_video_frame_xfer_complete_cb(unsigned itf)
{
/* prepare tx */
tud_video_n_frame_xfer(0, 0, (void*)frames[current_frame], 128 * 96 * 12/8);
tud_video_n_frame_xfer(itf, 0, (void*)frames[current_frame], 128 * 96 * 12/8);
++current_frame;
if (current_frame == sizeof(frames)/sizeof(frames[0]))
current_frame = 0;