IPMUX1IPMUX2IPMUX3: function_description(opl_reg_test.c)

RTL96xx (RTL9607,...)

function_description(opl_reg_test.c)
[register mmap test module]


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.

函数

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

函数文档

int main int  argc,
char **  argv
 

description:the Entry of the unit testing for opl_regmmap module.

参数:
@param 
返回值:
@retval 
参见:
Deprecated:

在文件opl_regmmap_test.c247行定义。

参考 opl_reg_exit()opl_reg_init()opl_reg_main().

int opl_reg_exit int *  opl_reg_initialized  ) 
 

description: do close file and unmap the memory mmaped before.

参数:
*opl_reg_initialized: if initialized,exit will close it and do unmap it.
返回值:
0 success
-1 failed
参见:
Deprecated:

在文件opl_regmmap_test.c227行定义。

参考 opl_reg_baseopl_reg_fdOPL_REG_SIZE.

int opl_reg_init int *  opl_reg_initialized  ) 
 

description: use to open the /dev/opl_reg device and do mmap() it.

参数:
*opl_reg_initialized,1 indicated open device and mmap successfully.
返回值:
0 success
-x failed.
参见:
Deprecated:

在文件opl_regmmap_test.c203行定义。

参考 opl_reg_baseOPL_REG_DEVICEopl_reg_fdOPL_REG_SIZE.

void opl_reg_main int  argc,
char **  argv
 

description: the body unit testing of regmmap module ,it will be completed.

参数:
int argc
char **argv
返回:
void
参见:
Deprecated:

在文件opl_regmmap_test.c151行定义。

参考 opl_reg_baseOPL_REG_USAGEreg_read()reg_write()u32.

参考自 main().

u32 reg_read char *  reg_base,
int  offset
 

description: use to read the value of (reg_base + offset);

参数:
*reg_base: the base address of mmap().
offset the offset of the reg_base.
返回:
the value(u32) of the (reg_base +offset)
返回值:
-1 indicate the offset is not alignment of 4. or the value is 0xffff,ffff.
 
参见:
Deprecated:

在文件opl_regmmap_test.c115行定义。

参考 u32.

参考自 opl_reg_main().

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.

参数:
*reg_base: the base address of mmap().
offset the offset of the reg_base.
返回:
void
参见:
Deprecated:

在文件opl_regmmap_test.c134行定义。

参考 u32.

参考自 opl_reg_main().


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