Обновление

This commit is contained in:
cfif 2026-06-19 15:47:07 +03:00
parent 8939dc6b0d
commit 0afc04b9a0
2 changed files with 7 additions and 7 deletions

View File

@ -53,7 +53,7 @@ bool D_bInternalFlashPage_Clear(
};
tFlashParam.u32Address = pageAddress;
tFlashParam.u32Length = FLASH_PAGE_SIZE;
tFlashParam.u32Length = FLASH_PAGE_D_SIZE;
if (FLASH_ERROR_OK != FLASHDRIVER_DFlashEraseSector(&tFlashParam)) {
return false;
}
@ -81,12 +81,12 @@ bool D_bInternalFlashPage_ClearRange(
void *wdTriggerFct,
void *wdTriggerFct_env
) {
if (totalSize % FLASH_PAGE_SIZE) {
if (totalSize % FLASH_PAGE_D_SIZE) {
return false;
}
uint32_t endAddr = firstPageAddr + totalSize;
for (; firstPageAddr < endAddr; firstPageAddr += FLASH_PAGE_SIZE) {
for (; firstPageAddr < endAddr; firstPageAddr += FLASH_PAGE_D_SIZE) {
if (!D_bInternalFlashPage_Clear(firstPageAddr, wdTriggerFct, wdTriggerFct_env)) {
return false;
}
@ -176,7 +176,7 @@ size_t D_bInternalFlashPage_DumpFromRam(
void *sourceRamAddr,
uint32_t size
) {
size_t alignedSize = ((size / FLASH_PAGE_SIZE) + (size % FLASH_PAGE_SIZE ? 1 : 0)) * FLASH_PAGE_SIZE;
size_t alignedSize = ((size / FLASH_PAGE_D_SIZE) + (size % FLASH_PAGE_D_SIZE ? 1 : 0)) * FLASH_PAGE_D_SIZE;
if (!D_bInternalFlashPage_ClearRange(beginPageAddr, alignedSize,NULL, 0)) {
return 0;

View File

@ -52,7 +52,7 @@ bool P_bInternalFlashPage_Clear(
tFlashParam.u32Address = pageAddress;
tFlashParam.u32Length = FLASH_PAGE_SIZE;
tFlashParam.u32Length = FLASH_PAGE_P_SIZE;
if (FLASH_ERROR_OK != FLASHDRIVER_PFlashEraseSector(&tFlashParam)) {
return false;
}
@ -80,7 +80,7 @@ bool P_bInternalFlashPage_ClearRange(
void *wdTriggerFct,
void *wdTriggerFct_env
) {
if (totalSize % FLASH_PAGE_SIZE) {
if (totalSize % FLASH_PAGE_P_SIZE) {
return false;
}
@ -196,7 +196,7 @@ size_t P_bInternalFlashPage_DumpFromRam(
void *sourceRamAddr,
uint32_t size
) {
size_t alignedSize = ((size / FLASH_PAGE_SIZE) + (size % FLASH_PAGE_SIZE ? 1 : 0)) * FLASH_PAGE_SIZE;
size_t alignedSize = ((size / FLASH_PAGE_P_SIZE) + (size % FLASH_PAGE_P_SIZE ? 1 : 0)) * FLASH_PAGE_P_SIZE;
if (!P_bInternalFlashPage_ClearRange(beginPageAddr, alignedSize, NULL, 0)) {
return 0;