mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix: fix minor issues in isp and i2s
This commit is contained in:
parent
02da65314b
commit
7ac567df96
@ -371,7 +371,7 @@ uint32_t i2s_get_buf_size(i2s_chan_handle_t handle, uint32_t data_bit_width, uin
|
|||||||
for (int sign = 1; bufsize % alignment != 0; aligned_frame_num += sign) {
|
for (int sign = 1; bufsize % alignment != 0; aligned_frame_num += sign) {
|
||||||
bufsize = aligned_frame_num * bytes_per_frame;
|
bufsize = aligned_frame_num * bytes_per_frame;
|
||||||
/* If the buffer size exceed the max dma size */
|
/* If the buffer size exceed the max dma size */
|
||||||
if (bufsize > I2S_DMA_BUFFER_MAX_SIZE) {
|
if (bufsize > I2S_DMA_BUFFER_MAX_SIZE && sign == 1) {
|
||||||
sign = -1; // toggle the search sign
|
sign = -1; // toggle the search sign
|
||||||
aligned_frame_num = dma_frame_num; // Reset the frame num
|
aligned_frame_num = dma_frame_num; // Reset the frame num
|
||||||
bufsize = aligned_frame_num * bytes_per_frame; // Reset the bufsize
|
bufsize = aligned_frame_num * bytes_per_frame; // Reset the bufsize
|
||||||
|
@ -143,7 +143,7 @@ typedef struct {
|
|||||||
/**
|
/**
|
||||||
* @brief Prototype of ISP hist event callback
|
* @brief Prototype of ISP hist event callback
|
||||||
*
|
*
|
||||||
* @param[in] handle ISP hist controller handle
|
* @param[in] hist_ctlr ISP hist controller handle
|
||||||
* @param[in] edata ISP hist event data
|
* @param[in] edata ISP hist event data
|
||||||
* @param[in] user_data User registered context, registered when in `esp_isp_hist_register_event_callbacks()`
|
* @param[in] user_data User registered context, registered when in `esp_isp_hist_register_event_callbacks()`
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user