| 752 | } |
| 753 | |
| 754 | static rt_err_t at_client_getchar(at_client_t client, char *ch) |
| 755 | { |
| 756 | rt_err_t result = RT_EOK; |
| 757 | rt_ssize_t recvLen = 0; |
| 758 | /* Temporarily retain the distinction */ |
| 759 | #ifndef RT_USING_SERIAL_V2 |
| 760 | recvLen = rt_device_read(client->device, 0, ch, 1); |
| 761 | if (recvLen <= 0) |
| 762 | { |
| 763 | result = -RT_ERROR; |
| 764 | } |
| 765 | #else |
| 766 | recvLen = rt_device_read(client->device, 0, ch, 1); |
| 767 | if (recvLen != 1) |
| 768 | { |
| 769 | result = -RT_ERROR; |
| 770 | } |
| 771 | #endif |
| 772 | |
| 773 | return result; |
| 774 | } |
| 775 | |
| 776 | static int at_recv_readline(at_client_t client) |
| 777 | { |
no test coverage detected