EEE4STM32/ee.h

66 lines
2.1 KiB
C
Raw Normal View History

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
Version: 3.0.0
History:
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
{
uint32_t MagicWord;
uint8_t *DataPointer;
uint32_t Size;
uint32_t Lock;
} EE_HandleTypeDef;
/************************************************************************************************************
************** Public Functions
************************************************************************************************************/
bool EE_Init(void *StoragePointer, uint32_t Size);
uint32_t EE_Capacity(void);
bool EE_Format(bool EraseBuffer);
void EE_Read(void);
bool EE_Write(bool FormatFirst);
2020-05-12 06:05:35 +02:00
#ifdef __cplusplus
}
#endif
#endif