docs: Add Doxygen comments to library files

Added Doxygen-style comments to all C source and header files in the
 and  directories. This improves
code documentation and enables VSCode tooltip help.

Additionally, short inline comments were added to all global variables
for better clarity.
This commit is contained in:
2025-07-08 15:48:13 +02:00
parent c9b0f38576
commit bc327acc41
10 changed files with 427 additions and 31 deletions

View File

@@ -4,23 +4,42 @@
#include <stdint.h>
/**
* @brief Initialize the ADC sensor system
* @file adc_sensor.h
* @brief API for the ADC sensor library.
*
* This library provides functions to initialize and read from the ADC sensors,
* specifically for measuring supply voltage and motor current.
* It can operate in a real or simulated mode.
*/
/**
* @brief Initializes the ADC sensor system.
*
* This function sets up the necessary ADC channels and configurations.
* It should be called once before any other function in this library.
* In simulated mode, it logs the simulated values.
*
* @return 0 on success, negative error code on failure
* @return 0 on success, or a negative error code on failure.
*/
int adc_sensor_init(void);
/**
* @brief Get supply voltage reading in millivolts
* @brief Gets the current supply voltage reading.
*
* This function reads the value from the corresponding ADC channel and converts
* it to millivolts.
*
* @return Voltage in millivolts (currently simulated: 12000mV)
* @return The supply voltage in millivolts (mV).
*/
uint16_t adc_sensor_get_voltage_mv(void);
/**
* @brief Get motor current reading in milliamps
* @brief Gets the current motor current reading.
*
* This function reads the value from the motor driver's sense pin via ADC
* and converts it to milliamps. This is used for end-stop detection.
*
* @return Current in milliamps (currently simulated: 45mA)
* @return The motor current in milliamps (mA).
*/
uint16_t adc_sensor_get_current_ma(void);