MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / at_client_getchar

Function at_client_getchar

components/net/at/src/at_client.c:754–774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

752}
753
754static 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
776static int at_recv_readline(at_client_t client)
777{

Callers 1

at_recv_readlineFunction · 0.85

Calls 1

rt_device_readFunction · 0.85

Tested by

no test coverage detected