【CMSIS】CMSIS中doxygen注释格式

文章详细介绍了CMSISDSP库中函数的使用,包括转换函数如`arm_float_to_q14`,以及PID控制器的结构体`arm_pid_instance_f32`。同时,提到了文件头信息的格式,包含文件名、版本、日期和版权信息。此外,还阐述了矩阵乘法的功能和定义,以及如何进行矩阵操作的初始化和大小检查。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

函数

@brief:函数简要描述
@param[in]:函数输入参数
@param[out]:函数输出参数
@return:函数返回值

/**
 * @brief  Converts float to fixed q14
 * @param[in]  pIn         pointer to input buffer
 * @param[out] pOut        pointer to output buffer
 * @param[in]  numSamples  number of samples in the buffer
 * @return none
 * The function converts floating point values to fixed point values
 */
void arm_float_to_q14 (float *pIn, q15_t *pOut, uint32_t numSamples)

效果:
简要描述
more

枚举和结构体

@brief:枚举和结构体简要描述
/**< */:成员描述

  /**
   * @brief Instance structure for the floating-point PID Control.
   */
  typedef struct
  {
          float32_t A0;          /**< The derived gain, A0 = Kp + Ki + Kd . */
          float32_t A1;          /**< The derived gain, A1 = -Kp - 2Kd. */
          float32_t A2;          /**< The derived gain, A2 = Kd . */
          float32_t state[3];    /**< The state array of length 3. */
          float32_t Kp;          /**< The proportional gain. */
          float32_t Ki;          /**< The integral gain. */
          float32_t Kd;          /**< The derivative gain. */
  } arm_pid_instance_f32;

效果:
结构体和枚举效果

作者日期版权

@file:文件名
@brief:文件简介
@version:版本号
@date:日期

/******************************************************************************
 * @file     filtering_functions.h
 * @brief    Public header file for CMSIS DSP Library
 * @version  V1.10.0
 * @date     08 July 2021
 * Target Processor: Cortex-M and Cortex-A cores
 ******************************************************************************/
/*
 * Copyright (c) 2010-2020 Arm Limited or its affiliates. All rights reserved.
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the License); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

还可以有:
@author:作者
@email:邮箱
@license:开源协议

其他

  • @defgroup:定义一个新的group
/**
 1. @defgroup MatrixMult Matrix Multiplication
 2.  * Multiplies two matrices.
 3.  * \image html MatrixMultiplication.gif "Multiplication of two 3 x 3 matrices"

 4. Matrix multiplication is only defined if the number of columns of the
 5. first matrix equals the number of rows of the second matrix.
 6. Multiplying an <code>M x N</code> matrix with an <code>N x P</code> matrix results
 7. in an <code>M x P</code> matrix.
 8. When matrix size checking is enabled, the functions check: (1) that the inner dimensions of
 9. <code>pSrcA</code> and <code>pSrcB</code> are equal; and (2) that the size of the output
 10. matrix equals the outer dimensions of <code>pSrcA</code> and <code>pSrcB</code>.
 */

\img:插入图片
<code> </code>:代码
defgroup效果

/**
 * @defgroup groupMatrix Matrix Functions
 *
 * This set of functions provides basic matrix math operations.
 * The functions operate on matrix data structures.  For example,
 * the type
 * definition for the floating-point matrix structure is shown
 * below:
 * <pre>
 *     typedef struct
 *     {
 *       uint16_t numRows;     // number of rows of the matrix.
 *       uint16_t numCols;     // number of columns of the matrix.
 *       float32_t *pData;     // points to the data of the matrix.
 *     } arm_matrix_instance_f32;
 * </pre>
 * There are similar definitions for Q15 and Q31 data types.
 *
 * The structure specifies the size of the matrix and then points to
 * an array of data.  The array is of size <code>numRows X numCols</code>
 * and the values are arranged in row order.  That is, the
 * matrix element (i, j) is stored at:
 * <pre>
 *     pData[i*numCols + j]
 * </pre>
 *
 * \par Init Functions
 * There is an associated initialization function for each type of matrix
 * data structure.
 * The initialization function sets the values of the internal structure fields.
 * Refer to \ref arm_mat_init_f32(), \ref arm_mat_init_q31() and \ref arm_mat_init_q15()
 * for floating-point, Q31 and Q15 types,  respectively.
 *
 * \par
 * Use of the initialization function is optional. However, if initialization function is used
 * then the instance structure cannot be placed into a const data section.
 * To place the instance structure in a const data
 * section, manually initialize the data structure.  For example:
 * <pre>
 * <code>arm_matrix_instance_f32 S = {nRows, nColumns, pData};</code>
 * <code>arm_matrix_instance_q31 S = {nRows, nColumns, pData};</code>
 * <code>arm_matrix_instance_q15 S = {nRows, nColumns, pData};</code>
 * </pre>
 * where <code>nRows</code> specifies the number of rows, <code>nColumns</code>
 * specifies the number of columns, and <code>pData</code> points to the
 * data array.
 *
 * \par Size Checking
 * By default all of the matrix functions perform size checking on the input and
 * output matrices. For example, the matrix addition function verifies that the
 * two input matrices and the output matrix all have the same number of rows and
 * columns. If the size check fails the functions return:
 * <pre>
 *     ARM_MATH_SIZE_MISMATCH
 * </pre>
 * Otherwise the functions return
 * <pre>
 *     ARM_MATH_SUCCESS
 * </pre>
 * There is some overhead associated with this matrix size checking.
 * The matrix size checking is enabled via the \#define
 * <pre>
 *     ARM_MATH_MATRIX_CHECK
 * </pre>
 * within the library project settings.  By default this macro is defined
 * and size checking is enabled. By changing the project settings and
 * undefining this macro size checking is eliminated and the functions
 * run a bit faster. With size checking disabled the functions always
 * return <code>ARM_MATH_SUCCESS</code>.
 */

defgroup效果

\par:相当于一个小节
<pre> </pre>:code差不多,但能保持原有空格,函数自动变成超级链接
\ref:指定超级链接

  • @ingroup @addtogroup:加入到group中
/**
  @ingroup groupSupport
 */
/**
 * @addtogroup MatrixMult
 * @{
 */
 ....
 /**
 * @} end of MatrixMult group
 */

@ingroup 比@addtogroup优先级更高

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

苏打豆

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值