现在的位置: 首页 > 综合 > 正文

使用 kerneldoc

2013年08月08日 ⁄ 综合 ⁄ 共 726字 ⁄ 字号 评论关闭

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

抱歉!评论已关闭.