libcsdbg  1.28
C++ exception (and generic) stack trace debug library
sttybuf & csdbg::sttybuf::set_baud ( u32  baud)
virtual

Set the baud rate.

Parameters
[in]baudthe new baud rate
Returns
*this
Exceptions
csdbg::exception

Definition at line 169 of file sttybuf.cpp.

References baud(), config(), m_baud, csdbg::streambuf::m_handle, and unlikely.

Referenced by operator=().

170 {
171  if ( unlikely(m_baud == baud) )
172  return *this;
173 
174  m_baud = baud;
175  if ( unlikely(m_handle < 0) )
176  return *this;
177 
178  return config();
179 }
u32 m_baud
Baud rate.
Definition: sttybuf.hpp:36
i32 m_handle
Stream handle (descriptor)
Definition: streambuf.hpp:43
virtual sttybuf & config() const
Configure the serial interface.
Definition: sttybuf.cpp:22
virtual u32 baud() const
Get the baud rate.
Definition: sttybuf.cpp:154
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
Definition: config.hpp:349

+ Here is the call graph for this function:

+ Here is the caller graph for this function: