Ignore:
Timestamp:
Jan 10, 2025, 4:18:37 PM (6 days ago)
Author:
Zed
Message:

HAL library was updated.
SD DETECT pin is working.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ctrl/firmware/Main/SES/Core/Src/keys_thread.cpp

    r58 r59  
    3333                           (uint8_t*)current_thread->tx_thread_stack_ptr - (uint8_t*)current_thread->tx_thread_stack_start,
    3434                           (uint8_t*)current_thread->tx_thread_stack_end - (uint8_t*)current_thread->tx_thread_stack_ptr);
     35
     36                if (HAL_GPIO_ReadPin(SD_DETECT_GPIO_Port, SD_DETECT_Pin) == GPIO_PIN_RESET) printf("SD card present\n");
     37                else if (HAL_GPIO_ReadPin(SD_DETECT_GPIO_Port, SD_DETECT_Pin) == GPIO_PIN_SET) printf("SD card not present\n");
    3538        }
    3639}
Note: See TracChangeset for help on using the changeset viewer.