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() {
84
84
85
85
// this sets the registries in RTC to load the firmware from the storage selected at the next reboot
86
86
STM32H747::writeBackupRegister (RTCBackup::DR0, 0x07AA );
87
- STM32H747::writeBackupRegister (RTCBackup::DR1, STM32H747OTA::StorageType::QSPI_FLASH_FATFS_MBR );
87
+ STM32H747::writeBackupRegister (RTCBackup::DR1, STM32H747OTA::STORAGE_TYPE );
88
88
STM32H747::writeBackupRegister (RTCBackup::DR2, data_offset);
89
89
STM32H747::writeBackupRegister (RTCBackup::DR3, _program_length);
90
90
Original file line number Diff line number Diff line change 21
21
#include " WiFi.h" /* WiFi from ArduinoCore-mbed */
22
22
#include < SocketHelpers.h>
23
23
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
-
31
24
namespace 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 ));
38
27
}
39
28
40
29
class STM32H7OTACloudProcess : public OTADefaultCloudProcessInterface {
You can’t perform that action at this time.
0 commit comments