Skip to content

Commit

Permalink
add MIN and MAX definitions to support ESP32 (non-C3)
Browse files Browse the repository at this point in the history
add MIN and MAX definitions to support ESP32 (non-C3)
  • Loading branch information
unregist authored Dec 5, 2024
1 parent 641eea5 commit bc943e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions esphome/components/MhiAcCtrl/MHI-AC-Ctrl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@

#define MHI_NUM_FRAMES_PER_INTERVAL 20 // every 20 frames, MISO_frame[DB14] bit2 toggles

#ifndef MIN
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#endif
#ifndef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif

namespace mhi_ac {

enum class ACPower {
Expand Down

0 comments on commit bc943e0

Please sign in to comment.