Lines Matching defs:count
36 uint32_t count = 0;
53 buf[count++] = OSAL_READB(port->physBase + UART_DR);
57 if (CheckMagicKey(buf[count - 1], CONSOLE_SERIAL)) {
60 } while (count < FIFO_SIZE);
61 udd->recv(udd, buf, count);
303 static int32_t Pl011StartTx(struct UartDriverData *udd, const char *buf, size_t count)
307 if (udd == NULL || buf == NULL || count == 0) {
317 (void)UartPutsReg(port->physBase, buf, count, UART_WITH_LOCK);
355 int32_t Pl011Read(struct UartDriverData *udd, char *buf, size_t count)
363 if (udd == NULL || buf == NULL || count == 0 || udd->rxTransfer == NULL) {
376 upperHalf = (count > (wp - rp)) ? (wp - rp) : count;
382 count = (count > (BUF_SIZE - rp + wp)) ? (BUF_SIZE - rp + wp) : count;
383 upperHalf = (count > (BUF_SIZE - rp)) ? (BUF_SIZE - rp) : count;
384 lowerHalf = (count > (BUF_SIZE - rp)) ? (count - (BUF_SIZE - rp)) : 0;
410 int32_t PL011UartRecvNotify(struct UartDriverData *udd, const char *buf, size_t count)
418 if (udd == NULL || buf == NULL || count == 0 || udd->rxTransfer == NULL) {
427 upperHalf = (count > (rp - wp - 1)) ? (rp - wp - 1) : count;
433 count = (count > ((BUF_SIZE - wp) + rp - 1)) ? (BUF_SIZE - wp) + rp - 1 : count;
434 upperHalf = (count > (BUF_SIZE - wp)) ? (BUF_SIZE - wp) : count;
435 lowerHalf = (count > (BUF_SIZE - wp)) ? (count - (BUF_SIZE - wp)) : 0;