Skip to content

Commit

Permalink
InterruptPersistence: Shorter, better valuenames + Description
Browse files Browse the repository at this point in the history
  • Loading branch information
TomSaw committed Mar 13, 2021
1 parent 53d29fb commit 768b98f
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/modm/driver/color/tcs3472.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ struct tcs3472
enum class
Gain : uint8_t
{
X1 = 0b00, ///< x1 gain
X4 = 0b01, ///< x4 gain
X16 = 0b10, ///< x16 gain
X60 = 0b11, ///< x60 gain
X1 = 0b00, ///< x1 gain
X4 = 0b01, ///< x4 gain
X16 = 0b10, ///< x16 gain
X60 = 0b11, ///< x60 gain
};

/// Integration for a fixed time
Expand All @@ -74,22 +74,22 @@ struct tcs3472
enum class
InterruptPersistence : uint8_t
{
EVERY = 0,
VALUE_CNT_1 = 1,
VALUE_CNT_2 = 2,
VALUE_CNT_3 = 3,
VALUE_CNT_5 = 4,
VALUE_CNT_10 = 5,
VALUE_CNT_15 = 6,
VALUE_CNT_20 = 7,
VALUE_CNT_25 = 8,
VALUE_CNT_30 = 9,
VALUE_CNT_35 = 10,
VALUE_CNT_40 = 11,
VALUE_CNT_45 = 12,
VALUE_CNT_50 = 13,
VALUE_CNT_55 = 14,
VALUE_CNT_60 = 15,
EVERY = 0, // Interrupt for every new sample independent of thresholds
CNT_1 = 1, // Interrupt after 1 cycle being below or above thresholds
CNT_2 = 2, // Interrupt after 2 cycles being below or above thresholds
CNT_3 = 3, // ...
CNT_5 = 4,
CNT_10 = 5,
CNT_15 = 6,
CNT_20 = 7,
CNT_25 = 8,
CNT_30 = 9,
CNT_35 = 10,
CNT_40 = 11,
CNT_45 = 12,
CNT_50 = 13,
CNT_55 = 14,
CNT_60 = 15,
};

/// Power-control and feature enable flags
Expand Down

0 comments on commit 768b98f

Please sign in to comment.