VSF Documented
|
Go to the source code of this file.
Data Structures | |
struct | vsf_flash_isr_t |
struct | vsf_flash_cfg_t |
struct | vsf_flash_status_t |
struct | vsf_flash_capability_t |
struct | vsf_flash_op_t |
struct | vsf_flash_t |
Typedefs | |
typedef enum vsf_flash_irq_mask_t | vsf_flash_irq_mask_t |
typedef uint_fast32_t | vsf_flash_size_t |
typedef struct vsf_flash_t | vsf_flash_t |
typedef void | vsf_flash_isr_handler_t(void *target_ptr, vsf_flash_t *flash_ptr, vsf_flash_irq_mask_t mask) |
typedef struct vsf_flash_isr_t | vsf_flash_isr_t |
typedef struct vsf_flash_cfg_t | vsf_flash_cfg_t |
typedef struct vsf_flash_status_t | vsf_flash_status_t |
typedef struct vsf_flash_capability_t | vsf_flash_capability_t |
typedef struct vsf_flash_op_t | vsf_flash_op_t |
Enumerations | |
enum | vsf_flash_irq_mask_t { VSF_FLASH_IRQ_ERASE_MASK = (0x1ul << 0) , VSF_FLASH_IRQ_WRITE_MASK = (0x1ul << 1) , VSF_FLASH_IRQ_READ_MASK = (0x1ul << 2) , VSF_FLASH_IRQ_ERASE_ERROR_MASK = (0x1ul << 3) , VSF_FLASH_IRQ_WRITE_ERROR_MASK = (0x1ul << 4) , VSF_FLASH_IRQ_READ_ERROR_MASK = (0x1ul << 5) } |
enum | { VSF_FLASH_IRQ_COUNT = 6 , VSF_FLASH_IRQ_ALL_BITS_MASK } |
Functions | |
vsf_err_t | vsf_flash_init (vsf_flash_t *flash_ptr, vsf_flash_cfg_t *cfg_ptr) |
initialize a flash instance. | |
void | vsf_flash_fini (vsf_flash_t *flash_ptr) |
finalize a flash instance. | |
fsm_rt_t | vsf_flash_enable (vsf_flash_t *flash_ptr) |
enable interrupt masks of flash instance. | |
fsm_rt_t | vsf_flash_disable (vsf_flash_t *flash_ptr) |
disable interrupt masks of flash instance. | |
vsf_flash_status_t | vsf_flash_status (vsf_flash_t *flash_ptr) |
get the status of flash instance. | |
vsf_flash_capability_t | vsf_flash_capability (vsf_flash_t *flash_ptr) |
get the capability of flash instance. | |
void | vsf_flash_irq_enable (vsf_flash_t *flash_ptr, vsf_flash_irq_mask_t irq_mask) |
enable interrupt masks of flash instance. | |
void | vsf_flash_irq_disable (vsf_flash_t *flash_ptr, vsf_flash_irq_mask_t irq_mask) |
disable interrupt masks of flash instance. | |
vsf_err_t | vsf_flash_erase_one_sector (vsf_flash_t *flash_ptr, vsf_flash_size_t offset_of_bytes) |
flash erase one sector. | |
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 | |
vsf_err_t | vsf_flash_erase_all (vsf_flash_t *flash_ptr) |
flash chip erase | |
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 | |
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 | |
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 | |
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 | |
#define VSF_FLASH_CFG_MULTI_CLASS ENABLED |
#define VSF_FLASH_CFG_PREFIX vsf |
#define VSF_FLASH_CFG_FUNCTION_RENAME ENABLED |
#define VSF_FLASH_CFG_REIMPLEMENT_TYPE_IRQ_MASK DISABLED |
#define VSF_FLASH_CFG_REIMPLEMENT_TYPE_FLASH_SIZE DISABLED |
#define VSF_FLASH_CFG_REIMPLEMENT_TYPE_STATUS DISABLED |
#define VSF_FLASH_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
Redefine struct vsf_flash_cfg_t. The vsf_flash_isr_handler_t type also needs to be redefined For compatibility, members should not be deleted when struct vsf_flash_cfg_t redefining.
#define VSF_FLASH_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
Redefine struct vsf_flash_capability_t. For compatibility, members should not be deleted when struct vsf_flash_capability_t redefining.
#define VSF_FLASH_CFG_INHERT_HAL_CAPABILITY ENABLED |
#define VSF_FLASH_APIS | ( | __prefix_name | ) |
#define __VSF_HAL_TEMPLATE_API VSF_HAL_TEMPLATE_API_FP |
#define __vsf_flash_t VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_t) |
#define vsf_flash_init | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_init) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
#define vsf_flash_fini | ( | __FLASH | ) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_fini) ((__vsf_flash_t *)(__FLASH)) |
#define vsf_flash_enable | ( | __FLASH | ) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_enable) ((__vsf_flash_t *)(__FLASH)) |
#define vsf_flash_disable | ( | __FLASH | ) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_disable) ((__vsf_flash_t *)(__FLASH)) |
#define vsf_flash_capability | ( | __FLASH | ) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_capability) ((__vsf_flash_t *)(__FLASH)) |
#define vsf_flash_status | ( | __FLASH | ) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_status) ((__vsf_flash_t *)(__FLASH)) |
#define vsf_flash_irq_enable | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_irq_enable) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
#define vsf_flash_irq_disable | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_irq_disable) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
#define vsf_flash_erase_one_sector | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_erase_one_sector) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
#define vsf_flash_erase_multi_sector | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_erase_multi_sector) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
#define vsf_flash_erase | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_erase_multi_sector) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
#define vsf_flash_erase_all | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_erase_all) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
#define vsf_flash_write_one_sector | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_write_one_sector) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
#define vsf_flash_write_multi_sector | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_write_multi_sector) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
#define vsf_flash_write | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_write_multi_sector) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
#define vsf_flash_read_one_sector | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_read_one_sector) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
#define vsf_flash_read_multi_sector | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_read_multi_sector) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
#define vsf_flash_read | ( | __FLASH, | |
... | |||
) | VSF_MCONNECT(VSF_FLASH_CFG_PREFIX, _flash_read_multi_sector) ((__vsf_flash_t *)(__FLASH), ##__VA_ARGS__) |
typedef enum vsf_flash_irq_mask_t vsf_flash_irq_mask_t |
typedef uint_fast32_t vsf_flash_size_t |
typedef struct vsf_flash_t vsf_flash_t |
typedef void vsf_flash_isr_handler_t(void *target_ptr, vsf_flash_t *flash_ptr, vsf_flash_irq_mask_t mask) |
typedef struct vsf_flash_isr_t vsf_flash_isr_t |
typedef struct vsf_flash_cfg_t vsf_flash_cfg_t |
typedef struct vsf_flash_status_t vsf_flash_status_t |
typedef struct vsf_flash_capability_t vsf_flash_capability_t |
typedef struct vsf_flash_op_t vsf_flash_op_t |
enum vsf_flash_irq_mask_t |
|
extern |
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 |
|
extern |
|
extern |
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 |
|
extern |
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 |
|
extern |
get the status of flash instance.
[in] | flash_ptr | a pointer to structure vsf_flash_t |
|
extern |
get the capability of flash instance.
[in] | flash_ptr | a pointer to structure vsf_flash_t |
|
extern |
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 |
|
extern |
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 |
|
extern |
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 |
|
extern |
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 |
|
extern |
flash chip erase
[in] | flash_ptr | a pointer to structure vsf_flash_t |
|
extern |
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 |
|
extern |
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 |
|
extern |
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 |
|
extern |
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 |