1234567891011121314151617181920 |
- #ifndef GD_OTA_FLASH_H
- #define GD_OTA_FLASH_H
- #include <stdint.h>
- //µÚ124Ò³
- #define FMC_READ(addrx) (*(volatile uint32_t *)(uint32_t)(addrx))
- #define FMC_WRITE_START_ADDR ((uint32_t)0x08005000U+0xFA000) //ÆðʼµØÖ·
- #define FMC_Page 1020
- typedef struct _BOOT_MESSAGE
- {
- uint8_t VERSION_H;
- uint8_t VERSION_M;
- uint8_t VERSION_L;
- uint8_t UP_FLAG;
- }BOOT_MESSAGE;
- void soft_init();
- void write_soft_version();
- void GD32_READ_OTA(BOOT_MESSAGE *READ);
- void write_soft_version(BOOT_MESSAGE *save_message);
- #endif
|