/** * @file hardware_config.h * @brief Hardware pin and peripheral configuration for the iroBot system * * This header centralizes all hardware-related configuration including * I2C buses, touch controller, IO expander, and sensor addresses. * Modify these values to adapt to different hardware configurations. */ #ifndef HARDWARE_CONFIG_H #define HARDWARE_CONFIG_H #include "driver/gpio.h" #include "driver/i2c.h" #ifdef __cplusplus extern "C" { #endif // ---------------------------------------------------------------------------- // I2C Bus Configuration // ---------------------------------------------------------------------------- #define I2C_MASTER_PORT I2C_NUM_0 #define I2C_MASTER_SDA (GPIO_NUM_15) #define I2C_MASTER_SCL (GPIO_NUM_14) #define I2C_MASTER_FREQ_HZ (200 * 1000) // ---------------------------------------------------------------------------- // Touch Controller Configuration // ---------------------------------------------------------------------------- #define TOUCH_PIN_SDA I2C_MASTER_SDA #define TOUCH_PIN_SCL I2C_MASTER_SCL #define TOUCH_PIN_RST (-1) #define TOUCH_PIN_INT (GPIO_NUM_21) // Enable/disable touch functionality #define TOUCH_ENABLED 1 // ---------------------------------------------------------------------------- // QMI8658 IMU Sensor Configuration // ---------------------------------------------------------------------------- #define QMI8658_I2C_PORT I2C_MASTER_PORT #define QMI8658_I2C_ADDR 0x6B #define QMI8658_PIN_SDA I2C_MASTER_SDA #define QMI8658_PIN_SCL I2C_MASTER_SCL // ---------------------------------------------------------------------------- // IO Expander Configuration (TCA9554) // ---------------------------------------------------------------------------- #define IO_EXPANDER_I2C_PORT I2C_MASTER_PORT // Address is defined by ESP chip support library #ifdef __cplusplus } #endif #endif // HARDWARE_CONFIG_H