2024-03-25 20:36:03 +01:00
|
|
|
#ifndef _EE_H_
|
|
|
|
#define _EE_H_
|
|
|
|
|
|
|
|
/***********************************************************************************************************
|
2020-05-12 06:05:35 +02:00
|
|
|
|
|
|
|
Author: Nima Askari
|
2024-03-25 20:36:03 +01:00
|
|
|
Github: https://www.github.com/NimaLTD
|
|
|
|
LinkedIn: https://www.linkedin.com/in/nimaltd
|
|
|
|
Youtube: https://www.youtube.com/@nimaltd
|
|
|
|
Instagram: https://instagram.com/github.NimaLTD
|
|
|
|
|
2024-07-04 18:43:36 +02:00
|
|
|
Version: 3.1.3
|
|
|
|
|
2024-03-25 20:36:03 +01:00
|
|
|
History:
|
2024-07-04 18:43:36 +02:00
|
|
|
3.1.3
|
|
|
|
- Fixed L0, L1 configuration
|
|
|
|
|
2024-06-21 18:41:49 +02:00
|
|
|
3.1.2
|
|
|
|
- Fixed H5 configuration
|
|
|
|
|
|
|
|
3.1.1
|
2024-06-16 14:28:27 +02:00
|
|
|
- Fixed formatting F4
|
2024-06-16 14:26:15 +02:00
|
|
|
|
2024-05-04 06:34:29 +02:00
|
|
|
3.1.0
|
|
|
|
- Added Verify after Writing
|
|
|
|
- Added Checking Pointer in Reading/Writing
|
|
|
|
- Removed erasing buffer and formating before write
|
|
|
|
|
2024-04-14 14:09:42 +02:00
|
|
|
3.0.2
|
|
|
|
- Fixed Writing for H7B
|
2024-03-25 20:36:03 +01:00
|
|
|
|
2024-04-14 14:09:42 +02:00
|
|
|
3.0.1
|
|
|
|
- Added comments
|
|
|
|
|
2024-03-25 20:36:03 +01:00
|
|
|
3.0.0
|
|
|
|
- Rewrite again
|
|
|
|
- Support STM32CubeMx Packet installer
|
|
|
|
|
|
|
|
***********************************************************************************************************/
|
2020-05-12 06:05:35 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2024-03-25 20:36:03 +01:00
|
|
|
extern "C"
|
|
|
|
{
|
2020-05-12 06:05:35 +02:00
|
|
|
#endif
|
|
|
|
|
2024-03-25 20:36:03 +01:00
|
|
|
/************************************************************************************************************
|
|
|
|
************** Include Headers
|
|
|
|
************************************************************************************************************/
|
|
|
|
|
2020-05-12 06:05:35 +02:00
|
|
|
#include <stdbool.h>
|
2021-01-18 07:48:18 +01:00
|
|
|
#include "main.h"
|
2020-05-12 06:05:35 +02:00
|
|
|
|
2024-03-25 20:36:03 +01:00
|
|
|
/************************************************************************************************************
|
|
|
|
************** Public Definitions
|
|
|
|
************************************************************************************************************/
|
2020-05-12 06:05:35 +02:00
|
|
|
|
2024-03-25 20:36:03 +01:00
|
|
|
|
|
|
|
/************************************************************************************************************
|
|
|
|
************** Public struct/enum
|
|
|
|
************************************************************************************************************/
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
uint8_t *DataPointer;
|
|
|
|
uint32_t Size;
|
|
|
|
|
|
|
|
} EE_HandleTypeDef;
|
|
|
|
|
|
|
|
/************************************************************************************************************
|
|
|
|
************** Public Functions
|
|
|
|
************************************************************************************************************/
|
|
|
|
|
|
|
|
bool EE_Init(void *StoragePointer, uint32_t Size);
|
|
|
|
uint32_t EE_Capacity(void);
|
2024-05-04 06:34:29 +02:00
|
|
|
bool EE_Format(void);
|
2024-03-25 20:36:03 +01:00
|
|
|
void EE_Read(void);
|
2024-05-04 06:34:29 +02:00
|
|
|
bool EE_Write(void);
|
2020-05-12 06:05:35 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|