| 345 | ****************************************************************************/ |
| 346 | |
| 347 | static void sim_reqcomplete(struct sim_ep_s *privep, int16_t result) |
| 348 | { |
| 349 | struct sim_req_s *privreq; |
| 350 | irqstate_t flags; |
| 351 | |
| 352 | /* Remove the completed request at the head of the endpoint request list */ |
| 353 | |
| 354 | flags = enter_critical_section(); |
| 355 | privreq = sim_rqdequeue(&privep->reqq); |
| 356 | leave_critical_section(flags); |
| 357 | |
| 358 | if (privreq) |
| 359 | { |
| 360 | /* Save the result in the request structure */ |
| 361 | |
| 362 | privreq->req.result = result; |
| 363 | |
| 364 | privep->epstate = SIM_EPSTATE_IDLE; |
| 365 | |
| 366 | /* Callback to the request completion handler */ |
| 367 | |
| 368 | privreq->req.callback(&privep->ep, &privreq->req); |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | /**************************************************************************** |
| 373 | * Name: sim_reqwrite |
no test coverage detected