Skip to content

Commit

Permalink
Introduce PulseIsHigh and PulseIsLow
Browse files Browse the repository at this point in the history
  • Loading branch information
obones authored and cpainchaud committed May 31, 2023
1 parent c493341 commit 4afa0c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RFLink/7_Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif

#define PulseIsHigh(pulseIndex) (pulseIndex % 2 == 1)
#define PulseIsLow(pulseIndex) (!PulseIsHigh(pulseIndex))

/// Reverse (reflect) the bits in an 8 bit byte.
///
/// @param x input byte
Expand Down

0 comments on commit 4afa0c5

Please sign in to comment.