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

Function console_getchar_rx_ind

components/net/at/src/at_cli.c:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42static rt_err_t console_getchar_rx_ind(rt_device_t dev, rt_size_t size)
43{
44 uint8_t ch;
45 rt_size_t i;
46
47 for (i = 0; i < size; i++)
48 {
49 /* read a char */
50 if (rt_device_read(dev, 0, &ch, 1))
51 {
52 rt_ringbuffer_put_force(console_rx_fifo, &ch, 1);
53 rt_sem_release(&console_rx_notice);
54 }
55 }
56
57 return RT_EOK;
58}
59
60void at_cli_init(void)
61{

Callers

nothing calls this directly

Calls 3

rt_device_readFunction · 0.85
rt_ringbuffer_put_forceFunction · 0.85
rt_sem_releaseFunction · 0.85

Tested by

no test coverage detected