45#if VSF_USE_MAL == ENABLED
49#if defined(__VSF_MAL_CLASS_IMPLEMENT)
50# define __VSF_CLASS_IMPLEMENT__
51#elif defined(__VSF_MAL_CLASS_INHERIT__)
52# define __VSF_CLASS_INHERIT__
63#if VSF_KERNEL_CFG_EDA_SUPPORT_SUB_CALL != ENABLED
64# error VSF_KERNEL_CFG_EDA_SUPPORT_SUB_CALL is needed to use mal
71#if VSF_USE_SIMPLE_STREAM == ENABLED
179#if VSF_USE_SIMPLE_STREAM == ENABLED
207#if defined(__VSF_MAL_CLASS_IMPLEMENT) || defined(__VSF_MAL_CLASS_INHERIT__)
262#if VSF_KERNEL_CFG_SUPPORT_SYNC == ENABLED
430#if VSF_USE_SIMPLE_STREAM == ENABLED
501#undef __VSF_MAL_CLASS_IMPLEMENT
502#undef __VSF_MAL_CLASS_INHERIT__
#define ENABLED
Definition __type.h:28
vsf_err_t
Definition __type.h:42
mal driver
Definition vsf_mal.h:98
mal stream class
Definition vsf_mal.h:187
mal class
Definition vsf_mal.h:154
Definition vsf_simple_stream.h:254
#define vsf_dcl_class
Definition ooc_class.h:46
#define vsf_class(__name)
Definition ooc_class.h:48
unsigned uint32_t
Definition stdint.h:9
unsigned int uint_fast32_t
Definition stdint.h:27
unsigned long long uint64_t
Definition stdint.h:11
unsigned long long uint_fast64_t
Definition stdint.h:29
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_utilities.h:51
#define read
Definition unistd.h:122
#define write
Definition unistd.h:123
#define __vsf_component_peda_ifs(__peda_name,...)
Definition vsf_component_cfg.h:62
#define vsf_peda_evthandler_t
Definition vsf_component_cfg.h:37
#define VSF_KERNEL_CFG_SUPPORT_SYNC
Definition vsf_kernel_cfg.h:46
vsf_err_t vk_mal_write_stream(vk_mal_stream_t *pthis, uint_fast64_t addr, uint_fast32_t size, vsf_stream_t *stream)
prepare subcall to write a stream into mal instance.
Definition vsf_mal.c:453
vsf_mal_op_t
This module provides MAL(Memory Abstraction Layser) device class. !
Definition vsf_mal.h:77
@ VSF_MAL_OP_WRITE
Definition vsf_mal.h:80
@ VSF_MAL_OP_READ
Definition vsf_mal.h:79
@ VSF_MAL_OP_ERASE
Definition vsf_mal.h:78
vsf_err_t vk_mal_read_stream(vk_mal_stream_t *pthis, uint_fast64_t addr, uint_fast32_t size, vsf_stream_t *stream)
prepare subcall to read mal instance into a stream.
Definition vsf_mal.c:442
bool vk_mal_prepare_buffer(vk_mal_t *pthis, uint_fast64_t addr, uint_fast32_t size, vsf_mal_op_t op, vsf_mem_t *mem)
get the local memory of a dedicated operation, if mal instance has VSF_MAL_LOCAL_BUFFER feature.
Definition vsf_mal.c:110
const vk_mal_drv_t vk_reentrant_mal_drv
class driver of vk_reentrant_mal_t, used to bet set to the drv member in vk_mal_t
vsf_err_t vk_mal_fini(vk_mal_t *pthis)
prepare subcall to finialize a mal instance.
Definition vsf_mal.c:96
vsf_mal_feature_t
Definition vsf_mal.h:83
@ VSF_MAL_READABLE
Definition vsf_mal.h:84
@ VSF_MAL_LOCAL_BUFFER
Definition vsf_mal.h:88
@ VSF_MAL_ERASABLE
Definition vsf_mal.h:86
@ VSF_MAL_WRITABLE
Definition vsf_mal.h:85
@ VSF_MAL_NON_UNIFIED_BLOCK
Definition vsf_mal.h:87
vsf_err_t vk_mal_erase(vk_mal_t *pthis, uint_fast64_t addr, uint_fast32_t size)
prepare subcall to erase a mal instance.
Definition vsf_mal.c:122
uint_fast32_t vk_mal_blksz(vk_mal_t *pthis, uint_fast64_t addr, uint_fast32_t size, vsf_mal_op_t op)
get the block size of a dedicated operation.
Definition vsf_mal.c:104
vsf_err_t vk_mal_read(vk_mal_t *pthis, uint_fast64_t addr, uint_fast32_t size, uint8_t *buff)
prepare subcall to read a mal instance.
Definition vsf_mal.c:133
vsf_err_t vk_mal_init(vk_mal_t *pthis)
prepare subcall to initialize a mal instance.
Definition vsf_mal.c:88
vsf_err_t vk_mal_write(vk_mal_t *pthis, uint_fast64_t addr, uint_fast32_t size, uint8_t *buff)
prepare subcall to write a mal instance.
Definition vsf_mal.c:145
uint32_t wsize
Definition vsf_memfs.h:52
uint64_t offset
Definition vsf_memfs.h:49
uint8_t * buff
Definition vsf_memfs.h:51
uint32_t size
Definition vsf_memfs.h:50