pub fn update_tpiu_baudrate(trace_clk_freq: u32, baud: u32) -> Result<(), Error> {
    if baud > trace_clk_freq || trace_clk_freq % baud != 0 {
        Err(Error::ImpossibleBaudRate)
    } else {
        let prescaler = (trace_clk_freq / baud) - 1;
        unsafe {
            (*TPIU::ptr()).acpr.write(prescaler);
        }
        Ok(())
    }
}
///Updates the tpiu prescaler to output the desired baud rate
///trace_clk_freq: The frequency of TRACECLKIN in HZ, this is HCLK on most STM32 devices
///                but is implementation specific. Check the ref manual for TRACECLKIN
///baud: The baud rate to set on SWO
///Returns an error if baud > trace_clk_freq or if trace_clk_freq % baud != 0
Updates the tpiu prescaler to output the desired baud rate
trace_clk_freq: The frequency of TRACECLKIN in HZ, this is HCLK on most STM32 devices
but is implementation specific. Check the ref manual for TRACECLKIN
baud: The baud rate to set on SWO
Returns an error if baud > trace_clk_freq or if trace_clk_freq % baud != 0
Updates the tpiu prescaler to output the desired baud rate trace_clk_freq : The frequency of TRACECLKIN in HZ this is HCLK on most STM32 devices but is implementation specific . Check the ref manual for TRACECLKIN baud : The baud rate to set on SWO Returns an error if baud > trace_clk_freq or if trace_clk_freq % baud ! = 0
pub fn update_tpiu_baudrate(trace_clk_freq: u32, baud: u32) -> Result<(), Error> {
    if baud > trace_clk_freq || trace_clk_freq % baud != 0 {
        Err(Error::ImpossibleBaudRate)
    } else {
        let prescaler = (trace_clk_freq / baud) - 1;
        unsafe {
            (*TPIU::ptr()).acpr.write(prescaler);
        }
        Ok(())
    }
}
pub fn update_tpiu_baudrate ( trace_clk_freq : u32 , baud : u32 ) -> Result < ( ) , Error > { if baud > trace_clk_freq || trace_clk_freq % baud != 0 { Err ( Error :: ImpossibleBaudRate ) } else { let prescaler = ( trace_clk_freq / baud ) - 1 ; unsafe { ( * TPIU :: ptr ( ) ) . acpr . write ( prescaler ) ; } Ok ( ( ) ) } }
Updates the tpiu prescaler to output the desired baud rate
trace_clk_freq: The frequency of TRACECLKIN in HZ, this is HCLK on most STM32 devices
but is implementation specific.
Updates the tpiu prescaler to output the desired baud rate trace_clk_freq : The frequency of TRACECLKIN in HZ this is HCLK on most STM32 devices but is implementation specific .
trace_clk_freq
u32
baud
u32