1234567891011121314151617181920212223242526 |
- #include "at32f403a_407.h"
- #include "factors.h"
- #include "common_config.h"
- #include <stdio.h>
- #if defined (MAI_12)
- #undef DBG
- #define DBG if(0)
- // Очистить сектор системных настроек
- void factos_sector_clear(void)
- {
- flash_status_type status;
-
- flash_unlock();
-
- if ((status = flash_sector_erase(CALIBRATION_FACTOR_SECTOR)) != FLASH_OPERATE_DONE) {
- DBG printf("Calibration factors. Erase sector error: %d\r\n", status);
- }
-
- flash_lock();
- }
- #endif
|