IPMUX1IPMUX2IPMUX3: opl_regmmap_test.c文件参考

RTL96xx (RTL9607,...)

opl_regmmap_test.c文件参考

#include <stdlib.h> #include <sys/mman.h>
#include <fcntl.h>
#include "../include/opl_typedef.h"

浏览该文件的源代码。


Macro definition

#define OPL_REG_DEVICE   "/dev/opl_reg"
#define OPL_REG_SIZE   0x300000

local variable declaration and definition

u32 reg_read (char *reg_base, int offset)
 description: use to read the value of (reg_base + offset);
void reg_write (char *reg_base, int offset, u32 value)
 description: write the u32 value into regbase + offset,if the offset is not alignment of 4, it will return and print error message.
void opl_reg_main (int argc, char **argv)
 description: the body unit testing of regmmap module ,it will be completed.
int opl_reg_init (int *opl_reg_initialized)
 description: use to open the /dev/opl_reg device and do mmap() it.
int opl_reg_exit (int *opl_reg_initialized)
 description: do close file and unmap the memory mmaped before.

global variable and function exported

char * opl_reg_base = NULL
 HELP.
char * OPL_REG_USAGE
int opl_reg_fd
 global fd of the "/dev/opl_reg"

函数

int main (int argc, char **argv)
 description:the Entry of the unit testing for opl_regmmap module.

Generated at Mon Jul 30 16:43:48 2007 for IPMUX1IPMUX2IPMUX3 by  doxygen 1.3.9.1