Home | History | Annotate | Download | only in rfcomm

Lines Matching refs:max_len

1136  *                  max_len     - Byte count requested
1140 int PORT_ReadData(uint16_t handle, char* p_data, uint16_t max_len,
1146 RFCOMM_TRACE_API("PORT_ReadData() handle:%d max_len:%d", handle, max_len);
1170 while (max_len) {
1174 if (p_buf->len > max_len) {
1175 memcpy(p_data, (uint8_t*)(p_buf + 1) + p_buf->offset, max_len);
1176 p_buf->offset += max_len;
1177 p_buf->len -= max_len;
1179 *p_len += max_len;
1183 p_port->rx.queue_size -= max_len;
1192 max_len -= p_buf->len;
1198 if (max_len) {
1441 /* Length for each buffer is the smaller of GKI buffer, peer MTU, or max_len
1469 // max_len);
1556 * max_len - Byte count requested
1560 int PORT_WriteData(uint16_t handle, const char* p_data, uint16_t max_len,
1568 RFCOMM_TRACE_API("PORT_WriteData() max_len:%d", max_len);
1583 if (!max_len || !p_port->peer_mtu) {
1588 /* Length for each buffer is the smaller of GKI buffer, peer MTU, or max_len
1598 if ((p_buf != NULL) && ((p_buf->len + max_len) <= p_port->peer_mtu) &&
1599 ((p_buf->len + max_len) <= length)) {
1600 memcpy((uint8_t*)(p_buf + 1) + p_buf->offset + p_buf->len, p_data, max_len);
1601 p_port->tx.queue_size += max_len;
1603 *p_len = max_len;
1604 p_buf->len += max_len;
1613 while (max_len) {
1625 if (max_len < length) length = max_len;
1643 max_len -= length;
1646 if (!max_len && (rc != PORT_CMD_PENDING) && (rc != PORT_TX_QUEUE_DISABLED))
1666 * max_len - Byte count requested