Compare commits

...
Author SHA1 Message Date
Jesse Hills 2716c3161c [weikai] Rename check_channel_down_ for protected-method naming
Dropping `virtual` from the now-`final` WeikaiChannel turned check_channel_down
into a plain protected method, which clang-tidy requires to end with `_`.
2026-07-15 13:01:44 +12:00
Jesse Hills 9111779caa Merge remote-tracking branch 'origin/dev' into jesserockz-2026-392 2026-07-15 12:59:56 +12:00
Jesse Hills 5a18d1ef50 [weikai] Mark configurable classes as final 2026-06-30 10:41:03 +12:00
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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_();
@@ -374,7 +374,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);
+5 -5
View File
@@ -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_