Lines Matching refs:bytes_can_write
1630 size_t bytes_can_write; in i2s_write() local
1649 bytes_can_write = p_i2s[i2s_num]->tx->buf_size - p_i2s[i2s_num]->tx->rw_pos; in i2s_write()
1650 if (bytes_can_write > size) { in i2s_write()
1651 bytes_can_write = size; in i2s_write()
1653 memcpy(data_ptr, src_byte, bytes_can_write); in i2s_write()
1654 size -= bytes_can_write; in i2s_write()
1655 src_byte += bytes_can_write; in i2s_write()
1656 p_i2s[i2s_num]->tx->rw_pos += bytes_can_write; in i2s_write()
1657 (*bytes_written) += bytes_can_write; in i2s_write()
1669 int bytes_can_write; in i2s_write_expand() local
1711 bytes_can_write = p_i2s[i2s_num]->tx->buf_size - p_i2s[i2s_num]->tx->rw_pos; in i2s_write_expand()
1712 if (bytes_can_write > (int)size) { in i2s_write_expand()
1713 bytes_can_write = size; in i2s_write_expand()
1715 tail = bytes_can_write % aim_bytes; in i2s_write_expand()
1716 bytes_can_write = bytes_can_write - tail; in i2s_write_expand()
1718 memset(data_ptr, 0, bytes_can_write); in i2s_write_expand()
1719 for (int j = 0; j < bytes_can_write; j += (aim_bytes - zero_bytes)) { in i2s_write_expand()
1724 size -= bytes_can_write; in i2s_write_expand()
1725 p_i2s[i2s_num]->tx->rw_pos += bytes_can_write; in i2s_write_expand()