Refactor project structure and update display logic

Reorganized source files into new directories for config, drivers, sensors, emotion engine, and UI. Removed legacy assets and code related to previous eye animation implementation. Added new display and touch drivers, emotion manager, shake detector, and UI components. Updated CMake project name to 'irobot_display'.
This commit is contained in:
2026-01-24 15:21:50 +05:30
parent 2c731c72e3
commit 8aeaed8a15
69 changed files with 2650 additions and 10338 deletions

View File

@@ -0,0 +1,61 @@
/**
* @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