From: Advaith Menon Date: Tue, 25 Nov 2025 09:02:15 +0000 (-0500) Subject: Merge branch 'sdcard' X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=ba25df72105a8a458d26f9ebe708e4ceaaa19640;p=smartwatch.git Merge branch 'sdcard' --- ba25df72105a8a458d26f9ebe708e4ceaaa19640 diff --cc main/CMakeLists.txt index e9802e8,2e4a83a..c41f1c1 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@@ -2,8 -2,11 +2,13 @@@ idf_component_register(SRCS "hello_worl "goldeloxSerial.c" "task_lcd.c" "task_button.c" + "task_imu.c" + "sdcardspi.c" + "bmp_reader.c" INCLUDE_DIRS "." PRIV_REQUIRES esp_driver_gpio esp_driver_uart - esp_driver_i2c) ++ esp_driver_i2c + esp_driver_spi + esp_driver_sdspi + fatfs) diff --cc main/hello_world_main.c index 6cbcfaa,70f30f7..bc2b430 --- a/main/hello_world_main.c +++ b/main/hello_world_main.c @@@ -51,11 -50,10 +52,10 @@@ void app_main(void /* initialize the buttons */ gt_btn_setup(); + gt_global_sdsupport = task_sdcard(); /* start the main gui thread which starts all else */ - lcd_task(); - + // lcd_task(); + task_imu_all(NULL); /* for (int i = 10; i >= 0; i--) { printf("Restarting in %d seconds...\n", i); diff --cc main/pins.h index da6d148,b401d36..9aadccd --- a/main/pins.h +++ b/main/pins.h @@@ -15,7 -16,14 +16,17 @@@ #define PIN_ULCD_RX 22 #define PIN_ULCD_RESET 19 +#define PIN_I2C_SDA 4 +#define PIN_I2C_SCL 5 + + #define PIN_SD_CS 7 + #define PIN_SD_CD 6 + #define PIN_SD_MOSI 9 + #define PIN_SD_MISO 1 + #define PIN_SD_SCK 21 + #define SD_MOUNT_PATH "/mnt/sdcard0" + #define SD_MAX_FILE_HANDLES 5 + + extern int gt_global_sdsupport; + #endif