2024-01-07 23:23:35 +01:00

35 lines
804 B
C++

#ifndef STA_CORE_UART_UART_HPP
#define STA_CORE_UART_UART_HPP
#include <sta/bus/interface.hpp>
#include <sta/bus/uart/settings.hpp>
namespace sta
{
/**
* @brief UART interface.
*
* @ingroup sta_core_uart
*/
class UART : public Interface
{
public:
/**
* @param settings %UART bus settings
* @param mutex Mutex object for managing shared access. Pass nullptr for no access control
*/
UART(UARTSettings & settings, Mutex * mutex=nullptr);
/**
* @brief Get %UART interface settings.
*
* @return %UART settings
*/
const UARTSettings & settings();
private:
UARTSettings settings_; /**< %UART settings */
};
} // namespace sta
#endif // STA_CORE_UART_UART_HPP