introduce 'main' queue between USB receive and UART TX

In order to handle other USB commands like GET_STATUS, SET_ATR
or GET_STATS, we introduce an intermediary queue.  The USB receive
completion call-back puts the command on that intermediate 'main'
queue.  From that intermediate queue, the are further
dispatched/processed according to their mesage type.
This commit is contained in:
Harald Welte
2016-03-02 13:56:59 +01:00
parent ad43440d93
commit ebb80eda19
2 changed files with 42 additions and 4 deletions

View File

@@ -84,7 +84,7 @@ static void usb_read_cb(uint8_t *arg, uint8_t status, uint32_t transferred,
req_ctx_put(rctx);
return;
}
req_ctx_set_state(rctx, RCTX_S_UART_TX_PENDING);
req_ctx_set_state(rctx, RCTX_S_MAIN_PROCESSING);
llist_add_tail(&rctx->list, queue);
}