pub unsafe extern "C" fn Y2RU_SetReceiving(
    dst_buf: *mut c_void,
    image_size: u32_,
    transfer_unit: s16,
    transfer_gap: s16
) -> Result
Expand description

Configures the destination buffer.

§Arguments

  • src_buf - A pointer to the beginning of your destination buffer in FCRAM
  • image_size - The total size of the data buffer.
  • transfer_unit - Specifies the size of 1 DMA transfer. Usually set to 1 line. This has to be a divisor of image_size.
  • transfer_gap - Specifies the gap (offset) to be added after each transfer. Can be used to convert images with stride or only a part of it.

This specifies the destination buffer of the conversion. The actual transfer will only happen after calling Y2RU_StartConversion. The buffer does NOT need to be allocated in the linear heap.

transfer_unit+transfer_gap must be less than 32768 (0x8000)

Note: It seems that depending on the size of the image and of the transfer unit,it is possible for the end of conversion interrupt to be triggered right after the conversion began.One line as transfer_unit seems to trigger this issue for 400x240, setting to 2/4/8 lines fixes it.

Note: Setting a transfer_unit of 4 or 8 lines seems to bring the best results in terms of speed for a 400x240 image.