mirror of
https://github.com/esphome/esphome.git
synced 2026-10-14 02:02:51 +00:00
[weikai] Mark configurable classes as final (#17292)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
co-authored by
J. Nick Koston
parent
a3e373b063
commit
bdd2dcd8c6
@@ -254,7 +254,7 @@ size_t WeikaiGPIOPin::dump_summary(char *buffer, size_t len) const {
|
||||
void WeikaiChannel::setup_channel() {
|
||||
ESP_LOGCONFIG(TAG, " Setting up UART %s:%s", this->parent_->get_name(), this->get_channel_name());
|
||||
// we enable transmit and receive on this channel
|
||||
if (this->check_channel_down()) {
|
||||
if (this->check_channel_down_()) {
|
||||
ESP_LOGCONFIG(TAG, " Error channel %s not working", this->get_channel_name());
|
||||
}
|
||||
this->reset_fifo_();
|
||||
@@ -378,7 +378,7 @@ size_t WeikaiChannel::rx_in_fifo_() {
|
||||
return available;
|
||||
}
|
||||
|
||||
bool WeikaiChannel::check_channel_down() {
|
||||
bool WeikaiChannel::check_channel_down_() {
|
||||
// to check if we channel is up we write to the LCR W/R register
|
||||
// note that this will put a break on the tx line for few ms
|
||||
WeikaiRegister &lcr = this->reg(WKREG_LCR);
|
||||
|
||||
@@ -266,7 +266,7 @@ class WeikaiComponent : public Component {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Helper class to expose a WeiKai family IO pin as an internal GPIO pin.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class WeikaiGPIOPin : public GPIOPin {
|
||||
class WeikaiGPIOPin final : public GPIOPin {
|
||||
public:
|
||||
void set_parent(WeikaiComponent *parent) { this->parent_ = parent; }
|
||||
void set_pin(uint8_t pin) { this->pin_ = pin; }
|
||||
@@ -293,7 +293,7 @@ class WeikaiGPIOPin : public GPIOPin {
|
||||
/// uart::UARTComponent virtual class. This class is common to the different members of the Weikai
|
||||
/// components family and therefore avoid code duplication.
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
class WeikaiChannel : public uart::UARTComponent {
|
||||
class WeikaiChannel final : public uart::UARTComponent {
|
||||
public:
|
||||
/// @brief We belongs to this WeikaiComponent
|
||||
/// @param parent pointer to the component we belongs to
|
||||
@@ -315,10 +315,10 @@ class WeikaiChannel : public uart::UARTComponent {
|
||||
const char *get_channel_name() { return this->name_.c_str(); }
|
||||
|
||||
/// @brief Setup the channel
|
||||
void virtual setup_channel();
|
||||
void setup_channel();
|
||||
|
||||
/// @brief dump channel information
|
||||
void virtual dump_channel();
|
||||
void dump_channel();
|
||||
|
||||
/// @brief Factory method to create a WeikaiRegister proxy object
|
||||
/// @param reg address of the register
|
||||
@@ -423,7 +423,7 @@ class WeikaiChannel : public uart::UARTComponent {
|
||||
|
||||
/// @brief check if channel is alive
|
||||
/// @return true if OK
|
||||
bool virtual check_channel_down();
|
||||
bool check_channel_down_();
|
||||
|
||||
#ifdef TEST_COMPONENT
|
||||
/// @ingroup test_
|
||||
|
||||
Reference in New Issue
Block a user