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

Function _lower_work

components/drivers/serial/bypass.c:186–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186static void _lower_work(struct rt_serial_device* serial)
187{
188 struct rt_list_node* node;
189 struct rt_serial_bypass_func* temp_curr = RT_NULL;
190 if (serial->bypass && serial->bypass->lower_h)
191 {
192 while (1)
193 {
194 char ch;
195 if (_bypass_getchar_form_serial_fifo(serial, &ch))
196 return;
197
198 node = serial->bypass->lower_h->head.next;
199
200 while (node != &serial->bypass->lower_h->head)
201 {
202 temp_curr = rt_container_of(node, struct rt_serial_bypass_func, node);
203
204 if (!temp_curr->bypass(serial, ch, temp_curr->data))
205 {
206 break;
207 }
208
209 node = node->next;
210 }
211 if (node == &serial->bypass->lower_h->head)
212 {
213 rt_bypass_putchar(serial, ch);
214 }
215 }
216 }
217}
218
219
220static void rt_lower_work(struct rt_work* work, void* work_data)

Callers 2

rt_lower_workFunction · 0.85
rt_bypass_work_straightFunction · 0.85

Calls 2

rt_bypass_putcharFunction · 0.85

Tested by

no test coverage detected