summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
81e5735)
#define I2S_CACHED_CHUNK_SIZE 2
#define I2S_CACHED_CHUNK_SIZE 2
i2s_status |= I2S_STATUS_END_TX;
i2s_status &= ~I2S_STATUS_TX;
i2s_status |= I2S_STATUS_END_TX;
i2s_status &= ~I2S_STATUS_TX;
remaing_size -= chunk_size;
next_idx += chunk_size;
remaing_size -= chunk_size;
next_idx += chunk_size;
- if (chunk_size >= remaing_size)
- break;
-
+ if (remaing_size <= 0)
+ {
+ remaing_size = transfer_size;
+ next_idx = 0;
+ }
}
dmac_setLLITransfer(I2S_DMAC_CH, prev, I2S_TX_DMAC_CFG);
}
dmac_setLLITransfer(I2S_DMAC_CH, prev, I2S_TX_DMAC_CFG);
remaing_size -= chunk_size;
next_idx += chunk_size;
remaing_size -= chunk_size;
next_idx += chunk_size;
- if (chunk_size >= remaing_size)
- break;
+ if (remaing_size <= 0)
+ {
+ remaing_size = transfer_size;
+ next_idx = 0;
+ }
}
dmac_setLLITransfer(I2S_DMAC_CH, prev, I2S_RX_DMAC_CFG);
}
dmac_setLLITransfer(I2S_DMAC_CH, prev, I2S_RX_DMAC_CFG);