• Home
  • Raw
  • Download

Lines Matching refs:max_len

1130 int PORT_ReadData(uint16_t handle, char* p_data, uint16_t max_len,  in PORT_ReadData()  argument
1136 RFCOMM_TRACE_API("PORT_ReadData() handle:%d max_len:%d", handle, max_len); in PORT_ReadData()
1160 while (max_len) { in PORT_ReadData()
1164 if (p_buf->len > max_len) { in PORT_ReadData()
1165 memcpy(p_data, (uint8_t*)(p_buf + 1) + p_buf->offset, max_len); in PORT_ReadData()
1166 p_buf->offset += max_len; in PORT_ReadData()
1167 p_buf->len -= max_len; in PORT_ReadData()
1169 *p_len += max_len; in PORT_ReadData()
1173 p_port->rx.queue_size -= max_len; in PORT_ReadData()
1182 max_len -= p_buf->len; in PORT_ReadData()
1188 if (max_len) { in PORT_ReadData()
1550 int PORT_WriteData(uint16_t handle, const char* p_data, uint16_t max_len, in PORT_WriteData() argument
1558 RFCOMM_TRACE_API("PORT_WriteData() max_len:%d", max_len); in PORT_WriteData()
1573 if (!max_len || !p_port->peer_mtu) { in PORT_WriteData()
1588 if ((p_buf != NULL) && ((p_buf->len + max_len) <= p_port->peer_mtu) && in PORT_WriteData()
1589 ((p_buf->len + max_len) <= length)) { in PORT_WriteData()
1590 memcpy((uint8_t*)(p_buf + 1) + p_buf->offset + p_buf->len, p_data, max_len); in PORT_WriteData()
1591 p_port->tx.queue_size += max_len; in PORT_WriteData()
1593 *p_len = max_len; in PORT_WriteData()
1594 p_buf->len += max_len; in PORT_WriteData()
1603 while (max_len) { in PORT_WriteData()
1615 if (max_len < length) length = max_len; in PORT_WriteData()
1633 max_len -= length; in PORT_WriteData()
1636 if (!max_len && (rc != PORT_CMD_PENDING) && (rc != PORT_TX_QUEUE_DISABLED)) in PORT_WriteData()