#pragma once

#include "hw/sysbus.h"

#define TYPE_ESP32C3_ADC "esp32c3.adc"
OBJECT_DECLARE_SIMPLE_TYPE(ESP32C3AdcState, ESP32C3_ADC)

#define ESP32C3_ADC_CHANNELS 10
#define ESP32C3_ADC_IO_SIZE 0x1000

struct ESP32C3AdcState {
    SysBusDevice parent_obj;
    MemoryRegion iomem;
    uint32_t regs[ESP32C3_ADC_IO_SIZE / sizeof(uint32_t)];
    uint32_t input[ESP32C3_ADC_CHANNELS];
    uint8_t channel;
};
