[update] 增加STM32智慧宿舍基础代码

This commit is contained in:
solitary
2021-07-27 21:28:13 +08:00
parent 00dbbe55e3
commit 8b2c22efe2
952 changed files with 583792 additions and 0 deletions

View 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