Add files via upload

This commit is contained in:
Nima Askari ----- نیما عسکری 2020-01-11 12:27:06 +03:30 committed by GitHub
parent 92ee76c3ce
commit 2b58fbceb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 21 deletions

View File

@ -1,18 +1,13 @@
# EEPROM emulation STM32 series library
<br />
I hope use it and enjoy.
<br />
I use Stm32f103C8 and Keil Compiler and Stm32CubeMX wizard.
<br />
I only test On this chip yet.
<br />
Please Do This ...
<br />
<br />
1) Select "General peripheral Initalizion as a pair of '.c/.h' file per peripheral" on project settings.
<br />
2) Config your EEPROMConfig.h file.
<br />
* http://www.github.com/NimaLTD
* https://www.instagram.com/github.nimaltd/
* https://www.youtube.com/channel/UCUhY7qY1klJm1d2kulr9ckw
This is the EEPROM emulation STM32 HAL Library
How to use this Library:
* Select "General peripheral Initalizion as a pair of '.c/.h' file per peripheral" on project settings.
* Include Header and source into your project.
* Config "EepromConfig.h".

View File

@ -37,7 +37,7 @@
#if (_EEPROM_F030x4_F030x6_F070x6_F030x8==1)
#define _EEPROM_FLASH_PAGE_SIZE 1024
/* Base address of the Flash sectors */
#define ADDR_FLASH_PAGE_0 ((uint32_t)0x08000000) /* Base @ of Page 0, 2 Kbytes */
#define ADDR_FLASH_PAGE_0 ((uint32_t)0x08000000) /* Base @ of Page 0, 1 Kbytes */
#define _EEPROM_FLASH_PAGE_ADDRESS (ADDR_FLASH_PAGE_0|(_EEPROM_FLASH_PAGE_SIZE*_EEPROM_USE_FLASH_PAGE))
#if (_EEPROM_USE_FLASH_PAGE>63)
#error "Please Enter currect value _EEPROM_USE_FLASH_PAGE (0 to 63)"

View File

@ -1,6 +1,27 @@
#ifndef __EEPROM_H
#define __EEPROM_H
/*
Author: Nima Askari
WebSite: http://www.github.com/NimaLTD
Instagram: http://instagram.com/github.NimaLTD
Youtube: https://www.youtube.com/channel/UCUhY7qY1klJm1d2kulr9ckw
Version: 1.1.0
Reversion History:
(1.1.0)
Add f0 devices.
(1.0.0)
First Release.
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <stdbool.h>
#include "gpio.h"
@ -14,4 +35,8 @@ bool EE_Writes(uint16_t StartVirtualAddress,uint16_t HowMuchToWrite,uint32_t*
uint16_t EE_GetSize(void);
//################################################################################################################
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,13 +1,13 @@
#ifndef __EEPROMCONFIG_H
#define __EEPROMCONFIG_H
#define _EEPROM_AUTO_ERASE___NEED_MORE_RAM (0) // store old data
#define _EEPROM_AUTO_ERASE___NEED_MORE_RAM (0) // store old data
#define _EEPROM_F030x4_F030x6_F070x6_F030x8 (1)
#define _EEPROM_F1_LOW_DESTINY (0)
#define _EEPROM_F1_MEDIUM_DESTINY (0)
#define _EEPROM_F1_HIGH_DESTINY (0)
#define _EEPROM_F030x4_F030x6_F070x6_F030x8 (1)
#define _EEPROM_F1_LOW_DESTINY (0)
#define _EEPROM_F1_MEDIUM_DESTINY (0)
#define _EEPROM_F1_HIGH_DESTINY (0)
#define _EEPROM_USE_FLASH_PAGE (31)
#define _EEPROM_USE_FLASH_PAGE (15)
#endif