Files
Hodor/main/esp32_s3_cam_ovxxxx.h
T

33 lines
812 B
C

#pragma once
#include "sdkconfig.h"
#include "driver/gpio.h"
#include "driver/i2c_master.h"
#include "esp_camera.h"
#include "custom_io_expander_ch32v003.h"
// --- پین‌های I2C ---
#define BSP_I2C_NUM 0
#define BSP_I2C_SCL (GPIO_NUM_7)
#define BSP_I2C_SDA (GPIO_NUM_8)
// --- آدرس اکسپندر ---
#define BSP_IO_EXPANDER_I2C_ADDRESS_CH32V003 (CUSTOM_IO_EXPANDER_I2C_CH32V003_ADDRESS)
#ifdef __cplusplus
extern "C" {
#endif
// --- توابع I2C ---
esp_err_t bsp_i2c_init(void);
esp_err_t bsp_i2c_deinit(void);
i2c_master_bus_handle_t bsp_i2c_get_handle(void);
// --- توابع IO Expander ---
esp_err_t bsp_io_expander_init(void);
esp_io_expander_handle_t bsp_get_io_expander_handle(void);
uint16_t bsp_get_io_expander_adc(void);
#ifdef __cplusplus
}
#endif