no-OS
flash.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef FLASH_H_
41 #define FLASH_H_
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 
47 #include <stdint.h>
48 
49 /******************************************************************************/
50 /*************************** Types Declarations *******************************/
51 /******************************************************************************/
52 
57 struct flash_dev {
59  uint8_t id;
61  uint32_t flash_size;
63  uint32_t page_size;
65  void *extra;
66 };
67 
74  uint8_t id;
76  uint32_t flash_size;
78  uint32_t flash_page_size;
80  void *extra;
81 };
82 
83 /******************************************************************************/
84 /************************ Functions Declarations ******************************/
85 /******************************************************************************/
86 
88 int32_t flash_init(struct flash_dev **device,
90 
92 int32_t flash_remove(struct flash_dev *dev);
93 
95 int32_t flash_clear_page(struct flash_dev *dev, int32_t page_no);
96 
98 int32_t flash_write_page(struct flash_dev *dev, int32_t page_no,
99  uint32_t *data);
100 
102 int32_t flash_read_page(struct flash_dev *dev, int32_t page_no, uint32_t *data);
103 
105 int32_t flash_write(struct flash_dev *dev, uint32_t flash_addr,
106  uint32_t *array, uint32_t array_size);
107 
109 int32_t flash_read(struct flash_dev *dev, uint32_t flash_addr, uint32_t *array,
110  uint32_t size);
111 
112 #endif /* FLASH_H_ */
flash_clear_page
int32_t flash_clear_page(struct flash_dev *dev, int32_t page_no)
Definition: flash.c:158
flash_dev::page_size
uint32_t page_size
Definition: flash.h:63
device
Definition: ad9361_util.h:75
flash_dev::id
uint8_t id
Definition: flash.h:59
flash_read
int32_t flash_read(struct flash_dev *dev, uint32_t flash_addr, uint32_t *array, uint32_t size)
Definition: flash.c:287
flash_init_param::flash_size
uint32_t flash_size
Definition: flash.h:76
flash_dev
Flash controller device structure.
Definition: flash.h:57
flash_init
int32_t flash_init(struct flash_dev **device, struct flash_init_param *init_param)
Definition: flash.c:83
flash_init_param
Flash controller initialization structure.
Definition: flash.h:72
flash_remove
int32_t flash_remove(struct flash_dev *dev)
Definition: flash.c:130
flash_dev::flash_size
uint32_t flash_size
Definition: flash.h:61
flash_dev::extra
void * extra
Definition: flash.h:65
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
flash_read_page
int32_t flash_read_page(struct flash_dev *dev, int32_t page_no, uint32_t *data)
flash_init_param::id
uint8_t id
Definition: flash.h:74
flash_init_param::flash_page_size
uint32_t flash_page_size
Definition: flash.h:78
flash_write
int32_t flash_write(struct flash_dev *dev, uint32_t flash_addr, uint32_t *array, uint32_t array_size)
Definition: flash.c:257
flash_write_page
int32_t flash_write_page(struct flash_dev *dev, int32_t page_no, uint32_t *data)
Definition: flash.c:185
flash_init_param::extra
void * extra
Definition: flash.h:80