main_ubi_sdk v 0.1.3
This is UBI4 documentation
flash_driver.h
Go to the documentation of this file.
1/*
2 ******************************************************************************
3 * @file flash_driver.h
4 * @author A.Alborov
5 ******************************************************************************
6*/
7
8#ifndef INC_FLASH_DRIVER_H_
9#define INC_FLASH_DRIVER_H_
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#include "stdint.h"
16#include "stdbool.h"
17#include "UBI_SDK.h"
18
20
21
22#ifdef UBI_SDK_TARGET_STM32L1
23#define MIN_SECTOR_SIZE 0x100U
24#endif
25
26
27#ifdef UBI_SDK_TARGET_STM32F4
28#define MIN_SECTOR_SIZE 0x4000U
29#endif
30
31#ifdef UBI_SDK_TARGET_STM32G0
32#define MIN_SECTOR_SIZE 0x800U
33#endif
34
35#ifdef UBI_SDK_TARGET_STM32G4
36#define MIN_SECTOR_SIZE 0x800U
37#endif
38
39
40
42
43
44
45 /*
46typedef enum {
47 FDSE_WRITE_OK = 0,
48 FDSE_OWERWRITING_NOT_REQUERED,
49 FDSE_DATA_CONTAINE_IN_FLASH_BUFFER,
50 FDSE_FLASH_BUFFER_BUSY,
51 FDSE_FLASH_WRITE_ERROR
52 }flash_driver_status_enum;
53
54
55
56
57void clear_flash_sector(uint32_t Address);
58
59uint32_t getSectorNumber(uint32_t Address);
60
61uint32_t getStartSectorAddress(uint32_t Address);
62
63void finish_used_flash();
64*/
65
66#ifdef __cplusplus
67}
68#endif
69
70#endif /* INC_FLASH_DRIVER_H_ */
void init_flash_driver(base_memory_driver_struct **memory_driver)
Definition base_memory_driver.h:70