8static const char *
const TAG =
"gp8403";
10static const uint8_t RANGE_REGISTER = 0x01;
11static const uint8_t OUTPUT_REGISTER = 0x02;
16 return LOG_STR(
"GP8403");
18 return LOG_STR(
"GP8413");
20 return LOG_STR(
"Unknown");
38 val = ((uint16_t) (4095 *
state)) << 4;
41 val = ((uint16_t) (32767 *
state)) << 1;
47 ESP_LOGV(TAG,
"Calculated DAC value: %" PRIu16,
val);
void dump_config() override
void write_state(float state, uint8_t channel)
ErrorCode write_register(uint8_t a_register, const uint8_t *data, size_t len) const
writes an array of bytes to a specific register in the I²C device
const LogString * model_to_string(GP8403Model model)
ErrorCode
Error codes returned by I2CBus and I2CDevice methods.
@ ERROR_OK
No error found during execution of method.
Providing packet encoding functions for exchanging data with a remote host.