From 379a3f241ce0ba109f94c15d0474640ae480c590 Mon Sep 17 00:00:00 2001 From: WXK <287788329@qq.com> Date: 星期三, 27 九月 2023 11:21:41 +0800 Subject: [PATCH] 1 --- HAL/Flash.c | 27 ++++++++++++++------------- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/HAL/Flash.c b/HAL/Flash.c index fd2fdd4..87ef193 100644 --- a/HAL/Flash.c +++ b/HAL/Flash.c @@ -11,19 +11,20 @@ } uint32_t FLASH_Pages_Calculate(uint32_t Size) { - uint32_t Flash_Page_Number = 0; - - if( Size % PAGE_SIZE != 0) - { - Flash_Page_Number = ( Size / PAGE_SIZE) + 1; - } - else - Flash_Page_Number = Size / PAGE_SIZE; - - if( Flash_Page_Number > MAX_FPAGE_NUM) - return 0; - else - return Flash_Page_Number; +// uint32_t Flash_Page_Number = 0; +// +// if( Size % PAGE_SIZE != 0) +// { +// Flash_Page_Number = ( Size / PAGE_SIZE) + 1; +// } +// else +// Flash_Page_Number = Size / PAGE_SIZE; +// +// if( Flash_Page_Number > MAX_FPAGE_NUM) +// return 0; +// else +// return Flash_Page_Number; + return 1; } -- Gitblit v1.9.3