Skip to content

Commit a51bc3c

Browse files
committed
docs: homogenize doxygen across cores, libraries, system and variants
Review doxygen comments in headers and sources under cores/, libraries/, system/STM32* and variants/ (excluding cores/arduino/api, system/Drivers and system/Middlewares) and apply one style: - API contracts (@brief, @PARAM, @return, @note) live in headers. Functions declared in a header are documented there and their duplicate blocks are removed from the source file. - Static and source-only functions are documented directly above their definition in the .c/.cpp file. - Parameter names in header declarations now match their definitions in HardwareTimer.h, analog.h, Wire.h, VirtIO mbox_ipcc.h, Serial.h and stm32_def.h. This is a name-only change with no ABI impact. - @PARAM None is removed, since it documents no parameter. @RetVal None is removed from cores/ and libraries/ and kept only in ST-derived system/STM32* files. - Undocumented functions are documented, including HardwareTimer methods, Wire and twi helpers, SPI, EEPROM, Servo, USBDevice, Serial Uart, WSerial serialEvent hooks, pins_arduino, variant clock helpers, and assert_failed in the hal_conf_default headers. - Struct and class member docs are added in cdc_queue.h, EEPROM.h (EERef and EEPtr index) and pinmap.h (PinMap and NP). - usbd_cdc.h \defgroup entries get titles. The @file and \file names in syscalls.c and interrupt.cpp are corrected. The unnamed size parameter of operator delete in new.cpp is no longer documented with @PARAM. Doxygen (1.9.8) run over the same scope, excluding cores/arduino/api and the Drivers and Middlewares folders: "(function) ... is not documented" warnings drop from 210 to 7. Five of the remaining seven are __attribute__ misparses (aligned/used). The other two are not missing docs: HAL_FLASH_Lock is a call site in stm32_eeprom.c whose prototype lives in the excluded ST HAL headers, and stm32_interrupt_enable is documented in interrupt.h, but Doxygen cannot see that prototype under its __cplusplus guard. In USBDevice, the #ifdef blocks in usbd_cdc.h and usbd_hid_composite.h are reordered with equivalent declarations. Apart from the parameter-name fixes and that reordering, only comments changed. Signed-off-by: Frederic Pillon <frederic.pillon@st.com> Assisted-by: GitHub Copilot: Claude Haiku 5.5 Assisted-by: GitHub Copilot: Claude Sonnet 5.5 Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 3699abf commit a51bc3c

1,103 files changed

Lines changed: 6756 additions & 4160 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CI/update/templates/generic_clock.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
#include "pins_arduino.h"
1616

1717
/**
18-
* @brief System Clock Configuration
19-
* @param None
20-
* @retval None
18+
* @brief System Clock Configuration
2119
*/
2220
WEAK void SystemClock_Config(void)
2321
{

‎cores/arduino/Arduino.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,18 @@
1717
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1818
*/
1919

20+
/**
21+
* @file Arduino.h
22+
* @brief Main include file of the Arduino core for STM32.
23+
*
24+
* Includes the Arduino API, the wiring extensions and the pins of the selected variant.
25+
*/
26+
2027
#ifndef Arduino_h
2128
#define Arduino_h
2229

2330
#ifndef GCC_VERSION
31+
/** GCC version encoded as major * 10000 + minor * 100 + patch level. */
2432
#define GCC_VERSION (__GNUC__ * 10000 \
2533
+ __GNUC_MINOR__ * 100 \
2634
+ __GNUC_PATCHLEVEL__)

‎cores/arduino/Serial.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
Modified 3 December 2013 by Matthijs Kooijman
2323
*/
2424

25+
/**
26+
* @file Serial.cpp
27+
* @brief Hardware serial (Uart class) implementation and SerialN / SerialLPN instances.
28+
*/
29+
2530
#include <stdio.h>
2631
#include "Arduino.h"
2732
#include "Serial.h"

0 commit comments

Comments
 (0)