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 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 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 |
fsm_rt_t vsf_flash_disable | ( | vsf_flash_t * | flash_ptr | ) |
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 |
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 capability 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 | a pointer to structure vsf_flash_t |
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 | a pointer to data |
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 |