nt9856x/code/application/source/cardv/SrcCode/System/sys_usrmem.h
2024-01-16 21:02:16 +08:00

43 lines
736 B
C

#ifndef SYS_USRMEM_H
#define SYS_USRMEM_H
#include "kwrap/type.h"
#define SYS_USRMEM_NODE "/nvt_memory_cfg/usrmem"
#define SYS_USRMEM_TAG MAKEFOURCC('U','S','R','M')
typedef struct{
UINT32 tag;
UINT32 photo_ofs;
UINT32 photo_size;
UINT32 photo_sum;
} SYS_USRMEM_HDR;
typedef struct{
UINT32 addr;
UINT32 size;
UINT32 used_size;
SYS_USRMEM_HDR* hdr;
UINT32 addr_photo;
BOOL is_init;
} SYS_USRMEM;
INT32 sys_usrmem_init(SYS_USRMEM* usrmem);
#if defined(__FREERTOS)
INT32 sys_usrmem_write_photo(SYS_USRMEM* usrmem, UINT32 buf, UINT32 size);
#else
INT32 sys_usrmem_read_photo(SYS_USRMEM* usrmem, UINT32* addr, UINT32* size);
INT32 sys_usrmem_write_photo(SYS_USRMEM* usrmem, UINT32 buf, UINT32 size);
#endif
#endif