#pragma once

#include <stdbool.h>
#include <stddef.h>
#include "driver/gpio.h"
#include "esp_err.h"

#define DCDC_CHANNEL_COUNT 5

typedef enum {
    DCDC_CHANNEL_0 = 0,
    DCDC_CHANNEL_1,
    DCDC_CHANNEL_2,
    DCDC_CHANNEL_3,
    DCDC_CHANNEL_4,
} dcdc_channel_t;

esp_err_t dcdc_init(void);
esp_err_t dcdc_set_state(dcdc_channel_t channel, bool enabled);
esp_err_t dcdc_enable(dcdc_channel_t channel);
esp_err_t dcdc_disable(dcdc_channel_t channel);
esp_err_t dcdc_toggle(dcdc_channel_t channel);
bool dcdc_get_state(dcdc_channel_t channel);
size_t dcdc_channel_count(void);
gpio_num_t dcdc_get_gpio(dcdc_channel_t channel);
