Skip to content

Commit 85613ab

Browse files
authored
Merge pull request #2974 from cesanta/noclash
avoid name clashing in OTA
2 parents 2a093dc + 6e4ce85 commit 85613ab

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

mongoose.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6523,15 +6523,15 @@ static struct mg_flash s_mg_flash_stm32h5 = {
65236523
mg_stm32h5_swap,
65246524
};
65256525

6526-
#define FLASH_BASE 0x40022000 // Base address of the flash controller
6527-
#define FLASH_KEYR (FLASH_BASE + 0x4) // See RM0481 7.11
6528-
#define FLASH_OPTKEYR (FLASH_BASE + 0xc)
6529-
#define FLASH_OPTCR (FLASH_BASE + 0x1c)
6530-
#define FLASH_NSSR (FLASH_BASE + 0x20)
6531-
#define FLASH_NSCR (FLASH_BASE + 0x28)
6532-
#define FLASH_NSCCR (FLASH_BASE + 0x30)
6533-
#define FLASH_OPTSR_CUR (FLASH_BASE + 0x50)
6534-
#define FLASH_OPTSR_PRG (FLASH_BASE + 0x54)
6526+
#define MG_FLASH_BASE 0x40022000 // Base address of the flash controller
6527+
#define FLASH_KEYR (MG_FLASH_BASE + 0x4) // See RM0481 7.11
6528+
#define FLASH_OPTKEYR (MG_FLASH_BASE + 0xc)
6529+
#define FLASH_OPTCR (MG_FLASH_BASE + 0x1c)
6530+
#define FLASH_NSSR (MG_FLASH_BASE + 0x20)
6531+
#define FLASH_NSCR (MG_FLASH_BASE + 0x28)
6532+
#define FLASH_NSCCR (MG_FLASH_BASE + 0x30)
6533+
#define FLASH_OPTSR_CUR (MG_FLASH_BASE + 0x50)
6534+
#define FLASH_OPTSR_PRG (MG_FLASH_BASE + 0x54)
65356535

65366536
static void flash_unlock(void) {
65376537
static bool unlocked = false;

src/ota_stm32h5.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ static struct mg_flash s_mg_flash_stm32h5 = {
1616
mg_stm32h5_swap,
1717
};
1818

19-
#define FLASH_BASE 0x40022000 // Base address of the flash controller
20-
#define FLASH_KEYR (FLASH_BASE + 0x4) // See RM0481 7.11
21-
#define FLASH_OPTKEYR (FLASH_BASE + 0xc)
22-
#define FLASH_OPTCR (FLASH_BASE + 0x1c)
23-
#define FLASH_NSSR (FLASH_BASE + 0x20)
24-
#define FLASH_NSCR (FLASH_BASE + 0x28)
25-
#define FLASH_NSCCR (FLASH_BASE + 0x30)
26-
#define FLASH_OPTSR_CUR (FLASH_BASE + 0x50)
27-
#define FLASH_OPTSR_PRG (FLASH_BASE + 0x54)
19+
#define MG_FLASH_BASE 0x40022000 // Base address of the flash controller
20+
#define FLASH_KEYR (MG_FLASH_BASE + 0x4) // See RM0481 7.11
21+
#define FLASH_OPTKEYR (MG_FLASH_BASE + 0xc)
22+
#define FLASH_OPTCR (MG_FLASH_BASE + 0x1c)
23+
#define FLASH_NSSR (MG_FLASH_BASE + 0x20)
24+
#define FLASH_NSCR (MG_FLASH_BASE + 0x28)
25+
#define FLASH_NSCCR (MG_FLASH_BASE + 0x30)
26+
#define FLASH_OPTSR_CUR (MG_FLASH_BASE + 0x50)
27+
#define FLASH_OPTSR_PRG (MG_FLASH_BASE + 0x54)
2828

2929
static void flash_unlock(void) {
3030
static bool unlocked = false;

0 commit comments

Comments
 (0)