diff --git a/esphome/components/uln2003/uln2003.cpp b/esphome/components/uln2003/uln2003.cpp index d6d126e8e3..a2244eadaa 100644 --- a/esphome/components/uln2003/uln2003.cpp +++ b/esphome/components/uln2003/uln2003.cpp @@ -1,8 +1,7 @@ #include "uln2003.h" #include "esphome/core/log.h" -namespace esphome { -namespace uln2003 { +namespace esphome::uln2003 { static const char *const TAG = "uln2003.stepper"; @@ -88,5 +87,4 @@ void ULN2003::write_step_(int32_t step) { this->pin_d_->digital_write((res >> 3) & 1); } -} // namespace uln2003 -} // namespace esphome +} // namespace esphome::uln2003 diff --git a/esphome/components/uln2003/uln2003.h b/esphome/components/uln2003/uln2003.h index 4f559ed9a0..70f55f72bf 100644 --- a/esphome/components/uln2003/uln2003.h +++ b/esphome/components/uln2003/uln2003.h @@ -4,8 +4,7 @@ #include "esphome/core/hal.h" #include "esphome/components/stepper/stepper.h" -namespace esphome { -namespace uln2003 { +namespace esphome::uln2003 { enum ULN2003StepMode { ULN2003_STEP_MODE_FULL_STEP, @@ -40,5 +39,4 @@ class ULN2003 : public stepper::Stepper, public Component { int32_t current_uln_pos_{0}; }; -} // namespace uln2003 -} // namespace esphome +} // namespace esphome::uln2003