From 089185ca7ceb137813544ea08ed10539efc4f6c4 Mon Sep 17 00:00:00 2001 From: WXK <287788329@qq.com> Date: 星期三, 16 十月 2024 17:54:13 +0800 Subject: [PATCH] 111111 --- 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