mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-19 01:15:54 +08:00
[update] 增加STM32智慧宿舍基础代码
This commit is contained in:
35
firmware/stm32/smart_dormitory/User/flash/flash.h
Normal file
35
firmware/stm32/smart_dormitory/User/flash/flash.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/****************************************Copyright (c)****************************************************
|
||||
**
|
||||
** File name: flash.h
|
||||
** Created by: XiaoYi
|
||||
** Created date: 2020-10-16
|
||||
** Version: v1.0
|
||||
** Descriptions: The original
|
||||
** Link address: https://blog.csdn.net/weixin_45006076
|
||||
**
|
||||
*********************************************************************************************************/
|
||||
|
||||
#ifndef __FLASH_H__
|
||||
#define __FLASH_H__
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#define FLASH_WRITE_START_ADDR 0x0800FC00 //<2F><><EFBFBD><EFBFBD>1K<31><4B><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
#define FLASH_SIZE 64 //<2F><>ѡMCU<43><55>FLASH<53><48><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С(<28><>λΪK)
|
||||
|
||||
#if FLASH_SIZE < 256
|
||||
#define SECTOR_SIZE 1024 //<2F>ֽ<EFBFBD>
|
||||
#else
|
||||
#define SECTOR_SIZE 2048 //<2F>ֽ<EFBFBD>
|
||||
#endif
|
||||
|
||||
|
||||
uint16_t FLASH_ReadHalfWord(uint32_t address);
|
||||
|
||||
void FLASH_ReadMoreData(uint32_t startAddress,uint16_t *readData,uint16_t countToRead);
|
||||
|
||||
void FLASH_WriteMoreData(uint32_t startAddress,uint16_t *writeData,uint16_t countToWrite);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user