mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
code cleanup
This commit is contained in:
parent
706c61bb6e
commit
95c16c3453
3 changed files with 2 additions and 3 deletions
|
@ -322,6 +322,8 @@ void Si4713Component::loop() {
|
|||
|
||||
// config
|
||||
|
||||
template<typename T> T GET_ENUM_LAST(T value) { return T::LAST; }
|
||||
|
||||
#define CHECK_ENUM(value) \
|
||||
if (value >= GET_ENUM_LAST(value)) { \
|
||||
ESP_LOGE(TAG, "%s(%d) invalid", __func__, (int) value); \
|
||||
|
|
|
@ -204,7 +204,6 @@ class Si4713Component : public PollingComponent, public i2c::I2CDevice {
|
|||
public:
|
||||
Si4713Component();
|
||||
|
||||
// float get_setup_priority() const override { return setup_priority::HARDWARE; }
|
||||
void setup() override;
|
||||
void dump_config() override;
|
||||
void update() override;
|
||||
|
|
|
@ -57,8 +57,6 @@ static const int IALDUR_MAX = 65535;
|
|||
static const uint8_t RDS_STATION_MAX = 8; // TODO
|
||||
static const uint8_t RDS_TEXT_MAX = 64; // TODO
|
||||
|
||||
template<typename T> T GET_ENUM_LAST(T value) { return T::LAST; }
|
||||
|
||||
enum class OpMode {
|
||||
OPMODE_ANALOG = 0b01010000, // 0x50
|
||||
OPMODE_DIGITAL = 0b00001111, // 0x0F
|
||||
|
|
Loading…
Reference in a new issue