fw: remove vestiges of TCP logging attempt

This commit is contained in:
David Lenfesty 2023-06-16 16:31:43 -06:00
parent 800c6012f2
commit d4d119dc6e

View File

@ -8,8 +8,6 @@ use core::arch::asm;
#[defmt::global_logger]
struct DefmtLogger;
static mut LOGGER_SOCKET: Option<&'static mut smoltcp::socket::tcp::Socket> = None;
unsafe impl defmt::Logger for DefmtLogger {
fn acquire() {
// Sync methods left empty because we don't use any interrupts
@ -35,12 +33,3 @@ unsafe impl defmt::Logger for DefmtLogger {
}
}
}
/// Set the TCP socket to use for defmt logging.
///
/// SAFETY: Upcasts the reference from immutable ref to 'static mutable ref,
/// ensure this socket exists forever, or at least until you call this with a
/// None.
pub unsafe fn set_logger_socket(socket: Option<&smoltcp::socket::tcp::Socket>) {
LOGGER_SOCKET = core::mem::transmute(socket);
}