27#pragma clang diagnostic ignored "-Wc++98-compat"
58 status_.rx_break =
false;
59 status_.rx_busy =
false;
60 status_.rx_framing_error =
false;
61 status_.rx_overflow =
false;
62 status_.rx_parity_error =
false;
63 status_.tx_busy =
false;
64 status_.tx_underflow =
false;
66 modem_status_.cts =
false;
67 modem_status_.dsr =
false;
68 modem_status_.dcd =
false;
69 modem_status_.ri =
false;
78 cb_object_ = cb_object;
84 assert (data !=
nullptr);
89 return do_send (data, num);
95 assert (data !=
nullptr);
100 return do_receive (data, num);
106 assert (data_out !=
nullptr);
107 assert (data_in !=
nullptr);
112 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)