Changeset 32 for trunk/firmware/App/SES/Core/Tasks
- Timestamp:
- Oct 15, 2026, 10:38:27 AM (3 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/firmware/App/SES/Core/Tasks/Src/mainTask.cpp
r29 r32 5 5 #include "main.h" 6 6 #include "mainTask.h" 7 #include "fx_api.h" 8 #include "fx_stm32_sd_driver.h" 7 9 8 10 #ifdef USE_SEP_TERMINALS … … 10 12 #endif 11 13 14 constexpr unsigned MEDIA_CLOSED = 1U; 15 constexpr unsigned MEDIA_OPENED = 0U; 16 17 CHAR FX_SD_VOLUME_NAME[] = "SDMMC"; 18 ALIGN_32BYTES (uint32_t fx_sd_media_memory[FX_STM32_SD_DEFAULT_SECTOR_SIZE / sizeof(uint32_t)]); // Buffer for FileX FX_MEDIA sector cache. 19 FX_MEDIA sdio_disk; // Define FileX global data structures 20 static UINT media_status; 21 22 12 23 void StartMainTask(void* arg) 13 24 { 25 UINT sd_status = FX_SUCCESS; 26 fx_system_initialize(); // Initialize FileX 27 28 // Open the SD disk driver 29 sd_status = fx_media_open(&sdio_disk, FX_SD_VOLUME_NAME, fx_stm32_sd_driver, (VOID *)FX_NULL, (VOID *) fx_sd_media_memory, sizeof(fx_sd_media_memory)); 30 31 fx_media_close_notify_set(&sdio_disk, [](FX_MEDIA* media_ptr) { UNUSED(media_ptr); media_status = MEDIA_CLOSED; }); 32 33 34 // Check the media open sd_status 35 if (sd_status != FX_SUCCESS) 36 { 37 Error_Handler(); 38 } 39 40 14 41 while(1) 15 42 {
Note:
See TracChangeset
for help on using the changeset viewer.
