MDK keil template annotation template

When you write a program, you tend to follow certain norms. Good code style can improve the readability of the code, easy to maintain and upgrade. Here are some comment templates that mimic the code style of the STM32 official HAL library source code.
1. Add user comment template to MDK

2. Use some code comment templates
Void bsp_dac1_Init(void) {void bsp_dac1_Init(void) {void bsp_dac1_Init(void) {void bsp_dac1_Init(void);

 /** @defgroup BSP_DAC_Driver
   * @brief xxx driver modules
   * @{
   */ 
     void bsp_dac1_Init(void);
 /** 
   * @}
   */

void bsp_dac2_Init(void) is added to the BSP_DAC_Driver group.

   /** @addtogroup BSP_DAC_Driver 
     * @{
     */
       void bsp_dac2_Init(void);
   /** 
     * @}
     */

2.3 use formal code comments mode can enhance code can read a gender, use the following statement can be more comprehensive description.
@brief
te
@p>
@retval>>@retval
@brief
@brief
@note
@param
@retval
@retval

/**
  * @brief  Stop ADC data switch
  * @note   NONE
  * @param  NONE
  * @retval NONE
  */
void bsp_adc1_stop(void)
{
  ///
}

3, summarize
MDK’s Template function makes it easy to add a user’s code comment Template, improve the quality of the code, and facilitate subsequent maintenance and upgrade.

Read More: