Skip to content

你好,请问C语言函数注释能否取消参数类型? #397

@Cathgao

Description

@Cathgao

因为函数定义已经能看到参数的类型,注释里再显示就有点多余了,在vscode里显示也不太好看

/**
 * @brief 往指定地址写入数据
 * @param BaseDataAdress {uint32_t} 写入数据基址
 * @param OffsetDataAdress {uint32_t} 基址偏移量
 * @param LENS_Data {uint16_t} 要写入的数据
 * @return {*}
 */

55de2f045b2a400aba2427d8368d0621

而stm32函数库里函数注释的参数是不写类型的,看起来描述就比较直观

/**
  * @brief  Reads the specified input port pin.
  * @param  GPIOx: where x can be (A..G) to select the GPIO peripheral.
  * @param  GPIO_Pin:  specifies the port bit to read.
  *   This parameter can be GPIO_Pin_x where x can be (0..15).
  * @retval The input port pin value.
  */

0f90a10cf5f443d5bb0255cce08af5ce

而如果配置字段里添加了"fileheader.configObj": {"typeParamOrder": "param"} (删掉type)之后,参数就全部变成undefined

/**
 * @brief 
 * @param undefined
 * @param undefined
 * @param undefined
 * @return {*}
 */

28f16381b0d241e09a8dd418d1e14044
请问如何能配置成像stm32库一样的函数注释?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions