#include <serial.h>
Public Member Functions | |
Serial () noexcept | |
Serial (const Serial &)=delete | |
Serial (Serial &&)=delete | |
virtual | ~Serial () noexcept override |
void | clean (void) noexcept |
return_t | configure (serial::config_t cfg, serial::config_arg_t arg) noexcept |
Configure the serial interface. | |
return_t | control (serial::control_t ctrl) noexcept |
Control the serial interface. | |
return_t | control_modem_line (serial::Modem_control ctrl) noexcept |
Configure serial modem lines. | |
const serial::Capabilities & | get_capabilities (void) noexcept |
Get driver capabilities. | |
serial::Modem_status & | get_modem_status (void) noexcept |
Get serial modem lines state. | |
std::size_t | get_rx_count (void) noexcept |
Get received bytes count. | |
serial::Status & | get_status (void) noexcept |
Get serial port status. | |
std::size_t | get_tx_count (void) noexcept |
Get transmitted bytes count. | |
const Version & | get_version (void) noexcept |
Get driver version. | |
Serial & | operator= (const Serial &)=delete |
Serial & | operator= (Serial &&)=delete |
return_t | power (Power state) noexcept |
Power up/down device. | |
return_t | receive (void *data, std::size_t num) noexcept |
Start the serial receiver. | |
void | register_callback (signal_event_t cb_func, const void *cb_object=nullptr) noexcept |
Register event callback. | |
return_t | send (const void *data, std::size_t num) noexcept |
Start the serial transmitter. | |
void | signal_event (event_t event) noexcept |
Signal serial events. | |
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. | |
Protected Member Functions | |
virtual return_t | do_configure (serial::config_t cfg, serial::config_arg_t arg) noexcept=0 |
virtual return_t | do_control (serial::control_t ctrl) noexcept=0 |
virtual return_t | do_control_modem_line (serial::Modem_control ctrl) noexcept=0 |
virtual const serial::Capabilities & | do_get_capabilities (void) noexcept=0 |
virtual serial::Modem_status & | do_get_modem_status (void) noexcept=0 |
virtual std::size_t | do_get_rx_count (void) noexcept=0 |
virtual serial::Status & | do_get_status (void) noexcept=0 |
virtual std::size_t | do_get_tx_count (void) noexcept=0 |
virtual const Version & | do_get_version (void) noexcept=0 |
virtual return_t | do_power (Power state) noexcept=0 |
virtual return_t | do_receive (void *data, std::size_t num) noexcept=0 |
virtual return_t | do_send (const void *data, std::size_t num) noexcept=0 |
virtual return_t | do_transfer (const void *data_out, void *data_in, std::size_t num) noexcept=0 |
Protected Attributes | |
signal_event_t | cb_func_ |
Pointer to static function that implements the callback. | |
const void * | cb_object_ |
Pointer to object instance associated with this driver. | |
serial::Modem_status | modem_status_ |
serial::Status | status_ |
|
noexcept |
Definition at line 38 of file serial.cpp.
|
delete |
|
delete |
|
overridevirtualnoexcept |
Definition at line 48 of file serial.cpp.
|
noexcept |
Definition at line 56 of file serial.cpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
protectedpure virtualnoexcept |
Implemented in os::driver::usart_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usart_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usart_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usart_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usart_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usart_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usart_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usart_wrapper.
|
protectedpure virtualnoexceptinherited |
Implemented in os::driver::usart_wrapper, os::driver::usbd_wrapper, and os::driver::usbh_wrapper.
Implemented in os::driver::usart_wrapper, os::driver::usbd_wrapper, and os::driver::usbh_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usart_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usart_wrapper.
|
protectedpure virtualnoexcept |
Implemented in os::driver::usart_wrapper.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexceptinherited |
|
noexcept |
Start the serial receiver.
[out] | data | Pointer to buffer for data to receive from USART receiver |
[in] | num | Number of data items to receive |
Definition at line 93 of file serial.cpp.
|
noexcept |
Register event callback.
[in] | cb_func | Pointer to function. |
[in] | cb_object | Pointer to object passed to function. |
Definition at line 75 of file serial.cpp.
|
noexcept |
Start the serial transmitter.
[in] | data | Pointer to buffer with data to send to USART transmitter. |
[in] | num | Number of data items to send. |
Definition at line 82 of file serial.cpp.
|
inlinenoexcept |
|
noexcept |
Start sending/receiving data to/from the serial transmitter/receiver.
[in] | data_out | Pointer to buffer with data to send |
[out] | data_in | Pointer to buffer for data to receive |
[in] | num | Number of bytes to transfer |
Definition at line 104 of file serial.cpp.
|
protected |
|
protected |
|
protected |
|
protected |