File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -104,13 +104,9 @@ void SpiDispatcher::threadFunc()
104
104
/* Wait blocking for the next IO transaction
105
105
* request to be posted to the mailbox.
106
106
*/
107
- osEvent evt = _spi_io_transaction_mailbox.get ( );
108
- if (evt. status == osEventMail )
107
+ SpiIoTransaction * spi_io_transaction = _spi_io_transaction_mailbox.try_get_for (rtos::Kernel::wait_for_u32_forever );
108
+ if (spi_io_transaction )
109
109
{
110
- /* Fetch the IO transaction request and
111
- * process it.
112
- */
113
- SpiIoTransaction * spi_io_transaction = reinterpret_cast <SpiIoTransaction *>(evt.value .p );
114
110
processSpiIoRequest (spi_io_transaction);
115
111
/* Free the allocated memory (memory allocated
116
112
* during dispatch(...)
Original file line number Diff line number Diff line change @@ -104,13 +104,9 @@ void WireDispatcher::threadFunc()
104
104
/* Wait blocking for the next IO transaction
105
105
* request to be posted to the mailbox.
106
106
*/
107
- osEvent evt = _wire_io_transaction_mailbox.get ( );
108
- if (evt. status == osEventMail )
107
+ WireIoTransaction * wire_io_transaction = _wire_io_transaction_mailbox.try_get_for (rtos::Kernel::wait_for_u32_forever );
108
+ if (wire_io_transaction )
109
109
{
110
- /* Fetch the IO transaction request and
111
- * process it.
112
- */
113
- WireIoTransaction * wire_io_transaction = reinterpret_cast <WireIoTransaction *>(evt.value .p );
114
110
processWireIoRequest (wire_io_transaction);
115
111
/* Free the allocated memory (memory allocated
116
112
* during dispatch(...)
You can’t perform that action at this time.
0 commit comments