|
VSF Documented
|
#include "hal/driver/driver.h"Macros | |
| #define | VSF_FLASH_CFG_FUNCTION_RENAME DISABLED |
| #define VSF_FLASH_CFG_FUNCTION_RENAME DISABLED |
| vsf_err_t vsf_flash_init | ( | vsf_flash_t * | flash_ptr, |
| vsf_flash_cfg_t * | cfg_ptr | ||
| ) |
Initialize a FLASH instance.
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| [in] | cfg_ptr | a pointer to configuration structure vsf_flash_cfg_t |
| void vsf_flash_fini | ( | vsf_flash_t * | flash_ptr | ) |
| fsm_rt_t vsf_flash_enable | ( | vsf_flash_t * | flash_ptr | ) |
Enable a FLASH instance.
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| fsm_rt_t vsf_flash_disable | ( | vsf_flash_t * | flash_ptr | ) |
Disable a FLASH instance.
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| void vsf_flash_irq_enable | ( | vsf_flash_t * | flash_ptr, |
| vsf_flash_irq_mask_t | irq_mask | ||
| ) |
Enable interrupt masks of FLASH instance.
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| [in] | irq_mask | one or more value of enum vsf_flash_irq_mask_t |
| void vsf_flash_irq_disable | ( | vsf_flash_t * | flash_ptr, |
| vsf_flash_irq_mask_t | irq_mask | ||
| ) |
Disable interrupt masks of FLASH instance.
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| [in] | irq_mask | one or more value of enum vsf_flash_irq_mask_t, vsf_flash_irq_mask_t |
| vsf_flash_status_t vsf_flash_status | ( | vsf_flash_t * | flash_ptr | ) |
Get the status of FLASH instance.
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| vsf_flash_capability_t vsf_flash_capability | ( | vsf_flash_t * | flash_ptr | ) |
Get the capabilities of FLASH instance.
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| vsf_err_t vsf_flash_erase_one_sector | ( | vsf_flash_t * | flash_ptr, |
| vsf_flash_size_t | offset_of_bytes | ||
| ) |
FLASH erase one sector.
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| [in] | offset_of_bytes | The address of the sector to be erased, needs to be an integer multiple of the smallest erasable sector size |
| vsf_err_t vsf_flash_erase_multi_sector | ( | vsf_flash_t * | flash_ptr, |
| vsf_flash_size_t | offset_of_bytes, | ||
| vsf_flash_size_t | size_of_bytes | ||
| ) |
Flash erase a continuous range.
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| [in] | offset_of_bytes | The address of the sector to be erased, needs to be an integer multiple of the smallest erasable sector size |
| [in] | size_of_bytes | Size in bytes to erase, needs to be an integer multiple of the smallest erasable sector size |
| vsf_err_t vsf_flash_erase_all | ( | vsf_flash_t * | flash_ptr | ) |
Flash chip erase.
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| vsf_err_t vsf_flash_write_one_sector | ( | vsf_flash_t * | flash_ptr, |
| vsf_flash_size_t | offset_of_bytes, | ||
| uint8_t * | buffer, | ||
| vsf_flash_size_t | size_of_bytes | ||
| ) |
Flash write one sector.
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| [in] | offset_of_bytes | Address of the sector to be written, some flash requires an integer multiple of the smallest writable sector size |
| [in] | buffer | a pointer to data |
| [in] | size_of_bytes | a pointer to data |
| vsf_err_t vsf_flash_write_multi_sector | ( | vsf_flash_t * | flash_ptr, |
| vsf_flash_size_t | offset_of_bytes, | ||
| uint8_t * | buffer, | ||
| vsf_flash_size_t | size_of_bytes | ||
| ) |
Flash write multi sector.
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| [in] | offset_of_bytes | Address of the sector to be written, some flash requires an integer multiple of the smallest writable sector size |
| [in] | buffer | a pointer to data |
| [in] | size_of_bytes | size of data to write |
| vsf_err_t vsf_flash_read_one_sector | ( | vsf_flash_t * | flash_ptr, |
| vsf_flash_size_t | offset_of_bytes, | ||
| uint8_t * | buffer, | ||
| vsf_flash_size_t | size_of_bytes | ||
| ) |
flash read one sector
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| [in] | offset_of_bytes | Address of the sector to be written, some flash requires an integer multiple of the smallest writable sector size |
| [in] | buffer | a pointer to data |
| [in] | size_of_bytes | a pointer to data |
| vsf_err_t vsf_flash_read_multi_sector | ( | vsf_flash_t * | flash_ptr, |
| vsf_flash_size_t | offset_of_bytes, | ||
| uint8_t * | buffer, | ||
| vsf_flash_size_t | size_of_bytes | ||
| ) |
flash read multi sector
| [in] | flash_ptr | a pointer to structure vsf_flash_t |
| [in] | offset_of_bytes | Address of the sector to be written, some flash requires an integer multiple of the smallest writable sector size |
| [in] | buffer | a pointer to data |
| [in] | size_of_bytes | a pointer to data |
| vsf_err_t vsf_flash_get_configuration | ( | vsf_flash_t * | flash_ptr, |
| vsf_flash_cfg_t * | cfg_ptr | ||
| ) |
Get current configuration of a FLASH instance.
| [in] | flash_ptr | Pointer to FLASH instance |
| [out] | cfg_ptr | Pointer to FLASH configuration structure to store current settings |