10 static const uint8_t AS7341_CHIP_ID = 0X09;
12 static const uint8_t AS7341_CONFIG = 0x70;
13 static const uint8_t AS7341_LED = 0x74;
15 static const uint8_t AS7341_ENABLE = 0x80;
16 static const uint8_t AS7341_ATIME = 0x81;
18 static const uint8_t AS7341_WTIME = 0x83;
20 static const uint8_t AS7341_AUXID = 0x90;
21 static const uint8_t AS7341_REVID = 0x91;
22 static const uint8_t AS7341_ID = 0x92;
23 static const uint8_t AS7341_STATUS = 0x93;
25 static const uint8_t AS7341_CH0_DATA_L = 0x95;
26 static const uint8_t AS7341_CH0_DATA_H = 0x96;
27 static const uint8_t AS7341_CH1_DATA_L = 0x97;
28 static const uint8_t AS7341_CH1_DATA_H = 0x98;
29 static const uint8_t AS7341_CH2_DATA_L = 0x99;
30 static const uint8_t AS7341_CH2_DATA_H = 0x9A;
31 static const uint8_t AS7341_CH3_DATA_L = 0x9B;
32 static const uint8_t AS7341_CH3_DATA_H = 0x9C;
33 static const uint8_t AS7341_CH4_DATA_L = 0x9D;
34 static const uint8_t AS7341_CH4_DATA_H = 0x9E;
35 static const uint8_t AS7341_CH5_DATA_L = 0x9F;
36 static const uint8_t AS7341_CH5_DATA_H = 0xA0;
38 static const uint8_t AS7341_STATUS2 = 0xA3;
40 static const uint8_t AS7341_CFG1 = 0xAA;
42 static const uint8_t AS7341_CFG6 = 0xAF;
43 static const uint8_t AS7341_CFG9 = 0xB2;
45 static const uint8_t AS7341_ASTEP = 0xCA;
46 static const uint8_t AS7341_ASTEP_MSB = 0xCB;
79 void setup()
override;
void set_f8_sensor(sensor::Sensor *f8_sensor)
void set_f7_sensor(sensor::Sensor *f7_sensor)
void set_gain(AS7341Gain gain)
bool setup_gain(AS7341Gain gain)
bool read_channels(uint16_t *data)
Read SMUX configuration to RAM from SMUX chain.
void configure_smux_low_channels()
bool enable_power(bool enable)
Write SMUX configuration from RAM to SMUX chain.
bool read_register_bit(uint8_t address, uint8_t bit_position)
uint16_t channel_readings_[12]
void set_f4_sensor(sensor::Sensor *f4_sensor)
void set_f5_sensor(sensor::Sensor *f5_sensor)
void set_f1_sensor(sensor::Sensor *f1_sensor)
void set_astep(uint16_t astep)
This class simplifies creating components that periodically check a state.
void set_clear_sensor(sensor::Sensor *clear_sensor)
uint16_t read_channel(AS7341AdcChannel channel)
bool enable_spectral_measurement(bool enable)
bool setup_atime(uint8_t atime)
bool write_register_bit(uint8_t address, bool value, uint8_t bit_position)
void set_f2_sensor(sensor::Sensor *f2_sensor)
bool setup_astep(uint16_t astep)
void dump_config() override
void set_f6_sensor(sensor::Sensor *f6_sensor)
void set_nir_sensor(sensor::Sensor *nir_sensor)
bool set_register_bit(uint8_t address, uint8_t bit_position)
bool clear_register_bit(uint8_t address, uint8_t bit_position)
void configure_smux_high_channels()
Implementation of SPI Controller mode.
float get_setup_priority() const override
void set_smux_low_channels(bool enable)
Base-class for all sensors.
ROM code initialization of SMUX.
This Class provides the methods to read/write bytes from/to an i2c device.
void set_f3_sensor(sensor::Sensor *f3_sensor)
uint16_t swap_bytes(uint16_t data)
void set_atime(uint8_t atime)
bool set_smux_command(AS7341SmuxCommand command)