7 static const char *
const TAG =
"mcp3204";
12 ESP_LOGCONFIG(TAG,
"Setting up mcp3204");
17 ESP_LOGCONFIG(TAG,
"MCP3204:");
18 LOG_PIN(
" CS Pin:", this->
cs_);
23 uint8_t adc_primary_config = 0b00000110 | (pin >> 2);
24 uint8_t adc_secondary_config = pin << 6;
27 uint8_t adc_primary_byte = this->
transfer_byte(adc_secondary_config);
30 uint16_t digital_value = (adc_primary_byte << 8 | adc_secondary_byte) & 0b111111111111;
float read_data(uint8_t pin)
void spi_setup() override
void dump_config() override
float get_setup_priority() const override
uint8_t transfer_byte(uint8_t data)
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
Implementation of SPI Controller mode.