From 0d0d41ed0bdfba3de003b8428782a2cc3b2c3278 Mon Sep 17 00:00:00 2001 From: Thomas Schaller Date: Fri, 15 Sep 2023 08:00:36 +0200 Subject: [PATCH] Fix UART queue (#304) --- src/uart.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uart.rs b/src/uart.rs index 0f91fe41001..717c640dc14 100644 --- a/src/uart.rs +++ b/src/uart.rs @@ -668,8 +668,8 @@ impl<'d> UartDriver<'d> { // SAFTEY: okay because Queue borrows self // SAFETY: we can safely use UartEvent instead of uart_event_t because of repr(transparent) let queue = match q_handle_raw.is_null() { - true => Some(unsafe { Queue::new_borrowed(q_handle_raw) }), - false => None, + false => Some(unsafe { Queue::new_borrowed(q_handle_raw) }), + true => None, }; Ok(Self {