#ifndef MCP23018_COMPONENT
#define MCP23018_COMPONENT
#include "i2cbrn.h"
#define TAG_MCP "MCP23018"
#define MCP23018_IODIRA  0x00  // I/O Direction A
#define MCP23018_IODIRB  0x01  // I/O Direction B
#define MCP23018_GPIOA   0x12  // GPIO Output A
#define MCP23018_GPIOB   0x13  // GPIO Output B


#define MCP_LORA_RST 4
#define MCP_MICS_POWER 5
#define MCP_CCS811_WAKE 6
#define MCP_CCS811_POWER 7

#define MCP_CS_ADC_NH3 8
#define MCP_CS_ADC_CO 9
#define MCP_CS_ADC_NO2 10
#define MCP_CS_ADC_UVC 11



extern i2c_device_config_t MCP23018_DEV_CFG;

extern i2c_master_dev_handle_t MCP23018_DEV_HANDLE;
extern uint8_t gpioa_state;
extern uint8_t gpiob_state;

esp_err_t mcp23018_set_pin(i2c_master_dev_handle_t dev_handle, uint8_t pin, uint8_t value);
esp_err_t mcp23018_init();

#endif