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