no-OS
|
Header file for flash controller driver. More...
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | no_os_flash_dev |
Flash controller device structure. More... | |
struct | no_os_flash_init_param |
Flash controller initialization structure. More... | |
Functions | |
int32_t | no_os_flash_init (struct no_os_flash_dev **device, struct no_os_flash_init_param *init_param) |
int32_t | no_os_flash_remove (struct no_os_flash_dev *dev) |
int32_t | no_os_flash_clear_page (struct no_os_flash_dev *dev, int32_t page_no) |
int32_t | no_os_flash_write_page (struct no_os_flash_dev *dev, int32_t page_no, uint32_t *data) |
int32_t | flash_read_page (struct no_os_flash_dev *dev, int32_t page_no, uint32_t *data) |
int32_t | no_os_flash_write (struct no_os_flash_dev *dev, uint32_t flash_addr, uint32_t *array, uint32_t array_size) |
int32_t | no_os_flash_read (struct no_os_flash_dev *dev, uint32_t flash_addr, uint32_t *array, uint32_t size) |
Header file for flash controller driver.
Copyright 2021(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
int32_t flash_read_page | ( | struct no_os_flash_dev * | dev, |
int32_t | page_no, | ||
uint32_t * | data | ||
) |
Read a flash page.
int32_t no_os_flash_clear_page | ( | struct no_os_flash_dev * | dev, |
int32_t | page_no | ||
) |
Erase a flash page.
Erase a flash page.
[in] | dev | - Pointer to the flash device handler. |
[in] | page_no | - Page number. |
int32_t no_os_flash_init | ( | struct no_os_flash_dev ** | device, |
struct no_os_flash_init_param * | init_param | ||
) |
Initialize flash controller.
Initialize flash controller.
[out] | device | - Pointer to the driver handler. |
[in] | init_param | - Pointer to the initialization structure. |
int32_t no_os_flash_read | ( | struct no_os_flash_dev * | dev, |
uint32_t | flash_addr, | ||
uint32_t * | array, | ||
uint32_t | size | ||
) |
Read data from the flash memory.
Read data from the flash memory.
[in] | dev | - Pointer to the flash device handler. |
[in] | flash_addr | - Start address of the read. |
[out] | array | - Pointer to the container for the read data. |
[in] | size | - Size of the read data in 32-bit words. |
int32_t no_os_flash_remove | ( | struct no_os_flash_dev * | dev | ) |
Free memory allocated by no_os_flash_init().
Free memory allocated by no_os_flash_init().
[in] | dev | - Pointer to the driver handler. |
int32_t no_os_flash_write | ( | struct no_os_flash_dev * | dev, |
uint32_t | flash_addr, | ||
uint32_t * | array, | ||
uint32_t | array_size | ||
) |
Write data in flash memory.
Write data in flash memory.
[in] | dev | - Pointer to the flash device handler. |
[in] | flash_addr | - Start address of the write. |
[in] | array | - Pointer to the data to be written. |
[in] | array_size | - Size of the written data in 32-bit words. |
int32_t no_os_flash_write_page | ( | struct no_os_flash_dev * | dev, |
int32_t | page_no, | ||
uint32_t * | data | ||
) |
Write a flash page.
Write a page in flash memory.
[in] | dev | - Pointer to the flash device handler. |
[in] | page_no | - Page number. |
[in] | data | - Pointer to the data to be written. data length must be FLASH_PAGE_SIZE_WORDS in size. |