| 184 | } |
| 185 | |
| 186 | static 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 | |
| 220 | static void rt_lower_work(struct rt_work* work, void* work_data) |
no test coverage detected