Lines Matching defs:count
35 uint32_t count = 0;
52 buf[count++] = OSAL_READB(port->physBase + UART_DR);
56 if (CheckMagicKey(buf[count - 1], CONSOLE_SERIAL)) {
59 } while (count < FIFO_SIZE);
60 udd->recv(udd, buf, count);
302 static int32_t Pl011StartTx(struct UartDriverData *udd, const char *buf, size_t count)
306 if (udd == NULL || buf == NULL || count == 0) {
316 (void)UartPutsReg(port->physBase, buf, count, UART_WITH_LOCK);
354 int32_t Pl011Read(struct UartDriverData *udd, char *buf, size_t count)
362 if (udd == NULL || buf == NULL || count == 0 || udd->rxTransfer == NULL) {
375 upperHalf = (count > (wp - rp)) ? (wp - rp) : count;
381 count = (count > (BUF_SIZE - rp + wp)) ? (BUF_SIZE - rp + wp) : count;
382 upperHalf = (count > (BUF_SIZE - rp)) ? (BUF_SIZE - rp) : count;
383 lowerHalf = (count > (BUF_SIZE - rp)) ? (count - (BUF_SIZE - rp)) : 0;
409 int32_t PL011UartRecvNotify(struct UartDriverData *udd, const char *buf, size_t count)
417 if (udd == NULL || buf == NULL || count == 0 || udd->rxTransfer == NULL) {
426 upperHalf = (count > (rp - wp - 1)) ? (rp - wp - 1) : count;
432 count = (count > ((BUF_SIZE - wp) + rp - 1)) ? (BUF_SIZE - wp) + rp - 1 : count;
433 upperHalf = (count > (BUF_SIZE - wp)) ? (BUF_SIZE - wp) : count;
434 lowerHalf = (count > (BUF_SIZE - wp)) ? (count - (BUF_SIZE - wp)) : 0;