cortex_m_log/printer/
dummy.rs

1//! Dummy module
2
3use core::fmt;
4
5/// Dummy printer
6pub struct Dummy {
7    inner: crate::destination::Dummy,
8}
9
10impl Dummy {
11    /// Create dummy printer
12    pub const fn new() -> Self {
13        Dummy { inner: crate::destination::Dummy }
14    }
15}
16
17impl super::Printer for Dummy {
18    type W = crate::destination::Dummy;
19    type M = crate::modes::InterruptFree;
20
21    #[inline]
22    fn destination(&mut self) -> &mut Self::W {
23        &mut self.inner
24    }
25
26    #[inline]
27    fn print(&mut self, _: fmt::Arguments) {}
28
29    #[inline]
30    fn println(&mut self, _: fmt::Arguments) {}
31}