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

Function consumer_thread_entry

examples/test/ringbuffer_test.c:68–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66MSH_CMD_EXPORT(ringbuffer_force_example, ringbuffer example);
67
68static void consumer_thread_entry(void *arg)
69{
70 char ch;
71 while (1)
72 {
73 if (1 == rt_ringbuffer_getchar(rb, &ch))
74 {
75 rt_kprintf("[Consumer] <- %c\n", ch);
76 }
77 rt_thread_mdelay(500);
78 }
79}
80static void ringbuffer_sample(int argc, char** argv)
81{
82 rt_thread_t tid;

Callers

nothing calls this directly

Calls 3

rt_ringbuffer_getcharFunction · 0.85
rt_kprintfFunction · 0.85
rt_thread_mdelayFunction · 0.85

Tested by

no test coverage detected