File tree Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ OTACloudProcessInterface::State STM32H7OTACloudProcess::flashOTA() {
8484
8585 // this sets the registries in RTC to load the firmware from the storage selected at the next reboot
8686 STM32H747::writeBackupRegister (RTCBackup::DR0, 0x07AA );
87- STM32H747::writeBackupRegister (RTCBackup::DR1, STM32H747OTA::StorageType::QSPI_FLASH_FATFS_MBR );
87+ STM32H747::writeBackupRegister (RTCBackup::DR1, STM32H747OTA::STORAGE_TYPE );
8888 STM32H747::writeBackupRegister (RTCBackup::DR2, data_offset);
8989 STM32H747::writeBackupRegister (RTCBackup::DR3, _program_length);
9090
Original file line number Diff line number Diff line change 2121#include " WiFi.h" /* WiFi from ArduinoCore-mbed */
2222#include < SocketHelpers.h>
2323
24- #define APOTA_QSPI_FLASH_FLAG (1 << 2 )
25- #define APOTA_SDCARD_FLAG (1 << 3 )
26- #define APOTA_RAW_FLAG (1 << 4 )
27- #define APOTA_FATFS_FLAG (1 << 5 )
28- #define APOTA_LITTLEFS_FLAG (1 << 6 )
29- #define APOTA_MBR_FLAG (1 << 7 )
30-
3124namespace STM32H747OTA {
32- enum StorageType {
33- QSPI_FLASH_FATFS = APOTA_QSPI_FLASH_FLAG | APOTA_FATFS_FLAG,
34- QSPI_FLASH_FATFS_MBR = APOTA_QSPI_FLASH_FLAG | APOTA_FATFS_FLAG | APOTA_MBR_FLAG,
35- SD_FATFS = APOTA_SDCARD_FLAG | APOTA_FATFS_FLAG,
36- SD_FATFS_MBR = APOTA_SDCARD_FLAG | APOTA_FATFS_FLAG | APOTA_MBR_FLAG,
37- };
25+ /* External QSPI flash + MBR + FatFs */
26+ static const uint32_t constexpr STORAGE_TYPE = ((1 << 2 ) | (1 << 5 ) | (1 << 7 ));
3827}
3928
4029class STM32H7OTACloudProcess : public OTADefaultCloudProcessInterface {
You can’t perform that action at this time.
0 commit comments