include/driver/als_tcs3400.h: Format with clang-format
BRANCH=none
TEST=none
#define TCS_I2C_ENABLE_WAIT_ENABLE BIT(3)
#define TCS_I2C_ENABLE_INT_ENABLE BIT(4)
#define TCS_I2C_ENABLE_SLEEP_AFTER_INT BIT(6)
-#define TCS_I2C_ENABLE_MASK (TCS_I2C_ENABLE_POWER_ON | \
- TCS_I2C_ENABLE_ADC_ENABLE | \
- TCS_I2C_ENABLE_WAIT_ENABLE | \
- TCS_I2C_ENABLE_INT_ENABLE | \
+#define TCS_I2C_ENABLE_MASK \
+ (TCS_I2C_ENABLE_POWER_ON | TCS_I2C_ENABLE_ADC_ENABLE | \
+ TCS_I2C_ENABLE_WAIT_ENABLE | TCS_I2C_ENABLE_INT_ENABLE | \
TCS_I2C_ENABLE_SLEEP_AFTER_INT)
enum tcs3400_mode {
TCS3400_MODE_SUSPEND = 0,
- TCS3400_MODE_IDLE = (TCS_I2C_ENABLE_POWER_ON |
- TCS_I2C_ENABLE_ADC_ENABLE),
- TCS3400_MODE_COLLECTING = (TCS_I2C_ENABLE_POWER_ON |
- TCS_I2C_ENABLE_ADC_ENABLE |
+ TCS3400_MODE_IDLE =
+ (TCS_I2C_ENABLE_POWER_ON | TCS_I2C_ENABLE_ADC_ENABLE),
+ TCS3400_MODE_COLLECTING =
+ (TCS_I2C_ENABLE_POWER_ON | TCS_I2C_ENABLE_ADC_ENABLE |
TCS_I2C_ENABLE_INT_ENABLE),
};
@@ -100,16 +99,16 @@ enum tcs3400_mode {
#define TCS_GAIN_SAT_LEVEL (TCS_SATURATION_LEVEL / TCS_GAIN_ADJUST_FACTOR)
#define TCS_UPSHIFT_FACTOR_N 25 /* upshift factor = 2.5 */
#define TCS_UPSHIFT_FACTOR_D 10
-#define TCS_GAIN_UPSHIFT_LEVEL (TCS_SATURATION_LEVEL * TCS_UPSHIFT_FACTOR_D \
- / TCS_UPSHIFT_FACTOR_N)
+#define TCS_GAIN_UPSHIFT_LEVEL \
+ (TCS_SATURATION_LEVEL * TCS_UPSHIFT_FACTOR_D / TCS_UPSHIFT_FACTOR_N)
/*
* Percentage of saturation level that the auto-adjusting anti-saturation
* method will drive towards.
*/
#define TSC_SATURATION_LOW_BAND_PERCENT 90
-#define TSC_SATURATION_LOW_BAND_LEVEL (TCS_SATURATION_LEVEL * \
- TSC_SATURATION_LOW_BAND_PERCENT / 100)
+#define TSC_SATURATION_LOW_BAND_LEVEL \
+ (TCS_SATURATION_LEVEL * TSC_SATURATION_LOW_BAND_PERCENT / 100)
enum crbg_index {
CLEAR_CRGB_IDX = 0,
