?? dmablib.h
字號:
/*****************************************************************************File dmablibAuthor SasiFunction Library support for direct memory access & allocation for DMA for Linux user mode clients Requires dmab.o driver to be loaded*****************************************************************************/#ifndef DMABLIB_SASI#define DMABLIB_SASI/* treat as opaque */typedef struct{ unsigned long size; /* in - size to allocate */ unsigned long phys; /* out - physical address allocated */ void *virt; /* rsv - kernel virtual address mapped */ void *user; /* out - user virtual address mapped */}DMABUF_T;int dmab_init(char *name);/* in name name of device file or NULL for default ret -1 on failure*/int dmab_exit(int h);/* in h return from previous call to dmab_init ret 0 on failure*/void *dmab_get(int h, int size, DMABUF_T *t);/* in h return from previous call to dmab_init size bytes to allocate out t opaque structure for use in dmab_free proc allocates & maps DMA buffer ret t->user (0 on failure)*/int dmab_free(int h, DMABUF_T *t);/* in h return from previous call to dmab_init t from previous successful call to dmab_get proc unmaps buffer & frees it ret 0 on success*/#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -