42#pragma clang diagnostic ignored "-Wc++98-compat"
73 status_.rx_break =
false;
74 status_.rx_busy =
false;
75 status_.rx_framing_error =
false;
76 status_.rx_overflow =
false;
77 status_.rx_parity_error =
false;
78 status_.tx_busy =
false;
79 status_.tx_underflow =
false;
81 modem_status_.cts =
false;
82 modem_status_.dsr =
false;
83 modem_status_.dcd =
false;
84 modem_status_.ri =
false;
93 cb_object_ = cb_object;
99 assert (data !=
nullptr);
104 return do_send (data, num);
110 assert (data !=
nullptr);
115 return do_receive (data, num);
121 assert (data_out !=
nullptr);
122 assert (data_in !=
nullptr);
127 return do_transfer (data_out, data_in, num);
void clean(void) noexcept
const void * cb_object_
Pointer to object instance associated with this driver.
return_t receive(void *data, std::size_t num) noexcept
Start the serial receiver.
signal_event_t cb_func_
Pointer to static function that implements the callback.
virtual ~Serial() noexcept override
return_t send(const void *data, std::size_t num) noexcept
Start the serial transmitter.
return_t transfer(const void *data_out, void *data_in, std::size_t num) noexcept
Start sending/receiving data to/from the serial transmitter/receiver.
void register_callback(signal_event_t cb_func, const void *cb_object=nullptr) noexcept
Register event callback.
int printf(const char *format,...)
Write a formatted string to the trace device.
constexpr return_t RETURN_OK
< Operation succeeded
void(* signal_event_t)(const void *object, event_t event)