使用 kerneldoc

http://www.mjmwired.net/kernel/Documentation/kernel-doc-nano-HOWTO.txt

 

比如: drivers/rtc/rtc-pxa.c 中写:

 

/**

 * pxa_rtc_probe() - probe function for pxa micco driver

 * @pdev:      device structure from bus driver

 *

 * 1. set gpio0_2 as gpio mode and in direction.

 *

 * 2. register rtc driver to rtc framework

 *

 * 3. init work queue which will be used in interrupt handler

 *

 **/

static int pxa_rtc_probe(struct platform_device *pdev)

{

 

 

工具生成:

./scripts/kernel-doc -html drivers/rtc/rtc-pxa.c  > /mnt/hgfs/share1/rtc-pxa.htm

 

最后获得:

 

pxa_rtc_probe - probe function for pxa micco driver

int pxa_rtc_probe (struct platform_device * pdev)

Arguments

pdev

device structure from bus driver

Description

1. set gpio0_2 as gpio mode and in direction.

2. register rtc driver to rtc framework

3. init work queue which will be used in interrupt handler

你可能感兴趣的:(function,struct,工具,structure)