]> Devi Nivas Git - smartwatch.git/commitdiff
Merge branch 'sdcard'
authorAdvaith Menon <noreply-git@bp4k.net>
Tue, 25 Nov 2025 09:02:15 +0000 (04:02 -0500)
committerAdvaith Menon <noreply-git@bp4k.net>
Tue, 25 Nov 2025 09:02:15 +0000 (04:02 -0500)
1  2 
main/CMakeLists.txt
main/hello_world_main.c
main/pins.h

index e9802e85e1a7fc07f8752233d6aee9fcf5347377,2e4a83a1c9d1889418dd9279ee4d3dd122f8a6e8..c41f1c11e010a41a5b136e3f3463d4c3f72a56a9
@@@ -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)
index 6cbcfaa7e665c1641f6d7caae1e0308df35d6fd6,70f30f73fdf0ba194bc02b7985a52d3e7897beca..bc2b4302f040922da3d93a4524b6dbdd135290dd
@@@ -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 da6d148f38a561b9984a3060493354e9c22f7a09,b401d36500f16abfd1b219c6aa52a364d49d223a..9aadccd3767c37234e610f777f26e0082254bde7
  #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