diff --git a/CI/update/README.md b/CI/update/README.md index d9950cc210..8876b1d00b 100644 --- a/CI/update/README.md +++ b/CI/update/README.md @@ -1,26 +1,73 @@ -# stm32variant - -By default, generates: - - *PeripheralPins.c* - - *PinNamesVar.h* - - *variant_generic.cpp* - - *variant_generic.h* - - *boards_entry.txt* - - *generic_clock.c* - -for all xml files description available in [STM32CubeMX](http://www.st.com/en/development-tools/stm32cubemx.html) database. -By default, the database used is the one from GitHub: - https://github.com/STMicroelectronics/STM32_open_pin_data -The internal database from STM32CubeMX directory can also be used. -The path have to be defined in `update_config.json`. - -After file generation, review them carefully and please report any issue +# Update scripts + +Run scripts from the `Arduino_Core_STM32` repository root unless noted +otherwise. Most scripts use settings in `CI/update/update_config.json`; they +create default settings when needed. + +## Generate generic variants + +`python CI/update/stm32variant.py` generates `PeripheralPins.c`, +`PinNamesVar.h`, `variant_generic.cpp`, `variant_generic.h`, `boards_entry.txt`, +and `generic_clock.c` from STM32CubeMX XML pin descriptions. By default, it +fetches the `STM32_open_pin_data` database from GitHub and processes all +available descriptions. Use `--list` to list descriptions or +`--series ` to generate a selected series. Use `--cube` to use the +STM32CubeMX database instead; set `CUBEMX_DIRECTORY` in +`CI/update/update_config.json` for that database. The configuration also uses +`STM32CUBECLT_PATH` for STM32 target information. + +`python CI/update/stm32variantv2.py` generates the same files from JSON pinout +descriptions in the newer STM32Cube device-pack repositories. Use `--list` to +list available pinout files or `--series ` to limit generation to one +supported series. The repositories are managed by `stm32cubev2.py`; their +location is configured with `REPOV2_LOCAL_PATH`. + +After generation, review the files carefully and report any issue [here](https://github.com/stm32duino/Arduino_Core_STM32/issues). +## Update STM32Cube content + +`python CI/update/stm32cube.py` manages the HAL drivers and CMSIS device files +from the STM32Cube repositories. By default, it updates all supported series. +Use `--check` to report version differences without updating, `--series +` to select a series, or `--path ` to use a local STM32Cube +repository instead of fetching from GitHub. By default, updates are prepared +in a working copy; use `--local` to update the current core repository. + +`python CI/update/stm32cubev2.py` performs the corresponding update for the +newer STM32Cube repository layout, including HAL, LL, and CMSIS files. It +supports the same `--check`, `--series`, `--path`, and `--local` options. + +## Generate support files + +`python CI/update/stm32wrapper.py` regenerates the HAL, LL, CMSIS, and related +wrapper files using content already present in the core. Optional +`--core ` and `--cmsis ` arguments select alternate core +and CMSIS directories. + +`python CI/update/stm32svd.py` updates the SVD files in the configured +STM32duino SVD repository. Set `STM32CUBECLT_PATH` to an STM32CubeCLT +installation and `STM32_SVD_PATH` to the SVD repository in +`CI/update/update_config.json`. The script replaces the repository's `svd` +directory with files selected from that CubeCLT installation. + +`python CI/update/fqbn.py` prints the STM32 board FQBNs available in an +installed Arduino core, including each board's `pnum` choices. Use `--board +` to filter the output with a regular expression and `--path +` to specify the directory containing `arduino-cli`. + +## Update ArduinoCore-API + +`python CI/update/stm32api.py` synchronizes the ArduinoCore-API submodule with +the latest upstream tag, applies eligible STM32duino pull requests and local +patches, and reshapes the tree for STM32 use. It requires the submodule to be +initialized, a clean submodule worktree, and the GitHub CLI (`gh`) to retrieve +pull-request data. + ## Update the STM32duino library list -Run `python CI/update/stm32libraries.py` from the `Arduino_Core_STM32` repository -to fetch public STM32duino repositories that contain a root-level +Run `python CI/update/stm32libraries.py` from the `Arduino_Core_STM32` +repository to fetch public STM32duino repositories that contain a root-level `library.properties` and refresh the generated section in `docs/libraries/index.md`. The script groups libraries by their declared category, puts expansion-board libraries in a separate section, includes @@ -28,9 +75,10 @@ declared dependencies (linking STM32duino dependencies when available), and sorts entries alphabetically. Review and commit the updated documentation manually; this script is not run by CI. -`REPO_STM32DUINO` in `update_config.json` selects the local directory where -library repositories are cloned or fetched. Absolute paths are used as -configured; relative paths are resolved from the `Arduino_Core_STM32` repository -root. If the file or setting is missing, the script writes the default -`REPO_STM32DUINO` path (the parent of the core repository root), asks you to check the -configuration, and exits; run it again after reviewing the generated setting. +`REPO_STM32DUINO` in `CI/update/update_config.json` selects the local directory +where library repositories are cloned or fetched. Absolute paths are used as +configured; relative paths are resolved from the `Arduino_Core_STM32` +repository root. If the file or setting is missing, the script writes the +default `REPO_STM32DUINO` path (the parent of the core repository root), asks +you to check the configuration, and exits; run it again after reviewing the +generated setting. diff --git a/CI/update/gen_wrapper.sh b/CI/update/gen_wrapper.sh deleted file mode 100644 index 0ec33fa7c3..0000000000 --- a/CI/update/gen_wrapper.sh +++ /dev/null @@ -1,210 +0,0 @@ -#!/bin/bash - -set -o nounset # Treat unset variables as an error - -# Base path -Core_path=../.. -SrcWrapper_path=$Core_path/libraries/SrcWrapper -HALDrivers_path=$Core_path/system/Drivers -CMSIS_Device_ST_path=$Core_path/system/Drivers/CMSIS/Device/ST -CMSIS_DSP_path=$Core_path/libraries/CMSIS_DSP -# CMSIS outside of the core. To be updated to match environment -CMSIS_path=$Core_path/../ArduinoModule-CMSIS/CMSIS_5 -CMSIS_DSPSrc_path=$CMSIS_path/CMSIS/DSP/Source - -# Out sources files -HALoutSrc_path=$SrcWrapper_path/src/HAL -LLoutSrc_path=$SrcWrapper_path/src/LL -CMSIS_DSP_outSrc_path=$CMSIS_DSP_path/src - -# Out include files -LLoutInc_path=$Core_path/cores/arduino/stm32/LL - -# Out startup files -CMSIS_Startupfile=$Core_path/cores/arduino/stm32/stm32_def_build.h - -# Variables -series=($(find $HALDrivers_path -maxdepth 1 -type d -name "STM32*" | sed -e "s#$HALDrivers_path/STM32##g" -e "s#xx_HAL_Driver##g" | sort)) - -all_LL_file=stm32yyxx_ll.h - -# Create the file -print_C_header() { - # if [[ $1 = *"template"* ]]; then - # echo "#if 0" > "$1" - # else - # touch "$1" - # fi - touch "$1" -} - -# Add some pragma to ll header files to avoid several warnings -# which will be corrected along Cube update -print_LL_header() { - upper=$(echo "$1" | awk '{print toupper($1)}' | sed -e "s/\./_/g") - echo "#ifndef _${upper}_ -#define _${upper}_ -/* LL raised several warnings, ignore them */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored \"-Wunused-parameter\" -#pragma GCC diagnostic ignored \"-Wstrict-aliasing\" -" > $LLoutInc_path/"$1" -} - -print_CMSIS_Startup_header() { - echo "#ifndef _STM32_DEF_BUILD_ -#define _STM32_DEF_BUILD_ - -#if !defined(CMSIS_STARTUP_FILE) && !defined(CUSTOM_STARTUP_FILE)" > $CMSIS_Startupfile -} - -print_CMSIS_Startup_footer() { - echo " #else - #error UNKNOWN CHIP - #endif -#else - #warning \"No CMSIS startup file defined, custom one should be used\" -#endif /* !CMSIS_STARTUP_FILE && !CUSTOM_STARTUP_FILE */ -#endif /* _STM32_DEF_BUILD_ */" >> $CMSIS_Startupfile -} - -print_CMSIS_Startup_list() { - # Handle first elements - # File name - local f - local upper - f=$(echo "${list[0]}" | awk -F/ '{print $NF}') - upper=$(echo "$f" | awk -F'[_.]' '{print toupper($2)}' | tr X x) - echo " #if defined($upper) - #define CMSIS_STARTUP_FILE \"$f\"" >> $CMSIS_Startupfile - - if [ ${#list[@]} -gt 1 ]; then - for fp in "${list[@]:1}"; do - # File name - f=$(echo "$fp" | awk -F/ '{print $NF}') - upper=$(echo "$f" | awk -F'[_.]' '{print toupper($2)}' | tr X x) - upper="${upper//MP15xx/MP1xx}" - echo " #elif defined($upper) - #define CMSIS_STARTUP_FILE \"$f\"" >> $CMSIS_Startupfile - done - fi -} - -# main -# Check if this is the right place -if [ ! -d $HALDrivers_path ]; then - echo "Could not find $HALDrivers_path!" - echo "Launch $0 from scripts folder!" - exit 1 -fi - -# Remove old file -rm -f $HALoutSrc_path/* $LLoutSrc_path/* $LLoutInc_path/* $CMSIS_Startupfile - -# Search all files for each series -for serie in "${series[@]}"; do - if [ -d $HALDrivers_path/STM32"${serie}"xx_HAL_Driver/Src ]; then - lower=$(echo "$serie" | awk '{print tolower($0)}') - echo -n "Generating for $serie..." - - # Generate stm32yyxx_[hal|ll]*.c file - filelist=($(find $HALDrivers_path/STM32"${serie}"xx_HAL_Driver/Src -maxdepth 1 -name "stm32${lower}xx_*.c")) - for fp in "${filelist[@]}"; do - # No need for template - if [[ $fp = *"template"* ]]; then - continue - fi - outp=$HALoutSrc_path - # File name - f=$(echo "$fp" | awk -F/ '{print $NF}') - # Compute generic file name - g="${f//$lower/yy}" - if [[ $f = *"_ll_"* ]]; then - outp=$LLoutSrc_path - fi - if [ ! -f $outp/"$g" ]; then - print_C_header $outp/"$g" - fi - # Amend file name under serie switch - { - echo "#ifdef STM32${serie}xx" - echo " #include \"$f\"" - echo "#endif" - } >> $outp/"$g" - done - - # Generate stm32yyxx_ll_*.h file - filelist=($(find $HALDrivers_path/STM32"${serie}"xx_HAL_Driver/Inc -maxdepth 2 -name "stm32${lower}xx_ll_*.h")) - for fp in "${filelist[@]}"; do - # File name - f=$(echo "$fp" | awk -F/ '{print $NF}') - # Compute generic file name - g="${f//$lower/yy}" - - if [ ! -f $LLoutInc_path/"$g" ]; then - print_LL_header "$g" - fi - # Amend full LL header file - echo "#include \"$g\"" >> $LLoutInc_path/${all_LL_file}.tmp - # Amend file name under serie switch - { - echo "#ifdef STM32${serie}xx" - echo " #include \"$f\"" - echo "#endif" - } >> $LLoutInc_path/"$g" - done - echo "done" - fi -done - -# Filter full LL header file -if [ ! -f $LLoutInc_path/$all_LL_file ]; then - print_LL_header $all_LL_file -fi -echo "/* Include Low Layers drivers */" >> $LLoutInc_path/${all_LL_file} -sort -u $LLoutInc_path/${all_LL_file}.tmp >> $LLoutInc_path/${all_LL_file} -rm -f $LLoutInc_path/${all_LL_file}.tmp - -# Search all template file to end "#if 0" -# filelist=($(find $HALoutSrc_path -maxdepth 1 -name "stm32*_template.c")) -# for fp in "${filelist[@]}"; do -# echo "#endif /* 0 */" >> "$fp" -# done - -# Search all LL header files to end guard -filelist=($(find $LLoutInc_path -maxdepth 1 -name "stm32yyxx_ll*.h")) -for fp in "${filelist[@]}"; do - upper=$(basename "$fp" | awk '{print toupper($1)}' | sed -e "s/\./_/g") - echo "#pragma GCC diagnostic pop" >> "$fp" - echo "#endif /* _${upper}_ */" >> "$fp" -done - -# CMSIS startup files -list=($(find $CMSIS_Device_ST_path -name "startup_*.s" | grep gcc | sort -du)) -if [ ${#list[@]} -ne 0 ]; then - echo "Number of startup files: ${#list[@]}" - print_CMSIS_Startup_header - print_CMSIS_Startup_list - print_CMSIS_Startup_footer -else - echo "No startup files found!" -fi - -# CMSIS DSP C source files -if [ ! -d $CMSIS_DSPSrc_path ]; then - echo "Could not find $CMSIS_DSPSrc_path!" - echo "Update 'CMSIS_path' in $0 to point on ArduinoModule-CMSIS folder." - echo "Skip CMSIS DSP generation." -else - # Remove old file - rm -fr "${CMSIS_DSP_outSrc_path:?}"/*/ - - filelist=($(find $CMSIS_DSPSrc_path -name "*.c" | sed -e "s#$CMSIS_DSPSrc_path/##g" | sort -u)) - for fp in "${filelist[@]}"; do - # Directory name - d=$(echo "$fp" | awk -F/ '{print $(NF-1)}') - if [ ! -d $CMSIS_DSP_outSrc_path/"$d" ]; then - mkdir $CMSIS_DSP_outSrc_path/"$d" - echo "#include \"../Source/$d/$d.c\"" > $CMSIS_DSP_outSrc_path/"$d"/"$d".c - fi - done -fi diff --git a/CI/update/templates/generic_clock.c b/CI/update/templates/generic_clock.c index 10f37de526..59951ea226 100644 --- a/CI/update/templates/generic_clock.c +++ b/CI/update/templates/generic_clock.c @@ -15,9 +15,7 @@ #include "pins_arduino.h" /** - * @brief System Clock Configuration - * @param None - * @retval None + * @brief System Clock Configuration */ WEAK void SystemClock_Config(void) { diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 3118c23ab2..80c7774303 100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -17,10 +17,18 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file Arduino.h + * @brief Main include file of the Arduino core for STM32. + * + * Includes the Arduino API, the wiring extensions and the pins of the selected variant. + */ + #ifndef Arduino_h #define Arduino_h #ifndef GCC_VERSION +/** GCC version encoded as major * 10000 + minor * 100 + patch level. */ #define GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) diff --git a/cores/arduino/Serial.cpp b/cores/arduino/Serial.cpp index 6699ce2e03..6ee2e1a42a 100644 --- a/cores/arduino/Serial.cpp +++ b/cores/arduino/Serial.cpp @@ -22,6 +22,11 @@ Modified 3 December 2013 by Matthijs Kooijman */ +/** + * @file Serial.cpp + * @brief Hardware serial (Uart class) implementation and SerialN / SerialLPN instances. + */ + #include #include "Arduino.h" #include "Serial.h" diff --git a/cores/arduino/Serial.h b/cores/arduino/Serial.h index f831ce3bcc..54b3537244 100644 --- a/cores/arduino/Serial.h +++ b/cores/arduino/Serial.h @@ -21,6 +21,11 @@ Modified 3 December 2013 by Matthijs Kooijman */ +/** + * @file Serial.h + * @brief Hardware serial (Uart class) and the SerialN / SerialLPN instances. + */ + #ifndef HardwareSerial_h #define HardwareSerial_h @@ -38,19 +43,43 @@ // NOTE: a "power of 2" buffer size is recommended to dramatically // optimize all the modulo operations for ring buffers. #if !defined(SERIAL_TX_BUFFER_SIZE) + /** + * Size in bytes of the transmit ring buffer. + * Can be defined before including this file. + */ #define SERIAL_TX_BUFFER_SIZE 64 #endif #if !defined(SERIAL_RX_BUFFER_SIZE) + /** + * Size in bytes of the receive ring buffer. + * Can be defined before including this file. + */ #define SERIAL_RX_BUFFER_SIZE 64 #endif #if (SERIAL_TX_BUFFER_SIZE>256) + /** + * Index type of the transmit buffer, 16 bits when the buffer is larger than + * 256 bytes. + */ typedef uint16_t tx_buffer_index_t; #else + /** + * Index type of the transmit buffer, 8 bits when the buffer is at most + * 256 bytes. + */ typedef uint8_t tx_buffer_index_t; #endif #if (SERIAL_RX_BUFFER_SIZE>256) + /** + * Index type of the receive buffer, 16 bits when the buffer is larger than + * 256 bytes. + */ typedef uint16_t rx_buffer_index_t; #else + /** + * Index type of the receive buffer, 8 bits when the buffer is at most + * 256 bytes. + */ typedef uint8_t rx_buffer_index_t; #endif @@ -58,11 +87,24 @@ // But it brings an build error due to ambiguous // call of overloaded Uart(int, int) // So defining a dedicated type +/** + * Half-duplex mode selection of the Uart(void *, HalfDuplexMode_t) constructor. + */ typedef enum { - HALF_DUPLEX_DISABLED, - HALF_DUPLEX_ENABLED + HALF_DUPLEX_DISABLED, /**< Full-duplex, RX and TX pins are used. */ + HALF_DUPLEX_ENABLED /**< Half-duplex, only the TX pin is used. */ } HalfDuplexMode_t; +/* + * Supported frame configs (data bits, parity, stop bits), passed to Uart::begin(): + * - 8 data bits: SERIAL_8N1, SERIAL_8N2, SERIAL_8E1, SERIAL_8E2, SERIAL_8O1, SERIAL_8O2 + * - 7 data bits with parity: SERIAL_7E1, SERIAL_7E2, SERIAL_7O1, SERIAL_7O2 + * - 7 data bits without parity (SERIAL_7N1, SERIAL_7N2) and 6 data bits with + * parity (SERIAL_6E1, SERIAL_6E2, SERIAL_6O1, SERIAL_6O2): only if the UART + * supports 7-bit word length, otherwise they are undefined below. + * Parity is N (none), E (even) or O (odd). + * Any other config calls Error_Handler(). + */ // below configs are not supported by STM32 #undef SERIAL_PARITY_MARK #undef SERIAL_PARITY_SPACE @@ -105,105 +147,361 @@ typedef enum { #undef SERIAL_6O2 #endif +/** + * @brief STM32 hardware UART. Implements the Arduino Stream and HardwareSerial API. + * + * Use one of the constructors to bind a UART to pins or to a peripheral, then call begin(). + */ class Uart : public arduino::HardwareSerial { protected: - // Has any byte been written to the UART since begin() + /** + * Has any byte been written to the UART since begin(). + * Used by flush() to skip the wait. + */ bool _written; + /** + * Hardware inversion of the RX line, set by setRxInvert(). + * Applied by begin(). + */ bool _rx_invert; + /** + * Hardware inversion of the TX line, set by setTxInvert(). + * Applied by begin(). + */ bool _tx_invert; + /** + * Hardware inversion of the data bits, set by setDataInvert(). + * Applied by begin(). + */ bool _data_invert; // Don't put any members after these buffers, since only the first // 32 bytes of this struct can be accessed quickly using the ldd // instruction. + /** + * Receive ring buffer, filled by _rx_complete_irq() and emptied by read(). + */ unsigned char _rx_buffer[SERIAL_RX_BUFFER_SIZE]; + /** + * Transmit ring buffer, filled by write() and emptied by _tx_complete_irq(). + */ unsigned char _tx_buffer[SERIAL_TX_BUFFER_SIZE]; + /** Low-level serial object: pins, ring buffer indexes and HAL handle. */ serial_t _serial; public: + /** + * @brief Create a UART from Arduino digital pin numbers. + * + * @param _rx Digital pin used for RX. + * @param _tx Digital pin used for TX. + * @param _rts Digital pin used for RTS flow control, NUM_DIGITAL_PINS if unused. + * @param _cts Digital pin used for CTS flow control, NUM_DIGITAL_PINS if unused. + */ Uart(pin_size_t _rx, pin_size_t _tx, pin_size_t _rts = NUM_DIGITAL_PINS, pin_size_t _cts = NUM_DIGITAL_PINS); + /** + * @brief Create a UART from STM32 pin names. + * + * @param _rx Pin used for RX. + * @param _tx Pin used for TX. + * @param _rts Pin used for RTS flow control, NC if unused. + * @param _cts Pin used for CTS flow control, NC if unused. + */ Uart(PinName _rx, PinName _tx, PinName _rts = NC, PinName _cts = NC); + /** + * @brief Create a UART from an STM32 USART/UART peripheral. + * Pins are taken from the variant. + * + * @param peripheral USART/UART peripheral instance, e.g. USART1. + * @param halfDuplex HALF_DUPLEX_ENABLED to use the TX pin only. + */ Uart(void *peripheral, HalfDuplexMode_t halfDuplex = HALF_DUPLEX_DISABLED); + /** + * @brief Create a half-duplex UART on a single digital pin. + * The pin is used as TX and RX is NC. + * + * @param _rxtx Digital pin used for TX. + */ Uart(pin_size_t _rxtx); + /** + * @brief Create a half-duplex UART on a single STM32 pin. + * The pin is used as TX and RX is NC. + * + * @param _rxtx Pin used for TX. + */ Uart(PinName _rxtx); + /** + * @brief Start the UART with 8 data bits, no parity and 1 stop bit (SERIAL_8N1). + * + * @param baud Baud rate in bits per second. + */ void begin(unsigned long baud) override { begin(baud, SERIAL_8N1); } + /** + * @brief Start the UART with the given baud rate and frame format. + * + * @param baud Baud rate in bits per second. + * @param config Frame format, e.g. SERIAL_8N1 or SERIAL_8E1. + */ void begin(unsigned long baud, uint16_t config) override ; // Implement all pure virtuals + /** + * @brief Wait for pending transmission, stop the UART, release its pins and + * clear the receive buffer. + */ void end() override; + /** + * @brief Get the number of bytes available to read. + * + * @return Number of bytes in the receive buffer. + */ int available(void) override; + /** + * @brief Read the next byte without removing it from the receive buffer. + * + * @return Next byte, or -1 if none is available. + */ int peek(void) override; + /** + * @brief Read and remove the next byte from the receive buffer. + * + * @return Next byte, or -1 if none is available. + */ int read(void) override; + /** + * @brief Wait until all queued bytes are transmitted. + */ void flush() override; - size_t write(uint8_t) override; + /** + * @brief Write one byte. + * + * @param c Byte to write. + * @return Number of bytes written: 1, or 0 if the UART is not started. + */ + size_t write(uint8_t c) override; + /** + * @brief Check whether the UART is started. + * + * @return true if begin() was called and the UART is ready. + */ operator bool() override { return _ready; } // STM32 extension + /** + * @brief Get the number of bytes that can be written without blocking. + * + * @return Free space in the transmit buffer, in bytes. + */ int availableForWrite(void); + /** + * @brief Wait until all queued bytes are transmitted, or until a timeout elapses. + * + * @param timeout Maximum wait in milliseconds. 0 waits without limit. + * On timeout, the pending transmit data is discarded. + */ void flush(uint32_t timeout); + /** + * @brief Write one byte, truncating the value to 8 bits. + * + * @param n Value to write. + * @return Number of bytes written. + */ inline size_t write(unsigned long n) { return write((uint8_t)n); } + /** + * @brief Write one byte, truncating the value to 8 bits. + * + * @param n Value to write. + * @return Number of bytes written. + */ inline size_t write(long n) { return write((uint8_t)n); } + /** + * @brief Write one byte, truncating the value to 8 bits. + * + * @param n Value to write. + * @return Number of bytes written. + */ inline size_t write(unsigned int n) { return write((uint8_t)n); } + /** + * @brief Write one byte, truncating the value to 8 bits. + * + * @param n Value to write. + * @return Number of bytes written. + */ inline size_t write(int n) { return write((uint8_t)n); } + /** + * @brief Write a buffer of bytes. + * + * @param buffer Data to write. + * @param size Number of bytes in buffer. + * @return Number of bytes written, 0 if the UART is not started. + */ size_t write(const uint8_t *buffer, size_t size); using Print::write; // pull in write(str) from Print + /** + * @brief Set the RX pin by Arduino pin number. Call before begin(). + * + * @param _rx Digital pin used for RX. + */ void setRx(pin_size_t _rx); + /** + * @brief Set the TX pin by Arduino pin number. Call before begin(). + * + * @param _tx Digital pin used for TX. + */ void setTx(pin_size_t _tx); + /** + * @brief Set the RX pin by STM32 pin name. Call before begin(). + * + * @param _rx Pin used for RX. + */ void setRx(PinName _rx); + /** + * @brief Set the TX pin by STM32 pin name. Call before begin(). + * + * @param _tx Pin used for TX. + */ void setTx(PinName _tx); // Enable HW flow control on RTS, CTS or both + /** + * @brief Enable hardware RTS flow control on a digital pin. + * Call before begin(). + * + * @param _rts Digital pin used for RTS. + */ void setRts(pin_size_t _rts); + /** + * @brief Enable hardware CTS flow control on a digital pin. + * Call before begin(). + * + * @param _cts Digital pin used for CTS. + */ void setCts(pin_size_t _cts); + /** + * @brief Enable hardware RTS and CTS flow control on digital pins. + * Call before begin(). + * + * @param _rts Digital pin used for RTS. + * @param _cts Digital pin used for CTS. + */ void setRtsCts(pin_size_t _rts, pin_size_t _cts); + /** + * @brief Enable hardware RTS flow control on an STM32 pin. + * Call before begin(). + * + * @param _rts Pin used for RTS. + */ void setRts(PinName _rts); + /** + * @brief Enable hardware CTS flow control on an STM32 pin. + * Call before begin(). + * + * @param _cts Pin used for CTS. + */ void setCts(PinName _cts); + /** + * @brief Enable hardware RTS and CTS flow control on STM32 pins. + * Call before begin(). + * + * @param _rts Pin used for RTS. + * @param _cts Pin used for CTS. + */ void setRtsCts(PinName _rts, PinName _cts); // Enable half-duplex mode by setting the Rx pin to NC // This needs to be done before the call to begin() + /** + * @brief Enable half-duplex mode by setting the RX pin to NC. + * Call before begin(). + */ void setHalfDuplex(void); + /** + * @brief Check whether the UART is in half-duplex mode. + * + * @return true if the RX pin is NC. + */ bool isHalfDuplex(void) const; + /** + * @brief Enable reception in half-duplex mode after the pending transmission ends. + */ void enableHalfDuplexRx(void); // Enable HW Rx/Tx/data inversion // This needs to be done before the call to begin() + /** + * @brief Invert the RX line in hardware. Call before begin(). + */ void setRxInvert(void); + /** + * @brief Invert the TX line in hardware. Call before begin(). + */ void setTxInvert(void); + /** + * @brief Invert the data bits in hardware. Call before begin(). + */ void setDataInvert(void); friend class STM32LowPower; // Interrupt handlers + /** + * @brief RX interrupt handler. Stores the received byte in the receive buffer. + * + * @note Called from the UART interrupt context: it must stay short and + * never block. + * If the receive buffer is full, the received byte is dropped. + * + * @param obj UART object that received the byte. + */ static void _rx_complete_irq(serial_t *obj); + /** + * @brief TX interrupt handler. Starts the next chunk of queued data, if any. + * + * @note Called from the UART interrupt context when a transfer completes: + * it must stay short and never block. A chunk never wraps around the end of + * the transmit buffer, so a wrapped buffer is sent in two transfers. + * + * @param obj UART object whose transfer completed. + * @return -1 if a new transfer was started, 0 if the transmit buffer is empty. + */ static int _tx_complete_irq(serial_t *obj); #if defined(HAL_UART_MODULE_ENABLED) && !defined(HAL_UART_MODULE_ONLY) // Could be used to mix Arduino API and STM32Cube HAL API (ex: DMA). Use at your own risk. #if defined(USE_HALV2_DRIVER) + /** + * @brief Get the underlying HAL UART handle. + * + * @return Pointer to the HAL UART handle. + */ hal_uart_handle_t *getHandle(void) #else + /** + * @brief Get the underlying HAL UART handle. + * + * @return Pointer to the HAL UART handle. + */ UART_HandleTypeDef *getHandle(void) #endif { @@ -212,53 +510,109 @@ class Uart : public arduino::HardwareSerial { #endif // HAL_UART_MODULE_ENABLED && !HAL_UART_MODULE_ONLY private: + /** true once begin() has successfully initialized the UART. */ bool _ready; + /** + * true once the receiver is enabled in half-duplex mode, see enableHalfDuplexRx(). + */ bool _rx_enabled; + /** Frame format (SERIAL_xxx) given to begin(), kept to restart the UART. */ uint16_t _config; + /** Baud rate given to begin(), kept to restart the UART. */ unsigned long _baud; + /** + * @brief Initialize the UART object with STM32 pin names. + * + * @param _rx Pin used for RX. + * @param _tx Pin used for TX. + * @param _rts Pin used for RTS, NC if unused. + * @param _cts Pin used for CTS, NC if unused. + */ void init(PinName _rx, PinName _tx, PinName _rts = NC, PinName _cts = NC); + /** + * @brief Reconfigure the UART for low-power operation. + */ void configForLowPower(void); }; #if defined(USART1) + /** + * @brief Hardware serial port 1 (USART1). + */ extern Uart Serial1; #endif #if defined(USART2) + /** + * @brief Hardware serial port 2 (USART2). + */ extern Uart Serial2; #endif #if defined(USART3) + /** + * @brief Hardware serial port 3 (USART3). + */ extern Uart Serial3; #endif #if defined(UART4) || defined(USART4) + /** + * @brief Hardware serial port 4 (UART4 or USART4). + */ extern Uart Serial4; #endif #if defined(UART5) || defined(USART5) + /** + * @brief Hardware serial port 5 (UART5 or USART5). + */ extern Uart Serial5; #endif #if defined(USART6) + /** + * @brief Hardware serial port 6 (USART6). + */ extern Uart Serial6; #endif #if defined(UART7) || defined(USART7) + /** + * @brief Hardware serial port 7 (UART7 or USART7). + */ extern Uart Serial7; #endif #if defined(UART8) || defined(USART8) + /** + * @brief Hardware serial port 8 (UART8 or USART8). + */ extern Uart Serial8; #endif #if defined(UART9) + /** + * @brief Hardware serial port 9 (UART9). + */ extern Uart Serial9; #endif #if defined(UART10) || defined(USART10) + /** + * @brief Hardware serial port 10 (UART10 or USART10). + */ extern Uart Serial10; #endif #if defined(LPUART1) + /** + * @brief Low-power serial port 1 (LPUART1). + */ extern Uart SerialLP1; #endif #if defined(LPUART2) + /** + * @brief Low-power serial port 2 (LPUART2). + */ extern Uart SerialLP2; #endif #if defined(LPUART3) + /** + * @brief Low-power serial port 3 (LPUART3). + */ extern Uart SerialLP3; #endif #endif diff --git a/cores/arduino/Server.h b/cores/arduino/Server.h deleted file mode 100644 index db37c0e8a1..0000000000 --- a/cores/arduino/Server.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Server.h - Base class that provides Server - Copyright (c) 2011 Adrian McEwen. All right reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#ifndef server_h -#define server_h - -#include "Print.h" - -class Server : public Print { - public: - virtual void begin() = 0; -}; - -#endif diff --git a/cores/arduino/Tone.cpp b/cores/arduino/Tone.cpp index f46fc0e9f1..dbc704cef0 100644 --- a/cores/arduino/Tone.cpp +++ b/cores/arduino/Tone.cpp @@ -19,6 +19,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file Tone.cpp + * @brief Tone generation: tone() and noTone(), based on a hardware timer. + */ + #include "Arduino.h" #include "HardwareTimer.h" @@ -38,10 +43,8 @@ static timerPinInfo_t TimerTone_pinInfo = {NC, 0}; static HardwareTimer *TimerTone = NULL; /** - * @brief Tone Period elapsed callback in non-blocking mode - * @param htim : timer handle - * @retval None - */ + * @brief Tone Period elapsed callback in non-blocking mode. + */ static void tonePeriodElapsedCallback() { GPIO_TypeDef *port = get_GPIO_Port(STM_PORT(TimerTone_pinInfo.pin)); @@ -59,11 +62,8 @@ static void tonePeriodElapsedCallback() } /** - * @brief This function will reset the tone timer - * @param port : pointer to port - * @param pin : pin number to toggle - * @retval None - */ + * @brief Reset the tone timer and release the tone pin. + */ static void timerTonePinDeinit() { if (TimerTone != NULL) { @@ -75,6 +75,15 @@ static void timerTonePinDeinit() } } +/** + * @brief Configure the tone timer and output pin for a given frequency and duration. + * + * @param p Pin to output the tone on. + * @param frequency Tone frequency in Hertz. 0 pauses the timer, values above + * MAX_FREQ are ignored. + * @param duration Tone duration in milliseconds. 0 means the tone plays until + * noTone() is called. + */ static void timerTonePinInit(PinName p, uint32_t frequency, uint32_t duration) { uint32_t timFreq = 2 * frequency; @@ -103,7 +112,20 @@ static void timerTonePinInit(PinName p, uint32_t frequency, uint32_t duration) } } -// frequency (in hertz) and duration (in milliseconds). +/** + * @brief Generate a square wave of the given frequency on a pin. + * + * @note The tone is generated by the hardware timer TIMER_TONE, only one pin + * at a time can output a tone. A call on another pin is ignored until noTone() + * is called on the first one. + * Without a TIMER_TONE timer, this function does nothing. + * + * @param _pin Pin to output the tone on. + * @param frequency Frequency of the tone in Hertz. 0 pauses the tone, values + * above 65535 are ignored. + * @param duration Duration of the tone in milliseconds. 0 plays the tone until + * noTone() is called. + */ void tone(uint8_t _pin, unsigned int frequency, unsigned long duration) { PinName p = digitalPinToPinName(_pin); @@ -120,6 +142,13 @@ void tone(uint8_t _pin, unsigned int frequency, unsigned long duration) } +/** + * @brief Stop tone generation on a pin, keeping the tone timer allocated. + * + * Use noTone(uint8_t, bool) with destruct set to true to also release the timer. + * + * @param _pin Pin on which to stop tone generation. + */ void noTone(uint8_t _pin) { noTone(_pin, false); diff --git a/cores/arduino/WInterrupts.cpp b/cores/arduino/WInterrupts.cpp index f25ad4599a..038e745d97 100644 --- a/cores/arduino/WInterrupts.cpp +++ b/cores/arduino/WInterrupts.cpp @@ -16,6 +16,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file WInterrupts.cpp + * @brief External interrupt functions: attachInterrupt() and detachInterrupt(). + */ #include "Arduino.h" @@ -70,6 +74,13 @@ void attachInterrupt(pin_size_t interruptNumber, callback_function_t callback, P stm32_interrupt_enable(p, callback, it_mode); } #endif +/** + * @brief Attach a function to an external interrupt on a pin, using a plain function pointer. + * + * @param interruptNumber Pin to attach the interrupt to. + * @param callback Function called when the interrupt fires. + * @param mode Trigger mode: CHANGE, RISING, FALLING, LOW or HIGH. + */ void attachInterrupt(pin_size_t interruptNumber, voidFuncPtr callback, PinStatus mode) { #if !defined(HAL_EXTI_MODULE_DISABLED) @@ -82,6 +93,11 @@ void attachInterrupt(pin_size_t interruptNumber, voidFuncPtr callback, PinStatus #endif } +/** + * @brief Disable the external interrupt attached to a pin. + * + * @param interruptNumber Pin whose interrupt is disabled. + */ void detachInterrupt(pin_size_t interruptNumber) { #if !defined(HAL_EXTI_MODULE_DISABLED) diff --git a/cores/arduino/WMath.cpp b/cores/arduino/WMath.cpp index 4505c2bd54..879b34971f 100644 --- a/cores/arduino/WMath.cpp +++ b/cores/arduino/WMath.cpp @@ -16,11 +16,23 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file WMath.cpp + * @brief Pseudo-random number functions: randomSeed() and random(). + */ + extern "C" { #include "stdlib.h" #include "stdint.h" } +/** + * @brief Seed the pseudo-random number generator. + * + * A seed of 0 is ignored. + * + * @param dwSeed Seed value. + */ void randomSeed(unsigned long dwSeed) { if (dwSeed != 0) { @@ -28,6 +40,12 @@ void randomSeed(unsigned long dwSeed) } } +/** + * @brief Return a pseudo-random number in the range [0, howbig). + * + * @param howbig Upper bound, exclusive. 0 returns 0. + * @return Pseudo-random number. + */ long random(long howbig) { if (howbig == 0) { @@ -37,6 +55,13 @@ long random(long howbig) return rand() % howbig; } +/** + * @brief Return a pseudo-random number in the range [howsmall, howbig). + * + * @param howsmall Lower bound, inclusive. Returned directly if it is not below howbig. + * @param howbig Upper bound, exclusive. + * @return Pseudo-random number. + */ long random(long howsmall, long howbig) { if (howsmall >= howbig) { diff --git a/cores/arduino/WSerial.cpp b/cores/arduino/WSerial.cpp index 6bb665b0d5..abd3c315ea 100644 --- a/cores/arduino/WSerial.cpp +++ b/cores/arduino/WSerial.cpp @@ -1,5 +1,16 @@ +/** + * @file WSerial.cpp + * @brief serialEventRun(): dispatch of the serialEvent callbacks. + */ #include "WSerial.h" +/** + * @brief Call the serialEvent callback of each enabled serial port (hardware, + * USB, VirtIO) that has data available. + * + * A callback is only called if the sketch defines it. Called from main() after + * each loop() iteration. Weak, so a sketch can override it. + */ WEAK void serialEventRun(void) { #if defined(HAVE_HWSERIAL1) diff --git a/cores/arduino/WSerial.h b/cores/arduino/WSerial.h index 55448c1657..baa149a2a8 100644 --- a/cores/arduino/WSerial.h +++ b/cores/arduino/WSerial.h @@ -1,6 +1,15 @@ #ifndef WIRING_SERIAL_H #define WIRING_SERIAL_H +/** + * @file WSerial.h + * @brief Selection of the generic 'Serial' object and of the matching serialEvent() callback. + * + * The generic Serial is USB CDC, VirtIO or the hardware serial defined by + * SERIAL_UART_INSTANCE. + * ENABLE_xxx macros select the serial ports to enable, HAVE_xxx the ones + * present on the MCU. + */ #include "variant.h" #include "Serial.h" #if defined (USBCON) && defined(USBD_USE_CDC) @@ -23,6 +32,10 @@ #define HAVE_SERIALUSB #endif + /** + * @brief Weak USB CDC serial callback, called by serialEventRun(). Override + * to handle USB data. + */ extern void serialEventUSB(void) __attribute__((weak)); #endif /* USBCON && USBD_USE_CDC */ @@ -39,6 +52,10 @@ #define HAVE_SERIALVIRTIO #endif + /** + * @brief Weak VirtIO serial callback, called by serialEventRun(). Override + * to handle VirtIO data. + */ extern void serialEventVirtIO(void) __attribute__((weak)); #endif /* VIRTIOCON */ @@ -196,42 +213,94 @@ #endif #if defined(HAVE_HWSERIAL1) + /** + * @brief Weak callback for Serial1, called by serialEventRun(). Override to + * handle incoming data. + */ extern void serialEvent1(void) __attribute__((weak)); #endif #if defined(HAVE_HWSERIAL2) + /** + * @brief Weak callback for Serial2, called by serialEventRun(). Override to + * handle incoming data. + */ extern void serialEvent2(void) __attribute__((weak)); #endif #if defined(HAVE_HWSERIAL3) + /** + * @brief Weak callback for Serial3, called by serialEventRun(). Override to + * handle incoming data. + */ extern void serialEvent3(void) __attribute__((weak)); #endif #if defined(HAVE_HWSERIAL4) + /** + * @brief Weak callback for Serial4, called by serialEventRun(). Override to + * handle incoming data. + */ extern void serialEvent4(void) __attribute__((weak)); #endif #if defined(HAVE_HWSERIAL5) + /** + * @brief Weak callback for Serial5, called by serialEventRun(). Override to + * handle incoming data. + */ extern void serialEvent5(void) __attribute__((weak)); #endif #if defined(HAVE_HWSERIAL6) + /** + * @brief Weak callback for Serial6, called by serialEventRun(). Override to + * handle incoming data. + */ extern void serialEvent6(void) __attribute__((weak)); #endif #if defined(HAVE_HWSERIAL7) + /** + * @brief Weak callback for Serial7, called by serialEventRun(). Override to + * handle incoming data. + */ extern void serialEvent7(void) __attribute__((weak)); #endif #if defined(HAVE_HWSERIAL8) + /** + * @brief Weak callback for Serial8, called by serialEventRun(). Override to + * handle incoming data. + */ extern void serialEvent8(void) __attribute__((weak)); #endif #if defined(HAVE_HWSERIAL9) + /** + * @brief Weak callback for Serial9, called by serialEventRun(). Override to + * handle incoming data. + */ extern void serialEvent9(void) __attribute__((weak)); #endif #if defined(HAVE_HWSERIAL10) + /** + * @brief Weak callback for Serial10, called by serialEventRun(). Override to + * handle incoming data. + */ extern void serialEvent10(void) __attribute__((weak)); #endif #if defined(HAVE_HWSERIALLP1) + /** + * @brief Weak callback for SerialLP1, called by serialEventRun(). Override + * to handle incoming data. + */ extern void serialEventLP1(void) __attribute__((weak)); #endif #if defined(HAVE_HWSERIALLP2) + /** + * @brief Weak callback for SerialLP2, called by serialEventRun(). Override + * to handle incoming data. + */ extern void serialEventLP2(void) __attribute__((weak)); #endif #if defined(HAVE_HWSERIALLP3) + /** + * @brief Weak callback for SerialLP3, called by serialEventRun(). Override + * to handle incoming data. + */ extern void serialEventLP3(void) __attribute__((weak)); #endif #endif /* HAL_UART_MODULE_ENABLED && !HAL_UART_MODULE_ONLY */ diff --git a/cores/arduino/abi.cpp b/cores/arduino/abi.cpp index 9583f3c409..2bbf128556 100644 --- a/cores/arduino/abi.cpp +++ b/cores/arduino/abi.cpp @@ -16,11 +16,21 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file abi.cpp + * @brief C++ ABI support: handlers for pure and deleted virtual function calls. + */ + #include extern "C" void __cxa_pure_virtual(void) __attribute__((__noreturn__)); extern "C" void __cxa_deleted_virtual(void) __attribute__((__noreturn__)); +/** + * @brief Called on a pure virtual function call. Halts the program. + * + * Does not return. + */ void __cxa_pure_virtual(void) { // We might want to write some diagnostics to uart in this case @@ -29,6 +39,11 @@ void __cxa_pure_virtual(void) ; } +/** + * @brief Called when a deleted virtual function is invoked. Halts the program. + * + * Does not return. + */ void __cxa_deleted_virtual(void) { // We might want to write some diagnostics to uart in this case diff --git a/cores/arduino/avr/dtostrf.c b/cores/arduino/avr/dtostrf.c index 6bd602d668..7db13e2fc5 100644 --- a/cores/arduino/avr/dtostrf.c +++ b/cores/arduino/avr/dtostrf.c @@ -18,11 +18,28 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file dtostrf.c + * @brief Emulation of the avr-libc dtostrf() function. + */ + #include #include #include #include +/** + * @brief Convert a double to a string with a fixed number of decimal places. + * + * Emulation of the avr-libc dtostrf() function. + * + * @param val Value to convert. + * @param width Minimum field width of the output string. Negative for left + * adjustment. Range -128 to 127. + * @param prec Number of digits after the decimal point. + * @param sout Buffer to write the result to. Must be large enough for the result. + * @return Pointer to sout. + */ char *dtostrf(double val, signed char width, unsigned char prec, char *sout) { //Commented code is the original version diff --git a/cores/arduino/board.c b/cores/arduino/board.c index 0ca19be820..dcdfd63963 100644 --- a/cores/arduino/board.c +++ b/cores/arduino/board.c @@ -1,11 +1,23 @@ +/** + * @file board.c + * @brief Board-level initialization: init(). + */ #include "board.h" #ifdef __cplusplus extern "C" { #endif +/** + * @brief C library initialization. Calls the constructors of static objects. + */ void __libc_init_array(void); +/** + * @brief Board-level initialization, called once before setup(). + * + * Weak, so a variant or sketch can override it. Calls hw_config_init(). + */ WEAK void init(void) { hw_config_init(); diff --git a/cores/arduino/board.h b/cores/arduino/board.h index dcd586bbdd..98e3bd2f34 100644 --- a/cores/arduino/board.h +++ b/cores/arduino/board.h @@ -1,3 +1,8 @@ +/** + * @file board.h + * @brief Aggregates the headers of the core and peripherals drivers (clock, + * analog, timer, uart, ...). + */ #ifndef _BOARD_H_ #define _BOARD_H_ diff --git a/cores/arduino/core_debug.c b/cores/arduino/core_debug.c index 8899b4c4d9..cdb93c319b 100644 --- a/cores/arduino/core_debug.c +++ b/cores/arduino/core_debug.c @@ -1,3 +1,8 @@ +/** + * @file core_debug.c + * @brief Out-of-line definitions of the inline core_debug functions, needed + * for C code. + */ #include "core_debug.h" // Ensure inline functions have a definition emitted for when they are diff --git a/cores/arduino/core_debug.h b/cores/arduino/core_debug.h index f5a74e62f3..c2934aec39 100644 --- a/cores/arduino/core_debug.h +++ b/cores/arduino/core_debug.h @@ -1,3 +1,7 @@ +/** + * @file core_debug.h + * @brief Debug message output helpers: core_debug() and vcore_debug(). + */ #ifndef _CORE_DEBUG_H #define _CORE_DEBUG_H @@ -10,12 +14,14 @@ extern "C" { #endif -/** Output a debug message +/** + * @brief Output a debug message on stderr. Does nothing when NDEBUG is defined. * - * @param format printf-style format string, followed by variables - * Note: By using the printf function of the library C this inflates the size of - * the code, use a lot of stack. An alternative, will be to implement a tiny + * @note Using the printf function of the C library inflates the size of the + * code and uses a lot of stack. An alternative would be to implement a tiny * and limited functionality implementation of printf. + * + * @param format printf-style format string, followed by the variables to print. */ inline void core_debug(const char *format, ...) { @@ -29,6 +35,13 @@ inline void core_debug(const char *format, ...) #endif /* NDEBUG */ } +/** + * @brief Output a debug message on stderr from a va_list. Does nothing when + * NDEBUG is defined. + * + * @param format printf-style format string. + * @param args Variable argument list matching format. + */ inline void vcore_debug(const char *format, va_list args) { #if !defined(NDEBUG) diff --git a/cores/arduino/hooks.c b/cores/arduino/hooks.c index a85150bca5..5e6eb03d6d 100644 --- a/cores/arduino/hooks.c +++ b/cores/arduino/hooks.c @@ -16,15 +16,20 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file hooks.c + * @brief Weak hooks overridable by libraries or sketches: yield() and dtr_togglingHook(). + */ + #include /** - * Empty yield() hook. + * @brief Empty yield() hook. * * This function is intended to be used by library writers to build - * libraries or sketches that supports cooperative threads. + * libraries or sketches that support cooperative threads. * - * Its defined as a weak symbol and it can be redefined to implement a + * It is defined as a weak symbol and it can be redefined to implement a * real cooperative scheduler. */ static void __empty() @@ -35,13 +40,16 @@ void yield(void) __attribute__((weak, alias("__empty"))); #ifdef DTR_TOGGLING_SEQ /** - * Empty dtr_toggling() hook. + * @brief Empty dtr_toggling() hook. * * This function is intended to be used by library writers to build * libraries or sketches that require DTR toggling feature. * - * Its defined as a weak symbol and it can be redefined to implement - * task to achieve in this case. + * It is defined as a weak symbol (dtr_togglingHook()) and it can be redefined + * to implement the task to achieve in this case. + * + * @param buf Buffer of the received data. + * @param len Pointer to the length of the received data. */ static void __empty_dtr_toggling(uint8_t *buf, uint32_t *len) { diff --git a/cores/arduino/itoa.c b/cores/arduino/itoa.c index e737b6f14d..fd34e75110 100644 --- a/cores/arduino/itoa.c +++ b/cores/arduino/itoa.c @@ -16,12 +16,25 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file itoa.c + * @brief Integer to ASCII conversion: itoa(), utoa(), ltoa() and ultoa(). + */ + #include #ifdef __cplusplus extern "C" { #endif +/** + * @brief Convert a long to a null-terminated string. + * + * @param value Value to convert. Negative values are only signed for radix 10. + * @param string Buffer to write the result to. Must be large enough for the result. + * @param radix Base to use, from 2 to 36. + * @return Pointer to string, or NULL if string is NULL or radix is out of range. + */ char *ltoa(long value, char *string, int radix) { char tmp[33]; @@ -69,6 +82,14 @@ char *ltoa(long value, char *string, int radix) return string; } +/** + * @brief Convert an unsigned long to a null-terminated string. + * + * @param value Value to convert. + * @param string Buffer to write the result to. Must be large enough for the result. + * @param radix Base to use, from 2 to 36. + * @return Pointer to string, or NULL if string is NULL or radix is out of range. + */ char *ultoa(unsigned long value, char *string, int radix) { char tmp[33]; @@ -106,11 +127,27 @@ char *ultoa(unsigned long value, char *string, int radix) return string; } +/** + * @brief Convert an int to a null-terminated string. + * + * @param value Value to convert. Negative values are only signed for radix 10. + * @param string Buffer to write the result to. Must be large enough for the result. + * @param radix Base to use, from 2 to 36. + * @return Pointer to string, or NULL if string is NULL or radix is out of range. + */ char *itoa(int value, char *string, int radix) { return ltoa(value, string, radix) ; } +/** + * @brief Convert an unsigned int to a null-terminated string. + * + * @param value Value to convert. + * @param string Buffer to write the result to. Must be large enough for the result. + * @param radix Base to use, from 2 to 36. + * @return Pointer to string, or NULL if string is NULL or radix is out of range. + */ char *utoa(unsigned value, char *string, int radix) { return ultoa(value, string, radix) ; diff --git a/cores/arduino/main.cpp b/cores/arduino/main.cpp index 67dbcfc44a..643dbd95ac 100644 --- a/cores/arduino/main.cpp +++ b/cores/arduino/main.cpp @@ -17,11 +17,23 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file main.cpp + * @brief Entry point of Arduino sketches: early initialization and main loop. + */ + #define ARDUINO_MAIN #include "Arduino.h" -// Force init to be called *first*, i.e. before static object allocation. -// Otherwise, statically allocated objects that need HAL may fail. +/** + * @brief Early initialization, run before static object allocation. + * + * Sets the NVIC priority grouping, enables the caches if present, then calls init(). + * + * @note Forced to be called *first* (constructor priority 101), i.e. before + * static object allocation. Otherwise, statically allocated objects that need + * the HAL may fail. + */ __attribute__((constructor(101))) void premain() { @@ -42,8 +54,13 @@ __attribute__((constructor(101))) void premain() init(); } -/* - * \brief Main entry point of Arduino application +/** + * @brief Main entry point of the Arduino application. + * + * Calls initVariant() and setup() once, then runs loop() and serialEventRun() + * forever. When CORE_CALLBACK is defined, CoreCallback() is called before each loop(). + * + * @return 0. Never reached in practice, the main loop never ends. */ int main(void) { diff --git a/cores/arduino/pins_arduino.c b/cores/arduino/pins_arduino.c index 6f1b316956..20a82ce871 100644 --- a/cores/arduino/pins_arduino.c +++ b/cores/arduino/pins_arduino.c @@ -16,6 +16,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file pins_arduino.c + * @brief Conversions between pin numbers, analog inputs and PinName. + */ + #include "pins_arduino.h" #ifdef __cplusplus @@ -68,11 +73,6 @@ PinName analogInputToPinName(pin_size_t pin) return pn; } -/** - * @brief Return true if a digital pin is an analog input - * @param pin Dx, x or PYn - * @retval boolean true if analog or false - */ bool digitalpinIsAnalogInput(pin_size_t pin) { bool ret = false; @@ -91,11 +91,6 @@ bool digitalpinIsAnalogInput(pin_size_t pin) return ret; } -/** - * @brief Return the analog input linked to a digital pin - * @param pin Dx, x or PYn - * @retval analogInput valid analog input or NUM_ANALOG_INPUTS - */ pin_size_t digitalPinToAnalogInput(pin_size_t pin) { pin_size_t ret = NUM_ANALOG_INPUTS; diff --git a/cores/arduino/pins_arduino.h b/cores/arduino/pins_arduino.h index 7b109e9ec8..c678675c44 100644 --- a/cores/arduino/pins_arduino.h +++ b/cores/arduino/pins_arduino.h @@ -15,6 +15,10 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file pins_arduino.h + * @brief Pin number conversion helpers, port register macros and default pin definitions. + */ #ifndef _PINS_ARDUINO_H_ #define _PINS_ARDUINO_H_ #include @@ -26,13 +30,10 @@ #include "pins_arduino_analog.h" #include "pins_arduino_digital.h" -/* - * Pin number mask - * allows to retrieve the pin number without ALTx - */ +/** Pin number mask, allows to retrieve the pin number without ALTx. */ #define PNUM_MASK 0xFF -/* Pin not defined */ +/** Pin not defined. */ #define PNUM_NOT_DEFINED NUM_DIGITAL_PINS /* Avoid PortName issue */ @@ -42,7 +43,7 @@ _Static_assert(NUM_ANALOG_INPUTS <= MAX_ANALOG_INPUTS, "Core NUM_ANALOG_INPUTS limited to MAX_ANALOG_INPUTS"); /* Default for Arduino connector compatibility */ -/* SPI Definitions */ +/* SPI Definitions: default pin numbers, could be redefined in the variant */ #ifndef PIN_SPI_SS #define PIN_SPI_SS 10 #endif @@ -73,7 +74,7 @@ static const pin_size_t MOSI = PIN_SPI_MOSI; static const pin_size_t MISO = PIN_SPI_MISO; static const pin_size_t SCK = PIN_SPI_SCK; -/* I2C Definitions */ +/* I2C Definitions: default pin numbers, could be redefined in the variant */ #ifndef PIN_WIRE_SDA #define PIN_WIRE_SDA 14 #endif @@ -84,7 +85,7 @@ static const pin_size_t SCK = PIN_SPI_SCK; static const pin_size_t SDA = PIN_WIRE_SDA; static const pin_size_t SCL = PIN_WIRE_SCL; -/* I3C Definitions */ +/* I3C Definitions: default pin numbers, could be redefined in the variant */ #ifndef PIN_I3C_SDA #define PIN_I3C_SDA 14 #endif @@ -101,9 +102,20 @@ extern "C" { extern const PinName digitalPin[]; extern const pin_size_t analogInputPin[]; +/** + * @brief Value returned by digitalPinToInterrupt() when the pin cannot be used + * as an interrupt. + */ #define NOT_AN_INTERRUPT (pin_size_t)NC -/* Convert a digital pin number Dxx to a PinName PX_n */ +/** + * @brief Convert a digital pin number (Dxx) to a PinName (PX_n). + * + * The ALTX bits of the pin number are preserved. An analog pin number (Ax) is also accepted. + * + * @param p Digital pin number. + * @return PinName of the pin. NC if the pin is not valid. + */ #if NUM_ANALOG_INPUTS > 0 /* Note: Analog pin is also a digital pin */ #define digitalPinToPinName(p) ((((pin_size_t)(p) & PNUM_MASK) < NUM_DIGITAL_PINS) ? \ @@ -115,13 +127,26 @@ extern const pin_size_t analogInputPin[]; #define digitalPinToPinName(p) ((((pin_size_t)(p) & PNUM_MASK) < NUM_DIGITAL_PINS) ? \ (PinName)(digitalPin[(pin_size_t)(p) & PNUM_MASK] | ((p) & ALTX_MASK)) : NC) #endif /* NUM_ANALOG_INPUTS > 0 */ -/* Convert a PinName PX_n to a digital pin number */ +/** + * @brief Convert a PinName (PX_n) to a digital pin number. + * + * @param p PinName to convert. + * @return Digital pin number, with the ALTX bits preserved. + * NUM_DIGITAL_PINS if not found. + */ pin_size_t pinNametoDigitalPin(PinName p); -/* Convert an analog pin number to a digital pin number */ +/** + * @brief Convert an analog pin number (Ax) to a digital pin number. + * + * Used by the analogRead API to have A0 == 0, even if the analog pins are + * not contiguous in the digitalPin array. + * + * @param p Analog pin number. + * @return Digital pin number, with the ALTX bits preserved. NC if the pin is + * not valid, or NUM_DIGITAL_PINS when no analog input is defined. + */ #if NUM_ANALOG_INPUTS > 0 -/* Used by analogRead api to have A0 == 0 */ -/* Non contiguous analog pins definition in digitalPin array */ #define analogInputToDigitalPin(p) ((((pin_size_t)(p) & PNUM_MASK) < NUM_ANALOG_INPUTS) ? \ analogInputPin[(pin_size_t)(p) & PNUM_MASK] | ((pin_size_t)(p) & ALTX_MASK) : \ (((pin_size_t)(p) & PNUM_ANALOG_BASE) == PNUM_ANALOG_BASE) && \ @@ -131,31 +156,59 @@ pin_size_t pinNametoDigitalPin(PinName p); #define analogInputToDigitalPin(p) (NUM_DIGITAL_PINS) #endif /* NUM_ANALOG_INPUTS > 0 */ -/* Convert an analog pin number Ax to a PinName PX_n */ +/** + * @brief Convert an analog pin number (Ax) to a PinName (PX_n). + * + * @note The internal channels (ATEMP, ATEMP_ADC5, AVREF, AVBAT) are also + * handled when defined. + * + * @param pin Analog pin number, Ax. + * @return PinName of the analog input. NC if the pin is not an analog input. + */ PinName analogInputToPinName(pin_size_t pin); -/* All pins could manage EXTI */ +/** + * @brief Convert a digital pin number to an interrupt number. + * + * All pins could manage EXTI, so the pin number is used as interrupt number. + * + * @param p Digital pin number. + * @return The pin number if it is valid, NOT_AN_INTERRUPT otherwise. + */ #define digitalPinToInterrupt(p) (digitalPinIsValid(p) ? p : NOT_AN_INTERRUPT) +/** Check whether a digital pin has an I2C (SDA or SCL) function. */ #define digitalPinHasI2C(p) (pin_in_pinmap(digitalPinToPinName(p), PinMap_I2C_SDA) ||\ pin_in_pinmap(digitalPinToPinName(p), PinMap_I2C_SCL)) +/** Check whether a digital pin has a PWM (timer) function. */ #define digitalPinHasPWM(p) (pin_in_pinmap(digitalPinToPinName(p), PinMap_TIM)) +/** Check whether a digital pin has a UART (RX or TX) function. */ #define digitalPinHasSerial(p) (pin_in_pinmap(digitalPinToPinName(p), PinMap_UART_RX) ||\ pin_in_pinmap(digitalPinToPinName(p), PinMap_UART_TX)) +/** + * Check whether a digital pin has an SPI (MOSI, MISO, SCLK or SSEL) function. + */ #define digitalPinHasSPI(p) (pin_in_pinmap(digitalPinToPinName(p), PinMap_SPI_MOSI) ||\ pin_in_pinmap(digitalPinToPinName(p), PinMap_SPI_MISO) ||\ pin_in_pinmap(digitalPinToPinName(p), PinMap_SPI_SCLK) ||\ pin_in_pinmap(digitalPinToPinName(p), PinMap_SPI_SSEL)) +/** Get the GPIO port (GPIO_TypeDef pointer) of a digital pin. */ #define digitalPinToPort(p) (get_GPIO_Port(STM_PORT(digitalPinToPinName(p)))) +/** Get the bit mask of a digital pin in its GPIO port registers. */ #define digitalPinToBitMask(p) (STM_GPIO_PIN(digitalPinToPinName(p))) +/** Get the bit mask of an analog pin in its GPIO port registers. */ #define analogInPinToBit(p) (STM_GPIO_PIN(digitalPinToPinName(p))) +/** Get the address of the output data register of a GPIO port. */ #define portOutputRegister(P) (&(P->ODR)) +/** Get the address of the input data register of a GPIO port. */ #define portInputRegister(P) (&(P->IDR)) +/** Get the address of the set register of a GPIO port. */ #define portSetRegister(P) (&(P->BSRR)) +/* Get the address of the clear register of a GPIO port */ #if defined(STM32F2xx) || defined(STM32F4xx) || defined(STM32F7xx) /* For those series reset are in the high part so << 16U needed */ #define portClearRegister(P) (&(P->BSRR)) @@ -164,6 +217,7 @@ PinName analogInputToPinName(pin_size_t pin); #endif +/* Get the address of the mode register of a GPIO port */ #if defined(STM32F1xx) /* * Config registers split in 2 registers: @@ -175,25 +229,55 @@ PinName analogInputToPinName(pin_size_t pin); #else #define portModeRegister(P) (&(P->MODER)) #endif +/** + * Get the address of the mode register of a GPIO port. + * Same as portModeRegister(). + */ #define portConfigRegister(P) (portModeRegister(P)) +/** Check whether a digital pin number is valid, i.e. linked to a PinName. */ #define digitalPinIsValid(p) (digitalPinToPinName(p) != NC) -/* As some pin could be duplicated in digitalPin[] */ -/* return first occurrence of linked PinName (PYx) */ +/** + * @brief Get the first occurrence of a pin in digitalPin[]. + * + * Some pins could be duplicated in digitalPin[], this returns the digital pin + * number of the first occurrence of the linked PinName (PYx). + * + * @param p Digital pin number. + * @return Digital pin number of the first occurrence. + * NUM_DIGITAL_PINS if not found. + */ #define digitalPinFirstOccurence(p) (pinNametoDigitalPin(digitalPinToPinName(p))) /* Specific for Firmata */ #if defined(PIN_SERIAL_RX) && defined(PIN_SERIAL_TX) +/** + * Check whether a digital pin is the RX or TX pin of the default serial (Firmata). + */ #define pinIsSerial(p) ((digitalPinToPinName(p) == \ digitalPinToPinName(PIN_SERIAL_RX & PNUM_MASK)) ||\ (digitalPinToPinName(p) == \ digitalPinToPinName(PIN_SERIAL_TX & PNUM_MASK))) #endif -/* Convenient macro to handle Analog for Firmata */ +/** + * Convenient macro to handle Analog for Firmata, see digitalpinIsAnalogInput(). + */ #define pinIsAnalogInput digitalpinIsAnalogInput +/** + * @brief Check whether a digital pin is an analog input. + * + * @param pin Dx, x or PYn. + * @return true if the pin is an analog input, false otherwise. + */ bool digitalpinIsAnalogInput(pin_size_t pin); +/** + * @brief Get the analog input linked to a digital pin. + * + * @param pin Dx, x or PYn. + * @return Valid analog input number, or NUM_ANALOG_INPUTS if none. + */ pin_size_t digitalPinToAnalogInput(pin_size_t pin); #ifdef __cplusplus @@ -202,12 +286,15 @@ pin_size_t digitalPinToAnalogInput(pin_size_t pin); /* Default Definitions, could be redefined in variant.h */ #ifndef ADC_RESOLUTION + /** Default resolution of analogRead() values, in bits. */ #define ADC_RESOLUTION 10 #endif +/** Resolution of the DAC, in bits. */ #define DACC_RESOLUTION 12 #ifndef PWM_RESOLUTION + /** Default resolution of analogWrite() values, in bits. */ #define PWM_RESOLUTION 8 #endif @@ -217,9 +304,11 @@ _Static_assert((PWM_RESOLUTION > 0) &&(PWM_RESOLUTION <= 32), "PWM_RESOLUTION must be 0 < x <= 32!"); #ifndef PWM_FREQUENCY + /** Default PWM frequency of analogWrite(), in Hertz. */ #define PWM_FREQUENCY 1000 #endif #ifndef PWM_MAX_DUTY_CYCLE + /** Maximum PWM duty cycle value. */ #define PWM_MAX_DUTY_CYCLE 4095 #endif diff --git a/cores/arduino/pins_arduino_analog.h b/cores/arduino/pins_arduino_analog.h index 031bfdba23..0007c354b3 100644 --- a/cores/arduino/pins_arduino_analog.h +++ b/cores/arduino/pins_arduino_analog.h @@ -10,22 +10,28 @@ * ******************************************************************************* */ +/** + * @file pins_arduino_analog.h + * @brief Analog pin numbering: Arduino analog pins (A0...), PIN_Ax and ADC internal channels. + */ #ifndef _PINS_ARDUINO_ANALOG_H_ #define _PINS_ARDUINO_ANALOG_H_ #include "variant.h" #include "PinNames.h" -/* - * Pin number Analog base +/** + * @brief Pin number Analog base. + * * To check if a pin number is an analog pin: * ((p & PNUM_ANALOG_BASE) == PNUM_ANALOG_BASE) * if true then p is an analog pin number * else not */ #define PNUM_ANALOG_BASE 0xC0 -/* - * Pin number Analog index - * allows to retrieve the pin number index of an analog pin +/** + * @brief Pin number Analog index. + * + * Allows to retrieve the pin number index of an analog pin * in the analogInputPin[] array: * analogInputPin[p & PNUM_ANALOG_INDEX] */ @@ -33,25 +39,33 @@ /* Arduino analog pins */ #ifndef NUM_ANALOG_INPUTS + /** Number of Arduino analog pins (A0...). 0 when the variant defines none. */ #define NUM_ANALOG_INPUTS 0 #endif -/* Analog internal pin numbers follow the analog pin number */ +/** + * First analog internal pin number. + * Analog internal pin numbers follow the analog pin numbers. + */ #define NUM_ANALOG_INTERNAL_FIRST (PNUM_ANALOG_BASE + NUM_ANALOG_INPUTS) /* ADC internal channels (not a pins) */ /* Only used for analogRead() */ #if defined(ADC_CHANNEL_TEMPSENSOR) || defined(ADC_CHANNEL_TEMPSENSOR_ADC1) ||\ defined(LL_ADC_CHANNEL_TEMPSENSOR) + /** Internal temperature sensor channel, to use with analogRead(). */ #define ATEMP (NUM_ANALOG_INTERNAL_FIRST) #endif #if defined(ADC_CHANNEL_VREFINT) || defined(LL_ADC_CHANNEL_VREFINT) + /** Internal voltage reference channel, to use with analogRead(). */ #define AVREF (NUM_ANALOG_INTERNAL_FIRST + 1) #endif #ifdef ADC_CHANNEL_VBAT + /** Internal battery voltage channel, to use with analogRead(). */ #define AVBAT (NUM_ANALOG_INTERNAL_FIRST + 2) #endif #if defined(ADC5) && defined(ADC_CHANNEL_TEMPSENSOR_ADC5) + /** Internal temperature sensor channel of ADC5, to use with analogRead(). */ #define ATEMP_ADC5 (NUM_ANALOG_INTERNAL_FIRST + 3) #endif @@ -442,6 +456,7 @@ enum { , A63 = PIN_A63 #endif }; +/** Maximum number of Arduino analog pins supported by the core. */ #define MAX_ANALOG_INPUTS 64 #else #define MAX_ANALOG_INPUTS 0 diff --git a/cores/arduino/pins_arduino_digital.h b/cores/arduino/pins_arduino_digital.h index 29c6212981..f2570eba13 100644 --- a/cores/arduino/pins_arduino_digital.h +++ b/cores/arduino/pins_arduino_digital.h @@ -10,12 +10,29 @@ * ******************************************************************************* */ +/** + * @file pins_arduino_digital.h + * @brief Digital pin numbering: Arduino digital pins alias (Dx) and PYn_ALT0 pin numbers. + */ #ifndef _PINS_ARDUINO_DIGITAL_H_ #define _PINS_ARDUINO_DIGITAL_H_ #include "variant.h" -/* GPIO port (A to K + Z) * 16 pins: 192 */ -/* Arduino digital pins alias */ +/* + * Digital pin numbering scheme: + * - A digital pin number is an index in the digitalPin[] array of the variant, + * which gives the PinName (PX_n) of the pin. Only the low 8 bits + * (PNUM_MASK) are the index. + * - Dx (D0, D1, ...) is the Arduino alias of the pin number x. + * - PYn (PA0, PB3, ...) are the STM32 pin numbers defined in the variant.h. + * They are numbers like Dx, not PinName: PYn is the index of the pin Y n + * in digitalPin[], or an analog pin number (PIN_Ax) for pins which are + * also an analog input. + * - Bits 8 to 10 (ALTX_MASK) select an alternate PinName (ALT0 to ALT7), + * see PYn_ALTx below. + * GPIO port (A to K + Z) * 16 pins: 192 maximum. + */ +/** Arduino digital pins alias (D0 to D191), limited by NUM_DIGITAL_PINS. */ enum { D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, @@ -537,7 +554,14 @@ enum { /* * Each STM32 pin number PYn defined in the variant.h - * is also the alternate pin number PYn_ALT0 + * is also the alternate pin number PYn_ALT0. + * + * PYn_ALTx (x from 0 to 7) is the pin number PYn with the ALTx bits set + * (PYn | ALTx). It selects the alternate PinName PY_n_ALTx (e.g. PA_0_ALT1) of + * the pin, i.e. the duplicated entry of PYn in the peripheral pin maps + * (PeripheralPins.c), when the same pin has several possible functions + * (e.g. several timer channels or ADC instances). + * Only the PYn_ALT0 aliases are defined here, the other ones are defined by the variant. */ #ifdef PA0 #define PA0_ALT0 (PA0 | ALT0) diff --git a/cores/arduino/stm32/startup_stm32yyxx.S b/cores/arduino/stm32/startup_stm32yyxx.S index aef54aef98..0182c637dd 100644 --- a/cores/arduino/stm32/startup_stm32yyxx.S +++ b/cores/arduino/stm32/startup_stm32yyxx.S @@ -1,3 +1,8 @@ +/** + * @file startup_stm32yyxx.S + * @brief Includes the CMSIS startup file (CMSIS_STARTUP_FILE) of the selected + * device when using the HAL v1 driver. + */ #if !defined(USE_HALV2_DRIVER) #include "stm32_def_build.h" diff --git a/cores/arduino/stm32/startup_stm32yyxx.c b/cores/arduino/stm32/startup_stm32yyxx.c index 6ae7572e73..b026e19b7a 100644 --- a/cores/arduino/stm32/startup_stm32yyxx.c +++ b/cores/arduino/stm32/startup_stm32yyxx.c @@ -1,3 +1,8 @@ +/** + * @file startup_stm32yyxx.c + * @brief Includes the CMSIS startup file of the selected device when using the + * HAL v2 driver. + */ #ifndef _STARTUP_STM32YYXX_C_ #define _STARTUP_STM32YYXX_C_ diff --git a/cores/arduino/stm32/stm32_def_build.h b/cores/arduino/stm32/stm32_def_build.h index d83487a445..8a0ab4974f 100644 --- a/cores/arduino/stm32/stm32_def_build.h +++ b/cores/arduino/stm32/stm32_def_build.h @@ -1,3 +1,7 @@ +/** + * @file stm32_def_build.h + * @brief Selects the CMSIS startup file (CMSIS_STARTUP_FILE) matching the STM32 device. + */ #ifndef _STM32_DEF_BUILD_ #define _STM32_DEF_BUILD_ diff --git a/cores/arduino/stm32/stm32yyxx_hal_conf.h b/cores/arduino/stm32/stm32yyxx_hal_conf.h index 53a2437544..f96db9ef9b 100644 --- a/cores/arduino/stm32/stm32yyxx_hal_conf.h +++ b/cores/arduino/stm32/stm32yyxx_hal_conf.h @@ -1,3 +1,7 @@ +/** + * @file stm32yyxx_hal_conf.h + * @brief Selects the HAL modules to enable, for the HAL v1 and HAL v2 drivers. + */ #ifndef __STM32YYxx_HAL_CONF_H #define __STM32YYxx_HAL_CONF_H diff --git a/cores/arduino/utils.h b/cores/arduino/utils.h index 84b18cca10..de237df8cb 100644 --- a/cores/arduino/utils.h +++ b/cores/arduino/utils.h @@ -1,13 +1,18 @@ +/** + * @file utils.h + * @brief Preprocessor helpers: string concatenation and stringification. + */ #ifndef __UTILS_H #define __UTILS_H -/* Concatenate 2 strings */ +/** Concatenate 2 string literals. */ #define CONCAT(s1, s2) (s1 s2) -/* Concatenate 2 strings separated by space */ +/** Concatenate 2 string literals separated by a space. */ #define CONCATS(s1, s2) (s1" " s2) -/* Stringification */ +/** Stringification of a macro argument, after macro expansion. */ #define XSTR(s) STR(s) +/** Stringification of a macro argument, without macro expansion. */ #define STR(s) #s #endif diff --git a/cores/arduino/variant.h b/cores/arduino/variant.h index f08e5de422..cca3dab521 100644 --- a/cores/arduino/variant.h +++ b/cores/arduino/variant.h @@ -10,6 +10,11 @@ * ******************************************************************************* */ +/** + * @file variant.h + * @brief Includes the header of the selected variant (VARIANT_H) and the + * generic Serial selection. + */ #pragma once #include VARIANT_H diff --git a/cores/arduino/wiring.h b/cores/arduino/wiring.h index d74e8ed58f..6a0904d7d0 100644 --- a/cores/arduino/wiring.h +++ b/cores/arduino/wiring.h @@ -17,6 +17,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file wiring.h + * @brief STM32 wiring extensions: analog resolution and frequency, + * digitalToggle(), noTone(), attachInterrupt() and timing helper macros. + */ + #ifndef _WIRING_H_ #define _WIRING_H_ @@ -33,51 +39,74 @@ #include "dwt.h" #include "interrupt.h" -/* wirinig_analog*/ +/* wiring_analog */ #ifdef __cplusplus extern "C" { #endif -/* - * \brief Set the resolution of analogRead return values. Default is 10 bits (range from 0 to 1023). +/** + * @brief Set the resolution of analogRead return values. + * Default is 10 bits (range from 0 to 1023). + * + * @note The ADC is configured with the closest supported hardware resolution + * (capped to the maximum of the ADC) and the result is scaled to the requested + * resolution. Values outside the range 1 to 32 call Error_Handler(). + * + * @see analogRead(), analogWriteResolution() * - * \param res + * @param res Number of bits of the resolution, from 1 to 32. */ extern void analogReadResolution(int res); -/* - * \brief Set the resolution of analogWrite parameters. Default is 8 bits (range from 0 to 255). +/** + * @brief Set the resolution of analogWrite parameters. + * Default is 8 bits (range from 0 to 255). + * + * @note The PWM hardware resolution is capped to 16 bits and the value is + * scaled accordingly. Values outside the range 1 to 32 call Error_Handler(). + * + * @see analogWrite(), analogReadResolution(), analogWriteFrequency() * - * \param res + * @param res Number of bits of the resolution, from 1 to 32. */ extern void analogWriteResolution(int res); -/* - * \brief Set the frequency of analogWrite. Default is PWM_FREQUENCY (1000) in Hertz. +/** + * @brief Set the frequency of analogWrite. + * Default is PWM_FREQUENCY (1000) in Hertz. + * + * @see analogWrite(), analogWriteResolution() * - * \param freq + * @param freq PWM frequency in Hertz. */ extern void analogWriteFrequency(uint32_t freq); /* wiring_constants */ +/** Default analog reference, kept for AVR compatibility. */ #define DEFAULT 1 +/** External analog reference, kept for AVR compatibility. */ #define EXTERNAL 0 +/** Enable all interrupts. */ #define interrupts() __enable_irq() +/** Disable all interrupts. */ #define noInterrupts() __disable_irq() #ifndef _BV +/** Value of a bit mask with only the given bit set. */ #define _BV(bit) (1 << (bit)) #endif #ifndef cbi +/** Clear the bits of bitmask in the register pointed to by reg. */ #define cbi(reg, bitmask) *reg &= ~bitmask #endif #ifndef sbi +/** Set the bits of bitmask in the register pointed to by reg. */ #define sbi(reg, bitmask) *reg |= bitmask #endif /* wiring_digital */ /** - * \brief Toggle the value from a specified digital pin. + * @brief Toggle the value from a specified digital pin. * - * \param ulPin The number of the digital pin you want to toggle (int) + * @param pinNumber The number of the digital pin you want to toggle. */ extern void digitalToggle(pin_size_t pinNumber); @@ -86,13 +115,25 @@ extern void digitalToggle(pin_size_t pinNumber); #endif #ifdef __cplusplus - /* - * \brief Stop tone generation on pin. + /** + * @brief Stop tone generation on pin. * - * \param _pin + * @param _pin The pin on which to stop tone generation. + * @param destruct If true, the tone timer is deinitialized and deleted. + * If false, it is only paused. */ extern void noTone(uint8_t _pin, bool destruct); #if !defined(HAL_EXTI_MODULE_DISABLED) + /** + * @brief Attach a callback function to an external interrupt on a pin. + * + * @note LOW and HIGH level triggers are only available on series supporting + * level interrupts, otherwise they fall back to FALLING and RISING respectively. + * + * @param pin The pin to attach the interrupt to. + * @param callback Function called when the interrupt fires. It takes no arguments. + * @param mode Trigger mode: CHANGE, RISING, FALLING, LOW or HIGH. + */ extern void attachInterrupt(pin_size_t pin, callback_function_t callback, PinStatus mode); #endif #endif @@ -105,8 +146,11 @@ extern void digitalToggle(pin_size_t pinNumber); #endif // __cplusplus +/** Number of CPU clock cycles per microsecond. */ #define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L ) +/** Convert a number of CPU clock cycles to microseconds. */ #define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) ) +/** Convert a number of microseconds to CPU clock cycles. */ #define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) ) #endif /* _WIRING_H_ */ diff --git a/cores/arduino/wiring_analog.c b/cores/arduino/wiring_analog.c index 603e6c2680..96b34f3c79 100644 --- a/cores/arduino/wiring_analog.c +++ b/cores/arduino/wiring_analog.c @@ -16,6 +16,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file wiring_analog.c + * @brief Analog input (ADC) and analog output (PWM or DAC) functions. + */ + #include "Arduino.h" #include "PinConfigured.h" @@ -80,7 +85,14 @@ static int _internalReadResolution = #endif /* ADC_RESOLUTION > MAX_ADC_RESOLUTION */ ; -/* Common utility function to map a value from one resolution to another */ +/** + * @brief Map a value from one resolution to another. + * + * @param value Value to convert. + * @param from Resolution of value, in bits. + * @param to Target resolution, in bits. + * @return Value scaled to the target resolution. + */ static inline uint32_t mapResolution(uint32_t value, uint32_t from, uint32_t to) { if (from != to) { @@ -154,13 +166,26 @@ void analogReadResolution(int res) } } +/** + * @brief Set the analog reference voltage. + * Not supported on this core, the call has no effect. + * + * @param mode Reference mode, ignored. + */ void analogReference(uint8_t mode) { (void)mode; } -// Perform the read operation on the selected analog pin. -// the initialization of the analog PIN is done through this function +/** + * @brief Read the analog value of a pin, scaled to the resolution set by analogReadResolution(). + * + * The initialization of the analog pin is done through this function. + * + * @param pinNumber Analog pin number, e.g. A0 or PA0. + * @return Converted value, between 0 and 2^resolution - 1. + * 0 if the pin has no ADC. + */ int analogRead(pin_size_t pinNumber) { pin_size_t value = 0; @@ -198,8 +223,17 @@ void analogWriteFrequency(uint32_t freq) _writeFreq = freq; } -// Output only works on the pins with Hardware Timer (PWM) or DAC support. -// For the other pins, default to digital output. +/** + * @brief Write an analog value to a pin, using PWM or DAC if the pin supports it. + * + * Output only works on the pins with Hardware Timer (PWM) or DAC support. + * For the other pins, it defaults to digital output: the value is scaled to + * 8 bits and the pin is set HIGH if it is 128 or more, LOW otherwise. + * The DAC takes precedence over PWM when a pin supports both. + * + * @param pinNumber Pin number to write to. + * @param value Value to write, scaled to the resolution set by analogWriteResolution(). + */ void analogWrite(pin_size_t pinNumber, int value) { PinName p = digitalPinToPinName(pinNumber); diff --git a/cores/arduino/wiring_digital.c b/cores/arduino/wiring_digital.c index 104ce20904..b366891715 100644 --- a/cores/arduino/wiring_digital.c +++ b/cores/arduino/wiring_digital.c @@ -16,6 +16,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file wiring_digital.c + * @brief Digital I/O functions: pinMode(), digitalWrite(), digitalRead() and digitalToggle(). + */ + #include "Arduino.h" #include "PinConfigured.h" @@ -26,6 +31,15 @@ extern "C" { extern pin_size_t g_anOutputPinConfigured[MAX_NB_PORT]; +/** + * @brief Set the mode of a pin. + * + * If the pin was used for PWM or DAC output (analogWrite()), the output is + * stopped first. Any unsupported mode calls Error_Handler(). + * + * @param pinNumber Pin number, Dx or x. + * @param pinMode INPUT, INPUT_PULLUP, INPUT_PULLDOWN, INPUT_ANALOG, OUTPUT or OUTPUT_OPEN_DRAIN. + */ void pinMode(pin_size_t pinNumber, PinMode pinMode) { PinName p = digitalPinToPinName(pinNumber); @@ -79,6 +93,12 @@ void pinMode(pin_size_t pinNumber, PinMode pinMode) } } +/** + * @brief Write a HIGH or LOW value to a digital pin. + * + * @param pinNumber Pin number, Dx or x. + * @param status HIGH or LOW. + */ void digitalWrite(pin_size_t pinNumber, PinStatus status) { PinName p = digitalPinToPinName(pinNumber); @@ -87,6 +107,12 @@ void digitalWrite(pin_size_t pinNumber, PinStatus status) } } +/** + * @brief Read the value of a digital pin. + * + * @param pinNumber Pin number, Dx or x. + * @return HIGH or LOW. LOW if the pin is invalid. + */ PinStatus digitalRead(pin_size_t pinNumber) { PinName p = digitalPinToPinName(pinNumber); diff --git a/cores/arduino/wiring_pulse.cpp b/cores/arduino/wiring_pulse.cpp index fcaf974e35..f811c34ea0 100644 --- a/cores/arduino/wiring_pulse.cpp +++ b/cores/arduino/wiring_pulse.cpp @@ -16,15 +16,28 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file wiring_pulse.cpp + * @brief Pulse width measurement: pulseIn() and pulseInLong(). + */ + #include "Arduino.h" -/* Measures the length (in microseconds) of a pulse on the pin; state is HIGH - * or LOW, the type of pulse to measure. Works on pulses from 2-3 microseconds - * to 3 minutes in length, but must be called at least a few dozen microseconds - * before the start of the pulse. +/** + * @brief Measures the length (in microseconds) of a pulse on the pin. + * + * Works on pulses from 2-3 microseconds to 3 minutes in length, but must be + * called at least a few dozen microseconds before the start of the pulse. * - * ATTENTION: - * This function relies on micros() so cannot be used in noInterrupt() context + * @note This function relies on micros() so cannot be used in noInterrupt() context. + * + * @param pin Pin number, Dx or x. + * @param state HIGH or LOW, the type of pulse to measure. + * @param timeout Maximum time to wait for the whole measure (end of any + * previous pulse, start and end of the pulse), in microseconds. + * Defaults to 1 second when omitted in C++. + * @return Length of the pulse in microseconds, or 0 if the pulse was not + * completed before the timeout. */ unsigned long pulseIn(pin_size_t pin, uint8_t state, unsigned long timeout) { @@ -60,13 +73,20 @@ unsigned long pulseIn(pin_size_t pin, uint8_t state, unsigned long timeout) return (micros() - start); } -/* Measures the length (in microseconds) of a pulse on the pin; state is HIGH - * or LOW, the type of pulse to measure. Works on pulses from 2-3 microseconds - * to 3 minutes in length, but must be called at least a few dozen microseconds - * before the start of the pulse. +/** + * @brief Measures the length (in microseconds) of a pulse on the pin. + * + * Same as pulseIn(); provided for compatibility with the AVR core. + * + * @note This function relies on micros() so cannot be used in noInterrupt() context. * - * ATTENTION: - * This function relies on micros() so cannot be used in noInterrupt() context + * @param pin Pin number, Dx or x. + * @param state HIGH or LOW, the type of pulse to measure. + * @param timeout Maximum time to wait for the whole measure (end of any + * previous pulse, start and end of the pulse), in microseconds. + * Defaults to 1 second when omitted in C++. + * @return Length of the pulse in microseconds, or 0 if the pulse was not + * completed before the timeout. */ unsigned long pulseInLong(pin_size_t pin, uint8_t state, unsigned long timeout) { diff --git a/cores/arduino/wiring_shift.c b/cores/arduino/wiring_shift.c index 84ff859cce..13024f7de2 100644 --- a/cores/arduino/wiring_shift.c +++ b/cores/arduino/wiring_shift.c @@ -16,12 +16,27 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file wiring_shift.c + * @brief Bit-banged serial shift functions: shiftIn() and shiftOut(). + */ + #include "Arduino.h" #ifdef __cplusplus extern "C" { #endif +/** + * @brief Shift in a byte of data one bit at a time. + * + * Each bit is read while the clock is HIGH, then the clock is set back to LOW. + * + * @param dataPin Pin number to read the data from. + * @param clockPin Pin number to clock the data on. + * @param bitOrder LSBFIRST or MSBFIRST. + * @return The byte read. + */ uint8_t shiftIn(pin_size_t dataPin, pin_size_t clockPin, BitOrder bitOrder) { uint8_t value = 0 ; @@ -42,6 +57,16 @@ uint8_t shiftIn(pin_size_t dataPin, pin_size_t clockPin, BitOrder bitOrder) return value ; } +/** + * @brief Shift out a byte of data one bit at a time. + * + * Each bit is written to the data pin, then the clock is pulsed HIGH then LOW. + * + * @param dataPin Pin number to write the data to. + * @param clockPin Pin number to clock the data on. + * @param bitOrder LSBFIRST or MSBFIRST. + * @param val Byte to shift out. + */ void shiftOut(pin_size_t dataPin, pin_size_t clockPin, BitOrder bitOrder, uint8_t val) { uint8_t i ; diff --git a/cores/arduino/wiring_time.c b/cores/arduino/wiring_time.c index f622c7e1d7..90ce77376b 100644 --- a/cores/arduino/wiring_time.c +++ b/cores/arduino/wiring_time.c @@ -16,24 +16,49 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file wiring_time.c + * @brief Time functions: millis(), micros(), delay(), delayMicroseconds() and _gettimeofday(). + */ + #include "Arduino.h" #ifdef __cplusplus extern "C" { #endif +/** + * @brief Get the number of milliseconds since the board started. + * + * @note Interrupts are not disabled while the counter is read, see the ToDo in the implementation. + * + * @return Milliseconds since startup. Overflows after about 49 days. + */ unsigned long millis(void) { - // ToDo: ensure no interrupts + // ToDo: ensure no interrupts while reading the counter return getCurrentMillis(); } -// Interrupt-compatible version of micros +/** + * @brief Get the number of microseconds since the board started. + * + * Interrupt-compatible version. + * + * @return Microseconds since startup. Overflows after about 70 minutes. + */ unsigned long micros(void) { return getCurrentMicros(); } +/** + * @brief Pause the program for the given number of milliseconds. + * + * Calls yield() while waiting, so cooperative threads can run. + * + * @param ms Number of milliseconds to pause. + */ void delay(unsigned long ms) { if (ms != 0) { @@ -45,19 +70,20 @@ void delay(unsigned long ms) } /** - * \brief Pauses the program for the amount of time (in microseconds) specified as parameter. + * @brief Pause the program for the amount of time (in microseconds) specified as parameter. * - * \param us the number of microseconds to pause (unsigned int) + * @param us Number of microseconds to pause. */ - void delayMicroseconds(unsigned int us) { #if defined(DWT_BASE) && !defined(DWT_DELAY_DISABLED) + // Busy wait on the DWT cycle counter int32_t start = dwt_getCycles(); int32_t cycles = us * (SystemCoreClock / 1000000); while ((int32_t)dwt_getCycles() - start < cycles); #else + // Busy wait on the SysTick down counter, accumulating the elapsed ticks __IO uint32_t currentTicks = SysTick->VAL; /* Number of ticks per millisecond */ const uint32_t tickPerMs = SysTick->LOAD + 1; @@ -76,17 +102,16 @@ void delayMicroseconds(unsigned int us) } /** - * \brief gives the number of seconds and microseconds since the Epoch - * - * based on millisecond since last power on. + * @brief Gives the number of seconds and microseconds since the Epoch. * - * \note The function is declared as weak to be overwritten in case of other - * implementations in user file (using RTC values for example). + * Based on milliseconds since last power on. * - * \param tv argument is a struct timeval - * \param tz argument is a struct timezone (unused) + * @note The function is declared as weak to be overwritten in case of other + * implementations in user file (using RTC values for example). * - * \return 0 + * @param tv Argument is a struct timeval. + * @param tz Argument is a struct timezone (unused). + * @return 0, always. */ int __attribute__((weak)) _gettimeofday(struct timeval *tv, void *tz) { diff --git a/libraries/EEPROM/src/EEPROM.h b/libraries/EEPROM/src/EEPROM.h index c95cb0cdda..275f3dced8 100644 --- a/libraries/EEPROM/src/EEPROM.h +++ b/libraries/EEPROM/src/EEPROM.h @@ -28,20 +28,28 @@ extern "C" { #if defined(USE_HALV2_DRIVER) #warning "EEPROM library is not yet compatible with HALv2 driver." #endif -/*** - EERef class. - - This object references an EEPROM cell. - Its purpose is to mimic a typical byte of RAM, however its storage is the EEPROM. - This class has an overhead of two bytes, similar to storing a pointer to an EEPROM cell. -***/ - +/** + * @brief EERef class. + * + * This object references an EEPROM cell. + * Its purpose is to mimic a typical byte of RAM, however its storage is the + * EEPROM. + * This class has an overhead of two bytes, similar to storing a pointer to an EEPROM cell. + */ struct EERef { + /** + * @brief Construct a reference to an EEPROM cell. + * @param idx Index of the EEPROM cell. + */ EERef(const int idx) : index(idx) {} - //Access/read members. + // Access/read members. + /** + * @brief Read the value of the referenced EEPROM cell. + * @return Value stored in the EEPROM cell. + */ uint8_t operator*() const { #if defined(USE_HALV2_DRIVER) @@ -50,16 +58,30 @@ struct EERef { return eeprom_read_byte(/*(uint8_t*)*/ index); #endif } + /** + * @brief Implicit conversion to uint8_t, reads the referenced EEPROM cell. + * @return Value stored in the EEPROM cell. + */ operator uint8_t() const { return **this; } - //Assignment/write members. + // Assignment/write members. + /** + * @brief Write the value of another EERef to the referenced EEPROM cell. + * @param ref Reference whose value is written. + * @return Reference to this object. + */ EERef &operator=(const EERef &ref) { return *this = *ref; } + /** + * @brief Write a byte to the referenced EEPROM cell. + * @param in Value to write. + * @return Reference to this object. + */ EERef &operator=(uint8_t in) { #if defined(USE_HALV2_DRIVER) @@ -68,168 +90,309 @@ struct EERef { return eeprom_write_byte(/*(uint8_t*)*/ index, in), *this; #endif } + /** + * @brief Add a value to the stored value and write the result back. + * @param in Operand. + * @return Reference to this object. + */ EERef &operator +=(uint8_t in) { return *this = **this + in; } + /** + * @brief Subtract a value from the stored value and write the result back. + * @param in Operand. + * @return Reference to this object. + */ EERef &operator -=(uint8_t in) { return *this = **this - in; } + /** + * @brief Multiply the stored value by a value and write the result back. + * @param in Operand. + * @return Reference to this object. + */ EERef &operator *=(uint8_t in) { return *this = **this * in; } + /** + * @brief Divide the stored value by a value and write the result back. + * @param in Operand. + * @return Reference to this object. + */ EERef &operator /=(uint8_t in) { return *this = **this / in; } + /** + * @brief Bitwise XOR the stored value with a value and write the result back. + * @param in Operand. + * @return Reference to this object. + */ EERef &operator ^=(uint8_t in) { return *this = **this ^ in; } + /** + * @brief Modulo the stored value by a value and write the result back. + * @param in Operand. + * @return Reference to this object. + */ EERef &operator %=(uint8_t in) { return *this = **this % in; } + /** + * @brief Bitwise AND the stored value with a value and write the result back. + * @param in Operand. + * @return Reference to this object. + */ EERef &operator &=(uint8_t in) { return *this = **this & in; } + /** + * @brief Bitwise OR the stored value with a value and write the result back. + * @param in Operand. + * @return Reference to this object. + */ EERef &operator |=(uint8_t in) { return *this = **this | in; } + /** + * @brief Left shift the stored value by a value and write the result back. + * @param in Number of bits to shift. + * @return Reference to this object. + */ EERef &operator <<=(uint8_t in) { return *this = **this << in; } + /** + * @brief Right shift the stored value by a value and write the result back. + * @param in Number of bits to shift. + * @return Reference to this object. + */ EERef &operator >>=(uint8_t in) { return *this = **this >> in; } + /** + * @brief Write a value only if it differs from the stored value, to reduce EEPROM wear. + * @param in Value to write. + * @return Reference to this object. + */ EERef &update(uint8_t in) { return in != *this ? *this = in : *this; } - /** Prefix increment/decrement **/ + // Prefix increment/decrement. + /** + * @brief Prefix increment of the stored value. + * @return Reference to this object. + */ EERef &operator++() { return *this += 1; } + /** + * @brief Prefix decrement of the stored value. + * @return Reference to this object. + */ EERef &operator--() { return *this -= 1; } - /** Postfix increment/decrement **/ + // Postfix increment/decrement. + /** + * @brief Postfix increment of the stored value. + * @return Value stored before the increment. + */ uint8_t operator++ (int) { uint8_t ret = **this; return ++(*this), ret; } + /** + * @brief Postfix decrement of the stored value. + * @return Value stored before the decrement. + */ uint8_t operator-- (int) { uint8_t ret = **this; return --(*this), ret; } - int index; //Index of current EEPROM cell. + int index; /**< Index of the EEPROM cell this reference points to. */ }; -/*** - EEPtr class. - - This object is a bidirectional pointer to EEPROM cells represented by EERef objects. - Just like a normal pointer type, this can be dereferenced and repositioned using - increment/decrement operators. -***/ - +/** + * @brief EEPtr class. + * + * This object is a bidirectional pointer to EEPROM cells represented by EERef + * objects. + * Just like a normal pointer type, this can be dereferenced and repositioned + * using increment/decrement operators. + */ struct EEPtr { + /** + * @brief Construct a pointer to an EEPROM cell. + * @param idx Index of the EEPROM cell. + */ EEPtr(const int idx) : index(idx) {} + /** + * @brief Implicit conversion to the index of the pointed EEPROM cell. + * @return Index of the EEPROM cell. + */ operator int() const { return index; } + /** + * @brief Set the index of the pointed EEPROM cell. + * @param in New index. + * @return Reference to this object. + */ EEPtr &operator=(int in) { return index = in, *this; } - //Iterator functionality. + // Iterator functionality. + /** + * @brief Compare the index of this pointer with another pointer. + * @param ptr Pointer to compare with. + * @return true if the indices differ, false otherwise. + */ bool operator!=(const EEPtr &ptr) { return index != ptr.index; } + /** + * @brief Dereference the pointer. + * @return EERef referencing the pointed EEPROM cell. + */ EERef operator*() { return index; } - /** Prefix & Postfix increment/decrement **/ + // Prefix & Postfix increment/decrement. + /** + * @brief Prefix increment, move the pointer to the next EEPROM cell. + * @return Reference to this object. + */ EEPtr &operator++() { return ++index, *this; } + /** + * @brief Prefix decrement, move the pointer to the previous EEPROM cell. + * @return Reference to this object. + */ EEPtr &operator--() { return --index, *this; } + /** + * @brief Postfix increment, move the pointer to the next EEPROM cell. + * @return Copy of the pointer before the increment. + */ EEPtr operator++ (int) { return index++; } + /** + * @brief Postfix decrement, move the pointer to the previous EEPROM cell. + * @return Copy of the pointer before the decrement. + */ EEPtr operator-- (int) { return index--; } - int index; //Index of current EEPROM cell. + int index; /**< Index of the EEPROM cell this pointer points to. */ }; -/*** - EEPROMClass class. - - This object represents the entire EEPROM space. - It wraps the functionality of EEPtr and EERef into a basic interface. - This class is also 100% backwards compatible with earlier Arduino core releases. -***/ - +/** + * @brief EEPROMClass class. + * + * This object represents the entire EEPROM space. + * It wraps the functionality of EEPtr and EERef into a basic interface. + * This class is also 100% backwards compatible with earlier Arduino core releases. + */ struct EEPROMClass { - //Basic user access methods. + // Basic user access methods. + /** + * @brief Access the EEPROM cell at an index. + * @param idx Index of the EEPROM cell. + * @return EERef referencing the EEPROM cell. + */ EERef operator[](const int idx) { return idx; } + /** + * @brief Read a byte from EEPROM. + * @param idx Index of the EEPROM cell. + * @return Value stored in the EEPROM cell. + */ uint8_t read(int idx) { return EERef(idx); } + /** + * @brief Write a byte to EEPROM. + * @param idx Index of the EEPROM cell. + * @param val Value to write. + */ void write(int idx, uint8_t val) { (EERef(idx)) = val; } + /** + * @brief Write a byte to EEPROM only if it differs from the stored value, to + * reduce EEPROM wear. + * @param idx Index of the EEPROM cell. + * @param val Value to write. + */ void update(int idx, uint8_t val) { EERef(idx).update(val); } - //STL and C++11 iteration capability. + // STL and C++11 iteration capability. + /** + * @brief Get an iterator to the first EEPROM cell (STL and C++11 iteration). + * @return EEPtr pointing to index 0. + */ EEPtr begin() { return 0x00; } + /** + * @brief Get an iterator to the item after the last EEPROM cell (STL and C++11 iteration). + * @return EEPtr pointing past the last valid cell, it must not be dereferenced. + */ EEPtr end() { return length(); //Standards requires this to be the item after the last valid entry. The returned pointer is invalid. } + /** + * @brief Get the number of EEPROM bytes available. + * @return Size of the EEPROM in bytes, 0 when USE_HALV2_DRIVER is defined. + */ uint16_t length() { #if defined(USE_HALV2_DRIVER) @@ -239,7 +402,14 @@ struct EEPROMClass { #endif } - //Functionality to 'get' and 'put' objects to and from EEPROM. + // Functionality to 'get' and 'put' objects to and from EEPROM. + /** + * @brief Read an object from EEPROM. + * @tparam T Type of the object. + * @param idx Index of the first EEPROM cell to read. + * @param t Object to fill with the values read from EEPROM. + * @return Reference to t. + */ template< typename T > T &get(int idx, T &t) { EEPtr e = idx; @@ -250,6 +420,14 @@ struct EEPROMClass { return t; } + /** + * @brief Write an object to EEPROM. Only the bytes that differ from the + * stored values are written. + * @tparam T Type of the object. + * @param idx Index of the first EEPROM cell to write. + * @param t Object to write. + * @return Reference to t. + */ template< typename T > const T &put(int idx, const T &t) { EEPtr e = idx; @@ -261,5 +439,6 @@ struct EEPROMClass { } }; +/** @brief Default EEPROM instance. */ static EEPROMClass EEPROM; #endif diff --git a/libraries/EEPROM/src/utility/stm32_eeprom.c b/libraries/EEPROM/src/utility/stm32_eeprom.c index 76c278dc17..29ab84b0b0 100644 --- a/libraries/EEPROM/src/utility/stm32_eeprom.c +++ b/libraries/EEPROM/src/utility/stm32_eeprom.c @@ -26,7 +26,10 @@ extern "C" { #endif -/* Be able to change FLASH_BANK_NUMBER to use if relevant */ +/** + * @brief Flash bank used for the EEPROM emulation. + * Can be overridden before including this file. + */ #if !defined(FLASH_BANK_NUMBER) && defined(FLASH_BANK_1) && !defined(STM32WBAxx) #if defined(FLASH_BANK_2) #define FLASH_BANK_NUMBER FLASH_BANK_2 @@ -38,7 +41,10 @@ extern "C" { #endif #endif /* !FLASH_BANK_NUMBER */ -/* Be able to change FLASH_DATA_SECTOR to use if relevant */ +/** + * @brief Flash sector used for the EEPROM emulation. + * Can be overridden before including this file. + */ #if defined(FLASH_SECTOR_TOTAL) || defined(FLASH_SECTOR_NB) #if !defined(FLASH_DATA_SECTOR) #if defined(FLASH_SECTOR_TOTAL) @@ -53,7 +59,10 @@ extern "C" { #endif /* !FLASH_DATA_SECTOR */ #endif /* FLASH_SECTOR_TOTAL || FLASH_SECTOR_NB */ -/* Be able to change EEPROM_FLASH_PAGE_NUMBER to use if relevant */ +/** + * @brief Flash page number used for the EEPROM emulation. + * Can be overridden before including this file. + */ #if !defined(EEPROM_FLASH_PAGE_NUMBER) && defined(FLASH_PAGE_SIZE) #if defined(STM32WB0x) || defined(STM32WL3x) /* STM32WB0x and STM32WL3 define the FLASH_PAGE_NUMBER */ @@ -63,7 +72,10 @@ extern "C" { #endif #endif /* !EEPROM_FLASH_PAGE_NUMBER */ -/* Be able to change FLASH_END to use */ +/** + * @brief Address of the last byte of the flash area used for the EEPROM + * emulation. Can be overridden. + */ #if !defined(FLASH_END) #if defined(EEPROM_RETRAM_MODE) #define FLASH_END ((uint32_t)(EEPROM_RETRAM_START_ADDRESS + EEPROM_RETRAM_MODE_SIZE -1)) @@ -91,13 +103,14 @@ extern "C" { #endif #endif /* FLASH_END */ -/* Be able to change FLASH_BASE_ADDRESS to use */ -#ifndef FLASH_BASE_ADDRESS -/* - * By default, Use the last page of the flash to store data - * in order to prevent overwriting - * program data +/** + * @brief Start address of the flash area used for the EEPROM emulation. + * Can be overridden. + * + * By default, use the last page of the flash to store data + * in order to prevent overwriting program data. */ +#ifndef FLASH_BASE_ADDRESS #if defined(EEPROM_RETRAM_MODE) #define FLASH_BASE_ADDRESS EEPROM_RETRAM_START_ADDRESS #else @@ -109,14 +122,12 @@ extern "C" { #endif /* FLASH_BASE_ADDRESS */ #if !defined(DATA_EEPROM_BASE) +/** + * @brief RAM copy of the emulated EEPROM, 8 bytes aligned for the flash programming. + */ static uint8_t eeprom_buffer[E2END + 1] __attribute__((aligned(8))) = {0}; #endif -/** - * @brief Function reads a byte from emulated eeprom (flash) - * @param pos : address to read - * @retval byte : data read from eeprom - */ uint8_t eeprom_read_byte(const uint32_t pos) { #if defined(DATA_EEPROM_BASE) @@ -132,12 +143,6 @@ uint8_t eeprom_read_byte(const uint32_t pos) #endif /* _EEPROM_BASE */ } -/** - * @brief Function writes a byte to emulated eeprom (flash) - * @param pos : address to write - * @param value : value to write - * @retval none - */ void eeprom_write_byte(uint32_t pos, uint8_t value) { #if defined(DATA_EEPROM_BASE) @@ -156,32 +161,16 @@ void eeprom_write_byte(uint32_t pos, uint8_t value) #if !defined(DATA_EEPROM_BASE) -/** - * @brief Function reads a byte from the eeprom buffer - * @param pos : address to read - * @retval byte : data read from eeprom - */ uint8_t eeprom_buffered_read_byte(const uint32_t pos) { return eeprom_buffer[pos]; } -/** - * @brief Function writes a byte to the eeprom buffer - * @param pos : address to write - * @param value : value to write - * @retval none - */ void eeprom_buffered_write_byte(uint32_t pos, uint8_t value) { eeprom_buffer[pos] = value; } -/** - * @brief This function copies the data from flash into the buffer - * @param none - * @retval none - */ void eeprom_buffer_fill(void) { #if defined(ICACHE) && defined (HAL_ICACHE_MODULE_ENABLED) && !defined(HAL_ICACHE_MODULE_DISABLED) @@ -207,11 +196,6 @@ void eeprom_buffer_fill(void) #if defined(EEPROM_RETRAM_MODE) -/** - * @brief This function writes the buffer content into the flash - * @param none - * @retval none - */ void eeprom_buffer_flush(void) { memcpy((uint8_t *)(FLASH_BASE_ADDRESS), eeprom_buffer, E2END + 1); @@ -219,11 +203,6 @@ void eeprom_buffer_flush(void) #else /* defined(EEPROM_RETRAM_MODE) */ -/** - * @brief This function writes the buffer content into the flash - * @param none - * @retval none - */ void eeprom_buffer_flush(void) { #if defined(ICACHE) && defined (HAL_ICACHE_MODULE_ENABLED) && !defined(HAL_ICACHE_MODULE_DISABLED) diff --git a/libraries/EEPROM/src/utility/stm32_eeprom.h b/libraries/EEPROM/src/utility/stm32_eeprom.h index 995d25e6a1..05f745fde0 100644 --- a/libraries/EEPROM/src/utility/stm32_eeprom.h +++ b/libraries/EEPROM/src/utility/stm32_eeprom.h @@ -30,8 +30,9 @@ extern "C" { /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ #if defined(STM32MP1xx) -/* Note for STM32MP1xx devices: - * Those devices do not have non-volatile memory. The emulation is done +/** @brief The EEPROM emulation uses RETRAM on STM32MP1xx. + * + * @note Those devices do not have non-volatile memory. The emulation is done * in RETRAM. Therefore data will be preserved *only* when VBAT is supplied * (e.g. A coin battery is connected to CN3 on STM32MP157A_DK1) and * the coprocessor is waken up from STANBY mode. @@ -39,11 +40,16 @@ extern "C" { * See: https://community.st.com/s/question/0D50X0000B44pHUSQY/doesnt-the-mcu-coprocessor-have-nonvolatile-memory */ #define EEPROM_RETRAM_MODE -/* 4kB is the same size as EEPROM size of ATMega2560. */ +/** + * @brief EEPROM size in RETRAM mode. + * 4kB is the same size as EEPROM size of ATMega2560. + */ #ifndef EEPROM_RETRAM_MODE_SIZE #define EEPROM_RETRAM_MODE_SIZE ((uint32_t)(4*1024)) #endif -/* RETRAM start address is 0x00000000 (retset entry) and end address is +/** @brief EEPROM start address in RETRAM mode. + * + * RETRAM start address is 0x00000000 (retset entry) and end address is * 0x00020000 (64kB in total). The by default, ldscript.ld for STM32MP1xx * does not define address between 0x00000298 (end of ISR Vector) and 0x00020000. * So it is okay to use in this address range. Make sure ldscript.ld does not @@ -52,8 +58,10 @@ extern "C" { #ifndef EEPROM_RETRAM_START_ADDRESS #define EEPROM_RETRAM_START_ADDRESS (0x00000400UL) #endif +/** @brief Last EEPROM address (EEPROM size - 1). */ #define E2END (EEPROM_RETRAM_MODE_SIZE - 1) #else +/** @brief Mask of all the flash error flags to clear before programming. */ #ifndef FLASH_FLAG_ALL_ERRORS #if defined(FLASH_FLAG_PGERR) #if defined(FLASH_FLAG_OPTVERR) @@ -77,10 +85,12 @@ extern "C" { #endif /* FLASH_FLAG_ALL_ERRORS */ #ifndef FLASH_PAGE_SIZE -/* +/** + * @brief Size of the flash area used for the EEPROM emulation. + * * FLASH_PAGE_SIZE is not defined for STM32F2xx, STM32F4xx and STM32F7xx * Could be redefined in variant.h or using build_opt.h - * Warning: This is not the sector size, only the size used for EEPROM + * @warning This is not the sector size, only the size used for EEPROM * emulation. Anyway, all the sector size will be erased. * So pay attention to not use this sector for other stuff. */ @@ -90,18 +100,22 @@ extern "C" { #if defined(DATA_EEPROM_BASE) || defined(FLASH_EEPROM_BASE) #if defined (DATA_EEPROM_END) +/** @brief Last EEPROM address (EEPROM size - 1). */ #define E2END (DATA_EEPROM_END - DATA_EEPROM_BASE) #elif defined (DATA_EEPROM_BANK2_END) /* assuming two contiguous banks */ #define DATA_EEPROM_END DATA_EEPROM_BANK2_END +/** @brief Last EEPROM address (EEPROM size - 1). */ #define E2END (DATA_EEPROM_BANK2_END - DATA_EEPROM_BASE) #elif defined (FLASH_EEPROM_END) #define DATA_EEPROM_BASE FLASH_EEPROM_BASE #define DATA_EEPROM_END FLASH_EEPROM_END +/** @brief Last EEPROM address (EEPROM size - 1). */ #define E2END (DATA_EEPROM_END - DATA_EEPROM_BASE) #endif /* __EEPROM_END */ #else /* _EEPROM_BASE */ +/** @brief Last EEPROM address (EEPROM size - 1). */ #define E2END (FLASH_PAGE_SIZE - 1) #endif /* _EEPROM_BASE */ @@ -110,13 +124,50 @@ extern "C" { /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ +/** + * @brief Read a byte from the emulated EEPROM (flash). + * + * With a real data EEPROM, pos is a relative address and 0 is returned if it + * is out of range. + * Otherwise the flash content is first copied into the EEPROM buffer. + * @param pos Address to read. + * @return Data read from EEPROM. + */ uint8_t eeprom_read_byte(const uint32_t pos); +/** + * @brief Write a byte to the emulated EEPROM (flash). + * + * With a real data EEPROM, pos is a relative address and the write is ignored + * if it is out of range. + * Otherwise the byte is written to the EEPROM buffer, then the whole buffer is + * written into flash. + * @param pos Address to write. + * @param value Value to write. + */ void eeprom_write_byte(uint32_t pos, uint8_t value); #if !defined(DATA_EEPROM_BASE) +/** + * @brief Copy the data from flash into the EEPROM buffer. + * @note Any pending change in the buffer which was not flushed is overwritten. + */ void eeprom_buffer_fill(); +/** + * @brief Write the EEPROM buffer content into flash. + * @note Use it after eeprom_buffered_write_byte() to make the changes persistent. + */ void eeprom_buffer_flush(); +/** + * @brief Read a byte from the EEPROM buffer, flash is not read. + * @param pos Address to read. + * @return Data read from the EEPROM buffer. + */ uint8_t eeprom_buffered_read_byte(const uint32_t pos); +/** + * @brief Write a byte to the EEPROM buffer, flash is not updated. + * @param pos Address to write. + * @param value Value to write. + */ void eeprom_buffered_write_byte(uint32_t pos, uint8_t value); #endif /* ! DATA_EEPROM_BASE */ diff --git a/libraries/I3C/src/I3C.cpp b/libraries/I3C/src/I3C.cpp index cdf65061f7..315a81634f 100644 --- a/libraries/I3C/src/I3C.cpp +++ b/libraries/I3C/src/I3C.cpp @@ -47,11 +47,21 @@ static constexpr uint8_t I3C_CCC_DISEC_DIR = 0x81U; static_cast(LL_I3C_CONTROLLER_MTYPE_PRIVATE); #endif +/** + * @brief Check that an address can be used for an I3C private transfer. + * @param addr 7-bit address. + * @return true if the address is not 0 and below the reserved 0x7E address, false otherwise. + */ static bool isValidI3CTransferAddr(uint8_t addr) { return (addr != 0U) && (addr < 0x7EU); } +/** + * @brief Rebuild the BCR register value from the BCR fields reported by the HAL. + * @param bcrInfo BCR fields. + * @return BCR register value. + */ #if defined(USE_HALV2_DRIVER) static uint8_t reconstructBcr(const hal_i3c_bcr_t &bcrInfo) { @@ -84,6 +94,12 @@ static uint8_t reconstructBcr(const I3C_BCRTypeDef &bcrInfo) // HAL callback bridge // ============================================================================ +/** + * @brief HAL notification callback: forward the event to the bus instance + * owning the peripheral. + * @param hi3c HAL I3C handle. + * @param eventId HAL event identifier. + */ #if defined(USE_HALV2_DRIVER) extern "C" void HAL_I3C_NotifyCallback(hal_i3c_handle_t *hi3c, uint32_t eventId) { @@ -2885,6 +2901,9 @@ void I3CBus::unregisterInstanceOwner() #endif } +/** + * @brief I3C1 event interrupt handler. + */ extern "C" void I3C1_EV_IRQHandler(void) { #if defined(I3C1) @@ -2895,6 +2914,9 @@ extern "C" void I3C1_EV_IRQHandler(void) } #if defined(USE_HALV2_DRIVER) +/** + * @brief I3C1 error interrupt handler. + */ extern "C" void I3C1_ERR_IRQHandler(void) { #if defined(I3C1) @@ -2904,6 +2926,9 @@ extern "C" void I3C1_ERR_IRQHandler(void) #endif } #else +/** + * @brief I3C1 error interrupt handler. + */ extern "C" void I3C1_ER_IRQHandler(void) { #if defined(I3C1) @@ -2915,6 +2940,9 @@ extern "C" void I3C1_ER_IRQHandler(void) #endif #if defined(I3C2) +/** + * @brief I3C2 event interrupt handler. + */ extern "C" void I3C2_EV_IRQHandler(void) { if (g_i3c2Owner != nullptr) { @@ -2922,6 +2950,9 @@ extern "C" void I3C2_EV_IRQHandler(void) } } +/** + * @brief I3C2 error interrupt handler. + */ extern "C" void I3C2_ER_IRQHandler(void) { if (g_i3c2Owner != nullptr) { diff --git a/libraries/I3C/src/I3C.h b/libraries/I3C/src/I3C.h index a2cdd76df4..2c6b21b6f8 100644 --- a/libraries/I3C/src/I3C.h +++ b/libraries/I3C/src/I3C.h @@ -9,150 +9,301 @@ // ============================================================================ // Descriptors, configuration structures, and enums // ============================================================================ +/** @brief Number of elements of an array. */ #define COUNTOF(__BUFFER__) (sizeof(__BUFFER__) / sizeof(*(__BUFFER__))) +/** + * @brief Description of a device found on the bus by discover() or assignDynamicAddresses(). + */ struct I3CDiscoveredDevice { - uint8_t dynAddr = 0; // 7-bit dynamic address - uint8_t staticAddr = 0; // 7-bit static address if known, else 0 + /** 7-bit dynamic address. */ + uint8_t dynAddr = 0; + /** 7-bit static address if known, else 0. */ + uint8_t staticAddr = 0; + /** Bus Characteristics Register. */ uint8_t bcr = 0; + /** Device Characteristics Register. */ uint8_t dcr = 0; - uint64_t pid = 0; // 48-bit PID - uint64_t entdaaPayloadRaw = 0; // full raw 64-bit payload from HAL DAA + /** 48-bit Provisioned ID. */ + uint64_t pid = 0; + /** Full raw 64-bit payload from HAL DAA. */ + uint64_t entdaaPayloadRaw = 0; + /** true if the device address was assigned by DAA (ENTDAA). */ bool fromDaa = false; + /** true if the device address was assigned by SETDASA. */ bool assignedBySetdasa = false; + /** true if the device matches an I3CKnownDevice entry. */ bool matchedKnown = false; }; +/** + * @brief Options of the bus initialization sequence run by discover(). + */ struct I3CBusBeginConfig { + /** Send the RSTACT CCC first (whole target reset, else peripheral only). */ bool doRstact = false; + /** Reset all dynamic addresses (RSTDAA CCC). */ bool doRstdaa = true; + /** Disable all target events (DISEC CCC). */ bool disableEvents = true; + /** Assign the dynamic address of the known devices from their static + * address. */ bool doSetdasa = true; + /** Run the dynamic address assignment (ENTDAA CCC) for the unknown + * devices. */ bool doDaa = true; + /** Retry the DAA phase once if it fails. */ bool retryDaaOnce = true; + /** Enable the Hot-Join event once the sequence is done. */ bool allowHotJoinAfterInit = false; + /** First dynamic address used by DAA. */ uint8_t firstAutoDynAddr = 0x10; + /** Run DAA also when known devices were assigned. */ bool discoverUnknownAfterKnown = false; }; +/** + * @brief Description of a device expected on the bus, used by discover(). + */ struct I3CKnownDevice { - uint64_t pid = 0; // 48-bit PID in low bits if known, else 0 - uint8_t staticAddr = 0; // 7-bit static address, 0 if none - uint8_t preferredDynAddr = 0; // 7-bit preferred dynamic address, 0 = auto + /** 48-bit PID in low bits if known, else 0. */ + uint64_t pid = 0; + /** 7-bit static address, 0 if none. */ + uint8_t staticAddr = 0; + /** 7-bit preferred dynamic address, 0 = auto. */ + uint8_t preferredDynAddr = 0; + /** true if the device supports the SETAASA CCC. */ bool supportsSetaasa = false; + /** false to ignore this entry. */ bool present = true; }; +/** + * @brief Role of the I3C peripheral on the bus. + */ enum class I3CRole : uint8_t { - None, - Controller, - Target + None, /**< Not initialized. */ + Controller, /**< Bus controller. */ + Target /**< Bus target. */ }; +/** + * @brief Target mode configuration, see I3CBus::beginTarget() and I3CBus::configureTarget(). + * + * The HAL specific values use the definitions of the STM32Cube HAL I3C driver in use. + */ struct I3CTargetConfig { - uint8_t identifier = 0; // DCR - uint8_t mipiIdentifier = 0; // MIPI Instance ID (4 useful bits) + /** Device Characteristics Register (DCR). */ + uint8_t identifier = 0; + /** MIPI Instance ID (4 useful bits). */ + uint8_t mipiIdentifier = 0; + /** Enable the controller role request. */ bool ctrlRoleRequest = false; + /** Enable the Hot-Join request. */ bool hotJoinRequest = false; + /** Enable the In-Band Interrupt (IBI) request. */ bool ibiRequest = false; + /** true if the IBI carries a payload. */ bool ibiPayload = false; + /** Size of the IBI payload. */ uint32_t ibiPayloadSize = LL_I3C_PAYLOAD_EMPTY; + /** Maximum read data size in bytes. */ uint16_t maxReadDataSize = 0xFFFF; + /** Maximum write data size in bytes. */ uint16_t maxWriteDataSize = 0xFFFF; + /** true if the target is controller capable. */ bool ctrlCapability = false; + /** true if the target supports group addresses. */ bool groupAddrCapability = false; + /** Data turnaround duration. */ uint32_t dataTurnAroundDuration = HAL_I3C_TURNAROUND_TIME_TSCO_LESS_12NS; + /** Maximum read turnaround time. */ uint8_t maxReadTurnAround = 0; + /** GETMXDS CCC format. */ uint32_t maxDataSpeed = HAL_I3C_GETMXDS_FORMAT_1; + /** Activity state after the controller hand-off. */ uint32_t handOffActivityState = HAL_I3C_HANDOFF_ACTIVITY_STATE_0; + /** true if the target has a maximum data speed limitation. */ bool maxSpeedLimitation = false; + /** Enable the controller hand-off delay. */ bool handOffDelay = false; + /** Enable the pending read Mandatory Data Byte (MDB). */ bool pendingReadMDB = false; }; +/** + * @brief In-Band Interrupt (IBI) received by the controller. + */ typedef struct { + /** true if the IBI has not been read yet. */ bool pending = false; + /** HAL event identifier. */ uint32_t eventId = 0; + /** Dynamic address of the target which raised the IBI. */ uint8_t sourceDa = 0; + /** Size of the payload in bytes. */ uint8_t payloadSize = 0; + /** Raw IBI payload. */ uint32_t payloadRaw = 0; + /** Reception time in milliseconds. */ uint32_t timestampMs = 0; } I3CControllerIbiInfo; +/** + * @brief IBI callback type, see I3CBus::onIbi(). + * @param info Received IBI. + * @param user User pointer given to I3CBus::onIbi(). + */ using I3CIbiCallback = void (*)(const I3CControllerIbiInfo &info, void *user); +/** + * @brief Type of the bus. + */ enum class I3CBusType : uint8_t { - Pure, - Mixed + Pure, /**< Only I3C devices on the bus. */ + Mixed /**< I3C and legacy I2C devices on the bus. */ }; +/** + * @brief Kind of transfer used by the unified transfer functions. + */ enum class I3CTransferType : uint8_t { - I3C, // private SDR transfer using I3C dynamic address - I2C // legacy I2C transfer using static 7-bit address + I3C, /**< Private SDR transfer using I3C dynamic address. */ + I2C /**< Legacy I2C transfer using static 7-bit address. */ }; +/** + * @brief Controller mode configuration, see I3CBus::begin(). + * + * The default FIFO threshold values depend on the STM32Cube HAL I3C driver in use. + */ struct I3CControllerConfig { #if defined(USE_HALV2_DRIVER) + /** Reception FIFO threshold. */ uint32_t rxFifoThreshold = HAL_I3C_RX_FIFO_THRESHOLD_1_8; + /** Transmission FIFO threshold. */ uint32_t txFifoThreshold = HAL_I3C_TX_FIFO_THRESHOLD_1_8; + /** Control FIFO state (0: disabled). */ uint32_t controlFifo = 0U; + /** Status FIFO state (0: disabled). */ uint32_t statusFifo = 0U; #else + /** Reception FIFO threshold. */ uint32_t rxFifoThreshold = HAL_I3C_RXFIFO_THRESHOLD_1_4; + /** Transmission FIFO threshold. */ uint32_t txFifoThreshold = HAL_I3C_TXFIFO_THRESHOLD_1_4; + /** Control FIFO state. */ uint32_t controlFifo = HAL_I3C_CONTROLFIFO_DISABLE; + /** Status FIFO state. */ uint32_t statusFifo = HAL_I3C_STATUSFIFO_DISABLE; #endif + /** Own dynamic address of the controller. */ uint8_t dynamicAddr = 0U; + /** Stall time in number of clock cycles. */ uint8_t stallTime = 0x00U; + /** Allow Hot-Join requests from the targets. */ bool hotJoinAllowed = false; + /** Stall the clock after the ACK phase. */ bool ackStall = false; + /** Stall the clock after the CCC code. */ bool cccStall = false; + /** Stall the clock during the transmitted data. */ bool txStall = false; + /** Stall the clock during the received data. */ bool rxStall = false; + /** Enable the high keeper on SDA. */ bool highKeeperSDA = false; }; +/** + * @brief Reception buffer of the target events, see I3CBus::enableTargetEvents(). + */ struct I3CTargetEventConfig { - uint8_t *rxData = nullptr; - uint32_t rxSize = 0U; + uint8_t *rxData = nullptr; /**< Buffer filled with the received data. */ + uint32_t rxSize = 0U; /**< Size of the buffer in bytes. */ }; +/** + * @brief Content of an ENEC/DISEC CCC received by a target, see I3CBus::getTargetCccInfo(). + */ struct I3CTargetCccInfo { - bool hotJoinAllowed = false; - bool inBandAllowed = false; - bool ctrlRoleAllowed = false; + bool hotJoinAllowed = false; /**< Hot-Join requests are allowed. */ + bool inBandAllowed = false; /**< In-Band Interrupt requests are allowed. */ + bool ctrlRoleAllowed = false; /**< Controller role requests are allowed. */ }; // ============================================================================ // I3CBus // ============================================================================ +/** + * @brief I3C bus instance, used as controller or as target. + * + * The global I3C object is the default instance. Timeouts are in milliseconds. + * Unless specified otherwise, the transfer functions return 0 on success and a + * negative value on error (-1 if the arguments are invalid or the bus is not + * initialized in the expected role, else the opposite of the HAL error code + * when available). + * Addresses are 7-bit addresses. + */ class I3CBus { public: + /** + * @brief Create an I3C bus instance, not initialized. + */ explicit I3CBus() : _instance(nullptr) {} // ------------------------------------------------------------------------ // Controller initialization and bus configuration // ------------------------------------------------------------------------ + /** + * @brief Initialize the instance as controller using the given pins. + * @param sda SDA pin. + * @param scl SCL pin. Both pins must belong to the same I3C peripheral. + * @param freq I3C push-pull frequency in Hz. Default: 1 MHz. + * @param type Bus type: I3CBusType::Pure or I3CBusType::Mixed (with legacy I2C devices). + * @param mixedOdHz Open-drain frequency in Hz used on a mixed bus. + * Default: 1 MHz. + * @return true if the controller is initialized, false otherwise. + */ bool begin(pin_size_t sda, pin_size_t scl, uint32_t freq = 1000000U, I3CBusType type = I3CBusType::Pure, uint32_t mixedOdHz = 1000000U); + /** + * @brief Initialize the instance as controller using the default I3C_SDA + * and I3C_SCL pins. + * @param freq I3C push-pull frequency in Hz. Default: 1 MHz. + * @param type Bus type: I3CBusType::Pure or I3CBusType::Mixed (with legacy I2C devices). + * @param mixedOdHz Open-drain frequency in Hz used on a mixed bus. + * Default: 1 MHz. + * @return true if the controller is initialized, false otherwise. + */ bool begin(uint32_t freq = 1000000U, I3CBusType type = I3CBusType::Pure, uint32_t mixedOdHz = 1000000U); + /** + * @brief Initialize the instance as controller using the given pins and + * controller configuration. + * @param sda SDA pin. + * @param scl SCL pin. Both pins must belong to the same I3C peripheral. + * @param freq I3C push-pull frequency in Hz. + * @param type Bus type: I3CBusType::Pure or I3CBusType::Mixed (with legacy I2C devices). + * @param mixedOdHz Open-drain frequency in Hz used on a mixed bus. + * @param ctrlCfg Controller configuration. + * @return true if the controller is initialized, false otherwise. + */ bool begin(pin_size_t sda, pin_size_t scl, uint32_t freq, @@ -160,56 +311,160 @@ class I3CBus { uint32_t mixedOdHz, const I3CControllerConfig &ctrlCfg); + /** + * @brief Initialize the instance as controller using the default I3C_SDA + * and I3C_SCL pins and the given controller configuration. + * @param freq I3C push-pull frequency in Hz. + * @param type Bus type: I3CBusType::Pure or I3CBusType::Mixed (with legacy I2C devices). + * @param mixedOdHz Open-drain frequency in Hz used on a mixed bus. + * @param ctrlCfg Controller configuration. + * @return true if the controller is initialized, false otherwise. + */ bool begin(uint32_t freq, I3CBusType type, uint32_t mixedOdHz, const I3CControllerConfig &ctrlCfg); + /** + * @brief Change the I3C push-pull frequency. Only available in controller mode. + * @param hz New frequency in Hz. + * @return true if the new timings are applied, false otherwise. + */ bool setClock(uint32_t hz); + /** + * @brief Set the bus type. Used by the next timing computation, see begin() and setClock(). + * @param type Bus type. + */ void setBusType(I3CBusType type); + /** + * @brief Get the bus type. + * @return Bus type. + */ I3CBusType getBusType() const; + /** + * @brief Set the open-drain frequency used on a mixed bus. Used by the next timing computation. + * @param hz Open-drain frequency in Hz. + */ void setMixedBusOpenDrainFrequency(uint32_t hz); + /** + * @brief Get the open-drain frequency used on a mixed bus. + * @return Open-drain frequency in Hz. + */ uint32_t getMixedBusOpenDrainFrequency() const; + /** + * @brief Get the role of the instance. + * @return I3CRole::None if the instance is not initialized, else its role. + */ I3CRole getRole() const; + /** + * @brief Check if the instance is initialized as controller. + * @return true if the instance is a controller, false otherwise. + */ bool isController() const; + /** + * @brief Check if the instance is initialized as target. + * @return true if the instance is a target, false otherwise. + */ bool isTarget() const; + /** + * @brief Deinitialize the instance: disable the interrupts, the peripheral, + * its pins and its clock. + */ void end(); + /** + * @brief Flush all the FIFOs of the peripheral. + * @return true if the FIFOs are flushed, false otherwise. + */ bool flushAllFifos(); // ------------------------------------------------------------------------ // Default I3C controller transfers // ------------------------------------------------------------------------ + /** + * @brief Write data to an I3C target (private transfer). Controller mode only. + * @param dynAddr Dynamic address of the target. + * @param buf Data to send. + * @param len Number of bytes to send, it must not be 0. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error (-1 if the arguments are + * invalid or not in controller mode). + */ int write(uint8_t dynAddr, const uint8_t *buf, size_t len, uint32_t timeout = 1000U); + /** + * @brief Read data from an I3C target (private transfer). Controller mode only. + * @param dynAddr Dynamic address of the target. + * @param buf Buffer filled with the received data. + * @param len Number of bytes to read, it must not be 0. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error (-1 if the arguments are + * invalid or not in controller mode). + */ int read(uint8_t dynAddr, uint8_t *buf, size_t len, uint32_t timeout = 1000U); + /** + * @brief Write one register of an I3C target. Controller mode only. + * @param dynAddr Dynamic address of the target. + * @param reg Register address. + * @param value Value to write. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + */ int writeReg(uint8_t dynAddr, uint8_t reg, uint8_t value, uint32_t timeout = 1000U); + /** + * @brief Read one register of an I3C target. Controller mode only. + * @param dynAddr Dynamic address of the target. + * @param reg Register address. + * @param value Read value. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + */ int readReg(uint8_t dynAddr, uint8_t reg, uint8_t &value, uint32_t timeout = 1000U); + /** + * @brief Write several consecutive registers of an I3C target. Controller mode only. + * @param dynAddr Dynamic address of the target. + * @param reg Address of the first register. + * @param pData Data to write. + * @param len Number of bytes to write. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error (-1 if the arguments are + * invalid or not in controller mode). + */ int writeRegBuffer(uint8_t dynAddr, uint8_t reg, const uint8_t *pData, size_t len, uint32_t timeout = 1000U); + /** + * @brief Read several consecutive registers of an I3C target. Controller mode only. + * @param dynAddr Dynamic address of the target. + * @param reg Address of the first register. + * @param pData Buffer filled with the read data. + * @param len Number of bytes to read. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error (-1 if the arguments are + * invalid or not in controller mode). + */ int readRegBuffer(uint8_t dynAddr, uint8_t reg, uint8_t *pData, @@ -219,30 +474,78 @@ class I3CBus { // ------------------------------------------------------------------------ // Unified transfers with selectable transport kind // ------------------------------------------------------------------------ + /** + * @brief Write data to a target using the selected transport. + * @param addr Dynamic address (I3C) or static address (I2C) of the target. + * @param buf Data to send. + * @param len Number of bytes to send. + * @param type Transfer type: I3CTransferType::I3C or I3CTransferType::I2C. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + * @see write(uint8_t, const uint8_t *, size_t, uint32_t), i2cWrite() + */ int write(uint8_t addr, const uint8_t *buf, size_t len, I3CTransferType type, uint32_t timeout = 1000U); + /** + * @brief Read data from a target using the selected transport. + * @param addr Dynamic address (I3C) or static address (I2C) of the target. + * @param buf Buffer filled with the received data. + * @param len Number of bytes to read. + * @param type Transfer type: I3CTransferType::I3C or I3CTransferType::I2C. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + * @see read(uint8_t, uint8_t *, size_t, uint32_t), i2cRead() + */ int read(uint8_t addr, uint8_t *buf, size_t len, I3CTransferType type, uint32_t timeout = 1000U); + /** + * @brief Write one register of a target using the selected transport. + * @param addr Dynamic address (I3C) or static address (I2C) of the target. + * @param reg Register address. + * @param value Value to write. + * @param type Transfer type: I3CTransferType::I3C or I3CTransferType::I2C. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + */ int writeReg(uint8_t addr, uint8_t reg, uint8_t value, I3CTransferType type, uint32_t timeout = 1000U); + /** + * @brief Read one register of a target using the selected transport. + * @param addr Dynamic address (I3C) or static address (I2C) of the target. + * @param reg Register address. + * @param value Read value. + * @param type Transfer type: I3CTransferType::I3C or I3CTransferType::I2C. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + */ int readReg(uint8_t addr, uint8_t reg, uint8_t &value, I3CTransferType type, uint32_t timeout = 1000U); + /** + * @brief Write several consecutive registers of a target using the selected transport. + * @param addr Dynamic address (I3C) or static address (I2C) of the target. + * @param reg Address of the first register. + * @param pData Data to write. + * @param len Number of bytes to write. + * @param type Transfer type: I3CTransferType::I3C or I3CTransferType::I2C. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + */ int writeRegBuffer(uint8_t addr, uint8_t reg, const uint8_t *pData, @@ -250,6 +553,16 @@ class I3CBus { I3CTransferType type, uint32_t timeout = 1000U); + /** + * @brief Read several consecutive registers of a target using the selected transport. + * @param addr Dynamic address (I3C) or static address (I2C) of the target. + * @param reg Address of the first register. + * @param pData Buffer filled with the read data. + * @param len Number of bytes to read. + * @param type Transfer type: I3CTransferType::I3C or I3CTransferType::I2C. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + */ int readRegBuffer(uint8_t addr, uint8_t reg, uint8_t *pData, @@ -260,16 +573,46 @@ class I3CBus { // ------------------------------------------------------------------------ // Legacy I2C transfers on mixed I3C bus // ------------------------------------------------------------------------ + /** + * @brief Write data to a legacy I2C device. Controller mode and mixed bus only. + * @param staticAddr 7-bit static address of the device, from 0x08 to 0x77. + * @param buf Data to send. + * @param len Number of bytes to send, it must not be 0. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error (-1 if the arguments are + * invalid or the bus is not a mixed bus). + */ int i2cWrite(uint8_t staticAddr, const uint8_t *buf, size_t len, uint32_t timeout = 1000U); + /** + * @brief Read data from a legacy I2C device. Controller mode and mixed bus only. + * @param staticAddr 7-bit static address of the device, from 0x08 to 0x77. + * @param buf Buffer filled with the received data. + * @param len Number of bytes to read, it must not be 0. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error (-1 if the arguments are + * invalid or the bus is not a mixed bus). + */ int i2cRead(uint8_t staticAddr, uint8_t *buf, size_t len, uint32_t timeout = 1000U); + /** + * @brief Write then read data of a legacy I2C device in one transfer + * (repeated start). Controller mode and mixed bus only. + * @param staticAddr 7-bit static address of the device, from 0x08 to 0x77. + * @param txBuf Data to send. + * @param txLen Number of bytes to send, it must not be 0. + * @param rxBuf Buffer filled with the received data. + * @param rxLen Number of bytes to read, it must not be 0. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error (-1 if the arguments are + * invalid or the bus is not a mixed bus). + */ int i2cWriteRead(uint8_t staticAddr, const uint8_t *txBuf, size_t txLen, @@ -277,28 +620,79 @@ class I3CBus { size_t rxLen, uint32_t timeout = 1000U); + /** + * @brief Write one register of a legacy I2C device. Controller mode and + * mixed bus only. + * @param staticAddr 7-bit static address of the device. + * @param reg Register address. + * @param value Value to write. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + */ int i2cWriteReg(uint8_t staticAddr, uint8_t reg, uint8_t value, uint32_t timeout = 1000U); + /** + * @brief Read one register of a legacy I2C device. Controller mode and + * mixed bus only. + * @param staticAddr 7-bit static address of the device. + * @param reg Register address. + * @param value Read value. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + */ int i2cReadReg(uint8_t staticAddr, uint8_t reg, uint8_t &value, uint32_t timeout = 1000U); + /** + * @brief Write several consecutive registers of a legacy I2C device. + * Controller mode and mixed bus only. + * @param staticAddr 7-bit static address of the device. + * @param reg Address of the first register. + * @param pData Data to write. + * @param len Number of bytes to write. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + */ int i2cWriteRegBuffer(uint8_t staticAddr, uint8_t reg, const uint8_t *pData, size_t len, uint32_t timeout = 1000U); + /** + * @brief Read several consecutive registers of a legacy I2C device. + * Controller mode and mixed bus only. + * @param staticAddr 7-bit static address of the device. + * @param reg Address of the first register. + * @param pData Buffer filled with the read data. + * @param len Number of bytes to read. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + */ int i2cReadRegBuffer(uint8_t staticAddr, uint8_t reg, uint8_t *pData, size_t len, uint32_t timeout = 1000U); + /** + * @brief Scan the legacy I2C devices (0x08 to 0x77) of a mixed bus. + * Controller mode only. + * + * The addresses of the devices found are marked as used. + * @param addrs Array filled with the static addresses of the devices found. + * @param maxAddrs Size of the addrs array. + * @param foundCount Number of devices found, it can be greater than maxAddrs. + * @param trials Number of trials per address. Default: 2. + * @param timeout Timeout per trial in milliseconds. Default: 10. + * @return 0 on success, -1 if the arguments are invalid or the bus is not a + * mixed bus controller. + */ int scanI2CDevices(uint8_t *addrs, size_t maxAddrs, size_t *foundCount, @@ -308,10 +702,24 @@ class I3CBus { // ------------------------------------------------------------------------ // Device readiness checks // ------------------------------------------------------------------------ + /** + * @brief Check if a legacy I2C device acknowledges its address. + * @param staticAddr 7-bit static address of the device. + * @param trials Number of trials. Default: 3. + * @param timeout Timeout per trial in milliseconds. Default: 10. + * @return true if the device is ready, false otherwise. + */ bool isI2CDeviceReady(uint8_t staticAddr, uint32_t trials = 3U, uint32_t timeout = 10U); + /** + * @brief Check if an I3C device acknowledges its dynamic address. + * @param dynAddr Dynamic address of the device. + * @param trials Number of trials. Default: 3. + * @param timeout Timeout per trial in milliseconds. Default: 10. + * @return true if the device is ready, false otherwise. + */ bool isI3CDeviceReady(uint8_t dynAddr, uint32_t trials = 3U, uint32_t timeout = 10U); @@ -319,23 +727,93 @@ class I3CBus { // ------------------------------------------------------------------------ // CCC broadcast & direct commands // ------------------------------------------------------------------------ + /** + * @brief Reset the dynamic addresses of all the targets (RSTDAA broadcast CCC). + * @return true on success, false otherwise. + */ bool resetDynamicAddresses(); + /** + * @brief Disable events on all the targets (DISEC broadcast CCC). + * @param pCCCData Events to disable, as defined by the DISEC CCC. Can be + * NULL if length is 0. + * @param length Number of bytes of pCCCData. + * @return true on success, false otherwise. + */ bool disableEvents(const uint8_t *pCCCData, uint16_t length); + /** + * @brief Assign the static address as dynamic address on all the targets + * supporting it (SETAASA broadcast CCC). + * @return true on success, false otherwise. + */ bool assignAllStaticAsDynamic(); + /** + * @brief Assign a dynamic address to a target from its static address + * (SETDASA direct CCC). + * @param staticAddr 7-bit static address of the target. + * @param dynAddr 7-bit dynamic address to assign. + * @return true on success, false otherwise. + */ bool assignDynamicAddress(uint8_t staticAddr, uint8_t dynAddr); + /** + * @brief Get the Bus Characteristics Register of a target (GETBCR direct CCC). + * @param dynAddr Dynamic address of the target. + * @param bcr Value read, only updated on success. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return true on success, false otherwise. + */ bool getbcr(uint8_t dynAddr, uint8_t &bcr, uint32_t timeout = 1000U); + /** + * @brief Get the Device Characteristics Register of a target (GETDCR direct CCC). + * @param dynAddr Dynamic address of the target. + * @param dcr Value read, only updated on success. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return true on success, false otherwise. + */ bool getdcr(uint8_t dynAddr, uint8_t &dcr, uint32_t timeout = 1000U); + /** + * @brief Get the 48-bit Provisioned ID of a target (GETPID direct CCC). + * @param dynAddr Dynamic address of the target. + * @param pid Value read, only updated on success. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return true on success, false otherwise. + */ bool getpid(uint8_t dynAddr, uint64_t &pid, uint32_t timeout = 1000U); // ------------------------------------------------------------------------ // Discovery and dynamic address assignment // ------------------------------------------------------------------------ + /** + * @brief Assign dynamic addresses to all the targets answering the DAA + * (ENTDAA CCC). Controller mode only. + * @param devices Array filled with the dynamic address of each device found. + * @param maxDevices Size of the devices array. + * @param firstDynAddr First dynamic address to assign, the next ones are + * incremented by 2. Default: 0x10. 0 selects the default value. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return Number of devices found (>= 0), a negative value on error + * (-1 invalid arguments or HAL error, -2 devices array too small, + * -3 address assignment failed). + */ int assignDynamicAddresses(I3CDiscoveredDevice *devices, size_t maxDevices, uint8_t firstDynAddr = 0x10U, uint32_t timeout = 1000U); + /** + * @brief Run the bus initialization sequence: reset and assignment of the dynamic addresses. + * + * The sequence is selected by cfg: RSTACT, RSTDAA, DISEC, assignment of the + * known devices (SETDASA/SETAASA), DAA of the unknown devices, Hot-Join enabling. + * @param cfg Sequence options. + * @param knownDevices Devices expected on the bus. Can be NULL. + * @param numKnownDevices Number of entries of knownDevices. + * @param discovered Array filled with the devices found. + * @param maxDiscovered Size of the discovered array. + * @param outCount Number of devices stored in discovered. + * @return 0 on success, a negative value on error (-1 if the arguments are + * invalid or the bus is not initialized). + */ int discover(const I3CBusBeginConfig &cfg, const I3CKnownDevice *knownDevices, size_t numKnownDevices, @@ -343,7 +821,14 @@ class I3CBus { size_t maxDiscovered, size_t *outCount); - // Unknown I3C devices only + /** + * @brief Discover the unknown I3C devices only, using the DAA. + * @param discovered Array filled with the devices found. + * @param maxDiscovered Size of the discovered array. + * @param outCount Number of devices stored in discovered. + * @param firstDynAddr First dynamic address to assign. Default: 0x10. + * @return 0 on success, a negative value on error. + */ int discover(I3CDiscoveredDevice *discovered, size_t maxDiscovered, size_t *outCount, @@ -363,7 +848,20 @@ class I3CBus { return discover(cfg, nullptr, 0U, discovered, maxDiscovered, outCount); } - // Known devices + optional unknown discovery + /** + * @brief Assign the known devices, then optionally discover the unknown + * devices using the DAA. + * @param knownDevices Devices expected on the bus. + * @param numKnownDevices Number of entries of knownDevices. + * @param discovered Array filled with the devices found. + * @param maxDiscovered Size of the discovered array. + * @param outCount Number of devices stored in discovered. + * @param discoverUnknown true to also discover the unknown devices. + * Default: true. + * @param firstDynAddr First dynamic address assigned by the DAA. + * Default: 0x10. + * @return 0 on success, a negative value on error. + */ int discover(const I3CKnownDevice *knownDevices, size_t numKnownDevices, I3CDiscoveredDevice *discovered, @@ -389,20 +887,61 @@ class I3CBus { // ------------------------------------------------------------------------ // Target mode initialization // ------------------------------------------------------------------------ + /** + * @brief Initialize the instance as target using the given pins. + * @param sda SDA pin. + * @param scl SCL pin. Both pins must belong to the same I3C peripheral. + * @param cfg Target configuration. + * @return true if the target is initialized, false otherwise. + */ bool beginTarget(pin_size_t sda, pin_size_t scl, const I3CTargetConfig &cfg); + /** + * @brief Initialize the instance as target using the default I3C_SDA and I3C_SCL pins. + * @param cfg Target configuration. + * @return true if the target is initialized, false otherwise. + */ bool beginTarget(const I3CTargetConfig &cfg); + /** + * @brief Apply a target configuration. Target mode only. + * @param cfg Target configuration. + * @return 0 on success, a negative value on error. + */ int configureTarget(const I3CTargetConfig &cfg); + /** + * @brief Check if a dynamic address has been assigned to the target by the controller. + * @return true if the target has a dynamic address, false otherwise. + */ bool hasAddress() const; + /** + * @brief Get the dynamic address of the target. + * @return Dynamic address, 0 if none is assigned. + */ uint8_t address() const; // ------------------------------------------------------------------------ // Target-side private communication // ------------------------------------------------------------------------ + /** + * @brief Send data to the controller (private transfer). Target mode only. + * @param buf Data to send. + * @param len Number of bytes to send, it must not be 0. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error (-1 if the arguments are + * invalid or not in target mode). + */ int send(uint8_t *buf, uint16_t len, uint32_t timeout = 1000U); + /** + * @brief Receive data from the controller (private transfer). Target mode only. + * @param buf Buffer filled with the received data. + * @param len Size of the buffer in bytes, it must not be 0. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error (-1 if the arguments are + * invalid or not in target mode). + */ int receive(uint8_t *buf, uint16_t len, uint32_t timeout = 1000U); @@ -410,27 +949,88 @@ class I3CBus { // ------------------------------------------------------------------------ // Target-side non-private requests / events // ------------------------------------------------------------------------ + /** + * @brief Request an In-Band Interrupt (IBI) to the controller. Target mode only. + * @param payload IBI payload. Can be NULL if payloadSize is 0. + * @param payloadSize Size of the payload in bytes. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + */ int sendIbi(const uint8_t *payload, uint8_t payloadSize, uint32_t timeout = 1000U); + /** + * @brief Enable the notification of the target events and their interrupts. + * Target mode only. + * @param cfg Reception buffer of the events. + * @param interruptMask Mask of the events to enable, using the HAL notification definitions. + * @return 0 on success, a negative value on error. + */ int enableTargetEvents(const I3CTargetEventConfig &cfg, uint32_t interruptMask); + /** + * @brief Disable the notification of target events. Target mode only. + * + * The peripheral interrupts are disabled when no event remains enabled. + * @param interruptMask Mask of the events to disable, using the HAL notification definitions. + * @return 0 on success, a negative value on error. + */ int disableTargetEvents(uint32_t interruptMask); + /** + * @brief Enable or disable the events of a target (ENEC/DISEC direct CCC). + * Controller mode only. + * @param dynAddr Dynamic address of the target. + * @param enable true to enable the events (ENEC), false to disable them (DISEC). + * @param events Events bit mask: 0x01 In-Band Interrupt, 0x02 controller + * role request, 0x08 Hot-Join. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return true on success, false otherwise. + */ bool setEvents(uint8_t dynAddr, bool enable, uint8_t events, uint32_t timeout = 1000U); + /** + * @brief Check if a target event has been notified and not read yet. + * @return true if an event is pending, false otherwise. + */ bool hasTargetEvent() const; + /** + * @brief Read and clear the last notified target event. + * @param eventId HAL event identifier, only updated if an event is pending. + * @return true if an event was pending, false otherwise. + */ bool readTargetEvent(uint32_t &eventId); + /** + * @brief Get the content of an ENEC/DISEC CCC received by the target. + * @param eventId HAL event identifier, it must contain the ENEC/DISEC event. + * @param out CCC information, cleared if the function fails. + * @return true on success, false otherwise. + */ bool getTargetCccInfo(uint32_t eventId, I3CTargetCccInfo &out); // ------------------------------------------------------------------------ // Controller-side IBI support // ------------------------------------------------------------------------ + /** + * @brief Configure how the controller handles the requests of a target. + * Controller mode only. + * @param deviceIndex Index of the device in the controller device table, + * from 1 to 4. + * @param dynAddr Dynamic address of the target. + * @param ibiAck true to acknowledge the In-Band Interrupts of the target. + * @param ibiPayload true if the IBI of the target carries a payload. + * @param ctrlRoleReqAck true to acknowledge the controller role requests of + * the target. Default: false. + * @param stopTransfer true to stop the transfer after the IBI. + * Default: false. + * @return 0 on success, a negative value on error (-1 if the arguments are + * invalid or not in controller mode). + */ int configureControllerDevice(uint8_t deviceIndex, uint8_t dynAddr, bool ibiAck, @@ -438,26 +1038,86 @@ class I3CBus { bool ctrlRoleReqAck = false, bool stopTransfer = false); + /** + * @brief Enable the In-Band Interrupts of a target: configure the + * controller and enable the IBI event on the target. + * Controller mode only. + * @param deviceIndex Index of the device in the controller device table, + * from 1 to 4. + * @param dynAddr Dynamic address of the target. + * @param withPayload true if the IBI of the target carries a payload. + * @param stopTransfer true to stop the transfer after the IBI. + * Default: false. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return 0 on success, a negative value on error. + */ int enableIbi(uint8_t deviceIndex, uint8_t dynAddr, bool withPayload, bool stopTransfer = false, uint32_t timeout = 1000U); + /** + * @brief Enable the notification of the controller events and their + * interrupts. Controller mode only. + * @param interruptMask Mask of the events to enable. + * Default: LL_I3C_IER_IBIIE (IBI). + * @return 0 on success, a negative value on error. + */ int enableControllerEvents(uint32_t interruptMask = LL_I3C_IER_IBIIE); + /** + * @brief Disable the notification of controller events. + * Controller mode only. + * + * The peripheral interrupts are disabled when no event remains enabled. + * @param interruptMask Mask of the events to disable. + * Default: LL_I3C_IER_IBIIE (IBI). + * @return 0 on success, a negative value on error. + */ int disableControllerEvents(uint32_t interruptMask = LL_I3C_IER_IBIIE); + /** + * @brief Check if an IBI has been received and not read yet. + * @return true if an IBI is pending, false otherwise. + */ bool hasIbi() const; + /** + * @brief Read and clear the last received IBI. + * @param out Received IBI, only updated if an IBI is pending. + * @return true if an IBI was pending, false otherwise. + */ bool readIbi(I3CControllerIbiInfo &out); + /** + * @brief Read the last received IBI without clearing it. + * @param out Received IBI, only updated if an IBI is pending. + * @return true if an IBI is pending, false otherwise. + */ bool peekIbi(I3CControllerIbiInfo &out) const; + /** + * @brief Register a callback called when an IBI is received. + * @param cb Callback function, NULL to unregister. + * @param user User pointer given to the callback. Default: nullptr. + * @note The callback is called from the interrupt context. + */ void onIbi(I3CIbiCallback cb, void *user = nullptr); // ------------------------------------------------------------------------ // Internal HAL bridge // ------------------------------------------------------------------------ + /** + * @brief Handle a HAL notification. Called by the HAL callback, not + * intended to be used by the user. + * @param eventId HAL event identifier. + */ void handleHalNotify(uint32_t eventId); + /** + * @brief Get the HAL handle of the instance, to mix the Arduino API and the + * STM32Cube HAL API. + * @warning Use at your own risk. + * @return Pointer to the HAL I3C handle. + */ #if defined(USE_HALV2_DRIVER) hal_i3c_handle_t *halHandle() { @@ -474,43 +1134,123 @@ class I3CBus { // ------------------------------------------------------------------------ // Instance // ------------------------------------------------------------------------ + /** + * @brief Find the I3C peripheral matching the SDA and SCL pins. + * @return true if a peripheral is found, false otherwise. + */ bool prepareInstanceFromPins(); + /** + * @brief State of an address of the bus address map. + */ enum class I3CAddrState : uint8_t { - Free, + Free, /**< Address available. */ + /** Address reserved by the I3C specification (0x00, 0x7E and 0x7F). */ Reserved, - I2CDevice, - I3CDevice + I2CDevice, /**< Address used by a legacy I2C device. */ + I3CDevice /**< Address used by an I3C device. */ }; // ------------------------------------------------------------------------ // Low-level initialization // ------------------------------------------------------------------------ + /** + * @brief Enable the clock of the I3C peripheral. + * @return true if the clock is enabled, false otherwise. + */ bool initClocks(); + /** + * @brief Configure the SDA and SCL pins for the I3C peripheral. + * @return true if the pins are configured, false otherwise. + */ bool initGPIO(); // ------------------------------------------------------------------------ // Address map helpers // ------------------------------------------------------------------------ + /** @brief State of each of the 128 7-bit addresses of the bus. */ I3CAddrState _addrMap[128] {}; + /** + * @brief Mark all the addresses as free, except the reserved ones (0x00, 0x7E, 0x7F). + */ void initAddressMap(); + /** + * @brief Check if an address can be used as dynamic address. + * @param addr 7-bit address. + * @return true if the address is usable, false otherwise. + */ bool isValidUsableDynamicAddr(uint8_t addr) const; + /** + * @brief Check if an address is a valid legacy I2C static address (0x08 to 0x77). + * @param addr 7-bit address. + * @return true if the address is valid, false otherwise. + */ bool isValidI2CStaticAddr(uint8_t addr) const; + /** + * @brief Check if an address is free in the address map. + * @param addr 7-bit address. + * @return true if the address is free, false otherwise. + */ bool isAddrFree(uint8_t addr) const; + /** + * @brief Mark an address as used by an I3C device. + * @param addr 7-bit address. + */ void markAddrUsed(uint8_t addr); + /** + * @brief Mark an address as used by a legacy I2C device. + * @param addr 7-bit address. + */ void markI2CAddrUsed(uint8_t addr); + /** + * @brief Mark an address as free. Reserved addresses are left untouched. + * @param addr 7-bit address. + */ void markAddrFree(uint8_t addr); + /** + * @brief Find the first free usable dynamic address. + * @param start Address from which the search starts (at least 0x08). + * @return The address found, 0 if none is available. + */ uint8_t allocNextDynamicAddr(uint8_t start) const; // ------------------------------------------------------------------------ // Bus sequencing helpers // ------------------------------------------------------------------------ + /** + * @brief Disable all the events of all the targets (DISEC broadcast CCC). + * @return true on success, false otherwise. + */ bool disecAll(); + /** + * @brief Enable the Hot-Join event on all the targets (ENEC broadcast CCC). + * @return true on success, false otherwise. + */ bool enecHotJoin(); + /** + * @brief Reset the peripheral of all the targets only (RSTACT broadcast CCC). + * @return true on success, false otherwise. + */ bool rstactPeripheralOnly(); + /** + * @brief Reset the whole of all the targets (RSTACT broadcast CCC). + * @return true on success, false otherwise. + */ bool rstactWholeTarget(); + /** + * @brief Assign the dynamic address of the known devices using SETDASA, and + * record them in the address map. + * @param knownDevices Devices expected on the bus. Can be NULL. + * @param numKnownDevices Number of entries of knownDevices. + * @param discovered Array filled with the devices assigned. + * @param maxDiscovered Size of the discovered array. + * @param count Number of entries of discovered, updated. + * @param needAasa Set to true if some devices must be assigned with SETAASA. + * @param needDaa Set to true if some devices must be assigned with DAA. + * @return 0. + */ int assignKnownDevices(const I3CKnownDevice *knownDevices, size_t numKnownDevices, I3CDiscoveredDevice *discovered, @@ -519,6 +1259,17 @@ class I3CBus { bool &needAasa, bool &needDaa); + /** + * @brief Run the dynamic address assignment (ENTDAA) until no more target answers. + * @param cfg Sequence options, giving the first dynamic address. + * @param knownDevices Devices expected on the bus, used to match the PID of + * the targets. Can be NULL. + * @param numKnownDevices Number of entries of knownDevices. + * @param discovered Array filled with the devices found. + * @param maxDiscovered Size of the discovered array. + * @param count Number of entries of discovered, updated. + * @return 0 on success, a negative value on error. + */ int doDaaPhase(const I3CBusBeginConfig &cfg, const I3CKnownDevice *knownDevices, size_t numKnownDevices, @@ -526,17 +1277,42 @@ class I3CBus { size_t maxDiscovered, size_t &count); + /** + * @brief Declare the discovered devices (4 at most) in the controller device table. + * @param discovered Devices found. + * @param count Number of entries of discovered. + * @return 0 on success, -1 on error. + */ int configBusDevicesFromDiscovery(const I3CDiscoveredDevice *discovered, size_t count); // ------------------------------------------------------------------------ // Low-level CCC helpers // ------------------------------------------------------------------------ + /** + * @brief Send a broadcast CCC. + * @param cccId CCC code. + * @param data CCC data. Can be NULL if length is 0. + * @param length Number of bytes of data. + * @param withDefByte true if the first data byte is the CCC defining byte. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return true on success, false otherwise. + */ bool cccBroadcastWrite(uint8_t cccId, const uint8_t *data, uint16_t length, bool withDefByte, uint32_t timeout = 1000U); + /** + * @brief Send a direct CCC writing data to a target. + * @param targetAddr 7-bit address of the target. + * @param cccId CCC code. + * @param data CCC data. Can be NULL if length is 0. + * @param length Number of bytes of data. + * @param withDefByte true if the first data byte is the CCC defining byte. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return true on success, false otherwise. + */ bool cccDirectWrite(uint8_t targetAddr, uint8_t cccId, const uint8_t *data, @@ -544,6 +1320,15 @@ class I3CBus { bool withDefByte, uint32_t timeout = 1000U); + /** + * @brief Send a direct CCC reading data from a target. + * @param targetAddr 7-bit address of the target. + * @param cccId CCC code. + * @param rxData Buffer filled with the data read. + * @param rxLength Number of bytes to read. + * @param timeout Timeout in milliseconds. Default: 1000. + * @return true on success, false otherwise. + */ bool cccDirectRead(uint8_t targetAddr, uint8_t cccId, uint8_t *rxData, @@ -553,74 +1338,162 @@ class I3CBus { // ------------------------------------------------------------------------ // Internal utility helpers // ------------------------------------------------------------------------ + /** + * @brief Swap the byte order of a 32-bit value. + * @param x Value to convert. + * @return Value with the byte order swapped. + */ static uint32_t bigToLittle32(uint32_t x); + /** + * @brief Extract the 48-bit PID from the 64-bit payload received during the DAA. + * @param payload Raw ENTDAA payload. + * @return 48-bit PID. + */ static uint64_t extractPid48FromEntdaaPayload(uint64_t payload); #if defined(USE_HALV2_DRIVER) + /** + * @brief Convert a HAL status to the result code of the transfer functions. + * @param hi3c HAL handle. + * @param st HAL status. + * @return 0 if st is HAL_OK, else the opposite of the last HAL error code + * (-1 if not available). + */ static int HAL_I3C_GetError(const hal_i3c_handle_t &hi3c, hal_status_t st = HAL_OK); #endif // ------------------------------------------------------------------------ // Clock helpers // ------------------------------------------------------------------------ + /** + * @brief Get the kernel clock frequency of the I3C peripheral. + * @return Frequency in Hz, 0 if not available. + */ uint32_t getPeripheralClockFreq() const; #if defined(USE_HALV2_DRIVER) + /** + * @brief Compute the controller bus timing registers. + * @param srcFreq Kernel clock frequency in Hz. + * @param freq I3C push-pull frequency in Hz, 0 selects 1 MHz. + * @param busType Bus type. + * @param mixedBusOdFreq Open-drain frequency in Hz used on a mixed bus. + * @param outCtrl Controller configuration filled with the timing. + * @return true on success, false otherwise. + */ bool buildControllerTiming(uint32_t srcFreq, uint32_t freq, I3CBusType busType, uint32_t mixedBusOdFreq, hal_i3c_ctrl_config_t &outCtrl) ; + /** + * @brief Compute the target bus timing. + * @param srcFreq Kernel clock frequency in Hz. + * @param outTgt Target configuration filled with the timing. + * @return true on success, false otherwise. + */ bool buildTargetTiming(uint32_t srcFreq, hal_i3c_tgt_config_t &outTgt) ; #else + /** + * @brief Compute the controller bus timing, using the bus type and the + * open-drain frequency of the instance. + * @param freq I3C push-pull frequency in Hz, 0 selects 1 MHz. + * @param outCtrl Controller bus configuration filled with the timing. + * @return true on success, false otherwise. + */ bool buildControllerTiming(uint32_t freq, LL_I3C_CtrlBusConfTypeDef &outCtrl) const; + /** + * @brief Compute the target bus timing. + * @param outTgt Target bus configuration filled with the timing. + * @return true on success, false otherwise. + */ bool buildTargetTiming(LL_I3C_TgtBusConfTypeDef &outTgt) const; #endif // ------------------------------------------------------------------------ // Irq helpers // ------------------------------------------------------------------------ + /** + * @brief Enable the NVIC interrupts of the peripheral, if not already enabled. + */ void enableIRQs(); + /** + * @brief Disable the NVIC interrupts of the peripheral, if enabled. + */ void disableIRQs(); + /** + * @brief Register this instance as the owner of its peripheral, to dispatch + * the HAL callbacks and interrupts. + */ void registerInstanceOwner(); + /** + * @brief Unregister this instance as the owner of its peripheral. + */ void unregisterInstanceOwner(); + /** + * @brief Reset and disable the clock of the I3C peripheral. + */ void deinitClocks(); + /** + * @brief Set the SDA and SCL pins in analog mode. + */ void deinitGPIO(); // ------------------------------------------------------------------------ // Internal state // ------------------------------------------------------------------------ + /** @brief Controller configuration given to begin(). */ I3CControllerConfig _ctrlCfg{}; + /** @brief Role of the instance. */ I3CRole _role = I3CRole::None; + /** @brief true if an IBI has been received and not read yet. */ volatile bool _ibiPending = false; + /** @brief Last received IBI. */ I3CControllerIbiInfo _lastIbi{}; + /** @brief Callback called when an IBI is received. */ I3CIbiCallback _ibiCb = nullptr; + /** @brief User pointer given to the IBI callback. */ void *_ibiCbUser = nullptr; + /** @brief true if a target event has been notified and not read yet. */ volatile bool _targetEventPending = false; + /** @brief Last notified target event identifier. */ volatile uint32_t _lastTargetEventId = 0U; + /** @brief HAL handle of the peripheral. */ #if defined(USE_HALV2_DRIVER) hal_i3c_handle_t _hi3c {}; #else I3C_HandleTypeDef _hi3c {}; #endif + /** @brief true once the instance is initialized as controller or target. */ bool _initialized = false; + /** @brief I3C peripheral used by the instance. */ I3C_TypeDef *_instance = nullptr; + /** @brief Bus type. */ I3CBusType _busType = I3CBusType::Pure; + /** @brief Open-drain frequency in Hz used on a mixed bus. */ uint32_t _mixedBusOdFreq = 1000000U; + /** @brief true if the NVIC interrupts of the peripheral are enabled. */ bool _irqEnabled = false; + /** + * @brief Maximum number of control words of a transfer (not used by the + * current implementation). + */ static constexpr uint32_t I3C_CTRL_WORDS_MAX = 2U; + /** @brief Size of the scratch buffer used to send the CCC data. */ static constexpr uint32_t I3C_CCC_TX_SCRATCH_MAX = 16U; + /** @brief SDA pin. */ PinName _sdaPin = digitalPinToPinName(I3C_SDA); + /** @brief SCL pin. */ PinName _sclPin = digitalPinToPinName(I3C_SCL); }; @@ -628,6 +1501,7 @@ class I3CBus { // Global instances // ============================================================================ +/** @brief Default I3C instance. */ extern I3CBus I3C; #endif diff --git a/libraries/IWatchdog/src/IWatchdog.cpp b/libraries/IWatchdog/src/IWatchdog.cpp index af2ede57b1..867cd97c4f 100644 --- a/libraries/IWatchdog/src/IWatchdog.cpp +++ b/libraries/IWatchdog/src/IWatchdog.cpp @@ -31,13 +31,6 @@ IWatchdogClass::IWatchdogClass() #endif } -/** - * @brief Enable IWDG, must be called once - * @param timeout: value in microseconds - * @param window: optional value in microseconds - * Default: IWDG_TIMEOUT_MAX - * @retval None - */ void IWatchdogClass::begin(uint32_t timeout, uint32_t window) { if (!IS_IWDG_TIMEOUT(timeout)) { @@ -64,13 +57,6 @@ void IWatchdogClass::begin(uint32_t timeout, uint32_t window) set(timeout, window); } -/** - * @brief Set the timeout and window values - * @param timeout: value in microseconds - * @param window: optional value in microseconds - * Default: IWDG_TIMEOUT_MAX - * @retval None - */ void IWatchdogClass::set(uint32_t timeout, uint32_t window) { if ((isEnabled()) && (!IS_IWDG_TIMEOUT(timeout))) { @@ -139,12 +125,6 @@ void IWatchdogClass::set(uint32_t timeout, uint32_t window) LL_IWDG_ReloadCounter(IWDG); } -/** - * @brief Get the current timeout and window values - * @param timeout: pointer to the get the value in microseconds - * @param window: optional pointer to the get the value in microseconds - * @retval None - */ void IWatchdogClass::get(uint32_t *timeout, uint32_t *window) { if (timeout != NULL) { @@ -172,22 +152,14 @@ void IWatchdogClass::get(uint32_t *timeout, uint32_t *window) } } -/** - * @brief Reload the counter value with IWDG_RLR (IWDG_KR = 0x0000 AAAA) - * @retval None - */ void IWatchdogClass::reload(void) { if (isEnabled()) { + // Reload the counter with IWDG_RLR (IWDG_KR = 0x0000 AAAA) LL_IWDG_ReloadCounter(IWDG); } } -/** - * @brief Check if the system has resumed from IWDG reset - * @param clear: if true clear IWDG reset flag. Default false - * @retval return reset flag status - */ bool IWatchdogClass::isReset(bool clear) { #if defined(IWDG1) @@ -205,10 +177,6 @@ bool IWatchdogClass::isReset(bool clear) return status; } -/** - * @brief Clear IWDG reset flag - * @retval None - */ void IWatchdogClass::clearReset(void) { #if defined(USE_HALV2_DRIVER) diff --git a/libraries/IWatchdog/src/IWatchdog.h b/libraries/IWatchdog/src/IWatchdog.h index 44816e6f1e..0a225cc312 100644 --- a/libraries/IWatchdog/src/IWatchdog.h +++ b/libraries/IWatchdog/src/IWatchdog.h @@ -26,32 +26,80 @@ #define IWDG IWDG1 #endif -// Minimal timeout in microseconds +/** @brief Minimal timeout in microseconds. */ #define IWDG_TIMEOUT_MIN ((4*1000000)/LSI_VALUE) -// Maximal timeout in microseconds +/** @brief Maximal timeout in microseconds. */ #define IWDG_TIMEOUT_MAX (((256*1000000)/LSI_VALUE)*IWDG_RLR_RL) +/** + * @brief Check that a timeout in microseconds is between IWDG_TIMEOUT_MIN and IWDG_TIMEOUT_MAX. + * @param X Timeout in microseconds. + */ #define IS_IWDG_TIMEOUT(X) (((X) >= IWDG_TIMEOUT_MIN) &&\ ((X) <= IWDG_TIMEOUT_MAX)) +/** + * @brief Independent watchdog (IWDG) controller, exposed as the global IWatchdog object. + */ class IWatchdogClass { public: + /** + * @brief Construct the controller and enable the watchdog peripheral clock when required. + */ IWatchdogClass(); + /** + * @brief Enable the IWDG. Must be called only once. + * + * Once enabled, the watchdog cannot be stopped. + * @param timeout Timeout in microseconds. Ignored if it is not valid (see IS_IWDG_TIMEOUT()). + * @param window Optional window in microseconds. Default: IWDG_TIMEOUT_MAX. + */ void begin(uint32_t timeout, uint32_t window = IWDG_TIMEOUT_MAX); + /** + * @brief Set the timeout and window values of the watchdog and refresh its counter. + * @param timeout Timeout in microseconds. Ignored if the watchdog is + * enabled and the value is not valid. + * @param window Optional window in microseconds. Default: IWDG_TIMEOUT_MAX. + */ void set(uint32_t timeout, uint32_t window = IWDG_TIMEOUT_MAX); + /** + * @brief Get the current timeout and window values of the watchdog. + * @param timeout Pointer where the timeout in microseconds is stored. + * Nothing is done if NULL. + * @param window Optional pointer where the window in microseconds is + * stored. Default: NULL. + */ void get(uint32_t *timeout, uint32_t *window = NULL); + /** + * @brief Reload the counter to prevent a watchdog reset. + * Does nothing if the watchdog is not enabled. + */ void reload(void); + /** + * @brief Check whether the watchdog has been enabled with begin(). + * @return true if the watchdog is enabled, false otherwise. + */ bool isEnabled(void) { return _enabled; }; + /** + * @brief Check if the system has resumed from an IWDG reset. + * @param clear If true, clear the IWDG reset flag after reading it. Default: false. + * @return true if the last reset was caused by the IWDG, false otherwise. + */ bool isReset(bool clear = false); + /** + * @brief Clear the IWDG reset flag. + */ void clearReset(void); private: + /** @brief true once the watchdog has been enabled with begin(). */ static bool _enabled; }; +/** @brief Global IWDG instance. */ extern IWatchdogClass IWatchdog; #endif /* __IWATCHDOG_H__ */ diff --git a/libraries/Keyboard/src/Keyboard.cpp b/libraries/Keyboard/src/Keyboard.cpp index 9074f0f6db..c39d159b71 100644 --- a/libraries/Keyboard/src/Keyboard.cpp +++ b/libraries/Keyboard/src/Keyboard.cpp @@ -54,6 +54,8 @@ void Keyboard_::sendReport(KeyReport *keys) delay(20); } +// ASCII to HID usage code map, indexed by the ASCII code. +// The SHIFT flag is set when the shift modifier is needed to get the character. extern const uint8_t _asciimap[128] PROGMEM; diff --git a/libraries/Keyboard/src/Keyboard.h b/libraries/Keyboard/src/Keyboard.h index 9e0751dcd2..fafa50c61b 100644 --- a/libraries/Keyboard/src/Keyboard.h +++ b/libraries/Keyboard/src/Keyboard.h @@ -34,6 +34,12 @@ //================================================================================ // Keyboard +/** + * @name Modifier keys + * @brief Key codes of the modifier keys, usable with Keyboard.press(), + * Keyboard.release() and Keyboard.write(). + * @{ + */ #define KEY_LEFT_CTRL 0x80 #define KEY_LEFT_SHIFT 0x81 #define KEY_LEFT_ALT 0x82 @@ -42,6 +48,14 @@ #define KEY_RIGHT_SHIFT 0x85 #define KEY_RIGHT_ALT 0x86 #define KEY_RIGHT_GUI 0x87 +/** @} */ + +/** + * @name Non-printing keys + * @brief Key codes of the non-printing keys, usable with Keyboard.press(), + * Keyboard.release() and Keyboard.write(). + * @{ + */ #define KEY_UP_ARROW 0xDA #define KEY_DOWN_ARROW 0xD9 @@ -82,27 +96,77 @@ #define KEY_F22 0xF9 #define KEY_F23 0xFA #define KEY_F24 0xFB // Keyboard F24 +/** @} */ -// Low level key report: up to 6 keys and shift, ctrl etc at once +/** + * @brief Low level key report: up to 6 keys and shift, ctrl etc at once. + */ typedef struct { - uint8_t modifiers; - uint8_t reserved; + uint8_t modifiers; /**< Bit mask of the pressed modifier keys. */ + uint8_t reserved; /**< Reserved, always 0. */ + /** HID usage codes of the pressed keys, 0 for an empty slot. */ uint8_t keys[6]; } KeyReport; +/** + * @brief USB HID keyboard, used through the global Keyboard object. + * + * Requires the 'HID' USB interface selected in the 'Tools->USB interface' menu. + */ class Keyboard_ : public Print { private: KeyReport _keyReport; + /** + * @brief Send a key report to the host. + * @param keys Key report to send. + */ void sendReport(KeyReport *keys); public: + /** + * @brief Create the keyboard instance, not started. + */ Keyboard_(void); + /** + * @brief Start the USB HID keyboard interface. + */ void begin(void); + /** + * @brief Stop the USB HID keyboard interface. + */ void end(void); + /** + * @brief Press then release a key: send a key stroke. + * @param k ASCII character, modifier or non-printing key code (KEY_xxx). + * @return 1 if the key was pressed, 0 otherwise (e.g. unsupported character). + */ size_t write(uint8_t k); + /** + * @brief Add a key (printing, non-printing or modifier) to the persistent + * key report and send the report. + * + * Because of the way USB HID works, the host acts like the key remains + * pressed until release(), releaseAll() or write() is called. + * Up to 6 keys can be pressed at the same time. + * @param k ASCII character, modifier or non-printing key code (KEY_xxx). + * @return 1 if the key was added to the report, 0 otherwise (unsupported + * character or no free slot). + */ size_t press(uint8_t k); + /** + * @brief Remove a key from the persistent key report and send the report. + * + * This tells the host the key is no longer pressed and that it shouldn't be + * repeated any more. + * @param k ASCII character, modifier or non-printing key code (KEY_xxx). + * @return 1 if the report was sent, 0 if the character is not supported. + */ size_t release(uint8_t k); + /** + * @brief Release all the pressed keys and modifiers and send the report. + */ void releaseAll(void); }; +/** @brief Global keyboard instance. */ extern Keyboard_ Keyboard; #endif diff --git a/libraries/Mouse/src/Mouse.h b/libraries/Mouse/src/Mouse.h index 377efb0998..c76f5adb7a 100644 --- a/libraries/Mouse/src/Mouse.h +++ b/libraries/Mouse/src/Mouse.h @@ -34,25 +34,75 @@ //================================================================================ // Mouse +/** @brief Left mouse button. */ #define MOUSE_LEFT 1 +/** @brief Right mouse button. */ #define MOUSE_RIGHT 2 +/** @brief Middle mouse button. */ #define MOUSE_MIDDLE 4 +/** @brief All the mouse buttons. */ #define MOUSE_ALL (MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE) +/** + * @brief USB HID mouse, used through the global Mouse object. + * + * Requires the 'HID' USB interface selected in the 'Tools->USB interface' menu. + */ class Mouse_ { private: uint8_t _buttons; + /** + * @brief Set the pressed buttons and send a report if the state changed. + * @param b Bit mask of the pressed buttons. + */ void buttons(uint8_t b); public: + /** + * @brief Create the mouse instance, not started. + */ Mouse_(void); + /** + * @brief Start the USB HID mouse interface. + */ void begin(void); + /** + * @brief Stop the USB HID mouse interface. + */ void end(void); + /** + * @brief Click a button: press then release it. + * @param b Button(s) to click: MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE or a + * combination. Default: MOUSE_LEFT. + */ void click(uint8_t b = MOUSE_LEFT); + /** + * @brief Move the cursor and/or the scroll wheel, with the current button state. + * @param x Relative movement on the horizontal axis. + * @param y Relative movement on the vertical axis. + * @param wheel Relative scroll wheel movement. Default: 0. + */ void move(signed char x, signed char y, signed char wheel = 0); - void press(uint8_t b = MOUSE_LEFT); // press LEFT by default - void release(uint8_t b = MOUSE_LEFT); // release LEFT by default - bool isPressed(uint8_t b = MOUSE_LEFT); // check LEFT by default + /** + * @brief Press a button and keep it pressed until release() is called. + * @param b Button(s) to press: MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE or a + * combination. Default: MOUSE_LEFT. + */ + void press(uint8_t b = MOUSE_LEFT); + /** + * @brief Release a pressed button. + * @param b Button(s) to release: MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE or a + * combination. Default: MOUSE_LEFT. + */ + void release(uint8_t b = MOUSE_LEFT); + /** + * @brief Check if a button is pressed. + * @param b Button(s) to check: MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE or a + * combination. Default: MOUSE_LEFT. + * @return true if at least one of the buttons is pressed, false otherwise. + */ + bool isPressed(uint8_t b = MOUSE_LEFT); }; +/** @brief Global mouse instance. */ extern Mouse_ Mouse; #endif diff --git a/libraries/RGB_LED_TLC59731/src/RGB_LED_TLC59731.cpp b/libraries/RGB_LED_TLC59731/src/RGB_LED_TLC59731.cpp index 9431a2a74b..5936c5b660 100644 --- a/libraries/RGB_LED_TLC59731/src/RGB_LED_TLC59731.cpp +++ b/libraries/RGB_LED_TLC59731/src/RGB_LED_TLC59731.cpp @@ -26,23 +26,11 @@ uint8_t RGB_LED_TLC59731::CYAN[3] = {0, DEFAULT_BRIGHTNESS, uint8_t RGB_LED_TLC59731::YELLOW[3] = {DEFAULT_BRIGHTNESS, DEFAULT_BRIGHTNESS, 0 }; uint8_t RGB_LED_TLC59731::WHITE[3] = {DEFAULT_BRIGHTNESS, DEFAULT_BRIGHTNESS, DEFAULT_BRIGHTNESS}; -/** - * @brief Set RGB LED color - * @param rgb[3]: red,green, blue value in range [0-255] - * @retval None - */ void RGB_LED_TLC59731::on(uint8_t rgb[3]) { on(rgb[0], rgb[1], rgb[2]); } -/** - * @brief Set RGB LED color - * @param red: red value in range [0-255] - * @param green: green value in range [0-255] - * @param blue: blue value in range [0-255] - * @retval None - */ void RGB_LED_TLC59731::on(uint8_t red, uint8_t green, uint8_t blue) { if (!_enabled) { @@ -60,20 +48,15 @@ void RGB_LED_TLC59731::on(uint8_t red, uint8_t green, uint8_t blue) digitalWriteFast(_rgb_pin, LOW); delayMicroseconds(_T_Cycle0); /* Write command */ - senByte(WRITE_COMMAND); + sendByte(WRITE_COMMAND); /* Write the GS data */ - senByte(red); - senByte(green); - senByte(blue); + sendByte(red); + sendByte(green); + sendByte(blue); /* GS Latch */ delayMicroseconds(_T_GS_Lat); } -/** - * @brief Set RGB LED Off - * @param None - * @retval None - */ void RGB_LED_TLC59731::off(void) { /* Set RGB LED off value */ @@ -87,11 +70,6 @@ void RGB_LED_TLC59731::off(void) } } -/** - * @brief Set brightness value - * @param value: new brightness value - * @retval None - */ void RGB_LED_TLC59731::setBrightness(uint8_t value) { RGB_LED_TLC59731::brightness = value; @@ -129,7 +107,7 @@ void RGB_LED_TLC59731::sendBit(uint8_t bit) } -void RGB_LED_TLC59731::senByte(uint8_t byte) +void RGB_LED_TLC59731::sendByte(uint8_t byte) { sendBit(byte & (1 << 7)); sendBit(byte & (1 << 6)); diff --git a/libraries/RGB_LED_TLC59731/src/RGB_LED_TLC59731.h b/libraries/RGB_LED_TLC59731/src/RGB_LED_TLC59731.h index 44d3bde619..6c773d2c46 100644 --- a/libraries/RGB_LED_TLC59731/src/RGB_LED_TLC59731.h +++ b/libraries/RGB_LED_TLC59731/src/RGB_LED_TLC59731.h @@ -20,28 +20,74 @@ #warning "LED_BUILTIN is not defined." #endif +/** + * @brief Driver for an RGB LED controlled by a TLC59731 driver through a + * single wire interface. + */ class RGB_LED_TLC59731 { public: + /** + * @brief Construct the driver and select the pins used to drive the LED. + * @param rgb_pin Pin connected to the TLC59731 data input. Default: LED_BUILTIN. + * @param enable_pin Pin connected to the TLC59731 enable line, NC if not + * used. Default: NC. + */ RGB_LED_TLC59731(pin_size_t rgb_pin = LED_BUILTIN, pin_size_t enable_pin = NC): _rgb_pin(digitalPinToPinName(rgb_pin)), _enable_pin(digitalPinToPinName(enable_pin)) {}; + /** + * @brief Set the RGB LED color. + * + * The pins are configured on the first call. + * @param rgb Array of red, green and blue values in range [0-255]. + */ void on(uint8_t rgb[3]); + /** + * @brief Set the RGB LED color. + * @param red Red value in range [0-255]. + * @param green Green value in range [0-255]. + * @param blue Blue value in range [0-255]. + */ void on(uint8_t red, uint8_t green, uint8_t blue); + /** + * @brief Turn the RGB LED off and release its pins. + */ void off(void); + /** + * @brief Get the current brightness value. + * @return Brightness value. + */ inline uint8_t getBrightness(void) { return brightness; } + /** + * @brief Set the brightness value, applied to the predefined colors. + * + * The LED is not updated until on() is called with a predefined color. + * @param value New brightness value in range [0-255]. + */ void setBrightness(uint8_t value); + /** + * @brief Current brightness value, used by the predefined colors. + */ static uint8_t brightness; + /** @brief Predefined color: off (no light). */ static uint8_t OFF[3]; + /** @brief Predefined color: red. */ static uint8_t RED[3]; + /** @brief Predefined color: green. */ static uint8_t GREEN[3]; + /** @brief Predefined color: blue. */ static uint8_t BLUE[3]; + /** @brief Predefined color: magenta. */ static uint8_t MAGENTA[3]; + /** @brief Predefined color: cyan. */ static uint8_t CYAN[3]; + /** @brief Predefined color: yellow. */ static uint8_t YELLOW[3]; + /** @brief Predefined color: white. */ static uint8_t WHITE[3]; private: @@ -55,8 +101,16 @@ class RGB_LED_TLC59731 { // GS Data Latch (GSLAT) Sequence delay const uint32_t _T_GS_Lat{_T_Cycle0 * 8}; + /** + * @brief Send one bit to the TLC59731 using its pulse width timing. + * @param bit Bit value to send (0 or 1). + */ void sendBit(uint8_t bit); - void senByte(uint8_t byte); + /** + * @brief Send one byte to the TLC59731, most significant bit first. + * @param byte Byte value to send. + */ + void sendByte(uint8_t byte); }; #endif /* __RGB_LED_TLC59731_H__ */ diff --git a/libraries/SPI/src/SPI.cpp b/libraries/SPI/src/SPI.cpp index 6515471f57..4bf4fe320a 100644 --- a/libraries/SPI/src/SPI.cpp +++ b/libraries/SPI/src/SPI.cpp @@ -13,28 +13,6 @@ SPIClass SPI; -/** - * @brief Default Constructor. Uses pin configuration of default SPI - * defined in the variant*.h. - * To create another SPI instance attached to another SPI - * peripheral gave the pins as parameters to the constructor. - * @note All pins must be attached to the same SPI peripheral. - * See datasheet of the microcontroller. - * @param mosi: SPI mosi pin. Accepted format: number or Arduino format (Dx) - * or ST format (Pxy). Default is MOSI pin of the default SPI peripheral. - * @param miso: SPI miso pin. Accepted format: number or Arduino format (Dx) - * or ST format (Pxy). Default is MISO pin of the default SPI peripheral. - * @param sclk: SPI clock pin. Accepted format: number or Arduino format (Dx) - * or ST format (Pxy). Default is SCK pin of the default SPI peripheral. - * @param ssel: SPI ssel pin (optional). Accepted format: number or - * Arduino format (Dx) or ST format (Pxy). By default is set to NC. - * This pin must correspond to a hardware CS pin which can be managed - * by the SPI peripheral itself. See the datasheet of the microcontroller - * or look at PinMap_SPI_SSEL[] inside the file PeripheralPins.c - * corresponding to the board. If you configure this pin you can't use - * another CS pin and don't pass a CS pin as parameter to any functions - * of the class. - */ SPIClass::SPIClass(pin_size_t mosi, pin_size_t miso, pin_size_t sclk, pin_size_t ssel) { memset((void *)&_spi, 0, sizeof(_spi)); @@ -44,10 +22,6 @@ SPIClass::SPIClass(pin_size_t mosi, pin_size_t miso, pin_size_t sclk, pin_size_t _spi.pin_ssel = digitalPinToPinName(ssel); } -/** - * @brief Initialize the SPI instance. - * @param busMode: bus mode (optional), controller or peripheral. Default is master. - */ void SPIClass::begin(SPIBusMode busMode) { #if !defined(USE_HALV2_DRIVER) @@ -59,11 +33,6 @@ void SPIClass::begin(SPIBusMode busMode) _spiSettings.getBitOrder(), (spi_busmode_e)_spiSettings.getBusMode()); } -/** - * @brief This function should be used to configure the SPI instance in case you - * don't use the default parameters set by the begin() function. - * @param settings: SPI settings(clock speed, bit order, data mode, bus mode). - */ void SPIClass::beginTransaction(SPISettings settings) { if (_spiSettings != settings) { @@ -73,46 +42,22 @@ void SPIClass::beginTransaction(SPISettings settings) } } -/** - * @brief End the transaction after beginTransaction usage - */ void SPIClass::endTransaction(void) { } -/** - * @brief Deinitialize the SPI instance and stop it. - */ void SPIClass::end(void) { spi_deinit(&_spi); } -/** - * @brief Transfer one byte on the SPI bus. - * begin() or beginTransaction() must be called at least once before. - * @param data: byte to send. - * @param skipReceive: skip receiving data after transmit or not. - * SPI_TRANSMITRECEIVE or SPI_TRANSMITONLY. - * Optional, default: SPI_TRANSMITRECEIVE. - * @return byte received from the slave. - */ uint8_t SPIClass::transfer(uint8_t data, bool skipReceive) { spi_transfer(&_spi, &data, (!skipReceive) ? &data : NULL, sizeof(uint8_t)); return data; } -/** - * @brief Transfer two bytes on the SPI bus in 16 bits format. - * begin() or beginTransaction() must be called at least once before. - * @param data: bytes to send. - * @param skipReceive: skip receiving data after transmit or not. - * SPI_TRANSMITRECEIVE or SPI_TRANSMITONLY. - * Optional, default: SPI_TRANSMITRECEIVE. - * @return bytes received from the slave in 16 bits format. - */ uint16_t SPIClass::transfer16(uint16_t data, bool skipReceive) { uint16_t tmp; @@ -131,66 +76,33 @@ uint16_t SPIClass::transfer16(uint16_t data, bool skipReceive) return data; } -/** - * @brief Transfer several bytes. Only one buffer used to send and receive data. - * begin() or beginTransaction() must be called at least once before. - * @param buf: pointer to the bytes to send. The bytes received are copy in - * this buffer. - * @param count: number of bytes to send/receive. - * @param skipReceive: skip receiving data after transmit or not. - * SPI_TRANSMITRECEIVE or SPI_TRANSMITONLY. - * Optional, default: SPI_TRANSMITRECEIVE. - */ void SPIClass::transfer(void *buf, size_t count, bool skipReceive) { spi_transfer(&_spi, (uint8_t *)buf, (!skipReceive) ? (uint8_t *)buf : NULL, count); } -/** - * @brief Transfer several bytes. One constant buffer used to send and - * one to receive data. - * begin() or beginTransaction() must be called at least once before. - * @param tx_buf: array of Tx bytes that is filled by the user before starting - * the SPI transfer. If NULL, default dummy 0xFF bytes will be - * clocked out. - * @param rx_buf: array of Rx bytes that will be filled by the slave during - * the SPI transfer. If NULL, the received data will be discarded. - * @param count: number of bytes to send/receive. - */ void SPIClass::transfer(const void *tx_buf, void *rx_buf, size_t count) { spi_transfer(&_spi, ((const uint8_t *)tx_buf), ((uint8_t *)rx_buf), count); } -/** - * @brief Not implemented. - */ void SPIClass::usingInterrupt(int interruptNumber) { (void)interruptNumber; } -/** - * @brief Not implemented. - */ void SPIClass::notUsingInterrupt(int interruptNumber) { (void)interruptNumber; } -/** - * @brief Not implemented. - */ void SPIClass::attachInterrupt(void) { // Should be enableInterrupt() } -/** - * @brief Not implemented. - */ void SPIClass::detachInterrupt(void) { // Should be disableInterrupt() diff --git a/libraries/SPI/src/SPI.h b/libraries/SPI/src/SPI.h index 2f04e65196..6e089c1f8e 100644 --- a/libraries/SPI/src/SPI.h +++ b/libraries/SPI/src/SPI.h @@ -19,94 +19,243 @@ extern "C" { #include "utility/spi_com.h" } +/** @brief Value of the skipReceive parameter: transmit and receive data. */ #define SPI_TRANSMITRECEIVE false +/** + * @brief Value of the skipReceive parameter: transmit only, received data is skipped. + */ #define SPI_TRANSMITONLY true using namespace arduino; +/** + * @brief SPI controller or peripheral instance. The default instance is SPI. + */ class SPIClass : public HardwareSPI { public: + /** + * @brief Construct an SPI instance using the given pins. + * + * Default values are the pins of the default SPI peripheral defined in the + * variant. + * All pins must be attached to the same SPI peripheral, see the datasheet + * of the microcontroller. + * @param mosi SPI MOSI pin. Accepted format: number, Arduino format (Dx) or + * ST format (Pxy). + * @param miso SPI MISO pin. Accepted format: number, Arduino format (Dx) or + * ST format (Pxy). + * @param sclk SPI clock pin. Accepted format: number, Arduino format (Dx) + * or ST format (Pxy). + * @param ssel Optional SPI SSEL pin, must be a hardware CS pin managed by + * the SPI peripheral itself (see PinMap_SPI_SSEL[] in the + * PeripheralPins.c file of the board and the datasheet of the + * microcontroller). If set, no other CS pin can be used and no CS + * pin must be passed to any function of the class. + * Default: not defined (no hardware SSEL). + * @note To create another SPI instance attached to another SPI peripheral, + * give its pins as parameters. + */ SPIClass(pin_size_t mosi = MOSI, pin_size_t miso = MISO, pin_size_t sclk = SCK, pin_size_t ssel = PNUM_NOT_DEFINED); // setMISO/MOSI/SCLK/SSEL have to be called before begin() + /** + * @brief Set the MISO pin. Must be called before begin(). + * @param miso MISO pin. Accepted format: number, Arduino format (Dx) or ST format (Pxy). + */ void setMISO(pin_size_t miso) { _spi.pin_miso = digitalPinToPinName(miso); }; + /** + * @brief Set the MOSI pin. Must be called before begin(). + * @param mosi MOSI pin. Accepted format: number, Arduino format (Dx) or ST format (Pxy). + */ void setMOSI(pin_size_t mosi) { _spi.pin_mosi = digitalPinToPinName(mosi); }; + /** + * @brief Set the SCLK pin. Must be called before begin(). + * @param sclk SCLK pin. Accepted format: number, Arduino format (Dx) or ST format (Pxy). + */ void setSCLK(pin_size_t sclk) { _spi.pin_sclk = digitalPinToPinName(sclk); }; + /** + * @brief Set the SSEL pin. Must be called before begin(). + * @param ssel SSEL pin. Accepted format: number, Arduino format (Dx) or ST format (Pxy). + */ void setSSEL(pin_size_t ssel) { _spi.pin_ssel = digitalPinToPinName(ssel); }; + /** + * @brief Set the MISO pin. Must be called before begin(). + * @param miso MISO PinName. + */ void setMISO(PinName miso) { _spi.pin_miso = (miso); }; + /** + * @brief Set the MOSI pin. Must be called before begin(). + * @param mosi MOSI PinName. + */ void setMOSI(PinName mosi) { _spi.pin_mosi = (mosi); }; + /** + * @brief Set the SCLK pin. Must be called before begin(). + * @param sclk SCLK PinName. + */ void setSCLK(PinName sclk) { _spi.pin_sclk = (sclk); }; + /** + * @brief Set the SSEL pin. Must be called before begin(). + * @param ssel SSEL PinName. + */ void setSSEL(PinName ssel) { _spi.pin_ssel = (ssel); }; + /** + * @brief Initialize the SPI instance with the default parameters: 4 MHz, MSBFIRST, SPI_MODE0. + * @param busMode Bus mode: SPI_CONTROLLER or SPI_PERIPHERAL. + */ void begin(SPIBusMode busMode); + /** + * @brief Initialize the SPI instance as controller (default bus mode) with + * the default parameters. + */ void begin() override { begin(SPI_CONTROLLER); } + /** + * @brief Deinitialize the SPI instance and stop it. + */ void end(void) override ; - /* This function should be used to configure the SPI instance in case you - * don't use default parameters. + /** + * @brief Configure the SPI instance with the given settings, when the + * default parameters of begin() are not suitable. + * @param settings SPI settings (clock speed, bit order, data mode, bus mode). */ void beginTransaction(SPISettings settings) override; + /** + * @brief End the transaction started with beginTransaction(). + */ void endTransaction(void) override; - /* Transfer functions: must be called after initialization of the SPI - * instance with begin() or beginTransaction(). + /** + * @brief Transfer one byte on the SPI bus. + * + * begin() or beginTransaction() must be called at least once before. + * @param data Byte to send. + * @param skipReceive true to skip receiving data (SPI_TRANSMITONLY), false + * to receive (SPI_TRANSMITRECEIVE). + * @return Byte received from the peripheral. */ uint8_t transfer(uint8_t data, bool skipReceive); + /** + * @brief Transfer one byte on the SPI bus and receive data. + * + * begin() or beginTransaction() must be called at least once before. + * @param data Byte to send. + * @return Byte received from the peripheral. + */ uint8_t transfer(uint8_t data) override { return transfer(data, SPI_TRANSMITRECEIVE); } + /** + * @brief Transfer two bytes on the SPI bus in 16-bit format. + * + * begin() or beginTransaction() must be called at least once before. + * @param data Bytes to send. + * @param skipReceive true to skip receiving data (SPI_TRANSMITONLY), false + * to receive (SPI_TRANSMITRECEIVE). + * @return Bytes received from the peripheral in 16-bit format. + */ uint16_t transfer16(uint16_t data, bool skipReceive); + /** + * @brief Transfer two bytes on the SPI bus in 16-bit format and receive data. + * + * begin() or beginTransaction() must be called at least once before. + * @param data Bytes to send. + * @return Bytes received from the peripheral in 16-bit format. + */ uint16_t transfer16(uint16_t data) override { return transfer16(data, SPI_TRANSMITRECEIVE); } + /** + * @brief Transfer several bytes using one buffer to send and receive. + * + * begin() or beginTransaction() must be called at least once before. + * @param buf Pointer to the bytes to send. The bytes received are copied in this buffer. + * @param count Number of bytes to send/receive. + * @param skipReceive true to skip receiving data (SPI_TRANSMITONLY), false + * to receive (SPI_TRANSMITRECEIVE). + */ void transfer(void *buf, size_t count, bool skipReceive); + /** + * @brief Transfer several bytes using one buffer to send and receive data. + * + * begin() or beginTransaction() must be called at least once before. + * @param buf Pointer to the bytes to send. The bytes received are copied in this buffer. + * @param count Number of bytes to send/receive. + */ void transfer(void *buf, size_t count) override { transfer(buf, count, SPI_TRANSMITRECEIVE); } - /* Expand SPI API + /** + * @brief Transfer several bytes using one constant Tx buffer and one Rx buffer. + * + * begin() or beginTransaction() must be called at least once before. + * Expands the SPI API, see * https://github.com/arduino/ArduinoCore-API/discussions/189 + * @param tx_buf Array of Tx bytes filled by the user before the transfer. + * If NULL, dummy 0xFF bytes are clocked out. + * @param rx_buf Array of Rx bytes filled by the peripheral during the + * transfer. If NULL, the received data is discarded. + * @param count Number of bytes to send/receive. */ void transfer(const void *tx_buf, void *rx_buf, size_t count); - // Not implemented functions. Kept for compatibility. + /** + * @brief Not implemented. Kept for compatibility. + * @param interruptNumber Unused. + */ void usingInterrupt(int interruptNumber) override; + /** + * @brief Not implemented. Kept for compatibility. + * @param interruptNumber Unused. + */ void notUsingInterrupt(int interruptNumber) override; + /** + * @brief Not implemented. Kept for compatibility. + */ void attachInterrupt(void) override; + /** + * @brief Not implemented. Kept for compatibility. + */ void detachInterrupt(void) override; - // Could be used to mix Arduino API and STM32Cube HAL API (ex: DMA). Use at your own risk. + /** + * @brief Get the SPI handle to mix the Arduino API and the STM32Cube HAL + * API (e.g. DMA). + * @warning Use at your own risk. + * @return Pointer to the SPI handle. + */ #if defined(USE_HALV2_DRIVER) hal_spi_handle_t *getHandle(void) #else @@ -116,19 +265,28 @@ class SPIClass : public HardwareSPI { return &(_spi.handle); } - // Dedicated to SPI Slave + /** + * @brief Attach a callback on the falling edge of a pin. + * Dedicated to SPI slave (chip select detection). + * @param pin Pin number. + * @param callback Function called on the falling edge. + */ void attachSlaveInterrupt(uint8_t pin, voidFuncPtr callback) { ::attachInterrupt(pin, callback, FALLING); } + /** + * @brief Detach the callback attached with attachSlaveInterrupt(). + * @param pin Pin number. + */ void detachSlaveInterrupt(uint8_t pin) { ::detachInterrupt(pin); } protected: - // spi instance + /** @brief SPI instance data. */ spi_t _spi; private: @@ -136,16 +294,30 @@ class SPIClass : public HardwareSPI { SPISettings _spiSettings = SPISettings(); }; +/** @brief Default SPI instance, using the default SPI pins of the variant. */ extern SPIClass SPI; #if defined(SUBGHZSPI_BASE) +/** + * @brief SPI instance attached to the SubGHz radio peripheral. + */ class SUBGHZSPIClass : public SPIClass { public: + /** + * @brief Constructor. Attaches the SPI instance to the SubGHz radio peripheral. + */ SUBGHZSPIClass(): SPIClass{NC, NC, NC, NC} { _spi.spi = SUBGHZSPI; } + /** + * @brief Route the SubGHz SPI signals to debug pins, for logic analyzer use. + * @param mosi MOSI debug pin. + * @param miso MISO debug pin. + * @param sclk SCLK debug pin. + * @param ssel SSEL debug pin. + */ void enableDebugPins(pin_size_t mosi = DEBUG_SUBGHZSPI_MOSI, pin_size_t miso = DEBUG_SUBGHZSPI_MISO, pin_size_t sclk = DEBUG_SUBGHZSPI_SCLK, pin_size_t ssel = DEBUG_SUBGHZSPI_SS); }; diff --git a/libraries/SPI/src/utility/spi_com.c b/libraries/SPI/src/utility/spi_com.c index 1778e06d80..52c749b6a8 100644 --- a/libraries/SPI/src/utility/spi_com.c +++ b/libraries/SPI/src/utility/spi_com.c @@ -22,9 +22,9 @@ extern "C" { /* Private Functions */ /** - * @brief return clock freq of an SPI instance - * @param spi_inst : SPI instance - * @retval clock freq of the instance else SystemCoreClock + * @brief Return the clock frequency of an SPI instance. + * @param spi_inst SPI instance. + * @return Clock frequency of the instance, else SystemCoreClock. */ uint32_t spi_getClkFreqInst(SPI_TypeDef *spi_inst) { @@ -161,11 +161,6 @@ uint32_t spi_getClkFreqInst(SPI_TypeDef *spi_inst) return spi_freq; } -/** - * @brief return clock freq of an SPI instance - * @param obj : pointer to spi_t structure - * @retval clock freq of the instance else SystemCoreClock - */ uint32_t spi_getClkFreq(spi_t *obj) { SPI_TypeDef *spi_inst = NP; @@ -194,8 +189,9 @@ uint32_t spi_getClkFreq(spi_t *obj) * @brief Compute delay before disabling SPI * See https://github.com/stm32duino/Arduino_Core_STM32/issues/1294 * Computed delay is half SPI clock - * @param obj : pointer to spi_t structure - * @retval Disable delay in microsecondes + * @param spi_freq SPI clock frequency. + * @param prescaler SPI prescaler configuration. + * @return Disable delay in microseconds. */ static uint32_t compute_disable_delay(uint32_t spi_freq, uint32_t prescaler) { @@ -206,15 +202,6 @@ static uint32_t compute_disable_delay(uint32_t spi_freq, uint32_t prescaler) } #endif -/** - * @brief SPI initialization function - * @param obj : pointer to spi_t structure - * @param speed : spi output speed - * @param dataMode : one of the spi modes - * @param msbFirst : set to true in msb first - * @param busMode : spi busMode: controller or peripheral - * @retval None - */ void spi_init(spi_t *obj, uint32_t speed, spi_mode_e dataMode, bool msbFirst, spi_busmode_e busMode) { if (obj != NULL) { @@ -461,12 +448,6 @@ void spi_init(spi_t *obj, uint32_t speed, spi_mode_e dataMode, bool msbFirst, sp } } -/** - * @brief This function is implemented to deinitialize the SPI interface - * (IOs + SPI block) - * @param obj : pointer to spi_t structure - * @retval None - */ void spi_deinit(spi_t *obj) { if (obj != NULL) { @@ -550,15 +531,6 @@ void spi_deinit(spi_t *obj) } } -/** - * @brief This function is implemented by user to send/receive data over - * SPI interface - * @param obj : pointer to spi_t structure - * @param tx_buffer : tx data to send before reception - * @param rx_buffer : rx data to receive if not numm - * @param len : length in byte of the data to send and receive - * @retval status of the send operation (0) in case of error - */ spi_status_e spi_transfer(spi_t *obj, const uint8_t *tx_buffer, uint8_t *rx_buffer, uint16_t len) { diff --git a/libraries/SPI/src/utility/spi_com.h b/libraries/SPI/src/utility/spi_com.h index 8e4fcf844d..85aaa08821 100644 --- a/libraries/SPI/src/utility/spi_com.h +++ b/libraries/SPI/src/utility/spi_com.h @@ -23,30 +23,41 @@ extern "C" { /* Exported types ------------------------------------------------------------*/ +/** + * @brief SPI instance data. + */ struct spi_s { #if defined(USE_HALV2_DRIVER) - hal_spi_handle_t handle; + hal_spi_handle_t handle; /**< HAL SPI handle. */ #else - SPI_HandleTypeDef handle; + SPI_HandleTypeDef handle; /**< HAL SPI handle. */ #endif - SPI_TypeDef *spi; - PinName pin_miso; - PinName pin_mosi; - PinName pin_sclk; - PinName pin_ssel; + SPI_TypeDef *spi; /**< SPI peripheral instance. */ + PinName pin_miso; /**< MISO pin. */ + PinName pin_mosi; /**< MOSI pin. */ + PinName pin_sclk; /**< SCLK pin. */ + PinName pin_ssel; /**< Hardware SSEL pin, NC if not used. */ #if defined(SPI_IFCR_EOTC) - // Delay before disabling SPI. - // See https://github.com/stm32duino/Arduino_Core_STM32/issues/1294 + /** + * @brief Delay in microseconds before disabling SPI, to avoid truncating the + * last bit/clock. + * See https://github.com/stm32duino/Arduino_Core_STM32/issues/1294 + */ uint32_t disable_delay; #endif }; +/** @brief SPI instance type. */ typedef struct spi_s spi_t; -///@brief specifies the SPI speed bus in HZ. +/** @brief Default SPI bus speed in Hz. */ #define SPI_SPEED_CLOCK_DEFAULT 4000000 +/** @name SPI speed dividers + * @brief Divider values (2 to 256) applied to the SPI peripheral clock. + * @{ + */ #define SPI_SPEED_CLOCK_DIV2_MHZ ((uint32_t)2) #define SPI_SPEED_CLOCK_DIV4_MHZ ((uint32_t)4) #define SPI_SPEED_CLOCK_DIV8_MHZ ((uint32_t)8) @@ -55,22 +66,28 @@ typedef struct spi_s spi_t; #define SPI_SPEED_CLOCK_DIV64_MHZ ((uint32_t)64) #define SPI_SPEED_CLOCK_DIV128_MHZ ((uint32_t)128) #define SPI_SPEED_CLOCK_DIV256_MHZ ((uint32_t)256) +/** @} */ -// Defines a default timeout delay in milliseconds for the SPI transfer +/** + * @brief Default timeout delay in milliseconds for the SPI transfer. + * Can be overridden before including this file, it must be greater than 0. + */ #ifndef SPI_TRANSFER_TIMEOUT #define SPI_TRANSFER_TIMEOUT 1000 #elif SPI_TRANSFER_TIMEOUT <= 0 #error "SPI_TRANSFER_TIMEOUT cannot be less or equal to 0!" #endif -///@brief specifies the SPI mode to use -//Mode Clock Polarity (CPOL) Clock Phase (CPHA) -//SPI_MODE0 0 0 -//SPI_MODE1 0 1 -//SPI_MODE2 1 0 -//SPI_MODE3 1 1 -//enum definitions coming from SPI.h of SAM -// SPI data mode parameters +/** + * @brief SPI data mode. + * + * Mode Clock Polarity (CPOL) Clock Phase (CPHA) + * SPI_MODE0 0 0 + * SPI_MODE1 0 1 + * SPI_MODE2 1 0 + * SPI_MODE3 1 1 + * @note Enum definitions coming from SPI.h of SAM. + */ typedef enum { SPI_MODE0_C = 0, SPI_MODE1_C = 1, @@ -78,13 +95,13 @@ typedef enum { SPI_MODE3_C = 3, } spi_mode_e; -// Bus mode +/** @brief SPI bus mode. */ typedef enum { SPI_CONTROLLER_C = 0, SPI_PERIPHERAL_C = 1, } spi_busmode_e; -///@brief SPI errors +/** @brief SPI status codes. */ typedef enum { SPI_OK = 0, SPI_TIMEOUT = 1, @@ -92,9 +109,38 @@ typedef enum { } spi_status_e; /* Exported functions ------------------------------------------------------- */ +/** + * @brief Initialize the SPI instance. + * @param obj Pointer to spi_t structure. + * @param speed Clock speed of the SPI bus in Hz. + * @param dataMode One of the SPI data modes (spi_mode_e). + * @param msbFirst true for MSB first, false for LSB first. + * @param busMode SPI bus mode: controller or peripheral. + */ void spi_init(spi_t *obj, uint32_t speed, spi_mode_e dataMode, bool msbFirst, spi_busmode_e busMode); +/** + * @brief Deinitialize the SPI interface (IOs and SPI block). + * @param obj Pointer to spi_t structure. + */ void spi_deinit(spi_t *obj); +/** + * @brief Send and receive data over the SPI interface. + * @param obj Pointer to spi_t structure. + * @param tx_buffer Data to send before reception. If NULL, dummy 0xFF bytes + * are clocked out. + * @param rx_buffer Buffer to store the received data. If NULL, the received + * data is discarded. + * @param len Length in bytes of the data to send and receive. + * @retval SPI_OK on success. + * @retval SPI_TIMEOUT if SPI_TRANSFER_TIMEOUT elapsed during the transfer. + * @retval SPI_ERROR if len is 0. + */ spi_status_e spi_transfer(spi_t *obj, const uint8_t *tx_buffer, uint8_t *rx_buffer, uint16_t len); +/** + * @brief Return the clock frequency of an SPI instance. + * @param obj Pointer to spi_t structure. + * @return Clock frequency of the instance, or SystemCoreClock if not found. + */ uint32_t spi_getClkFreq(spi_t *obj); #ifdef __cplusplus diff --git a/libraries/Servo/src/Servo.h b/libraries/Servo/src/Servo.h index 21e70e07bf..a9941c7f51 100644 --- a/libraries/Servo/src/Servo.h +++ b/libraries/Servo/src/Servo.h @@ -17,32 +17,35 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -/* - A servo is activated by creating an instance of the Servo class passing - the desired pin to the attach() method. - The servos are pulsed in the background using the value most recently - written using the write() method. - - Note that analogWrite of PWM on pins associated with the timer are - disabled when the first servo is attached. - Timers are seized as needed in groups of 12 servos - 24 servos use two - timers, 48 servos will use four. - The sequence used to seize timers is defined in timers.h - - The methods are: - - Servo - Class for manipulating servo motors connected to Arduino pins. - - attach(pin ) - Attaches a servo motor to an i/o pin. - attach(pin, min, max ) - Attaches to a pin setting min and max values in microseconds - default min is 544, max is 2400 - - write() - Sets the servo angle in degrees. (invalid angle that is valid as pulse in microseconds is treated as microseconds) - writeMicroseconds() - Sets the servo pulse width in microseconds - read() - Gets the last written servo pulse width as an angle between 0 and 180. - readMicroseconds() - Gets the last written servo pulse width in microseconds. (was read_us() in first release) - attached() - Returns true if there is a servo attached. - detach() - Stops an attached servos from pulsing its i/o pin. +/** + * @file Servo.h + * @brief Interrupt driven Servo library using 16 bit timers - Version 2. + * + * A servo is activated by creating an instance of the Servo class passing + * the desired pin to the attach() method. + * The servos are pulsed in the background using the value most recently + * written using the write() method. + * + * @note analogWrite of PWM on pins associated with the timer are + * disabled when the first servo is attached. + * Timers are seized as needed in groups of 12 servos - 24 servos use two + * timers, 48 servos will use four. + * The sequence used to seize timers is defined in timers.h + * + * The methods are: + * - Servo: class for manipulating servo motors connected to Arduino pins. + * - attach(pin): attach a servo motor to an i/o pin. + * - attach(pin, min, max): attach to a pin setting min and max values in + * microseconds, default min is 544, max is 2400. + * - write(): set the servo angle in degrees (an invalid angle that is valid as + * pulse in microseconds is treated as microseconds). + * - writeMicroseconds(): set the servo pulse width in microseconds. + * - read(): get the last written servo pulse width as an angle between 0 and + * 180. + * - readMicroseconds(): get the last written servo pulse width in + * microseconds (was read_us() in first release). + * - attached(): return true if there is a servo attached. + * - detach(): stop an attached servo from pulsing its i/o pin. */ #ifndef Servo_h @@ -61,40 +64,114 @@ #include "stm32/ServoTimers.h" -#define Servo_VERSION 2 // software version of this library - -#define MIN_PULSE_WIDTH 544 // the shortest pulse sent to a servo -#define MAX_PULSE_WIDTH 2400 // the longest pulse sent to a servo -#define DEFAULT_PULSE_WIDTH 1500 // default pulse width when servo is attached -#define REFRESH_INTERVAL 20000 // minumim time to refresh servos in microseconds - -#define SERVOS_PER_TIMER 12 // the maximum number of servos controlled by one timer +/** @brief Software version of this library. */ +#define Servo_VERSION 2 + +/** @brief Shortest pulse sent to a servo, in microseconds. */ +#define MIN_PULSE_WIDTH 544 +/** @brief Longest pulse sent to a servo, in microseconds. */ +#define MAX_PULSE_WIDTH 2400 +/** @brief Default pulse width when a servo is attached, in microseconds. */ +#define DEFAULT_PULSE_WIDTH 1500 +/** @brief Minimum time to refresh servos, in microseconds. */ +#define REFRESH_INTERVAL 20000 + +/** @brief Maximum number of servos controlled by one timer. */ +#define SERVOS_PER_TIMER 12 +/** + * @brief Maximum number of servos supported by the available 16 bit timers. + */ #define MAX_SERVOS (_Nbr_16timers * SERVOS_PER_TIMER) -#define INVALID_SERVO 255 // flag indicating an invalid servo index +/** @brief Flag indicating an invalid servo index. */ +#define INVALID_SERVO 255 +/** @brief Pin of a servo channel. */ typedef struct { - uint8_t nbr; // a pin number from 0 to 255 - uint8_t isActive; // true if this channel is enabled, pin not pulsed if false + uint8_t nbr; /**< Pin number from 0 to 255. */ + /** true if this channel is enabled, pin not pulsed if false. */ + uint8_t isActive; } ServoPin_t ; +/** @brief Servo channel data. */ typedef struct { - ServoPin_t Pin; - volatile unsigned int ticks; + ServoPin_t Pin; /**< Pin of the channel. */ + volatile unsigned int ticks; /**< Pulse width in microseconds. */ } servo_t; +/** + * @brief Servo motor controller. Each instance drives one servo on a pin, + * using a shared 16 bit timer. + */ class Servo { public: + /** + * @brief Create a servo instance and assign it a channel index. + * @note If no channel is left (MAX_SERVOS reached), the instance is + * invalid: its index is INVALID_SERVO. + */ Servo(); - uint8_t attach(pin_size_t pin, int value = DEFAULT_PULSE_WIDTH); // attach the given pin to the next free channel, sets pinMode, set angle value, returns channel number or 0 if failure - uint8_t attach(pin_size_t pin, int min, int max, int value = DEFAULT_PULSE_WIDTH); // as above but also sets min and max values for writes. + /** + * @brief Attach the servo to a pin, using the default min and max pulse widths. + * + * The pin is set as output and the servo is moved to the initial value. + * @param pin Pin number to attach the servo to. + * @param value Initial value, as an angle in degrees or a pulse width in + * microseconds. Default: DEFAULT_PULSE_WIDTH. + * @return Index of the channel used, or INVALID_SERVO if no channel is available. + */ + uint8_t attach(pin_size_t pin, int value = DEFAULT_PULSE_WIDTH); + /** + * @brief Attach the servo to a pin, with custom min and max pulse widths. + * + * The pin is set as output and the servo is moved to the initial value. + * The min and max values are used to limit the writes and have a resolution + * of 4 microseconds. + * @param pin Pin number to attach the servo to. + * @param min Pulse width in microseconds for 0 degrees (MIN_PULSE_WIDTH by + * default with the 2 parameters version). + * @param max Pulse width in microseconds for 180 degrees (MAX_PULSE_WIDTH + * by default with the 2 parameters version). + * @param value Initial value, as an angle in degrees or a pulse width in + * microseconds. Default: DEFAULT_PULSE_WIDTH. + * @return Index of the channel used, or INVALID_SERVO if no channel is available. + */ + uint8_t attach(pin_size_t pin, int min, int max, int value = DEFAULT_PULSE_WIDTH); + /** + * @brief Stop the servo from pulsing its pin. The timer is paused when no + * servo is active. + */ void detach(); - void write(int value); // if value is < 200 its treated as an angle, otherwise as pulse width in microseconds - void writeMicroseconds(int value); // Write pulse width in microseconds - int read(); // returns current pulse width as an angle between 0 and 180 degrees - int readMicroseconds(); // returns current pulse width in microseconds for this servo (was read_us() in first release) - bool attached(); // return true if this servo is attached, otherwise false + /** + * @brief Set the servo position. + * + * A value less than MIN_PULSE_WIDTH is treated as an angle (limited to + * 0-180), otherwise it is treated as a pulse width in microseconds (see writeMicroseconds()). + * @param value Angle in degrees (0 to 180) or pulse width in microseconds. + */ + void write(int value); + /** + * @brief Set the servo pulse width. The value is clamped to the min and max + * pulse widths of this servo. + * @param value Pulse width in microseconds. + */ + void writeMicroseconds(int value); + /** + * @brief Get the last written position. + * @return Current position as an angle between 0 and 180 degrees. + */ + int read(); + /** + * @brief Get the last written pulse width. + * @return Current pulse width in microseconds, 0 if the servo instance is invalid. + */ + int readMicroseconds(); + /** + * @brief Check if the servo is attached. + * @return true if the servo is attached, false otherwise. + */ + bool attached(); private: uint8_t servoIndex; // index into the channel data for this servo int8_t min; // minimum is this value times 4 added to MIN_PULSE_WIDTH diff --git a/libraries/Servo/src/stm32/Servo.cpp b/libraries/Servo/src/stm32/Servo.cpp index daf6976ff9..334420a89e 100644 --- a/libraries/Servo/src/stm32/Servo.cpp +++ b/libraries/Servo/src/stm32/Servo.cpp @@ -38,6 +38,10 @@ uint8_t ServoCount = 0; // the total number o /************ static functions common to all instances ***********************/ volatile uint32_t CumulativeCountSinceRefresh = 0; +/** + * @brief Timer update callback: pulse the servos one after the other, + * then wait for the refresh interval to expire before starting over. + */ static void Servo_PeriodElapsedCallback() { // Only 1 timer used @@ -73,6 +77,10 @@ static void Servo_PeriodElapsedCallback() } } +/** + * @brief Configure the servo timer with a 1 microsecond tick, the refresh + * interval as period and the update callback, then start it. + */ static void TimerServoInit() { // prescaler is computed so that timer tick correspond to 1 microseconde @@ -86,9 +94,12 @@ static void TimerServoInit() } +/** + * @brief Check if any servo is active on the servo timer. + * @return true if at least one servo is active, false otherwise. + */ static bool isTimerActive() { - // returns true if any servo is active on this timer for (uint8_t channel = 0; channel < SERVOS_PER_TIMER; channel++) { if (servos[channel].Pin.isActive == true) { return true; @@ -199,16 +210,18 @@ bool Servo::attached() #warning "TIMER_TONE or HAL_TIM_MODULE_ENABLED or USE_HAL_TIM_MODULE set to 1 not defined" Servo::Servo() {} -uint8_t Servo::attach(pin_size_t pin) +uint8_t Servo::attach(pin_size_t pin, int value) { (void)pin; + (void)value; return 0; } -uint8_t Servo::attach(pin_size_t pin, int min, int max) +uint8_t Servo::attach(pin_size_t pin, int min, int max, int value) { (void)pin; (void)min; (void)max; + (void)value; return 0; } void Servo::detach() {} @@ -228,6 +241,9 @@ int Servo::readMicroseconds() { return 0; } -bool Servo::attached() {} +bool Servo::attached() +{ + return false; +} #endif /* TIMER_SERVO && !HAL_TIM_MODULE_ONLY && (HAL_TIM_MODULE_ENABLED || USE_HAL_TIM_MODULE...) */ diff --git a/libraries/SoftwareSerial/src/SoftwareSerial.cpp b/libraries/SoftwareSerial/src/SoftwareSerial.cpp index daeafdbc2c..28de54e3d9 100644 --- a/libraries/SoftwareSerial/src/SoftwareSerial.cpp +++ b/libraries/SoftwareSerial/src/SoftwareSerial.cpp @@ -141,8 +141,6 @@ void SoftwareSerial::setSpeed(uint32_t speed) } } -// This function sets the current object as the "listening" -// one and returns true if it replaces another bool SoftwareSerial::listen() { if (active_listener != this) { @@ -165,7 +163,6 @@ bool SoftwareSerial::listen() return false; } -// Stop listening. Returns true if we were actually listening. bool SoftwareSerial::stopListening() { if (active_listener == this) { @@ -363,7 +360,6 @@ void SoftwareSerial::end() setSpeed(0); } -// Read data from buffer int SoftwareSerial::read() { // Empty buffer? diff --git a/libraries/SoftwareSerial/src/SoftwareSerial.h b/libraries/SoftwareSerial/src/SoftwareSerial.h index 2a677c2463..52fa0becae 100644 --- a/libraries/SoftwareSerial/src/SoftwareSerial.h +++ b/libraries/SoftwareSerial/src/SoftwareSerial.h @@ -39,8 +39,15 @@ * Definitions ******************************************************************************/ -#define _SS_MAX_RX_BUFF 64 // RX buffer size +/** + * @brief Size of the receive buffer in bytes. + */ +#define _SS_MAX_RX_BUFF 64 +/** + * @brief Software serial (UART) emulation on any pair of GPIO pins, driven by a timer interrupt. + * @note When the receive and transmit pins are the same, the instance works in half-duplex mode. + */ class SoftwareSerial : public Stream { private: // per object data @@ -77,28 +84,92 @@ class SoftwareSerial : public Stream { static int32_t rx_bit_cnt; static uint32_t cur_speed; - // private methods + /** + * @brief Timer interrupt handler for the transmit side: send the next TX bit. + */ void send(); + /** + * @brief Timer interrupt handler for the receive side: sample the next RX bit. + */ void recv(); + /** + * @brief Configure the transmit pin as output, idle high (low if inverse + * logic is used). + */ void setTX(); + /** + * @brief Configure the receive pin as input with pull-up (pull-down if + * inverse logic is used). + */ void setRX(); + /** + * @brief Configure the timer for the given baud rate, or stop it when speed is 0. + * @param speed Baud rate in bits per second. 0 disables the timer interrupt. + */ void setSpeed(uint32_t speed); + /** + * @brief Switch the pin between receive and transmit in half-duplex mode. + * @param input true to switch to receive, false to switch to transmit. + */ void setRXTX(bool input); + /** + * @brief Timer interrupt handler dispatching to the active receiver and transmitter. + */ static void handleInterrupt(); public: - // public methods - + /** + * @brief Create a software serial instance on the given pins. + * @param receivePin Pin used to receive data (RX). + * @param transmitPin Pin used to transmit data (TX). Use the same pin as + * receivePin for half-duplex mode. + * @param inverse_logic Optional, true to invert the logic level of the + * data. Default: false. + */ SoftwareSerial(pin_size_t receivePin, pin_size_t transmitPin, bool inverse_logic = false); + /** + * @brief Stop this instance: stop listening and disable its timer interrupt. + */ virtual ~SoftwareSerial(); + /** + * @brief Set the baud rate and initialize the pins. Starts listening unless + * the instance is half-duplex. + * @param speed Baud rate in bits per second. If FORCE_BAUD_RATE is defined, + * its value is used instead. + */ void begin(long speed); + /** + * @brief Set this instance as the listening one. Only one instance can + * listen at a time. + * + * If another instance was listening, it is stopped and replaced by this one. + * @return true if this instance became the listening one (replacing another + * one if any), + * false if it was already listening. + */ bool listen(); + /** + * @brief Stop this instance: stop listening and disable the timer interrupt. + */ void end(); + /** + * @brief Check if this instance is the active listener. + * @return true if this instance is listening, false otherwise. + */ bool isListening() { return active_listener == this; } + /** + * @brief Stop listening on this instance. Waits for any pending output to complete. + * @return true if this instance was actually listening, false otherwise. + */ bool stopListening(); + /** + * @brief Check whether a byte was dropped because the receive buffer was + * full. Clears the flag. + * @return true if an overflow occurred since the last call, false otherwise. + */ bool overflow() { bool ret = _buffer_overflow; @@ -107,17 +178,46 @@ class SoftwareSerial : public Stream { } return ret; } + /** + * @brief Get the next received byte without removing it from the receive buffer. + * @return The next byte, or -1 if the receive buffer is empty. + */ int peek(); + /** + * @brief Send one byte. Waits for any previous transmission to complete. + * @param byte Byte to send. + * @return Always 1. + */ virtual size_t write(uint8_t byte); + /** + * @brief Read the next byte from the receive buffer. + * @return The byte read, or -1 if the receive buffer is empty. + */ virtual int read(); + /** + * @brief Get the number of bytes in the receive buffer. + * @return Number of bytes available to read. + */ virtual int available(); + /** + * @brief Clear the receive buffer and wait for any pending transmission to complete. + */ virtual void flush(); + /** + * @brief Allow the instance to be used in a boolean context. + * @return Always true. + */ operator bool() { return true; } + /** + * @brief Set the priority of the timer interrupt shared by all software serial instances. + * @param preemptPriority Preemption priority of the interrupt. + * @param subPriority Sub-priority of the interrupt. + */ static void setInterruptPriority(uint32_t preemptPriority, uint32_t subPriority); using Print::write; diff --git a/libraries/SrcWrapper/inc/HardwareTimer.h b/libraries/SrcWrapper/inc/HardwareTimer.h index 90a6c2e27f..356e5c62c9 100644 --- a/libraries/SrcWrapper/inc/HardwareTimer.h +++ b/libraries/SrcWrapper/inc/HardwareTimer.h @@ -35,8 +35,12 @@ #if !defined(HAL_TIM_MODULE_ONLY) &&\ (defined(HAL_TIM_MODULE_ENABLED) || (defined(USE_HAL_TIM_MODULE) && (USE_HAL_TIM_MODULE == 1))) +/** @brief Number of Arduino channels handled per timer */ #define TIMER_CHANNELS 4 // channel5 and channel 6 are not considered here has they don't have gpio output and they don't have interrupt +/** + * @brief Timer channel modes (output compare, PWM and input capture) + */ typedef enum { TIMER_OUTPUT_DISABLED, // == TIM_OCMODE_TIMING no output, useful for only-interrupt // Output Compare @@ -62,15 +66,23 @@ typedef enum { } TimerModes_t; // Backward compatibility +/** @brief Deprecated alias of #TIMER_OUTPUT_DISABLED */ #define TIMER_DISABLED TIMER_OUTPUT_DISABLED +/** @brief Deprecated alias of #TIMER_OUTPUT_DISABLED */ #define TIMER_OUTPUT_COMPARE TIMER_OUTPUT_DISABLED +/** + * @brief Unit of the values exchanged with overflow and counter methods + */ typedef enum { TICK_FORMAT, // default MICROSEC_FORMAT, HERTZ_FORMAT, } TimerFormat_t; +/** + * @brief Unit of the values exchanged with capture/compare methods + */ typedef enum { RESOLUTION_1B_COMPARE_FORMAT = 1, // used for Dutycycle: [0 .. 1] RESOLUTION_2B_COMPARE_FORMAT, // used for Dutycycle: [0 .. 3] @@ -95,6 +107,10 @@ typedef enum { PERCENT_COMPARE_FORMAT, // used for Dutycycle } TimerCompareFormat_t; +/** + * @brief Input capture filter: sampling rate and number of events needed to + * validate a transition + */ typedef enum { #if defined(USE_HALV2_DRIVER) // Set with hal_tim_filter_t value @@ -134,6 +150,9 @@ typedef enum { #endif } ChannelInputFilter_t; +/** + * @brief Action to apply on a channel interrupt (see HardwareTimer::manageIT()) + */ typedef enum { DISABLE_IT, // default ENABLE_IT, @@ -145,84 +164,380 @@ typedef enum { #ifdef __cplusplus #include +/** @brief Type of the user callbacks attached to timer interrupts */ using callback_function_t = std::function; /* Class --------------------------------------------------------*/ +/** + * @brief Arduino-style wrapper around an STM32 general purpose/advanced timer: + * PWM, output compare, input capture and update/compare interrupts + */ class HardwareTimer { public: + /** + * @brief HardwareTimer constructor: make uninitialized timer + * Before calling any methods, call setup to select and setup + * the timer to be used. + */ HardwareTimer(); + /** + * @brief HardwareTimer constructor: set default configuration values + * The timer will be usable directly, there is no need to call + * setup(). Using this constructor is not recommended for + * global variables that are automatically initialized at + * startup, since this will happen to early to report any + * errors. Better use the argumentless constructor and call the + * setup() method during initialization later. + * @param instance Timer instance ex: TIM1, ... + */ HardwareTimer(TIM_TypeDef *instance); - ~HardwareTimer(); // destructor - - void setup(TIM_TypeDef *instance); // Setup, only needed if no instance was passed to the constructor - - void pause(void); // Pause counter and all output channels - void pauseChannel(uint32_t channel); // Timer is still running but channel (output and interrupt) is disabled - void resume(void); // Resume counter and all output channels - void resumeChannel(uint32_t channel); // Resume only one channel - - void setPrescaleFactor(uint32_t prescaler); // set prescaler register (which is factor value - 1) + /** + * @brief HardwareTimer destructor + */ + ~HardwareTimer(); + + /** + * @brief HardwareTimer setup: configuration values. Must be called + * exactly once before any other methods, except when an instance is + * passed to the constructor. + * @param instance Timer instance ex: TIM1, ... + */ + void setup(TIM_TypeDef *instance); + + /** + * @brief Pause HardwareTimer: stop timer + */ + void pause(void); + /** + * @brief Pause only one channel. + * Timer is still running but channel is disabled (output and interrupt) + * @param channel Arduino channel [1..4] + */ + void pauseChannel(uint32_t channel); + /** + * @brief Start or resume HardwareTimer: all channels are resumed, + * interrupts are enabled if necessary + */ + void resume(void); + /** + * @brief Configure specified channel and resume/start timer + * @param channel Arduino channel [1..4] + */ + void resumeChannel(uint32_t channel); + + /** + * @brief Configure hardwareTimer prescaler + * @param prescaler Prescaler factor + */ + void setPrescaleFactor(uint32_t prescaler); + /** + * @brief Retrieve prescaler from hardware register + * @return prescaler factor + */ uint32_t getPrescaleFactor(); - void setOverflow(uint32_t val, TimerFormat_t format = TICK_FORMAT); // set AutoReload register depending on format provided - uint32_t getOverflow(TimerFormat_t format = TICK_FORMAT); // return overflow depending on format provided - - void setPWM(uint32_t channel, PinName pin, uint32_t frequency, uint32_t dutycycle, callback_function_t PeriodCallback = nullptr, callback_function_t CompareCallback = nullptr); // Set all in one command freq in HZ, Duty in percentage. Including both interrupt. + /** + * @brief Set overflow (rollover) + * + * Note that by default, the new value will not be applied + * immediately, but become effective at the next update event + * (usually the next timer overflow). See setPreloadEnable() + * for controlling this behaviour. + * @param overflow Overflow value, depends on format parameter + * @param format Format of overflow parameter. If omitted default format + * is Tick + * TICK_FORMAT: overflow is the number of tick for overflow + * MICROSEC_FORMAT: overflow is the number of microsecondes for + * overflow + * HERTZ_FORMAT: overflow is the frequency in hertz for overflow + */ + void setOverflow(uint32_t overflow, TimerFormat_t format = TICK_FORMAT); + /** + * @brief Retrieve overflow (rollover) value from hardware register + * @param format Format of returned value. If omitted default format is Tick + * @return overflow depending on format value: + * TICK_FORMAT: return number of tick for overflow + * MICROSEC_FORMAT: return number of microsecondes for overflow + * HERTZ_FORMAT: return frequency in hertz for overflow + */ + uint32_t getOverflow(TimerFormat_t format = TICK_FORMAT); + + /** + * @brief All in one function to configure PWM + * @param channel Arduino channel [1..4] + * @param pin Pin name, ex PB_0 + * @param frequency PWM frequency expressed in hertz + * @param dutycycle PWM dutycycle expressed in percentage + * @param PeriodCallback Timer period callback (timer rollover upon update event) + * @param CompareCallback Timer compare callback + */ + void setPWM(uint32_t channel, PinName pin, uint32_t frequency, uint32_t dutycycle, callback_function_t PeriodCallback = nullptr, callback_function_t CompareCallback = nullptr); + /** + * @brief All in one function to configure PWM, using an Arduino pin number + * @param channel Arduino channel [1..4] + * @param pin Arduino pin number, ex D1, 1 or PA1 + * @param frequency PWM frequency expressed in hertz + * @param dutycycle PWM dutycycle expressed in percentage + * @param PeriodCallback Timer period callback (timer rollover upon update event) + * @param CompareCallback Timer compare callback + */ void setPWM(uint32_t channel, pin_size_t pin, uint32_t frequency, uint32_t dutycycle, callback_function_t PeriodCallback = nullptr, callback_function_t CompareCallback = nullptr); - void setCount(uint32_t val, TimerFormat_t format = TICK_FORMAT); // set timer counter to value 'val' depending on format provided - uint32_t getCount(TimerFormat_t format = TICK_FORMAT); // return current counter value of timer depending on format provided - - void setMode(uint32_t channel, TimerModes_t mode, PinName pin = NC, ChannelInputFilter_t filter = FILTER_NONE); // Configure timer channel with specified mode on specified pin if available + /** + * @brief Set timer counter value + * @param counter Counter value, depends on format parameter + * @param format Format of counter parameter. If omitted default format is + * Tick + * TICK_FORMAT: counter is the number of tick + * MICROSEC_FORMAT: counter is the number of microsecondes + * HERTZ_FORMAT: counter is the frequency in hertz + */ + void setCount(uint32_t counter, TimerFormat_t format = TICK_FORMAT); + /** + * @brief Retrieve timer counter value + * @param format Format of returned value. If omitted default format is Tick + * @return counter value depending on format value: + * TICK_FORMAT: return number of tick for counter + * MICROSEC_FORMAT: return number of microsecondes for counter + * HERTZ_FORMAT: return frequency in hertz for counter + */ + uint32_t getCount(TimerFormat_t format = TICK_FORMAT); + + /** + * @brief Set channel mode: configure timer channel with specified mode on + * specified pin if available + * @param channel Arduino channel [1..4] + * @param mode Mode configuration for the channel (see TimerModes_t) + * @param pin Pin name, ex: PB_0 + * @param filter Input capture filter (see ChannelInputFilter_t) + */ + void setMode(uint32_t channel, TimerModes_t mode, PinName pin = NC, ChannelInputFilter_t filter = FILTER_NONE); + /** + * @brief Set channel mode: configure timer channel with specified mode on + * specified pin if available + * @param channel Arduino channel [1..4] + * @param mode Mode configuration for the channel (see TimerModes_t) + * @param pin Arduino pin number, ex: D1, 1 or PA1 + * @param filter Input capture filter (see ChannelInputFilter_t) + */ void setMode(uint32_t channel, TimerModes_t mode, pin_size_t pin, ChannelInputFilter_t filter = FILTER_NONE); - TimerModes_t getMode(uint32_t channel); // Retrieve configured mode - - void setPreloadEnable(bool value); // Configure overflow preload enable setting - - uint32_t getCaptureCompare(uint32_t channel, TimerCompareFormat_t format = TICK_COMPARE_FORMAT); // return Capture/Compare register value of specified channel depending on format provided - void setCaptureCompare(uint32_t channel, uint32_t compare, TimerCompareFormat_t format = TICK_COMPARE_FORMAT); // set Compare register value of specified channel depending on format provided - - void setInterruptPriority(uint32_t preemptPriority, uint32_t subPriority); // set interrupt priority - - //Add interrupt to period update - void attachInterrupt(callback_function_t callback); // Attach interrupt callback which will be called upon update event (timer rollover) - void detachInterrupt(); // remove interrupt callback which was attached to update event - bool hasInterrupt(); //returns true if a timer rollover interrupt has already been set - //Add interrupt to capture/compare channel - void attachInterrupt(uint32_t channel, callback_function_t callback); // Attach interrupt callback which will be called upon compare match event of specified channel - void detachInterrupt(uint32_t channel); // remove interrupt callback which was attached to compare match event of specified channel - bool hasInterrupt(uint32_t channel); //returns true if an interrupt has already been set on the channel compare match - void timerHandleDeinit(); // Timer deinitialization - - // Refresh() is useful while timer is running after some registers update - void refresh(void); // Generate update event to force all registers (Autoreload, prescaler, compare) to be taken into account - - uint32_t getTimerClkFreq(); // return timer clock frequency in Hz. + /** + * @brief Retrieves channel mode configured + * @param channel Arduino channel [1..4] + * @return returns configured mode + */ + TimerModes_t getMode(uint32_t channel); + + /** + * @brief Enable or disable preloading for overflow value + * When disabled, changes to the overflow value take effect + * immediately. When enabled (the default), the value takes + * effect only at the next update event (typically the next overflow). + * + * Note that the capture/compare register has its own preload + * enable bit, which is independent and enabled in PWM modes + * and disabled otherwise. If you need more control of that + * bit, you can use the HAL functions directly. + * @param value true to enable preloading, false to disable + */ + void setPreloadEnable(bool value); + + /** + * @brief Retrieve Capture/Compare value + * @param channel Arduino channel [1..4] + * @param format Format of return value (see TimerCompareFormat_t). If + * omitted default format is Tick + * TICK_COMPARE_FORMAT: return value is the number of tick + * for Capture/Compare value + * MICROSEC_COMPARE_FORMAT: return value is the number of + * microsecondes for Capture/Compare + * value + * HERTZ_COMPARE_FORMAT: return value is the frequency in + * hertz for Capture/Compare value + * PERCENT_COMPARE_FORMAT: return value is the dutycycle in + * percentage + * RESOLUTION_nB_COMPARE_FORMAT: return value is the dutycycle + * scaled on n bits [0 .. 2^n - 1] + * @return Capture/Compare value + */ + uint32_t getCaptureCompare(uint32_t channel, TimerCompareFormat_t format = TICK_COMPARE_FORMAT); + /** + * @brief Set channel Capture/Compare register + * @param channel Arduino channel [1..4] + * @param compare Compare value depending on format + * @param format Format of compare parameter (see TimerCompareFormat_t). If + * omitted default format is Tick + * TICK_COMPARE_FORMAT: compare is the number of tick + * MICROSEC_COMPARE_FORMAT: compare is the number of microsecondes + * HERTZ_COMPARE_FORMAT: compare is the frequency in hertz + * PERCENT_COMPARE_FORMAT: compare is the dutycycle in percentage + * RESOLUTION_nB_COMPARE_FORMAT: compare is the dutycycle scaled + * on n bits [0 .. 2^n - 1] + */ + void setCaptureCompare(uint32_t channel, uint32_t compare, TimerCompareFormat_t format = TICK_COMPARE_FORMAT); + + /** + * @brief Set the priority of the interrupt + * @note Must be call before resume() + * @param preemptPriority The pre-emption priority for the IRQn channel + * @param subPriority The subpriority level for the IRQ channel. + */ + void setInterruptPriority(uint32_t preemptPriority, uint32_t subPriority); + + /** + * @brief Attach interrupt callback on update (rollover) event + * @param callback Interrupt callback + */ + void attachInterrupt(callback_function_t callback); + /** + * @brief Detach interrupt callback on update (rollover) event + */ + void detachInterrupt(); + /** + * @brief Checks if there's an interrupt callback attached on Rollover event + * @return returns true if a timer rollover interrupt has already been set + */ + bool hasInterrupt(); + /** + * @brief Attach interrupt callback on Capture/Compare event + * @param channel Arduino channel [1..4] + * @param callback Interrupt callback + */ + void attachInterrupt(uint32_t channel, callback_function_t callback); + /** + * @brief Detach interrupt callback on Capture/Compare event + * @param channel Arduino channel [1..4] + */ + void detachInterrupt(uint32_t channel); + /** + * @brief Checks if there's an interrupt callback attached on Capture/Compare event + * @param channel Arduino channel [1..4] + * @return returns true if a channel compare match interrupt has already been set + */ + bool hasInterrupt(uint32_t channel); + /** + * @brief This function will reset the timer + */ + void timerHandleDeinit(); + + /** + * @brief Generate an update event to force all registers (Autoreload, + * prescaler, compare) to be taken into account + * @note Refresh() can only be called after timer has been initialized, + * either by calling setup() function or thanks to constructor with + * TIM instance parameter. + * It is useful while timer is running after some registers update + */ + void refresh(void); + + /** + * @brief This function return the timer clock frequency. + * @return frequency in Hz + */ + uint32_t getTimerClkFreq(); #if defined(USE_HALV2_DRIVER) - static void captureCompareCallback(hal_tim_handle_t *htim, hal_tim_channel_t hal_channel); // Generic Capture and Compare callback which will call user callback - static void updateCallback(hal_tim_handle_t *htim); // Generic Update (rollover) callback which will call user callback + /** + * @brief Generic Capture and Compare callback which will call user callback + * @param htim HAL timer handle + * @param hal_channel HAL channel which triggered the callback + */ + static void captureCompareCallback(hal_tim_handle_t *htim, hal_tim_channel_t hal_channel); + /** + * @brief Generic Update (rollover) callback which will call user callback + * @param htim HAL timer handle + */ + static void updateCallback(hal_tim_handle_t *htim); #else - static void captureCompareCallback(TIM_HandleTypeDef *htim); // Generic Capture and Compare callback which will call user callback - static void updateCallback(TIM_HandleTypeDef *htim); // Generic Update (rollover) callback which will call user callback + /** + * @brief Generic Capture and Compare callback which will call user callback + * @param htim HAL timer handle + */ + static void captureCompareCallback(TIM_HandleTypeDef *htim); + /** + * @brief Generic Update (rollover) callback which will call user callback + * @param htim HAL timer handle + */ + static void updateCallback(TIM_HandleTypeDef *htim); #endif - void updateRegistersIfNotRunning(TIM_TypeDef *TIMx); // Take into account registers update immediately if timer is not running, - - bool isRunning(); // return true if HardwareTimer is running - bool isRunningChannel(uint32_t channel); // return true if channel is running + /** + * @brief Take into account registers update immediately if timer is not + * running, (independently from Preload setting) + * @param TIMx Timer instance + */ + void updateRegistersIfNotRunning(TIM_TypeDef *TIMx); + + /** + * @brief Check whether HardwareTimer is running (paused or resumed). + * @return return true if the HardwareTimer is running + */ + bool isRunning(); + /** + * @brief Check whether channel is running (paused or resumed). + * @param channel Arduino channel [1..4] + * @return return true if HardwareTimer is running and the channel is enabled + */ + bool isRunningChannel(uint32_t channel); // The following function(s) are available for more advanced timer options #if defined(USE_HALV2_DRIVER) - hal_tim_handle_t *getHandle(); // return the handle address for HAL related configuration + /** + * @brief Return the timer object handle object for more advanced setup + * @note Using this function and editing the Timer handle is at own risk! + * No support will be provided whatsoever if the HardwareTimer does + * not work as expected when editing the handle using the HAL + * functionality or other custom coding. + * @return hal_tim_handle_t address + */ + hal_tim_handle_t *getHandle(); + /** + * @brief Convert arduino channel into HAL channel + * @param channel Arduino channel [1..4] + * @param complementary true to get the complementary (N) channel, false + * for the regular one + * @return HAL channel. Error handler called if arduino channel is invalid + */ hal_tim_channel_t getChannel(uint32_t channel, bool complementary = false); #else - TIM_HandleTypeDef *getHandle(); // return the handle address for HAL related configuration + /** + * @brief Return the timer object handle object for more advanced setup + * @note Using this function and editing the Timer handle is at own risk! + * No support will be provided whatsoever if the HardwareTimer does + * not work as expected when editing the handle using the HAL + * functionality or other custom coding. + * @return TIM_HandleTypeDef address + */ + TIM_HandleTypeDef *getHandle(); + /** + * @brief Convert arduino channel into HAL channel + * @param channel Arduino channel [1..4] + * @return HAL channel. Error handler called if arduino channel is invalid + */ uint32_t getChannel(uint32_t channel); #endif + /** + * @brief Convert arduino channel into LL channels used (regular and/or complementary) + * @param channel Arduino channel [1..4] + * @return LL channel. Error handler called if arduino channel is invalid + */ uint32_t getLLChannel(uint32_t channel); + /** + * @brief Handle itterupt based on arduino channel + * @param channel Arduino channel [1..4] + * @param config Configuration for the interrupt (enable, disable, clear, + * clear and disable) + * @return true if interrupt is enabled, false otherwise + */ bool manageIT(uint32_t channel, ChannelITConfig_t config = DISABLE_IT); + /** + * @brief Get input associated channel + * Channel 1 and 2 are associated; channel 3 and 4 are associated + * @param channel Arduino channel [1..4] + * @return associated channel [1..4]. Error handler called if arduino + * channel is invalid + */ uint32_t getAssociatedChannel(uint32_t channel); private: @@ -236,7 +551,12 @@ class HardwareTimer { extern timerObj_t *HardwareTimer_Handle[TIMER_NUM]; -extern timer_index_t get_timer_index(TIM_TypeDef *htim); +/** + * @brief return timer index from timer handle + * @param instance One of the defined timer + * @return timer index + */ +extern timer_index_t get_timer_index(TIM_TypeDef *instance); #endif /* __cplusplus */ diff --git a/libraries/SrcWrapper/inc/PeripheralPins.h b/libraries/SrcWrapper/inc/PeripheralPins.h index b3c09ad194..48652325c3 100644 --- a/libraries/SrcWrapper/inc/PeripheralPins.h +++ b/libraries/SrcWrapper/inc/PeripheralPins.h @@ -36,102 +36,180 @@ #include "PinAF_STM32F1.h" #endif +/* + * Pin maps: for each peripheral signal, the PinMap array lists the pins that + * can carry it, with the peripheral instance and pin function (see pinmap.h). + * Each array is terminated by an entry with pin NC and peripheral NP. + * They are generated per variant in PeripheralPins.c. + * Unless stated otherwise, an entry holds: pin, peripheral instance and alternate function. + */ //*** ADC *** +/** @brief ADC inputs pin map: pin, ADC instance and pin function (alternate + * function and ADC channel). */ extern const PinMap PinMap_ADC[]; //*** DAC *** +/** @brief DAC outputs pin map: pin, DAC instance and pin function (alternate + * function and DAC channel). */ extern const PinMap PinMap_DAC[]; //*** I2C *** +/** @brief I2C SDA signal pin map. */ extern const PinMap PinMap_I2C_SDA[]; +/** @brief I2C SCL signal pin map. */ extern const PinMap PinMap_I2C_SCL[]; //*** I3C *** +/** @brief I3C SDA signal pin map. */ extern const PinMap PinMap_I3C_SDA[]; +/** @brief I3C SCL signal pin map. */ extern const PinMap PinMap_I3C_SCL[]; //*** TIM *** -/* For backward compatibility */ +/** @brief Backward compatibility alias of #PinMap_TIM */ #define PinMap_PWM PinMap_TIM +/** @brief Timer channels pin map: pin, timer instance and pin function + * (alternate function, timer channel and inverted flag). */ extern const PinMap PinMap_TIM[]; //*** SERIAL *** +/** @brief U(S)ART TX signal pin map. */ extern const PinMap PinMap_UART_TX[]; +/** @brief U(S)ART RX signal pin map. */ extern const PinMap PinMap_UART_RX[]; +/** @brief U(S)ART RTS signal pin map. */ extern const PinMap PinMap_UART_RTS[]; +/** @brief U(S)ART CTS signal pin map. */ extern const PinMap PinMap_UART_CTS[]; //*** SPI *** +/** @brief SPI MOSI signal pin map. */ extern const PinMap PinMap_SPI_MOSI[]; +/** @brief SPI MISO signal pin map. */ extern const PinMap PinMap_SPI_MISO[]; +/** @brief SPI SCLK signal pin map. */ extern const PinMap PinMap_SPI_SCLK[]; +/** @brief SPI SSEL (chip select) signal pin map. */ extern const PinMap PinMap_SPI_SSEL[]; //*** CAN *** +/** @brief CAN RD (receive) signal pin map. */ extern const PinMap PinMap_CAN_RD[]; +/** @brief CAN TD (transmit) signal pin map. */ extern const PinMap PinMap_CAN_TD[]; //*** ETHERNET *** +/** @brief Ethernet signals pin map. */ extern const PinMap PinMap_Ethernet[]; //*** QUADSPI *** +/** @brief QUADSPI DATA0 signal pin map. */ extern const PinMap PinMap_QUADSPI_DATA0[]; +/** @brief QUADSPI DATA1 signal pin map. */ extern const PinMap PinMap_QUADSPI_DATA1[]; +/** @brief QUADSPI DATA2 signal pin map. */ extern const PinMap PinMap_QUADSPI_DATA2[]; +/** @brief QUADSPI DATA3 signal pin map. */ extern const PinMap PinMap_QUADSPI_DATA3[]; +/** @brief QUADSPI SCLK (clock) signal pin map. */ extern const PinMap PinMap_QUADSPI_SCLK[]; +/** @brief QUADSPI NCS1 (chip select, bank 1) signal pin map. */ extern const PinMap PinMap_QUADSPI_NCS1[]; +/** @brief QUADSPI NCS2 (chip select, bank 2) signal pin map. */ extern const PinMap PinMap_QUADSPI_NCS2[]; //*** OCTOSPI *** +/** @brief OCTOSPI DATA0 signal pin map. */ extern const PinMap PinMap_OCTOSPI_DATA0[]; +/** @brief OCTOSPI DATA1 signal pin map. */ extern const PinMap PinMap_OCTOSPI_DATA1[]; +/** @brief OCTOSPI DATA2 signal pin map. */ extern const PinMap PinMap_OCTOSPI_DATA2[]; +/** @brief OCTOSPI DATA3 signal pin map. */ extern const PinMap PinMap_OCTOSPI_DATA3[]; +/** @brief OCTOSPI DATA4 signal pin map. */ extern const PinMap PinMap_OCTOSPI_DATA4[]; +/** @brief OCTOSPI DATA5 signal pin map. */ extern const PinMap PinMap_OCTOSPI_DATA5[]; +/** @brief OCTOSPI DATA6 signal pin map. */ extern const PinMap PinMap_OCTOSPI_DATA6[]; +/** @brief OCTOSPI DATA7 signal pin map. */ extern const PinMap PinMap_OCTOSPI_DATA7[]; +/** @brief OCTOSPI SCLK (clock) signal pin map. */ extern const PinMap PinMap_OCTOSPI_SCLK[]; +/** @brief OCTOSPI NCS1 (chip select, bank 1) signal pin map. */ extern const PinMap PinMap_OCTOSPI_NCS1[]; +/** @brief OCTOSPI NCS2 (chip select, bank 2) signal pin map. */ extern const PinMap PinMap_OCTOSPI_NCS2[]; +/** @brief OCTOSPI NCLK (inverted clock) signal pin map. */ extern const PinMap PinMap_OCTOSPI_NCLK[]; +/** @brief OCTOSPI DQS (data strobe) signal pin map. */ extern const PinMap PinMap_OCTOSPI_DQS[]; //*** XSPI *** +/** @brief XSPI DATA0 signal pin map. */ extern const PinMap PinMap_XSPI_DATA0[]; +/** @brief XSPI DATA1 signal pin map. */ extern const PinMap PinMap_XSPI_DATA1[]; +/** @brief XSPI DATA2 signal pin map. */ extern const PinMap PinMap_XSPI_DATA2[]; +/** @brief XSPI DATA3 signal pin map. */ extern const PinMap PinMap_XSPI_DATA3[]; +/** @brief XSPI DATA4 signal pin map. */ extern const PinMap PinMap_XSPI_DATA4[]; +/** @brief XSPI DATA5 signal pin map. */ extern const PinMap PinMap_XSPI_DATA5[]; +/** @brief XSPI DATA6 signal pin map. */ extern const PinMap PinMap_XSPI_DATA6[]; +/** @brief XSPI DATA7 signal pin map. */ extern const PinMap PinMap_XSPI_DATA7[]; +/** @brief XSPI SCLK (clock) signal pin map. */ extern const PinMap PinMap_XSPI_SCLK[]; +/** @brief XSPI NCS1 (chip select, bank 1) signal pin map. */ extern const PinMap PinMap_XSPI_NCS1[]; +/** @brief XSPI NCS2 (chip select, bank 2) signal pin map. */ extern const PinMap PinMap_XSPI_NCS2[]; +/** @brief XSPI NCLK (inverted clock) signal pin map. */ extern const PinMap PinMap_XSPI_NCLK[]; +/** @brief XSPI DQS (data strobe) signal pin map. */ extern const PinMap PinMap_XSPI_DQS[]; //*** USB *** +/** @brief USB signals (DM/DP) pin map. */ extern const PinMap PinMap_USB[]; +/** @brief USB OTG FS signals pin map. */ extern const PinMap PinMap_USB_OTG_FS[]; +/** @brief USB OTG HS signals pin map. */ extern const PinMap PinMap_USB_OTG_HS[]; //*** SD *** +/** @brief SD CMD signal pin map. */ extern const PinMap PinMap_SD_CMD[]; +/** @brief SD CK (clock) signal pin map. */ extern const PinMap PinMap_SD_CK[]; +/** @brief SD DATA0 signal pin map. */ extern const PinMap PinMap_SD_DATA0[]; +/** @brief SD DATA1 signal pin map. */ extern const PinMap PinMap_SD_DATA1[]; +/** @brief SD DATA2 signal pin map. */ extern const PinMap PinMap_SD_DATA2[]; +/** @brief SD DATA3 signal pin map. */ extern const PinMap PinMap_SD_DATA3[]; +/** @brief SD DATA4 signal pin map. */ extern const PinMap PinMap_SD_DATA4[]; +/** @brief SD DATA5 signal pin map. */ extern const PinMap PinMap_SD_DATA5[]; +/** @brief SD DATA6 signal pin map. */ extern const PinMap PinMap_SD_DATA6[]; +/** @brief SD DATA7 signal pin map. */ extern const PinMap PinMap_SD_DATA7[]; +/** @brief SD CKIN (clock feedback input) signal pin map. */ extern const PinMap PinMap_SD_CKIN[]; +/** @brief SD CDIR (command direction) signal pin map. */ extern const PinMap PinMap_SD_CDIR[]; +/** @brief SD D0DIR (data 0 direction) signal pin map. */ extern const PinMap PinMap_SD_D0DIR[]; +/** @brief SD D123DIR (data 1, 2 and 3 direction) signal pin map. */ extern const PinMap PinMap_SD_D123DIR[]; #endif diff --git a/libraries/SrcWrapper/inc/PinAF_STM32F1.h b/libraries/SrcWrapper/inc/PinAF_STM32F1.h index 1762bc27af..2302bcd205 100644 --- a/libraries/SrcWrapper/inc/PinAF_STM32F1.h +++ b/libraries/SrcWrapper/inc/PinAF_STM32F1.h @@ -174,6 +174,10 @@ enum { #endif }; +/** + * @brief Disconnect the JTAG/SWD debug pins on STM32F1xx. + * @param pin Pin name. + */ static inline void pinF1_DisconnectDebug(PinName pin) { /** Enable this flag gives the possibility to use debug pins without any risk @@ -196,6 +200,10 @@ static inline void pinF1_DisconnectDebug(PinName pin) #endif /* STM32F1_FORCE_DEBUG */ } +/** + * @brief Enable or disable an AFIO remap, selected by an AFIO_*_ENABLE/DISABLE value. + * @param afnum AFIO remap value (AFIO_*_ENABLE or AFIO_*_DISABLE). + */ static inline void pin_SetF1AFPin(uint32_t afnum) { // Enable AFIO clock diff --git a/libraries/SrcWrapper/inc/PinConfigured.h b/libraries/SrcWrapper/inc/PinConfigured.h index caedeecd2f..1aeb8abc9b 100644 --- a/libraries/SrcWrapper/inc/PinConfigured.h +++ b/libraries/SrcWrapper/inc/PinConfigured.h @@ -36,6 +36,8 @@ extern "C" { #endif +/** @brief Index of the pin's port in a pin configured map + * (one 16-bit entry per port) */ #define PINCONF_INDEX(X) (STM_PORT(X)-FirstPort) #define PINCONF_MASK 0x01 @@ -44,10 +46,26 @@ extern "C" { #define PINCONF_VAL(X, Y) ((Y >> PINCONF_SHIFT(X)) & PINCONF_MASK) +/** + * @brief Check whether a pin is flagged as configured. + * @param pin Pin name. + * @param map Pin configured map, one entry per port with a bit per pin. + * @return 1 if the pin is flagged, 0 otherwise. + */ #define is_pin_configured(pin, map) \ (PINCONF_VAL(pin, map[PINCONF_INDEX(pin)])) +/** + * @brief Flag a pin as configured. + * @param pin Pin name. + * @param map Pin configured map, one entry per port with a bit per pin. + */ #define set_pin_configured(pin, map) \ (map[PINCONF_INDEX(pin)] = map[PINCONF_INDEX(pin)] | PINCONF_BIT(pin)) +/** + * @brief Clear the configured flag of a pin. + * @param pin Pin name. + * @param map Pin configured map, one entry per port with a bit per pin. + */ #define reset_pin_configured(pin, map) \ (map[PINCONF_INDEX(pin)] = map[PINCONF_INDEX(pin)] & (~PINCONF_BIT(pin))) diff --git a/libraries/SrcWrapper/inc/PinNames.h b/libraries/SrcWrapper/inc/PinNames.h index ea6d668d05..3075faa992 100644 --- a/libraries/SrcWrapper/inc/PinNames.h +++ b/libraries/SrcWrapper/inc/PinNames.h @@ -20,7 +20,10 @@ extern "C" { #endif -// Alternative possibilities which use other HW peripheral instances +/** + * @name Alternative possibilities which use other HW peripheral instances + * @{ + */ #define ALT0 0x000 #define ALT1 0x100 #define ALT2 0x200 @@ -29,21 +32,30 @@ extern "C" { #define ALT5 0x500 #define ALT6 0x600 #define ALT7 0x700 -// ALTX mask +/** @} */ +/** @brief ALTX mask */ #define ALTX_MASK 0x700 // Specific pinmap definition -// Analog internal +/** @brief Base of the analog internal pin names (PADC_xxx) */ #define PNAME_ANALOG_INTERNAL_BASE 0x1000 -// Dual pad pin -// Direct channels are connected to analog I/Os -// (PY_C) to optimize ADC performance. +/** + * @brief Dual pad pin flag. + * Direct channels are connected to analog I/Os (PY_C) to optimize ADC performance. + */ #define PDUAL 0x2000 -// Remap pin +/** @brief Remap pin flag */ #define PREMAP 0x3000 -// PinName mask +/** @brief PinName mask */ #define PNAME_MASK 0xFF +/** + * @brief Pin names: Pxy_n where x is the port letter and y the pin number, + * followed by the internal analog pins (PADC_xxx) and the pins specific + * to the variant. + * The high nibble of the low byte is the port index and the low nibble + * the pin number. + */ typedef enum { // Not connected NC = 0xFFFFFFFF, @@ -263,18 +275,23 @@ typedef enum { PZ_15 = (PortZ << 4) + 0x0F, #endif // Specific pin name + /** Base of the analog internal pins */ PADC_BASE = PNAME_ANALOG_INTERNAL_BASE, #if defined(ADC_CHANNEL_TEMPSENSOR) || defined(ADC_CHANNEL_TEMPSENSOR_ADC1) ||\ defined(LL_ADC_CHANNEL_TEMPSENSOR) + /** Internal temperature sensor */ PADC_TEMP, #endif #if defined(ADC5) && defined(ADC_CHANNEL_TEMPSENSOR_ADC5) + /** Internal temperature sensor connected to ADC5 */ PADC_TEMP_ADC5, #endif #if defined(ADC_CHANNEL_VREFINT) || defined(LL_ADC_CHANNEL_VREFINT) + /** Internal voltage reference */ PADC_VREF, #endif #ifdef ADC_CHANNEL_VBAT + /** Internal battery voltage */ PADC_VBAT, #endif ANA_START, diff --git a/libraries/SrcWrapper/inc/PinNamesTypes.h b/libraries/SrcWrapper/inc/PinNamesTypes.h index 47272256f5..10c4864ecf 100644 --- a/libraries/SrcWrapper/inc/PinNamesTypes.h +++ b/libraries/SrcWrapper/inc/PinNamesTypes.h @@ -66,6 +66,10 @@ extern "C" { #define STM_PIN_AN_CHAN_BANK_B_SHIFT 22 #define STM_PIN_ANALOG_CHAN_BANK_B_BIT (STM_PIN_AN_CHAN_BANK_B_MASK << STM_PIN_AN_CHAN_BANK_B_SHIFT) +/** @name Accessors of the STM pin data fields + * Return the field of the pin data X + */ +/** @{ */ #define STM_PIN_FUNCTION(X) (((X) >> STM_PIN_FUNCTION_SHIFT) & STM_PIN_FUNCTION_MASK) #define STM_PIN_OD(X) (((X) >> STM_PIN_OD_SHIFT) & STM_PIN_OD_MASK) #define STM_PIN_PUPD(X) (((X) >> STM_PIN_PUPD_SHIFT) & STM_PIN_PUPD_MASK) @@ -75,13 +79,25 @@ extern "C" { #define STM_PIN_INVERTED(X) (((X) >> STM_PIN_INV_SHIFT) & STM_PIN_INV_MASK) #define STM_PIN_ANALOG_CONTROL(X) (((X) >> STM_PIN_AN_CTRL_SHIFT) & STM_PIN_AN_CTRL_MASK) #define STM_PIN_ANALOG_CHANNEL_BANK_B(X) (((X) >> STM_PIN_AN_CHAN_BANK_B_SHIFT) & STM_PIN_AN_CHAN_BANK_B_MASK) +/** @} */ +/** @brief Mode of the pin data X: function and Push-Pull/Open Drain + * configuration */ #define STM_PIN_MODE(X) ((STM_PIN_OD((X)) << 4) | \ (STM_PIN_FUNCTION((X)) & (~STM_PIN_OD_BITS))) +/** + * @brief Build the pin data from the function/output type (FUNC_OD), the pull + * configuration (PUPD) + * and the alternate function number (AFNUM). + */ #define STM_PIN_DEFINE(FUNC_OD, PUPD, AFNUM) ((int)(FUNC_OD) |\ ((PUPD & STM_PIN_PUPD_MASK) << STM_PIN_PUPD_SHIFT) |\ ((AFNUM & STM_PIN_AFNUM_MASK) << STM_PIN_AFNUM_SHIFT)) +/** + * @brief Same as STM_PIN_DEFINE() with the Analog/Timer specific channel (CHAN) + * and its inverted flag (INV). + */ #define STM_PIN_DEFINE_EXT(FUNC_OD, PUPD, AFNUM, CHAN, INV) \ ((int)(FUNC_OD) |\ ((PUPD & STM_PIN_PUPD_MASK) << STM_PIN_PUPD_SHIFT) |\ @@ -94,11 +110,14 @@ extern "C" { * The STM_MODE_ defines contain the function and the Push-pull/OpenDrain * configuration (legacy inheritance). */ +/** @brief Legacy alias of STM_PIN_DEFINE() */ #define STM_PIN_DATA(FUNC_OD, PUPD, AFNUM) \ STM_PIN_DEFINE(FUNC_OD, PUPD, AFNUM) +/** @brief Legacy alias of STM_PIN_DEFINE_EXT() */ #define STM_PIN_DATA_EXT(FUNC_OD, PUPD, AFNUM, CHANNEL, INVERTED) \ STM_PIN_DEFINE_EXT(FUNC_OD, PUPD, AFNUM, CHANNEL, INVERTED) +/** @brief Pin function, as in the MODER register */ typedef enum { STM_PIN_INPUT = 0, STM_PIN_OUTPUT = 1, @@ -106,6 +125,10 @@ typedef enum { STM_PIN_ANALOG = 3, } StmPinFunction; +/** + * @name Pin modes: function and Push-Pull/Open Drain configuration + * @{ + */ #define STM_MODE_INPUT (STM_PIN_INPUT) #define STM_MODE_OUTPUT_PP (STM_PIN_OUTPUT) #define STM_MODE_OUTPUT_OD (STM_PIN_OUTPUT | STM_PIN_OD_BITS) @@ -114,17 +137,22 @@ typedef enum { #define STM_MODE_ANALOG (STM_PIN_ANALOG) #define STM_MODE_ANALOG_ADC_CONTROL (STM_PIN_ANALOG | STM_PIN_ANALOG_CONTROL_BIT) #define STM_MODE_ANALOG_ADC_CHANNEL_BANK_B (STM_PIN_ANALOG | STM_PIN_ANALOG_CHAN_BANK_B_BIT) +/** @} */ -// High nibble = port number (FirstPort <= PortName <= LastPort) -// Low nibble = pin number +/** @brief Port index of a PinName: high nibble + * (FirstPort <= PortName <= LastPort) */ #define STM_PORT(X) (((uint32_t)(X) >> 4) & 0xF) +/** @brief Pin number of a PinName: low nibble */ #define STM_PIN(X) ((uint32_t)(X) & 0xF) // Check PinName is valid: FirstPort <= PortName <= LastPort // As FirstPort is equal to 0 and STM_PORT cast as an unsigned // (STM_PORT(X) >= FirstPort) is always true //#define STM_VALID_PINNAME(X) ((STM_PORT(X) >= FirstPort) && (STM_PORT(X) <= LastPort)) +/** @brief Check a PinName is valid: its port index is not greater than + * LastPort */ #define STM_VALID_PINNAME(X) (STM_PORT(X) <= LastPort) +/** @brief GPIO pin mask of a PinName, as used by the HAL (GPIO_PIN_x) */ #define STM_GPIO_PIN(X) ((uint16_t)(1<CYCCNT); diff --git a/libraries/SrcWrapper/inc/hw_config.h b/libraries/SrcWrapper/inc/hw_config.h index 269465c222..d15d60abcd 100644 --- a/libraries/SrcWrapper/inc/hw_config.h +++ b/libraries/SrcWrapper/inc/hw_config.h @@ -51,6 +51,10 @@ extern "C" { /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ +/** + * @brief Performs the global initialization of the system (HAL, IOs...). + * @note Called once at startup, before setup(). + */ void hw_config_init(void); #ifdef __cplusplus diff --git a/libraries/SrcWrapper/inc/interrupt.h b/libraries/SrcWrapper/inc/interrupt.h index 5a3420ccbf..6452469500 100644 --- a/libraries/SrcWrapper/inc/interrupt.h +++ b/libraries/SrcWrapper/inc/interrupt.h @@ -51,12 +51,15 @@ #ifndef EXTI_IRQ_PRIO #if (__CORTEX_M == 0x00U) + /** @brief Default EXTI IRQ pre-emption priority (Cortex-M0/M0+) */ #define EXTI_IRQ_PRIO 3 #else + /** @brief Default EXTI IRQ pre-emption priority */ #define EXTI_IRQ_PRIO 6 #endif /* __CORTEX_M */ #endif /* EXTI_IRQ_PRIO */ #ifndef EXTI_IRQ_SUBPRIO + /** @brief Default EXTI IRQ sub-priority */ #define EXTI_IRQ_SUBPRIO 0 #endif @@ -64,10 +67,26 @@ #include typedef std::function callback_function_t; + /** + * @brief Enable the EXTI interrupt on a pin and register its callback. + * The pin is configured as an interrupt input, keeping its current + * pull configuration, and the EXTI IRQ is enabled with + * EXTI_IRQ_PRIO / EXTI_IRQ_SUBPRIO priorities. + * @param pn Pin name (e.g. PA_0) to attach the interrupt to. + * @param callback Function called when the interrupt fires. + * @param mode Trigger mode, e.g. GPIO_MODE_IT_RISING, GPIO_MODE_IT_FALLING + * or GPIO_MODE_IT_RISING_FALLING (hal_exti_trigger_t when USE_HALV2_DRIVER). + */ void stm32_interrupt_enable(PinName pn, callback_function_t callback, uint32_t mode); #endif /* Exported functions ------------------------------------------------------- */ + /** + * @brief Disable the EXTI interrupt on a pin and clear its callback. + * @param port GPIO port of the pin (only used on STM32WB0x and STM32WL3x, + * where the GPIO IRQ is shared by all the pins of a port). + * @param pin GPIO pin mask (e.g. GPIO_PIN_0) to disable. + */ void stm32_interrupt_disable(GPIO_TypeDef *port, uint16_t pin); #endif /* !HAL_EXTI_MODULE_DISABLED */ diff --git a/libraries/SrcWrapper/inc/lock_resource.h b/libraries/SrcWrapper/inc/lock_resource.h index 09f5382264..8d343c0e9c 100644 --- a/libraries/SrcWrapper/inc/lock_resource.h +++ b/libraries/SrcWrapper/inc/lock_resource.h @@ -23,6 +23,7 @@ extern "C" { #endif /* Exported types ------------------------------------------------------------*/ +/** @brief Status returned by lock resource operations */ typedef enum { LOCK_RESOURCE_STATUS_OK = 0x00U, LOCK_RESOURCE_STATUS_ERROR = 0x01U, @@ -171,21 +172,23 @@ typedef enum { #define CFG_HW_EXTI_SEMID (HSEM_SEMID_MAX +1) #endif -/* Hardware Semaphore wait forever value */ +/** @brief Hardware Semaphore wait forever value */ #define HSEM_LOCK_WAIT_FOREVER 0xFFFFFFFFU -/* Hardware Semaphore default retry value */ #ifndef HSEM_LOCK_DEFAULT_RETRY +/** @brief Hardware Semaphore default retry value */ #define HSEM_LOCK_DEFAULT_RETRY 0xFFFFU #endif -/* - * @brief hsem_lock function is used for register protection of shared Peripheral - * and shall be called before accessing registers of this shared Peripheral - * If Semaphore id is already taken, the function will busy loop waiting for it to - * be released, but give up after @retry downcounter have elapsed - * @param semID: Semaphore id used to identify which peripheral to protect - * @param retry: number of retry - * @retval None +/** + * @brief Acquire a hardware semaphore to protect a shared peripheral. + * Used for register protection of a shared peripheral, it shall be + * called before accessing the registers of this peripheral. + * If the semaphore is already taken, the function busy-waits for it to + * be released, but gives up after the retry down-counter has elapsed + * (Error_Handler() is then called). + * @param semID Semaphore ID used to identify which peripheral to protect. + * @param retry Number of retries (HSEM_LOCK_WAIT_FOREVER to wait indefinitely). + * @note Only effective on STM32MP1xx and STM32WBxx, it does nothing on other series. */ static inline void hsem_lock(uint32_t semID, uint32_t retry) { @@ -206,10 +209,10 @@ static inline void hsem_lock(uint32_t semID, uint32_t retry) #endif /* STM32MP1xx || STM32WBxx */ } -/* - * @brief hsem_unlock released a previously-acquired semaphore - * @param semID Semaphore id used to identify which peripheral to release - * @retval None +/** + * @brief Release a previously acquired hardware semaphore. + * @param semID Semaphore ID used to identify which peripheral to release. + * @note Only effective on STM32MP1xx and STM32WBxx, it does nothing on other series. */ static inline void hsem_unlock(uint32_t semID) { diff --git a/libraries/SrcWrapper/inc/otp.h b/libraries/SrcWrapper/inc/otp.h index 0826098a84..692c9c7532 100644 --- a/libraries/SrcWrapper/inc/otp.h +++ b/libraries/SrcWrapper/inc/otp.h @@ -47,8 +47,8 @@ typedef struct __packed { * | 8bits | 58bits | * | MSB | LSB | * - * @param id: ID of the parameter to read from OTP - * @retval Address of the ID in the OTP - returns 0 when no ID found + * @param id ID of the parameter to read from OTP. + * @return Address of the ID in the OTP, or 0 when no ID is found. */ uint8_t *OTP_Read(uint8_t id); diff --git a/libraries/SrcWrapper/inc/pinconfig.h b/libraries/SrcWrapper/inc/pinconfig.h index 59f63b0c7c..48c5d036e1 100644 --- a/libraries/SrcWrapper/inc/pinconfig.h +++ b/libraries/SrcWrapper/inc/pinconfig.h @@ -19,6 +19,11 @@ #include "lock_resource.h" #include "stm32yyxx_ll_gpio.h" +/** + * @brief Disconnect the debug pins (JTAG/SWD) so they can be used as GPIO. + * @param pin Pin name. + * @note Only acts on STM32F1xx; no-op on other families. + */ static inline void pin_DisconnectDebug(PinName pin) { #ifdef STM32F1xx @@ -28,6 +33,14 @@ static inline void pin_DisconnectDebug(PinName pin) #endif /* STM32F1xx */ } +/** + * @brief Set the pull configuration of a GPIO pin. + * @param gpio GPIO port of the pin. + * @param ll_pin LL GPIO pin mask (see STM_LL_GPIO_PIN). + * @param pull_config LL_GPIO_PULL_NO, LL_GPIO_PULL_UP or LL_GPIO_PULL_DOWN. + * @note On STM32F1xx, a pin without pull is set to floating input. + * On other series the GPIO hardware semaphore is taken during the update. + */ static inline void pin_PullConfig(GPIO_TypeDef *gpio, uint32_t ll_pin, uint32_t pull_config) { #ifdef STM32F1xx @@ -51,6 +64,12 @@ static inline void pin_PullConfig(GPIO_TypeDef *gpio, uint32_t ll_pin, uint32_t #endif } +/** + * @brief Set the alternate function number of a GPIO pin. + * @param gpio GPIO port of the pin. + * @param pin Pin name. + * @param afnum Alternate function number (AFIO remap value on STM32F1xx). + */ static inline void pin_SetAFPin(GPIO_TypeDef *gpio, PinName pin, uint32_t afnum) { #ifdef STM32F1xx diff --git a/libraries/SrcWrapper/inc/pinmap.h b/libraries/SrcWrapper/inc/pinmap.h index 60ff991c0b..8c17e3e8f3 100644 --- a/libraries/SrcWrapper/inc/pinmap.h +++ b/libraries/SrcWrapper/inc/pinmap.h @@ -34,30 +34,107 @@ extern const uint32_t pin_map_ll[16]; #endif #define STM_LL_GPIO_PIN(X) (pin_map_ll[STM_PIN(X)]) -// No peripheral +/** No peripheral. */ #define NP 0U +/** Pin, peripheral instance and alternate function of one pin mapping entry. */ typedef struct { - PinName pin; - void *peripheral; - int function; + PinName pin; /**< Pin name. */ + void *peripheral; /**< Peripheral instance. */ + int function; /**< Alternate function number. */ } PinMap; +/** + * @brief Check whether a pin is present in a pinmap. + * @param pin Pin name to look for. + * @param map PinMap array, terminated by an entry with pin NC. + * @return true if the pin is found in the map, false otherwise. + */ bool pin_in_pinmap(PinName pin, const PinMap *map); + +/** + * @brief Configure a pin: mode, speed, output type, pull-up/pull-down and alternate function. + * @param pin Pin name. + * @param function Pin function, encoded with the STM_PIN_* macros. + * @note Error_Handler is called if the pin is NC or the mode is unknown. + * @note On series with dualpad analog switch (Pxy_C pins), the analog + * switch is also configured, and the GPIO configuration is skipped + * when an analog function is requested on the dualpad pin. + */ void pin_function(PinName pin, int function); +/** + * @brief Get the pin name of a PinMap entry. + * @param map PinMap entry. + * @return Pin name stored in the entry. + */ static inline PinName pin_pinName(const PinMap *map) { return map->pin; } +/** + * @brief Configure a pin from a pinmap entry matching the pin. + * @param pin Pin name. Nothing is done if the pin is NC. + * @param map PinMap array, terminated by an entry with pin NC. + * @note Error_Handler is called if the pin is not found in the map. + */ void pinmap_pinout(PinName pin, const PinMap *map); + +/** + * @brief Find the peripheral associated with a pin. + * @param pin Pin name. + * @param map PinMap array, terminated by an entry with pin NC. + * @return Peripheral pointer, or NP if not found. + */ void *pinmap_find_peripheral(PinName pin, const PinMap *map); + +/** + * @brief Find the peripheral associated with a pin, ignoring NC pins. + * @param pin Pin name. + * @param map PinMap array, terminated by an entry with pin NC. + * @return Peripheral pointer, or NP if the pin is NC or not found. + */ void *pinmap_peripheral(PinName pin, const PinMap *map); + +/** + * @brief Find the pin associated with a peripheral. + * @param peripheral Peripheral pointer. + * @param map PinMap array, terminated by an entry with peripheral NP. + * @return Pin name, or NC if not found. + */ PinName pinmap_find_pin(void *peripheral, const PinMap *map); + +/** + * @brief Find the pin associated with a peripheral, ignoring NP peripherals. + * @param peripheral Peripheral pointer. + * @param map PinMap array, terminated by an entry with peripheral NP. + * @return Pin name, or NC if the peripheral is NP or not found. + */ PinName pinmap_pin(void *peripheral, const PinMap *map); + +/** + * @brief Find the function associated with a pin. + * @param pin Pin name. + * @param map PinMap array, terminated by an entry with pin NC. + * @return Function value, or NC cast to uint32_t if not found. + */ uint32_t pinmap_find_function(PinName pin, const PinMap *map); + +/** + * @brief Find the function associated with a pin, ignoring NC pins. + * @param pin Pin name. + * @param map PinMap array, terminated by an entry with pin NC. + * @return Function value, or NC cast to uint32_t if the pin is NC or not found. + */ uint32_t pinmap_function(PinName pin, const PinMap *map); + +/** + * @brief Merge two peripheral pointers that may be NP. + * @param a First peripheral pointer. + * @param b Second peripheral pointer. + * @return The peripheral that is set, or a if both are the same. NP if they conflict. + */ void *pinmap_merge_peripheral(void *a, void *b); #ifdef __cplusplus diff --git a/libraries/SrcWrapper/inc/stm32_def.h b/libraries/SrcWrapper/inc/stm32_def.h index f63b83de26..1f98545d29 100644 --- a/libraries/SrcWrapper/inc/stm32_def.h +++ b/libraries/SrcWrapper/inc/stm32_def.h @@ -89,6 +89,7 @@ #endif /* USE_HALV2_DRIVER */ #ifndef F_CPU + /** @brief CPU frequency in Hz */ #define F_CPU SystemCoreClock #endif @@ -149,54 +150,55 @@ #endif /** - * @brief Get Binary mode (Sub Second Register) - * @rmtoll RTC_ICSR BIN LL_RTC_GetBinaryMode - * @param RTCx RTC Instance - * @retval This parameter can be one of the following values: - * @arg @ref LL_RTC_BINARY_NONE - * @arg @ref LL_RTC_BINARY_ONLY - * @arg @ref LL_RTC_BINARY_MIX - * @retval None - */ + * @brief Get Binary mode (Sub Second Register) + * @rmtoll RTC_ICSR BIN LL_RTC_GetBinaryMode + * @param RTCx RTC Instance + * @return Binary mode, one of the following values: + * @li @ref LL_RTC_BINARY_NONE + * @li @ref LL_RTC_BINARY_ONLY + * @li @ref LL_RTC_BINARY_MIX + */ __STATIC_INLINE uint32_t LL_RTC_GetBinaryMode(const RTC_TypeDef *RTCx) { return (uint32_t)(READ_BIT(RTCx->ICSR, RTC_ICSR_BIN)); } /** - * @brief Set Binary mode (Sub Second Register) - * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. - * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function). - * @rmtoll RTC_ICSR BIN LL_RTC_SetBinaryMode - * @param RTCx RTC Instance - * @param BinaryMode can be one of the following values: - * @arg @ref LL_RTC_BINARY_NONE - * @arg @ref LL_RTC_BINARY_ONLY - * @arg @ref LL_RTC_BINARY_MIX - * @retval None - */ + * @brief Set Binary mode (Sub Second Register) + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function + * should be called before. + * @note It can be written in initialization mode only + * (@ref LL_RTC_EnableInitMode function). + * @rmtoll RTC_ICSR BIN LL_RTC_SetBinaryMode + * @param RTCx RTC Instance + * @param BinaryMode can be one of the following values: + * @li @ref LL_RTC_BINARY_NONE + * @li @ref LL_RTC_BINARY_ONLY + * @li @ref LL_RTC_BINARY_MIX + */ __STATIC_INLINE void LL_RTC_SetBinaryMode(RTC_TypeDef *RTCx, uint32_t BinaryMode) { MODIFY_REG(RTCx->ICSR, RTC_ICSR_BIN, BinaryMode); } /** - * @brief Set Binary Mix mode BCDU - * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before. - * @note It can be written in initialization mode only (@ref LL_RTC_EnableInitMode function). - * @rmtoll RTC_ICSR BCDU LL_RTC_SetBinMixBCDU - * @param RTCx RTC Instance - * @param BinMixBcdU can be one of the following values: - * @arg @ref LL_RTC_BINARY_MIX_BCDU_0 - * @arg @ref LL_RTC_BINARY_MIX_BCDU_1 - * @arg @ref LL_RTC_BINARY_MIX_BCDU_2 - * @arg @ref LL_RTC_BINARY_MIX_BCDU_3 - * @arg @ref LL_RTC_BINARY_MIX_BCDU_4 - * @arg @ref LL_RTC_BINARY_MIX_BCDU_5 - * @arg @ref LL_RTC_BINARY_MIX_BCDU_6 - * @arg @ref LL_RTC_BINARY_MIX_BCDU_7 - * @retval None - */ + * @brief Set Binary Mix mode BCDU + * @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function + * should be called before. + * @note It can be written in initialization mode only + * (@ref LL_RTC_EnableInitMode function). + * @rmtoll RTC_ICSR BCDU LL_RTC_SetBinMixBCDU + * @param RTCx RTC Instance + * @param BinMixBcdU can be one of the following values: + * @li @ref LL_RTC_BINARY_MIX_BCDU_0 + * @li @ref LL_RTC_BINARY_MIX_BCDU_1 + * @li @ref LL_RTC_BINARY_MIX_BCDU_2 + * @li @ref LL_RTC_BINARY_MIX_BCDU_3 + * @li @ref LL_RTC_BINARY_MIX_BCDU_4 + * @li @ref LL_RTC_BINARY_MIX_BCDU_5 + * @li @ref LL_RTC_BINARY_MIX_BCDU_6 + * @li @ref LL_RTC_BINARY_MIX_BCDU_7 + */ __STATIC_INLINE void LL_RTC_SetBinMixBCDU(RTC_TypeDef *RTCx, uint32_t BinMixBcdU) { MODIFY_REG(RTCx->ICSR, RTC_ICSR_BCDU, BinMixBcdU); @@ -243,6 +245,7 @@ __STATIC_INLINE void LL_RTC_SetBinMixBCDU(RTC_TypeDef *RTCx, uint32_t BinMixBcdU * Libc porting layers */ #if defined ( __GNUC__ ) /* GCC CS3 */ + /** @brief Mark a function as weak, i.e. overridable by the user */ #define WEAK __attribute__ ((weak)) #endif @@ -251,10 +254,14 @@ extern "C" { #endif // __cplusplus // weaked functions declaration +/** + * @brief Configure the system clock. Overridable by the board variant. + */ void SystemClock_Config(void); #if defined(NDEBUG) #if !defined(_Error_Handler) +/** @brief In release builds (NDEBUG): loop forever, no message is reported */ #define _Error_Handler(str, value) \ while (1) {\ (void)str;\ @@ -262,13 +269,23 @@ void SystemClock_Config(void); } #endif #if !defined(Error_Handler) +/** @brief In release builds (NDEBUG): loop forever */ #define Error_Handler() \ while (1) {\ } #endif #else -void _Error_Handler(const char *, int); +/** + * @brief Function executed in case of error occurrence: report the error + * with core_debug() and halt execution. + * @param msg Error message (typically __FILE__). + * @param val Error value (typically __LINE__). + * @note Weak function: user can add his own implementation to report the HAL + * error return state. + */ +void _Error_Handler(const char *msg, int val); +/** @brief Report the current source file and line with _Error_Handler() */ #define Error_Handler() _Error_Handler(__FILE__, __LINE__) #endif diff --git a/libraries/SrcWrapper/inc/timer.h b/libraries/SrcWrapper/inc/timer.h index 3e484accc5..0ecf558d7a 100644 --- a/libraries/SrcWrapper/inc/timer.h +++ b/libraries/SrcWrapper/inc/timer.h @@ -27,12 +27,15 @@ extern "C" { /* Exported constants --------------------------------------------------------*/ #ifndef TIM_IRQ_PRIO #if (__CORTEX_M == 0x00U) +/** @brief Default timer IRQ pre-emption priority (Cortex-M0/M0+) */ #define TIM_IRQ_PRIO 3 #else +/** @brief Default timer IRQ pre-emption priority */ #define TIM_IRQ_PRIO 14 #endif /* __CORTEX_M */ #endif /* TIM_IRQ_PRIO */ #ifndef TIM_IRQ_SUBPRIO +/** @brief Default timer IRQ sub-priority */ #define TIM_IRQ_SUBPRIO 0 #endif @@ -205,6 +208,8 @@ extern "C" { #endif #endif +/** @brief Index of each timer available on the series, used to access + * HardwareTimer_Handle */ typedef enum { #if defined(TIM1_BASE) TIMER1_INDEX, @@ -277,36 +282,82 @@ typedef enum { } timer_index_t; -// This structure is used to be able to get HardwareTimer instance (C++ class) -// from handler (C structure) specially for interrupt management +/** + * @brief Timer object, used to retrieve the HardwareTimer instance (C++ + * class) from the HAL handle (C structure), especially for interrupt management. + */ typedef struct { // Those 2 first fields must remain in this order at the beginning of the structure + /** Pointer to the HardwareTimer instance */ void *__this; #if defined(USE_HALV2_DRIVER) + /** HAL timer handle */ hal_tim_handle_t handle; #else + /** HAL timer handle */ TIM_HandleTypeDef handle; #endif + /** Timer instance */ TIM_TypeDef *instance; + /** Pre-emption priority of the timer interrupts */ uint32_t preemptPriority; + /** Sub-priority of the timer interrupts */ uint32_t subPriority; } timerObj_t; /* Exported functions ------------------------------------------------------- */ +/** + * @brief Get the timerObj_t that embeds a HAL timer handle. + * @param htim HAL timer handle stored inside a timerObj_t. + * @return Pointer to the enclosing timerObj_t. + */ #if defined(USE_HALV2_DRIVER) timerObj_t *get_timer_obj(hal_tim_handle_t *htim); #else timerObj_t *get_timer_obj(TIM_HandleTypeDef *htim); #endif + +/** + * @brief Enable the clock of a timer instance. + * @param instance Timer instance (e.g. TIM1). + */ void enableTimerClock(TIM_TypeDef *instance); + +/** + * @brief Disable the clock of a timer instance. + * @param instance Timer instance (e.g. TIM1). + */ void disableTimerClock(TIM_TypeDef *instance); -uint32_t getTimerIrq(TIM_TypeDef *tim); +/** + * @brief Get the clock source of a timer instance. + * @param tim Timer instance. + * @return 1 for PCLK1, 2 for PCLK2. _Error_Handler is called if the instance is unknown. + */ uint8_t getTimerClkSrc(TIM_TypeDef *tim); +/** + * @brief Get the IRQ number of the update interrupt event of a timer instance. + * @param tim Timer instance. + * @return IRQ number of the update interrupt. + * @note _Error_Handler is called if the instance is unknown. + */ IRQn_Type getTimerUpIrq(TIM_TypeDef *tim); + +/** + * @brief Get the IRQ number of the Capture or Compare interrupt event of a timer instance. + * @param tim Timer instance. + * @return IRQ number of the capture/compare interrupt. + * @note _Error_Handler is called if the instance is unknown. + */ IRQn_Type getTimerCCIrq(TIM_TypeDef *tim); +/** + * @brief Get the HAL timer channel linked to a pin. + * @param pin PinName with a timer function. + * @return Valid HAL channel. Inverted pins map to the complementary (N) channel. + * @note _Error_Handler is called if the pin channel is unknown. + */ #if defined(USE_HALV2_DRIVER) hal_tim_channel_t getTimerChannel(PinName pin); #else diff --git a/libraries/SrcWrapper/inc/uart.h b/libraries/SrcWrapper/inc/uart.h index de8fb0e20e..9425070ff7 100644 --- a/libraries/SrcWrapper/inc/uart.h +++ b/libraries/SrcWrapper/inc/uart.h @@ -51,48 +51,73 @@ extern "C" { #else #ifndef UART_IRQ_PRIO +/** @brief Default UART IRQ pre-emption priority */ #define UART_IRQ_PRIO 1 #endif #ifndef UART_IRQ_SUBPRIO +/** @brief Default UART IRQ sub-priority */ #define UART_IRQ_SUBPRIO 0 #endif /* Exported types ------------------------------------------------------------*/ typedef struct serial_s serial_t; +/** + * @brief Serial (U(S)ART) object + */ struct serial_s { /* The 1st 2 members USART_TypeDef *uart * and UART_HandleTypeDef handle should * be kept as the first members of this struct * to have get_serial_obj() function work as expected */ + /** U(S)ART peripheral instance */ USART_TypeDef *uart; #if defined(USE_HALV2_DRIVER) + /** HAL UART handle */ hal_uart_handle_t handle; #else + /** HAL UART handle */ UART_HandleTypeDef handle; #endif + /** Called when a byte has been received */ void (*rx_callback)(serial_t *); + /** Called when a transmission is completed */ int (*tx_callback)(serial_t *); + /** TX pin */ PinName pin_tx; + /** RX pin, NC for half-duplex mode */ PinName pin_rx; + /** RTS pin, NC if not used */ PinName pin_rts; + /** CTS pin, NC if not used */ PinName pin_cts; + /** U(S)ART IRQ number */ IRQn_Type irq; + /** Index of the peripheral in the internal handlers table */ uint8_t index; + /** Last received byte */ uint8_t recv; + /** RX ring buffer */ uint8_t *rx_buff; + /** TX ring buffer */ uint8_t *tx_buff; + /** RX buffer tail index */ uint16_t rx_tail; + /** TX buffer head index */ uint16_t tx_head; + /** RX buffer head index */ volatile uint16_t rx_head; + /** TX buffer tail index */ volatile uint16_t tx_tail; + /** Number of bytes of the transfer in progress */ size_t tx_size; }; /* Exported constants --------------------------------------------------------*/ #ifndef TX_TIMEOUT +/** @brief Transmission timeout in ms */ #define TX_TIMEOUT 1000 #endif @@ -260,28 +285,111 @@ struct serial_s { /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ +/** + * @brief Initialize the UART interface. + * The U(S)ART peripheral is deduced from the pins set in obj (pin_tx, + * pin_rx, pin_rts, pin_cts). + * Swapped TX/RX pins are supported when the series allows it. + * If pin_rx is NC, the UART is configured in half-duplex mode. + * @param obj Pointer to serial_t structure. + * @param baudrate Baud rate. + * @param databits Word length. + * @param parity Parity configuration. + * @param stopbits Number of stop bits. + * @param rx_invert Invert the RX line. + * @param tx_invert Invert the TX line. + * @param data_invert Invert the data bits. + * @return true on success, false otherwise (obj is NULL, pins do not match the + * same U(S)ART peripheral or HAL initialization failed). + */ #if defined(USE_HALV2_DRIVER) bool uart_init(serial_t *obj, uint32_t baudrate, hal_uart_word_length_t databits, hal_uart_parity_t parity, hal_uart_stop_bits_t stopbits, bool rx_invert, bool tx_invert, bool data_invert); #else bool uart_init(serial_t *obj, uint32_t baudrate, uint32_t databits, uint32_t parity, uint32_t stopbits, bool rx_invert, bool tx_invert, bool data_invert); #endif +/** + * @brief Deinitialize the UART interface: reset the peripheral and disable its clock. + * @param obj Pointer to serial_t structure. + */ void uart_deinit(serial_t *obj); +/** + * @brief Configure the UART interface for low power operation: + * select HSI (LSE on STM32WB0x) as the source clock of the low power + * wakeup and enable the wakeup EXTI line when available. + * @param obj Pointer to serial_t structure. + */ #if defined(HAL_PWR_MODULE_ENABLED) && (defined(UART_IT_WUF) || defined(LPUART1_BASE)) void uart_config_lowpower(serial_t *obj); #endif +/** + * @brief Read the last received byte from the UART and restart the RX interrupt. + * @param obj Pointer to serial_t structure. + * @param c Pointer where the received character is stored. + * @return 0 on success, -1 if obj is NULL or a reception is ongoing. + */ int uart_getc(serial_t *obj, unsigned char *c); +/** + * @brief Begin an asynchronous RX transfer (enable interrupt for data + * collecting). + * Does nothing if obj is NULL or a reception is already ongoing. + * @param obj Pointer to serial_t structure. + * @param callback Function called at the end of reception. + */ void uart_attach_rx_callback(serial_t *obj, void (*callback)(serial_t *)); +/** + * @brief Begin an asynchronous TX transfer (enable interrupt for data sending). + * @param obj Pointer to serial_t structure. + * @param callback Function called at the end of transmission. + * @param size Number of bytes to transmit, starting at the tx_tail index of + * the TX buffer. + */ void uart_attach_tx_callback(serial_t *obj, int (*callback)(serial_t *), size_t size); +/** + * @brief Determine if the serial peripheral is already in use for TX. + * @param obj The serial object. + * @return Non-zero if the TX transaction is ongoing, 0 otherwise. + */ uint8_t serial_tx_active(serial_t *obj); +/** + * @brief Determine if the serial peripheral is already in use for RX. + * @param obj The serial object. + * @return Non-zero if the RX transaction is ongoing, 0 otherwise. + */ uint8_t serial_rx_active(serial_t *obj); +/** + * @brief Enable the transmitter for half-duplex mode (when pin_rx is NC). + * No-op in full-duplex mode. + * @param obj Pointer to serial_t structure. + */ void uart_enable_tx(serial_t *obj); +/** + * @brief Enable the receiver for half-duplex mode (when pin_rx is NC). + * No-op in full-duplex mode. + * @param obj Pointer to serial_t structure. + */ void uart_enable_rx(serial_t *obj); +/** + * @brief Write data on the UART, used by printf for debug only (syscalls). + * The debug UART (DEBUG_UART) is initialized on first use if no Serial + * instance already uses it. + * @param data Bytes to write. + * @param size Number of bytes to write. + * @return The number of bytes written, 0 on error or timeout (TX_TIMEOUT). + */ size_t uart_debug_write(uint8_t *data, uint32_t size); #if defined(LPUART1_BASE) || defined(LPUART2_BASE) +/** + * @brief Configure the LPUART stop mode according to the baud rate: + * stop mode is enabled for baud rates up to 9600, disabled otherwise. + * LPUART clock source must be in the range + * [3 x baud rate, 4096 x baud rate]. + * @param huart uart handle structure. + * @param baudrate Baud rate (HALv2 driver only, otherwise taken from the handle). + */ #if defined(USE_HALV2_DRIVER) void uart_init_lpuart(hal_uart_handle_t *huart, uint32_t baudrate); #else @@ -289,11 +397,31 @@ void uart_init_lpuart(UART_HandleTypeDef *huart); #endif #endif +/** + * @brief Compute the UART clock prescaler: the first one giving a valid baud + * rate divider for the current kernel clock (LPUART instances have + * their own valid range). + * @param huart uart handle structure. + * @param config uart configuration structure (HALv2 driver only). + * @return The clock prescaler. + */ #if defined(USE_HALV2_DRIVER) hal_uart_prescaler_t uart_compute_prescaler(hal_uart_handle_t *huart, hal_uart_config_t *config); #endif #if defined(UART_PRESCALER_DIV1) +/** + * @brief Compute the UART clock prescaler: the first one giving a valid baud + * rate divider for the current clock source (LPUART instances have + * their own valid range). + * @param huart uart handle structure. + * @return The clock prescaler. + */ uint32_t uart_compute_prescaler(UART_HandleTypeDef *huart); +/** + * @brief Get the clock source frequency of the UART. + * @param huart uart handle structure. + * @return The clock source frequency in Hz. + */ uint32_t uart_get_clock_source_freq(UART_HandleTypeDef *huart); #endif #endif /* HAL_UART_MODULE_ENABLED && !HAL_UART_MODULE_ONLY */ diff --git a/libraries/SrcWrapper/src/HardwareTimer.cpp b/libraries/SrcWrapper/src/HardwareTimer.cpp index 9bb50bee23..147f082816 100644 --- a/libraries/SrcWrapper/src/HardwareTimer.cpp +++ b/libraries/SrcWrapper/src/HardwareTimer.cpp @@ -50,41 +50,17 @@ timerObj_t *HardwareTimer_Handle[TIMER_NUM] = {NULL}; #endif #endif -/** - * @brief HardwareTimer constructor: make uninitialized timer - * Before calling any methods, call setup to select and setup - * the timer to be used. - * @retval None - */ HardwareTimer::HardwareTimer() { _timerObj.instance = nullptr; } -/** - * @brief HardwareTimer constructor: set default configuration values - * The timer will be usable directly, there is no need to call - * setup(). Using this constructor is not recommended for - * global variables that are automatically initialized at - * startup, since this will happen to early to report any - * errors. Better use the argumentless constructor and call the - * setup() method during initialization later. - * @param Timer instance ex: TIM1, ... - * @retval None - */ HardwareTimer::HardwareTimer(TIM_TypeDef *instance) { _timerObj.instance = nullptr; setup(instance); } -/** - * @brief HardwareTimer setup: configuration values. Must be called - * exactly once before any other methods, except when an instance is - * passed to the constructor. - * @param Timer instance ex: TIM1, ... - * @retval None - */ void HardwareTimer::setup(TIM_TypeDef *instance) { uint32_t index = get_timer_index(instance); @@ -168,11 +144,6 @@ void HardwareTimer::setup(TIM_TypeDef *instance) #endif } -/** - * @brief Pause HardwareTimer: stop timer - * @param None - * @retval None - */ void HardwareTimer::pause() { // Disable all IT @@ -202,12 +173,6 @@ void HardwareTimer::pause() #endif } -/** - * @brief Pause only one channel. - * Timer is still running but channel is disabled (output and interrupt) - * @param Arduino channel [1..4] - * @retval None - */ void HardwareTimer::pauseChannel(uint32_t channel) { if ((channel < 1) || (channel > TIMER_CHANNELS)) { @@ -256,11 +221,6 @@ void HardwareTimer::pauseChannel(uint32_t channel) } } -/** - * @brief Start or resume HardwareTimer: all channels are resumed, interrupts are enabled if necessary - * @param None - * @retval None - */ void HardwareTimer::resume(void) { bool baseStart = true; @@ -285,11 +245,6 @@ void HardwareTimer::resume(void) } } -/** - * @brief Convert arduino channel into HAL channel - * @param Arduino channel [1..4] - * @retval HAL channel. Error handler called if arduino channel is invalid - */ #if defined(USE_HALV2_DRIVER) hal_tim_channel_t HardwareTimer::getChannel(uint32_t channel, bool complementary) { @@ -354,11 +309,6 @@ uint32_t HardwareTimer::getChannel(uint32_t channel) } #endif -/** - * @brief Convert arduino channel into LL channels used (regular and/or complementary) - * @param Arduino channel [1..4] - * @retval LL channel. Error handler called if arduino channel is invalid - */ uint32_t HardwareTimer::getLLChannel(uint32_t channel) { bool error = false; @@ -420,12 +370,6 @@ uint32_t HardwareTimer::getLLChannel(uint32_t channel) return ll_channel; } -/** - * @brief Handle itterupt based on arduino channel - * @param Arduino channel [1..4] - * @param config: configuration for the interrupt (enable, disable, clear, clear and disable) - * @retval true if interrupt is enabled, false otherwise - */ bool HardwareTimer::manageIT(uint32_t channel, ChannelITConfig_t config) { bool isEnabled = false; @@ -485,12 +429,6 @@ bool HardwareTimer::manageIT(uint32_t channel, ChannelITConfig_t config) return isEnabled; } -/** - * @brief Get input associated channel - * Channel 1 and 2 are associated; channel 3 and 4 are associated - * @param Arduino channel [1..4] - * @retval HAL channel. Error handler called if arduino channel is invalid - */ uint32_t HardwareTimer::getAssociatedChannel(uint32_t channel) { uint32_t timAssociatedInputChannel = 0; @@ -514,11 +452,6 @@ uint32_t HardwareTimer::getAssociatedChannel(uint32_t channel) return timAssociatedInputChannel; } -/** - * @brief Configure specified channel and resume/start timer - * @param Arduino channel [1..4] - * @retval None - */ void HardwareTimer::resumeChannel(uint32_t channel) { #if defined(USE_HALV2_DRIVER) @@ -623,22 +556,12 @@ void HardwareTimer::resumeChannel(uint32_t channel) } } -/** - * @brief Retrieve prescaler from hardware register - * @param None - * @retval prescaler factor - */ uint32_t HardwareTimer::getPrescaleFactor() { // Hardware register correspond to prescaler-1. Example PSC register value 0 means divided by 1 return (LL_TIM_GetPrescaler(_timerObj.instance) + 1); } -/** - * @brief Configure hardwareTimer prescaler - * @param prescaler factor - * @retval None - */ void HardwareTimer::setPrescaleFactor(uint32_t prescaler) { // Hardware register correspond to prescaler-1. Example PSC register value 0 means divided by 1 @@ -647,14 +570,6 @@ void HardwareTimer::setPrescaleFactor(uint32_t prescaler) updateRegistersIfNotRunning(_timerObj.instance); } -/** - * @brief Retrieve overflow (rollover) value from hardware register - * @param format of returned value. If omitted default format is Tick - * @retval overflow depending on format value: - * TICK_FORMAT: return number of tick for overflow - * MICROSEC_FORMAT: return number of microsecondes for overflow - * HERTZ_FORMAT: return frequency in hertz for overflow - */ uint32_t HardwareTimer::getOverflow(TimerFormat_t format) { // Hardware register correspond to period count-1. Example ARR register value 9 means period of 10 timer cycle @@ -676,20 +591,6 @@ uint32_t HardwareTimer::getOverflow(TimerFormat_t format) return return_value; } -/** - * @brief Set overflow (rollover) - * - * Note that by default, the new value will not be applied - * immediately, but become effective at the next update event - * (usually the next timer overflow). See setPreloadEnable() - * for controlling this behaviour. - * @param overflow: depend on format parameter - * @param format of overflow parameter. If omitted default format is Tick - * TICK_FORMAT: overflow is the number of tick for overflow - * MICROSEC_FORMAT: overflow is the number of microsecondes for overflow - * HERTZ_FORMAT: overflow is the frequency in hertz for overflow - * @retval None - */ void HardwareTimer::setOverflow(uint32_t overflow, TimerFormat_t format) { uint32_t ARR_RegisterValue; @@ -728,14 +629,6 @@ void HardwareTimer::setOverflow(uint32_t overflow, TimerFormat_t format) updateRegistersIfNotRunning(_timerObj.instance); } -/** - * @brief Retrieve timer counter value - * @param format of returned value. If omitted default format is Tick - * @retval overflow depending on format value: - * TICK_FORMAT: return number of tick for counter - * MICROSEC_FORMAT: return number of microsecondes for counter - * HERTZ_FORMAT: return frequency in hertz for counter - */ uint32_t HardwareTimer::getCount(TimerFormat_t format) { uint32_t CNT_RegisterValue = LL_TIM_GetCounter(_timerObj.instance); @@ -759,15 +652,6 @@ uint32_t HardwareTimer::getCount(TimerFormat_t format) return return_value; } -/** - * @brief Set timer counter value - * @param counter: depend on format parameter - * @param format of overflow parameter. If omitted default format is Tick - * TICK_FORMAT: counter is the number of tick - * MICROSEC_FORMAT: counter is the number of microsecondes - * HERTZ_FORMAT: counter is the frequency in hertz - * @retval None - */ void HardwareTimer::setCount(uint32_t counter, TimerFormat_t format) { uint32_t CNT_RegisterValue; @@ -787,25 +671,11 @@ void HardwareTimer::setCount(uint32_t counter, TimerFormat_t format) LL_TIM_SetCounter(_timerObj.instance, CNT_RegisterValue); } -/** - * @brief Set channel mode - * @param channel: Arduino channel [1..4] - * @param mode: mode configuration for the channel (see TimerModes_t) - * @param pin: Arduino pin number, ex: D1, 1 or PA1 - * @retval None - */ void HardwareTimer::setMode(uint32_t channel, TimerModes_t mode, pin_size_t pin, ChannelInputFilter_t filter) { setMode(channel, mode, digitalPinToPinName(pin), filter); } -/** - * @brief Set channel mode - * @param channel: Arduino channel [1..4] - * @param mode: mode configuration for the channel (see TimerModes_t) - * @param pin: pin name, ex: PB_0 - * @retval None - */ void HardwareTimer::setMode(uint32_t channel, TimerModes_t mode, PinName pin, ChannelInputFilter_t filter) { uint32_t timAssociatedInputChannel; @@ -1059,30 +929,11 @@ void HardwareTimer::setMode(uint32_t channel, TimerModes_t mode, PinName pin, Ch } } -/** - * @brief Retrieves channel mode configured - * @param channel: Arduino channel [1..4] - * @retval returns configured mode - */ TimerModes_t HardwareTimer::getMode(uint32_t channel) { return ((1 <= channel) && (channel <= TIMER_CHANNELS)) ? _ChannelMode[channel - 1] : TIMER_OUTPUT_DISABLED; } -/** - * @brief Enable or disable preloading for overflow value - * When disabled, changes to the overflow value take effect - * immediately. When enabled (the default), the value takes - * effect only at the next update event (typically the next - * overflow). - * - * Note that the capture/compare register has its own preload - * enable bit, which is independent and enabled in PWM modes - * and disabled otherwise. If you need more control of that - * bit, you can use the HAL functions directly. - * @param value: true to enable preloading, false to disable - * @retval None - */ void HardwareTimer::setPreloadEnable(bool value) { if (value) { @@ -1092,16 +943,6 @@ void HardwareTimer::setPreloadEnable(bool value) } } -/** - * @brief Set channel Capture/Compare register - * @param channel: Arduino channel [1..4] - * @param compare: compare value depending on format - * @param format of compare parameter. If omitted default format is Tick - * TICK_FORMAT: compare is the number of tick - * MICROSEC_FORMAT: compare is the number of microsecondes - * HERTZ_FORMAT: compare is the frequency in hertz - * @retval None - */ void HardwareTimer::setCaptureCompare(uint32_t channel, uint32_t compare, TimerCompareFormat_t format) { uint32_t Prescalerfactor = LL_TIM_GetPrescaler(_timerObj.instance) + 1; @@ -1169,15 +1010,6 @@ void HardwareTimer::setCaptureCompare(uint32_t channel, uint32_t compare, TimerC updateRegistersIfNotRunning(_timerObj.instance); } -/** - * @brief Retrieve Capture/Compare value - * @param channel: Arduino channel [1..4] - * @param format of return value. If omitted default format is Tick - * TICK_FORMAT: return value is the number of tick for Capture/Compare value - * MICROSEC_FORMAT: return value is the number of microsecondes for Capture/Compare value - * HERTZ_FORMAT: return value is the frequency in hertz for Capture/Compare value - * @retval Capture/Compare value - */ uint32_t HardwareTimer::getCaptureCompare(uint32_t channel, TimerCompareFormat_t format) { uint32_t CCR_RegisterValue = 0; @@ -1245,30 +1077,11 @@ uint32_t HardwareTimer::getCaptureCompare(uint32_t channel, TimerCompareFormat_ return return_value; } -/** - * @param channel: Arduino channel [1..4] - * @param pin: Arduino pin number, ex D1, 1 or PA1 - * @param frequency: PWM frequency expressed in hertz - * @param dutycycle: PWM dutycycle expressed in percentage - * @param PeriodCallback: timer period callback (timer rollover upon update event) - * @param CompareCallback: timer compare callback - * @retval None - */ void HardwareTimer::setPWM(uint32_t channel, pin_size_t pin, uint32_t frequency, uint32_t dutycycle, callback_function_t PeriodCallback, callback_function_t CompareCallback) { setPWM(channel, digitalPinToPinName(pin), frequency, dutycycle, PeriodCallback, CompareCallback); } -/** - * @brief All in one function to configure PWM - * @param channel: Arduino channel [1..4] - * @param pin: pin name, ex PB_0 - * @param frequency: PWM frequency expressed in hertz - * @param dutycycle: PWM dutycycle expressed in percentage - * @param PeriodCallback: timer period callback (timer rollover upon update event) - * @param CompareCallback: timer compare callback - * @retval None - */ void HardwareTimer::setPWM(uint32_t channel, PinName pin, uint32_t frequency, uint32_t dutycycle, callback_function_t PeriodCallback, callback_function_t CompareCallback) { TimerModes_t previousMode = getMode(channel); @@ -1288,13 +1101,6 @@ void HardwareTimer::setPWM(uint32_t channel, PinName pin, uint32_t frequency, ui } } -/** - * @brief Set the priority of the interrupt - * @note Must be call before resume() - * @param preemptPriority: the pre-emption priority for the IRQn channel - * @param subPriority: the subpriority level for the IRQ channel. - * @retval None - */ void HardwareTimer::setInterruptPriority(uint32_t preemptPriority, uint32_t subPriority) { // Set Update interrupt priority for immediate use @@ -1321,11 +1127,6 @@ void HardwareTimer::setInterruptPriority(uint32_t preemptPriority, uint32_t subP _timerObj.subPriority = subPriority; } -/** - * @brief Attach interrupt callback on update (rollover) event - * @param callback: interrupt callback - * @retval None - */ void HardwareTimer::attachInterrupt(callback_function_t callback) { if (callbacks[0]) { @@ -1342,10 +1143,6 @@ void HardwareTimer::attachInterrupt(callback_function_t callback) } } -/** - * @brief Detach interrupt callback on update (rollover) event - * @retval None - */ void HardwareTimer::detachInterrupt() { // Disable update interrupt and clear callback @@ -1353,12 +1150,6 @@ void HardwareTimer::detachInterrupt() callbacks[0] = NULL; } -/** - * @brief Attach interrupt callback on Capture/Compare event - * @param channel: Arduino channel [1..4] - * @param callback: interrupt callback - * @retval None - */ void HardwareTimer::attachInterrupt(uint32_t channel, callback_function_t callback) { if ((channel == 0) || (channel > (TIMER_CHANNELS + 1))) { @@ -1376,11 +1167,6 @@ void HardwareTimer::attachInterrupt(uint32_t channel, callback_function_t callba } } -/** - * @brief Detach interrupt callback on Capture/Compare event - * @param channel: Arduino channel [1..4] - * @retval None - */ void HardwareTimer::detachInterrupt(uint32_t channel) { if ((channel == 0) || (channel > (TIMER_CHANNELS + 1))) { @@ -1391,20 +1177,11 @@ void HardwareTimer::detachInterrupt(uint32_t channel) callbacks[channel] = NULL; } -/** - * @brief Checks if there's an interrupt callback attached on Rollover event - * @retval returns true if a timer rollover interrupt has already been set - */ bool HardwareTimer::hasInterrupt() { return callbacks[0] != NULL; } -/** - * @brief Checks if there's an interrupt callback attached on Capture/Compare event - * @param channel: Arduino channel [1..4] - * @retval returns true if a channel compare match interrupt has already been set - */ bool HardwareTimer::hasInterrupt(uint32_t channel) { if ((channel == 0) || (channel > (TIMER_CHANNELS + 1))) { @@ -1413,13 +1190,6 @@ bool HardwareTimer::hasInterrupt(uint32_t channel) return callbacks[channel] != NULL; } -/** - * @brief Generate an update event to force all registers (Autoreload, prescaler, compare) to be taken into account - * @note @note Refresh() can only be called after timer has been initialized, - either by calling setup() function or thanks to constructor with TIM instance parameter. - * It is useful while timer is running after some registers update - * @retval None - */ void HardwareTimer::refresh() { #if defined(USE_HALV2_DRIVER) @@ -1429,13 +1199,6 @@ void HardwareTimer::refresh() #endif } -/** - * @brief Return the timer object handle object for more advanced setup - * @note Using this function and editing the Timer handle is at own risk! No support will - * be provided whatsoever if the HardwareTimer does not work as expected when editing - * the handle using the HAL functionality or other custom coding. - * @retval TIM_HandleTypeDef or hal_tim_handle_t address - */ #if defined(USE_HALV2_DRIVER) hal_tim_handle_t *HardwareTimer::getHandle() #else @@ -1445,11 +1208,6 @@ void HardwareTimer::refresh() return &_timerObj.handle; } -/** - * @brief Generic Update (rollover) callback which will call user callback - * @param htim: HAL timer handle - * @retval None - */ #if defined(USE_HALV2_DRIVER) void HardwareTimer::updateCallback(hal_tim_handle_t *htim) #else @@ -1468,11 +1226,6 @@ void HardwareTimer::refresh() } } -/** - * @brief Generic Capture and Compare callback which will call user callback - * @param htim: HAL timer handle - * @retval None - */ #if defined(USE_HALV2_DRIVER) void HardwareTimer::captureCompareCallback(hal_tim_handle_t *htim, hal_tim_channel_t hal_channel) #else @@ -1536,20 +1289,11 @@ void HardwareTimer::refresh() } } -/** - * @brief Check whether HardwareTimer is running (paused or resumed). - * @retval return true if the HardwareTimer is running - */ bool HardwareTimer::isRunning() { return LL_TIM_IsEnabledCounter(_timerObj.instance); } -/** - * @brief Check whether channel is running (paused or resumed). - * @param channel: Arduino channel [1..4] - * @retval return true if HardwareTimer is running and the channel is enabled - */ bool HardwareTimer::isRunningChannel(uint32_t channel) { uint32_t LLChannel = getLLChannel(channel); @@ -1562,12 +1306,6 @@ bool HardwareTimer::isRunningChannel(uint32_t channel) return (isRunning() && ret); } -/** - * @brief Take into account registers update immediately if timer is not running, - * (independently from Preload setting) - * @param TIMx Timer instance - * @retval None - */ void HardwareTimer::updateRegistersIfNotRunning(TIM_TypeDef *TIMx) { if (!isRunning()) { @@ -1583,10 +1321,6 @@ void HardwareTimer::updateRegistersIfNotRunning(TIM_TypeDef *TIMx) } } -/** - * @brief HardwareTimer destructor - * @retval None - */ HardwareTimer::~HardwareTimer() { uint32_t index = get_timer_index(_timerObj.instance); @@ -1595,11 +1329,6 @@ HardwareTimer::~HardwareTimer() _timerObj.__this = NULL; } -/** - * @brief return timer index from timer handle - * @param htim : one of the defined timer - * @retval timer index - */ timer_index_t get_timer_index(TIM_TypeDef *instance) { timer_index_t index = UNKNOWN_TIMER; @@ -1720,11 +1449,6 @@ timer_index_t get_timer_index(TIM_TypeDef *instance) return index; } -/** - * @brief This function return the timer clock frequency. - * @param None - * @retval frequency in Hz - */ uint32_t HardwareTimer::getTimerClkFreq() { #if defined(STM32MP1xx) @@ -1856,11 +1580,6 @@ uint32_t HardwareTimer::getTimerClkFreq() #endif /* STM32MP1xx */ } -/** - * @brief This function will reset the timer - * @param None - * @retval None - */ void HardwareTimer::timerHandleDeinit() { #if defined(USE_HALV2_DRIVER) @@ -1881,30 +1600,56 @@ void HardwareTimer::timerHandleDeinit() extern "C" { #if defined(USE_HALV2_DRIVER) + /** + * @brief HAL input capture callback: forward to HardwareTimer::captureCompareCallback() + * @param htim HAL timer handle + * @param channel HAL channel which triggered the callback + */ void HAL_TIM_InputCaptureCallback(hal_tim_handle_t *htim, hal_tim_channel_t channel) { HardwareTimer::captureCompareCallback(htim, channel); } + /** + * @brief HAL compare match callback: forward to HardwareTimer::captureCompareCallback() + * @param htim HAL timer handle + * @param channel HAL channel which triggered the callback + */ void HAL_TIM_CompareMatchCallback(hal_tim_handle_t *htim, hal_tim_channel_t channel) { HardwareTimer::captureCompareCallback(htim, channel); } + /** + * @brief HAL update (rollover) callback: forward to HardwareTimer::updateCallback() + * @param htim HAL timer handle + */ void HAL_TIM_UpdateCallback(hal_tim_handle_t *htim) { HardwareTimer::updateCallback(htim); } #else + /** + * @brief HAL input capture callback: forward to HardwareTimer::captureCompareCallback() + * @param htim HAL timer handle + */ void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim) { HardwareTimer::captureCompareCallback(htim); } + /** + * @brief HAL output compare callback: forward to HardwareTimer::captureCompareCallback() + * @param htim HAL timer handle + */ void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim) { HardwareTimer::captureCompareCallback(htim); } + /** + * @brief HAL update (rollover) callback: forward to HardwareTimer::updateCallback() + * @param htim HAL timer handle + */ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { HardwareTimer::updateCallback(htim); @@ -1914,8 +1659,6 @@ extern "C" { #if defined(TIM1_BASE) /** * @brief TIM1 IRQHandler common with TIM10 and TIM16 on some STM32F1xx - * @param None - * @retval None */ void TIM1_IRQHandler(void) { @@ -1942,6 +1685,9 @@ extern "C" { } #if !defined(STM32F3xx) + /** + * @brief TIM1 Capture/Compare IRQHandler + */ void TIM1_CC_IRQHandler(void) { if (HardwareTimer_Handle[TIMER1_INDEX]) { @@ -1954,8 +1700,6 @@ extern "C" { #if defined(TIM2_BASE) /** * @brief TIM2 IRQHandler - * @param None - * @retval None */ void TIM2_IRQHandler(void) { @@ -1968,8 +1712,6 @@ extern "C" { #if defined(TIM3_BASE) /** * @brief TIM3 IRQHandler - * @param None - * @retval None */ void TIM3_IRQHandler(void) { @@ -1987,8 +1729,6 @@ extern "C" { #if defined(TIM4_BASE) /** * @brief TIM4 IRQHandler - * @param None - * @retval None */ void TIM4_IRQHandler(void) { @@ -2001,8 +1741,6 @@ extern "C" { #if defined(TIM5_BASE) /** * @brief TIM5 IRQHandler - * @param None - * @retval None */ void TIM5_IRQHandler(void) { @@ -2015,8 +1753,6 @@ extern "C" { #if defined(TIM6_BASE) /** * @brief TIM6 IRQHandler - * @param None - * @retval None */ void TIM6_IRQHandler(void) { @@ -2029,8 +1765,6 @@ extern "C" { #if defined(TIM7_BASE) /** * @brief TIM7 IRQHandler - * @param None - * @retval None */ void TIM7_IRQHandler(void) { @@ -2043,8 +1777,6 @@ extern "C" { #if defined(TIM8_BASE) /** * @brief TIM8 IRQHandler - * @param None - * @retval None */ void TIM8_IRQHandler(void) { @@ -2061,6 +1793,9 @@ extern "C" { #endif } + /** + * @brief TIM8 Capture/Compare IRQHandler + */ void TIM8_CC_IRQHandler(void) { if (HardwareTimer_Handle[TIMER8_INDEX]) { @@ -2072,8 +1807,6 @@ extern "C" { #if defined(TIM9_BASE) /** * @brief TIM9 IRQHandler - * @param None - * @retval None */ void TIM9_IRQHandler(void) { @@ -2087,8 +1820,6 @@ extern "C" { #if !defined(STM32F1xx) && !defined(STM32F2xx) && !defined(STM32F4xx) && !defined(STM32F7xx) /** * @brief TIM10 IRQHandler - * @param None - * @retval None */ void TIM10_IRQHandler(void) { @@ -2102,8 +1833,6 @@ extern "C" { #if defined(TIM11_BASE) /** * @brief TIM11 IRQHandler - * @param None - * @retval None */ void TIM11_IRQHandler(void) { @@ -2116,8 +1845,6 @@ extern "C" { #if defined(TIM12_BASE) /** * @brief TIM12 IRQHandler - * @param None - * @retval None */ void TIM12_IRQHandler(void) { @@ -2131,8 +1858,6 @@ extern "C" { #if !defined(STM32F1xx) && !defined(STM32F2xx) && !defined(STM32F4xx) && !defined(STM32F7xx) && !defined(STM32H7xx) /** * @brief TIM13 IRQHandler - * @param None - * @retval None */ void TIM13_IRQHandler(void) { @@ -2146,8 +1871,6 @@ extern "C" { #if defined(TIM14_BASE) /** * @brief TIM14 IRQHandler - * @param None - * @retval None */ void TIM14_IRQHandler(void) { @@ -2160,8 +1883,6 @@ extern "C" { #if defined(TIM15_BASE) /** * @brief TIM15 IRQHandler - * @param None - * @retval None */ void TIM15_IRQHandler(void) { @@ -2175,8 +1896,6 @@ extern "C" { #if !defined(STM32F1xx) && !defined(STM32F3xx) && !defined(STM32G4xx) && !defined(STM32L4xx) /** * @brief TIM16 IRQHandler - * @param None - * @retval None */ void TIM16_IRQHandler(void) { @@ -2201,8 +1920,6 @@ extern "C" { #if defined(TIM17_BASE) /** * @brief TIM17 IRQHandler - * @param None - * @retval None */ void TIM17_IRQHandler(void) { @@ -2226,8 +1943,6 @@ extern "C" { #if defined(TIM18_BASE) /** * @brief TIM18 IRQHandler - * @param None - * @retval None */ void TIM18_IRQHandler(void) { @@ -2248,8 +1963,6 @@ extern "C" { #if defined(TIM19_BASE) /** * @brief TIM19 IRQHandler - * @param None - * @retval None */ void TIM19_IRQHandler(void) { @@ -2262,8 +1975,6 @@ extern "C" { #if defined(TIM20_BASE) /** * @brief TIM20 IRQHandler - * @param None - * @retval None */ void TIM20_IRQHandler(void) { @@ -2272,6 +1983,9 @@ extern "C" { } } + /** + * @brief TIM20 Capture/Compare IRQHandler + */ void TIM20_CC_IRQHandler(void) { if (HardwareTimer_Handle[TIMER20_INDEX]) { @@ -2283,8 +1997,6 @@ extern "C" { #if defined(TIM21_BASE) /** * @brief TIM21 IRQHandler - * @param None - * @retval None */ void TIM21_IRQHandler(void) { @@ -2297,8 +2009,6 @@ extern "C" { #if defined(TIM22_BASE) /** * @brief TIM22 IRQHandler - * @param None - * @retval None */ void TIM22_IRQHandler(void) { diff --git a/libraries/SrcWrapper/src/SrcWrapper.h b/libraries/SrcWrapper/src/SrcWrapper.h index e49d68a6d7..810828eb80 100644 --- a/libraries/SrcWrapper/src/SrcWrapper.h +++ b/libraries/SrcWrapper/src/SrcWrapper.h @@ -1,3 +1,8 @@ +/** + * @file SrcWrapper.h + * @brief Placeholder header of the SrcWrapper library: it declares nothing, + * it only allows sketches to include the library to have its sources built. + */ #ifndef __SRCWRAPPER_H__ #define __SRCWRAPPER_H__ diff --git a/libraries/SrcWrapper/src/new.cpp b/libraries/SrcWrapper/src/new.cpp index 3d12cf0aa6..64d4c79171 100644 --- a/libraries/SrcWrapper/src/new.cpp +++ b/libraries/SrcWrapper/src/new.cpp @@ -24,31 +24,59 @@ */ #include +/** + * @brief Allocate memory for a single object (C++ new). + * @param size Number of bytes to allocate. + * @return Pointer to the allocated memory, or NULL on failure. + */ void *operator new (size_t size) { return malloc(size); } +/** + * @brief Allocate memory for an array (C++ new[]). + * @param size Number of bytes to allocate. + * @return Pointer to the allocated memory, or NULL on failure. + */ void *operator new[](size_t size) { return malloc(size); } +/** + * @brief Free memory allocated by operator new. + * @param ptr Pointer to the memory to free. + */ void operator delete (void *ptr) { free(ptr); } +/** + * @brief Free memory allocated by operator new[]. + * @param ptr Pointer to the memory to free. + */ void operator delete[](void *ptr) { free(ptr); } +/** + * @brief Free memory allocated by sized operator new. + * @param ptr Pointer to the memory to free. + * @note The size argument is unused. + */ void operator delete (void *ptr, size_t /*size*/) { free(ptr); } +/** + * @brief Free memory allocated by sized operator new[]. + * @param ptr Pointer to the memory to free. + * @note The size argument is unused. + */ void operator delete[](void *ptr, size_t /*size*/) { free(ptr); diff --git a/libraries/SrcWrapper/src/stm32/PortNames.c b/libraries/SrcWrapper/src/stm32/PortNames.c index 4441e8e4c9..7bfa3d61ca 100644 --- a/libraries/SrcWrapper/src/stm32/PortNames.c +++ b/libraries/SrcWrapper/src/stm32/PortNames.c @@ -64,7 +64,6 @@ GPIO_TypeDef *GPIOPort_list[MAX_NB_PORT] = { #endif }; -/* Enable GPIO clock and return GPIO base address */ GPIO_TypeDef *set_GPIO_Port_Clock(uint32_t port_idx) { GPIO_TypeDef *gpioPort = 0; diff --git a/libraries/SrcWrapper/src/stm32/analog.cpp b/libraries/SrcWrapper/src/stm32/analog.cpp index 9ca496fe90..ffe9ec22b9 100644 --- a/libraries/SrcWrapper/src/stm32/analog.cpp +++ b/libraries/SrcWrapper/src/stm32/analog.cpp @@ -52,13 +52,9 @@ static PinName g_current_pin = NC; #endif /** - * @brief ADC Initialization - * This function configures the hardware resources used in this example: - * - Peripheral's clock enable - * - Peripheral's GPIO Configuration - * @param instance: ADC instance - * @param pin: ADC pin - * @retval None + * @brief ADC initialization: enable the peripheral clock and configure the GPIO pin. + * @param instance ADC instance. + * @param pin ADC pin. */ void adc_init(hal_adc_t instance, PinName pin) { @@ -88,9 +84,8 @@ void adc_init(hal_adc_t instance, PinName pin) } /** - * @brief DeInitializes the ADC. - * @param instance: ADC instance - * @retval None + * @brief ADC de-initialization: disable the peripheral clock. + * @param instance ADC instance. */ void adc_deinit(hal_adc_t instance) { @@ -111,11 +106,6 @@ void adc_deinit(hal_adc_t instance) #endif } -/** - * @brief Return ADC HAL channel linked to a PinName - * @param pin: PinName - * @retval Valid HAL channel - */ hal_adc_channel_t get_adc_channel(PinName pin) { uint32_t function = pinmap_function(pin, PinMap_ADC); @@ -170,13 +160,6 @@ hal_adc_channel_t get_adc_channel(PinName pin) return channel; } -/** - * @brief Return ADC HAL internal channel linked to a PinName - * @param pin: specific PinName's for ADC internal. Value can be: - * PADC_TEMP, PADC_VREF - * Note that not all of these values ​​may be available for all series. - * @retval Valid HAL internal channel. - */ hal_adc_channel_t get_adc_internal_channel(PinName pin) { hal_adc_channel_t channel = HAL_ADC_CHANNEL_NONE; @@ -198,12 +181,6 @@ hal_adc_channel_t get_adc_internal_channel(PinName pin) return channel; } -/** - * @brief This function will set the ADC to the required value - * @param pin : the pin to use - * @param resolution : resolution for converted data: 6/8/10/12/14/16 - * @retval the value of the adc - */ uint16_t adc_read_value(PinName pin, uint32_t resolution) { hal_status_t status = HAL_OK; @@ -380,12 +357,6 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution) #endif /* STM32WB0x || STM32WL3x */ /* Exported Functions */ -/** - * @brief Return ADC HAL channel linked to a PinName - * @param pin: PinName - * @param bank: pointer to get ADC channel bank if required - * @retval Valid HAL channel - */ uint32_t get_adc_channel(PinName pin, uint32_t *bank) { uint32_t function = pinmap_function(pin, PinMap_ADC); @@ -536,13 +507,6 @@ uint32_t get_adc_channel(PinName pin, uint32_t *bank) return channel; } -/** - * @brief Return ADC HAL internal channel linked to a PinName - * @param pin: specific PinName's for ADC internal. Value can be: - * PADC_TEMP, PADC_TEMP_ADC5, PADC_VREF, PADC_VBAT - * Note that not all of these values ​​may be available for all series. - * @retval Valid HAL internal channel. - */ uint32_t get_adc_internal_channel(PinName pin) { uint32_t channel = 0; @@ -580,12 +544,9 @@ uint32_t get_adc_internal_channel(PinName pin) } /** - * @brief ADC MSP Initialization - * This function configures the hardware resources used in this example: - * - Peripheral's clock enable - * - Peripheral's GPIO Configuration - * @param hadc: ADC handle pointer - * @retval None + * @brief ADC MSP initialization: enable the peripheral clock and configure + * the GPIO pins. + * @param hadc ADC handle pointer. */ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) { @@ -670,9 +631,8 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) } /** - * @brief DeInitializes the ADC MSP. - * @param hadc: ADC handle - * @retval None + * @brief ADC MSP de-initialization: disable the peripheral clock. + * @param hadc ADC handle pointer. */ void HAL_ADC_MspDeInit(ADC_HandleTypeDef *hadc) { @@ -803,12 +763,6 @@ void HAL_ADC_MspDeInit(ADC_HandleTypeDef *hadc) #endif } -/** - * @brief This function will set the ADC to the required value - * @param pin : the pin to use - * @param resolution : resolution for converted data: 6/8/10/12/14/16 - * @retval the value of the adc - */ uint16_t adc_read_value(PinName pin, uint32_t resolution) { ADC_HandleTypeDef AdcHandle = {}; @@ -1178,6 +1132,11 @@ uint16_t adc_read_value(PinName pin, uint32_t resolution) #if !defined(HAL_ADC_MODULE_ONLY) /* DAC */ #if defined(USE_HAL_DAC_MODULE) && (USE_HAL_DAC_MODULE == 1) +/** + * @brief DAC initialization: enable the peripheral clock and configure the GPIO pin. + * @param instance DAC instance. + * @param pin DAC pin. + */ void dac_init(hal_dac_t instance, PinName pin) { /* DAC Periph clock enable */ @@ -1191,6 +1150,12 @@ void dac_init(hal_dac_t instance, PinName pin) pinmap_pinout(pin, PinMap_DAC); } +/** + * @brief DAC de-initialization: disable the peripheral clock and deconfigure + * the GPIO pin. + * @param instance DAC instance. + * @param pin DAC pin. + */ void dac_deinit(hal_dac_t instance, PinName pin) { /* DAC Periph clock disable */ @@ -1203,11 +1168,6 @@ void dac_deinit(hal_dac_t instance, PinName pin) pin_function(pin, STM_PIN_DATA(STM_MODE_ANALOG, LL_GPIO_PULL_NO, 0)); } -/** - * @brief Return DAC HAL channel linked to a PinName - * @param pin: specific PinName's for ADC internal. - * @retval Valid HAL channel - */ hal_dac_channel_t get_dac_channel(PinName pin) { uint32_t function = pinmap_function(pin, PinMap_DAC); @@ -1228,14 +1188,6 @@ hal_dac_channel_t get_dac_channel(PinName pin) return channel; } -/** - * @brief This function will set the DAC to the required value - * @param port : the gpio port to use - * @param pin : the gpio pin to use - * @param value : the value to push on the adc output - * @param do_init : if set to true the initialization of the adc is done - * @retval None - */ void dac_write_value(PinName pin, uint32_t value, bool do_init) { hal_status_t status = HAL_OK; @@ -1285,12 +1237,6 @@ void dac_write_value(PinName pin, uint32_t value, bool do_init) } } -/** - * @brief This function will stop the DAC - * @param port : the gpio port to use - * @param pin : the gpio pin to use - * @retval None - */ void dac_stop(PinName pin) { hal_dac_handle_t dac_handle; @@ -1315,11 +1261,6 @@ void dac_stop(PinName pin) #endif /* USE_HAL_DAC_MODULE && (USE_HAL_DAC_MODULE == 1) */ #if defined(HAL_DAC_MODULE_ENABLED) -/** - * @brief Return DAC HAL channel linked to a PinName - * @param pin: specific PinName's for ADC internal. - * @retval Valid HAL channel - */ uint32_t get_dac_channel(PinName pin) { uint32_t function = pinmap_function(pin, PinMap_DAC); @@ -1348,12 +1289,9 @@ uint32_t get_dac_channel(PinName pin) ////////////////////////// DAC INTERFACE FUNCTIONS ///////////////////////////// /** - * @brief DAC MSP Initialization - * This function configures the hardware resources used in this example: - * - Peripheral's clock enable - * - Peripheral's GPIO Configuration - * @param hdac: DAC handle pointer - * @retval None + * @brief DAC MSP initialization: enable the peripheral clock and configure + * the GPIO pins. + * @param hdac DAC handle pointer. */ void HAL_DAC_MspInit(DAC_HandleTypeDef *hdac) { @@ -1399,14 +1337,6 @@ void HAL_DAC_MspInit(DAC_HandleTypeDef *hdac) } -/** - * @brief This function will set the DAC to the required value - * @param port : the gpio port to use - * @param pin : the gpio pin to use - * @param value : the value to push on the adc output - * @param do_init : if set to true the initialization of the adc is done - * @retval None - */ void dac_write_value(PinName pin, uint32_t value, bool do_init) { DAC_HandleTypeDef DacHandle = {}; @@ -1482,10 +1412,8 @@ void dac_write_value(PinName pin, uint32_t value, bool do_init) } /** - * @brief DeInitialize the DAC MSP. - * @param hdac: pointer to a DAC_HandleTypeDef structure that contains - * the configuration information for the specified DAC. - * @retval None + * @brief DAC MSP de-initialization: disable the peripheral clock. + * @param hdac DAC handle pointer. */ void HAL_DAC_MspDeInit(DAC_HandleTypeDef *hdac) { @@ -1569,12 +1497,6 @@ void HAL_DAC_MspDeInit(DAC_HandleTypeDef *hdac) #endif } -/** - * @brief This function will stop the DAC - * @param port : the gpio port to use - * @param pin : the gpio pin to use - * @retval None - */ void dac_stop(PinName pin) { DAC_HandleTypeDef DacHandle; @@ -1606,14 +1528,6 @@ void dac_stop(PinName pin) #if !defined(HAL_TIM_MODULE_ONLY) &&\ (defined(HAL_TIM_MODULE_ENABLED) || (defined(USE_HAL_TIM_MODULE) && (USE_HAL_TIM_MODULE == 1))) /* PWM */ -/** - * @brief This function will set the PWM to the required value - * @param port : the gpio port to use - * @param pin : the gpio pin to use - * @param clock_freq : frequency of the tim clock - * @param value : the value to push on the PWM output - * @retval None - */ void pwm_start(PinName pin, uint32_t PWM_freq, uint32_t value, TimerCompareFormat_t resolution) { TIM_TypeDef *Instance = (TIM_TypeDef *)pinmap_peripheral(pin, PinMap_TIM); @@ -1638,12 +1552,6 @@ void pwm_start(PinName pin, uint32_t PWM_freq, uint32_t value, TimerCompareForma HT->resume(); } } -/** - * @brief This function will disable the PWM - * @param port : the gpio port to use - * @param pin : the gpio pin to use - * @retval None - */ void pwm_stop(PinName pin) { TIM_TypeDef *Instance = (TIM_TypeDef *)pinmap_peripheral(pin, PinMap_TIM); diff --git a/libraries/SrcWrapper/src/stm32/bootloader.c b/libraries/SrcWrapper/src/stm32/bootloader.c index d7d86e968e..92136bb7b9 100644 --- a/libraries/SrcWrapper/src/stm32/bootloader.c +++ b/libraries/SrcWrapper/src/stm32/bootloader.c @@ -4,6 +4,12 @@ #include "backup.h" #ifdef BL_LEGACY_LEAF +/** + * @brief Reset into the bootloader when the "1EAF" magic packet is received on + * the USB CDC DTR toggle. + * @param buf Received data buffer. + * @param len Pointer to the length of the received data. + */ void dtr_togglingHook(uint8_t *buf, uint32_t *len) { /** @@ -18,6 +24,12 @@ void dtr_togglingHook(uint8_t *buf, uint32_t *len) #endif /* BL_LEGACY_LEAF */ #ifdef BL_HID +/** + * @brief Set the HID bootloader magic numbers in the backup domain and reset + * when the "1EAF" magic packet is received on the USB CDC DTR toggle. + * @param buf Received data buffer. + * @param len Pointer to the length of the received data. + */ void dtr_togglingHook(uint8_t *buf, uint32_t *len) { /** diff --git a/libraries/SrcWrapper/src/stm32/clock.c b/libraries/SrcWrapper/src/stm32/clock.c index 8043a67a72..d11f7502c4 100644 --- a/libraries/SrcWrapper/src/stm32/clock.c +++ b/libraries/SrcWrapper/src/stm32/clock.c @@ -21,13 +21,10 @@ extern "C" { #endif -/** - * @brief Function called to read the current micro second - * @param None - * @retval None - */ uint32_t getCurrentMicros(void) { + // Read the millisecond tick twice around the SysTick counter reading to + // detect a tick rollover between them, then add the elapsed fraction of the current tick uint32_t m0 = HAL_GetTick(); __IO uint32_t u0 = SysTick->VAL; uint32_t m1 = HAL_GetTick(); @@ -41,26 +38,27 @@ uint32_t getCurrentMicros(void) } } -/** - * @brief Function called wto read the current millisecond - * @param None - * @retval None - */ uint32_t getCurrentMillis(void) { return HAL_GetTick(); } +/** + * @brief Default OS SysTick hook, does nothing + */ void noOsSystickHandler() { } +/** + * @brief Hook called from SysTick_Handler(), aliased to noOsSystickHandler() + * unless an OS overrides it + */ void osSystickHandler() __attribute__((weak, alias("noOsSystickHandler"))); + /** - * @brief Function called when the tick interruption falls - * @param None - * @retval None + * @brief SysTick interrupt handler: increment the HAL tick and call the OS hook */ void SysTick_Handler(void) { @@ -73,11 +71,6 @@ void SysTick_Handler(void) osSystickHandler(); } -/** - * @brief Enable the specified clock if not already set - * @param source: clock source: LSE_CLOCK, LSI_CLOCK, HSI_CLOCK or HSE_CLOCK - * @retval None - */ void enableClock(sourceClock_t source) { #if defined(USE_HALV2_DRIVER) @@ -222,11 +215,6 @@ void configHSECapacitorTuning(void) #endif } -/** - * @brief This function enables clocks for some system IP - * @param None - * @retval None - */ void configIPClock(void) { #ifdef HSEM_BASE diff --git a/libraries/SrcWrapper/src/stm32/core_callback.c b/libraries/SrcWrapper/src/stm32/core_callback.c index 33936464c5..6db2616da8 100644 --- a/libraries/SrcWrapper/src/stm32/core_callback.c +++ b/libraries/SrcWrapper/src/stm32/core_callback.c @@ -54,11 +54,7 @@ extern "C" { // List of callback to call static void (*callbackList[CALLBACK_LIST_SIZE])(void); -/** - * @brief Adds a callback pointer - * @param func: callback pointer - * @retval None - */ +// The first free slot is used when registering a callback void registerCoreCallback(void (*func)(void)) { if (func == NULL) { @@ -73,11 +69,6 @@ void registerCoreCallback(void (*func)(void)) } } -/** - * @brief Removes a callback pointer - * @param func: callback pointer - * @retval None - */ void unregisterCoreCallback(void (*func)(void)) { if (func == NULL) { @@ -92,12 +83,6 @@ void unregisterCoreCallback(void (*func)(void)) } } -/** - * @brief Calls callback of the list. There is no priority. First added first - * called. This function must be called only in main() function loop. - * @param None - * @retval None - */ void CoreCallback(void) { for (uint8_t i = 0; i < CALLBACK_LIST_SIZE; i++) { diff --git a/libraries/SrcWrapper/src/stm32/hw_config.c b/libraries/SrcWrapper/src/stm32/hw_config.c index efeee013de..2aad7a404e 100644 --- a/libraries/SrcWrapper/src/stm32/hw_config.c +++ b/libraries/SrcWrapper/src/stm32/hw_config.c @@ -44,6 +44,8 @@ The application shall set one of the following configuration option:\n\ #endif #if defined(HAL_CRC_MODULE_ENABLED) +/** @brief CRC handle used to initialize the CRC peripheral in + * hw_config_init() */ CRC_HandleTypeDef hcrc = {.Instance = #if defined(CRC2_BASE) CRC2, @@ -58,11 +60,6 @@ CRC_HandleTypeDef hcrc = {.Instance = }; #endif -/** - * @brief This function performs the global init of the system (HAL, IOs...) - * @param None - * @retval None - */ void hw_config_init(void) { configIPClock(); diff --git a/libraries/SrcWrapper/src/stm32/interrupt.cpp b/libraries/SrcWrapper/src/stm32/interrupt.cpp index a2a661ee00..836c1a041d 100644 --- a/libraries/SrcWrapper/src/stm32/interrupt.cpp +++ b/libraries/SrcWrapper/src/stm32/interrupt.cpp @@ -1,6 +1,6 @@ /** ****************************************************************************** - * @file interrupt.c + * @file interrupt.cpp * @author WI6LABS * @version V1.0.0 * @date 01-August-2016 @@ -248,9 +248,9 @@ static const uint32_t ll_exti_lines[NB_EXTI] = { /* Private Functions */ /** - * @brief This function returns the pin ID function of the HAL PIN definition - * @param pin : one of the gpio pin - * @retval None + * @brief Return the ID of a GPIO pin, i.e. its bit index in the port. + * @param pin One of the GPIO pins. + * @return The bit index of the pin. */ static uint8_t get_pin_id(uint16_t pin) { @@ -314,12 +314,6 @@ void stm32_interrupt_enable(PinName pn, callback_function_t callback, uint32_t m #endif } -/** - * @brief This function disable the interruption on the selected port/pin - * @param port : one of the gpio port - * @param pin : one of the gpio pin - * @retval None - */ void stm32_interrupt_disable(GPIO_TypeDef *port, uint16_t pin) { (void)port; @@ -366,6 +360,11 @@ void stm32_interrupt_disable(GPIO_TypeDef *port, uint16_t pin) extern "C" { #endif #if defined(STM32WB0x) || defined(STM32WL3x) +/** + * @brief Callback called by the HAL when a valid GPIO interrupt is detected. + * @param GPIOx GPIO port that triggered the interrupt. + * @param GPIO_Pin GPIO pin that triggered the interrupt. + */ void HAL_GPIO_EXTI_Callback(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) { uint8_t id = get_pin_id(GPIO_Pin); @@ -376,6 +375,9 @@ void HAL_GPIO_EXTI_Callback(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) } } +/** + * @brief This function handles the GPIOA interrupt request. + */ void GPIOA_IRQHandler(void) { uint32_t line = SYSCFG_IO_DTR_PA0_DT; @@ -386,6 +388,9 @@ void GPIOA_IRQHandler(void) } } +/** + * @brief This function handles the GPIOB interrupt request. + */ void GPIOB_IRQHandler(void) { uint32_t line = SYSCFG_IO_DTR_PB0_DT; @@ -397,6 +402,11 @@ void GPIOB_IRQHandler(void) } #else #if defined(STM32C5xx) +/** + * @brief Callback called by the HAL when a valid EXTI interrupt is detected. + * @param hexti EXTI handle that triggered the interrupt. + * @param trigger Trigger that fired the interrupt (unused). + */ void HAL_EXTI_TriggerCallback(hal_exti_handle_t *hexti, hal_exti_trigger_t trigger) { (void)trigger; @@ -409,9 +419,8 @@ void HAL_EXTI_TriggerCallback(hal_exti_handle_t *hexti, hal_exti_trigger_t trigg } #else /** - * @brief This function his called by the HAL if the IRQ is valid - * @param GPIO_Pin : one of the gpio pin - * @retval None + * @brief Callback called by the HAL when a valid EXTI interrupt is detected. + * @param GPIO_Pin GPIO pin that triggered the interrupt. */ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { @@ -426,9 +435,8 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) defined(STM32MP1xx) || defined(STM32L5xx) || defined(STM32U0xx) || \ defined(STM32U3xx) || defined(STM32U5xx) || defined(STM32WBAxx) /** - * @brief EXTI line detection callback. - * @param GPIO_Pin Specifies the port pin connected to corresponding EXTI line. - * @retval None + * @brief EXTI line detection callback. + * @param GPIO_Pin Specifies the port pin connected to corresponding EXTI line. */ void HAL_GPIO_EXTI_Rising_Callback(uint16_t GPIO_Pin) { @@ -436,9 +444,8 @@ void HAL_GPIO_EXTI_Rising_Callback(uint16_t GPIO_Pin) } /** - * @brief EXTI line detection callback. - * @param GPIO_Pin Specifies the port pin connected to corresponding EXTI line. - * @retval None + * @brief EXTI line detection callback. + * @param GPIO_Pin Specifies the port pin connected to corresponding EXTI line. */ void HAL_GPIO_EXTI_Falling_Callback(uint16_t GPIO_Pin) { @@ -450,8 +457,6 @@ void HAL_GPIO_EXTI_Falling_Callback(uint16_t GPIO_Pin) defined(STM32L0xx) || defined(STM32U0xx) /** * @brief This function handles external line 0 to 1 interrupt request. - * @param None - * @retval None */ void EXTI0_1_IRQHandler(void) { @@ -464,8 +469,6 @@ void EXTI0_1_IRQHandler(void) /** * @brief This function handles external line 2 to 3 interrupt request. - * @param None - * @retval None */ void EXTI2_3_IRQHandler(void) { @@ -477,8 +480,6 @@ void EXTI2_3_IRQHandler(void) /** * @brief This function handles external line 4 to 15 interrupt request. - * @param None - * @retval None */ void EXTI4_15_IRQHandler(void) { @@ -488,66 +489,114 @@ void EXTI4_15_IRQHandler(void) } } #elif defined(STM32C5xx) +/** + * @brief This function handles external line 0 interrupt request. + */ void EXTI0_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[0].hexti); } +/** + * @brief This function handles external line 1 interrupt request. + */ void EXTI1_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[1].hexti); } +/** + * @brief This function handles external line 2 interrupt request. + */ void EXTI2_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[2].hexti); } +/** + * @brief This function handles external line 3 interrupt request. + */ void EXTI3_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[3].hexti); } +/** + * @brief This function handles external line 4 interrupt request. + */ void EXTI4_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[4].hexti); } +/** + * @brief This function handles external line 5 interrupt request. + */ void EXTI5_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[5].hexti); } +/** + * @brief This function handles external line 6 interrupt request. + */ void EXTI6_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[6].hexti); } +/** + * @brief This function handles external line 7 interrupt request. + */ void EXTI7_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[7].hexti); } +/** + * @brief This function handles external line 8 interrupt request. + */ void EXTI8_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[8].hexti); } +/** + * @brief This function handles external line 9 interrupt request. + */ void EXTI9_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[9].hexti); } +/** + * @brief This function handles external line 10 interrupt request. + */ void EXTI10_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[10].hexti); } +/** + * @brief This function handles external line 11 interrupt request. + */ void EXTI11_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[11].hexti); } +/** + * @brief This function handles external line 12 interrupt request. + */ void EXTI12_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[12].hexti); } +/** + * @brief This function handles external line 13 interrupt request. + */ void EXTI13_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[13].hexti); } +/** + * @brief This function handles external line 14 interrupt request. + */ void EXTI14_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[14].hexti); } +/** + * @brief This function handles external line 15 interrupt request. + */ void EXTI15_IRQHandler(void) { HAL_EXTI_IRQHandler(&gpio_irq_conf[15].hexti); @@ -555,8 +604,6 @@ void EXTI15_IRQHandler(void) #else /** * @brief This function handles external line 0 interrupt request. - * @param None - * @retval None */ void EXTI0_IRQHandler(void) { @@ -565,8 +612,6 @@ void EXTI0_IRQHandler(void) /** * @brief This function handles external line 1 interrupt request. - * @param None - * @retval None */ void EXTI1_IRQHandler(void) { @@ -575,8 +620,6 @@ void EXTI1_IRQHandler(void) /** * @brief This function handles external line 2 interrupt request. - * @param None - * @retval None */ void EXTI2_IRQHandler(void) { @@ -585,8 +628,6 @@ void EXTI2_IRQHandler(void) /** * @brief This function handles external line 3 interrupt request. - * @param None - * @retval None */ void EXTI3_IRQHandler(void) { @@ -595,8 +636,6 @@ void EXTI3_IRQHandler(void) /** * @brief This function handles external line 4 interrupt request. - * @param None - * @retval None */ void EXTI4_IRQHandler(void) { @@ -607,8 +646,6 @@ void EXTI4_IRQHandler(void) !defined(STM32U3xx) && !defined(STM32U5xx) && !defined(STM32WBAxx) /** * @brief This function handles external line 5 to 9 interrupt request. - * @param None - * @retval None */ void EXTI9_5_IRQHandler(void) { @@ -620,8 +657,6 @@ void EXTI9_5_IRQHandler(void) /** * @brief This function handles external line 10 to 15 interrupt request. - * @param None - * @retval None */ void EXTI15_10_IRQHandler(void) { @@ -634,8 +669,6 @@ void EXTI15_10_IRQHandler(void) /** * @brief This function handles external line 5 interrupt request. - * @param None - * @retval None */ void EXTI5_IRQHandler(void) { @@ -644,8 +677,6 @@ void EXTI5_IRQHandler(void) /** * @brief This function handles external line 6 interrupt request. - * @param None - * @retval None */ void EXTI6_IRQHandler(void) { @@ -654,8 +685,6 @@ void EXTI6_IRQHandler(void) /** * @brief This function handles external line 7 interrupt request. - * @param None - * @retval None */ void EXTI7_IRQHandler(void) { @@ -664,8 +693,6 @@ void EXTI7_IRQHandler(void) /** * @brief This function handles external line 8 interrupt request. - * @param None - * @retval None */ void EXTI8_IRQHandler(void) { @@ -674,8 +701,6 @@ void EXTI8_IRQHandler(void) /** * @brief This function handles external line 9 interrupt request. - * @param None - * @retval None */ void EXTI9_IRQHandler(void) { @@ -684,8 +709,6 @@ void EXTI9_IRQHandler(void) /** * @brief This function handles external line 10 interrupt request. - * @param None - * @retval None */ void EXTI10_IRQHandler(void) { @@ -694,8 +717,6 @@ void EXTI10_IRQHandler(void) /** * @brief This function handles external line 11 interrupt request. - * @param None - * @retval None */ void EXTI11_IRQHandler(void) { @@ -704,8 +725,6 @@ void EXTI11_IRQHandler(void) /** * @brief This function handles external line 12 interrupt request. - * @param None - * @retval None */ void EXTI12_IRQHandler(void) { @@ -714,8 +733,6 @@ void EXTI12_IRQHandler(void) /** * @brief This function handles external line 13 interrupt request. - * @param None - * @retval None */ void EXTI13_IRQHandler(void) { @@ -724,8 +741,6 @@ void EXTI13_IRQHandler(void) /** * @brief This function handles external line 14 interrupt request. - * @param None - * @retval None */ void EXTI14_IRQHandler(void) { @@ -734,8 +749,6 @@ void EXTI14_IRQHandler(void) /** * @brief This function handles external line 15 interrupt request. - * @param None - * @retval None */ void EXTI15_IRQHandler(void) { diff --git a/libraries/SrcWrapper/src/stm32/otp.c b/libraries/SrcWrapper/src/stm32/otp.c index ec223f833f..09d8cf2469 100644 --- a/libraries/SrcWrapper/src/stm32/otp.c +++ b/libraries/SrcWrapper/src/stm32/otp.c @@ -21,6 +21,8 @@ uint8_t *OTP_Read(uint8_t id) p_id = (uint8_t *)(OTP_AREA_END_ADDR - 7) ; + /* Walk the 64-bit slots from the top of the OTP down to its base, + * the ID is the MSB (byte 7) of a slot */ while (((*(p_id + 7)) != id) && (p_id != (uint8_t *)OTP_AREA_BASE)) { p_id -= 8 ; } diff --git a/libraries/SrcWrapper/src/stm32/pinmap.c b/libraries/SrcWrapper/src/stm32/pinmap.c index faa04a8da8..446e59ccd9 100644 --- a/libraries/SrcWrapper/src/stm32/pinmap.c +++ b/libraries/SrcWrapper/src/stm32/pinmap.c @@ -23,6 +23,8 @@ #include "lock_resource.h" #endif +/** Pin of an analog dualpad and the LL define used to configure its analog + * switch. */ typedef struct { PinName pin; uint32_t LL_AnalogSwitch; @@ -67,8 +69,11 @@ const uint32_t pin_map_ll[16] = { #if defined(DUALPAD_ANALOG_SWITCH) /** - * Configure Analog dualpad switch if necessary - * LL_AnalogSwitch: LL define to be used to configure Analog switch + * @brief Configure the analog dualpad switch if necessary. + * @param pin Pin name. + * @param function Pin function, encoded with the STM_PIN_* macros. + * @param LL_AnalogSwitch LL define used to configure the analog switch + * (0 = none). */ static void configure_dualpad_switch(PinName pin, int function, uint32_t LL_AnalogSwitch) { @@ -97,10 +102,11 @@ static void configure_dualpad_switch(PinName pin, int function, uint32_t LL_Anal } /** - * In case of dual pad, determine whether gpio needs to be configured - * pLL_AnalogSwitch: pointer used to return LL define to be used to configure - * Analog switch - * return: true when gpio must be configured + * @brief Determine whether the GPIO of a dualpad pin must be configured. + * @param pin Pin name. + * @param function Pin function, encoded with the STM_PIN_* macros. + * @param pLL_AnalogSwitch Output: LL define to use to configure the analog switch. + * @return true when the GPIO must be configured, false otherwise. */ static bool is_dualpad_switch_gpio_configurable(PinName pin, int function, uint32_t *pLL_AnalogSwitch) { @@ -142,9 +148,6 @@ bool pin_in_pinmap(PinName pin, const PinMap *map) return false; } -/** - * Configure pin (mode, speed, output type and pull-up/pull-down) - */ void pin_function(PinName pin, int function) { /* Get the pin information */ diff --git a/libraries/SrcWrapper/src/stm32/stm32_def.c b/libraries/SrcWrapper/src/stm32/stm32_def.c index c53b5096dd..58ce08e7ec 100644 --- a/libraries/SrcWrapper/src/stm32/stm32_def.c +++ b/libraries/SrcWrapper/src/stm32/stm32_def.c @@ -5,12 +5,8 @@ extern "C" { #endif -/** - * @brief This function is executed in case of error occurrence. - * @param None - * @retval None - */ #if !defined(NDEBUG) +// Weak: user can override it, see Error_Handler() documentation in stm32_def.h __attribute__((noreturn)) WEAK void _Error_Handler(const char *msg, int val) { /* User can add his own implementation to report the HAL error return state */ @@ -21,13 +17,8 @@ __attribute__((noreturn)) WEAK void _Error_Handler(const char *msg, int val) #endif #ifdef USE_FULL_ASSERT -/** - * @brief Reports the name of the source file and the source line number - * where the assert_param error has occurred. - * @param file: pointer to the source file name - * @param line: assert_param error line source number - * @retval None - */ +// Weak: called by the assert_param() macro when a HAL parameter check fails: +// report the source file name and line number where the error has occurred WEAK void assert_failed(uint8_t *file, uint32_t line) { _Error_Handler((const char *)file, line); diff --git a/libraries/SrcWrapper/src/stm32/timer.c b/libraries/SrcWrapper/src/stm32/timer.c index 402aefe0dd..aa475576ea 100644 --- a/libraries/SrcWrapper/src/stm32/timer.c +++ b/libraries/SrcWrapper/src/stm32/timer.c @@ -36,9 +36,9 @@ timerObj_t *get_timer_obj(TIM_HandleTypeDef *htim) #if !defined(USE_HALV2_DRIVER) /** - * @brief TIMER Initialization - clock init and nvic init - * @param htim_base: TIM handle - * @retval None + * @brief TIMER Initialization - enable the timer clock, then set priority of + * and enable the update interrupt and, if different, the capture compare interrupt + * @param htim_base TIM handle */ void HAL_TIM_Base_MspInit(TIM_HandleTypeDef *htim_base) { @@ -57,9 +57,8 @@ void HAL_TIM_Base_MspInit(TIM_HandleTypeDef *htim_base) } /** - * @brief TIMER Deinitialization - clock and nvic - * @param htim_base: TIM handle - * @retval None + * @brief TIMER Deinitialization - clock and nvic + * @param htim_base TIM handle */ void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef *htim_base) { @@ -69,9 +68,8 @@ void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef *htim_base) } /** - * @brief Initializes the TIM Output Compare MSP. - * @param htim: TIM handle - * @retval None + * @brief Initializes the TIM Output Compare MSP. + * @param htim TIM handle */ void HAL_TIM_OC_MspInit(TIM_HandleTypeDef *htim) { @@ -90,9 +88,8 @@ void HAL_TIM_OC_MspInit(TIM_HandleTypeDef *htim) } /** - * @brief DeInitialize TIM Output Compare MSP. - * @param htim: TIM handle - * @retval None + * @brief DeInitialize TIM Output Compare MSP. + * @param htim TIM handle */ void HAL_TIM_OC_MspDeInit(TIM_HandleTypeDef *htim) { @@ -102,9 +99,8 @@ void HAL_TIM_OC_MspDeInit(TIM_HandleTypeDef *htim) } /** - * @brief Initializes the TIM Input Capture MSP. - * @param htim: TIM handle - * @retval None + * @brief Initializes the TIM Input Capture MSP. + * @param htim TIM handle */ void HAL_TIM_IC_MspInit(TIM_HandleTypeDef *htim) { @@ -112,9 +108,8 @@ void HAL_TIM_IC_MspInit(TIM_HandleTypeDef *htim) } /** - * @brief DeInitialize TIM Input Capture MSP. - * @param htim: TIM handle - * @retval None + * @brief DeInitialize TIM Input Capture MSP. + * @param htim TIM handle */ void HAL_TIM_IC_MspDeInit(TIM_HandleTypeDef *htim) { @@ -122,12 +117,6 @@ void HAL_TIM_IC_MspDeInit(TIM_HandleTypeDef *htim) } #endif /* !defined(USE_HALV2_DRIVER) */ /* Exported functions */ -/** - * @brief Enable the timer clock - * @param instance: TIM instance - * @retval None - */ - void enableTimerClock(TIM_TypeDef *instance) { // Enable TIM clock @@ -291,11 +280,6 @@ void enableTimerClock(TIM_TypeDef *instance) #endif } -/** - * @brief Disable the timer clock - * @param htim: TIM handle - * @retval None - */ void disableTimerClock(TIM_TypeDef *instance) { // Disable TIM clock @@ -459,11 +443,6 @@ void disableTimerClock(TIM_TypeDef *instance) #endif } -/** - * @brief This function return IRQ number corresponding to update interrupt event of timer instance. - * @param tim: timer instance - * @retval IRQ number - */ IRQn_Type getTimerUpIrq(TIM_TypeDef *tim) { IRQn_Type IRQn = NonMaskableInt_IRQn; @@ -590,11 +569,6 @@ IRQn_Type getTimerUpIrq(TIM_TypeDef *tim) return IRQn; } -/** - * @brief This function return IRQ number corresponding to Capture or Compare interrupt event of timer instance. - * @param tim: timer instance - * @retval IRQ number - */ IRQn_Type getTimerCCIrq(TIM_TypeDef *tim) { IRQn_Type IRQn = NonMaskableInt_IRQn; @@ -721,11 +695,6 @@ IRQn_Type getTimerCCIrq(TIM_TypeDef *tim) return IRQn; } -/** - * @brief This function return the timer clock source. - * @param tim: timer instance - * @retval 1 = PCLK1 or 2 = PCLK2 - */ uint8_t getTimerClkSrc(TIM_TypeDef *tim) { uint8_t clkSrc = 0; @@ -819,11 +788,6 @@ uint8_t getTimerClkSrc(TIM_TypeDef *tim) return clkSrc; } -/** - * @brief Return HAL timer channel linked to a PinName - * @param pin: PinName - * @retval Valid HAL channel - */ #if defined(USE_HALV2_DRIVER) hal_tim_channel_t getTimerChannel(PinName pin) { diff --git a/libraries/SrcWrapper/src/stm32/uart.c b/libraries/SrcWrapper/src/stm32/uart.c index d5558f12b9..4e6534ef53 100644 --- a/libraries/SrcWrapper/src/stm32/uart.c +++ b/libraries/SrcWrapper/src/stm32/uart.c @@ -102,6 +102,11 @@ static serial_t serial_debug = { .index = UART_NUM }; +/** + * @brief Get the serial_t object from its HAL UART handle + * @param huart Pointer on the HAL UART handle + * @return Pointer on the serial_t object containing the handle + */ /* Aim of the function is to get serial_s pointer using huart pointer */ /* Highly inspired from magical linux kernel's "container_of" */ #if defined(USE_HALV2_DRIVER) @@ -119,6 +124,12 @@ serial_t *get_serial_obj(UART_HandleTypeDef *huart) return (obj); } +/** + * @brief Reset and enable the clock of the U(S)ART peripheral used by the + * serial object, and set its index and IRQ number in the object + * @param obj Pointer to serial_t structure + * @return true on success, false if no peripheral is set in obj or if it is not supported + */ bool uart_enable_clock(serial_t *obj) { bool status = true; @@ -351,11 +362,6 @@ bool uart_enable_clock(serial_t *obj) return status; } -/** - * @brief Function called to initialize the uart interface - * @param obj : pointer to serial_t structure - * @retval boolean status - */ #if defined(USE_HALV2_DRIVER) bool uart_init(serial_t *obj, uint32_t baudrate, hal_uart_word_length_t databits, hal_uart_parity_t parity, hal_uart_stop_bits_t stopbits, bool rx_invert, bool tx_invert, bool data_invert) #else @@ -607,11 +613,6 @@ bool uart_init(serial_t *obj, uint32_t baudrate, uint32_t databits, uint32_t par return status; } -/** - * @brief Function called to deinitialize the uart interface - * @param obj : pointer to serial_t structure - * @retval None - */ void uart_deinit(serial_t *obj) { /* Ensure uart is set to prevent deinitializing uart at index 0 */ @@ -840,11 +841,6 @@ void uart_init_lpuart(UART_HandleTypeDef *huart) #if defined(HAL_PWR_MODULE_ENABLED) && (defined(UART_IT_WUF) || defined(LPUART1_BASE)) -/** - * @brief Function called to configure the uart interface for low power - * @param obj : pointer to serial_t structure - * @retval None - */ void uart_config_lowpower(serial_t *obj) { if (obj == NULL) { @@ -939,11 +935,11 @@ void uart_config_lowpower(serial_t *obj) #endif /** - * @brief Function called to initialize the debug uart interface - * @note Call only if debug U(S)ART peripheral is not already initialized - * by a Serial instance - * Default config: 8N1 - * @retval boolean status + * @brief Function called to initialize the debug uart interface + * @note Call only if debug U(S)ART peripheral is not already initialized + * by a Serial instance + * Default config: 8N1 + * @return true on success, false otherwise */ bool uart_debug_init(void) { @@ -964,12 +960,6 @@ bool uart_debug_init(void) return status; } -/** - * @brief write the data on the uart: used by printf for debug only (syscalls) - * @param data : bytes to write - * @param size : number of data to write - * @retval The number of bytes written - */ size_t uart_debug_write(uint8_t *data, uint32_t size) { uint32_t tickstart = HAL_GetTick(); @@ -1019,12 +1009,6 @@ size_t uart_debug_write(uint8_t *data, uint32_t size) return size; } -/** - * Attempts to determine if the serial peripheral is already in use for RX - * - * @param obj The serial object - * @return Non-zero if the RX transaction is ongoing, 0 otherwise - */ uint8_t serial_rx_active(serial_t *obj) { #if defined(USE_HALV2_DRIVER) @@ -1034,12 +1018,6 @@ uint8_t serial_rx_active(serial_t *obj) #endif } -/** - * Attempts to determine if the serial peripheral is already in use for TX - * - * @param obj The serial object - * @return Non-zero if the TX transaction is ongoing, 0 otherwise - */ uint8_t serial_tx_active(serial_t *obj) { #if defined(USE_HALV2_DRIVER) @@ -1049,11 +1027,6 @@ uint8_t serial_tx_active(serial_t *obj) #endif } -/** - * @brief Read receive byte from uart - * @param obj : pointer to serial_t structure - * @retval last character received - */ int uart_getc(serial_t *obj, unsigned char *c) { if (obj == NULL) { @@ -1071,13 +1044,6 @@ int uart_getc(serial_t *obj, unsigned char *c) return 0; } -/** - * Begin asynchronous RX transfer (enable interrupt for data collecting) - * - * @param obj : pointer to serial_t structure - * @param callback : function call at the end of reception - * @retval none - */ void uart_attach_rx_callback(serial_t *obj, void (*callback)(serial_t *)) { if (obj == NULL) { @@ -1107,13 +1073,6 @@ void uart_attach_rx_callback(serial_t *obj, void (*callback)(serial_t *)) #endif } -/** - * Begin asynchronous TX transfer. - * - * @param obj : pointer to serial_t structure - * @param callback : function call at the end of transmission - * @retval none - */ void uart_attach_tx_callback(serial_t *obj, int (*callback)(serial_t *), size_t size) { if (obj == NULL) { @@ -1139,12 +1098,6 @@ void uart_attach_tx_callback(serial_t *obj, int (*callback)(serial_t *), size_t #endif } -/** - * Enable transmitter for half-duplex mode. NOOP in full-fuplex mode - * - * @param obj : pointer to serial_t structure - * @retval none - */ void uart_enable_tx(serial_t *obj) { if (obj != NULL && obj->pin_rx == NC) { @@ -1156,12 +1109,6 @@ void uart_enable_tx(serial_t *obj) } } -/** - * Enable receiver for half-duplex mode. NOOP in full-fuplex mode - * - * @param obj : pointer to serial_t structure - * @retval none - */ void uart_enable_rx(serial_t *obj) { if (obj != NULL && obj->pin_rx == NC) { @@ -1173,12 +1120,9 @@ void uart_enable_rx(serial_t *obj) } } -/** - * @brief Return index of the serial handler - * @param UartHandle pointer on the uart reference - * @retval index - */ /* + * Unused: return the index of the serial handler (UART_NUM if not found) + * uint8_t uart_index(UART_HandleTypeDef *huart) { uint8_t i = 0; @@ -1197,9 +1141,10 @@ uint8_t uart_index(UART_HandleTypeDef *huart) */ /** - * @brief Rx Transfer completed callback - * @param UartHandle pointer on the uart reference - * @retval None + * @brief Rx Transfer completed callback: call the RX callback of the serial object + * @param huart Pointer on the uart reference + * @param size_byte Number of received bytes (HALv2 driver only, unused) + * @param rx_event Reception event type (HALv2 driver only, unused) */ #if defined(USE_HALV2_DRIVER) void HAL_UART_RxCpltCallback(hal_uart_handle_t *huart, uint32_t size_byte, hal_uart_rx_event_types_t rx_event) @@ -1218,9 +1163,8 @@ void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) } /** - * @brief Tx Transfer completed callback - * @param UartHandle pointer on the uart reference - * @retval None + * @brief Tx Transfer completed callback: call the TX callback of the serial object + * @param huart Pointer on the uart reference */ #if defined(USE_HALV2_DRIVER) void HAL_UART_TxCpltCallback(hal_uart_handle_t *huart) @@ -1235,9 +1179,8 @@ void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) } /** - * @brief error callback from UART - * @param UartHandle pointer on the uart reference - * @retval None + * @brief Error callback from UART: clear the error flag and restart the reception + * @param huart Pointer on the uart reference */ #if defined(USE_HALV2_DRIVER) void HAL_UART_ErrorCallback(hal_uart_handle_t *huart) @@ -1287,9 +1230,7 @@ void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart) } /** - * @brief USART 1 IRQ handler - * @param None - * @retval None + * @brief USART 1 IRQ handler */ #if defined(USART1_BASE) void USART1_IRQHandler(void) @@ -1304,9 +1245,7 @@ void USART1_IRQHandler(void) #endif /** - * @brief USART 2 IRQ handler - * @param None - * @retval None + * @brief USART 2 IRQ handler */ #if defined(USART2_BASE) void USART2_IRQHandler(void) @@ -1328,9 +1267,7 @@ void USART2_IRQHandler(void) #endif /** - * @brief USART 3 IRQ handler - * @param None - * @retval None + * @brief USART 3 IRQ handler */ #if defined(USART3_BASE) void USART3_IRQHandler(void) @@ -1387,9 +1324,7 @@ void USART3_IRQHandler(void) #endif /** - * @brief UART 4 IRQ handler - * @param None - * @retval None + * @brief UART 4 IRQ handler */ #if defined(UART4_BASE) void UART4_IRQHandler(void) @@ -1404,9 +1339,7 @@ void UART4_IRQHandler(void) #endif /** - * @brief USART 4/5 IRQ handler - * @param None - * @retval None + * @brief USART 4/5 IRQ handler */ #if defined(STM32L0xx) #if defined(USART4_BASE) || defined(USART5_BASE) @@ -1424,9 +1357,7 @@ void USART4_5_IRQHandler(void) #endif /** - * @brief USART 4 IRQ handler - * @param None - * @retval None + * @brief USART 4 IRQ handler */ #if defined(STM32U0xx) #if defined(USART4_BASE) @@ -1446,9 +1377,7 @@ void USART4_IRQHandler(void) #endif /** - * @brief USART 5 IRQ handler - * @param None - * @retval None + * @brief USART 5 IRQ handler */ #if defined(UART5_BASE) void UART5_IRQHandler(void) @@ -1463,9 +1392,7 @@ void UART5_IRQHandler(void) #endif /** - * @brief USART 6 IRQ handler - * @param None - * @retval None + * @brief USART 6 IRQ handler */ #if defined(USART6_BASE) && !defined(STM32F0xx) && !defined(STM32G0xx) void USART6_IRQHandler(void) @@ -1480,9 +1407,7 @@ void USART6_IRQHandler(void) #endif /** - * @brief LPUART 1 IRQ handler - * @param None - * @retval None + * @brief LPUART 1 IRQ handler */ #if defined(LPUART1_BASE) void LPUART1_IRQHandler(void) @@ -1497,9 +1422,7 @@ void LPUART1_IRQHandler(void) #endif /** - * @brief UART 7 IRQ handler - * @param None - * @retval None + * @brief UART 7 IRQ handler */ #if defined(UART7_BASE) void UART7_IRQHandler(void) @@ -1514,9 +1437,7 @@ void UART7_IRQHandler(void) #endif /** - * @brief UART 8 IRQ handler - * @param None - * @retval None + * @brief UART 8 IRQ handler */ #if defined(UART8_BASE) void UART8_IRQHandler(void) @@ -1527,9 +1448,7 @@ void UART8_IRQHandler(void) #endif /** - * @brief UART 9 IRQ handler - * @param None - * @retval None + * @brief UART 9 IRQ handler */ #if defined(UART9_BASE) void UART9_IRQHandler(void) @@ -1540,9 +1459,7 @@ void UART9_IRQHandler(void) #endif /** - * @brief UART 10 IRQ handler - * @param None - * @retval None + * @brief UART 10 IRQ handler */ #if defined(UART10_BASE) void UART10_IRQHandler(void) @@ -1553,9 +1470,7 @@ void UART10_IRQHandler(void) #endif /** - * @brief USART 10 IRQ handler - * @param None - * @retval None + * @brief USART 10 IRQ handler */ #if defined(USART10_BASE) void USART10_IRQHandler(void) @@ -1566,9 +1481,7 @@ void USART10_IRQHandler(void) #endif /** - * @brief USART 11 IRQ handler - * @param None - * @retval None + * @brief USART 11 IRQ handler */ #if defined(USART11_BASE) void USART11_IRQHandler(void) @@ -1579,9 +1492,7 @@ void USART11_IRQHandler(void) #endif /** - * @brief UART 12 IRQ handler - * @param None - * @retval None + * @brief UART 12 IRQ handler */ #if defined(UART12_BASE) void UART12_IRQHandler(void) @@ -1592,9 +1503,8 @@ void UART12_IRQHandler(void) #endif /** - * @brief HAL UART Call Back - * @param UART handler - * @retval None + * @brief HAL UART wakeup callback: restart the reception + * @param huart UART handle */ #if defined(USE_HALV2_DRIVER) void HAL_UARTEx_WakeupCallback(hal_uart_handle_t *huart) @@ -1607,11 +1517,6 @@ void HAL_UARTEx_WakeupCallback(UART_HandleTypeDef *huart) } #if defined(USE_HALV2_DRIVER) -/** - * @brief Function called to set the uart clock prescaler - * @param huart : uart handle structure - * @retval hal_uart_prescaler_t clock prescaler - */ hal_uart_prescaler_t uart_compute_prescaler(hal_uart_handle_t *huart, hal_uart_config_t *config) { hal_uart_prescaler_t prescaler = HAL_UART_PRESCALER_DIV1; @@ -1644,11 +1549,6 @@ hal_uart_prescaler_t uart_compute_prescaler(hal_uart_handle_t *huart, hal_uart_c #endif #if defined(UART_PRESCALER_DIV1) -/** - * @brief Function called to set the uart clock prescaler - * @param huart : uart handle structure - * @retval uint32_t clock prescaler - */ uint32_t uart_compute_prescaler(UART_HandleTypeDef *huart) { uint32_t prescaler = UART_PRESCALER_DIV1; @@ -1685,11 +1585,6 @@ uint32_t uart_compute_prescaler(UART_HandleTypeDef *huart) return prescaler; } -/** - * @brief Function called to get the clock source frequency of the uart - * @param huart : uart handle structure - * @retval uint32_t clock source frequency - */ uint32_t uart_get_clock_source_freq(UART_HandleTypeDef *huart) { uint32_t freq = 0; diff --git a/libraries/SrcWrapper/src/syscalls.c b/libraries/SrcWrapper/src/syscalls.c index 15dcbdd265..b9ff7d5289 100644 --- a/libraries/SrcWrapper/src/syscalls.c +++ b/libraries/SrcWrapper/src/syscalls.c @@ -1,5 +1,5 @@ /** - * \file syscalls_stm32.c + * \file syscalls.c * * Implementation of newlib syscall. * @@ -13,6 +13,11 @@ #undef errno extern int errno; +/** + * @brief Increase the program data space (heap) used by malloc. + * @param incr Number of bytes to add to the heap. + * @return Previous heap end on success, or (caddr_t)-1 with errno set to ENOMEM. + */ __attribute__((weak)) caddr_t _sbrk(int incr) { @@ -37,6 +42,11 @@ caddr_t _sbrk(int incr) return (caddr_t) prev_heap_end ; } +/** + * @brief Close a file. Not supported, always fails. + * @param file File descriptor to close. + * @return -1. + */ __attribute__((weak)) int _close(int file) { @@ -44,6 +54,12 @@ int _close(int file) return -1; } +/** + * @brief Get file status. Reports every file as a character device. + * @param file File descriptor. + * @param st Buffer that receives the file status. + * @return 0. + */ __attribute__((weak)) int _fstat(int file, struct stat *st) { @@ -52,6 +68,11 @@ int _fstat(int file, struct stat *st) return 0; } +/** + * @brief Check whether a file descriptor refers to a terminal. Always reports a terminal. + * @param file File descriptor. + * @return 1. + */ __attribute__((weak)) int _isatty(int file) { @@ -59,6 +80,13 @@ int _isatty(int file) return 1; } +/** + * @brief Set the file position. Not supported, always returns 0. + * @param file File descriptor. + * @param ptr Offset. + * @param dir Seek direction. + * @return 0. + */ __attribute__((weak)) int _lseek(int file, int ptr, int dir) { @@ -68,6 +96,13 @@ int _lseek(int file, int ptr, int dir) return 0; } +/** + * @brief Read from a file. Not supported, always returns 0 bytes read. + * @param file File descriptor. + * @param ptr Buffer to fill. + * @param len Maximum number of bytes to read. + * @return 0. + */ __attribute__((weak)) int _read(int file, char *ptr, int len) { @@ -88,6 +123,10 @@ int _write(int file, char *ptr, int len) } */ +/** + * @brief Terminate the program. Loops forever. + * @param status Exit status (ignored). + */ __attribute__((weak)) void _exit(int status) { @@ -95,6 +134,12 @@ void _exit(int status) for (; ;) ; } +/** + * @brief Send a signal to a process. Not supported, always fails. + * @param pid Process ID. + * @param sig Signal number. + * @return -1 with errno set to EINVAL. + */ __attribute__((weak)) int _kill(int pid, int sig) { @@ -104,6 +149,10 @@ int _kill(int pid, int sig) return -1; } +/** + * @brief Get the process ID. Always returns 1. + * @return 1. + */ __attribute__((weak)) int _getpid(void) { diff --git a/libraries/SubGhz/src/SubGhz.h b/libraries/SubGhz/src/SubGhz.h index 60bb621fad..a91ad2fd5d 100644 --- a/libraries/SubGhz/src/SubGhz.h +++ b/libraries/SubGhz/src/SubGhz.h @@ -11,6 +11,12 @@ ******************************************************************************* */ +/** + * @file SubGhz.h + * @brief Access to the SubGHz radio module: radio IRQ, internal + * NSS/RESET/BUSY signals and SPI. + */ + #ifndef __SUBGHZ_H #define __SUBGHZ_H @@ -22,97 +28,151 @@ #error "This board does not seem to have a SubGhz radio module, cannot use this library." #endif +/** + * @brief ISR entry point for the SubGHz radio IRQ. + * Forwards the event to the attached callback. + */ extern "C" void SUBGHZ_Radio_IRQHandler(); /** - * Singleton class to manage the SubGHZ ISR and internal signals + * @brief Singleton class to manage the SubGHZ ISR and internal signals. */ class SubGhzClass { public: + /** + * @brief Type of the callback called from ISR context when the radio IRQ triggers. + */ using callback_function_t = std::function; - // Attach the passed handler to be called (from ISR context) when - // the radio IRQ triggers, then clear any pending IRQs and enable - // it. - // - // Note that the radio IRQ is *level* triggered, so the callback - // should either disable directly process the IRQ and clear the IRQ - // flags in the radio (so the radio module clears its DIO lines - // before the ISR returns), or the callback should disable the IRQ - // to prevent it from being triggered over and over again. + /** + * @brief Attach the handler called from ISR context when the radio IRQ + * triggers, then clear any pending IRQs and enable the IRQ. + * + * The radio IRQ is *level* triggered, so the callback must either process + * the IRQ and clear the IRQ flags in the radio (so the radio clears its + * DIO lines before the ISR returns), or disable the IRQ to prevent it from + * being triggered over and over again. + * @param callback Function called from ISR context when the radio IRQ triggers. + */ void attachInterrupt(callback_function_t callback); - // Detach the interrupt handler, disabling the IRQ too. + /** + * @brief Detach the interrupt handler, disabling the IRQ too. + */ void detachInterrupt(); - // Return whether an interrupt callback is currently attached - // (regardless of whether it is enabled or not). + /** + * @brief Check whether an interrupt callback is attached, regardless of + * whether it is enabled. + * @return true if a callback is attached, false otherwise. + */ bool hasInterrupt(); - // Enable the interrupt again if it was previously disabled using - // disableInterrupt(). This does *not* clear any pending interrupts, - // so if the IRQ was triggered while it was disabled, this will - // cause the callback (previously registered with attachInterrupt) - // to fire directly. + /** + * @brief Enable the interrupt again if it was previously disabled using disableInterrupt(). + * + * This does *not* clear pending interrupts: if the IRQ triggered while it + * was disabled, the callback registered with attachInterrupt() fires directly. + */ void enableInterrupt(); - // Temporarily disable interrupt processing by disabling the IRQ in - // the NVIC. + /** + * @brief Temporarily disable interrupt processing by disabling the IRQ in the NVIC. + */ void disableInterrupt(); - // Clear the interrupt pending flag (to suppress an IRQs that - // happened while the interrupt was disabled). + /** + * @brief Clear the interrupt pending flag, suppressing IRQs that happened + * while the interrupt was disabled. + */ void clearPendingInterrupt(); - // Returns whether the interrupt is currently pending (only really - // useful when the interrupt is disabled, or while some higher - // priority interrupt is currently running). + /** + * @brief Check whether the interrupt is pending. + * + * Only really useful when the interrupt is disabled, or while a higher + * priority interrupt is running. + * @return true if the interrupt is pending, false otherwise. + */ bool isInterruptPending(); - // Update the NSS signal that is internally connected to the radio - // SPI block. - // This signal is active-low, so passing LOW activates the block, - // HIGH deactivates it. + /** + * @brief Update the NSS signal internally connected to the radio SPI block. + * + * The NSS signal is active-low: passing true activates the block (NSS + * driven LOW), passing false deactivates it (NSS HIGH). + * @param value true to activate the NSS signal, false to deactivate it. + */ void setNssActive(bool value); - // Read back the value written to NSS + /** + * @brief Read back the value written to NSS with setNssActive(). + * @return true if the NSS signal is active, false otherwise. + */ bool isNssActive(); - // Update the RESET signal that is internally connected to the - // radio. Pass true to put the module in reset, or false to enable - // the module. + /** + * @brief Update the RESET signal internally connected to the radio. + * @param value true to put the module in reset, false to enable the module. + */ void setResetActive(bool value); - // Read back the value written to RESET + /** + * @brief Read back the value written to RESET with setResetActive(). + * @return true if the module is in reset, false otherwise. + */ bool isResetActive(); - // Return the state of busy signal exported by the radio module. - // Note that this uses the RFBUSYS flag that returns the radio busy - // signal directly, not the RFBUSYMS flag that also returns an extra - // busy period after every SPI transaction. + /** + * @brief Get the busy signal exported by the radio module. + * + * Uses the RFBUSYS flag, which returns the radio busy signal directly, + * not the RFBUSYMS flag that also returns an extra busy period after + * every SPI transaction. + * @return true if the radio is busy, false otherwise. + */ bool isBusy(); - // The SPI object that can be used to talk to the radio. Works - // like regular SPI objects, except that writeNSS() above must be - // used to control the (internal) NSS "pin". + /** + * @brief SPI object used to talk to the radio. + * + * Works like a regular SPI object, except that setNssActive() must be used + * to control the (internal) NSS signal. + */ SUBGHZSPIClass SPI; - // SPI settings to use for the radio. This uses the maximum speed - // supported by the radio, which should always work (no chance of - // bad wiring that requires reducing the speed). - // This value should be passed to `SubGhz.SPI.beginTransaction()`. + /** + * @brief SPI settings to use for the radio, at the maximum speed + * supported by the radio. + * + * Pass this value to SubGhz.SPI.beginTransaction(). + */ static constexpr SPISettings spi_settings = {16000000, MSBFIRST, SPI_MODE0}; protected: // To access handleIrq() friend void SUBGHZ_Radio_IRQHandler(); + /** + * @brief Call the attached callback. Invoked from the ISR, not meant to + * be called directly. + */ void handleIrq(); private: + /** + * @brief Handler called by handleIrq(), empty if none is attached. + */ callback_function_t callback; }; -// Singleton instance, no other instances should be created +/** + * @brief Singleton instance of SubGhzClass. No other instances should be created. + */ extern SubGhzClass SubGhz; +/** + * @example ReadRegister.ino + * Start up the radio module and read a register through it with an SPI command. + */ + #endif // __SUBGHZ_H diff --git a/libraries/USBDevice/inc/USBSerial.h b/libraries/USBDevice/inc/USBSerial.h index 89b50cebcc..740dea0a9c 100644 --- a/libraries/USBDevice/inc/USBSerial.h +++ b/libraries/USBDevice/inc/USBSerial.h @@ -25,49 +25,191 @@ //================================================================================ // Serial over CDC +/** + * @brief Serial port over USB CDC (virtual COM port). + * Implements the Arduino Stream API on top of the CDC transmit and + * receive queues. Use the SerialUSB global instance. + */ class USBSerial : public Stream { public: + /** + * @brief Initialize the USB CDC serial port. + */ void begin(void); - void begin(uint32_t); - void begin(uint32_t, uint8_t); + + /** + * @brief Initialize the USB CDC serial port. + * @note The baud rate argument is ignored by USB CDC. It only exists + * for compatibility with the HardwareSerial API. + * @param baud_count Baud rate (ignored). + */ + void begin(uint32_t baud_count); + + /** + * @brief Initialize the USB CDC serial port. + * @note The baud rate and serial configuration arguments are ignored + * by USB CDC. They only exist for compatibility with the HardwareSerial API. + * @param baud_count Baud rate (ignored). + * @param config Serial configuration (ignored). + */ + void begin(uint32_t baud_count, uint8_t config); + + /** + * @brief Stop the USB CDC serial port. + */ void end(void); + /** + * @brief Get the number of bytes available to read. + * @return Number of bytes in the receive queue. + */ virtual int available(void); + + /** + * @brief Get the number of bytes that can be written without blocking. + * @return Free space in the transmit queue, in bytes. + */ virtual int availableForWrite(void); + + /** + * @brief Get the next byte without removing it from the receive queue. + * @return The next byte, or -1 if the receive queue is empty. + */ virtual int peek(void); + + /** + * @brief Read one byte from the receive queue. + * @return The byte read, or -1 if the receive queue is empty. + */ virtual int read(void); - virtual size_t readBytes(char *buffer, size_t length); // read chars from stream into buffer + + /** + * @brief Read bytes from the stream into a buffer. Stops at the timeout + * set by setTimeout(). + * @param buffer Destination buffer. + * @param length Maximum number of bytes to read. + * @return Number of bytes read. + */ + virtual size_t readBytes(char *buffer, size_t length); + + /** + * @brief Read bytes from the stream into a buffer. Same as the char overload. + * @param buffer Destination buffer. + * @param length Maximum number of bytes to read. + * @return Number of bytes read. + */ size_t readBytes(uint8_t *buffer, size_t length) { return readBytes((char *)buffer, length); } - virtual size_t readBytesUntil(char terminator, char *buffer, size_t length); // as readBytes with terminator character + + /** + * @brief Read bytes from the stream into a buffer, stopping after the + * terminator character. Stops at the timeout set by setTimeout(). + * @param terminator Character that ends the read. It is consumed but not + * stored in the buffer. + * @param buffer Destination buffer. + * @param length Maximum number of bytes to read. + * @return Number of bytes stored in the buffer, terminator excluded. + */ + virtual size_t readBytesUntil(char terminator, char *buffer, size_t length); + + /** + * @brief Read bytes until the terminator character. Same as the char overload. + * @param terminator Character that ends the read. It is consumed but not + * stored in the buffer. + * @param buffer Destination buffer. + * @param length Maximum number of bytes to read. + * @return Number of bytes stored in the buffer, terminator excluded. + */ size_t readBytesUntil(char terminator, uint8_t *buffer, size_t length) { return readBytesUntil(terminator, (char *)buffer, length); } + + /** + * @brief Wait until all written bytes are sent over USB. + */ virtual void flush(void); - virtual size_t write(uint8_t); + + /** + * @brief Write one byte. Blocks until the byte is queued, or until the host disconnects. + * @param ch Byte to write. + * @return Number of bytes written: 1 on success, 0 on failure. + */ + virtual size_t write(uint8_t ch); + + /** + * @brief Write a buffer of bytes. Blocks until all bytes are queued, or + * until the host disconnects. + * @param buffer Data to send. + * @param size Number of bytes to send. + * @return Number of bytes written. + */ virtual size_t write(const uint8_t *buffer, size_t size); using Print::write; // pull in write(str) from Print + + /** + * @brief Check whether the USB host has opened the port. + * @note Waits 10 ms before reading the DTR state. + * @return The DTR state set by the host. + */ operator bool(void); - // These return the settings specified by the USB host for the - // serial port. These aren't really used, but are offered here - // in case a sketch wants to act on these settings. + /** + * @brief Get the baud rate set by the USB host. + * @note The value is informational. It is not used by USB CDC. + * @return Baud rate. + */ uint32_t baud(); + + /** + * @brief Get the stop bits set by the USB host. + * @note The value is informational. It is not used by USB CDC. + * @return Stop bits setting, one of ONE_STOP_BIT, ONE_AND_HALF_STOP_BIT, or TWO_STOP_BITS. + */ uint8_t stopbits(); + + /** + * @brief Get the parity type set by the USB host. + * @note The value is informational. It is not used by USB CDC. + * @return Parity setting, one of NO_PARITY, ODD_PARITY, EVEN_PARITY, + * MARK_PARITY, or SPACE_PARITY. + */ uint8_t paritytype(); + + /** + * @brief Get the number of data bits set by the USB host. + * @note The value is informational. It is not used by USB CDC. + * @return Number of data bits. + */ uint8_t numbits(); + /** + * @brief Set the DTR line state. + * @param enable true to set DTR, false to clear it. + */ void dtr(bool enable); + + /** + * @brief Get the DTR line state. + * @return The DTR state. + */ bool dtr(); + + /** + * @brief Get the RTS line state. + * @return The RTS state set by the host. + */ bool rts(); + + /** @brief Stop bits values returned by stopbits(). */ enum { ONE_STOP_BIT = 0, ONE_AND_HALF_STOP_BIT = 1, TWO_STOP_BITS = 2, }; + /** @brief Parity values returned by paritytype(). */ enum { NO_PARITY = 0, ODD_PARITY = 1, @@ -77,6 +219,7 @@ class USBSerial : public Stream { }; }; +/** @brief Global USB CDC serial port instance. */ extern USBSerial SerialUSB; #endif /* USBCON */ #endif /* _USBSERIAL_H_ */ diff --git a/libraries/USBDevice/inc/cdc_queue.h b/libraries/USBDevice/inc/cdc_queue.h index 1ec58d02f0..898ffe424b 100644 --- a/libraries/USBDevice/inc/cdc_queue.h +++ b/libraries/USBDevice/inc/cdc_queue.h @@ -48,49 +48,172 @@ extern "C" { #endif +/** + * @brief Maximum size, in bytes, of one USB packet handled by the queues. + * Depends on the USB speed in use (high speed or full speed). + */ #if USE_USB_HS #define CDC_QUEUE_MAX_PACKET_SIZE USB_HS_MAX_PACKET_SIZE #else #define CDC_QUEUE_MAX_PACKET_SIZE USB_FS_MAX_PACKET_SIZE #endif +/** + * @brief Number of packets the transmit queue buffer can hold. + * Can be overridden. + */ #ifndef CDC_TRANSMIT_QUEUE_BUFFER_PACKET_NUMBER #define CDC_TRANSMIT_QUEUE_BUFFER_PACKET_NUMBER 2 #endif +/** + * @brief Number of packets the receive queue buffer can hold. + * Can be overridden. + */ #ifndef CDC_RECEIVE_QUEUE_BUFFER_PACKET_NUMBER #define CDC_RECEIVE_QUEUE_BUFFER_PACKET_NUMBER 3 #endif +/** @brief Size, in bytes, of the transmit queue buffer. */ #define CDC_TRANSMIT_QUEUE_BUFFER_SIZE ((uint16_t)(CDC_QUEUE_MAX_PACKET_SIZE * CDC_TRANSMIT_QUEUE_BUFFER_PACKET_NUMBER)) +/** @brief Size, in bytes, of the receive queue buffer. */ #define CDC_RECEIVE_QUEUE_BUFFER_SIZE ((uint16_t)(CDC_QUEUE_MAX_PACKET_SIZE * CDC_RECEIVE_QUEUE_BUFFER_PACKET_NUMBER)) +/** + * @brief Transmit queue: ring buffer filled by the application and drained + * by USB IN transfers. + */ typedef struct { - uint8_t buffer[CDC_TRANSMIT_QUEUE_BUFFER_SIZE]; - volatile uint16_t write; - volatile uint16_t read; + uint8_t buffer[CDC_TRANSMIT_QUEUE_BUFFER_SIZE]; /**< Ring buffer storage. */ + volatile uint16_t write; /**< Next free position to write into. */ + volatile uint16_t read; /**< Next position to read from. */ + /** Bytes handed out by the last read, released by commit. */ volatile uint16_t reserved; } CDC_TransmitQueue_TypeDef; +/** + * @brief Receive queue: ring buffer filled by USB OUT transfers and drained + * by the application. + */ typedef struct { - uint8_t buffer[CDC_RECEIVE_QUEUE_BUFFER_SIZE]; - volatile uint16_t write; - volatile uint16_t read; + uint8_t buffer[CDC_RECEIVE_QUEUE_BUFFER_SIZE]; /**< Ring buffer storage. */ + volatile uint16_t write; /**< Next free position to write into. */ + volatile uint16_t read; /**< Next position to read from. */ + /** Wrap point: end of the valid data in the ring buffer. */ volatile uint16_t length; } CDC_ReceiveQueue_TypeDef; +/** + * @brief Initialize read and write position of the transmit queue. + * @param queue transmit queue to initialize. + */ void CDC_TransmitQueue_Init(CDC_TransmitQueue_TypeDef *queue); + +/** + * @brief Get the free space available for writing into the transmit queue. + * @note One byte is always kept unused to tell a full queue from an empty one. + * @param queue transmit queue. + * @return number of bytes that can be enqueued. + */ int CDC_TransmitQueue_WriteSize(CDC_TransmitQueue_TypeDef *queue); + +/** + * @brief Get the amount of data stored in the transmit queue. + * @param queue transmit queue. + * @return number of bytes waiting to be transmitted. + */ int CDC_TransmitQueue_ReadSize(CDC_TransmitQueue_TypeDef *queue); + +/** + * @brief Copy data into the transmit queue, wrapping at the end of the buffer. + * @note The caller must check CDC_TransmitQueue_WriteSize() first. Writing more + * than the free space overwrites data not yet transmitted. + * @param queue transmit queue. + * @param buffer data to copy. + * @param size number of bytes to copy. + */ void CDC_TransmitQueue_Enqueue(CDC_TransmitQueue_TypeDef *queue, const uint8_t *buffer, uint32_t size); + +/** + * @brief Get a contiguous block of queued data to transmit. + * @note The block is the biggest flat (non wrapping) block available, so it + * may be shorter than the total queued data when it wraps around the + * end of the buffer. It is meant to be sent in USB packets of at most + * CDC_QUEUE_MAX_PACKET_SIZE bytes. The block is reserved until + * CDC_TransmitQueue_CommitRead() is called. + * @param queue transmit queue. + * @param size output: length of the returned block in bytes. + * @return pointer to the first byte of the block. + */ uint8_t *CDC_TransmitQueue_ReadBlock(CDC_TransmitQueue_TypeDef *queue, uint16_t *size); + +/** + * @brief Release the block returned by CDC_TransmitQueue_ReadBlock(). + * @param queue transmit queue. + */ void CDC_TransmitQueue_CommitRead(CDC_TransmitQueue_TypeDef *queue); +/** + * @brief Initialize read and write position of the receive queue. + * @param queue receive queue to initialize. + */ void CDC_ReceiveQueue_Init(CDC_ReceiveQueue_TypeDef *queue); + +/** + * @brief Get the amount of data available for reading from the receive queue. + * @param queue receive queue. + * @return number of bytes available to read. + */ int CDC_ReceiveQueue_ReadSize(CDC_ReceiveQueue_TypeDef *queue); + +/** + * @brief Read and remove one byte from the receive queue. + * @param queue receive queue. + * @return byte value (0-255), or -1 if the queue is empty. + */ int CDC_ReceiveQueue_Dequeue(CDC_ReceiveQueue_TypeDef *queue); + +/** + * @brief Read one byte from the receive queue without removing it. + * @param queue receive queue. + * @return byte value (0-255), or -1 if the queue is empty. + */ int CDC_ReceiveQueue_Peek(CDC_ReceiveQueue_TypeDef *queue); + +/** + * @brief Read and remove up to size bytes from the receive queue. + * @param queue receive queue. + * @param buffer destination buffer. + * @param size maximum number of bytes to read. + * @return number of bytes copied into buffer. + */ uint16_t CDC_ReceiveQueue_Read(CDC_ReceiveQueue_TypeDef *queue, uint8_t *buffer, uint16_t size); + +/** + * @brief Read and remove bytes from the receive queue up to a terminator. + * @note The terminator is consumed but not copied into buffer. If the + * terminator is not found, up to size bytes are read and removed. + * @param queue receive queue. + * @param terminator byte that ends the read. + * @param buffer destination buffer. + * @param size maximum number of bytes to copy into buffer. + * @param fetched output: number of bytes copied into buffer, excluding the terminator. + * @return true if the terminator was found, false otherwise. + */ bool CDC_ReceiveQueue_ReadUntil(CDC_ReceiveQueue_TypeDef *queue, uint8_t terminator, uint8_t *buffer, uint16_t size, uint16_t *fetched); + +/** + * @brief Reserve space in the receive queue for an incoming packet. + * @note Up to CDC_QUEUE_MAX_PACKET_SIZE bytes may be written to the returned + * pointer. Call CDC_ReceiveQueue_CommitBlock() with the number of bytes actually written. + * @param queue receive queue. + * @return pointer where the packet can be written, or NULL if there is no room. + */ uint8_t *CDC_ReceiveQueue_ReserveBlock(CDC_ReceiveQueue_TypeDef *queue); + +/** + * @brief Commit bytes written to a block returned by CDC_ReceiveQueue_ReserveBlock(). + * @param queue receive queue. + * @param size number of bytes written into the reserved block. + */ void CDC_ReceiveQueue_CommitBlock(CDC_ReceiveQueue_TypeDef *queue, uint16_t size); #ifdef __cplusplus diff --git a/libraries/USBDevice/inc/usbd_cdc.h b/libraries/USBDevice/inc/usbd_cdc.h index 8db2fbc648..3ef3844650 100644 --- a/libraries/USBDevice/inc/usbd_cdc.h +++ b/libraries/USBDevice/inc/usbd_cdc.h @@ -33,25 +33,35 @@ extern "C" { * @{ */ -/** @defgroup usbd_cdc +/** @defgroup usbd_cdc USBD CDC Class * @brief This file is the Header file for usbd_cdc.c * @{ */ -/** @defgroup usbd_cdc_Exported_Defines +/** @defgroup usbd_cdc_Exported_Defines USBD CDC Exported Defines + * @brief CDC endpoint parameters, class request codes and control line state bits. * @{ */ #ifndef CDC_HS_BINTERVAL +/** + * @brief Polling interval of the CDC command endpoint at high speed. + * Can be overridden. + */ #define CDC_HS_BINTERVAL 0x10U #endif /* CDC_HS_BINTERVAL */ #ifndef CDC_FS_BINTERVAL +/** + * @brief Polling interval of the CDC command endpoint at full speed. + * Can be overridden. + */ #define CDC_FS_BINTERVAL 0x10U #endif /* CDC_FS_BINTERVAL */ /* CDC Endpoints parameters */ +/** @brief Size, in bytes, of the CDC configuration descriptor. */ #define USB_CDC_CONFIG_DESC_SIZ 67U #define CDC_DATA_HS_IN_PACKET_SIZE CDC_DATA_HS_MAX_PACKET_SIZE #define CDC_DATA_HS_OUT_PACKET_SIZE CDC_DATA_HS_MAX_PACKET_SIZE @@ -59,6 +69,7 @@ extern "C" { #define CDC_DATA_FS_IN_PACKET_SIZE CDC_DATA_FS_MAX_PACKET_SIZE #define CDC_DATA_FS_OUT_PACKET_SIZE CDC_DATA_FS_MAX_PACKET_SIZE +/** @brief Maximum size, in bytes, of a CDC class request data stage. */ #define CDC_REQ_MAX_DATA_SIZE 0x7U /*---------------------------------------------------------------------*/ /* CDC definitions */ @@ -74,7 +85,9 @@ extern "C" { #define CDC_SEND_BREAK 0x23U // Control Line State bits +/** @brief DTR bit (Data Terminal Ready) in SET_CONTROL_LINE_STATE wValue. */ #define CLS_DTR (1 << 0) +/** @brief RTS bit (Request To Send) in SET_CONTROL_LINE_STATE wValue. */ #define CLS_RTS (1 << 1) /** @@ -82,78 +95,122 @@ extern "C" { */ -/** @defgroup USBD_CORE_Exported_TypesDefinitions +/** @defgroup usbd_cdc_Exported_Types USBD CDC Exported Types + * @brief Types used by the USB CDC class. * @{ */ -/** - * @} - */ typedef struct { - uint32_t bitrate; - uint8_t format; - uint8_t paritytype; - uint8_t datatype; + uint32_t bitrate; /**< Data terminal rate, in bits per second. */ + uint8_t format; /**< Stop bits: 0 = 1, 1 = 1.5, 2 = 2 stop bits. */ + uint8_t paritytype; /**< Parity: 0 none, 1 odd, 2 even, 3 mark, 4 space. */ + uint8_t datatype; /**< Data bits: 5, 6, 7, 8 or 16. */ } USBD_CDC_LineCodingTypeDef; +/** @brief Application callbacks of the CDC class. */ typedef struct _USBD_CDC_Itf { + /** Called when the CDC class is initialized. */ int8_t (* Init)(void); + /** Called when the CDC class is de-initialized. */ int8_t (* DeInit)(void); + /** Handle a CDC class request. */ int8_t (* Control)(uint8_t cmd, uint8_t *pbuf, uint16_t length); + /** Called when data is received on the OUT endpoint. */ int8_t (* Receive)(uint8_t *Buf, uint32_t *Len); + /** Called when a transfer on the IN endpoint is complete. */ int8_t (* TransmitCplt)(uint8_t *Buf, uint32_t *Len, uint8_t epnum); } USBD_CDC_ItfTypeDef; - +/** @brief CDC class instance data. */ typedef struct { uint32_t data[CDC_DATA_HS_MAX_PACKET_SIZE / 4U]; /* Force 32-bit alignment */ - uint8_t CmdOpCode; - uint8_t CmdLength; - uint8_t *RxBuffer; - uint8_t *TxBuffer; - uint32_t RxLength; - uint32_t TxLength; - + uint8_t CmdOpCode; /**< Pending class request code. */ + uint8_t CmdLength; /**< Length of the pending class request data. */ + uint8_t *RxBuffer; /**< Buffer receiving the OUT endpoint data. */ + uint8_t *TxBuffer; /**< Buffer sent on the IN endpoint. */ + uint32_t RxLength; /**< Length of the data received. */ + uint32_t TxLength; /**< Length of the data to send. */ + + /** 0 when the IN endpoint is idle, 1 when a transfer is in progress. */ __IO uint32_t TxState; - __IO uint32_t RxState; + __IO uint32_t RxState; /**< Reception state. */ } USBD_CDC_HandleTypeDef; - - - -/** @defgroup USBD_CORE_Exported_Macros - * @{ - */ - /** * @} */ -/** @defgroup USBD_CORE_Exported_Variables +/** @defgroup usbd_cdc_Exported_Variables USBD CDC Exported Variables + * @brief Class driver exported by the USB CDC class. * @{ */ +/** @brief CDC class driver. */ extern USBD_ClassTypeDef USBD_CDC; +/** + * @brief Pointer to the CDC class driver, as expected by USBD_RegisterClass(). + */ #define USBD_CDC_CLASS &USBD_CDC /** * @} */ -/** @defgroup USB_CORE_Exported_Functions +/** @defgroup usbd_cdc_Exported_Functions USBD CDC Exported Functions + * @brief Functions used by the application to drive the USB CDC class. * @{ */ +/** + * @brief Register the application callbacks for the CDC class. + * @param pdev device instance. + * @param fops pointer to the CDC interface callbacks. + * @return USBD_OK on success, USBD_FAIL if fops is NULL. + */ uint8_t USBD_CDC_RegisterInterface(USBD_HandleTypeDef *pdev, USBD_CDC_ItfTypeDef *fops); +/** + * @brief Set the buffer and length of the next data to send on the CDC IN endpoint. + * @note Does not start the transfer, call USBD_CDC_TransmitPacket() for that. + * @param pdev device instance. + * @param pbuff pointer to the Tx buffer. + * @param length length of the data to send, in bytes. + * @param ClassId class ID, used only when USE_USBD_COMPOSITE is defined. + * @return USBD_OK on success, USBD_FAIL if the class instance is not allocated. + */ #ifdef USE_USBD_COMPOSITE uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff, uint32_t length, uint8_t ClassId); -uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev, uint8_t ClassId); #else uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff, uint32_t length); -uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev); #endif /* USE_USBD_COMPOSITE */ + +/** + * @brief Set the Rx buffer used for the next packet received on the CDC OUT endpoint. + * @param pdev device instance. + * @param pbuff pointer to the Rx buffer. + * @return USBD_OK on success, USBD_FAIL if the class instance is not allocated. + */ uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff); + +/** + * @brief Transmit the buffer set by USBD_CDC_SetTxBuffer() on the CDC IN endpoint. + * @note Does nothing if a transfer is already in progress. + * @param pdev device instance. + * @param ClassId class ID, used only when USE_USBD_COMPOSITE is defined. + * @return USBD_OK if the transfer was started, USBD_BUSY if a transfer is in + * progress, USBD_FAIL if the class instance is not allocated. + */ +#ifdef USE_USBD_COMPOSITE +uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev, uint8_t ClassId); +#else +uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev); +#endif /* USE_USBD_COMPOSITE */ + +/** + * @brief Prepare the CDC OUT endpoint to receive the next packet into the Rx buffer. + * @param pdev device instance. + * @return USBD_OK on success, USBD_FAIL if the class instance is not allocated. + */ uint8_t USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev); /** * @} diff --git a/libraries/USBDevice/inc/usbd_cdc_if.h b/libraries/USBDevice/inc/usbd_cdc_if.h index 1d3f8b91ff..8df82504f1 100644 --- a/libraries/USBDevice/inc/usbd_cdc_if.h +++ b/libraries/USBDevice/inc/usbd_cdc_if.h @@ -32,31 +32,89 @@ extern "C" { #include "usbd_cdc.h" #include "cdc_queue.h" -/* Periodically, the state of the buffer "UserTxBuffer" is checked. - The period depends on CDC_POLLING_INTERVAL */ -#define CDC_POLLING_INTERVAL 2 /* in ms. The max is 65 and the min is 1 */ +/** + * @brief Period, in ms, at which the transmit buffer state is checked. + * The min is 1 and the max is 65. + */ +#define CDC_POLLING_INTERVAL 2 /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ +/** @brief CDC class interface callbacks registered with the USB CDC class. */ extern USBD_CDC_ItfTypeDef USBD_CDC_fops; +/** @brief Queue of data waiting to be sent to the host. */ extern CDC_TransmitQueue_TypeDef TransmitQueue; +/** @brief Queue of data received from the host. */ extern CDC_ReceiveQueue_TypeDef ReceiveQueue; /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ +/** + * @brief Resume the USB CDC transmit queue if the IN endpoint is idle. + * @note Called from USBSerial::write() and from the USB transmit complete callback. + */ void CDC_continue_transmit(void); + +/** + * @brief Re-arm the USB CDC OUT endpoint with a new receive buffer. + * @note Does nothing if a receive is already pending or the receive queue has + * no room for a full packet. + * @return true if reception was resumed, false otherwise. + */ bool CDC_resume_receive(void); + +/** + * @brief Initialize the USB CDC device and start USB enumeration. + * @note Does nothing if the device is already initialized. + */ void CDC_init(void); + +/** + * @brief Stop the USB CDC device and release its USB resources. + * @note Does nothing if the device is not initialized. + */ void CDC_deInit(void); + +/** + * @brief Check whether a host is connected and ready to receive data. + * @return true if the device is configured, DTR is asserted and the last + * transmission did not time out, false otherwise. + */ bool CDC_connected(void); + +/** + * @brief Enable or disable the use of the host DTR signal for CDC_connected(). + * @param enable true to take DTR into account, false to ignore it. + */ void CDC_enableDTR(bool enable); -// getters for CDC line codings. Do not expose struct directly +/* getters for CDC line codings. Do not expose struct directly */ + +/** + * @brief Get the baud rate set by the USB host. + * @return baud rate in bits per second. + */ uint32_t CDC_getBaudrate(void); + +/** + * @brief Get the stop bits set by the USB host. + * @return 0 for one stop bit, 1 for 1.5 stop bits, 2 for two stop bits. + * Values match USBSerial.h. + */ uint8_t CDC_getStopBits(void); + +/** + * @brief Get the parity set by the USB host. + * @return 0 none, 1 odd, 2 even, 3 mark, 4 space. Values match USBSerial.h. + */ uint8_t CDC_getParity(void); + +/** + * @brief Get the number of data bits set by the USB host. + * @return number of data bits (5, 6, 7, 8 or 16). + */ uint8_t CDC_getDataBits(void); #ifdef __cplusplus diff --git a/libraries/USBDevice/inc/usbd_conf.h b/libraries/USBDevice/inc/usbd_conf.h index 326a9e01c3..9f7b23901c 100644 --- a/libraries/USBDevice/inc/usbd_conf.h +++ b/libraries/USBDevice/inc/usbd_conf.h @@ -44,6 +44,16 @@ extern "C" { #if defined(USB_BASE) +/** + * @name USB interrupt mapping + * @brief Interrupt numbers and handler names of the USB peripheral, selected + * according to the STM32 series. USB_IRQn and USB_IRQHandler are the + * main interrupt, USB_H_* the high priority one and USB_WKUP_* the + * wake-up one, when the series provides them. + * Define USE_USB_INTERRUPT_REMAPPED to use the remapped wake-up + * interrupt on series providing the remap. + */ +/** @{ */ #if defined(STM32F1xx) || defined(STM32F3xx) || defined(STM32G4xx) || \ defined(STM32L1xx) || defined(STM32WBxx) #if defined(SYSCFG_CFGR1_USB_IT_RMP) && !defined(USE_USB_INTERRUPT_REMAPPED) @@ -83,8 +93,17 @@ extern "C" { #define USB_IRQHandler USB_FS_IRQHandler #endif +/** @} */ + #endif /* USB_BASE */ +/** + * @name PCD buffer kind aliases + * @brief Map the HAL names of the packet memory buffer kinds to the PCD_* + * names used by the USB stack, and provide empty PHY clock gating + * macros for HAL versions not defining them. + */ +/** @{ */ #if !defined(PCD_SNG_BUF) && defined(HAL_PCD_SNG_BUF) #define PCD_SNG_BUF HAL_PCD_SNG_BUF #endif @@ -99,31 +118,62 @@ extern "C" { #ifndef __HAL_PCD_UNGATE_PHYCLOCK #define __HAL_PCD_UNGATE_PHYCLOCK(_DUMMY_) #endif +/** @} */ +/** + * @name USB device stack configuration + * @brief Limits and options of the USB device stack. Each one can be + * overridden before including this file. + */ +/** @{ */ +/** @brief Maximum number of interfaces of the device. */ #ifndef USBD_MAX_NUM_INTERFACES #define USBD_MAX_NUM_INTERFACES 2U #endif /* USBD_MAX_NUM_INTERFACES */ +/** @brief Maximum number of configurations of the device. */ #ifndef USBD_MAX_NUM_CONFIGURATION #define USBD_MAX_NUM_CONFIGURATION 1U #endif /* USBD_MAX_NUM_CONFIGURATION */ +/** @brief Size, in bytes, of the buffer used to build string descriptors. */ #ifndef USBD_MAX_STR_DESC_SIZ #define USBD_MAX_STR_DESC_SIZ 0x100U #endif /* USBD_MAX_STR_DESC_SIZ */ +/** + * @brief Set to 1 to report the device as self powered in the configuration descriptor. + */ #ifndef USBD_SELF_POWERED #define USBD_SELF_POWERED 1U #endif /* USBD_SELF_POWERED */ +/** + * @brief Verbosity of the USBD_UsrLog(), USBD_ErrLog() and USBD_DbgLog() + * macros. 0 disables them, 1 enables user logs, 2 adds error logs and + * 3 adds debug logs. + */ #ifndef USBD_DEBUG_LEVEL #define USBD_DEBUG_LEVEL 0U #endif /* USBD_DEBUG_LEVEL */ +/** + * @brief Set to 1 to enable the registration of user callbacks in the USB stack. + */ #ifndef USBD_USER_REGISTER_CALLBACK #define USBD_USER_REGISTER_CALLBACK 0U #endif /* USBD_USER_REGISTER_CALLBACK */ +/** @} */ +/** + * @name Class specific configuration + * @brief Default settings of the ST USB device classes (ECM, RNDIS, DFU, + * BillBoard, MSC, CDC, Audio, CustomHID and Video). Only the CDC and + * HID composite classes are used by this core, the others are kept + * for compatibility with the ST middleware. Each one can be + * overridden before including this file. + */ +/** @{ */ /* ECM, RNDIS, DFU Class Config */ #ifndef USBD_SUPPORT_USER_STRING_DESC #define USBD_SUPPORT_USER_STRING_DESC 0U @@ -148,6 +198,9 @@ extern "C" { #endif /* MSC_MEDIA_PACKET */ /* CDC Class Config */ +/** + * @brief CDC class interval setting, kept from the ST middleware default configuration. + */ #ifndef USBD_CDC_INTERVAL #define USBD_CDC_INTERVAL 2000U #endif /* USBD_CDC_INTERVAL */ @@ -252,7 +305,14 @@ extern "C" { #ifndef UVC_MAX_FRAME_SIZE #define UVC_MAX_FRAME_SIZE (UVC_WIDTH * UVC_HEIGHT * 16U / 8U) #endif /* UVC_MAX_FRAME_SIZE */ +/** @} */ +/** + * @name Interrupt priority + * @brief Preemption priority and sub-priority of the USB interrupt. Can be + * overridden before including this file. + */ +/** @{ */ /* Interrupt priority */ #ifndef USBD_IRQ_PRIO #define USBD_IRQ_PRIO 1 @@ -261,7 +321,15 @@ extern "C" { #ifndef USBD_IRQ_SUBPRIO #define USBD_IRQ_SUBPRIO 0 #endif /* USBD_IRQ_SUBPRIO */ +/** @} */ +/** + * @name Memory management and delay aliases + * @brief Functions used by the USB stack for memory handling and delays. + * The USB stack currently uses dynamic memory allocation. Can be + * overridden before including this file. + */ +/** @{ */ /* Memory management macros make sure to use static memory allocation */ /* Currently dynamic memory allocation usage */ /** Alias for memory allocation. */ @@ -288,7 +356,16 @@ extern "C" { #ifndef USBD_Delay #define USBD_Delay HAL_Delay #endif /* USBD_Delay */ +/** @} */ +/** + * @name Debug log macros + * @brief Print a formatted message followed by a new line with printf(). + * Enabled according to USBD_DEBUG_LEVEL, otherwise they expand to + * nothing. USBD_UsrLog() needs level 1, USBD_ErrLog() level 2 and + * USBD_DbgLog() level 3. + */ +/** @{ */ /* DEBUG macros */ #if (USBD_DEBUG_LEVEL > 0U) #define USBD_UsrLog(...) do { \ @@ -319,9 +396,20 @@ extern "C" { #else #define USBD_DbgLog(...) do {} while (0) #endif /* (USBD_DEBUG_LEVEL > 2U) */ +/** @} */ /* Exported functions -------------------------------------------------------*/ +/** + * @brief Allocate memory for the USB stack. + * @param size Number of bytes to allocate. + * @return Pointer to the allocated memory. + */ void *USBD_static_malloc(uint32_t size); + +/** + * @brief Free memory allocated by USBD_static_malloc(). + * @param p Pointer to the memory to free. + */ void USBD_static_free(void *p); #endif /* USBCON */ diff --git a/libraries/USBDevice/inc/usbd_desc.h b/libraries/USBDevice/inc/usbd_desc.h index 56e3b7aefc..b3fbb1d288 100644 --- a/libraries/USBDevice/inc/usbd_desc.h +++ b/libraries/USBDevice/inc/usbd_desc.h @@ -53,6 +53,10 @@ /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ + /** + * @brief USB device descriptors callbacks (device, strings, BOS) used by + * the USB stack. + */ extern USBD_DescriptorsTypeDef USBD_Desc; #endif /* USBCON */ diff --git a/libraries/USBDevice/inc/usbd_ep_conf.h b/libraries/USBDevice/inc/usbd_ep_conf.h index 4636b36ae5..f4e1637552 100644 --- a/libraries/USBDevice/inc/usbd_ep_conf.h +++ b/libraries/USBDevice/inc/usbd_ep_conf.h @@ -29,66 +29,101 @@ #define USBD_CDC_USE_SINGLE_BUFFER #endif +/** @brief Endpoint definition used to configure the USB packet memory. */ typedef struct { - uint32_t ep_adress; /* Endpoint address */ - uint32_t ep_size; /* Endpoint size */ + uint32_t ep_adress; /**< Endpoint address */ + uint32_t ep_size; /**< Endpoint size */ #if defined (USB) - uint32_t ep_kind; /* PCD Endpoint Kind: PCD_SNG_BUF or PCD_DBL_BUF */ + uint32_t ep_kind; /**< PCD Endpoint Kind: PCD_SNG_BUF or PCD_DBL_BUF */ #endif } ep_desc_t; -/* CDC Endpoints Configurations */ +/** @name CDC endpoints configuration */ +/** @{ */ #ifdef USBD_USE_CDC - #define CDC_OUT_EP 0x01U /* EP1 for data OUT */ - #define CDC_IN_EP 0x82U /* EP1 for data IN */ - #define CDC_CMD_EP 0x83U /* EP2 for CDC commands */ + #define CDC_OUT_EP 0x01U /**< EP1 for data OUT */ + #define CDC_IN_EP 0x82U /**< EP2 for data IN */ + #define CDC_CMD_EP 0x83U /**< EP3 for CDC commands */ - #define DEV_NUM_EP 0x04U /* Device Endpoints number including EP0 */ + /** Device endpoints number including EP0 */ + #define DEV_NUM_EP 0x04U /* CDC Endpoints parameters*/ - #define CDC_DATA_HS_MAX_PACKET_SIZE USB_HS_MAX_PACKET_SIZE /* Endpoint IN & OUT Packet size */ - #define CDC_DATA_FS_MAX_PACKET_SIZE USB_FS_MAX_PACKET_SIZE /* Endpoint IN & OUT Packet size */ - #define CDC_CMD_PACKET_SIZE 8U /* Control Endpoint Packet size */ + /** High speed endpoint IN & OUT packet size */ + #define CDC_DATA_HS_MAX_PACKET_SIZE USB_HS_MAX_PACKET_SIZE + /** Full speed endpoint IN & OUT packet size */ + #define CDC_DATA_FS_MAX_PACKET_SIZE USB_FS_MAX_PACKET_SIZE + /** Control endpoint packet size */ + #define CDC_CMD_PACKET_SIZE 8U #endif /* USBD_USE_CDC */ +/** @} */ -/* HID composite (Mouse + Keyboard) Endpoints Configurations */ +/** @name HID composite (mouse and keyboard) endpoints configuration */ +/** @{ */ #ifdef USBD_USE_HID_COMPOSITE - #define HID_MOUSE_EPIN_ADDR 0x81U + #define HID_MOUSE_EPIN_ADDR 0x81U /**< Mouse IN endpoint address */ + /** Keyboard IN endpoint address */ #define HID_KEYBOARD_EPIN_ADDR 0x82U + /** Mouse IN endpoint packet size */ #define HID_MOUSE_EPIN_SIZE 0x04U + /** Keyboard IN endpoint packet size */ #define HID_KEYBOARD_EPIN_SIZE 0x08U - #define DEV_NUM_EP 0x03U /* Device Endpoints number including EP0 */ + /** Device endpoints number including EP0 */ + #define DEV_NUM_EP 0x03U #endif /* USBD_USE_HID_COMPOSITE */ +/** @} */ /* Require DEV_NUM_EP to be defined */ #if defined (USB) -/* Size in words, byte size divided by 2 */ +/** + * @name Packet memory area (PMA) layout + * @brief Addresses of the endpoint buffers in the USB packet memory (PMA), + * for peripherals using it. The buffer descriptor table takes the + * first 8 bytes of each endpoint. + * @note Original remark: size in words, byte size divided by 2. + */ +/** @{ */ +/** EP0 OUT buffer address */ #define PMA_EP0_OUT_ADDR (8 * DEV_NUM_EP) +/** EP0 IN buffer address */ #define PMA_EP0_IN_ADDR (PMA_EP0_OUT_ADDR + USB_MAX_EP0_SIZE) #ifdef USBD_USE_CDC +/** Start of the CDC data buffers */ #define PMA_CDC_OUT_BASE (PMA_EP0_IN_ADDR + USB_MAX_EP0_SIZE) #if !defined(USBD_CDC_USE_SINGLE_BUFFER) +/** CDC OUT buffers address: both halves of the double buffer */ #define PMA_CDC_OUT_ADDR ((PMA_CDC_OUT_BASE + USB_FS_MAX_PACKET_SIZE) | \ (PMA_CDC_OUT_BASE << 16U)) +/** CDC IN buffer address */ #define PMA_CDC_IN_ADDR (PMA_CDC_OUT_BASE + USB_FS_MAX_PACKET_SIZE * 2) #else +/** CDC OUT buffer address */ #define PMA_CDC_OUT_ADDR PMA_CDC_OUT_BASE +/** CDC IN buffer address */ #define PMA_CDC_IN_ADDR (PMA_CDC_OUT_BASE + USB_FS_MAX_PACKET_SIZE) #endif +/** CDC command buffer address */ #define PMA_CDC_CMD_ADDR (PMA_CDC_IN_ADDR + CDC_CMD_PACKET_SIZE) #endif /* USBD_USE_CDC */ #ifdef USBD_USE_HID_COMPOSITE + /** Mouse IN buffer address */ #define PMA_MOUSE_IN_ADDR (PMA_EP0_IN_ADDR + HID_MOUSE_EPIN_SIZE) + /** Keyboard IN buffer address */ #define PMA_KEYBOARD_IN_ADDR (PMA_MOUSE_IN_ADDR + HID_KEYBOARD_EPIN_SIZE) #endif /* USBD_USE_HID_COMPOSITE */ +/** @} */ #endif /* USB */ +/** + * @brief Endpoint definitions of the enabled USB classes, indexed by endpoint + * number. Includes endpoint 0. + */ extern const ep_desc_t ep_def[DEV_NUM_EP + 1]; diff --git a/libraries/USBDevice/inc/usbd_hid_composite_if.h b/libraries/USBDevice/inc/usbd_hid_composite_if.h index 4f9688e716..ac13180f49 100644 --- a/libraries/USBDevice/inc/usbd_hid_composite_if.h +++ b/libraries/USBDevice/inc/usbd_hid_composite_if.h @@ -28,20 +28,51 @@ extern "C" { #endif /* Exported types ------------------------------------------------------------*/ +/** @brief HID interfaces of the composite device. */ typedef enum { - HID_KEYBOARD, - HID_MOUSE + HID_KEYBOARD, /**< Keyboard interface. */ + HID_MOUSE /**< Mouse interface. */ } HID_Interface; /* Exported macro ------------------------------------------------------------*/ +/** + * @brief Check that DEVICE is a valid HID_Interface value. + * @param DEVICE value to check. + */ #define IS_HID_INTERFACE(DEVICE) (((DEVICE) == HID_KEYBOARD) ||\ ((DEVICE) == HID_MOUSE)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Initialize the USB device stack for a HID composite interface. + * @param device HID interface to enable: HID_KEYBOARD or HID_MOUSE. + * @note The USB device is started once, when the first interface is + * initialized. Calling it again for the other interface only + * marks it as active. + */ void HID_Composite_Init(HID_Interface device); + +/** + * @brief Release a HID composite interface. + * @param device HID interface to release: HID_KEYBOARD or HID_MOUSE. + * @note The USB device is stopped and de-initialized once no interface is active. + */ void HID_Composite_DeInit(HID_Interface device); +/** + * @brief Send a HID mouse report. + * @param report Pointer to the report data. + * @param len Length of the report, in bytes. + * @note The report is not sent if the previous one is still pending. + */ void HID_Composite_mouse_sendReport(uint8_t *report, uint16_t len); + +/** + * @brief Send a HID keyboard report. + * @param report Pointer to the report data. + * @param len Length of the report, in bytes. + * @note The report is not sent if the previous one is still pending. + */ void HID_Composite_keyboard_sendReport(uint8_t *report, uint16_t len); #ifdef __cplusplus diff --git a/libraries/USBDevice/inc/usbd_if.h b/libraries/USBDevice/inc/usbd_if.h index b21a328db0..20405bb3fb 100644 --- a/libraries/USBDevice/inc/usbd_if.h +++ b/libraries/USBDevice/inc/usbd_if.h @@ -15,6 +15,10 @@ #include "Arduino.h" /* Re-enumeration handling*/ +/** + * @brief Delay, in ms, kept between detach and attach in USBD_reenumerate(). + * Can be overridden. + */ #ifndef USBD_ENUM_DELAY #define USBD_ENUM_DELAY 10 #endif @@ -23,12 +27,29 @@ extern "C" { #endif +/** + * @brief Force to re-enumerate USB. + * + * Intended to be called at startup by core code. It can also be used at + * runtime, while USB is connected, but that does not work in all cases + * (when USB is enabled on an F103C8, setting output mode on the DP pin + * no longer has any effect). + */ void USBD_reenumerate(void); + #ifdef USBD_USE_CDC +/** + * @brief Initialize the CDC interface used by the USB serial port. + */ void USBD_CDC_init(void); #endif -/* Weaked function */ +/** + * @brief Configure the system clock and system IP clocks after wake-up + * from the USB resume callback. + * @note Weak function, can be redefined by the user at the sketch level. + * By default, calls configIPClock() and SystemClock_Config(). + */ void USBD_SystemClockConfigFromResume(void); #ifdef __cplusplus diff --git a/libraries/USBDevice/src/USBSerial.cpp b/libraries/USBDevice/src/USBSerial.cpp index e23250d007..a90fc66869 100644 --- a/libraries/USBDevice/src/USBSerial.cpp +++ b/libraries/USBDevice/src/USBSerial.cpp @@ -30,20 +30,29 @@ extern __IO bool rtsState; USBSerial SerialUSB; void serialEventUSB() __attribute__((weak)); +// Write path: the sketch (main thread) is the only producer of +// TransmitQueue; the USB IRQ only consumes it (CDC_continue_transmit), so +// write() needs no lock. +// Read path: the sketch is the only consumer of ReceiveQueue; every read calls +// CDC_resume_receive() to re-arm the OUT endpoint once space has been freed. + void USBSerial::begin(void) { CDC_init(); } -void USBSerial::begin(uint32_t /* baud_count */) +void USBSerial::begin(uint32_t baud_count) { // uart config is ignored in USB-CDC + (void)baud_count; begin(); } -void USBSerial::begin(uint32_t /* baud_count */, uint8_t /* config */) +void USBSerial::begin(uint32_t baud_count, uint8_t config) { // uart config is ignored in USB-CDC + (void)baud_count; + (void)config; begin(); } diff --git a/libraries/USBDevice/src/cdc/cdc_queue.c b/libraries/USBDevice/src/cdc/cdc_queue.c index 2d2330c195..1a4afa0753 100644 --- a/libraries/USBDevice/src/cdc/cdc_queue.c +++ b/libraries/USBDevice/src/cdc/cdc_queue.c @@ -40,28 +40,29 @@ #include "cdc_queue.h" -// Initialize read and write position of queue +// Both queues are single-producer/single-consumer ring buffers accessed +// without locks: the producer only moves `write`, the consumer only moves `read`. + +// Transmit queue: `read == write` means empty. One byte is always left free +// so that a full queue can be told from an empty one. void CDC_TransmitQueue_Init(CDC_TransmitQueue_TypeDef *queue) { queue->read = 0; queue->write = 0; } -// Determine size, available for write in queue int CDC_TransmitQueue_WriteSize(CDC_TransmitQueue_TypeDef *queue) { return (queue->read + CDC_TRANSMIT_QUEUE_BUFFER_SIZE - queue->write - 1) % CDC_TRANSMIT_QUEUE_BUFFER_SIZE; } -// Determine size of data, stored in queue int CDC_TransmitQueue_ReadSize(CDC_TransmitQueue_TypeDef *queue) { return (queue->write + CDC_TRANSMIT_QUEUE_BUFFER_SIZE - queue->read) % CDC_TRANSMIT_QUEUE_BUFFER_SIZE; } -// Write provided data into queue. void CDC_TransmitQueue_Enqueue(CDC_TransmitQueue_TypeDef *queue, const uint8_t *buffer, uint32_t size) { @@ -76,7 +77,9 @@ void CDC_TransmitQueue_Enqueue(CDC_TransmitQueue_TypeDef *queue, CDC_TRANSMIT_QUEUE_BUFFER_SIZE); } -// Read flat block from queue biggest as possible, but max QUEUE_MAX_PACKET_SIZE +// Transmit read side: `reserved` remembers the size of the block handed out +// by ReadBlock, `read` only advances when CommitRead is called, so the block +// stays valid while USB is sending it. uint8_t *CDC_TransmitQueue_ReadBlock(CDC_TransmitQueue_TypeDef *queue, uint16_t *size) { @@ -95,7 +98,11 @@ void CDC_TransmitQueue_CommitRead(CDC_TransmitQueue_TypeDef *queue) CDC_TRANSMIT_QUEUE_BUFFER_SIZE; } -// Initialize read and write position of queue. +// Receive queue: USB writes whole packets at `write` (ReserveBlock then +// CommitBlock) while the application consumes from `read`. A packet is never +// split, so when the end of the buffer is too close for a full packet the +// writer wraps early and `length` records where the valid data ends. `read` +// wraps to 0 when it reaches `length`. `write == read` means empty. void CDC_ReceiveQueue_Init(CDC_ReceiveQueue_TypeDef *queue) { queue->read = 0; @@ -103,7 +110,6 @@ void CDC_ReceiveQueue_Init(CDC_ReceiveQueue_TypeDef *queue) queue->length = CDC_RECEIVE_QUEUE_BUFFER_SIZE; } -// Reserve block in queue and return pointer to it. uint8_t *CDC_ReceiveQueue_ReserveBlock(CDC_ReceiveQueue_TypeDef *queue) { const uint16_t limit = @@ -130,7 +136,6 @@ uint8_t *CDC_ReceiveQueue_ReserveBlock(CDC_ReceiveQueue_TypeDef *queue) return 0; } -// Commits block in queue and make it available for reading void CDC_ReceiveQueue_CommitBlock(CDC_ReceiveQueue_TypeDef *queue, uint16_t size) { @@ -143,7 +148,6 @@ void CDC_ReceiveQueue_CommitBlock(CDC_ReceiveQueue_TypeDef *queue, } } -// Determine size, available for read int CDC_ReceiveQueue_ReadSize(CDC_ReceiveQueue_TypeDef *queue) { // reading length after write make guarantee, that length >= write @@ -156,7 +160,6 @@ int CDC_ReceiveQueue_ReadSize(CDC_ReceiveQueue_TypeDef *queue) return length + write - queue->read; } -// Read one byte from queue. int CDC_ReceiveQueue_Dequeue(CDC_ReceiveQueue_TypeDef *queue) { volatile uint16_t write = queue->write; @@ -174,7 +177,6 @@ int CDC_ReceiveQueue_Dequeue(CDC_ReceiveQueue_TypeDef *queue) return ch; } -// Peek byte from queue. int CDC_ReceiveQueue_Peek(CDC_ReceiveQueue_TypeDef *queue) { volatile uint16_t write = queue->write; diff --git a/libraries/USBDevice/src/cdc/usbd_cdc.c b/libraries/USBDevice/src/cdc/usbd_cdc.c index a93f45dd4f..c992ce7d40 100644 --- a/libraries/USBDevice/src/cdc/usbd_cdc.c +++ b/libraries/USBDevice/src/cdc/usbd_cdc.c @@ -472,9 +472,9 @@ static uint8_t CDCCmdEpAdd = CDC_CMD_EP; /** * @brief USBD_CDC_Init * Initialize the CDC interface - * @param pdev: device instance - * @param cfgidx: Configuration index - * @retval status + * @param pdev device instance + * @param cfgidx Configuration index + * @return status */ static uint8_t USBD_CDC_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { @@ -566,9 +566,9 @@ static uint8_t USBD_CDC_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx) /** * @brief USBD_CDC_DeInit * DeInitialize the CDC layer - * @param pdev: device instance - * @param cfgidx: Configuration index - * @retval status + * @param pdev device instance + * @param cfgidx Configuration index + * @return status */ static uint8_t USBD_CDC_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx) { @@ -609,9 +609,9 @@ static uint8_t USBD_CDC_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx) /** * @brief USBD_CDC_Setup * Handle the CDC specific requests - * @param pdev: instance - * @param req: usb requests - * @retval status + * @param pdev instance + * @param req usb requests + * @return status */ static uint8_t USBD_CDC_Setup(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) @@ -697,9 +697,9 @@ static uint8_t USBD_CDC_Setup(USBD_HandleTypeDef *pdev, /** * @brief USBD_CDC_DataIn * Data sent on non-control IN endpoint - * @param pdev: device instance - * @param epnum: endpoint number - * @retval status + * @param pdev device instance + * @param epnum endpoint number + * @return status */ static uint8_t USBD_CDC_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum) { @@ -743,9 +743,9 @@ static uint8_t USBD_CDC_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum) /** * @brief USBD_CDC_DataOut * Data received on non-control Out endpoint - * @param pdev: device instance - * @param epnum: endpoint number - * @retval status + * @param pdev device instance + * @param epnum endpoint number + * @return status */ static uint8_t USBD_CDC_DataOut(USBD_HandleTypeDef *pdev, uint8_t epnum) { @@ -769,8 +769,8 @@ static uint8_t USBD_CDC_DataOut(USBD_HandleTypeDef *pdev, uint8_t epnum) /** * @brief USBD_CDC_EP0_RxReady * Handle EP0 Rx Ready event - * @param pdev: device instance - * @retval status + * @param pdev device instance + * @return status */ static uint8_t USBD_CDC_EP0_RxReady(USBD_HandleTypeDef *pdev) { @@ -793,8 +793,8 @@ static uint8_t USBD_CDC_EP0_RxReady(USBD_HandleTypeDef *pdev) /** * @brief USBD_CDC_GetFSCfgDesc * Return configuration descriptor - * @param length : pointer data length - * @retval pointer to descriptor buffer + * @param length pointer data length + * @return pointer to descriptor buffer */ static uint8_t *USBD_CDC_GetFSCfgDesc(uint16_t *length) { @@ -822,8 +822,8 @@ static uint8_t *USBD_CDC_GetFSCfgDesc(uint16_t *length) /** * @brief USBD_CDC_GetHSCfgDesc * Return configuration descriptor - * @param length : pointer data length - * @retval pointer to descriptor buffer + * @param length pointer data length + * @return pointer to descriptor buffer */ static uint8_t *USBD_CDC_GetHSCfgDesc(uint16_t *length) { @@ -851,8 +851,8 @@ static uint8_t *USBD_CDC_GetHSCfgDesc(uint16_t *length) /** * @brief USBD_CDC_GetOtherSpeedCfgDesc * Return configuration descriptor - * @param length : pointer data length - * @retval pointer to descriptor buffer + * @param length pointer data length + * @return pointer to descriptor buffer */ static uint8_t *USBD_CDC_GetOtherSpeedCfgDesc(uint16_t *length) { @@ -880,8 +880,8 @@ static uint8_t *USBD_CDC_GetOtherSpeedCfgDesc(uint16_t *length) /** * @brief USBD_CDC_GetDeviceQualifierDescriptor * return Device Qualifier descriptor - * @param length : pointer data length - * @retval pointer to descriptor buffer + * @param length pointer data length + * @return pointer to descriptor buffer */ uint8_t *USBD_CDC_GetDeviceQualifierDescriptor(uint16_t *length) { @@ -890,12 +890,6 @@ uint8_t *USBD_CDC_GetDeviceQualifierDescriptor(uint16_t *length) return USBD_CDC_DeviceQualifierDesc; } #endif /* USE_USBD_COMPOSITE */ -/** - * @brief USBD_CDC_RegisterInterface - * @param pdev: device instance - * @param fops: CD Interface callback - * @retval status - */ uint8_t USBD_CDC_RegisterInterface(USBD_HandleTypeDef *pdev, USBD_CDC_ItfTypeDef *fops) { @@ -908,14 +902,6 @@ uint8_t USBD_CDC_RegisterInterface(USBD_HandleTypeDef *pdev, return (uint8_t)USBD_OK; } -/** - * @brief USBD_CDC_SetTxBuffer - * @param pdev: device instance - * @param pbuff: Tx Buffer - * @param length: length of data to be sent - * @param ClassId: The Class ID - * @retval status - */ #ifdef USE_USBD_COMPOSITE uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff, uint32_t length, uint8_t ClassId) @@ -938,12 +924,6 @@ uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev, return (uint8_t)USBD_OK; } -/** - * @brief USBD_CDC_SetRxBuffer - * @param pdev: device instance - * @param pbuff: Rx Buffer - * @retval status - */ uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff) { USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId]; @@ -957,13 +937,6 @@ uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff) return (uint8_t)USBD_OK; } -/** - * @brief USBD_CDC_TransmitPacket - * Transmit packet on IN endpoint - * @param pdev: device instance - * @param ClassId: The Class ID - * @retval status - */ #ifdef USE_USBD_COMPOSITE uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev, uint8_t ClassId) { @@ -1001,12 +974,6 @@ uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev) return (uint8_t)ret; } -/** - * @brief USBD_CDC_ReceivePacket - * prepare OUT Endpoint for reception - * @param pdev: device instance - * @retval status - */ uint8_t USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev) { USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *)pdev->pClassDataCmsit[pdev->classId]; diff --git a/libraries/USBDevice/src/cdc/usbd_cdc_if.c b/libraries/USBDevice/src/cdc/usbd_cdc_if.c index 2fe9614fb0..2b6ff5dd8c 100644 --- a/libraries/USBDevice/src/cdc/usbd_cdc_if.c +++ b/libraries/USBDevice/src/cdc/usbd_cdc_if.c @@ -94,8 +94,7 @@ USBD_CDC_LineCodingTypeDef linecoding = { /** * @brief USBD_CDC_Init * Initializes the CDC media low layer - * @param None - * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL + * @return Result of the operation: USBD_OK if all operations are OK else USBD_FAIL */ static int8_t USBD_CDC_Init(void) { @@ -111,8 +110,7 @@ static int8_t USBD_CDC_Init(void) /** * @brief USBD_CDC_DeInit * DeInitializes the CDC media low layer - * @param None - * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL + * @return Result of the operation: USBD_OK if all operations are OK else USBD_FAIL */ static int8_t USBD_CDC_DeInit(void) { @@ -123,10 +121,10 @@ static int8_t USBD_CDC_DeInit(void) /** * @brief USBD_CDC_Control * Manage the CDC class requests - * @param cmd: Command code - * @param pbuf: Buffer containing command data (request parameters) - * @param length: Number of data to be sent (in bytes) - * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL + * @param cmd Command code + * @param pbuf Buffer containing command data (request parameters) + * @param length Number of data to be sent (in bytes) + * @return Result of the operation: USBD_OK if all operations are OK else USBD_FAIL */ static int8_t USBD_CDC_Control(uint8_t cmd, uint8_t *pbuf, uint16_t length) { @@ -223,9 +221,9 @@ static int8_t USBD_CDC_Control(uint8_t cmd, uint8_t *pbuf, uint16_t length) * it will result in receiving more data while previous ones are still * not sent. * - * @param Buf: Buffer of data to be received - * @param Len: Number of data received (in bytes) - * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL + * @param Buf Buffer of data to be received + * @param Len Number of data received (in bytes) + * @return Result of the operation: USBD_OK if all operations are OK else USBD_FAIL */ static int8_t USBD_CDC_Receive(uint8_t *Buf, uint32_t *Len) { @@ -261,9 +259,10 @@ static int8_t USBD_CDC_Receive(uint8_t *Buf, uint32_t *Len) * This function is IN transfer complete callback used to inform user that * the submitted Data is successfully sent over USB. * - * @param Buf: Buffer of data to be received - * @param Len: Number of data received (in bytes) - * @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL + * @param Buf Buffer of data that was transmitted + * @param Len Number of data transmitted (in bytes) + * @param epnum Endpoint number + * @return Result of the operation: USBD_OK if all operations are OK else USBD_FAIL */ static int8_t USBD_CDC_TransmitCplt(uint8_t *Buf, uint32_t *Len, uint8_t epnum) { @@ -390,19 +389,16 @@ uint32_t CDC_getBaudrate() return linecoding.bitrate; } -// getter for CDC stop bits. Note: CDC definition identical to USBSerial.h uint8_t CDC_getStopBits(void) { return linecoding.format; } -// getter for CDC parity. Note: CDC definition identical to USBSerial.h uint8_t CDC_getParity(void) { return linecoding.paritytype; } -// getter for CDC data bits. Note: CDC definition identical to USBSerial.h uint8_t CDC_getDataBits(void) { return linecoding.datatype; diff --git a/libraries/USBDevice/src/hid/usbd_hid_composite.c b/libraries/USBDevice/src/hid/usbd_hid_composite.c index f1fac007a5..827e21b966 100644 --- a/libraries/USBDevice/src/hid/usbd_hid_composite.c +++ b/libraries/USBDevice/src/hid/usbd_hid_composite.c @@ -518,9 +518,9 @@ static uint8_t HIDKInEpAdd = HID_KEYBOARD_EPIN_ADDR; /** * @brief USBD_HID_Init * Initialize the HID interface - * @param pdev: device instance - * @param cfgidx: Configuration index - * @retval status + * @param pdev device instance + * @param cfgidx Configuration index + * @return status */ static uint8_t USBD_HID_Init(USBD_HandleTypeDef *pdev, uint8_t cfgidx) @@ -572,9 +572,9 @@ static uint8_t USBD_HID_Init(USBD_HandleTypeDef *pdev, /** * @brief USBD_HID_DeInit * DeInitialize the HID layer - * @param pdev: device instance - * @param cfgidx: Configuration index - * @retval status + * @param pdev device instance + * @param cfgidx Configuration index + * @return status */ static uint8_t USBD_HID_DeInit(USBD_HandleTypeDef *pdev, uint8_t cfgidx) @@ -607,9 +607,9 @@ static uint8_t USBD_HID_DeInit(USBD_HandleTypeDef *pdev, /** * @brief USBD_COMPOSITE_HID_Setup * Handle the HID specific requests - * @param pdev: instance - * @param req: usb requests - * @retval status + * @param pdev instance + * @param req usb requests + * @return status */ static uint8_t USBD_COMPOSITE_HID_Setup(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) @@ -625,9 +625,9 @@ static uint8_t USBD_COMPOSITE_HID_Setup(USBD_HandleTypeDef *pdev, /** * @brief USBD_HID_MOUSE_Setup * Handle the HID specific requests - * @param pdev: instance - * @param req: usb requests - * @retval status + * @param pdev instance + * @param req usb requests + * @return status */ static uint8_t USBD_HID_MOUSE_Setup(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) @@ -734,9 +734,9 @@ static uint8_t USBD_HID_MOUSE_Setup(USBD_HandleTypeDef *pdev, /** * @brief USBD_HID_KEYBOARD_Setup * Handle the HID specific requests - * @param pdev: instance - * @param req: usb requests - * @retval status + * @param pdev instance + * @param req usb requests + * @return status */ static uint8_t USBD_HID_KEYBOARD_Setup(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req) @@ -839,14 +839,6 @@ static uint8_t USBD_HID_KEYBOARD_Setup(USBD_HandleTypeDef *pdev, return (uint8_t)ret; } -/** - * @brief USBD_HID_SendReport - * Send HID Report - * @param pdev: device instance - * @param buff: pointer to report - * @param ClassId: The Class ID - * @retval status - */ #ifdef USE_USBD_COMPOSITE uint8_t USBD_HID_MOUSE_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, @@ -883,14 +875,6 @@ uint8_t USBD_HID_MOUSE_SendReport(USBD_HandleTypeDef *pdev, return (uint8_t)USBD_OK; } -/** - * @brief USBD_HID_SendReport - * Send HID Report - * @param pdev: device instance - * @param buff: pointer to report - * @param ClassId: The Class ID - * @retval status - */ #ifdef USE_USBD_COMPOSITE uint8_t USBD_HID_KEYBOARD_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, @@ -927,12 +911,6 @@ uint8_t USBD_HID_KEYBOARD_SendReport(USBD_HandleTypeDef *pdev, return (uint8_t)USBD_OK; } -/** - * @brief USBD_HID_GetPollingInterval - * return polling interval from endpoint descriptor - * @param pdev: device instance - * @retval polling interval - */ uint32_t USBD_HID_GetPollingInterval(USBD_HandleTypeDef *pdev) { uint32_t polling_interval = 0U; @@ -956,9 +934,8 @@ uint32_t USBD_HID_GetPollingInterval(USBD_HandleTypeDef *pdev) /** * @brief USBD_HID_GetCfgFSDesc * return FS configuration descriptor - * @param speed : current device speed - * @param length : pointer data length - * @retval pointer to descriptor buffer + * @param length pointer data length + * @return pointer to descriptor buffer */ static uint8_t *USBD_HID_GetFSCfgDesc(uint16_t *length) { @@ -980,9 +957,8 @@ static uint8_t *USBD_HID_GetFSCfgDesc(uint16_t *length) /** * @brief USBD_HID_GetCfgHSDesc * return HS configuration descriptor - * @param speed : current device speed - * @param length : pointer data length - * @retval pointer to descriptor buffer + * @param length pointer data length + * @return pointer to descriptor buffer */ static uint8_t *USBD_HID_GetHSCfgDesc(uint16_t *length) { @@ -1004,9 +980,8 @@ static uint8_t *USBD_HID_GetHSCfgDesc(uint16_t *length) /** * @brief USBD_HID_GetOtherSpeedCfgDesc * return other speed configuration descriptor - * @param speed : current device speed - * @param length : pointer data length - * @retval pointer to descriptor buffer + * @param length pointer data length + * @return pointer to descriptor buffer */ static uint8_t *USBD_HID_GetOtherSpeedCfgDesc(uint16_t *length) { @@ -1029,9 +1004,9 @@ static uint8_t *USBD_HID_GetOtherSpeedCfgDesc(uint16_t *length) /** * @brief USBD_HID_DataIn * handle data IN Stage - * @param pdev: device instance - * @param epnum: endpoint index - * @retval status + * @param pdev device instance + * @param epnum endpoint index + * @return status */ static uint8_t USBD_HID_DataIn(USBD_HandleTypeDef *pdev, uint8_t epnum) @@ -1055,8 +1030,8 @@ static uint8_t USBD_HID_DataIn(USBD_HandleTypeDef *pdev, /** * @brief DeviceQualifierDescriptor * return Device Qualifier descriptor - * @param length : pointer data length - * @retval pointer to descriptor buffer + * @param length pointer data length + * @return pointer to descriptor buffer */ static uint8_t *USBD_HID_GetDeviceQualifierDesc(uint16_t *length) { diff --git a/libraries/USBDevice/src/hid/usbd_hid_composite.h b/libraries/USBDevice/src/hid/usbd_hid_composite.h index c5d4aaab4c..06337264f1 100644 --- a/libraries/USBDevice/src/hid/usbd_hid_composite.h +++ b/libraries/USBDevice/src/hid/usbd_hid_composite.h @@ -35,34 +35,52 @@ extern "C" { /** @addtogroup STM32_USB_DEVICE_LIBRARY * @{ */ -/** @defgroup USBD_HID - * @brief This file is the Header file for usbd_hid.c +/** @defgroup USBD_HID USBD HID Composite Class + * @brief This file is the Header file for usbd_hid_composite.c * @{ */ -/** @defgroup USBD_HID_Exported_Defines +/** @defgroup USBD_HID_Exported_Defines USBD HID Exported Defines + * @brief HID interface numbers, descriptor sizes, class request codes and + * endpoint polling intervals. * @{ */ +/** @name Interface numbers */ +/** @{ */ #define HID_MOUSE_INTERFACE 0x00U #define HID_KEYBOARD_INTERFACE 0x01U +/** @} */ +/** @name Descriptor sizes, in bytes */ +/** @{ */ #define USB_COMPOSITE_HID_CONFIG_DESC_SIZ 59U #define USB_HID_DESC_SIZ 9U #define HID_MOUSE_REPORT_DESC_SIZE 74U #define HID_KEYBOARD_REPORT_DESC_SIZE 45U +/** @} */ +/** @name Descriptor types */ +/** @{ */ #define HID_DESCRIPTOR_TYPE 0x21 #define HID_REPORT_DESC 0x22 +/** @} */ #ifndef HID_HS_BINTERVAL +/** + * @brief Endpoint polling interval at high speed, as bInterval + * (2^(bInterval-1) microframes). Can be overridden. + */ #define HID_HS_BINTERVAL 0x07U #endif /* HID_HS_BINTERVAL */ #ifndef HID_FS_BINTERVAL +/** @brief Endpoint polling interval at full speed, in ms. Can be overridden. */ #define HID_FS_BINTERVAL 0x0AU #endif /* HID_FS_BINTERVAL */ +/** @name HID class request codes */ +/** @{ */ #define HID_REQ_SET_PROTOCOL 0x0BU #define HID_REQ_GET_PROTOCOL 0x03U @@ -71,40 +89,51 @@ extern "C" { #define HID_REQ_SET_REPORT 0x09U #define HID_REQ_GET_REPORT 0x01U +/** @} */ /** * @} */ -/** @defgroup USBD_CORE_Exported_TypesDefinitions +/** @defgroup USBD_HID_Exported_Types USBD HID Exported Types + * @brief Types used by the USB HID composite class. * @{ */ +/** @brief HID transfer state. */ typedef enum { - HID_IDLE = 0, - HID_BUSY, + HID_IDLE = 0, /**< Ready to send a report. */ + HID_BUSY, /**< A report is being sent. */ } HID_StateTypeDef; +/** @brief HID composite class instance data. */ typedef struct { - uint32_t Protocol; - uint32_t IdleState; + uint32_t Protocol; /**< Active HID protocol. */ + uint32_t IdleState; /**< Idle rate set by the host. */ + /** Alternate setting of the interface. */ uint32_t AltSetting; + /** Transfer state of the mouse IN endpoint. */ HID_StateTypeDef Mousestate; + /** Transfer state of the keyboard IN endpoint. */ HID_StateTypeDef Keyboardstate; } USBD_HID_HandleTypeDef; -/* - * HID Class specification version 1.1 - * 6.2.1 HID Descriptor +/** + * @brief HID descriptor, as defined in HID Class specification version 1.1, section 6.2.1. */ - typedef struct { + /** Size of the descriptor, in bytes. */ uint8_t bLength; + /** Descriptor type (HID_DESCRIPTOR_TYPE). */ uint8_t bDescriptorType; + /** HID specification release number (BCD). */ uint16_t bcdHID; + /** Country code of the localized hardware. */ uint8_t bCountryCode; - uint8_t bNumDescriptors; + uint8_t bNumDescriptors; /**< Number of class descriptors. */ + /** Type of the first class descriptor (HID_REPORT_DESC). */ uint8_t bHIDDescriptorType; + /** Size of the first class descriptor, in bytes. */ uint16_t wItemLength; } __PACKED USBD_HIDDescTypeDef; @@ -112,47 +141,73 @@ typedef struct { * @} */ - - -/** @defgroup USBD_CORE_Exported_Macros - * @{ - */ - -/** - * @} - */ - -/** @defgroup USBD_CORE_Exported_Variables +/** @defgroup USBD_HID_Exported_Variables USBD HID Exported Variables + * @brief Class driver exported by the USB HID composite class. * @{ */ +/** @brief HID composite (mouse and keyboard) class driver. */ extern USBD_ClassTypeDef USBD_COMPOSITE_HID; +/** + * @brief Pointer to the HID composite class driver, as expected by USBD_RegisterClass(). + */ #define USBD_COMPOSITE_HID_CLASS &USBD_COMPOSITE_HID /** * @} */ -/** @defgroup USB_CORE_Exported_Functions +/** @defgroup USBD_HID_Exported_Functions USBD HID Exported Functions + * @brief Functions used by the application to send HID reports. * @{ */ +/** + * @brief Send a HID mouse report. + * @param pdev Pointer to the device instance. + * @param report Pointer to the report data. + * @param len Length of the report, in bytes. + * @param ClassId Class instance ID. Only present when USE_USBD_COMPOSITE is defined. + * @return USBD_OK on success or if the device is not configured, + * USBD_BUSY if the previous report is still pending, + * USBD_FAIL if the class instance is not allocated. + */ #ifdef USE_USBD_COMPOSITE uint8_t USBD_HID_MOUSE_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, uint16_t len, uint8_t ClassId); +#else +uint8_t USBD_HID_MOUSE_SendReport(USBD_HandleTypeDef *pdev, + uint8_t *report, + uint16_t len); +#endif /* USE_USBD_COMPOSITE */ + +/** + * @brief Send a HID keyboard report. + * @param pdev Pointer to the device instance. + * @param report Pointer to the report data. + * @param len Length of the report, in bytes. + * @param ClassId Class instance ID. Only present when USE_USBD_COMPOSITE is defined. + * @return USBD_OK on success or if the device is not configured, + * USBD_BUSY if the previous report is still pending, + * USBD_FAIL if the class instance is not allocated. + */ +#ifdef USE_USBD_COMPOSITE uint8_t USBD_HID_KEYBOARD_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, uint16_t len, uint8_t ClassId); #else -uint8_t USBD_HID_MOUSE_SendReport(USBD_HandleTypeDef *pdev, - uint8_t *report, - uint16_t len); uint8_t USBD_HID_KEYBOARD_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, uint16_t len); #endif /* USE_USBD_COMPOSITE */ +/** + * @brief Get the polling interval from the HID endpoint descriptor. + * @param pdev Pointer to the device instance. + * @return Polling interval in ms, computed from HID_HS_BINTERVAL when the + * device runs at high speed, or taken from HID_FS_BINTERVAL otherwise. + */ uint32_t USBD_HID_GetPollingInterval(USBD_HandleTypeDef *pdev); #ifdef __cplusplus diff --git a/libraries/USBDevice/src/hid/usbd_hid_composite_if.c b/libraries/USBDevice/src/hid/usbd_hid_composite_if.c index 9355bbac91..0622e2c93c 100644 --- a/libraries/USBDevice/src/hid/usbd_hid_composite_if.c +++ b/libraries/USBDevice/src/hid/usbd_hid_composite_if.c @@ -32,11 +32,6 @@ static bool HID_mouse_initialized = false; static bool icache_enabled = false; #endif -/** - * @brief Initialize USB devices - * @param HID_Interface device type: HID_KEYBOARD or HID_MOUSE - * @retval none - */ void HID_Composite_Init(HID_Interface device) { #if defined(ICACHE) && defined (HAL_ICACHE_MODULE_ENABLED) && !defined(HAL_ICACHE_MODULE_DISABLED) @@ -69,11 +64,6 @@ void HID_Composite_Init(HID_Interface device) } } -/** - * @brief DeInitialize USB devices - * @param HID_Interface device type: HID_KEYBOARD or HID_MOUSE - * @retval none - */ void HID_Composite_DeInit(HID_Interface device) { if (IS_HID_INTERFACE(device) && @@ -100,23 +90,11 @@ void HID_Composite_DeInit(HID_Interface device) } } -/** - * @brief Send HID mouse Report - * @param report pointer to report - * @param len report length - * @retval none - */ void HID_Composite_mouse_sendReport(uint8_t *report, uint16_t len) { USBD_HID_MOUSE_SendReport(&hUSBD_Device_HID, report, len); } -/** - * @brief Send HID keyboard Report - * @param report pointer to report - * @param len report length - * @retval none - */ void HID_Composite_keyboard_sendReport(uint8_t *report, uint16_t len) { USBD_HID_KEYBOARD_SendReport(&hUSBD_Device_HID, report, len); diff --git a/libraries/USBDevice/src/usbd_conf.c b/libraries/USBDevice/src/usbd_conf.c index a5f216e5a8..b778741ca0 100644 --- a/libraries/USBDevice/src/usbd_conf.c +++ b/libraries/USBDevice/src/usbd_conf.c @@ -45,8 +45,7 @@ PCD_HandleTypeDef g_hpcd; /** * @brief Initializes the PCD MSP. - * @param hpcd: PCD handle - * @retval None + * @param hpcd PCD handle */ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) { @@ -223,8 +222,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) /** * @brief De-Initializes the PCD MSP. - * @param hpcd: PCD handle - * @retval None + * @param hpcd PCD handle */ void HAL_PCD_MspDeInit(PCD_HandleTypeDef *hpcd) { @@ -254,8 +252,7 @@ void HAL_PCD_MspDeInit(PCD_HandleTypeDef *hpcd) /** * @brief SetupStage callback. - * @param hpcd: PCD handle - * @retval None + * @param hpcd PCD handle */ void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd) { @@ -264,9 +261,8 @@ void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd) /** * @brief DataOut Stage callback. - * @param hpcd: PCD handle - * @param epnum: Endpoint Number - * @retval None + * @param hpcd PCD handle + * @param epnum Endpoint Number */ void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) { @@ -275,9 +271,8 @@ void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) /** * @brief DataIn Stage callback. - * @param hpcd: PCD handle - * @param epnum: Endpoint Number - * @retval None + * @param hpcd PCD handle + * @param epnum Endpoint Number */ void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) { @@ -286,8 +281,7 @@ void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) /** * @brief SOF callback. - * @param hpcd: PCD handle - * @retval None + * @param hpcd PCD handle */ void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd) { @@ -296,8 +290,7 @@ void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd) /** * @brief Reset callback. - * @param hpcd: PCD handle - * @retval None + * @param hpcd PCD handle */ void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd) { @@ -327,8 +320,7 @@ void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd) /** * @brief Suspend callback. - * @param hpcd: PCD handle - * @retval None + * @param hpcd PCD handle */ void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd) { @@ -344,8 +336,7 @@ void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd) /** * @brief Resume callback. - * @param hpcd: PCD handle - * @retval None + * @param hpcd PCD handle */ void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd) { @@ -361,9 +352,8 @@ void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd) /** * @brief ISOOUTIncomplete callback. - * @param hpcd: PCD handle - * @param epnum: Endpoint Number - * @retval None + * @param hpcd PCD handle + * @param epnum Endpoint Number */ void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) { @@ -372,9 +362,8 @@ void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) /** * @brief ISOINIncomplete callback. - * @param hpcd: PCD handle - * @param epnum: Endpoint Number - * @retval None + * @param hpcd PCD handle + * @param epnum Endpoint Number */ void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) { @@ -383,8 +372,7 @@ void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum) /** * @brief ConnectCallback callback. - * @param hpcd: PCD handle - * @retval None + * @param hpcd PCD handle */ void HAL_PCD_ConnectCallback(PCD_HandleTypeDef *hpcd) { @@ -393,8 +381,7 @@ void HAL_PCD_ConnectCallback(PCD_HandleTypeDef *hpcd) /** * @brief Disconnect callback. - * @param hpcd: PCD handle - * @retval None + * @param hpcd PCD handle */ void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd) { @@ -403,8 +390,6 @@ void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd) /** * @brief This function handles USB-On-The-Go FS/HS global interrupt request. - * @param None - * @retval None */ #ifdef USE_USB_HS void OTG_HS_IRQHandler(void) @@ -420,8 +405,6 @@ void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd) #if defined(USB_H_IRQn) /** * @brief This function handles USB high priority interrupt. - * @param None - * @retval None */ void USB_H_IRQHandler(void) { @@ -431,8 +414,6 @@ void USB_H_IRQHandler(void) /** * @brief This function handles USB Wakeup IRQ Handler. - * @param None - * @retval None */ #ifdef USE_USB_HS void OTG_HS_WKUP_IRQHandler(void) @@ -470,8 +451,8 @@ void USB_H_IRQHandler(void) *******************************************************************************/ /** * @brief Initializes the Low Level portion of the Device driver. - * @param pdev: Device handle - * @retval USBD Status + * @param pdev Device handle + * @return USBD Status */ USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev) { @@ -547,8 +528,8 @@ USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev) /** * @brief De-Initializes the Low Level portion of the Device driver. - * @param pdev: Device handle - * @retval USBD Status + * @param pdev Device handle + * @return USBD Status */ USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev) { @@ -558,8 +539,8 @@ USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev) /** * @brief Starts the Low Level portion of the Device driver. - * @param pdev: Device handle - * @retval USBD Status + * @param pdev Device handle + * @return USBD Status */ USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev) { @@ -569,8 +550,8 @@ USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev) /** * @brief Stops the Low Level portion of the Device driver. - * @param pdev: Device handle - * @retval USBD Status + * @param pdev Device handle + * @return USBD Status */ USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev) { @@ -580,11 +561,11 @@ USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev) /** * @brief Opens an endpoint of the Low Level Driver. - * @param pdev: Device handle - * @param ep_addr: Endpoint Number - * @param ep_type: Endpoint Type - * @param ep_mps: Endpoint Max Packet Size - * @retval USBD Status + * @param pdev Device handle + * @param ep_addr Endpoint Number + * @param ep_type Endpoint Type + * @param ep_mps Endpoint Max Packet Size + * @return USBD Status */ USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr, @@ -600,9 +581,9 @@ USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, /** * @brief Closes an endpoint of the Low Level Driver. - * @param pdev: Device handle - * @param ep_addr: Endpoint Number - * @retval USBD Status + * @param pdev Device handle + * @param ep_addr Endpoint Number + * @return USBD Status */ USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { @@ -612,9 +593,9 @@ USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) /** * @brief Flushes an endpoint of the Low Level Driver. - * @param pdev: Device handle - * @param ep_addr: Endpoint Number - * @retval USBD Status + * @param pdev Device handle + * @param ep_addr Endpoint Number + * @return USBD Status */ USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { @@ -624,9 +605,9 @@ USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) /** * @brief Sets a Stall condition on an endpoint of the Low Level Driver. - * @param pdev: Device handle - * @param ep_addr: Endpoint Number - * @retval USBD Status + * @param pdev Device handle + * @param ep_addr Endpoint Number + * @return USBD Status */ USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { @@ -636,9 +617,9 @@ USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) /** * @brief Clears a Stall condition on an endpoint of the Low Level Driver. - * @param pdev: Device handle - * @param ep_addr: Endpoint Number - * @retval USBD Status + * @param pdev Device handle + * @param ep_addr Endpoint Number + * @return USBD Status */ USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { @@ -648,9 +629,9 @@ USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_add /** * @brief Returns Stall condition. - * @param pdev: Device handle - * @param ep_addr: Endpoint Number - * @retval Stall (1: Yes, 0: No) + * @param pdev Device handle + * @param ep_addr Endpoint Number + * @return Stall (1: Yes, 0: No) */ uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { @@ -665,9 +646,9 @@ uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) /** * @brief Assigns a USB address to the device. - * @param pdev: Device handle - * @param dev_addr: Endpoint Number - * @retval USBD Status + * @param pdev Device handle + * @param dev_addr Device address + * @return USBD Status */ USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr) @@ -678,11 +659,11 @@ USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, /** * @brief Transmits data over an endpoint. - * @param pdev: Device handle - * @param ep_addr: Endpoint Number - * @param pbuf: Pointer to data to be sent - * @param size: Data size - * @retval USBD Status + * @param pdev Device handle + * @param ep_addr Endpoint Number + * @param pbuf Pointer to data to be sent + * @param size Data size + * @return USBD Status */ USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t size) @@ -693,11 +674,11 @@ USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, /** * @brief Prepares an endpoint for reception. - * @param pdev: Device handle - * @param ep_addr: Endpoint Number - * @param pbuf: Pointer to data to be received - * @param size: Data size - * @retval USBD Status + * @param pdev Device handle + * @param ep_addr Endpoint Number + * @param pbuf Pointer to data to be received + * @param size Data size + * @return USBD Status */ USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, @@ -709,9 +690,9 @@ USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, /** * @brief Returns the last transferred packet size. - * @param pdev: Device handle - * @param ep_addr: Endpoint Number - * @retval Received Data Size + * @param pdev Device handle + * @param ep_addr Endpoint Number + * @return Received Data Size */ uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { @@ -720,8 +701,7 @@ uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr) /** * @brief Delays routine for the USB Device Library. - * @param Delay: Delay in ms - * @retval None + * @param Delay Delay in ms */ void USBD_LL_Delay(uint32_t Delay) { diff --git a/libraries/USBDevice/src/usbd_confv2.c b/libraries/USBDevice/src/usbd_confv2.c index 7e135f9566..31be7b0d92 100644 --- a/libraries/USBDevice/src/usbd_confv2.c +++ b/libraries/USBDevice/src/usbd_confv2.c @@ -1,7 +1,7 @@ /** ****************************************************************************** - * @file usbd_confv2.c - * @brief HAL v2 USB device low-level adapter. + * @file usbd_confv2.c + * @brief HAL v2 USB device low-level adapter. ****************************************************************************** */ @@ -20,6 +20,10 @@ static USBD_HandleTypeDef *g_pdev; static uint8_t g_stalled_in; static uint8_t g_stalled_out; +/** + * @brief Configure the USB clock, interrupt priority, and NVIC interrupt for + * the HAL v2 USB device. + */ static void USBD_V2_ConfigPinsAndIrq(void) { /* The HAL v2 USB DRD FS PCD owns PA11/PA12 and configures these fixed USB @@ -52,27 +56,52 @@ void USBD_reenumerate(void) } #endif +/** + * @brief HAL PCD callback for a SETUP stage packet. Forwards it to the USB device core. + * @param hpcd PCD handle that raised the callback. + */ void HAL_PCD_SetupStageCallback(hal_pcd_handle_t *hpcd) { USBD_LL_SetupStage(g_pdev, (uint8_t *)hpcd->setup); } +/** + * @brief HAL PCD callback for the end of an OUT data stage. Forwards it to + * the USB device core. + * @param hpcd PCD handle that raised the callback. + * @param epnum Endpoint number. + */ void HAL_PCD_DataOutStageCallback(hal_pcd_handle_t *hpcd, uint8_t epnum) { USBD_LL_DataOutStage(g_pdev, epnum, hpcd->out_ep[epnum].p_xfer_buffer); } +/** + * @brief HAL PCD callback for the end of an IN data stage. Forwards it to + * the USB device core. + * @param hpcd PCD handle that raised the callback. + * @param epnum Endpoint number. + */ void HAL_PCD_DataInStageCallback(hal_pcd_handle_t *hpcd, uint8_t epnum) { USBD_LL_DataInStage(g_pdev, epnum, hpcd->in_ep[epnum].p_xfer_buffer); } +/** + * @brief HAL PCD callback for a start-of-frame event. Forwards it to the USB device core. + * @param hpcd PCD handle that raised the callback. + */ void HAL_PCD_SofCallback(hal_pcd_handle_t *hpcd) { (void)hpcd; USBD_LL_SOF(g_pdev); } +/** + * @brief HAL PCD callback for a bus reset. Resets the USB device core and + * sets the speed to full speed. + * @param hpcd PCD handle that raised the callback. + */ void HAL_PCD_ResetCallback(hal_pcd_handle_t *hpcd) { (void)hpcd; @@ -80,47 +109,85 @@ void HAL_PCD_ResetCallback(hal_pcd_handle_t *hpcd) USBD_LL_SetSpeed(g_pdev, USBD_SPEED_FULL); } +/** + * @brief HAL PCD callback for a suspend event. Forwards it to the USB device core. + * @param hpcd PCD handle that raised the callback. + */ void HAL_PCD_SuspendCallback(hal_pcd_handle_t *hpcd) { (void)hpcd; USBD_LL_Suspend(g_pdev); } +/** + * @brief HAL PCD callback for a resume event. Forwards it to the USB device core. + * @param hpcd PCD handle that raised the callback. + */ void HAL_PCD_ResumeCallback(hal_pcd_handle_t *hpcd) { (void)hpcd; USBD_LL_Resume(g_pdev); } +/** + * @brief HAL PCD callback for an incomplete isochronous OUT transfer. + * @param hpcd PCD handle that raised the callback. + * @param epnum Endpoint number. + */ void HAL_PCD_ISOOUTIncompleteCallback(hal_pcd_handle_t *hpcd, uint8_t epnum) { (void)hpcd; USBD_LL_IsoOUTIncomplete(g_pdev, epnum); } +/** + * @brief HAL PCD callback for an incomplete isochronous IN transfer. + * @param hpcd PCD handle that raised the callback. + * @param epnum Endpoint number. + */ void HAL_PCD_ISOINIncompleteCallback(hal_pcd_handle_t *hpcd, uint8_t epnum) { (void)hpcd; USBD_LL_IsoINIncomplete(g_pdev, epnum); } +/** + * @brief HAL PCD callback for the device connect event. Forwards it to the + * USB device core. + * @param hpcd PCD handle that raised the callback. + */ void HAL_PCD_ConnectCallback(hal_pcd_handle_t *hpcd) { (void)hpcd; USBD_LL_DevConnected(g_pdev); } +/** + * @brief HAL PCD callback for the device disconnect event. Forwards it to the + * USB device core. + * @param hpcd PCD handle that raised the callback. + */ void HAL_PCD_DisconnectCallback(hal_pcd_handle_t *hpcd) { (void)hpcd; USBD_LL_DevDisconnected(g_pdev); } +/** + * @brief USB interrupt service routine. Passes the interrupt to the HAL PCD driver. + */ void USB_IRQHandler(void) { HAL_PCD_IRQHandler(&g_hpcd); } +/** + * @brief Initialize the low-level USB driver: configure the PCD and endpoint + * PMA, then toggle the USB pull-up through USBD_reenumerate(). + * @note Calls Error_Handler() if the HAL PCD setup fails. + * @param pdev USB device handle. + * @return USBD_OK. + */ USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev) { hal_pcd_config_t config = { @@ -161,6 +228,11 @@ USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev) return USBD_OK; } +/** + * @brief De-initialize the low-level USB driver and disable its clock and interrupt. + * @param pdev USB device handle. + * @return USBD_OK. + */ USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev) { (void)pdev; @@ -171,18 +243,36 @@ USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev) return USBD_OK; } +/** + * @brief Start the USB device. + * @param pdev USB device handle. + * @return USBD_OK on success, USBD_FAIL otherwise. + */ USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev) { (void)pdev; return (HAL_PCD_Start(&g_hpcd) == HAL_OK) ? USBD_OK : USBD_FAIL; } +/** + * @brief Stop the USB device. + * @param pdev USB device handle. + * @return USBD_OK on success, USBD_FAIL otherwise. + */ USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev) { (void)pdev; return (HAL_PCD_Stop(&g_hpcd) == HAL_OK) ? USBD_OK : USBD_FAIL; } +/** + * @brief Open an endpoint. + * @param pdev USB device handle. + * @param ep_addr Endpoint address, including the direction bit. + * @param ep_type Endpoint type, as a hal_pcd_ep_type_t value. + * @param ep_mps Maximum packet size, in bytes. + * @return USBD_OK on success, USBD_FAIL otherwise. + */ USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t ep_type, uint16_t ep_mps) { @@ -191,18 +281,36 @@ USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr, (hal_pcd_ep_type_t)ep_type) == HAL_OK) ? USBD_OK : USBD_FAIL; } +/** + * @brief Close an endpoint. + * @param pdev USB device handle. + * @param ep_addr Endpoint address, including the direction bit. + * @return USBD_OK on success, USBD_FAIL otherwise. + */ USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { (void)pdev; return (HAL_PCD_CloseEndpoint(&g_hpcd, ep_addr) == HAL_OK) ? USBD_OK : USBD_FAIL; } +/** + * @brief Flush the buffers of an endpoint. + * @param pdev USB device handle. + * @param ep_addr Endpoint address, including the direction bit. + * @return USBD_OK on success, USBD_FAIL otherwise. + */ USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { (void)pdev; return (HAL_PCD_FlushEndpoint(&g_hpcd, ep_addr) == HAL_OK) ? USBD_OK : USBD_FAIL; } +/** + * @brief Stall an endpoint. The stall state is also recorded in this module. + * @param pdev USB device handle. + * @param ep_addr Endpoint address, including the direction bit. + * @return USBD_OK on success, USBD_FAIL otherwise. + */ USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { uint8_t mask = (uint8_t)(1U << (ep_addr & 0x0FU)); @@ -215,6 +323,12 @@ USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) return (HAL_PCD_SetEndpointStall(&g_hpcd, ep_addr) == HAL_OK) ? USBD_OK : USBD_FAIL; } +/** + * @brief Clear the stall of an endpoint. The stall state is also cleared in this module. + * @param pdev USB device handle. + * @param ep_addr Endpoint address, including the direction bit. + * @return USBD_OK on success, USBD_FAIL otherwise. + */ USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { uint8_t mask = (uint8_t)(1U << (ep_addr & 0x0FU)); @@ -227,6 +341,12 @@ USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_add return (HAL_PCD_ClearEndpointStall(&g_hpcd, ep_addr) == HAL_OK) ? USBD_OK : USBD_FAIL; } +/** + * @brief Check whether an endpoint is stalled. + * @param pdev USB device handle. + * @param ep_addr Endpoint address, including the direction bit. + * @return Non-zero if the endpoint is stalled, 0 otherwise. + */ uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { uint8_t mask = (uint8_t)(1U << (ep_addr & 0x0FU)); @@ -235,12 +355,26 @@ uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr) ((g_stalled_out & mask) != 0U); } +/** + * @brief Set the USB device address. + * @param pdev USB device handle. + * @param dev_addr New device address. + * @return USBD_OK on success, USBD_FAIL otherwise. + */ USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr) { (void)pdev; return (HAL_PCD_SetDeviceAddress(&g_hpcd, dev_addr) == HAL_OK) ? USBD_OK : USBD_FAIL; } +/** + * @brief Send data on an IN endpoint. + * @param pdev USB device handle. + * @param ep_addr Endpoint address, including the direction bit. + * @param pbuf Data to send. + * @param size Number of bytes to send. + * @return USBD_OK on success, USBD_FAIL otherwise. + */ USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t size) { @@ -248,6 +382,14 @@ USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr, return (HAL_PCD_SetEndpointTransmit(&g_hpcd, ep_addr, pbuf, size) == HAL_OK) ? USBD_OK : USBD_FAIL; } +/** + * @brief Prepare an OUT endpoint to receive data. + * @param pdev USB device handle. + * @param ep_addr Endpoint address, including the direction bit. + * @param pbuf Buffer that receives the data. + * @param size Maximum number of bytes to receive. + * @return USBD_OK on success, USBD_FAIL otherwise. + */ USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t size) { @@ -255,12 +397,22 @@ USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_a return (HAL_PCD_SetEndpointReceive(&g_hpcd, ep_addr, pbuf, size) == HAL_OK) ? USBD_OK : USBD_FAIL; } +/** + * @brief Get the number of bytes received on an endpoint. + * @param pdev USB device handle. + * @param ep_addr Endpoint address, including the direction bit. + * @return Number of received bytes. + */ uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr) { (void)pdev; return HAL_PCD_EP_GetRxCount(&g_hpcd, ep_addr); } +/** + * @brief Delay for the USB stack. + * @param delay Delay, in milliseconds. + */ void USBD_LL_Delay(uint32_t delay) { HAL_Delay(delay); diff --git a/libraries/USBDevice/src/usbd_desc.c b/libraries/USBDevice/src/usbd_desc.c index b22655f6f5..02167439e3 100644 --- a/libraries/USBDevice/src/usbd_desc.c +++ b/libraries/USBDevice/src/usbd_desc.c @@ -335,9 +335,9 @@ static void Get_SerialNum(void); /** * @brief Returns the device descriptor. - * @param speed: Current device speed - * @param length: Pointer to data length variable - * @retval Pointer to descriptor buffer + * @param speed Current device speed + * @param length Pointer to data length variable + * @return Pointer to descriptor buffer */ uint8_t *USBD_Class_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { @@ -348,9 +348,9 @@ uint8_t *USBD_Class_DeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) /** * @brief Returns the LangID string descriptor. - * @param speed: Current device speed - * @param length: Pointer to data length variable - * @retval Pointer to descriptor buffer + * @param speed Current device speed + * @param length Pointer to data length variable + * @return Pointer to descriptor buffer */ uint8_t *USBD_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { @@ -361,9 +361,9 @@ uint8_t *USBD_LangIDStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) /** * @brief Returns the product string descriptor. - * @param speed: Current device speed - * @param length: Pointer to data length variable - * @retval Pointer to descriptor buffer + * @param speed Current device speed + * @param length Pointer to data length variable + * @return Pointer to descriptor buffer */ uint8_t *USBD_Class_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { @@ -377,9 +377,9 @@ uint8_t *USBD_Class_ProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *leng /** * @brief Returns the manufacturer string descriptor. - * @param speed: Current device speed - * @param length: Pointer to data length variable - * @retval Pointer to descriptor buffer + * @param speed Current device speed + * @param length Pointer to data length variable + * @return Pointer to descriptor buffer */ uint8_t *USBD_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { @@ -390,9 +390,9 @@ uint8_t *USBD_ManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *lengt /** * @brief Returns the serial number string descriptor. - * @param speed: Current device speed - * @param length: Pointer to data length variable - * @retval Pointer to descriptor buffer + * @param speed Current device speed + * @param length Pointer to data length variable + * @return Pointer to descriptor buffer */ uint8_t *USBD_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { @@ -408,9 +408,9 @@ uint8_t *USBD_SerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) /** * @brief Returns the configuration string descriptor. - * @param speed: Current device speed - * @param length: Pointer to data length variable - * @retval Pointer to descriptor buffer + * @param speed Current device speed + * @param length Pointer to data length variable + * @return Pointer to descriptor buffer */ uint8_t *USBD_Class_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { @@ -424,9 +424,9 @@ uint8_t *USBD_Class_ConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *lengt /** * @brief Returns the interface string descriptor. - * @param speed: Current device speed - * @param length: Pointer to data length variable - * @retval Pointer to descriptor buffer + * @param speed Current device speed + * @param length Pointer to data length variable + * @return Pointer to descriptor buffer */ uint8_t *USBD_Class_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { @@ -440,8 +440,6 @@ uint8_t *USBD_Class_InterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *le /** * @brief Create the serial number string descriptor - * @param None - * @retval None */ static void Get_SerialNum(void) { @@ -462,9 +460,9 @@ static void Get_SerialNum(void) /** * @brief USBD_USR_BOSDescriptor * return the BOS descriptor - * @param speed : current device speed - * @param length : pointer to data length variable - * @retval pointer to descriptor buffer + * @param speed current device speed + * @param length pointer to data length variable + * @return pointer to descriptor buffer */ uint8_t *USBD_USR_BOSDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) { @@ -478,10 +476,10 @@ uint8_t *USBD_USR_BOSDescriptor(USBD_SpeedTypeDef speed, uint16_t *length) #if (USBD_CLASS_USER_STRING_DESC == 1) /** * @brief Returns the Class User string descriptor. - * @param speed: Current device speed - * @param idx: index of string descriptor - * @param length: Pointer to data length variable - * @retval Pointer to descriptor buffer + * @param speed Current device speed + * @param idx index of string descriptor + * @param length Pointer to data length variable + * @return Pointer to descriptor buffer */ uint8_t *USBD_Class_UserStrDescriptor(USBD_SpeedTypeDef speed, uint8_t idx, uint16_t *length) { @@ -496,10 +494,9 @@ uint8_t *USBD_Class_UserStrDescriptor(USBD_SpeedTypeDef speed, uint8_t idx, uint /** * @brief Convert Hex 32Bits value into char - * @param value: value to convert - * @param pbuf: pointer to the buffer - * @param len: buffer length - * @retval None + * @param value value to convert + * @param pbuf pointer to the buffer + * @param len buffer length */ static void IntToUnicode(uint32_t value, uint8_t *pbuf, uint8_t len) { diff --git a/libraries/USBDevice/src/usbd_if.c b/libraries/USBDevice/src/usbd_if.c index 6353c09e4f..2ae42977fe 100644 --- a/libraries/USBDevice/src/usbd_if.c +++ b/libraries/USBDevice/src/usbd_if.c @@ -116,17 +116,6 @@ #define USBD_DP_TRICK #endif -/** - * @brief Force to re-enumerate USB. - * - * This is intended to be called at startup by core code. It could be - * used at runtime, while USB is connected, to force re-enumeration - * too, but that does not work in all cases (when USB is enabled on an - * F103C8, setting output mode on the DP pin no longer has any effect). - * - * @param None - * @retval None - */ WEAK void USBD_reenumerate(void) { #if defined(USBD_PULLUP_CONTROL_PINNAME) @@ -176,14 +165,6 @@ void USBD_CDC_init(void) } #endif /* USBD_USE_CDC */ -/** - * @brief Configures system clock and system IP clocks after wake-up from USB - * resume callBack - * @note Weaked function which can be redefined by user at the sketch level. - * By default, calls 'SystemClock_Config()'. - * @param None - * @retval None - */ WEAK void USBD_SystemClockConfigFromResume(void) { configIPClock(); diff --git a/libraries/VirtIO/inc/VirtIOSerial.h b/libraries/VirtIO/inc/VirtIOSerial.h index 416ad3dc24..844c86adf0 100644 --- a/libraries/VirtIO/inc/VirtIOSerial.h +++ b/libraries/VirtIO/inc/VirtIOSerial.h @@ -1,4 +1,4 @@ -/** +/* * MIT License: * Copyright (c) 2019 Bumsik kim * @@ -21,6 +21,11 @@ * THE SOFTWARE. */ +/** + * @file VirtIOSerial.h + * @brief Serial (Stream) over OpenAMP to communicate with the Linux host. + */ + #ifndef _VIRTIOSERIAL_H_ #define _VIRTIOSERIAL_H_ @@ -33,10 +38,15 @@ //================================================================================ // Serial over OpenAMP -// This structure is used to be able to get VirtIOSerial instance (C++ class) -// from handler (C structure) specially for rpmsg message management +/** + * @brief Context of a VirtIOSerial instance. + * + * Used to get the VirtIOSerial instance (C++ class) from the VIRT_UART + * handle (C structure), specially for rpmsg message management. + * @note The first two fields (__this and handle) must remain in this order + * at the beginning of the structure. + */ typedef struct { - // Those 2 first fields must remain in this order at the beginning of the structure void *__this; VIRT_UART_HandleTypeDef handle; bool initialized; @@ -44,27 +54,111 @@ typedef struct { virtio_buffer_t ring; } VirtIOSerialObj_t; - +/** + * @brief Serial (Stream) over OpenAMP, used to communicate with the Linux host. + */ class VirtIOSerial : public Stream { public: + /** + * @brief Start the serial link. Blocks until the Linux host sends its first message. + */ void begin(void); - void begin(uint32_t); - void begin(uint32_t, uint8_t); + + /** + * @brief Start the serial link. The baud rate is ignored, OpenAMP has + * no UART configuration. + * @param baud_count Baud rate (ignored). + */ + void begin(uint32_t baud_count); + + /** + * @brief Start the serial link. The baud rate and configuration are + * ignored, OpenAMP has no UART configuration. + * @param baud_count Baud rate (ignored). + * @param config Serial configuration (ignored). + */ + void begin(uint32_t baud_count, uint8_t config); + + /** + * @brief Stop the serial link and release the OpenAMP resources. + */ void end(void); + /** + * @brief Get the number of bytes available to read. + * @return Number of bytes in the receive buffer. + */ virtual int available(void); + + /** + * @brief Get the maximum number of bytes that one write() can send. + * @return RPMSG_VRING_PAYLOAD_SIZE. + */ virtual int availableForWrite(void); + + /** + * @brief Get the next byte without removing it from the receive buffer. + * @return The next byte, or -1 if the receive buffer is empty. + */ virtual int peek(void); + + /** + * @brief Read one byte from the receive buffer. + * @return The byte read, or -1 if the receive buffer is empty. + */ virtual int read(void); - virtual size_t readBytes(char *buffer, size_t length); // read chars from stream into buffer - virtual size_t write(uint8_t); + + /** + * @brief Read bytes from the receive buffer into a buffer. + * @param buffer Destination buffer. + * @param length Maximum number of bytes to read. + * @return Number of bytes read. + */ + virtual size_t readBytes(char *buffer, size_t length); + + /** + * @brief Write one byte. + * @param ch Byte to write. + * @return Number of bytes written: 1 on success, 0 on failure. + */ + virtual size_t write(uint8_t ch); + + /** + * @brief Write a buffer of bytes. + * + * The implementation is synchronous: it blocks until all bytes are sent. + * @param buffer Data to send. + * @param size Number of bytes to send. Must not exceed availableForWrite(). + * @return Number of bytes written, or 0 on failure. + */ virtual size_t write(const uint8_t *buffer, size_t size); + + /** + * @brief Wait until all written bytes are sent. Does nothing, because + * write() already blocks until the data is sent. + */ virtual void flush(void); + /** + * @brief Static RX callback registered with the VIRT_UART driver. + * @param huart VIRT_UART handle that received the message. + */ static void rxGenericCallback(VIRT_UART_HandleTypeDef *huart); + + /** + * @brief RX callback for one VirtIOSerial instance. Copies the received + * data into the receive ring buffer. + * @param huart VIRT_UART handle that received the message. + * @note The first message from the Linux host is a dummy, and is discarded. + */ void rxCallback(VIRT_UART_HandleTypeDef *huart); using Print::write; // pull in write(str) from Print + + /** + * @brief Check whether the serial port is available. + * @return Always true. + */ operator bool(void) { return true; @@ -73,10 +167,24 @@ class VirtIOSerial : public Stream { private: static uint32_t VirtIOSerial_index; VirtIOSerialObj_t _VirtIOSerialObj; + + /** + * @brief Check if an RPMsg message arrived from the IPCC ISR. + * @note Call this as often as possible to consume the RPMsg ring + * buffers, so that the host processor can send more messages quickly. + */ void checkMessageFromISR(void); }; +/** + * @brief Default VirtIOSerial instance. + */ extern VirtIOSerial SerialVirtIO; +/** + * @example loopback.ino + * Echo the data received from the Linux host through VirtIOSerial. + */ + #endif /* VIRTIOCON */ #endif /* _VIRTIOSERIAL_H_ */ diff --git a/libraries/VirtIO/inc/openamp.h b/libraries/VirtIO/inc/openamp.h index 9e22e17f48..4e0addf5b3 100644 --- a/libraries/VirtIO/inc/openamp.h +++ b/libraries/VirtIO/inc/openamp.h @@ -31,17 +31,57 @@ extern "C" { #include "openamp_conf.h" +/** @brief Send a message through an rpmsg endpoint. Alias of rpmsg_send(). */ #define OPENAMP_send rpmsg_send +/** @brief Destroy an rpmsg endpoint. Alias of rpmsg_destroy_ept(). */ #define OPENAMP_destroy_ept rpmsg_destroy_ept +/** + * @brief Initialize the OpenAMP framework. + * @return 0 on success, a negative or error value otherwise. + */ int OPENAMP_Init(void); + +/** + * @brief Deinitialize the OpenAMP framework. + */ void OPENAMP_DeInit(void); +/** + * @brief Create and register a name service endpoint. + * @param ept Virtio rpmsg endpoint to initialize. + * @param name Virtio rpmsg name service name. + * @param dest Message destination address. Set RPMSG_ADDR_ANY if the host + * processor decides it. + * @param cb Virtio rpmsg endpoint callback (receive). + * @param unbind_cb Virtio rpmsg endpoint destroy callback. + * @return 0 on success, a negative or error value otherwise. + */ int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name, uint32_t dest, rpmsg_ept_cb cb, rpmsg_ns_unbind_cb unbind_cb); + +/** + * @brief Check and process any received messages from the tx channel. + * @note Do not call this from an ISR. + */ void OPENAMP_check_for_tx_message(void); + +/** + * @brief Check and process any received messages from the rx channel. + * @note Do not call this from an ISR. + */ void OPENAMP_check_for_rx_message(void); + +/** + * @brief Wait until an rpmsg endpoint (VirtIOSerial) is ready to send. + * Readiness is reached when the destination address is known. + * @note Blocks until the first message arrives from the Linux host. + * Sending an rpmsg message before that fails. + * @note Do not call this from an ISR. + * @see VirtIOSerial::rxCallback + * @param rp_ept Virtio rpmsg endpoint to wait for. + */ void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept); #ifdef __cplusplus diff --git a/libraries/VirtIO/inc/virtio_buffer.h b/libraries/VirtIO/inc/virtio_buffer.h index d88f83810c..07f5bfbf06 100644 --- a/libraries/VirtIO/inc/virtio_buffer.h +++ b/libraries/VirtIO/inc/virtio_buffer.h @@ -1,4 +1,4 @@ -/** +/* * MIT License: * Copyright (c) 2019 Bumsik kim * @@ -21,6 +21,11 @@ * THE SOFTWARE. */ +/** + * @file virtio_buffer.h + * @brief Ring buffer used to store the data received through OpenAMP. + */ + #ifndef __OPENAMP_VIRTIO_BUFFER_H #define __OPENAMP_VIRTIO_BUFFER_H @@ -44,19 +49,69 @@ extern "C" { #define VIRTIO_BUFFER_SIZE (RPMSG_VRING_TOTAL_PAYLOAD_SIZE * 1 + 1) #endif +/** + * @brief Ring buffer of bytes, filled by the rx callback and consumed by the application. + * @warning No protection against race conditions on write_index and read_index + * when used in interrupt. + */ typedef struct { uint8_t buffer[VIRTIO_BUFFER_SIZE]; volatile uint16_t write_index; volatile uint16_t read_index; } virtio_buffer_t; +/** + * @brief Initialize a virtio ring buffer to empty. + * @param ring Pointer to the ring buffer to initialize. + */ void virtio_buffer_init(virtio_buffer_t *ring); +/** + * @brief Get the number of bytes available to read. + * @param ring Pointer to the ring buffer. + * @return Number of bytes that virtio_buffer_read() can return. + */ uint16_t virtio_buffer_read_available(virtio_buffer_t *ring); + +/** + * @brief Read and remove bytes from the ring buffer. + * @param ring Pointer to the ring buffer. + * @param dst Destination buffer. + * @param size Maximum number of bytes to read. + * @return Number of bytes actually read, at most size. + * @note Not protected against race conditions on read_index. Do not use + * concurrently from an interrupt and the main loop. + */ uint16_t virtio_buffer_read(virtio_buffer_t *ring, uint8_t *dst, uint16_t size); + +/** + * @brief Copy bytes from the ring buffer without removing them. + * @param ring Pointer to the ring buffer. + * @param dst Destination buffer. + * @param size Maximum number of bytes to copy. + * @return Number of bytes actually copied, at most size. + * @note Not protected against race conditions on read_index. Do not use + * concurrently from an interrupt and the main loop. + */ uint16_t virtio_buffer_peek(virtio_buffer_t *ring, uint8_t *dst, uint16_t size); +/** + * @brief Get the number of bytes that can be written. + * @param ring Pointer to the ring buffer. + * @return Number of free bytes. One byte is always kept unused to tell a + * full buffer from an empty one. + */ uint16_t virtio_buffer_write_available(virtio_buffer_t *ring); + +/** + * @brief Write bytes into the ring buffer. + * @param ring Pointer to the ring buffer. + * @param src Source data. + * @param size Maximum number of bytes to write. + * @return Number of bytes actually written, at most size. + * @note Not protected against race conditions on write_index. Do not use + * concurrently from an interrupt and the main loop. + */ uint16_t virtio_buffer_write(virtio_buffer_t *ring, uint8_t *src, uint16_t size); #ifdef __cplusplus diff --git a/libraries/VirtIO/inc/virtio_config.h b/libraries/VirtIO/inc/virtio_config.h index 1d31b87c0f..f6eadf0124 100644 --- a/libraries/VirtIO/inc/virtio_config.h +++ b/libraries/VirtIO/inc/virtio_config.h @@ -1,3 +1,8 @@ +/** + * @file virtio_config.h + * @brief Configuration of the OpenAMP rpmsg buffers and of the trace (log) buffer. + */ + #ifndef __OPENAMP_VIRTIO_CONFIG_H #define __OPENAMP_VIRTIO_CONFIG_H @@ -17,7 +22,9 @@ #define RPMSG_VRING_PAYLOAD_SIZE (RPMSG_BUFFER_SIZE - RPMSG_VRING_HEADER_SIZE) /** - * number of rpmsg buffer + * @def VRING_NUM_BUFFS + * @brief Number of rpmsg buffers. + * * This means that a single call of rproc_virtio_notified(rvdev.vdev, VRING1_ID) * will trigger VirtIOSerial::rxCallback() VRING_NUM_BUFFS times at maximum. * A buffer handles VirtIOSerial::rxCallback() requires to be @@ -26,12 +33,14 @@ #ifndef VRING_NUM_BUFFS #define VRING_NUM_BUFFS (16) #endif +/** Total payload size of all the vqueue message buffers */ #define RPMSG_VRING_TOTAL_PAYLOAD_SIZE (RPMSG_VRING_PAYLOAD_SIZE * VRING_NUM_BUFFS) #if defined (VIRTIO_LOG) /** - * OpenAMP trace (log) buffer configuration. - * Users are free to redefine the size if needed. + * @def VIRTIO_LOG_BUFFER_SIZE + * @brief Size of the OpenAMP trace (log) buffer, in bytes. + * @note Users are free to redefine the size if needed. */ #ifndef VIRTIO_LOG_BUFFER_SIZE #define VIRTIO_LOG_BUFFER_SIZE (2048) diff --git a/libraries/VirtIO/inc/virtio_log.h b/libraries/VirtIO/inc/virtio_log.h index 6c29c1ae6a..ced4d986b8 100644 --- a/libraries/VirtIO/inc/virtio_log.h +++ b/libraries/VirtIO/inc/virtio_log.h @@ -1,4 +1,4 @@ -/** +/* * MIT License: * Copyright (c) 2020 Bumsik kim * @@ -20,6 +20,10 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ +/** + * @file virtio_log.h + * @brief Write to the OpenAMP trace (log) buffer readable from the Linux host. + */ #ifndef __OPENAMP_VIRTIO_LOG_H #define __OPENAMP_VIRTIO_LOG_H @@ -37,8 +41,8 @@ extern "C" { * @note When the buffer overflows (2kb by default, configurable.), * the buffer is cleaned by a null character. Consider increasing * VIRTIO_LOG_BUFFER_SIZE if a larger log buffer is needed. - * @param data: Data to send - * @param size: size of data + * @param data Data to send. + * @param size Size of data, in bytes. */ void virtio_log(uint8_t *data, uint32_t size); diff --git a/libraries/VirtIO/src/VirtIO.h b/libraries/VirtIO/src/VirtIO.h index 5d3a8e946f..7788d0b8c5 100644 --- a/libraries/VirtIO/src/VirtIO.h +++ b/libraries/VirtIO/src/VirtIO.h @@ -1,3 +1,8 @@ +/** + * @file VirtIO.h + * @brief Library header of the VirtIO library. Intentionally empty. + */ + #ifndef __VIRTIO_H__ #define __VIRTIO_H__ diff --git a/libraries/VirtIO/src/VirtIOSerial.cpp b/libraries/VirtIO/src/VirtIOSerial.cpp index ed7592d59d..4441ba6aa3 100644 --- a/libraries/VirtIO/src/VirtIOSerial.cpp +++ b/libraries/VirtIO/src/VirtIOSerial.cpp @@ -1,4 +1,4 @@ -/** +/* * MIT License: * Copyright (c) 2019 Bumsik kim * @@ -30,6 +30,7 @@ #define VIRTIOSERIAL_NUM 1 #endif +/** Registered VirtIOSerial instances, indexed by VirtIOSerial_index. */ VirtIOSerialObj_t *VirtIOSerial_Handle[VIRTIOSERIAL_NUM] = {NULL}; uint32_t VirtIOSerial::VirtIOSerial_index = 0; @@ -37,6 +38,9 @@ uint32_t VirtIOSerial::VirtIOSerial_index = 0; // Default instance VirtIOSerial SerialVirtIO; +/** + * @brief Weak user hook called by the core when data is available on SerialVirtIO. + */ void serialEventVirtIO() __attribute__((weak)); VirtIOSerialObj_t *get_VirtIOSerial_obj(VIRT_UART_HandleTypeDef *huart); @@ -69,15 +73,18 @@ void VirtIOSerial::begin(void) OPENAMP_Wait_EndPointready(&_VirtIOSerialObj.handle.ept); } -void VirtIOSerial::begin(uint32_t /* baud_count */) +void VirtIOSerial::begin(uint32_t baud_count) { // uart config is ignored in OpenAMP + (void)baud_count; begin(); } -void VirtIOSerial::begin(uint32_t /* baud_count */, uint8_t /* config */) +void VirtIOSerial::begin(uint32_t baud_count, uint8_t config) { // uart config is ignored in OpenAMP + (void)baud_count; + (void)config; begin(); } @@ -165,11 +172,6 @@ void VirtIOSerial::flush(void) return; } -/** - * @brief Check if RPMsg message arrived from IPCC ISR - * @note This should called as mush as possible to consume RPMsg ring buffers, - * so that the host processor can send more messages quickly. - */ void VirtIOSerial::checkMessageFromISR(void) { OPENAMP_check_for_tx_message(); @@ -205,8 +207,13 @@ void VirtIOSerial::rxCallback(VIRT_UART_HandleTypeDef *huart) } } -/* Aim of the function is to get _VirtIOSerialObj pointer using huart pointer */ -/* Highly inspired from magical linux kernel's "container_of" */ +/** + * @brief Get the VirtIOSerial object from a VIRT_UART handle. + * @note Uses the same offset trick as the Linux kernel's container_of() + * macro, to go from the handle field back to the enclosing object. + * @param huart VIRT_UART handle. + * @return Pointer to the enclosing VirtIOSerialObj_t. + */ VirtIOSerialObj_t *get_VirtIOSerial_obj(VIRT_UART_HandleTypeDef *huart) { VirtIOSerialObj_t *obj; diff --git a/libraries/VirtIO/src/mbox_ipcc.c b/libraries/VirtIO/src/mbox_ipcc.c index cb55eaea86..956bf236de 100644 --- a/libraries/VirtIO/src/mbox_ipcc.c +++ b/libraries/VirtIO/src/mbox_ipcc.c @@ -59,11 +59,6 @@ mbox_status_t msg_received_ch2 = MBOX_NO_MSG; void IPCC_channel1_callback(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir); void IPCC_channel2_callback(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir); -/** - * @brief Initialize MAILBOX with IPCC peripheral - * @param None - * @retval : Operation result - */ int MAILBOX_Init(void) { __HAL_RCC_IPCC_CLK_ENABLE(); @@ -90,12 +85,6 @@ int MAILBOX_Init(void) return 0; } -/** - * @brief Process vring messages received from IPCC ISR - * @param vdev: virtio device - * @param vring_id: Vring ID - * @retval : Operation result - */ int MAILBOX_Poll(struct virtio_device *vdev, uint32_t vring_id) { int ret = -1; @@ -111,9 +100,9 @@ int MAILBOX_Poll(struct virtio_device *vdev, uint32_t vring_id) break; case VRING1_ID: if (msg_received_ch2 == MBOX_NEW_MSG) { - /** + /* * This calls rpmsg_virtio_rx_callback(), which calls virt_uart rx callback - * RING_NUM_BUFFS times at maximum. + * VRING_NUM_BUFFS times at maximum. */ rproc_virtio_notified(vdev, VRING1_ID); msg_received_ch2 = MBOX_NO_MSG; @@ -127,13 +116,6 @@ int MAILBOX_Poll(struct virtio_device *vdev, uint32_t vring_id) return ret; } -/** - * @brief Callback function called by OpenAMP MW to notify message processing (aka. kick) - * @note This callback is called by virtqueue_kick() in rpmsg_virtio_send_offchannel_raw(). - * Therefore, it is only called while tx, but not rx. - * @param Vring id - * @retval Operation result - */ int MAILBOX_Notify(void *priv, uint32_t vring_id) { (void)priv; @@ -163,7 +145,13 @@ int MAILBOX_Notify(void *priv, uint32_t vring_id) } /* Private function ---------------------------------------------------------*/ -/* Callback from IPCC Interrupt Handler: Master Processor informs that there are some free buffers */ +/** + * @brief IPCC channel 1 RX callback, called from the IPCC interrupt handler: + * the master processor reports that free buffers are available. + * @param hipcc IPCC handle. + * @param ChannelIndex IPCC channel index. + * @param ChannelDir Channel direction. Not used. + */ void IPCC_channel1_callback(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir) { @@ -174,7 +162,13 @@ void IPCC_channel1_callback(IPCC_HandleTypeDef *hipcc, HAL_IPCC_NotifyCPU(hipcc, ChannelIndex, IPCC_CHANNEL_DIR_RX); } -/* Callback from IPCC Interrupt Handler: new message received from Master Processor */ +/** + * @brief IPCC channel 2 RX callback, called from the IPCC interrupt handler: + * the master processor reports a new message. + * @param hipcc IPCC handle. + * @param ChannelIndex IPCC channel index. + * @param ChannelDir Channel direction. Not used. + */ void IPCC_channel2_callback(IPCC_HandleTypeDef *hipcc, uint32_t ChannelIndex, IPCC_CHANNELDirTypeDef ChannelDir) { diff --git a/libraries/VirtIO/src/mbox_ipcc.h b/libraries/VirtIO/src/mbox_ipcc.h index 3d507bb695..1b54f270d1 100644 --- a/libraries/VirtIO/src/mbox_ipcc.h +++ b/libraries/VirtIO/src/mbox_ipcc.h @@ -22,17 +22,48 @@ #ifdef VIRTIOCON - /* Interrupt priority */ + /** + * @def IPCC_IRQ_PRIO + * @brief IPCC interrupt preemption priority. + * Can be overridden before including this file. + */ #ifndef IPCC_IRQ_PRIO #define IPCC_IRQ_PRIO 1 #endif + /** + * @def IPCC_IRQ_SUBPRIO + * @brief IPCC interrupt sub-priority. + * Can be overridden before including this file. + */ #ifndef IPCC_IRQ_SUBPRIO #define IPCC_IRQ_SUBPRIO 0 #endif + /** + * @brief Initialize the mailbox with the IPCC peripheral. + * @return 0 on success, -1 if an IPCC channel notification cannot be activated. + * @note On failure Error_Handler() is called first, which is unlikely to return. + */ int MAILBOX_Init(void); + + /** + * @brief Process vring messages received from the IPCC ISR. + * @param vdev Virtio device. + * @param vring_id Vring ID. + * @return 0 if a message was processed, -1 otherwise. + */ int MAILBOX_Poll(struct virtio_device *vdev, uint32_t vring_id); - int MAILBOX_Notify(void *priv, uint32_t id); + + /** + * @brief Notify the remote processor (kick) that a message is ready. + * @note Called by OpenAMP from virtqueue_kick() in + * rpmsg_virtio_send_offchannel_raw(), therefore only while tx, but not rx. + * @note Blocks until the IPCC channel is free. + * @param priv Private data passed by OpenAMP. Unused. + * @param vring_id Vring ID. + * @return 0 on success, -1 otherwise. + */ + int MAILBOX_Notify(void *priv, uint32_t vring_id); #endif /* VIRTIOCON */ #endif /* __OPENAMP_MBOX_IPCC_H */ diff --git a/libraries/VirtIO/src/openamp.c b/libraries/VirtIO/src/openamp.c index 8055a552d6..fc928f233d 100644 --- a/libraries/VirtIO/src/openamp.c +++ b/libraries/VirtIO/src/openamp.c @@ -56,8 +56,8 @@ struct metal_device shm_device = { /** * @brief Initialize OpenAMP shared memory (libmetal and resource table) * - * @param RPMsgRole: RPMSG_REMOTE - Device is remote (slave) - * @retval 0 on success + * @param RPMsgRole RPMSG_REMOTE - Device is remote (slave) + * @return 0 on success */ static int OPENAMP_shmem_init(int RPMsgRole) { @@ -106,11 +106,6 @@ static int OPENAMP_shmem_init(int RPMsgRole) return 0; } -/** - * @brief Initialize the openamp framework - * - * @retval 0 when success - */ int OPENAMP_Init() { struct fw_rsc_vdev_vring *vring_rsc = NULL; @@ -154,9 +149,6 @@ int OPENAMP_Init() return 0; } -/** - * @brief Deinitialize the openamp framework - */ void OPENAMP_DeInit() { rpmsg_deinit_vdev(&rvdev); @@ -164,17 +156,6 @@ void OPENAMP_DeInit() metal_finish(); } -/** - * @brief Create and register the name service endpoint - * - * @param ept: virtio rpmsg endpoint - * @param name: virtio rpmsg name service name - * @param dest: message destination address. Set RPMSG_ADDR_ANY if - * the host processor will decide this - * @param cb: virtio rpmsg endpoint callback (receive) - * @param unbind_cb: virtio rpmsg endpoint destroy callback - * @retval 0 when success - */ int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name, uint32_t dest, rpmsg_ept_cb cb, rpmsg_ns_unbind_cb unbind_cb) @@ -183,33 +164,16 @@ int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name, unbind_cb); } -/** - * @brief Check and process any received messages from tx channel - * @note Don't call this in an ISR. - */ void OPENAMP_check_for_tx_message(void) { MAILBOX_Poll(rvdev.vdev, VRING0_ID); } -/** - * @brief Check and process any received messages from rx channel - * @note Don't call this in an ISR. - */ void OPENAMP_check_for_rx_message(void) { MAILBOX_Poll(rvdev.vdev, VRING1_ID); } -/** - * @brief Wait loop on rpmsg endpoint (VirtIOSerial) ready to send a message. - * (until message dest address is known) - * @note This will wait until the first message arrives from the Linux host. - * If we send a rpmsg message before this it will fail. - * @note Don't call this in an ISR. - * @see VirtIOSerial::rxCallback - * @param rp_ept: virtio rpmsg endpoint - */ void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept) { while (!is_rpmsg_ept_ready(rp_ept)) { diff --git a/libraries/VirtIO/src/rsc_table.h b/libraries/VirtIO/src/rsc_table.h index 3979dc15f3..960e5d24ca 100644 --- a/libraries/VirtIO/src/rsc_table.h +++ b/libraries/VirtIO/src/rsc_table.h @@ -9,8 +9,10 @@ * */ -/* This file populates resource table for BM remote - * for use by the Linux Master */ +/** + * @file rsc_table.h + * @brief Resource table for the BM remote, populated for use by the Linux Master. + */ #ifndef __OPENAMP_RSC_TABLE_H #define __OPENAMP_RSC_TABLE_H @@ -21,7 +23,10 @@ #include "openamp/open_amp.h" #include "openamp_conf.h" -/* Resource table for the given remote */ +/** + * @brief Resource table for the given remote: rpmsg vdev entry with its two + * vrings, and the trace (log) entry. + */ struct shared_resource_table { unsigned int version; unsigned int num; @@ -36,6 +41,12 @@ struct shared_resource_table { struct fw_rsc_trace cm_trace; }; +/** + * @brief Initialize the resource table used by the remote processor. + * @param RPMsgRole Role of the processor. Not used. + * @param table_ptr Output: pointer to the resource table. + * @param length Output: size of the resource table, in bytes. + */ void resource_table_init(int RPMsgRole, void **table_ptr, int *length); #endif /* VIRTIOCON */ diff --git a/libraries/VirtIO/src/virtio_buffer.c b/libraries/VirtIO/src/virtio_buffer.c index cf8e90b7f2..e9c60fc1cf 100644 --- a/libraries/VirtIO/src/virtio_buffer.c +++ b/libraries/VirtIO/src/virtio_buffer.c @@ -1,4 +1,4 @@ -/** +/* * MIT License: * Copyright (c) 2019 Bumsik kim * @@ -43,7 +43,16 @@ uint16_t virtio_buffer_read_available(virtio_buffer_t *ring) return delta; } -/* WARNING no protection against race condition (on ring->read_index) when used in interruption */ +/** + * @brief Read or peek bytes from the ring buffer. + * @param ring Pointer to the ring buffer. + * @param dst Destination buffer. + * @param size Maximum number of bytes to read. + * @param peek If true, read_index is not advanced. + * @return Number of bytes copied, at most size. + * @warning No protection against race condition (on ring->read_index) when + * used in interruption. + */ static uint16_t read(virtio_buffer_t *ring, uint8_t *dst, uint16_t size, bool peek) { uint16_t read_index = ring->read_index; @@ -99,7 +108,6 @@ uint16_t virtio_buffer_write_available(virtio_buffer_t *ring) return delta; } -/* WARNING no protection against race condition (on ring->write_index) when used in interruption */ uint16_t virtio_buffer_write(virtio_buffer_t *ring, uint8_t *src, uint16_t size) { uint16_t write_index = ring->write_index; diff --git a/libraries/VirtIO/src/virtio_log.c b/libraries/VirtIO/src/virtio_log.c index c20c21ae21..73e453cf57 100644 --- a/libraries/VirtIO/src/virtio_log.c +++ b/libraries/VirtIO/src/virtio_log.c @@ -1,4 +1,4 @@ -/** +/* * MIT License: * Copyright (c) 2020 Bumsik kim * diff --git a/libraries/Wire/src/Wire.cpp b/libraries/Wire/src/Wire.cpp index 2802f53a1c..d4abf3d7b1 100644 --- a/libraries/Wire/src/Wire.cpp +++ b/libraries/Wire/src/Wire.cpp @@ -45,10 +45,6 @@ TwoWire::TwoWire(pin_size_t sda, pin_size_t scl) rxBufferAllocated = 0; } -/** - * @brief TwoWire destructor - * @retval None - */ TwoWire::~TwoWire() { end(); @@ -215,19 +211,6 @@ void TwoWire::beginTransmission(int address) beginTransmission((uint8_t)address); } -// -// Originally, 'endTransmission' was an f(void) function. -// It has been modified to take one parameter indicating -// whether or not a STOP should be performed on the bus. -// Calling endTransmission(false) allows a sketch to -// perform a repeated start. -// -// WARNING: Nothing in the library keeps track of whether -// the bus tenure has been properly ended with a STOP. It -// is very possible to leave the bus in a hung state if -// no call to endTransmission(true) is made. Some I2C -// devices will behave oddly if they do not see a STOP. -// uint8_t TwoWire::endTransmission(bool stopBit) { #if !defined(I2C_OTHER_FRAME) @@ -285,17 +268,11 @@ uint8_t TwoWire::endTransmission(bool stopBit) return ret; } -// This provides backwards compatibility with the original -// definition, and expected behaviour, of endTransmission -// uint8_t TwoWire::endTransmission(void) { return endTransmission(true); } -// must be called in: -// slave tx event callback -// or after beginTransmission(address) size_t TwoWire::write(uint8_t data) { size_t ret = 1; @@ -319,13 +296,6 @@ size_t TwoWire::write(uint8_t data) return ret; } -/** - * @brief This function must be called in slave Tx event callback or after - * beginTransmission() and before endTransmission(). - * @param pdata: pointer to the buffer data - * @param quantity: number of bytes to write - * @retval number of bytes ready to write. - */ size_t TwoWire::write(const uint8_t *data, size_t quantity) { size_t ret = quantity; @@ -351,17 +321,11 @@ size_t TwoWire::write(const uint8_t *data, size_t quantity) return ret; } -// must be called in: -// slave rx event callback -// or after requestFrom(address, numBytes) int TwoWire::available(void) { return rxBufferLength - rxBufferIndex; } -// must be called in: -// slave rx event callback -// or after requestFrom(address, numBytes) int TwoWire::read(void) { int value = -1; @@ -381,9 +345,6 @@ int TwoWire::read(void) return value; } -// must be called in: -// slave rx event callback -// or after requestFrom(address, numBytes) int TwoWire::peek(void) { int value = -1; @@ -403,7 +364,6 @@ void TwoWire::flush(void) resetTxBuffer(); } -// behind the scenes function that is called when data is received void TwoWire::onReceiveService(i2c_t *obj) { uint8_t *inBytes = (uint8_t *) obj->i2cTxRxBuffer; @@ -431,7 +391,6 @@ void TwoWire::onReceiveService(i2c_t *obj) } } -// behind the scenes function that is called when data is requested void TwoWire::onRequestService(i2c_t *obj) { TwoWire *TW = (TwoWire *)(obj->__this); @@ -446,7 +405,6 @@ void TwoWire::onRequestService(i2c_t *obj) } } -// sets function called on slave write void TwoWire::onReceive(cb_function_receive_t function) { user_onReceive = function; @@ -457,7 +415,6 @@ void TwoWire::onReceive(void(*function)(int)) user_onReceive = function; } -// sets function called on slave read void TwoWire::onRequest(cb_function_request_t function) { user_onRequest = function; @@ -468,11 +425,6 @@ void TwoWire::onRequest(void(*function)(void)) user_onRequest = function; } -/** - * @brief Allocate the Rx/Tx buffer to the requested length if needed - * @note Minimum allocated size is BUFFER_LENGTH) - * @param length: number of bytes to allocate - */ void TwoWire::allocateRxBuffer(size_t length) { if (rxBufferAllocated < length) { @@ -511,9 +463,6 @@ inline size_t TwoWire::allocateTxBuffer(size_t length) return ret; } -/** - * @brief Reset Rx/Tx buffer content to 0 - */ inline void TwoWire::resetRxBuffer(void) { if (rxBuffer != nullptr) { @@ -528,9 +477,7 @@ inline void TwoWire::resetTxBuffer(void) } } -// Send clear bus (clock pulse) sequence to recover bus. -// Useful in case of bus stuck after a reset for example -// a mix implementation of Clear Bus from +// Implementation based on the clear bus sequence from // https://www.nxp.com/docs/en/user-guide/UM10204.pdf // https://bits4device.wordpress.com/2017/07/28/i2c-bus-recovery/ void TwoWire::recoverBus(void) diff --git a/libraries/Wire/src/Wire.h b/libraries/Wire/src/Wire.h index ed4fb2b3a2..5cc9b87158 100644 --- a/libraries/Wire/src/Wire.h +++ b/libraries/Wire/src/Wire.h @@ -19,6 +19,11 @@ Modified 2012 by Todd Krein (todd@krein.org) to implement repeated starts */ +/** + * @file Wire.h + * @brief TWI/I2C (Wire) library, master and slave, for Arduino and Wiring. + */ + #ifndef TwoWire_h #define TwoWire_h @@ -30,20 +35,41 @@ extern "C" { #include "utility/twi.h" } -// Minimal buffer length. Buffers length will be increased when needed, -// but TX buffer is limited to a maximum to avoid too much stack consumption -// Note: Buffer length and max buffer length are limited by uin16_t type +/** + * @def BUFFER_LENGTH + * @brief Minimal Rx/Tx buffer length in bytes. + * @note Buffers length is increased when needed, but the Tx buffer is limited + * to WIRE_MAX_TX_BUFF_LENGTH to avoid too much stack consumption. + * Buffer length and maximum buffer length are limited by the uint16_t type. + */ #define BUFFER_LENGTH 32 #if !defined(WIRE_MAX_TX_BUFF_LENGTH) + /** + * @def WIRE_MAX_TX_BUFF_LENGTH + * @brief Maximum Tx buffer length in bytes. + * Can be overridden before including Wire.h. + * @note Limited by the uint16_t type. + */ #define WIRE_MAX_TX_BUFF_LENGTH 1024U #endif -// WIRE_HAS_END means Wire has end() +/** + * @def WIRE_HAS_END + * @brief Defined when Wire provides end(). + */ #define WIRE_HAS_END 1 +/** + * @brief TWI/I2C (Wire) controller, usable as master or slave. + */ class TwoWire : public arduino::HardwareI2C { public: + /** + * @brief Callback type for slave receive events, called with the number + * of bytes received. + */ typedef std::function cb_function_receive_t; + /** @brief Callback type for slave request events. */ typedef std::function cb_function_request_t; private: @@ -65,91 +91,340 @@ class TwoWire : public arduino::HardwareI2C { std::function user_onReceive; std::function user_onRequest; - static void onRequestService(i2c_t *); - static void onReceiveService(i2c_t *); + /** + * @brief Behind the scenes function called when a slave request event + * occurs. Calls the user onRequest callback. + * @param obj Pointer to the I2C instance of the event. + */ + static void onRequestService(i2c_t *obj); + /** + * @brief Behind the scenes function called when a slave receive event + * occurs. Copies the received data and calls the user onReceive callback. + * @param obj Pointer to the I2C instance of the event. + */ + static void onReceiveService(i2c_t *obj); + /** + * @brief Allocate the Rx buffer to the requested length if needed. + * @note Minimum allocated size is BUFFER_LENGTH. + * @param length Number of bytes to allocate. + */ void allocateRxBuffer(size_t length); + /** + * @brief Allocate the Tx buffer to the requested length if needed. + * @note Minimum allocated size is BUFFER_LENGTH. + * @param length Number of bytes to allocate. + * @return Number of bytes that can be stored in the Tx buffer, 0 if length + * is greater than WIRE_MAX_TX_BUFF_LENGTH. + */ size_t allocateTxBuffer(size_t length); + /** + * @brief Reset the Rx buffer content to 0. + */ void resetRxBuffer(void); + /** + * @brief Reset the Tx buffer content to 0. + */ void resetTxBuffer(void); + /** + * @brief Send a clear bus (clock pulse) sequence to recover the bus. + * + * Useful if the bus is stuck after a reset. Called by begin() in master mode. + */ void recoverBus(void); public: + // setSCL/SDA have to be called before begin() + /** + * @brief Construct a TwoWire instance using the given pins. + * @param sda Pin used for SDA. Default: SDA. + * @param scl Pin used for SCL. Default: SCL. + */ TwoWire(pin_size_t sda = SDA, pin_size_t scl = SCL); + /** + * @brief Destroy the instance, stopping the TWI interface and releasing + * its buffers (calls end()). + */ ~TwoWire(); - // setSCL/SDA have to be called before begin() + /** + * @brief Set the SCL pin. Must be called before begin(). + * @param scl Pin used for SCL. + */ void setSCL(pin_size_t scl) { _i2c.scl = digitalPinToPinName(scl); }; + /** + * @brief Set the SDA pin. Must be called before begin(). + * @param sda Pin used for SDA. + */ void setSDA(pin_size_t sda) { _i2c.sda = digitalPinToPinName(sda); }; + /** + * @brief Set the SCL pin. Must be called before begin(). + * @param scl PinName used for SCL. + */ void setSCL(PinName scl) { _i2c.scl = scl; }; + /** + * @brief Set the SDA pin. Must be called before begin(). + * @param sda PinName used for SDA. + */ void setSDA(PinName sda) { _i2c.sda = sda; }; + /** + * @brief Initialize the TWI interface as master. + * @param generalCall true to enable the general call address. + * Default: false. + */ void begin(bool generalCall); - void begin(pin_size_t, pin_size_t); - void begin(uint8_t, bool generalCall = false, bool NoStretchMode = false); - void begin(int, bool generalCall = false, bool NoStretchMode = false); + /** + * @brief Initialize the TWI interface as master using the given pins. + * @param sda Pin used for SDA. + * @param scl Pin used for SCL. + */ + void begin(pin_size_t sda, pin_size_t scl); + /** + * @brief Initialize the TWI interface as master or slave. + * + * The reserved address 0x01 initializes the interface as master, + * any other address initializes it as slave using this address. + * @param address 7-bit own address for slave mode, 0x01 for master mode. + * @param generalCall true to enable the general call address. + * Default: false. + * @param NoStretchMode true to disable clock stretching. Default: false. + */ + void begin(uint8_t address, bool generalCall = false, bool NoStretchMode = false); + /** + * @brief Initialize the TWI interface as master or slave. + * + * The reserved address 0x01 initializes the interface as master, + * any other address initializes it as slave using this address. + * @param address 7-bit own address for slave mode, 0x01 for master mode. + * @param generalCall true to enable the general call address. + * Default: false. + * @param NoStretchMode true to disable clock stretching. Default: false. + */ + void begin(int address, bool generalCall = false, bool NoStretchMode = false); + /** + * @brief Initialize the TWI interface as master with the default pins. + */ void begin() override { begin(false); } + /** + * @brief Initialize the TWI interface as master or slave with the default pins. + * @param address 7-bit own address for slave mode, 0x01 for master mode. + */ void begin(uint8_t address) override { begin(address, false, false); } + /** + * @brief Stop the TWI interface and free the Rx and Tx buffers. + */ void end() override; + /** + * @brief Set the TWI clock frequency. + * @param freq Clock frequency in Hz. + */ void setClock(uint32_t freq) override; + /** + * @brief Begin a transmission to a slave device. Data is stored with + * write() and sent by endTransmission(). + * @param address 7-bit address of the slave device. + */ void beginTransmission(uint8_t address) override; - void beginTransmission(int); + /** + * @brief Begin a transmission to a slave device. Data is stored with + * write() and sent by endTransmission(). + * @param address 7-bit address of the slave device. + */ + void beginTransmission(int address); + /** + * @brief Send the buffered data to the slave device, ending with a STOP. + * + * Equivalent to endTransmission(true). Provided for backward compatibility + * with the original definition and behaviour of endTransmission(). + * @return 0: success, 1: data too long, 2: NACK on address, + * 3: NACK on data, 4: other error. + */ uint8_t endTransmission(void) override; + /** + * @brief Send the buffered data to the slave device and end the transmission. + * + * Originally endTransmission() had no parameter. The stopBit parameter + * indicates whether or not a STOP is performed on the bus: calling + * endTransmission(false) allows a sketch to perform a repeated start. + * @warning Nothing keeps track of whether the bus tenure has been ended + * with a STOP. It is very possible to leave the bus in a hung state if no + * call to endTransmission(true) is made. + * Some I2C devices behave oddly if they do not see a STOP. + * @param stopBit true to send a STOP at the end of the transmission, + * false to keep the bus for a repeated start. + * @return 0: success, 1: data too long, 2: NACK on address, + * 3: NACK on data, 4: other error. + */ uint8_t endTransmission(bool stopBit) override; + /** + * @brief Request bytes from a slave device. + * @param address 7-bit address of the slave device. + * @param len Number of bytes to request. + * @param stopBit true to send a STOP after the request, false to keep the + * bus for a repeated start. + * @return Number of bytes read, 0 on error. Read them with available() and read(). + */ size_t requestFrom(uint8_t address, size_t len, bool stopBit) override; + /** + * @brief Request bytes from a slave device, sending a STOP after the request. + * @param address 7-bit address of the slave device. + * @param len Number of bytes to request. + * @return Number of bytes read, 0 on error. Read them with available() and read(). + */ size_t requestFrom(uint8_t address, size_t len) override; + /** + * @brief Request bytes from a slave device after writing an internal register address. + * + * This allows a repeated start to access the internal registers of a device. + * @param address 7-bit address of the slave device. + * @param len Number of bytes to request. + * @param iaddress Internal register address to write before the request. + * @param isize Size in bytes of the internal address (most significant + * byte first), limited to 3. + * @param stopBit true to send a STOP after the request, false to keep the + * bus for a repeated start. + * @return Number of bytes read, 0 on error. Read them with available() and read(). + */ size_t requestFrom(uint8_t address, size_t len, uint32_t iaddress, uint8_t isize, bool stopBit); - size_t write(uint8_t) override; - size_t write(const uint8_t *, size_t) override; + /** + * @brief Write a byte. + * + * In master transmitter mode the byte is stored in the Tx buffer, in + * slave mode it is sent to the master. + * Must be called in the slave tx event callback or after + * beginTransmission() and before endTransmission(). + * @param data Byte to write. + * @return Number of bytes ready to write: 1 on success, 0 on error. + */ + size_t write(uint8_t data) override; + /** + * @brief Write bytes. + * + * Must be called in the slave tx event callback or after + * beginTransmission() and before endTransmission(). + * @param data Pointer to the buffer data. + * @param quantity Number of bytes to write. + * @return Number of bytes ready to write. + */ + size_t write(const uint8_t *data, size_t quantity) override; + /** + * @brief Get the number of bytes available for reading from the Rx buffer. + * + * Must be called in the slave rx event callback or after requestFrom(). + * @return Number of bytes available. + */ int available(void) override; + /** + * @brief Read a byte from the Rx buffer. + * + * Must be called in the slave rx event callback or after requestFrom(). + * @return Next byte, -1 if no data is available. + */ int read(void) override; + /** + * @brief Read the next byte from the Rx buffer without consuming it. + * + * Must be called in the slave rx event callback or after requestFrom(). + * @return Next byte, -1 if no data is available. + */ int peek(void) override; + /** + * @brief Discard the content of the Rx and Tx buffers. + */ void flush(void) override; - void onReceive(cb_function_receive_t callback); - void onReceive(void (*)(int)) override; - void onRequest(cb_function_request_t callback); - void onRequest(void (*)(void)) override; + /** + * @brief Register the function called when a slave receives data from a master. + * @param function Function called with the number of bytes received. + * @note Read the data with available() and read() from this callback. + */ + void onReceive(cb_function_receive_t function); + /** + * @brief Register the function called when a slave receives data from a master. + * + * The callback is called with the number of bytes received. Read the data + * with available() and read() from this callback. + * @param function Function called with the number of bytes received. + */ + void onReceive(void (*function)(int)) override; + /** + * @brief Register the function called when a master requests data from this slave. + * @param function Function called on request. + * @note Reply to the master with write() from this callback. + */ + void onRequest(cb_function_request_t function); + /** + * @brief Register the function called when a master requests data from this slave. + * + * Reply to the master with write() from this callback. + * @param function Function called on request. + */ + void onRequest(void (*function)(void)) override; + /** + * @brief Write a value as a single byte. + * @param n Value to write, truncated to a byte. + * @return Number of bytes written. + */ inline size_t write(unsigned long n) { return write((uint8_t)n); } + /** + * @brief Write a value as a single byte. + * @param n Value to write, truncated to a byte. + * @return Number of bytes written. + */ inline size_t write(long n) { return write((uint8_t)n); } + /** + * @brief Write a value as a single byte. + * @param n Value to write, truncated to a byte. + * @return Number of bytes written. + */ inline size_t write(unsigned int n) { return write((uint8_t)n); } + /** + * @brief Write a value as a single byte. + * @param n Value to write, truncated to a byte. + * @return Number of bytes written. + */ inline size_t write(int n) { return write((uint8_t)n); } using Print::write; - // Could be used to mix Arduino API and STM32Cube HAL API (ex: DMA). Use at your own risk. + /** + * @brief Get the I2C handle, to mix the Arduino API and the STM32Cube HAL + * API (e.g. DMA). Use at your own risk. + * @return Pointer to the I2C handle. + */ #if defined(USE_HALV2_DRIVER) hal_i2c_handle_t *getHandle(void) #else @@ -164,4 +439,49 @@ class TwoWire : public arduino::HardwareI2C { extern TwoWire Wire; +/** + * @example master_reader.ino + * Read data from an I2C slave device with TwoWire as master. + */ + +/** + * @example master_writer.ino + * Write data to an I2C slave device with TwoWire as master. + */ + +/** + * @example master_reader_writer.ino + * Read and write data from/to an I2C slave device with TwoWire as master. + */ + +/** + * @example slave_receiver.ino + * Receive data as an I2C slave device with TwoWire. + */ + +/** + * @example slave_sender.ino + * Send data as an I2C slave device with TwoWire. + */ + +/** + * @example slave_sender_receiver.ino + * Receive and send data as an I2C slave device with TwoWire. + */ + +/** + * @example i2c_scanner.ino + * Scan the I2C bus for devices with TwoWire. + */ + +/** + * @example digital_potentiometer.ino + * Control an AD5171 digital potentiometer with TwoWire. + */ + +/** + * @example SFRRanger_reader.ino + * Read an SRF08/SRF10 ultrasonic ranger with TwoWire. + */ + #endif diff --git a/libraries/Wire/src/utility/twi.c b/libraries/Wire/src/utility/twi.c index 86490841d0..1ccfd0d112 100644 --- a/libraries/Wire/src/utility/twi.c +++ b/libraries/Wire/src/utility/twi.c @@ -51,8 +51,11 @@ extern "C" { #define I2C_TIMEOUT_TICK 100 #endif +/** @brief Slave mode: the slave is sending data to the master. */ #define SLAVE_MODE_TRANSMIT 0 +/** @brief Slave mode: the slave is receiving data from the master. */ #define SLAVE_MODE_RECEIVE 1 +/** @brief Slave mode: the slave is listening for its address. */ #define SLAVE_MODE_LISTEN 2 /* Generic definition for series requiring I2C timing calculation */ @@ -86,6 +89,7 @@ extern "C" { #define I2C_SCLL_MAX 256U #define SEC2NSEC 1000000000UL +/** @brief I2C speed modes, used as index of I2C_ClockTiming and I2C_Charac. */ typedef enum { I2C_SPEED_FREQ_STANDARD, /* 100 kHz */ I2C_SPEED_FREQ_FAST, /* 400 kHz */ @@ -93,13 +97,24 @@ typedef enum { I2C_SPEED_FREQ_NUMBER /* Must be the last entry */ } I2C_speed_freq_t; +/** + * @brief Timing value computed for a given I2C input clock, cached to avoid + * computing it again. + */ typedef struct { uint32_t input_clock; /* I2C Input clock */ uint32_t timing; /* I2C timing corresponding to Input clock */ } I2C_timing_t; +/** + * @brief Cache of the computed timing for each speed mode (see I2C_speed_freq_t). + */ static I2C_timing_t I2C_ClockTiming[I2C_SPEED_FREQ_NUMBER] = {0}; +/** + * @brief I2C bus characteristics of a speed mode (frequency range and timings + * from the I2C specification, UM10204). + */ typedef struct { uint32_t freq; /* Frequency in Hz */ uint32_t freq_min; /* Minimum frequency in Hz */ @@ -114,6 +129,9 @@ typedef struct { uint8_t dnf; /* Digital noise filter coefficient */ } I2C_Charac_t; +/** + * @brief I2C characteristics of each speed mode, indexed by I2C_speed_freq_t. + */ static const I2C_Charac_t I2C_Charac[] = { [I2C_SPEED_FREQ_STANDARD] = { @@ -160,7 +178,10 @@ static const I2C_Charac_t I2C_Charac[] = { }; #endif /* I2C_TIMING_COMPUTE */ -/* Family specific description for I2C */ +/** + * @brief Index of each I2C instance available on the family, used to index + * i2c_handles. I2C_NUM is the number of instances. + */ typedef enum { #if defined(I2C1_BASE) I2C1_INDEX, @@ -184,6 +205,10 @@ typedef enum { } i2c_index_t; /* Private Variables */ +/** + * @brief HAL handle of each initialized I2C instance, indexed by i2c_index_t. + * Used by the interrupt handlers. + */ #if defined(USE_HALV2_DRIVER) static hal_i2c_handle_t *i2c_handles[I2C_NUM]; #else @@ -193,8 +218,8 @@ static I2C_HandleTypeDef *i2c_handles[I2C_NUM]; #ifdef I2C_TIMING_COMPUTE /** * @brief This function return the I2C clock source frequency. - * @param i2c: I2C instance - * @retval frequency in Hz + * @param i2c I2C instance + * @return frequency in Hz */ static uint32_t i2c_getClkFreq(I2C_TypeDef *i2c) { @@ -537,7 +562,7 @@ static uint32_t i2c_getClkFreq(I2C_TypeDef *i2c) * @brief Calculate PRESC, SCLDEL, SDADEL, SCLL and SCLH and find best configuration. * @param clkSrcFreq I2C source clock in HZ. * @param i2c_speed I2C frequency (index). -* @retval config index (0 to I2C_VALID_TIMING_NBR], 0xFFFFFFFF for no +* @return config index (0 to I2C_VALID_TIMING_NBR], 0xFFFFFFFF for no valid config. */ static uint32_t i2c_computeTiming(uint32_t clkSrcFreq, uint32_t i2c_speed) @@ -671,10 +696,10 @@ static uint32_t i2c_computeTiming(uint32_t clkSrcFreq, uint32_t i2c_speed) /** * @brief Compute I2C timing according current I2C clock source and required I2C clock. -* @param obj : pointer to i2c_t structure +* @param obj Pointer to i2c_t structure * @param frequency Required I2C clock in Hz. -* @retval I2C timing or 0 in case of error. +* @return I2C timing or 0 in case of error. */ static uint32_t i2c_getTiming(i2c_t *obj, uint32_t frequency) { @@ -734,13 +759,6 @@ static uint32_t i2c_getTiming(i2c_t *obj, uint32_t frequency) return ret; } -/** - * @brief Initialize and setup GPIO and I2C peripheral - * @param obj : pointer to i2c_t structure - * @param timing : one of the i2c_timing_e - * @param ownAddress : device address - * @retval none - */ void i2c_init(i2c_t *obj, uint32_t timing, uint32_t ownAddress) { if (obj != NULL) { @@ -927,11 +945,6 @@ void i2c_init(i2c_t *obj, uint32_t timing, uint32_t ownAddress) } } -/** - * @brief Initialize and setup GPIO and I2C peripheral - * @param obj : pointer to i2c_t structure - * @retval none - */ void i2c_deinit(i2c_t *obj) { #if defined(USE_HALV2_DRIVER) @@ -1003,12 +1016,6 @@ void i2c_deinit(i2c_t *obj) #endif // I2C6_BASE } -/** - * @brief Setup transmission speed. I2C must be configured before. - * @param obj : pointer to i2c_t structure - * @param frequency : i2c transmission speed - * @retval none - */ void i2c_setTiming(i2c_t *obj, uint32_t frequency) { uint32_t f = i2c_getTiming(obj, frequency); @@ -1033,14 +1040,6 @@ void i2c_setTiming(i2c_t *obj, uint32_t frequency) LL_I2C_Enable(obj->i2c); } -/** - * @brief Write bytes at a given address - * @param obj : pointer to i2c_t structure - * @param dev_address: specifies the address of the device. - * @param data: pointer to data to be write - * @param size: number of bytes to be write. - * @retval read status - */ i2c_status_e i2c_master_write(i2c_t *obj, uint8_t dev_address, uint8_t *data, uint16_t size) @@ -1144,13 +1143,6 @@ i2c_status_e i2c_master_write(i2c_t *obj, uint8_t dev_address, return ret; } -/** - * @brief Write bytes to master - * @param obj : pointer to i2c_t structure - * @param data: pointer to data to be write - * @param size: number of bytes to be write. - * @retval status - */ i2c_status_e i2c_slave_write_IT(i2c_t *obj, uint8_t *data, uint16_t size) { uint8_t i = 0; @@ -1170,14 +1162,6 @@ i2c_status_e i2c_slave_write_IT(i2c_t *obj, uint8_t *data, uint16_t size) return ret; } -/** - * @brief read bytes in master mode at a given address - * @param obj : pointer to i2c_t structure - * @param dev_address: specifies the address of the device. - * @param data: pointer to data to be read - * @param size: number of bytes to be read. - * @retval read status - */ i2c_status_e i2c_master_read(i2c_t *obj, uint8_t dev_address, uint8_t *data, uint16_t size) { i2c_status_e ret = I2C_OK; @@ -1273,13 +1257,6 @@ i2c_status_e i2c_master_read(i2c_t *obj, uint8_t dev_address, uint8_t *data, uin return ret; } -/** - * @brief Checks if target device is ready for communication - * @param obj : pointer to i2c_t structure - * @param devAddr: specifies the address of the device. - * @param trials : Number of trials. - * @retval status - */ i2c_status_e i2c_IsDeviceReady(i2c_t *obj, uint8_t devAddr, uint32_t trials) { i2c_status_e ret = I2C_OK; @@ -1321,6 +1298,15 @@ i2c_status_e i2c_IsDeviceReady(i2c_t *obj, uint8_t devAddr, uint32_t trials) /* Aim of the function is to get i2c_s pointer using hi2c pointer */ /* Highly inspired from magical linux kernel's "container_of" */ /* (which was not directly used since not compatible with IAR toolchain) */ +/** + * @brief Get the i2c_t object that embeds a given HAL I2C handle. + * @param hi2c Pointer to the handle member of an i2c_t object + * (I2C_HandleTypeDef, or hal_i2c_handle_t with USE_HALV2_DRIVER). + * @return Pointer to the i2c_t object that contains hi2c. + * @note The object is recovered by pointer arithmetic (container_of style). + * hi2c must point to the handle member of a valid i2c_t, otherwise the + * result is undefined. + */ #if defined(USE_HALV2_DRIVER) i2c_t *get_i2c_obj(hal_i2c_handle_t *hi2c) #else @@ -1336,11 +1322,6 @@ i2c_t *get_i2c_obj(I2C_HandleTypeDef *hi2c) return (obj); } -/** @brief sets function called before a slave read operation - * @param obj : pointer to i2c_t structure - * @param function: callback function to use - * @retval None - */ void i2c_attachSlaveRxEvent(i2c_t *obj, void (*function)(i2c_t *)) { if ((obj != NULL) && (function != NULL)) { @@ -1353,11 +1334,6 @@ void i2c_attachSlaveRxEvent(i2c_t *obj, void (*function)(i2c_t *)) } } -/** @brief sets function called before a slave write operation - * @param obj : pointer to i2c_t structure - * @param function: callback function to use - * @retval None - */ void i2c_attachSlaveTxEvent(i2c_t *obj, void (*function)(i2c_t *)) { if ((obj != NULL) && (function != NULL)) { @@ -1372,11 +1348,11 @@ void i2c_attachSlaveTxEvent(i2c_t *obj, void (*function)(i2c_t *)) /** * @brief Slave Address Match callback. - * @param hi2c Pointer to a I2C_HandleTypeDef or hal_i2c_handle_t structure that contains - * the configuration information for the specified I2C. - * @param TransferDirection: Master request Transfer Direction (Write/Read), value of @ref I2C_XferOptions_definition - * @param AddrMatchCode: Address Match Code - * @retval None + * @param hi2c Pointer to a I2C_HandleTypeDef or hal_i2c_handle_t structure + * that contains the configuration information for the specified I2C. + * @param TransferDirection Master request Transfer Direction (Write/Read), + * value of @ref I2C_XferOptions_definition + * @param AddrMatchCode Address Match Code */ #if defined(USE_HALV2_DRIVER) void HAL_I2C_SLAVE_AddrCallback(hal_i2c_handle_t *hi2c, hal_i2c_slave_xfer_direction_t TransferDirection, @@ -1428,9 +1404,8 @@ void HAL_I2C_AddrCallback(I2C_HandleTypeDef *hi2c, uint8_t TransferDirection, ui /** * @brief Listen Complete callback. - * @param hi2c Pointer to a I2C_HandleTypeDef or hal_i2c_handle_t structure that contains - * the configuration information for the specified I2C. - * @retval None + * @param hi2c Pointer to a I2C_HandleTypeDef or hal_i2c_handle_t structure + * that contains the configuration information for the specified I2C. */ #if defined(USE_HALV2_DRIVER) void HAL_I2C_SLAVE_ListenCpltCallback(hal_i2c_handle_t *hi2c) @@ -1456,9 +1431,8 @@ void HAL_I2C_ListenCpltCallback(I2C_HandleTypeDef *hi2c) /** * @brief Slave RX complete callback - * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains * the configuration information for the specified I2C. - * @retval None */ #if defined(USE_HALV2_DRIVER) void HAL_I2C_SLAVE_RxCpltCallback(hal_i2c_handle_t *hi2c) @@ -1487,9 +1461,8 @@ void HAL_I2C_SlaveRxCpltCallback(I2C_HandleTypeDef *hi2c) /** * @brief Slave TX complete callback - * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains * the configuration information for the specified I2C. - * @retval None */ #if defined(USE_HALV2_DRIVER) void HAL_I2C_SLAVE_TxCpltCallback(hal_i2c_handle_t *hi2c) @@ -1508,9 +1481,8 @@ void HAL_I2C_SlaveTxCpltCallback(I2C_HandleTypeDef *hi2c) * to the Arduino API from i2c_master_write() and i2c_master_read(). * In slave mode, there is no mechanism in Arduino API to report an error * so the error callback forces the slave to listen again. - * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains + * @param hi2c Pointer to a I2C_HandleTypeDef structure that contains * the configuration information for the specified I2C. - * @retval None */ #if defined(USE_HALV2_DRIVER) void HAL_I2C_ErrorCallback(hal_i2c_handle_t *hi2c) @@ -1532,8 +1504,6 @@ void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c) #if defined(I2C1_BASE) /** * @brief This function handles I2C1 interrupt. -* @param None -* @retval None */ void I2C1_EV_IRQHandler(void) { @@ -1552,8 +1522,6 @@ void I2C1_EV_IRQHandler(void) #if defined(STM32C5xx) /** * @brief This function handles I2C1 error interrupt. -* @param None -* @retval None */ void I2C1_ERR_IRQHandler(void) { @@ -1564,8 +1532,6 @@ void I2C1_ERR_IRQHandler(void) !defined(STM32L0xx) && !defined(STM32U0xx) /** * @brief This function handles I2C1 error interrupt. -* @param None -* @retval None */ void I2C1_ER_IRQHandler(void) { @@ -1578,8 +1544,6 @@ void I2C1_ER_IRQHandler(void) #if defined(I2C2_BASE) /** * @brief This function handles I2C2 interrupt. -* @param None -* @retval None */ void I2C2_EV_IRQHandler(void) { @@ -1620,8 +1584,6 @@ void I2C2_EV_IRQHandler(void) #if defined(STM32C5xx) /** * @brief This function handles I2C2 error interrupt. -* @param None -* @retval None */ void I2C2_ERR_IRQHandler(void) { @@ -1632,8 +1594,6 @@ void I2C2_ERR_IRQHandler(void) !defined(STM32U0xx) /** * @brief This function handles I2C2 error interrupt. -* @param None -* @retval None */ void I2C2_ER_IRQHandler(void) { @@ -1646,8 +1606,6 @@ void I2C2_ER_IRQHandler(void) #if defined(I2C3_BASE) && !defined(STM32G0xx) && !defined(STM32U0xx) /** * @brief This function handles I2C3 interrupt. -* @param None -* @retval None */ void I2C3_EV_IRQHandler(void) { @@ -1661,8 +1619,6 @@ void I2C3_EV_IRQHandler(void) #if !defined(STM32L0xx) /** * @brief This function handles I2C3 interrupt. -* @param None -* @retval None */ void I2C3_ER_IRQHandler(void) { @@ -1675,8 +1631,6 @@ void I2C3_ER_IRQHandler(void) #if defined(I2C4_BASE) && !defined(STM32U0xx) /** * @brief This function handles I2C4 interrupt. -* @param None -* @retval None */ void I2C4_EV_IRQHandler(void) { @@ -1687,8 +1641,6 @@ void I2C4_EV_IRQHandler(void) /** * @brief This function handles I2C4 interrupt. -* @param None -* @retval None */ void I2C4_ER_IRQHandler(void) { @@ -1700,8 +1652,6 @@ void I2C4_ER_IRQHandler(void) #if defined(I2C5_BASE) /** * @brief This function handles I2C5 interrupt. -* @param None -* @retval None */ void I2C5_EV_IRQHandler(void) { @@ -1711,8 +1661,6 @@ void I2C5_EV_IRQHandler(void) /** * @brief This function handles I2C5 interrupt. -* @param None -* @retval None */ void I2C5_ER_IRQHandler(void) { @@ -1724,8 +1672,6 @@ void I2C5_ER_IRQHandler(void) #if defined(I2C6_BASE) /** * @brief This function handles I2C6 interrupt. -* @param None -* @retval None */ void I2C6_EV_IRQHandler(void) { @@ -1735,8 +1681,6 @@ void I2C6_EV_IRQHandler(void) /** * @brief This function handles I2C6 interrupt. -* @param None -* @retval None */ void I2C6_ER_IRQHandler(void) { diff --git a/libraries/Wire/src/utility/twi.h b/libraries/Wire/src/utility/twi.h index c03bb7fd81..784b443c17 100644 --- a/libraries/Wire/src/utility/twi.h +++ b/libraries/Wire/src/utility/twi.h @@ -49,18 +49,36 @@ extern "C" { #endif /* Exported types ------------------------------------------------------------*/ -/* offsetof is a gcc built-in function, this is the manual implementation */ +/** + * @brief Manual implementation of offsetof (a gcc built-in function). + * @param type Structure type. + * @param member Member of the structure. + */ #define OFFSETOF(type, member) ((uint32_t) (&(((type *)(0))->member))) -/* Interrupt priority */ +/** + * @def I2C_IRQ_PRIO + * @brief I2C interrupt preemption priority. + * Can be overridden before including this file. + */ #ifndef I2C_IRQ_PRIO #define I2C_IRQ_PRIO 2 #endif +/** + * @def I2C_IRQ_SUBPRIO + * @brief I2C interrupt sub-priority. + * Can be overridden before including this file. + */ #ifndef I2C_IRQ_SUBPRIO #define I2C_IRQ_SUBPRIO 0 #endif -/* I2C Tx/Rx buffer size */ +/** + * @def I2C_TXRX_BUFFER_SIZE + * @brief Size in bytes of the slave Tx/Rx buffer of an i2c_t object. + * Can be overridden before including this file. + * @note The size cannot exceed 255. + */ #if !defined(I2C_TXRX_BUFFER_SIZE) #define I2C_TXRX_BUFFER_SIZE 32 #elif (I2C_TXRX_BUFFER_SIZE >= 256) @@ -112,60 +130,154 @@ extern "C" { #endif // defined(I2C4_BASE) #endif /* STM32C0xx || STM32F0xx || STM32G0xx || STM32L0xx || STM32U0xx */ +/** + * @brief I2C object type, see i2c_s. + */ typedef struct i2c_s i2c_t; +/** + * @brief I2C peripheral context: instance, HAL handle, pins, interrupts and slave buffers. + * @note The first two members (i2c and handle) must be kept first + * for the get_i2c_obj() function to work as expected. + */ struct i2c_s { /* The 1st 2 members I2CName i2c * and I2C_HandleTypeDef handle should * be kept as the first members of this struct * to have get_i2c_obj() function work as expected */ + /** I2C peripheral instance. */ I2C_TypeDef *i2c; + /** HAL handle of the I2C peripheral. */ #if defined(USE_HALV2_DRIVER) hal_i2c_handle_t handle; #else I2C_HandleTypeDef handle; #endif /* USE_HALV2_DRIVER */ + /** Pointer to the owning TwoWire instance, used by the slave callbacks. */ void *__this; + /** SDA pin. */ PinName sda; + /** SCL pin. */ PinName scl; + /** Event interrupt number. */ IRQn_Type irq; #if !defined(STM32C0xx) && !defined(STM32F0xx) && !defined(STM32G0xx) && !defined(STM32L0xx) + /** Error interrupt number. */ IRQn_Type irqER; #endif /* !STM32C0xx && !STM32F0xx && !STM32G0xx && !STM32L0xx */ - volatile int slaveRxNbData; // Number of accumulated bytes received in Slave mode + /** Number of accumulated bytes received in slave mode. */ + volatile int slaveRxNbData; + /** Callback called when the slave has received data from the master. */ void (*i2c_onSlaveReceive)(i2c_t *); + /** Callback called when the master requests data from the slave. */ void (*i2c_onSlaveTransmit)(i2c_t *); + /** Slave Tx/Rx buffer, I2C_TXRX_BUFFER_SIZE bytes. */ volatile uint8_t i2cTxRxBuffer[I2C_TXRX_BUFFER_SIZE]; + /** Number of bytes currently stored in i2cTxRxBuffer for transmission. */ volatile uint8_t i2cTxRxBufferSize; + /** + * Current slave mode: SLAVE_MODE_TRANSMIT, SLAVE_MODE_RECEIVE or SLAVE_MODE_LISTEN. + */ volatile uint8_t slaveMode; + /** true when the peripheral is configured as master, false as slave. */ bool isMaster; + /** true to enable the general call address (slave mode). */ bool generalCall; + /** true to disable clock stretching (slave mode). */ bool NoStretchMode; }; -///@brief I2C state +/** + * @brief I2C status returned by the i2c_* functions. + */ typedef enum { + /** Operation completed successfully. */ I2C_OK = 0, + /** Data does not fit in the buffer. */ I2C_DATA_TOO_LONG = 1, + /** Address was not acknowledged (NACK). */ I2C_NACK_ADDR = 2, + /** Data was not acknowledged (NACK). */ I2C_NACK_DATA = 3, + /** Other error. */ I2C_ERROR = 4, + /** Operation timed out. */ I2C_TIMEOUT = 5, + /** Bus or peripheral is busy. */ I2C_BUSY = 6 } i2c_status_e; /* Exported functions ------------------------------------------------------- */ +/** + * @brief Initialize and set up the GPIO pins and the I2C peripheral. + * @param obj Pointer to the i2c_t structure. + * @param timing I2C clock frequency in Hz. + * @param ownAddress Own address already shifted left by 1 (7-bit address << 1). + */ void i2c_init(i2c_t *obj, uint32_t timing, uint32_t ownAddress); +/** + * @brief Deinitialize the GPIO pins and the I2C peripheral. + * @param obj Pointer to the i2c_t structure. + */ void i2c_deinit(i2c_t *obj); +/** + * @brief Set the transmission speed. + * The I2C peripheral must be initialized before. + * @param obj Pointer to the i2c_t structure. + * @param frequency I2C transmission speed in Hz. + */ void i2c_setTiming(i2c_t *obj, uint32_t frequency); +/** + * @brief Write bytes to a device at a given address. + * + * A size of 0 checks whether the device is ready (scan / ping) instead of writing. + * @param obj Pointer to the i2c_t structure. + * @param dev_address 7-bit address of the device. + * @param data Pointer to the data to write. + * @param size Number of bytes to write. + * @return I2C_OK on success, otherwise the i2c_status_e error code. + */ i2c_status_e i2c_master_write(i2c_t *obj, uint8_t dev_address, uint8_t *data, uint16_t size); +/** + * @brief Buffer bytes to send to the master in slave transmit mode. + * @param obj Pointer to the i2c_t structure. + * @param data Pointer to the data to buffer. + * @param size Number of bytes to buffer, at most I2C_TXRX_BUFFER_SIZE. + * @return I2C_OK on success, I2C_DATA_TOO_LONG if size exceeds I2C_TXRX_BUFFER_SIZE. + */ i2c_status_e i2c_slave_write_IT(i2c_t *obj, uint8_t *data, uint16_t size); +/** + * @brief Read bytes from a device at a given address in master mode. + * @param obj Pointer to the i2c_t structure. + * @param dev_address 7-bit address of the device. + * @param data Pointer to the buffer receiving the data. + * @param size Number of bytes to read. + * @return I2C_OK on success, otherwise the i2c_status_e error code. + */ i2c_status_e i2c_master_read(i2c_t *obj, uint8_t dev_address, uint8_t *data, uint16_t size); +/** + * @brief Check whether the target device is ready for communication. + * @param obj Pointer to the i2c_t structure. + * @param devAddr 7-bit address of the device. + * @param trials Number of trials. + * @return I2C_OK if the device is ready, I2C_NACK_ADDR if it does not answer, + * otherwise the i2c_status_e error code. + */ i2c_status_e i2c_IsDeviceReady(i2c_t *obj, uint8_t devAddr, uint32_t trials); +/** + * @brief Set the function called when the slave receives data from a master. + * @param obj Pointer to the i2c_t structure. + * @param function Callback function to use, called with the i2c_t structure. + */ void i2c_attachSlaveRxEvent(i2c_t *obj, void (*function)(i2c_t *)); +/** + * @brief Set the function called when a master requests data from the slave. + * @param obj Pointer to the i2c_t structure. + * @param function Callback function to use, called with the i2c_t structure. + */ void i2c_attachSlaveTxEvent(i2c_t *obj, void (*function)(i2c_t *)); #ifdef __cplusplus diff --git a/system/STM32C0xx/stm32c0xx_hal_conf_default.h b/system/STM32C0xx/stm32c0xx_hal_conf_default.h index 421bd57e16..bfac4073ff 100644 --- a/system/STM32C0xx/stm32c0xx_hal_conf_default.h +++ b/system/STM32C0xx/stm32c0xx_hal_conf_default.h @@ -323,10 +323,17 @@ in voltage and temperature.*/ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32C0xx/system_stm32c0xx.c b/system/STM32C0xx/system_stm32c0xx.c index 07ee2c48bb..188fd4330a 100644 --- a/system/STM32C0xx/system_stm32c0xx.c +++ b/system/STM32C0xx/system_stm32c0xx.c @@ -116,8 +116,6 @@ /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) { @@ -163,9 +161,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32C5xx/system_stm32c5xx.c b/system/STM32C5xx/system_stm32c5xx.c index 6a8d76e5b9..49c1711a91 100644 --- a/system/STM32C5xx/system_stm32c5xx.c +++ b/system/STM32C5xx/system_stm32c5xx.c @@ -141,8 +141,6 @@ const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U}; /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) @@ -161,7 +159,6 @@ void SystemInit(void) * The SystemCoreClock variable contains the core clock (HCLK), it can * be used by the user application to setup the SysTick timer or configure * other parameters. - * @param None * @note Each time the core clock (HCLK) changes, this function must be called * to update SystemCoreClock variable value. Otherwise, any configuration * based on this variable will be incorrect. @@ -191,7 +188,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32F0xx/stm32f0xx_hal_conf_default.h b/system/STM32F0xx/stm32f0xx_hal_conf_default.h index b63ee5e55c..f4ca22597a 100644 --- a/system/STM32F0xx/stm32f0xx_hal_conf_default.h +++ b/system/STM32F0xx/stm32f0xx_hal_conf_default.h @@ -360,10 +360,17 @@ in voltage and temperature. */ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t* file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32F0xx/system_stm32f0xx.c b/system/STM32F0xx/system_stm32f0xx.c index 01822f320f..ce3309b9da 100644 --- a/system/STM32F0xx/system_stm32f0xx.c +++ b/system/STM32F0xx/system_stm32f0xx.c @@ -127,8 +127,6 @@ const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; /** * @brief Setup the microcontroller system - * @param None - * @retval None */ void SystemInit(void) { @@ -229,9 +227,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate (void) { diff --git a/system/STM32F1xx/stm32f1xx_hal_conf_default.h b/system/STM32F1xx/stm32f1xx_hal_conf_default.h index c823b60527..8286e6f382 100644 --- a/system/STM32F1xx/stm32f1xx_hal_conf_default.h +++ b/system/STM32F1xx/stm32f1xx_hal_conf_default.h @@ -438,10 +438,17 @@ extern "C" { * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32F1xx/system_stm32f1xx.c b/system/STM32F1xx/system_stm32f1xx.c index fd61d07b4e..9cdc31e5ef 100644 --- a/system/STM32F1xx/system_stm32f1xx.c +++ b/system/STM32F1xx/system_stm32f1xx.c @@ -163,8 +163,6 @@ const uint8_t APBPrescTable[8U] = {0, 0, 0, 0, 1, 2, 3, 4}; * Initialize the Embedded Flash Interface, the PLL and update the * SystemCoreClock variable. * @note This function should be used only after reset. - * @param None - * @retval None */ void SystemInit (void) { @@ -250,8 +248,6 @@ void SystemInit (void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * @param None - * @retval None */ void SystemCoreClockUpdate (void) { @@ -365,8 +361,6 @@ void SystemCoreClockUpdate (void) /** * @brief Setup the external memory controller. Called in startup_stm32f1xx.s * before jump to __main - * @param None - * @retval None */ #ifdef DATA_IN_ExtSRAM /** @@ -375,8 +369,6 @@ void SystemCoreClockUpdate (void) * This function configures the external SRAM mounted on STM3210E-EVAL * board (STM32 High density devices). This SRAM will be used as program * data memory (including heap and stack). - * @param None - * @retval None */ void SystemInit_ExtMemCtl(void) { diff --git a/system/STM32F2xx/stm32f2xx_hal_conf_default.h b/system/STM32F2xx/stm32f2xx_hal_conf_default.h index f1f9963c1b..2597d8a77b 100644 --- a/system/STM32F2xx/stm32f2xx_hal_conf_default.h +++ b/system/STM32F2xx/stm32f2xx_hal_conf_default.h @@ -466,10 +466,17 @@ in voltage and temperature.*/ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32F2xx/system_stm32f2xx.c b/system/STM32F2xx/system_stm32f2xx.c index 2c740c985c..3f5ab2de36 100644 --- a/system/STM32F2xx/system_stm32f2xx.c +++ b/system/STM32F2xx/system_stm32f2xx.c @@ -145,8 +145,6 @@ * @brief Setup the microcontroller system * Initialize the Embedded Flash Interface, the PLL and update the * SystemFrequency variable. - * @param None - * @retval None */ void SystemInit(void) { @@ -209,9 +207,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { @@ -267,8 +262,6 @@ void SystemCoreClockUpdate(void) * Called in startup_stm32f2xx.s before jump to main. * This function configures the external SRAM mounted on STM322xG_EVAL board * This SRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None */ void SystemInit_ExtMemCtl(void) { diff --git a/system/STM32F3xx/stm32f3xx_hal_conf_default.h b/system/STM32F3xx/stm32f3xx_hal_conf_default.h index bd031a142a..f654d1fdb1 100644 --- a/system/STM32F3xx/stm32f3xx_hal_conf_default.h +++ b/system/STM32F3xx/stm32f3xx_hal_conf_default.h @@ -408,10 +408,17 @@ in voltage and temperature. */ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t* file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32F3xx/system_stm32f3xx.c b/system/STM32F3xx/system_stm32f3xx.c index c9bad29914..565bbc2cb5 100644 --- a/system/STM32F3xx/system_stm32f3xx.c +++ b/system/STM32F3xx/system_stm32f3xx.c @@ -159,8 +159,6 @@ const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; /** * @brief Setup the microcontroller system * Initialize the FPU setting, vector table location and the PLL configuration is reset. - * @param None - * @retval None */ void SystemInit(void) { @@ -229,9 +227,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate (void) { diff --git a/system/STM32F4xx/stm32f4xx_hal_conf_default.h b/system/STM32F4xx/stm32f4xx_hal_conf_default.h index 0f589ea521..529dc5b101 100644 --- a/system/STM32F4xx/stm32f4xx_hal_conf_default.h +++ b/system/STM32F4xx/stm32f4xx_hal_conf_default.h @@ -576,10 +576,17 @@ in voltage and temperature. */ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32F4xx/system_stm32f4xx.c b/system/STM32F4xx/system_stm32f4xx.c index e8a5fe0dcb..cf450c3922 100644 --- a/system/STM32F4xx/system_stm32f4xx.c +++ b/system/STM32F4xx/system_stm32f4xx.c @@ -157,8 +157,6 @@ const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; * @brief Setup the microcontroller system * Initialize the FPU setting, vector table location and External memory * configuration. - * @param None - * @retval None */ void SystemInit(void) { @@ -228,9 +226,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { @@ -288,8 +283,6 @@ void SystemCoreClockUpdate(void) * Called in startup_stm32f4xx.s before jump to main. * This function configures the external memories (SRAM/SDRAM) * This SRAM/SDRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None */ void SystemInit_ExtMemCtl(void) { @@ -454,8 +447,6 @@ void SystemInit_ExtMemCtl(void) * Called in startup_stm32f4xx.s before jump to main. * This function configures the external memories (SRAM/SDRAM) * This SRAM/SDRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None */ void SystemInit_ExtMemCtl(void) { diff --git a/system/STM32F7xx/stm32f7xx_hal_conf_default.h b/system/STM32F7xx/stm32f7xx_hal_conf_default.h index be2245868d..7387c0b840 100644 --- a/system/STM32F7xx/stm32f7xx_hal_conf_default.h +++ b/system/STM32F7xx/stm32f7xx_hal_conf_default.h @@ -563,10 +563,17 @@ in voltage and temperature. */ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32F7xx/system_stm32f7xx.c b/system/STM32F7xx/system_stm32f7xx.c index ed10030696..8d9223fcfd 100644 --- a/system/STM32F7xx/system_stm32f7xx.c +++ b/system/STM32F7xx/system_stm32f7xx.c @@ -138,8 +138,6 @@ * @brief Setup the microcontroller system * Initialize the Embedded Flash Interface, the PLL and update the * SystemFrequency variable. - * @param None - * @retval None */ void SystemInit(void) { @@ -203,9 +201,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32G0xx/stm32g0xx_hal_conf_default.h b/system/STM32G0xx/stm32g0xx_hal_conf_default.h index f34d17ceb1..f23dcf1743 100644 --- a/system/STM32G0xx/stm32g0xx_hal_conf_default.h +++ b/system/STM32G0xx/stm32g0xx_hal_conf_default.h @@ -394,10 +394,17 @@ in voltage and temperature.*/ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32G0xx/system_stm32g0xx.c b/system/STM32G0xx/system_stm32g0xx.c index 8b4bc74d90..1f98811303 100644 --- a/system/STM32G0xx/system_stm32g0xx.c +++ b/system/STM32G0xx/system_stm32g0xx.c @@ -167,8 +167,6 @@ /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) { @@ -237,9 +235,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32G4xx/stm32g4xx_hal_conf_default.h b/system/STM32G4xx/stm32g4xx_hal_conf_default.h index 21087ff76f..933b69e8cb 100644 --- a/system/STM32G4xx/stm32g4xx_hal_conf_default.h +++ b/system/STM32G4xx/stm32g4xx_hal_conf_default.h @@ -429,14 +429,21 @@ The real value may vary depending on the variations in voltage and temperature.* #ifdef USE_FULL_ASSERT /** * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function + * @param expr If expr is false, it calls assert_failed function * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32G4xx/system_stm32g4xx.c b/system/STM32G4xx/system_stm32g4xx.c index fca08d47f1..8854c427cd 100644 --- a/system/STM32G4xx/system_stm32g4xx.c +++ b/system/STM32G4xx/system_stm32g4xx.c @@ -167,8 +167,6 @@ /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) @@ -231,9 +229,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32H5xx/stm32h5xx_hal_conf_default.h b/system/STM32H5xx/stm32h5xx_hal_conf_default.h index 74c2fdafcb..3081b3d6c5 100644 --- a/system/STM32H5xx/stm32h5xx_hal_conf_default.h +++ b/system/STM32H5xx/stm32h5xx_hal_conf_default.h @@ -645,14 +645,21 @@ in voltage and temperature.*/ #ifdef USE_FULL_ASSERT /** * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function + * @param expr If expr is false, it calls assert_failed function * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ----------------------------------------------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32H5xx/system_stm32h5xx.c b/system/STM32H5xx/system_stm32h5xx.c index ce6cd42886..9594944028 100644 --- a/system/STM32H5xx/system_stm32h5xx.c +++ b/system/STM32H5xx/system_stm32h5xx.c @@ -182,8 +182,6 @@ /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) @@ -304,9 +302,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32H7xx/stm32h7xx_hal_conf_default.h b/system/STM32H7xx/stm32h7xx_hal_conf_default.h index 5dc9afa366..9364bdaaf1 100644 --- a/system/STM32H7xx/stm32h7xx_hal_conf_default.h +++ b/system/STM32H7xx/stm32h7xx_hal_conf_default.h @@ -617,14 +617,21 @@ extern "C" { #ifdef USE_FULL_ASSERT /** * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function + * @param expr If expr is false, it calls assert_failed function * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32H7xx/system_stm32h7xx.c b/system/STM32H7xx/system_stm32h7xx.c index dca15c1b7e..573da006e8 100644 --- a/system/STM32H7xx/system_stm32h7xx.c +++ b/system/STM32H7xx/system_stm32h7xx.c @@ -159,8 +159,6 @@ * @brief Setup the microcontroller system * Initialize the FPU setting and vector table location * configuration. - * @param None - * @retval None */ void SystemInit (void) { @@ -326,8 +324,6 @@ if(READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN) == 0U) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * @param None - * @retval None */ void SystemCoreClockUpdate (void) { @@ -446,9 +442,6 @@ void SystemCoreClockUpdate (void) * @note The function modifies the PWR->CR3 register to enable or disable specific * power supply modes and waits until the voltage level flag is set, indicating * that the power supply configuration is stable. - * - * @param None - * @retval None */ void ExitRun0Mode(void) { diff --git a/system/STM32L0xx/stm32l0xx_hal_conf_default.h b/system/STM32L0xx/stm32l0xx_hal_conf_default.h index b8b2030634..68d97326c9 100644 --- a/system/STM32L0xx/stm32l0xx_hal_conf_default.h +++ b/system/STM32L0xx/stm32l0xx_hal_conf_default.h @@ -377,10 +377,17 @@ extern "C" { * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32L0xx/system_stm32l0xx.c b/system/STM32L0xx/system_stm32l0xx.c index ae1f81519e..91d40e4843 100644 --- a/system/STM32L0xx/system_stm32l0xx.c +++ b/system/STM32L0xx/system_stm32l0xx.c @@ -137,8 +137,6 @@ /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit (void) { @@ -209,8 +207,6 @@ void SystemInit (void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * @param None - * @retval None */ void SystemCoreClockUpdate (void) { diff --git a/system/STM32L1xx/stm32l1xx_hal_conf_default.h b/system/STM32L1xx/stm32l1xx_hal_conf_default.h index 56ce325291..f39e8985e9 100644 --- a/system/STM32L1xx/stm32l1xx_hal_conf_default.h +++ b/system/STM32L1xx/stm32l1xx_hal_conf_default.h @@ -359,10 +359,17 @@ in voltage and temperature.*/ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32L1xx/system_stm32l1xx.c b/system/STM32L1xx/system_stm32l1xx.c index 1ad207cb29..359d5b9800 100644 --- a/system/STM32L1xx/system_stm32l1xx.c +++ b/system/STM32L1xx/system_stm32l1xx.c @@ -148,8 +148,6 @@ const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U}; * @brief Setup the microcontroller system. * Initialize the Embedded Flash Interface, the PLL and update the * SystemCoreClock variable. - * @param None - * @retval None */ void SystemInit (void) { @@ -218,8 +216,6 @@ void SystemInit (void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * @param None - * @retval None */ void SystemCoreClockUpdate (void) { @@ -279,8 +275,6 @@ void SystemCoreClockUpdate (void) * Called in SystemInit() function before jump to main. * This function configures the external SRAM mounted on STM32L152D_EVAL board * This SRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None */ void SystemInit_ExtMemCtl(void) { diff --git a/system/STM32L4xx/stm32l4xx_hal_conf_default.h b/system/STM32L4xx/stm32l4xx_hal_conf_default.h index 8ff6f2b862..ec45516301 100644 --- a/system/STM32L4xx/stm32l4xx_hal_conf_default.h +++ b/system/STM32L4xx/stm32l4xx_hal_conf_default.h @@ -545,10 +545,17 @@ in voltage and temperature.*/ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32L4xx/system_stm32l4xx.c b/system/STM32L4xx/system_stm32l4xx.c index de8de3e5a5..f2c93b676f 100644 --- a/system/STM32L4xx/system_stm32l4xx.c +++ b/system/STM32L4xx/system_stm32l4xx.c @@ -181,8 +181,6 @@ /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) @@ -264,9 +262,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32L5xx/stm32l5xx_hal_conf_default.h b/system/STM32L5xx/stm32l5xx_hal_conf_default.h index 0dee0f3ac7..bb3d514bc3 100644 --- a/system/STM32L5xx/stm32l5xx_hal_conf_default.h +++ b/system/STM32L5xx/stm32l5xx_hal_conf_default.h @@ -496,10 +496,17 @@ in voltage and temperature.*/ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32L5xx/system_stm32l5xx_ns.c b/system/STM32L5xx/system_stm32l5xx_ns.c index 126739e948..732ef0ff40 100644 --- a/system/STM32L5xx/system_stm32l5xx_ns.c +++ b/system/STM32L5xx/system_stm32l5xx_ns.c @@ -145,7 +145,6 @@ /** * @brief Setup the microcontroller system. - * @retval None */ void SystemInit(void) @@ -217,8 +216,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32MP1xx/stm32mp1xx_hal_conf_default.h b/system/STM32MP1xx/stm32mp1xx_hal_conf_default.h index a54cef6e56..84099c7642 100644 --- a/system/STM32MP1xx/stm32mp1xx_hal_conf_default.h +++ b/system/STM32MP1xx/stm32mp1xx_hal_conf_default.h @@ -380,14 +380,21 @@ #ifdef USE_FULL_ASSERT /** * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function + * @param expr If expr is false, it calls assert_failed function * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ + /** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t* file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32MP1xx/system_stm32mp1xx.c b/system/STM32MP1xx/system_stm32mp1xx.c index 6269868f5b..bd89e7c77d 100644 --- a/system/STM32MP1xx/system_stm32mp1xx.c +++ b/system/STM32MP1xx/system_stm32mp1xx.c @@ -127,8 +127,6 @@ * @brief Setup the microcontroller system * Initialize the FPU setting, vector table location and External memory * configuration. - * @param None - * @retval None */ void SystemInit (void) { @@ -196,9 +194,6 @@ void SystemInit (void) * * - The result of this function could be not correct when using * fractional value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate (void) { @@ -266,8 +261,6 @@ void SystemCoreClockUpdate (void) * Called in startup_stm32mp15xx.s before jump to main. * This function configures the external SRAM mounted on Eval boards * This SRAM will be used as program data memory (including heap and stack). - * @param None - * @retval None */ void SystemInit_ExtMemCtl(void) { diff --git a/system/STM32U0xx/stm32u0xx_hal_conf_default.h b/system/STM32U0xx/stm32u0xx_hal_conf_default.h index 824ee5d91d..c9ac93f8c2 100644 --- a/system/STM32U0xx/stm32u0xx_hal_conf_default.h +++ b/system/STM32U0xx/stm32u0xx_hal_conf_default.h @@ -367,14 +367,21 @@ The real value may vary depending on the variations in voltage and temperature.* #ifdef USE_FULL_ASSERT /** * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function + * @param expr If expr is false, it calls assert_failed function * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32U0xx/system_stm32u0xx.c b/system/STM32U0xx/system_stm32u0xx.c index b04d859aa1..9196bea525 100644 --- a/system/STM32U0xx/system_stm32u0xx.c +++ b/system/STM32U0xx/system_stm32u0xx.c @@ -155,8 +155,6 @@ const uint32_t MSIRangeTable[12] = {100000U, 200000U, 400000U, 800000U, 1 /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) @@ -224,9 +222,6 @@ uint32_t tmp_optr; * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32U3xx/stm32u3xx_hal_conf_default.h b/system/STM32U3xx/stm32u3xx_hal_conf_default.h index 036c7e1172..c882aeaf44 100644 --- a/system/STM32U3xx/stm32u3xx_hal_conf_default.h +++ b/system/STM32U3xx/stm32u3xx_hal_conf_default.h @@ -506,14 +506,21 @@ extern "C" { #ifdef USE_FULL_ASSERT /** * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function + * @param expr If expr is false, it calls assert_failed function * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32U3xx/system_stm32u3xx.c b/system/STM32U3xx/system_stm32u3xx.c index 9d59dba5cf..f8c10e6180 100644 --- a/system/STM32U3xx/system_stm32u3xx.c +++ b/system/STM32U3xx/system_stm32u3xx.c @@ -151,8 +151,6 @@ const uint8_t APBPrescTable[8] = {0U, 0U, 0U, 0U, 1U, 2U, 3U, 4U}; /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) { @@ -201,9 +199,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32U5xx/stm32u5xx_hal_conf_default.h b/system/STM32U5xx/stm32u5xx_hal_conf_default.h index 5f089108be..d3425276ab 100644 --- a/system/STM32U5xx/stm32u5xx_hal_conf_default.h +++ b/system/STM32U5xx/stm32u5xx_hal_conf_default.h @@ -610,14 +610,21 @@ vary depending on the variations in voltage and temperature.*/ #ifdef USE_FULL_ASSERT /** * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function + * @param expr If expr is false, it calls assert_failed function * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32U5xx/system_stm32u5xx.c b/system/STM32U5xx/system_stm32u5xx.c index 370ded8a65..f2407966d5 100644 --- a/system/STM32U5xx/system_stm32u5xx.c +++ b/system/STM32U5xx/system_stm32u5xx.c @@ -196,8 +196,6 @@ /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) @@ -271,9 +269,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32WB0x/stm32wb0x_hal_conf_default.h b/system/STM32WB0x/stm32wb0x_hal_conf_default.h index 5a499b3e0a..72013ecb63 100644 --- a/system/STM32WB0x/stm32wb0x_hal_conf_default.h +++ b/system/STM32WB0x/stm32wb0x_hal_conf_default.h @@ -298,10 +298,17 @@ in voltage and temperature.*/ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32WB0x/system_stm32wb0x.c b/system/STM32WB0x/system_stm32wb0x.c index 391d066b0e..a0ae3109e7 100644 --- a/system/STM32WB0x/system_stm32wb0x.c +++ b/system/STM32WB0x/system_stm32wb0x.c @@ -179,8 +179,6 @@ void CPUcontextRestore(void); /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) @@ -298,9 +296,6 @@ void SystemInit(void) * @note Each time the core clock (HCLK) changes, this function must be called * to update SystemCoreClock variable value. Otherwise, any configuration * based on this variable will be incorrect. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { @@ -331,8 +326,6 @@ void SystemCoreClockUpdate(void) /** * @brief Restores the saved CPU state before to enter in power save * by popping it from the stack - * @param None - * @retval None */ __WEAK void CPUcontextRestore(void) { diff --git a/system/STM32WBAxx/stm32wbaxx_hal_conf_default.h b/system/STM32WBAxx/stm32wbaxx_hal_conf_default.h index 34f17e1781..f9a68f1725 100644 --- a/system/STM32WBAxx/stm32wbaxx_hal_conf_default.h +++ b/system/STM32WBAxx/stm32wbaxx_hal_conf_default.h @@ -367,14 +367,21 @@ extern "C" { #ifdef USE_FULL_ASSERT /** * @brief The assert_param macro is used for function's parameters check. - * @param expr: If expr is false, it calls assert_failed function + * @param expr If expr is false, it calls assert_failed function * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32WBAxx/system_stm32wbaxx.c b/system/STM32WBAxx/system_stm32wbaxx.c index b51af4259a..75173bbc39 100644 --- a/system/STM32WBAxx/system_stm32wbaxx.c +++ b/system/STM32WBAxx/system_stm32wbaxx.c @@ -171,8 +171,6 @@ /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) @@ -299,9 +297,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32WBxx/stm32wbxx_hal_conf_default.h b/system/STM32WBxx/stm32wbxx_hal_conf_default.h index f07575ba3b..b235beff86 100644 --- a/system/STM32WBxx/stm32wbxx_hal_conf_default.h +++ b/system/STM32WBxx/stm32wbxx_hal_conf_default.h @@ -402,10 +402,17 @@ extern "C" { * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32WBxx/system_stm32wbxx.c b/system/STM32WBxx/system_stm32wbxx.c index 4013e0b923..e672557bb4 100644 --- a/system/STM32WBxx/system_stm32wbxx.c +++ b/system/STM32WBxx/system_stm32wbxx.c @@ -184,8 +184,6 @@ const uint32_t MSIRangeTable[16UL] = {100000UL, 200000UL, 400000UL, 800000UL, 10 /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) { @@ -274,9 +272,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/system/STM32WL3x/stm32wl3x_hal_conf_default.h b/system/STM32WL3x/stm32wl3x_hal_conf_default.h index 52c2cb79fe..eabd3b0b78 100644 --- a/system/STM32WL3x/stm32wl3x_hal_conf_default.h +++ b/system/STM32WL3x/stm32wl3x_hal_conf_default.h @@ -300,10 +300,17 @@ in voltage and temperature.*/ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ +/** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32WL3x/system_stm32wl3x.c b/system/STM32WL3x/system_stm32wl3x.c index 7bb1131c8d..913e2c7a58 100644 --- a/system/STM32WL3x/system_stm32wl3x.c +++ b/system/STM32WL3x/system_stm32wl3x.c @@ -179,8 +179,6 @@ void CPUcontextRestore(void); /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) { @@ -282,9 +280,6 @@ void SystemInit(void) * @note Each time the core clock (HCLK) changes, this function must be called * to update SystemCoreClock variable value. Otherwise, any configuration * based on this variable will be incorrect. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { @@ -321,8 +316,6 @@ void SystemCoreClockUpdate(void) /** * @brief Restores the saved CPU state before to enter in power save * by popping it from the stack - * @param None - * @retval None */ __WEAK void CPUcontextRestore(void) { diff --git a/system/STM32WLxx/stm32wlxx_hal_conf_default.h b/system/STM32WLxx/stm32wlxx_hal_conf_default.h index 793c3e3156..137d291ea1 100644 --- a/system/STM32WLxx/stm32wlxx_hal_conf_default.h +++ b/system/STM32WLxx/stm32wlxx_hal_conf_default.h @@ -379,10 +379,17 @@ * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. - * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ + /** + * @brief Reports the file and line of a failed assert_param() check. + * + * Called by assert_param() when USE_FULL_ASSERT is defined. The default + * implementation is weak and can be overridden by the application. + * @param file pointer to the source file name + * @param line source line number of the failed assert_param() check + */ void assert_failed(uint8_t* file, uint32_t line); #else #define assert_param(expr) ((void)0U) diff --git a/system/STM32WLxx/system_stm32wlxx.c b/system/STM32WLxx/system_stm32wlxx.c index ca733511a3..36cd0443eb 100644 --- a/system/STM32WLxx/system_stm32wlxx.c +++ b/system/STM32WLxx/system_stm32wlxx.c @@ -187,8 +187,6 @@ /** * @brief Setup the microcontroller system. - * @param None - * @retval None */ void SystemInit(void) { @@ -256,9 +254,6 @@ void SystemInit(void) * * - The result of this function could be not correct when using fractional * value for HSE crystal. - * - * @param None - * @retval None */ void SystemCoreClockUpdate(void) { diff --git a/variants/STM32C0xx/C011D6Y_C011F(4-6)(P-U)/generic_clock.c b/variants/STM32C0xx/C011D6Y_C011F(4-6)(P-U)/generic_clock.c index 4612786900..48142b16ad 100644 --- a/variants/STM32C0xx/C011D6Y_C011F(4-6)(P-U)/generic_clock.c +++ b/variants/STM32C0xx/C011D6Y_C011F(4-6)(P-U)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C011D6Y_C011F(4-6)(P-U)/variant_STM32C0116_DK.cpp b/variants/STM32C0xx/C011D6Y_C011F(4-6)(P-U)/variant_STM32C0116_DK.cpp index 74b7df7fed..fb1c95f9f0 100644 --- a/variants/STM32C0xx/C011D6Y_C011F(4-6)(P-U)/variant_STM32C0116_DK.cpp +++ b/variants/STM32C0xx/C011D6Y_C011F(4-6)(P-U)/variant_STM32C0116_DK.cpp @@ -62,8 +62,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C011J(4-6)M/generic_clock.c b/variants/STM32C0xx/C011J(4-6)M/generic_clock.c index 2d34f61d7c..5fa35fe618 100644 --- a/variants/STM32C0xx/C011J(4-6)M/generic_clock.c +++ b/variants/STM32C0xx/C011J(4-6)M/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C031C(4-6)(T-U)/generic_clock.c b/variants/STM32C0xx/C031C(4-6)(T-U)/generic_clock.c index 7432f3b741..76e3c0cca5 100644 --- a/variants/STM32C0xx/C031C(4-6)(T-U)/generic_clock.c +++ b/variants/STM32C0xx/C031C(4-6)(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C031C(4-6)(T-U)/variant_NUCLEO_C031C6.cpp b/variants/STM32C0xx/C031C(4-6)(T-U)/variant_NUCLEO_C031C6.cpp index 3faf51a2de..368ef4a397 100644 --- a/variants/STM32C0xx/C031C(4-6)(T-U)/variant_NUCLEO_C031C6.cpp +++ b/variants/STM32C0xx/C031C(4-6)(T-U)/variant_NUCLEO_C031C6.cpp @@ -110,8 +110,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C031C(4-6)(T-U)/variant_STM32C0316_DK.cpp b/variants/STM32C0xx/C031C(4-6)(T-U)/variant_STM32C0316_DK.cpp index d85996c7c3..8f0e970907 100644 --- a/variants/STM32C0xx/C031C(4-6)(T-U)/variant_STM32C0316_DK.cpp +++ b/variants/STM32C0xx/C031C(4-6)(T-U)/variant_STM32C0316_DK.cpp @@ -58,8 +58,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C031F(4-6)P/generic_clock.c b/variants/STM32C0xx/C031F(4-6)P/generic_clock.c index 376ec0bc63..01898fdabc 100644 --- a/variants/STM32C0xx/C031F(4-6)P/generic_clock.c +++ b/variants/STM32C0xx/C031F(4-6)P/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C031G(4-6)U/generic_clock.c b/variants/STM32C0xx/C031G(4-6)U/generic_clock.c index 52bf5c14b9..f7bba9d7f3 100644 --- a/variants/STM32C0xx/C031G(4-6)U/generic_clock.c +++ b/variants/STM32C0xx/C031G(4-6)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C031K(4-6)(T-U)/generic_clock.c b/variants/STM32C0xx/C031K(4-6)(T-U)/generic_clock.c index 9cb4c6ee4e..037ca554d7 100644 --- a/variants/STM32C0xx/C031K(4-6)(T-U)/generic_clock.c +++ b/variants/STM32C0xx/C031K(4-6)(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C051C(6-8)(T-U)/generic_clock.c b/variants/STM32C0xx/C051C(6-8)(T-U)/generic_clock.c index d72316b618..cf949204fd 100644 --- a/variants/STM32C0xx/C051C(6-8)(T-U)/generic_clock.c +++ b/variants/STM32C0xx/C051C(6-8)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C051D8Y_C051F(6-8)P/generic_clock.c b/variants/STM32C0xx/C051D8Y_C051F(6-8)P/generic_clock.c index acc129c4c5..c14e4eaac6 100644 --- a/variants/STM32C0xx/C051D8Y_C051F(6-8)P/generic_clock.c +++ b/variants/STM32C0xx/C051D8Y_C051F(6-8)P/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C051G(6-8)U/generic_clock.c b/variants/STM32C0xx/C051G(6-8)U/generic_clock.c index f48445578a..767f7c03a3 100644 --- a/variants/STM32C0xx/C051G(6-8)U/generic_clock.c +++ b/variants/STM32C0xx/C051G(6-8)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C051K6(T-U)_C051K8T/generic_clock.c b/variants/STM32C0xx/C051K6(T-U)_C051K8T/generic_clock.c index 7f52a45e30..85e12fe536 100644 --- a/variants/STM32C0xx/C051K6(T-U)_C051K8T/generic_clock.c +++ b/variants/STM32C0xx/C051K6(T-U)_C051K8T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C071C(8-B)(T-U)/generic_clock.c b/variants/STM32C0xx/C071C(8-B)(T-U)/generic_clock.c index 372db38933..e9a88dd524 100644 --- a/variants/STM32C0xx/C071C(8-B)(T-U)/generic_clock.c +++ b/variants/STM32C0xx/C071C(8-B)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C071C(8-B)(T-U)xN/generic_clock.c b/variants/STM32C0xx/C071C(8-B)(T-U)xN/generic_clock.c index c909763d19..e88a25627a 100644 --- a/variants/STM32C0xx/C071C(8-B)(T-U)xN/generic_clock.c +++ b/variants/STM32C0xx/C071C(8-B)(T-U)xN/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C071F(8-B)PxN/generic_clock.c b/variants/STM32C0xx/C071F(8-B)PxN/generic_clock.c index a9e4804c32..e09751d0f0 100644 --- a/variants/STM32C0xx/C071F(8-B)PxN/generic_clock.c +++ b/variants/STM32C0xx/C071F(8-B)PxN/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C071F8P_C071FB(P-Y)/generic_clock.c b/variants/STM32C0xx/C071F8P_C071FB(P-Y)/generic_clock.c index 97ffcdcd6b..cb4865acbd 100644 --- a/variants/STM32C0xx/C071F8P_C071FB(P-Y)/generic_clock.c +++ b/variants/STM32C0xx/C071F8P_C071FB(P-Y)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C071G(8-B)U/generic_clock.c b/variants/STM32C0xx/C071G(8-B)U/generic_clock.c index c20147de69..d677155788 100644 --- a/variants/STM32C0xx/C071G(8-B)U/generic_clock.c +++ b/variants/STM32C0xx/C071G(8-B)U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C071G(8-B)UxN/generic_clock.c b/variants/STM32C0xx/C071G(8-B)UxN/generic_clock.c index dfeb7d4c4f..9722f9a007 100644 --- a/variants/STM32C0xx/C071G(8-B)UxN/generic_clock.c +++ b/variants/STM32C0xx/C071G(8-B)UxN/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C071K(8-B)(T-U)/generic_clock.c b/variants/STM32C0xx/C071K(8-B)(T-U)/generic_clock.c index 5bed6cfb10..35555ac5c4 100644 --- a/variants/STM32C0xx/C071K(8-B)(T-U)/generic_clock.c +++ b/variants/STM32C0xx/C071K(8-B)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C071K(8-B)(T-U)xN/generic_clock.c b/variants/STM32C0xx/C071K(8-B)(T-U)xN/generic_clock.c index 4c4b900d19..fc969463bc 100644 --- a/variants/STM32C0xx/C071K(8-B)(T-U)xN/generic_clock.c +++ b/variants/STM32C0xx/C071K(8-B)(T-U)xN/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C071R(8-B)T/generic_clock.c b/variants/STM32C0xx/C071R(8-B)T/generic_clock.c index b38455c2b8..ad71e44b0c 100644 --- a/variants/STM32C0xx/C071R(8-B)T/generic_clock.c +++ b/variants/STM32C0xx/C071R(8-B)T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C071R(8-B)T/variant_NUCLEO_C071RB.cpp b/variants/STM32C0xx/C071R(8-B)T/variant_NUCLEO_C071RB.cpp index 584fd8b50b..c01ea56fbe 100644 --- a/variants/STM32C0xx/C071R(8-B)T/variant_NUCLEO_C071RB.cpp +++ b/variants/STM32C0xx/C071R(8-B)T/variant_NUCLEO_C071RB.cpp @@ -105,8 +105,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C071R8TxN_C071RB(I-T)xN/generic_clock.c b/variants/STM32C0xx/C071R8TxN_C071RB(I-T)xN/generic_clock.c index f24487e159..8dd6e4f702 100644 --- a/variants/STM32C0xx/C071R8TxN_C071RB(I-T)xN/generic_clock.c +++ b/variants/STM32C0xx/C071R8TxN_C071RB(I-T)xN/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C091C(B-C)(T-U)/generic_clock.c b/variants/STM32C0xx/C091C(B-C)(T-U)/generic_clock.c index 55d31f2262..38a60568cf 100644 --- a/variants/STM32C0xx/C091C(B-C)(T-U)/generic_clock.c +++ b/variants/STM32C0xx/C091C(B-C)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C091ECY_C091F(B-C)P/generic_clock.c b/variants/STM32C0xx/C091ECY_C091F(B-C)P/generic_clock.c index 297155644e..3d32e45eda 100644 --- a/variants/STM32C0xx/C091ECY_C091F(B-C)P/generic_clock.c +++ b/variants/STM32C0xx/C091ECY_C091F(B-C)P/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C091G(B-C)U/generic_clock.c b/variants/STM32C0xx/C091G(B-C)U/generic_clock.c index 8a2dbea33a..66710e4105 100644 --- a/variants/STM32C0xx/C091G(B-C)U/generic_clock.c +++ b/variants/STM32C0xx/C091G(B-C)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C091K(B-C)(T-U)/generic_clock.c b/variants/STM32C0xx/C091K(B-C)(T-U)/generic_clock.c index 7480bfd051..6ceaf71f82 100644 --- a/variants/STM32C0xx/C091K(B-C)(T-U)/generic_clock.c +++ b/variants/STM32C0xx/C091K(B-C)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C091RBT_C091RC(I-T)/generic_clock.c b/variants/STM32C0xx/C091RBT_C091RC(I-T)/generic_clock.c index c0e14c4289..2a0dc1441e 100644 --- a/variants/STM32C0xx/C091RBT_C091RC(I-T)/generic_clock.c +++ b/variants/STM32C0xx/C091RBT_C091RC(I-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C092C(B-C)(T-U)/generic_clock.c b/variants/STM32C0xx/C092C(B-C)(T-U)/generic_clock.c index acc8cb24e2..8997cc33eb 100644 --- a/variants/STM32C0xx/C092C(B-C)(T-U)/generic_clock.c +++ b/variants/STM32C0xx/C092C(B-C)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C092ECY_C092F(B-C)P/generic_clock.c b/variants/STM32C0xx/C092ECY_C092F(B-C)P/generic_clock.c index f88ee5cec2..b77b014b90 100644 --- a/variants/STM32C0xx/C092ECY_C092F(B-C)P/generic_clock.c +++ b/variants/STM32C0xx/C092ECY_C092F(B-C)P/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C092G(B-C)U/generic_clock.c b/variants/STM32C0xx/C092G(B-C)U/generic_clock.c index 3e3e7162b9..c72949c16d 100644 --- a/variants/STM32C0xx/C092G(B-C)U/generic_clock.c +++ b/variants/STM32C0xx/C092G(B-C)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C092K(B-C)(T-U)/generic_clock.c b/variants/STM32C0xx/C092K(B-C)(T-U)/generic_clock.c index 2f35caf569..09d895071d 100644 --- a/variants/STM32C0xx/C092K(B-C)(T-U)/generic_clock.c +++ b/variants/STM32C0xx/C092K(B-C)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C092RBT_C092RC(I-T)/generic_clock.c b/variants/STM32C0xx/C092RBT_C092RC(I-T)/generic_clock.c index c0f40abe42..e207a25bed 100644 --- a/variants/STM32C0xx/C092RBT_C092RC(I-T)/generic_clock.c +++ b/variants/STM32C0xx/C092RBT_C092RC(I-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C0xx/C092RBT_C092RC(I-T)/variant_NUCLEO_C092RC.cpp b/variants/STM32C0xx/C092RBT_C092RC(I-T)/variant_NUCLEO_C092RC.cpp index 1c3e91591e..8f3ccc9410 100644 --- a/variants/STM32C0xx/C092RBT_C092RC(I-T)/variant_NUCLEO_C092RC.cpp +++ b/variants/STM32C0xx/C092RBT_C092RC(I-T)/variant_NUCLEO_C092RC.cpp @@ -107,7 +107,6 @@ extern "C" { /** * @brief System Clock Configuration - * @retval None */ void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C531C(B-C)(T-U)/generic_clock.c b/variants/STM32C5xx/C531C(B-C)(T-U)/generic_clock.c index ff29099d9d..1252ba7ec3 100644 --- a/variants/STM32C5xx/C531C(B-C)(T-U)/generic_clock.c +++ b/variants/STM32C5xx/C531C(B-C)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C531E(B-C)U/generic_clock.c b/variants/STM32C5xx/C531E(B-C)U/generic_clock.c index 101a05d0a3..86fc189393 100644 --- a/variants/STM32C5xx/C531E(B-C)U/generic_clock.c +++ b/variants/STM32C5xx/C531E(B-C)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C531F(B-C)(P-U)/generic_clock.c b/variants/STM32C5xx/C531F(B-C)(P-U)/generic_clock.c index 4905224839..a2fc5aae0e 100644 --- a/variants/STM32C5xx/C531F(B-C)(P-U)/generic_clock.c +++ b/variants/STM32C5xx/C531F(B-C)(P-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C531K(B-C)T/generic_clock.c b/variants/STM32C5xx/C531K(B-C)T/generic_clock.c index 03032fa08c..e83cf17d17 100644 --- a/variants/STM32C5xx/C531K(B-C)T/generic_clock.c +++ b/variants/STM32C5xx/C531K(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C531K(B-C)U/generic_clock.c b/variants/STM32C5xx/C531K(B-C)U/generic_clock.c index 2786428896..d2d8c68f13 100644 --- a/variants/STM32C5xx/C531K(B-C)U/generic_clock.c +++ b/variants/STM32C5xx/C531K(B-C)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C531R(B-C)T/generic_clock.c b/variants/STM32C5xx/C531R(B-C)T/generic_clock.c index f4d9ea8ce5..4210dbfec9 100644 --- a/variants/STM32C5xx/C531R(B-C)T/generic_clock.c +++ b/variants/STM32C5xx/C531R(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C532C(B-C)(T-U)_C542CC(T-U)/generic_clock.c b/variants/STM32C5xx/C532C(B-C)(T-U)_C542CC(T-U)/generic_clock.c index e64313ace4..bc00cec840 100644 --- a/variants/STM32C5xx/C532C(B-C)(T-U)_C542CC(T-U)/generic_clock.c +++ b/variants/STM32C5xx/C532C(B-C)(T-U)_C542CC(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C532E(B-C)U_C542ECU/generic_clock.c b/variants/STM32C5xx/C532E(B-C)U_C542ECU/generic_clock.c index 48dda196a3..70f327665b 100644 --- a/variants/STM32C5xx/C532E(B-C)U_C542ECU/generic_clock.c +++ b/variants/STM32C5xx/C532E(B-C)U_C542ECU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C532F(B-C)(P-U)_C542FC(P-U)/generic_clock.c b/variants/STM32C5xx/C532F(B-C)(P-U)_C542FC(P-U)/generic_clock.c index 2f885d9af8..664c83103e 100644 --- a/variants/STM32C5xx/C532F(B-C)(P-U)_C542FC(P-U)/generic_clock.c +++ b/variants/STM32C5xx/C532F(B-C)(P-U)_C542FC(P-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C532K(B-C)T_C542KCT/generic_clock.c b/variants/STM32C5xx/C532K(B-C)T_C542KCT/generic_clock.c index 77db02f37e..d8ce4409db 100644 --- a/variants/STM32C5xx/C532K(B-C)T_C542KCT/generic_clock.c +++ b/variants/STM32C5xx/C532K(B-C)T_C542KCT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C532K(B-C)U_C542KCU/generic_clock.c b/variants/STM32C5xx/C532K(B-C)U_C542KCU/generic_clock.c index c344c02bad..5005508b10 100644 --- a/variants/STM32C5xx/C532K(B-C)U_C542KCU/generic_clock.c +++ b/variants/STM32C5xx/C532K(B-C)U_C542KCU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C532R(B-C)T_C542RCT/generic_clock.c b/variants/STM32C5xx/C532R(B-C)T_C542RCT/generic_clock.c index 408d1b7320..f24f028810 100644 --- a/variants/STM32C5xx/C532R(B-C)T_C542RCT/generic_clock.c +++ b/variants/STM32C5xx/C532R(B-C)T_C542RCT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C551C(C-E)(T-U)/generic_clock.c b/variants/STM32C5xx/C551C(C-E)(T-U)/generic_clock.c index b9df78cf32..a8a3786ab1 100644 --- a/variants/STM32C5xx/C551C(C-E)(T-U)/generic_clock.c +++ b/variants/STM32C5xx/C551C(C-E)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C551K(C-E)T/generic_clock.c b/variants/STM32C5xx/C551K(C-E)T/generic_clock.c index 0f939535b0..4af90de59b 100644 --- a/variants/STM32C5xx/C551K(C-E)T/generic_clock.c +++ b/variants/STM32C5xx/C551K(C-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C551K(C-E)U/generic_clock.c b/variants/STM32C5xx/C551K(C-E)U/generic_clock.c index 64f129405d..16e86344fa 100644 --- a/variants/STM32C5xx/C551K(C-E)U/generic_clock.c +++ b/variants/STM32C5xx/C551K(C-E)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C551M(C-E)T/generic_clock.c b/variants/STM32C5xx/C551M(C-E)T/generic_clock.c index 3ff53e8277..dfbfaa3474 100644 --- a/variants/STM32C5xx/C551M(C-E)T/generic_clock.c +++ b/variants/STM32C5xx/C551M(C-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C551R(C-E)Tx(J)/generic_clock.c b/variants/STM32C5xx/C551R(C-E)Tx(J)/generic_clock.c index 154683e3c8..a97cdbb8de 100644 --- a/variants/STM32C5xx/C551R(C-E)Tx(J)/generic_clock.c +++ b/variants/STM32C5xx/C551R(C-E)Tx(J)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C551V(C-E)T/generic_clock.c b/variants/STM32C5xx/C551V(C-E)T/generic_clock.c index dc3c8635f4..11fe33ee27 100644 --- a/variants/STM32C5xx/C551V(C-E)T/generic_clock.c +++ b/variants/STM32C5xx/C551V(C-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C552C(C-E)(T-U)_C562CE(T-U)/generic_clock.c b/variants/STM32C5xx/C552C(C-E)(T-U)_C562CE(T-U)/generic_clock.c index e449231e6f..94140e2cd8 100644 --- a/variants/STM32C5xx/C552C(C-E)(T-U)_C562CE(T-U)/generic_clock.c +++ b/variants/STM32C5xx/C552C(C-E)(T-U)_C562CE(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C552K(C-E)T_C562KET/generic_clock.c b/variants/STM32C5xx/C552K(C-E)T_C562KET/generic_clock.c index 2d00af1d55..4912059a83 100644 --- a/variants/STM32C5xx/C552K(C-E)T_C562KET/generic_clock.c +++ b/variants/STM32C5xx/C552K(C-E)T_C562KET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C552K(C-E)U_C562KEU/generic_clock.c b/variants/STM32C5xx/C552K(C-E)U_C562KEU/generic_clock.c index f69e4cb80b..7ce63de949 100644 --- a/variants/STM32C5xx/C552K(C-E)U_C562KEU/generic_clock.c +++ b/variants/STM32C5xx/C552K(C-E)U_C562KEU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C552M(C-E)T_C562MET/generic_clock.c b/variants/STM32C5xx/C552M(C-E)T_C562MET/generic_clock.c index 3a80be0295..83cedeec2a 100644 --- a/variants/STM32C5xx/C552M(C-E)T_C562MET/generic_clock.c +++ b/variants/STM32C5xx/C552M(C-E)T_C562MET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C552R(C-E)Tx(J)_C562RETx(J)/generic_clock.c b/variants/STM32C5xx/C552R(C-E)Tx(J)_C562RETx(J)/generic_clock.c index 795f421d81..b6c2eff834 100644 --- a/variants/STM32C5xx/C552R(C-E)Tx(J)_C562RETx(J)/generic_clock.c +++ b/variants/STM32C5xx/C552R(C-E)Tx(J)_C562RETx(J)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C552R(C-E)Tx(J)_C562RETx(J)/variant_NUCLEO_C562RE.cpp b/variants/STM32C5xx/C552R(C-E)Tx(J)_C562RETx(J)/variant_NUCLEO_C562RE.cpp index 4f0fef041b..5ba61cdb1a 100644 --- a/variants/STM32C5xx/C552R(C-E)Tx(J)_C562RETx(J)/variant_NUCLEO_C562RE.cpp +++ b/variants/STM32C5xx/C552R(C-E)Tx(J)_C562RETx(J)/variant_NUCLEO_C562RE.cpp @@ -97,7 +97,6 @@ extern "C" { /** * @brief System Clock Configuration - * @retval None */ void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C552V(C-E)T_C562VET/generic_clock.c b/variants/STM32C5xx/C552V(C-E)T_C562VET/generic_clock.c index 5b6feae807..92a9720bae 100644 --- a/variants/STM32C5xx/C552V(C-E)T_C562VET/generic_clock.c +++ b/variants/STM32C5xx/C552V(C-E)T_C562VET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C591C(E-G)(T-U)/generic_clock.c b/variants/STM32C5xx/C591C(E-G)(T-U)/generic_clock.c index d97765694f..c64356d398 100644 --- a/variants/STM32C5xx/C591C(E-G)(T-U)/generic_clock.c +++ b/variants/STM32C5xx/C591C(E-G)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C591K(E-G)T/generic_clock.c b/variants/STM32C5xx/C591K(E-G)T/generic_clock.c index 9502ab315f..2bd4eb04b7 100644 --- a/variants/STM32C5xx/C591K(E-G)T/generic_clock.c +++ b/variants/STM32C5xx/C591K(E-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C591K(E-G)U/generic_clock.c b/variants/STM32C5xx/C591K(E-G)U/generic_clock.c index 0542970591..75c4ee1a2f 100644 --- a/variants/STM32C5xx/C591K(E-G)U/generic_clock.c +++ b/variants/STM32C5xx/C591K(E-G)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C591M(E-G)T/generic_clock.c b/variants/STM32C5xx/C591M(E-G)T/generic_clock.c index d8a332545d..804973bdcf 100644 --- a/variants/STM32C5xx/C591M(E-G)T/generic_clock.c +++ b/variants/STM32C5xx/C591M(E-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C591R(E-G)T/generic_clock.c b/variants/STM32C5xx/C591R(E-G)T/generic_clock.c index fe6a80310b..dca99f52ae 100644 --- a/variants/STM32C5xx/C591R(E-G)T/generic_clock.c +++ b/variants/STM32C5xx/C591R(E-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C591V(E-G)T/generic_clock.c b/variants/STM32C5xx/C591V(E-G)T/generic_clock.c index ee9ca591eb..dbc558c2e7 100644 --- a/variants/STM32C5xx/C591V(E-G)T/generic_clock.c +++ b/variants/STM32C5xx/C591V(E-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C591Z(E-G)T/generic_clock.c b/variants/STM32C5xx/C591Z(E-G)T/generic_clock.c index 2271fe7d29..bacc669c18 100644 --- a/variants/STM32C5xx/C591Z(E-G)T/generic_clock.c +++ b/variants/STM32C5xx/C591Z(E-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/generic_clock.c b/variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/generic_clock.c index c71bbfee9c..f5367aaf07 100644 --- a/variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/generic_clock.c +++ b/variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/variant_XIAO_STM32C5.cpp b/variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/variant_XIAO_STM32C5.cpp index 69a1ddcf3a..566bd6a1c3 100644 --- a/variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/variant_XIAO_STM32C5.cpp +++ b/variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/variant_XIAO_STM32C5.cpp @@ -41,6 +41,9 @@ const pin_size_t analogInputPin[] = { D3 }; +/** + * @brief System Clock Configuration + */ extern "C" void SystemClock_Config(void) { if (HAL_RCC_HSE_Enable(HAL_RCC_HSE_ON) != HAL_OK) { diff --git a/variants/STM32C5xx/C593K(E-G)T_C5A3KGT/generic_clock.c b/variants/STM32C5xx/C593K(E-G)T_C5A3KGT/generic_clock.c index 2a73af4318..26d17b26c9 100644 --- a/variants/STM32C5xx/C593K(E-G)T_C5A3KGT/generic_clock.c +++ b/variants/STM32C5xx/C593K(E-G)T_C5A3KGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C593K(E-G)U_C5A3KGU/generic_clock.c b/variants/STM32C5xx/C593K(E-G)U_C5A3KGU/generic_clock.c index 9a5923aec8..f66342fc72 100644 --- a/variants/STM32C5xx/C593K(E-G)U_C5A3KGU/generic_clock.c +++ b/variants/STM32C5xx/C593K(E-G)U_C5A3KGU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C593M(E-G)T_C5A3MGT/generic_clock.c b/variants/STM32C5xx/C593M(E-G)T_C5A3MGT/generic_clock.c index 6b0044c4e9..e539970ef4 100644 --- a/variants/STM32C5xx/C593M(E-G)T_C5A3MGT/generic_clock.c +++ b/variants/STM32C5xx/C593M(E-G)T_C5A3MGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C593R(E-G)T_C5A3RGT/generic_clock.c b/variants/STM32C5xx/C593R(E-G)T_C5A3RGT/generic_clock.c index 18d2a799aa..a4d52c1bff 100644 --- a/variants/STM32C5xx/C593R(E-G)T_C5A3RGT/generic_clock.c +++ b/variants/STM32C5xx/C593R(E-G)T_C5A3RGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C593V(E-G)T_C5A3VGT/generic_clock.c b/variants/STM32C5xx/C593V(E-G)T_C5A3VGT/generic_clock.c index 0363f7f402..5d252e5fa0 100644 --- a/variants/STM32C5xx/C593V(E-G)T_C5A3VGT/generic_clock.c +++ b/variants/STM32C5xx/C593V(E-G)T_C5A3VGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32C5xx/C593Z(E-G)T_C5A3ZGT/generic_clock.c b/variants/STM32C5xx/C593Z(E-G)T_C5A3ZGT/generic_clock.c index 0ec4f59162..1eebbe4bfa 100644 --- a/variants/STM32C5xx/C593Z(E-G)T_C5A3ZGT/generic_clock.c +++ b/variants/STM32C5xx/C593Z(E-G)T_C5A3ZGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F030C6T/generic_clock.c b/variants/STM32F0xx/F030C6T/generic_clock.c index c1959f75d1..da831c3716 100644 --- a/variants/STM32F0xx/F030C6T/generic_clock.c +++ b/variants/STM32F0xx/F030C6T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F030C8T/generic_clock.c b/variants/STM32F0xx/F030C8T/generic_clock.c index cc592c8af2..9fb39c88df 100644 --- a/variants/STM32F0xx/F030C8T/generic_clock.c +++ b/variants/STM32F0xx/F030C8T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F030C8T/variant_EEXTR_F030_V1.cpp b/variants/STM32F0xx/F030C8T/variant_EEXTR_F030_V1.cpp index 138c3a086a..b9ecd63572 100644 --- a/variants/STM32F0xx/F030C8T/variant_EEXTR_F030_V1.cpp +++ b/variants/STM32F0xx/F030C8T/variant_EEXTR_F030_V1.cpp @@ -82,8 +82,6 @@ extern "C" { * PREDIV = 1 * PLLMUL = 3 * Flash Latency(WS) = 1 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F030CCT/generic_clock.c b/variants/STM32F0xx/F030CCT/generic_clock.c index a5ec8cfed6..f0d2d40691 100644 --- a/variants/STM32F0xx/F030CCT/generic_clock.c +++ b/variants/STM32F0xx/F030CCT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F030F4P/generic_clock.c b/variants/STM32F0xx/F030F4P/generic_clock.c index 6f1bb69025..cf6cd0eb42 100644 --- a/variants/STM32F0xx/F030F4P/generic_clock.c +++ b/variants/STM32F0xx/F030F4P/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F030F4P/variant_DEMO_F030F4.cpp b/variants/STM32F0xx/F030F4P/variant_DEMO_F030F4.cpp index 2d162f0cd2..7491ffadb7 100644 --- a/variants/STM32F0xx/F030F4P/variant_DEMO_F030F4.cpp +++ b/variants/STM32F0xx/F030F4P/variant_DEMO_F030F4.cpp @@ -67,8 +67,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F030K6T/generic_clock.c b/variants/STM32F0xx/F030K6T/generic_clock.c index 967accc1d6..59d46f8f52 100644 --- a/variants/STM32F0xx/F030K6T/generic_clock.c +++ b/variants/STM32F0xx/F030K6T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F030R8T/generic_clock.c b/variants/STM32F0xx/F030R8T/generic_clock.c index ec0e63fdd0..f9ef9a7129 100644 --- a/variants/STM32F0xx/F030R8T/generic_clock.c +++ b/variants/STM32F0xx/F030R8T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F030R8T/variant_DISCO_F030R8.cpp b/variants/STM32F0xx/F030R8T/variant_DISCO_F030R8.cpp index 8f14bb4faa..9afc89b035 100644 --- a/variants/STM32F0xx/F030R8T/variant_DISCO_F030R8.cpp +++ b/variants/STM32F0xx/F030R8T/variant_DISCO_F030R8.cpp @@ -103,8 +103,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F030R8T/variant_NUCLEO_F030R8.cpp b/variants/STM32F0xx/F030R8T/variant_NUCLEO_F030R8.cpp index e8aa39d827..bd9df04c7c 100644 --- a/variants/STM32F0xx/F030R8T/variant_NUCLEO_F030R8.cpp +++ b/variants/STM32F0xx/F030R8T/variant_NUCLEO_F030R8.cpp @@ -106,8 +106,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F030RCT/generic_clock.c b/variants/STM32F0xx/F030RCT/generic_clock.c index 6af275b2a9..333ee18b45 100644 --- a/variants/STM32F0xx/F030RCT/generic_clock.c +++ b/variants/STM32F0xx/F030RCT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F031C(4-6)T/generic_clock.c b/variants/STM32F0xx/F031C(4-6)T/generic_clock.c index e2521ff834..c2d55dbeb3 100644 --- a/variants/STM32F0xx/F031C(4-6)T/generic_clock.c +++ b/variants/STM32F0xx/F031C(4-6)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F031E6Y_F038E6Y/generic_clock.c b/variants/STM32F0xx/F031E6Y_F038E6Y/generic_clock.c index 10e9606d4b..38124d7993 100644 --- a/variants/STM32F0xx/F031E6Y_F038E6Y/generic_clock.c +++ b/variants/STM32F0xx/F031E6Y_F038E6Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F031F(4-6)P/generic_clock.c b/variants/STM32F0xx/F031F(4-6)P/generic_clock.c index d17b17d6f4..d065cd37c2 100644 --- a/variants/STM32F0xx/F031F(4-6)P/generic_clock.c +++ b/variants/STM32F0xx/F031F(4-6)P/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F031G(4-6)U/generic_clock.c b/variants/STM32F0xx/F031G(4-6)U/generic_clock.c index 92559c2e0b..26a4db3a71 100644 --- a/variants/STM32F0xx/F031G(4-6)U/generic_clock.c +++ b/variants/STM32F0xx/F031G(4-6)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F031K(4-6)U/generic_clock.c b/variants/STM32F0xx/F031K(4-6)U/generic_clock.c index aea2e1bad6..a33b21a624 100644 --- a/variants/STM32F0xx/F031K(4-6)U/generic_clock.c +++ b/variants/STM32F0xx/F031K(4-6)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F031K6T/generic_clock.c b/variants/STM32F0xx/F031K6T/generic_clock.c index 26af09763e..50fedc91cc 100644 --- a/variants/STM32F0xx/F031K6T/generic_clock.c +++ b/variants/STM32F0xx/F031K6T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F031K6T/variant_NUCLEO_F031K6.cpp b/variants/STM32F0xx/F031K6T/variant_NUCLEO_F031K6.cpp index e58b6aa6c7..ffe8e58d90 100644 --- a/variants/STM32F0xx/F031K6T/variant_NUCLEO_F031K6.cpp +++ b/variants/STM32F0xx/F031K6T/variant_NUCLEO_F031K6.cpp @@ -62,8 +62,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F038C6T/generic_clock.c b/variants/STM32F0xx/F038C6T/generic_clock.c index 194921ec80..4af493135e 100644 --- a/variants/STM32F0xx/F038C6T/generic_clock.c +++ b/variants/STM32F0xx/F038C6T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F038F6P/generic_clock.c b/variants/STM32F0xx/F038F6P/generic_clock.c index a2739ee788..000f721b2c 100644 --- a/variants/STM32F0xx/F038F6P/generic_clock.c +++ b/variants/STM32F0xx/F038F6P/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F038G6U/generic_clock.c b/variants/STM32F0xx/F038G6U/generic_clock.c index 4528f6fc8e..3105b3fa55 100644 --- a/variants/STM32F0xx/F038G6U/generic_clock.c +++ b/variants/STM32F0xx/F038G6U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F038K6U/generic_clock.c b/variants/STM32F0xx/F038K6U/generic_clock.c index d3c801f958..0b11854124 100644 --- a/variants/STM32F0xx/F038K6U/generic_clock.c +++ b/variants/STM32F0xx/F038K6U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F042C(4-6)(T-U)/generic_clock.c b/variants/STM32F0xx/F042C(4-6)(T-U)/generic_clock.c index 0534eb3601..2316befa22 100644 --- a/variants/STM32F0xx/F042C(4-6)(T-U)/generic_clock.c +++ b/variants/STM32F0xx/F042C(4-6)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F042F(4-6)P/generic_clock.c b/variants/STM32F0xx/F042F(4-6)P/generic_clock.c index 827cff809b..82f8d3abfd 100644 --- a/variants/STM32F0xx/F042F(4-6)P/generic_clock.c +++ b/variants/STM32F0xx/F042F(4-6)P/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F042G(4-6)U/generic_clock.c b/variants/STM32F0xx/F042G(4-6)U/generic_clock.c index ec4854fb12..8c4be6549c 100644 --- a/variants/STM32F0xx/F042G(4-6)U/generic_clock.c +++ b/variants/STM32F0xx/F042G(4-6)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F042K(4-6)T/generic_clock.c b/variants/STM32F0xx/F042K(4-6)T/generic_clock.c index 236887de1e..c3376d1405 100644 --- a/variants/STM32F0xx/F042K(4-6)T/generic_clock.c +++ b/variants/STM32F0xx/F042K(4-6)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F042K(4-6)T/variant_NUCLEO_F042K6.cpp b/variants/STM32F0xx/F042K(4-6)T/variant_NUCLEO_F042K6.cpp index 9e17813bfe..cb95b89477 100644 --- a/variants/STM32F0xx/F042K(4-6)T/variant_NUCLEO_F042K6.cpp +++ b/variants/STM32F0xx/F042K(4-6)T/variant_NUCLEO_F042K6.cpp @@ -65,8 +65,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F042K(4-6)U/generic_clock.c b/variants/STM32F0xx/F042K(4-6)U/generic_clock.c index 021aaf16da..e4c9a4a0e6 100644 --- a/variants/STM32F0xx/F042K(4-6)U/generic_clock.c +++ b/variants/STM32F0xx/F042K(4-6)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F042T6Y/generic_clock.c b/variants/STM32F0xx/F042T6Y/generic_clock.c index 345d7fad20..d6ce11d5ae 100644 --- a/variants/STM32F0xx/F042T6Y/generic_clock.c +++ b/variants/STM32F0xx/F042T6Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F048C6U/generic_clock.c b/variants/STM32F0xx/F048C6U/generic_clock.c index 896b874512..aa473e86b2 100644 --- a/variants/STM32F0xx/F048C6U/generic_clock.c +++ b/variants/STM32F0xx/F048C6U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F048G6U/generic_clock.c b/variants/STM32F0xx/F048G6U/generic_clock.c index dad0c887f5..b97f15e93a 100644 --- a/variants/STM32F0xx/F048G6U/generic_clock.c +++ b/variants/STM32F0xx/F048G6U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F048T6Y/generic_clock.c b/variants/STM32F0xx/F048T6Y/generic_clock.c index c0fcb7fbfd..23e2d363bd 100644 --- a/variants/STM32F0xx/F048T6Y/generic_clock.c +++ b/variants/STM32F0xx/F048T6Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F051C4(T-U)/generic_clock.c b/variants/STM32F0xx/F051C4(T-U)/generic_clock.c index 67e0b7948a..eda43b3245 100644 --- a/variants/STM32F0xx/F051C4(T-U)/generic_clock.c +++ b/variants/STM32F0xx/F051C4(T-U)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F051C6(T-U)/generic_clock.c b/variants/STM32F0xx/F051C6(T-U)/generic_clock.c index a978cf3392..b79c6d2d7f 100644 --- a/variants/STM32F0xx/F051C6(T-U)/generic_clock.c +++ b/variants/STM32F0xx/F051C6(T-U)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F051C8(T-U)/generic_clock.c b/variants/STM32F0xx/F051C8(T-U)/generic_clock.c index e576e51e76..ea61fd2f74 100644 --- a/variants/STM32F0xx/F051C8(T-U)/generic_clock.c +++ b/variants/STM32F0xx/F051C8(T-U)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F051K(6-8)T/generic_clock.c b/variants/STM32F0xx/F051K(6-8)T/generic_clock.c index e6ad015750..f375f882c5 100644 --- a/variants/STM32F0xx/F051K(6-8)T/generic_clock.c +++ b/variants/STM32F0xx/F051K(6-8)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F051K(6-8)U/generic_clock.c b/variants/STM32F0xx/F051K(6-8)U/generic_clock.c index 98eac189fa..a2b2ba3c27 100644 --- a/variants/STM32F0xx/F051K(6-8)U/generic_clock.c +++ b/variants/STM32F0xx/F051K(6-8)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F051K(6-8)U/variant_WRAITH32_V1.cpp b/variants/STM32F0xx/F051K(6-8)U/variant_WRAITH32_V1.cpp index f4c4ddab38..2412fc10ed 100644 --- a/variants/STM32F0xx/F051K(6-8)U/variant_WRAITH32_V1.cpp +++ b/variants/STM32F0xx/F051K(6-8)U/variant_WRAITH32_V1.cpp @@ -67,8 +67,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F051K4T/generic_clock.c b/variants/STM32F0xx/F051K4T/generic_clock.c index af2ef76c62..beb17f7aed 100644 --- a/variants/STM32F0xx/F051K4T/generic_clock.c +++ b/variants/STM32F0xx/F051K4T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F051K4U/generic_clock.c b/variants/STM32F0xx/F051K4U/generic_clock.c index 78ca736dc1..d77b586652 100644 --- a/variants/STM32F0xx/F051K4U/generic_clock.c +++ b/variants/STM32F0xx/F051K4U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F051R4T/generic_clock.c b/variants/STM32F0xx/F051R4T/generic_clock.c index c21566fc7d..82951c386b 100644 --- a/variants/STM32F0xx/F051R4T/generic_clock.c +++ b/variants/STM32F0xx/F051R4T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F051R6T/generic_clock.c b/variants/STM32F0xx/F051R6T/generic_clock.c index 6131f991e9..7706d60fff 100644 --- a/variants/STM32F0xx/F051R6T/generic_clock.c +++ b/variants/STM32F0xx/F051R6T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F051R8(H-T)/generic_clock.c b/variants/STM32F0xx/F051R8(H-T)/generic_clock.c index cac8670173..bea7ec0bdd 100644 --- a/variants/STM32F0xx/F051R8(H-T)/generic_clock.c +++ b/variants/STM32F0xx/F051R8(H-T)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F051T8Y/generic_clock.c b/variants/STM32F0xx/F051T8Y/generic_clock.c index b15e1c91cd..a706b93189 100644 --- a/variants/STM32F0xx/F051T8Y/generic_clock.c +++ b/variants/STM32F0xx/F051T8Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F058C8U/generic_clock.c b/variants/STM32F0xx/F058C8U/generic_clock.c index 65b542f06a..975d3bef18 100644 --- a/variants/STM32F0xx/F058C8U/generic_clock.c +++ b/variants/STM32F0xx/F058C8U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F058R8(H-T)/generic_clock.c b/variants/STM32F0xx/F058R8(H-T)/generic_clock.c index 4631037919..587eea2961 100644 --- a/variants/STM32F0xx/F058R8(H-T)/generic_clock.c +++ b/variants/STM32F0xx/F058R8(H-T)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F058T8Y/generic_clock.c b/variants/STM32F0xx/F058T8Y/generic_clock.c index d06ad2a977..180a16a4a5 100644 --- a/variants/STM32F0xx/F058T8Y/generic_clock.c +++ b/variants/STM32F0xx/F058T8Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F070C6T/generic_clock.c b/variants/STM32F0xx/F070C6T/generic_clock.c index d3e5b6699d..c76e2eb06c 100644 --- a/variants/STM32F0xx/F070C6T/generic_clock.c +++ b/variants/STM32F0xx/F070C6T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F070CBT/generic_clock.c b/variants/STM32F0xx/F070CBT/generic_clock.c index d066642e0a..4d55af7fff 100644 --- a/variants/STM32F0xx/F070CBT/generic_clock.c +++ b/variants/STM32F0xx/F070CBT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F070CBT/startup_Mx00_f070xb.S b/variants/STM32F0xx/F070CBT/startup_Mx00_f070xb.S index d42b22a4eb..0f42782f51 100644 --- a/variants/STM32F0xx/F070CBT/startup_Mx00_f070xb.S +++ b/variants/STM32F0xx/F070CBT/startup_Mx00_f070xb.S @@ -123,7 +123,6 @@ LoopForever: * unexpected interrupt. This simply enters an infinite loop, preserving * the system state for examination by a debugger. * - * @param None * @retval : None */ .section .text.Default_Handler,"ax",%progbits diff --git a/variants/STM32F0xx/F070CBT/variant_MALYANMx00_F070CB.cpp b/variants/STM32F0xx/F070CBT/variant_MALYANMx00_F070CB.cpp index 205d6e7906..267746e4b3 100644 --- a/variants/STM32F0xx/F070CBT/variant_MALYANMx00_F070CB.cpp +++ b/variants/STM32F0xx/F070CBT/variant_MALYANMx00_F070CB.cpp @@ -114,8 +114,6 @@ void initVariant() * Flash Latency(WS) = 2 * ADC Prescaler = 6 * USB Prescaler = 1.5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F070F6P/generic_clock.c b/variants/STM32F0xx/F070F6P/generic_clock.c index 513cc2db0a..852ddc433d 100644 --- a/variants/STM32F0xx/F070F6P/generic_clock.c +++ b/variants/STM32F0xx/F070F6P/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F070RBT/generic_clock.c b/variants/STM32F0xx/F070RBT/generic_clock.c index 34cc073296..863c8ad94a 100644 --- a/variants/STM32F0xx/F070RBT/generic_clock.c +++ b/variants/STM32F0xx/F070RBT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F070RBT/variant_NUCLEO_F070RB.cpp b/variants/STM32F0xx/F070RBT/variant_NUCLEO_F070RB.cpp index 4b6d5fe3bf..83ecec49ec 100644 --- a/variants/STM32F0xx/F070RBT/variant_NUCLEO_F070RB.cpp +++ b/variants/STM32F0xx/F070RBT/variant_NUCLEO_F070RB.cpp @@ -99,8 +99,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F071C8(T-U)_F071CB(T-U-Y)/generic_clock.c b/variants/STM32F0xx/F071C8(T-U)_F071CB(T-U-Y)/generic_clock.c index b41bb788cb..72e5ccfcb4 100644 --- a/variants/STM32F0xx/F071C8(T-U)_F071CB(T-U-Y)/generic_clock.c +++ b/variants/STM32F0xx/F071C8(T-U)_F071CB(T-U-Y)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F071RBT/generic_clock.c b/variants/STM32F0xx/F071RBT/generic_clock.c index 15b7d39453..582b5b9fc0 100644 --- a/variants/STM32F0xx/F071RBT/generic_clock.c +++ b/variants/STM32F0xx/F071RBT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F071V(8-B)(H-T)/generic_clock.c b/variants/STM32F0xx/F071V(8-B)(H-T)/generic_clock.c index a2dc8dddda..cf3ac5b691 100644 --- a/variants/STM32F0xx/F071V(8-B)(H-T)/generic_clock.c +++ b/variants/STM32F0xx/F071V(8-B)(H-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F072C8(T-U)_F072CB(T-U-Y)/generic_clock.c b/variants/STM32F0xx/F072C8(T-U)_F072CB(T-U-Y)/generic_clock.c index c02e82a26b..2d217a4699 100644 --- a/variants/STM32F0xx/F072C8(T-U)_F072CB(T-U-Y)/generic_clock.c +++ b/variants/STM32F0xx/F072C8(T-U)_F072CB(T-U-Y)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F072C8(T-U)_F072CB(T-U-Y)/variant_ELEKTOR_F072Cx.cpp b/variants/STM32F0xx/F072C8(T-U)_F072CB(T-U-Y)/variant_ELEKTOR_F072Cx.cpp index 9acffaf7a9..f839bb571b 100644 --- a/variants/STM32F0xx/F072C8(T-U)_F072CB(T-U-Y)/variant_ELEKTOR_F072Cx.cpp +++ b/variants/STM32F0xx/F072C8(T-U)_F072CB(T-U-Y)/variant_ELEKTOR_F072Cx.cpp @@ -65,8 +65,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/generic_clock.c b/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/generic_clock.c index fc187d9992..81f4b07794 100644 --- a/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/generic_clock.c +++ b/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/variant_DISCO_F072RB.cpp b/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/variant_DISCO_F072RB.cpp index ed6cb53349..7dda4f503e 100644 --- a/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/variant_DISCO_F072RB.cpp +++ b/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/variant_DISCO_F072RB.cpp @@ -118,8 +118,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/variant_NUCLEO_F072RB.cpp b/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/variant_NUCLEO_F072RB.cpp index 943734011d..4203bcf40c 100644 --- a/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/variant_NUCLEO_F072RB.cpp +++ b/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/variant_NUCLEO_F072RB.cpp @@ -102,8 +102,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/variant_PYBSTICK26_DUINO.cpp b/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/variant_PYBSTICK26_DUINO.cpp index c9a7ebf45e..363da68aaa 100644 --- a/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/variant_PYBSTICK26_DUINO.cpp +++ b/variants/STM32F0xx/F072R8T_F072RB(H-I-T)/variant_PYBSTICK26_DUINO.cpp @@ -70,8 +70,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F072V(8-B)(H-T)/generic_clock.c b/variants/STM32F0xx/F072V(8-B)(H-T)/generic_clock.c index a5b84ab962..7ba3059352 100644 --- a/variants/STM32F0xx/F072V(8-B)(H-T)/generic_clock.c +++ b/variants/STM32F0xx/F072V(8-B)(H-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F078CB(T-U-Y)/generic_clock.c b/variants/STM32F0xx/F078CB(T-U-Y)/generic_clock.c index b32b237928..e6b7a694d1 100644 --- a/variants/STM32F0xx/F078CB(T-U-Y)/generic_clock.c +++ b/variants/STM32F0xx/F078CB(T-U-Y)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F078RB(H-T)/generic_clock.c b/variants/STM32F0xx/F078RB(H-T)/generic_clock.c index 2ed663d85c..0f89c08da0 100644 --- a/variants/STM32F0xx/F078RB(H-T)/generic_clock.c +++ b/variants/STM32F0xx/F078RB(H-T)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F078VB(H-T)/generic_clock.c b/variants/STM32F0xx/F078VB(H-T)/generic_clock.c index 355a88380d..ad1cae7d2e 100644 --- a/variants/STM32F0xx/F078VB(H-T)/generic_clock.c +++ b/variants/STM32F0xx/F078VB(H-T)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F091C(B-C)(T-U)/generic_clock.c b/variants/STM32F0xx/F091C(B-C)(T-U)/generic_clock.c index 8be79a74c8..1d930c4859 100644 --- a/variants/STM32F0xx/F091C(B-C)(T-U)/generic_clock.c +++ b/variants/STM32F0xx/F091C(B-C)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F091RBT_F091RC(H-T-Y)/generic_clock.c b/variants/STM32F0xx/F091RBT_F091RC(H-T-Y)/generic_clock.c index 8a1a1cbaf2..a7a3293dc6 100644 --- a/variants/STM32F0xx/F091RBT_F091RC(H-T-Y)/generic_clock.c +++ b/variants/STM32F0xx/F091RBT_F091RC(H-T-Y)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F091RBT_F091RC(H-T-Y)/variant_NUCLEO_F091RC.cpp b/variants/STM32F0xx/F091RBT_F091RC(H-T-Y)/variant_NUCLEO_F091RC.cpp index 55bce10ad8..c22938a9f0 100644 --- a/variants/STM32F0xx/F091RBT_F091RC(H-T-Y)/variant_NUCLEO_F091RC.cpp +++ b/variants/STM32F0xx/F091RBT_F091RC(H-T-Y)/variant_NUCLEO_F091RC.cpp @@ -103,8 +103,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F091VBT_F091VC(H-T)/generic_clock.c b/variants/STM32F0xx/F091VBT_F091VC(H-T)/generic_clock.c index c6c2991208..803125dbc8 100644 --- a/variants/STM32F0xx/F091VBT_F091VC(H-T)/generic_clock.c +++ b/variants/STM32F0xx/F091VBT_F091VC(H-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F098CC(T-U)/generic_clock.c b/variants/STM32F0xx/F098CC(T-U)/generic_clock.c index cf461214df..5ede554b3a 100644 --- a/variants/STM32F0xx/F098CC(T-U)/generic_clock.c +++ b/variants/STM32F0xx/F098CC(T-U)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F098RC(H-T-Y)/generic_clock.c b/variants/STM32F0xx/F098RC(H-T-Y)/generic_clock.c index b7f9367a24..1e34588d21 100644 --- a/variants/STM32F0xx/F098RC(H-T-Y)/generic_clock.c +++ b/variants/STM32F0xx/F098RC(H-T-Y)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F0xx/F098VC(H-T)/generic_clock.c b/variants/STM32F0xx/F098VC(H-T)/generic_clock.c index 1c00d6ec2b..f555bcd1c2 100644 --- a/variants/STM32F0xx/F098VC(H-T)/generic_clock.c +++ b/variants/STM32F0xx/F098VC(H-T)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F100C(4-6)T/generic_clock.c b/variants/STM32F1xx/F100C(4-6)T/generic_clock.c index 7c3a9fe121..e7989e3601 100644 --- a/variants/STM32F1xx/F100C(4-6)T/generic_clock.c +++ b/variants/STM32F1xx/F100C(4-6)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F100C(8-B)T/generic_clock.c b/variants/STM32F1xx/F100C(8-B)T/generic_clock.c index 4261419b81..b178cfc975 100644 --- a/variants/STM32F1xx/F100C(8-B)T/generic_clock.c +++ b/variants/STM32F1xx/F100C(8-B)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F100R(4-6)H/generic_clock.c b/variants/STM32F1xx/F100R(4-6)H/generic_clock.c index cbe7418ae2..1fb7554e78 100644 --- a/variants/STM32F1xx/F100R(4-6)H/generic_clock.c +++ b/variants/STM32F1xx/F100R(4-6)H/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F100R(4-6)T/generic_clock.c b/variants/STM32F1xx/F100R(4-6)T/generic_clock.c index 550789c850..71eb15d161 100644 --- a/variants/STM32F1xx/F100R(4-6)T/generic_clock.c +++ b/variants/STM32F1xx/F100R(4-6)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F100R(8-B)H/generic_clock.c b/variants/STM32F1xx/F100R(8-B)H/generic_clock.c index 9178a7644b..34947b81f4 100644 --- a/variants/STM32F1xx/F100R(8-B)H/generic_clock.c +++ b/variants/STM32F1xx/F100R(8-B)H/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F100R(8-B)T/generic_clock.c b/variants/STM32F1xx/F100R(8-B)T/generic_clock.c index 221914b88b..7e3fcb2876 100644 --- a/variants/STM32F1xx/F100R(8-B)T/generic_clock.c +++ b/variants/STM32F1xx/F100R(8-B)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F100R(8-B)T/variant_DISCO_F100RB.cpp b/variants/STM32F1xx/F100R(8-B)T/variant_DISCO_F100RB.cpp index b5cd5875b0..6aa5bbd103 100644 --- a/variants/STM32F1xx/F100R(8-B)T/variant_DISCO_F100RB.cpp +++ b/variants/STM32F1xx/F100R(8-B)T/variant_DISCO_F100RB.cpp @@ -107,8 +107,6 @@ extern "C" { * PLL_Mul = 6 * Flash Latency(WS) = 0 * ADC Prescaler = 2 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F100R(C-D-E)T/generic_clock.c b/variants/STM32F1xx/F100R(C-D-E)T/generic_clock.c index d5796aec5e..0b8cfc2e61 100644 --- a/variants/STM32F1xx/F100R(C-D-E)T/generic_clock.c +++ b/variants/STM32F1xx/F100R(C-D-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F100V(8-B)T/generic_clock.c b/variants/STM32F1xx/F100V(8-B)T/generic_clock.c index c591e14bd9..2a05561ff3 100644 --- a/variants/STM32F1xx/F100V(8-B)T/generic_clock.c +++ b/variants/STM32F1xx/F100V(8-B)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F100V(C-D-E)T/generic_clock.c b/variants/STM32F1xx/F100V(C-D-E)T/generic_clock.c index 6fd720bd2e..7c3427c9dc 100644 --- a/variants/STM32F1xx/F100V(C-D-E)T/generic_clock.c +++ b/variants/STM32F1xx/F100V(C-D-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F100Z(C-D-E)T/generic_clock.c b/variants/STM32F1xx/F100Z(C-D-E)T/generic_clock.c index d7dc68a297..977373c236 100644 --- a/variants/STM32F1xx/F100Z(C-D-E)T/generic_clock.c +++ b/variants/STM32F1xx/F100Z(C-D-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101C(4-6)T/generic_clock.c b/variants/STM32F1xx/F101C(4-6)T/generic_clock.c index 8dc7fe0611..c92175f9c6 100644 --- a/variants/STM32F1xx/F101C(4-6)T/generic_clock.c +++ b/variants/STM32F1xx/F101C(4-6)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101C(8-B)(T-U)/generic_clock.c b/variants/STM32F1xx/F101C(8-B)(T-U)/generic_clock.c index 373fceb4cf..64d76b094b 100644 --- a/variants/STM32F1xx/F101C(8-B)(T-U)/generic_clock.c +++ b/variants/STM32F1xx/F101C(8-B)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101R(4-6)T/generic_clock.c b/variants/STM32F1xx/F101R(4-6)T/generic_clock.c index d4bc7049e7..aa8b4fb7dd 100644 --- a/variants/STM32F1xx/F101R(4-6)T/generic_clock.c +++ b/variants/STM32F1xx/F101R(4-6)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101R(8-B)T/generic_clock.c b/variants/STM32F1xx/F101R(8-B)T/generic_clock.c index 85fecd5c3b..fa114cc225 100644 --- a/variants/STM32F1xx/F101R(8-B)T/generic_clock.c +++ b/variants/STM32F1xx/F101R(8-B)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101R(C-D-E)T/generic_clock.c b/variants/STM32F1xx/F101R(C-D-E)T/generic_clock.c index 87bb9c0888..aeb4106933 100644 --- a/variants/STM32F1xx/F101R(C-D-E)T/generic_clock.c +++ b/variants/STM32F1xx/F101R(C-D-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101R(F-G)T/generic_clock.c b/variants/STM32F1xx/F101R(F-G)T/generic_clock.c index 187ef0a73d..38fba086f6 100644 --- a/variants/STM32F1xx/F101R(F-G)T/generic_clock.c +++ b/variants/STM32F1xx/F101R(F-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101RBH/generic_clock.c b/variants/STM32F1xx/F101RBH/generic_clock.c index 9244279d6c..ce18930900 100644 --- a/variants/STM32F1xx/F101RBH/generic_clock.c +++ b/variants/STM32F1xx/F101RBH/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101T(4-6)U/generic_clock.c b/variants/STM32F1xx/F101T(4-6)U/generic_clock.c index 62fee9339c..a1f7b9402c 100644 --- a/variants/STM32F1xx/F101T(4-6)U/generic_clock.c +++ b/variants/STM32F1xx/F101T(4-6)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101T(8-B)U/generic_clock.c b/variants/STM32F1xx/F101T(8-B)U/generic_clock.c index 3b28d2605c..6ff47d0c65 100644 --- a/variants/STM32F1xx/F101T(8-B)U/generic_clock.c +++ b/variants/STM32F1xx/F101T(8-B)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101V(8-B)T/generic_clock.c b/variants/STM32F1xx/F101V(8-B)T/generic_clock.c index bb4fd4352f..15e36ebbf5 100644 --- a/variants/STM32F1xx/F101V(8-B)T/generic_clock.c +++ b/variants/STM32F1xx/F101V(8-B)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101V(C-D-E)T/generic_clock.c b/variants/STM32F1xx/F101V(C-D-E)T/generic_clock.c index 671c45f852..1249f3e791 100644 --- a/variants/STM32F1xx/F101V(C-D-E)T/generic_clock.c +++ b/variants/STM32F1xx/F101V(C-D-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101V(F-G)T/generic_clock.c b/variants/STM32F1xx/F101V(F-G)T/generic_clock.c index 462fa4768f..67e45939d5 100644 --- a/variants/STM32F1xx/F101V(F-G)T/generic_clock.c +++ b/variants/STM32F1xx/F101V(F-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101Z(C-D-E)T/generic_clock.c b/variants/STM32F1xx/F101Z(C-D-E)T/generic_clock.c index b8ef65c65e..59cb792db7 100644 --- a/variants/STM32F1xx/F101Z(C-D-E)T/generic_clock.c +++ b/variants/STM32F1xx/F101Z(C-D-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F101Z(F-G)T/generic_clock.c b/variants/STM32F1xx/F101Z(F-G)T/generic_clock.c index d76ed3a395..dda5d50edc 100644 --- a/variants/STM32F1xx/F101Z(F-G)T/generic_clock.c +++ b/variants/STM32F1xx/F101Z(F-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F102C(4-6)T/generic_clock.c b/variants/STM32F1xx/F102C(4-6)T/generic_clock.c index 75c747243d..75c1da34e8 100644 --- a/variants/STM32F1xx/F102C(4-6)T/generic_clock.c +++ b/variants/STM32F1xx/F102C(4-6)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F102C(8-B)T/generic_clock.c b/variants/STM32F1xx/F102C(8-B)T/generic_clock.c index 4cc91b9450..c4573794c2 100644 --- a/variants/STM32F1xx/F102C(8-B)T/generic_clock.c +++ b/variants/STM32F1xx/F102C(8-B)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F102R(4-6)T/generic_clock.c b/variants/STM32F1xx/F102R(4-6)T/generic_clock.c index fdf80cefd1..082d41db60 100644 --- a/variants/STM32F1xx/F102R(4-6)T/generic_clock.c +++ b/variants/STM32F1xx/F102R(4-6)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F102R(8-B)T/generic_clock.c b/variants/STM32F1xx/F102R(8-B)T/generic_clock.c index 4a3b40985f..f8e4355195 100644 --- a/variants/STM32F1xx/F102R(8-B)T/generic_clock.c +++ b/variants/STM32F1xx/F102R(8-B)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F103C4T_F103C6(T-U)/generic_clock.c b/variants/STM32F1xx/F103C4T_F103C6(T-U)/generic_clock.c index 41d290ea23..3924f56c28 100644 --- a/variants/STM32F1xx/F103C4T_F103C6(T-U)/generic_clock.c +++ b/variants/STM32F1xx/F103C4T_F103C6(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103C4T_F103C6(T-U)/variant_BLUEPILL_F103C6.cpp b/variants/STM32F1xx/F103C4T_F103C6(T-U)/variant_BLUEPILL_F103C6.cpp index 6226313db0..726d9f1078 100644 --- a/variants/STM32F1xx/F103C4T_F103C6(T-U)/variant_BLUEPILL_F103C6.cpp +++ b/variants/STM32F1xx/F103C4T_F103C6(T-U)/variant_BLUEPILL_F103C6.cpp @@ -89,8 +89,6 @@ extern "C" { * Flash Latency(WS) = 2 * ADC Prescaler = 6 * USB Prescaler = 1.5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/generic_clock.c b/variants/STM32F1xx/F103C8T_F103CB(T-U)/generic_clock.c index c7069fe781..cf0828bd5d 100644 --- a/variants/STM32F1xx/F103C8T_F103CB(T-U)/generic_clock.c +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/startup_M200_f103xb.S b/variants/STM32F1xx/F103C8T_F103CB(T-U)/startup_M200_f103xb.S index 19ba3f0799..c60e080ce7 100644 --- a/variants/STM32F1xx/F103C8T_F103CB(T-U)/startup_M200_f103xb.S +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/startup_M200_f103xb.S @@ -70,7 +70,6 @@ defined in linker script */ * starts execution following a reset event. Only the absolutely * necessary set is performed, after which the application * supplied main() routine is called. - * @param None * @retval : None */ @@ -134,7 +133,6 @@ cpsie f * unexpected interrupt. This simply enters an infinite loop, preserving * the system state for examination by a debugger. * - * @param None * @retval : None */ .section .text.Default_Handler,"ax",%progbits diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_AFROFLIGHT_F103CB.cpp b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_AFROFLIGHT_F103CB.cpp index 1fc7032a19..61e1968000 100644 --- a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_AFROFLIGHT_F103CB.cpp +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_AFROFLIGHT_F103CB.cpp @@ -74,8 +74,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp index fa1dd4b38f..0998eb3ad8 100644 --- a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_DATABOARD.cpp @@ -89,8 +89,6 @@ extern "C" { * Flash Latency(WS) = 2 * ADC Prescaler = 6 * USB Prescaler = 1.5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_MALYANM200_F103CB.cpp b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_MALYANM200_F103CB.cpp index 36509f03c8..727d74dd16 100644 --- a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_MALYANM200_F103CB.cpp +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_MALYANM200_F103CB.cpp @@ -90,8 +90,6 @@ extern "C" { * Flash Latency(WS) = 2 * ADC Prescaler = 6 * USB Prescaler = 1.5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_MAPLEMINI_F103CB.cpp b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_MAPLEMINI_F103CB.cpp index 0113c6c6d0..fa2f014d16 100644 --- a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_MAPLEMINI_F103CB.cpp +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_MAPLEMINI_F103CB.cpp @@ -89,8 +89,6 @@ extern "C" { * Flash Latency(WS) = 2 * ADC Prescaler = 6 * USB Prescaler = 1.5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_PILL_F103Cx.cpp b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_PILL_F103Cx.cpp index 6dba8773a4..0889a8b076 100644 --- a/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_PILL_F103Cx.cpp +++ b/variants/STM32F1xx/F103C8T_F103CB(T-U)/variant_PILL_F103Cx.cpp @@ -89,8 +89,6 @@ extern "C" { * Flash Latency(WS) = 2 * ADC Prescaler = 6 * USB Prescaler = 1.5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F103R(4-6)H/generic_clock.c b/variants/STM32F1xx/F103R(4-6)H/generic_clock.c index 74ee360bd7..9b9828a457 100644 --- a/variants/STM32F1xx/F103R(4-6)H/generic_clock.c +++ b/variants/STM32F1xx/F103R(4-6)H/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103R(4-6)T/generic_clock.c b/variants/STM32F1xx/F103R(4-6)T/generic_clock.c index 5d09142016..5e14f2eba2 100644 --- a/variants/STM32F1xx/F103R(4-6)T/generic_clock.c +++ b/variants/STM32F1xx/F103R(4-6)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103R(8-B)H/generic_clock.c b/variants/STM32F1xx/F103R(8-B)H/generic_clock.c index 1530fe142d..5f7356e31d 100644 --- a/variants/STM32F1xx/F103R(8-B)H/generic_clock.c +++ b/variants/STM32F1xx/F103R(8-B)H/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103R(8-B)T/generic_clock.c b/variants/STM32F1xx/F103R(8-B)T/generic_clock.c index 602a9ed39d..64278ead3d 100644 --- a/variants/STM32F1xx/F103R(8-B)T/generic_clock.c +++ b/variants/STM32F1xx/F103R(8-B)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103R(8-B)T/variant_BLUEBUTTON_F103RxT.cpp b/variants/STM32F1xx/F103R(8-B)T/variant_BLUEBUTTON_F103RxT.cpp index 2ef1f5cf96..def8309fad 100644 --- a/variants/STM32F1xx/F103R(8-B)T/variant_BLUEBUTTON_F103RxT.cpp +++ b/variants/STM32F1xx/F103R(8-B)T/variant_BLUEBUTTON_F103RxT.cpp @@ -95,8 +95,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F103R(8-B)T/variant_NUCLEO_F103RB.cpp b/variants/STM32F1xx/F103R(8-B)T/variant_NUCLEO_F103RB.cpp index 2662563f8b..78ced380b2 100644 --- a/variants/STM32F1xx/F103R(8-B)T/variant_NUCLEO_F103RB.cpp +++ b/variants/STM32F1xx/F103R(8-B)T/variant_NUCLEO_F103RB.cpp @@ -112,8 +112,6 @@ extern "C" { * PLL_Mul = 16 * Flash Latency(WS) = 2 * ADC Prescaler = 6 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F103R(C-D-E)T/generic_clock.c b/variants/STM32F1xx/F103R(C-D-E)T/generic_clock.c index 6821647e49..ad79ed4603 100644 --- a/variants/STM32F1xx/F103R(C-D-E)T/generic_clock.c +++ b/variants/STM32F1xx/F103R(C-D-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103R(C-D-E)T/variant_BLUEBUTTON_F103RxT.cpp b/variants/STM32F1xx/F103R(C-D-E)T/variant_BLUEBUTTON_F103RxT.cpp index d47c845a6e..2b62a2ed6e 100644 --- a/variants/STM32F1xx/F103R(C-D-E)T/variant_BLUEBUTTON_F103RxT.cpp +++ b/variants/STM32F1xx/F103R(C-D-E)T/variant_BLUEBUTTON_F103RxT.cpp @@ -95,8 +95,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F103R(C-D-E)T/variant_STORM32_V1_31_RC.cpp b/variants/STM32F1xx/F103R(C-D-E)T/variant_STORM32_V1_31_RC.cpp index 8daa8801eb..e3936c5e10 100644 --- a/variants/STM32F1xx/F103R(C-D-E)T/variant_STORM32_V1_31_RC.cpp +++ b/variants/STM32F1xx/F103R(C-D-E)T/variant_STORM32_V1_31_RC.cpp @@ -95,10 +95,11 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ +/** + * @brief System Clock Configuration + */ void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32F1xx/F103R(C-D-E)Y/generic_clock.c b/variants/STM32F1xx/F103R(C-D-E)Y/generic_clock.c index 683abf043d..84ba6e6d5e 100644 --- a/variants/STM32F1xx/F103R(C-D-E)Y/generic_clock.c +++ b/variants/STM32F1xx/F103R(C-D-E)Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103R(F-G)T/generic_clock.c b/variants/STM32F1xx/F103R(F-G)T/generic_clock.c index 2af5b6a256..95cececd7d 100644 --- a/variants/STM32F1xx/F103R(F-G)T/generic_clock.c +++ b/variants/STM32F1xx/F103R(F-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103T(4-6)U/generic_clock.c b/variants/STM32F1xx/F103T(4-6)U/generic_clock.c index 7d5fabe2ae..a7fd067e22 100644 --- a/variants/STM32F1xx/F103T(4-6)U/generic_clock.c +++ b/variants/STM32F1xx/F103T(4-6)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103T(8-B)U/generic_clock.c b/variants/STM32F1xx/F103T(8-B)U/generic_clock.c index c8eeee593d..dd230e2de8 100644 --- a/variants/STM32F1xx/F103T(8-B)U/generic_clock.c +++ b/variants/STM32F1xx/F103T(8-B)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103T(8-B)U/variant_HY_TINYSTM103TB.cpp b/variants/STM32F1xx/F103T(8-B)U/variant_HY_TINYSTM103TB.cpp index 67dc80c66b..9a2c7e3084 100644 --- a/variants/STM32F1xx/F103T(8-B)U/variant_HY_TINYSTM103TB.cpp +++ b/variants/STM32F1xx/F103T(8-B)U/variant_HY_TINYSTM103TB.cpp @@ -83,8 +83,6 @@ extern "C" { * Flash Latency(WS) = 2 * ADC Prescaler = 6 * USB Prescaler = 1.5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F103V(C-D-E)(H-T)/generic_clock.c b/variants/STM32F1xx/F103V(C-D-E)(H-T)/generic_clock.c index 4966ada1df..cd4d63df16 100644 --- a/variants/STM32F1xx/F103V(C-D-E)(H-T)/generic_clock.c +++ b/variants/STM32F1xx/F103V(C-D-E)(H-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103V(F-G)T/generic_clock.c b/variants/STM32F1xx/F103V(F-G)T/generic_clock.c index 1a4e98f47d..704b7ae1fa 100644 --- a/variants/STM32F1xx/F103V(F-G)T/generic_clock.c +++ b/variants/STM32F1xx/F103V(F-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103V8(H-T)_F103VB(H-I-T)/generic_clock.c b/variants/STM32F1xx/F103V8(H-T)_F103VB(H-I-T)/generic_clock.c index 4a1d7279df..b3c35ae095 100644 --- a/variants/STM32F1xx/F103V8(H-T)_F103VB(H-I-T)/generic_clock.c +++ b/variants/STM32F1xx/F103V8(H-T)_F103VB(H-I-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103Z(C-D-E)(H-T)/generic_clock.c b/variants/STM32F1xx/F103Z(C-D-E)(H-T)/generic_clock.c index ed7dcc2f88..d77e434e8b 100644 --- a/variants/STM32F1xx/F103Z(C-D-E)(H-T)/generic_clock.c +++ b/variants/STM32F1xx/F103Z(C-D-E)(H-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F103Z(C-D-E)(H-T)/variant_VCCGND_F103ZET6_XXX.cpp b/variants/STM32F1xx/F103Z(C-D-E)(H-T)/variant_VCCGND_F103ZET6_XXX.cpp index 2a07432560..2341a823ee 100644 --- a/variants/STM32F1xx/F103Z(C-D-E)(H-T)/variant_VCCGND_F103ZET6_XXX.cpp +++ b/variants/STM32F1xx/F103Z(C-D-E)(H-T)/variant_VCCGND_F103ZET6_XXX.cpp @@ -165,6 +165,9 @@ const pin_size_t analogInputPin[] = { extern "C" { #endif +/** + * @brief System Clock Configuration + */ WEAK void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32F1xx/F103Z(F-G)(H-T)/generic_clock.c b/variants/STM32F1xx/F103Z(F-G)(H-T)/generic_clock.c index bae69561a7..ff9ac36dd0 100644 --- a/variants/STM32F1xx/F103Z(F-G)(H-T)/generic_clock.c +++ b/variants/STM32F1xx/F103Z(F-G)(H-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F1xx/F105R(8-B-C)T/generic_clock.c b/variants/STM32F1xx/F105R(8-B-C)T/generic_clock.c index 3e93d05fb7..c0f05edeb7 100644 --- a/variants/STM32F1xx/F105R(8-B-C)T/generic_clock.c +++ b/variants/STM32F1xx/F105R(8-B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F105V(8-B)(H-T)_F105VCT/generic_clock.c b/variants/STM32F1xx/F105V(8-B)(H-T)_F105VCT/generic_clock.c index b76cfe4018..a642ad092c 100644 --- a/variants/STM32F1xx/F105V(8-B)(H-T)_F105VCT/generic_clock.c +++ b/variants/STM32F1xx/F105V(8-B)(H-T)_F105VCT/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F107R(B-C)T/generic_clock.c b/variants/STM32F1xx/F107R(B-C)T/generic_clock.c index 63f19a595f..bfb621b8b8 100644 --- a/variants/STM32F1xx/F107R(B-C)T/generic_clock.c +++ b/variants/STM32F1xx/F107R(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F1xx/F107VBT_F107VC(H-T)/generic_clock.c b/variants/STM32F1xx/F107VBT_F107VC(H-T)/generic_clock.c index 194b6dd7da..4ea40377dd 100644 --- a/variants/STM32F1xx/F107VBT_F107VC(H-T)/generic_clock.c +++ b/variants/STM32F1xx/F107VBT_F107VC(H-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F2xx/F205RE(T-Y)_F205R(B-C-F)T_F205RG(E-T-Y)_F215R(E-G)T/generic_clock.c b/variants/STM32F2xx/F205RE(T-Y)_F205R(B-C-F)T_F205RG(E-T-Y)_F215R(E-G)T/generic_clock.c index 197011a006..d52bdf3e55 100644 --- a/variants/STM32F2xx/F205RE(T-Y)_F205R(B-C-F)T_F205RG(E-T-Y)_F215R(E-G)T/generic_clock.c +++ b/variants/STM32F2xx/F205RE(T-Y)_F205R(B-C-F)T_F205RG(E-T-Y)_F215R(E-G)T/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F2xx/F205V(B-C-E-F-G)T_F215V(E-G)T/generic_clock.c b/variants/STM32F2xx/F205V(B-C-E-F-G)T_F215V(E-G)T/generic_clock.c index 77eaba905e..b6526f0725 100644 --- a/variants/STM32F2xx/F205V(B-C-E-F-G)T_F215V(E-G)T/generic_clock.c +++ b/variants/STM32F2xx/F205V(B-C-E-F-G)T_F215V(E-G)T/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F2xx/F205Z(C-E-F-G)T_F215Z(E-G)T/generic_clock.c b/variants/STM32F2xx/F205Z(C-E-F-G)T_F215Z(E-G)T/generic_clock.c index a91d222256..f3172f01d8 100644 --- a/variants/STM32F2xx/F205Z(C-E-F-G)T_F215Z(E-G)T/generic_clock.c +++ b/variants/STM32F2xx/F205Z(C-E-F-G)T_F215Z(E-G)T/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F2xx/F207I(C-E-F-G)(H-T)_F217I(E-G)(H-T)/generic_clock.c b/variants/STM32F2xx/F207I(C-E-F-G)(H-T)_F217I(E-G)(H-T)/generic_clock.c index 697297aaa1..3344e7581b 100644 --- a/variants/STM32F2xx/F207I(C-E-F-G)(H-T)_F217I(E-G)(H-T)/generic_clock.c +++ b/variants/STM32F2xx/F207I(C-E-F-G)(H-T)_F217I(E-G)(H-T)/generic_clock.c @@ -20,8 +20,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F2xx/F207V(C-E-F-G)T_F217V(E-G)T/generic_clock.c b/variants/STM32F2xx/F207V(C-E-F-G)T_F217V(E-G)T/generic_clock.c index b2bab76778..faccf89646 100644 --- a/variants/STM32F2xx/F207V(C-E-F-G)T_F217V(E-G)T/generic_clock.c +++ b/variants/STM32F2xx/F207V(C-E-F-G)T_F217V(E-G)T/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F2xx/F207Z(C-E-F-G)T_F217Z(E-G)T/generic_clock.c b/variants/STM32F2xx/F207Z(C-E-F-G)T_F217Z(E-G)T/generic_clock.c index 64389c421b..dbdd0768ba 100644 --- a/variants/STM32F2xx/F207Z(C-E-F-G)T_F217Z(E-G)T/generic_clock.c +++ b/variants/STM32F2xx/F207Z(C-E-F-G)T_F217Z(E-G)T/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F2xx/F207Z(C-E-F-G)T_F217Z(E-G)T/variant_NUCLEO_F207ZG.cpp b/variants/STM32F2xx/F207Z(C-E-F-G)T_F217Z(E-G)T/variant_NUCLEO_F207ZG.cpp index 134fa7c1d8..4b3a7890db 100644 --- a/variants/STM32F2xx/F207Z(C-E-F-G)T_F217Z(E-G)T/variant_NUCLEO_F207ZG.cpp +++ b/variants/STM32F2xx/F207Z(C-E-F-G)T_F217Z(E-G)T/variant_NUCLEO_F207ZG.cpp @@ -173,8 +173,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F301C6T_F301C8(T-Y)/generic_clock.c b/variants/STM32F3xx/F301C6T_F301C8(T-Y)/generic_clock.c index bb8c2b9f49..73e6215573 100644 --- a/variants/STM32F3xx/F301C6T_F301C8(T-Y)/generic_clock.c +++ b/variants/STM32F3xx/F301C6T_F301C8(T-Y)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F301K(6-8)T/generic_clock.c b/variants/STM32F3xx/F301K(6-8)T/generic_clock.c index ecdf716ad1..5256d2ae29 100644 --- a/variants/STM32F3xx/F301K(6-8)T/generic_clock.c +++ b/variants/STM32F3xx/F301K(6-8)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F301K(6-8)U/generic_clock.c b/variants/STM32F3xx/F301K(6-8)U/generic_clock.c index fb621f779a..5330568cbd 100644 --- a/variants/STM32F3xx/F301K(6-8)U/generic_clock.c +++ b/variants/STM32F3xx/F301K(6-8)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F301R(6-8)T/generic_clock.c b/variants/STM32F3xx/F301R(6-8)T/generic_clock.c index 69e748db89..f53d5d9888 100644 --- a/variants/STM32F3xx/F301R(6-8)T/generic_clock.c +++ b/variants/STM32F3xx/F301R(6-8)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F302C(B-C)T/generic_clock.c b/variants/STM32F3xx/F302C(B-C)T/generic_clock.c index 315e48291e..31db123257 100644 --- a/variants/STM32F3xx/F302C(B-C)T/generic_clock.c +++ b/variants/STM32F3xx/F302C(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F302C6T_F302C8(T-Y)/generic_clock.c b/variants/STM32F3xx/F302C6T_F302C8(T-Y)/generic_clock.c index 650b0eff44..96d8d23f2e 100644 --- a/variants/STM32F3xx/F302C6T_F302C8(T-Y)/generic_clock.c +++ b/variants/STM32F3xx/F302C6T_F302C8(T-Y)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F302K(6-8)U/generic_clock.c b/variants/STM32F3xx/F302K(6-8)U/generic_clock.c index f80910d212..7ef20bf891 100644 --- a/variants/STM32F3xx/F302K(6-8)U/generic_clock.c +++ b/variants/STM32F3xx/F302K(6-8)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F302R(6-8)T/generic_clock.c b/variants/STM32F3xx/F302R(6-8)T/generic_clock.c index e686f76270..24624458e0 100644 --- a/variants/STM32F3xx/F302R(6-8)T/generic_clock.c +++ b/variants/STM32F3xx/F302R(6-8)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F3xx/F302R(6-8)T/variant_NUCLEO_F302R8.cpp b/variants/STM32F3xx/F302R(6-8)T/variant_NUCLEO_F302R8.cpp index e3019aa02e..03ddca9d17 100644 --- a/variants/STM32F3xx/F302R(6-8)T/variant_NUCLEO_F302R8.cpp +++ b/variants/STM32F3xx/F302R(6-8)T/variant_NUCLEO_F302R8.cpp @@ -103,8 +103,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F302R(B-C)T/generic_clock.c b/variants/STM32F3xx/F302R(B-C)T/generic_clock.c index dc5e1f4842..188476d54d 100644 --- a/variants/STM32F3xx/F302R(B-C)T/generic_clock.c +++ b/variants/STM32F3xx/F302R(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F302R(D-E)T/generic_clock.c b/variants/STM32F3xx/F302R(D-E)T/generic_clock.c index 87fb0be355..8c04185449 100644 --- a/variants/STM32F3xx/F302R(D-E)T/generic_clock.c +++ b/variants/STM32F3xx/F302R(D-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F302V(B-C)T/generic_clock.c b/variants/STM32F3xx/F302V(B-C)T/generic_clock.c index 98e28371ba..9bea3b3fcd 100644 --- a/variants/STM32F3xx/F302V(B-C)T/generic_clock.c +++ b/variants/STM32F3xx/F302V(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F302V(D-E)(H-T)/generic_clock.c b/variants/STM32F3xx/F302V(D-E)(H-T)/generic_clock.c index 63c8358c73..399f763efb 100644 --- a/variants/STM32F3xx/F302V(D-E)(H-T)/generic_clock.c +++ b/variants/STM32F3xx/F302V(D-E)(H-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F302VCY/generic_clock.c b/variants/STM32F3xx/F302VCY/generic_clock.c index 369598f57f..96183365a5 100644 --- a/variants/STM32F3xx/F302VCY/generic_clock.c +++ b/variants/STM32F3xx/F302VCY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F302Z(D-E)T/generic_clock.c b/variants/STM32F3xx/F302Z(D-E)T/generic_clock.c index 505a068bcc..b60d2ae076 100644 --- a/variants/STM32F3xx/F302Z(D-E)T/generic_clock.c +++ b/variants/STM32F3xx/F302Z(D-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303C(6-8)T_F334C(4-6-8)T/generic_clock.c b/variants/STM32F3xx/F303C(6-8)T_F334C(4-6-8)T/generic_clock.c index dbb580fe65..88958a6e27 100644 --- a/variants/STM32F3xx/F303C(6-8)T_F334C(4-6-8)T/generic_clock.c +++ b/variants/STM32F3xx/F303C(6-8)T_F334C(4-6-8)T/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303C(B-C)T/generic_clock.c b/variants/STM32F3xx/F303C(B-C)T/generic_clock.c index 54c86cd35e..3adac9f469 100644 --- a/variants/STM32F3xx/F303C(B-C)T/generic_clock.c +++ b/variants/STM32F3xx/F303C(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F3xx/F303C(B-C)T/variant_BLACKPILL_F303CC.cpp b/variants/STM32F3xx/F303C(B-C)T/variant_BLACKPILL_F303CC.cpp index 553ddf082b..587c6fa0e3 100644 --- a/variants/STM32F3xx/F303C(B-C)T/variant_BLACKPILL_F303CC.cpp +++ b/variants/STM32F3xx/F303C(B-C)T/variant_BLACKPILL_F303CC.cpp @@ -80,6 +80,9 @@ const pin_size_t analogInputPin[] = { extern "C" { #endif +/** + * @brief System Clock Configuration + */ WEAK void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32F3xx/F303C(B-C)T/variant_SPARKY_F303CC.cpp b/variants/STM32F3xx/F303C(B-C)T/variant_SPARKY_F303CC.cpp index 5d95028d61..2c31e9323c 100644 --- a/variants/STM32F3xx/F303C(B-C)T/variant_SPARKY_F303CC.cpp +++ b/variants/STM32F3xx/F303C(B-C)T/variant_SPARKY_F303CC.cpp @@ -79,6 +79,9 @@ const pin_size_t analogInputPin[] = { extern "C" { #endif +/** + * @brief System Clock Configuration + */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303C8Y_F334C8Y/generic_clock.c b/variants/STM32F3xx/F303C8Y_F334C8Y/generic_clock.c index 96dc2d32c6..c55b270659 100644 --- a/variants/STM32F3xx/F303C8Y_F334C8Y/generic_clock.c +++ b/variants/STM32F3xx/F303C8Y_F334C8Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303K(6-8)T_F334K(4-6-8)T/generic_clock.c b/variants/STM32F3xx/F303K(6-8)T_F334K(4-6-8)T/generic_clock.c index 0d0a86e784..cece63d296 100644 --- a/variants/STM32F3xx/F303K(6-8)T_F334K(4-6-8)T/generic_clock.c +++ b/variants/STM32F3xx/F303K(6-8)T_F334K(4-6-8)T/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F3xx/F303K(6-8)T_F334K(4-6-8)T/variant_NUCLEO_F303K8.cpp b/variants/STM32F3xx/F303K(6-8)T_F334K(4-6-8)T/variant_NUCLEO_F303K8.cpp index 95bc2d7929..ea2a483146 100644 --- a/variants/STM32F3xx/F303K(6-8)T_F334K(4-6-8)T/variant_NUCLEO_F303K8.cpp +++ b/variants/STM32F3xx/F303K(6-8)T_F334K(4-6-8)T/variant_NUCLEO_F303K8.cpp @@ -64,8 +64,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303K(6-8)U_F334K(4-6-8)U/generic_clock.c b/variants/STM32F3xx/F303K(6-8)U_F334K(4-6-8)U/generic_clock.c index 04d1fd5eba..07e9695f0d 100644 --- a/variants/STM32F3xx/F303K(6-8)U_F334K(4-6-8)U/generic_clock.c +++ b/variants/STM32F3xx/F303K(6-8)U_F334K(4-6-8)U/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303R(6-8)T_F334R(6-8)T/generic_clock.c b/variants/STM32F3xx/F303R(6-8)T_F334R(6-8)T/generic_clock.c index 283050665f..588d29f423 100644 --- a/variants/STM32F3xx/F303R(6-8)T_F334R(6-8)T/generic_clock.c +++ b/variants/STM32F3xx/F303R(6-8)T_F334R(6-8)T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303R(6-8)T_F334R(6-8)T/variant_NUCLEO_F334R8.cpp b/variants/STM32F3xx/F303R(6-8)T_F334R(6-8)T/variant_NUCLEO_F334R8.cpp index f08113e58a..53e9a42f5c 100644 --- a/variants/STM32F3xx/F303R(6-8)T_F334R(6-8)T/variant_NUCLEO_F334R8.cpp +++ b/variants/STM32F3xx/F303R(6-8)T_F334R(6-8)T/variant_NUCLEO_F334R8.cpp @@ -107,8 +107,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303R(B-C)T/generic_clock.c b/variants/STM32F3xx/F303R(B-C)T/generic_clock.c index 076364d1bb..19b69837df 100644 --- a/variants/STM32F3xx/F303R(B-C)T/generic_clock.c +++ b/variants/STM32F3xx/F303R(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F3xx/F303R(B-C)T/variant_OLIMEXINO_STM32F3.cpp b/variants/STM32F3xx/F303R(B-C)T/variant_OLIMEXINO_STM32F3.cpp index dfeecdb59e..4cd6de6512 100644 --- a/variants/STM32F3xx/F303R(B-C)T/variant_OLIMEXINO_STM32F3.cpp +++ b/variants/STM32F3xx/F303R(B-C)T/variant_OLIMEXINO_STM32F3.cpp @@ -94,6 +94,9 @@ const pin_size_t analogInputPin[] = { extern "C" { #endif +/** + * @brief System Clock Configuration + */ WEAK void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32F3xx/F303R(D-E)T/generic_clock.c b/variants/STM32F3xx/F303R(D-E)T/generic_clock.c index dc6db9a62b..ad4864e27e 100644 --- a/variants/STM32F3xx/F303R(D-E)T/generic_clock.c +++ b/variants/STM32F3xx/F303R(D-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303R(D-E)T/variant_NUCLEO_F303RE.cpp b/variants/STM32F3xx/F303R(D-E)T/variant_NUCLEO_F303RE.cpp index d3dda73fa4..f21b9e09a8 100644 --- a/variants/STM32F3xx/F303R(D-E)T/variant_NUCLEO_F303RE.cpp +++ b/variants/STM32F3xx/F303R(D-E)T/variant_NUCLEO_F303RE.cpp @@ -108,8 +108,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303V(B-C)T/generic_clock.c b/variants/STM32F3xx/F303V(B-C)T/generic_clock.c index 6419eb4249..d619881049 100644 --- a/variants/STM32F3xx/F303V(B-C)T/generic_clock.c +++ b/variants/STM32F3xx/F303V(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) #if defined(USBCON) diff --git a/variants/STM32F3xx/F303V(D-E)(H-T)/generic_clock.c b/variants/STM32F3xx/F303V(D-E)(H-T)/generic_clock.c index 200c413e4b..ad10a76b45 100644 --- a/variants/STM32F3xx/F303V(D-E)(H-T)/generic_clock.c +++ b/variants/STM32F3xx/F303V(D-E)(H-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303VCY/generic_clock.c b/variants/STM32F3xx/F303VCY/generic_clock.c index 35f58d6f31..06a48c5b11 100644 --- a/variants/STM32F3xx/F303VCY/generic_clock.c +++ b/variants/STM32F3xx/F303VCY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303VEY/generic_clock.c b/variants/STM32F3xx/F303VEY/generic_clock.c index 15495d5948..b5746a9bb7 100644 --- a/variants/STM32F3xx/F303VEY/generic_clock.c +++ b/variants/STM32F3xx/F303VEY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F303Z(D-E)T/generic_clock.c b/variants/STM32F3xx/F303Z(D-E)T/generic_clock.c index 9dd9a9f583..dcf804c58e 100644 --- a/variants/STM32F3xx/F303Z(D-E)T/generic_clock.c +++ b/variants/STM32F3xx/F303Z(D-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F318C8(T-Y)/generic_clock.c b/variants/STM32F3xx/F318C8(T-Y)/generic_clock.c index f6af85b4da..fc4ae2c983 100644 --- a/variants/STM32F3xx/F318C8(T-Y)/generic_clock.c +++ b/variants/STM32F3xx/F318C8(T-Y)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F318K8U/generic_clock.c b/variants/STM32F3xx/F318K8U/generic_clock.c index 311d37df46..d460cfdb00 100644 --- a/variants/STM32F3xx/F318K8U/generic_clock.c +++ b/variants/STM32F3xx/F318K8U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F328C8T/generic_clock.c b/variants/STM32F3xx/F328C8T/generic_clock.c index 1b4a9d9c75..83fe3eda09 100644 --- a/variants/STM32F3xx/F328C8T/generic_clock.c +++ b/variants/STM32F3xx/F328C8T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F358CCT/generic_clock.c b/variants/STM32F3xx/F358CCT/generic_clock.c index b3fbfbbd2d..c4908e73f9 100644 --- a/variants/STM32F3xx/F358CCT/generic_clock.c +++ b/variants/STM32F3xx/F358CCT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F358RCT/generic_clock.c b/variants/STM32F3xx/F358RCT/generic_clock.c index 5d7acb2363..7f18748578 100644 --- a/variants/STM32F3xx/F358RCT/generic_clock.c +++ b/variants/STM32F3xx/F358RCT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F358VCT/generic_clock.c b/variants/STM32F3xx/F358VCT/generic_clock.c index 8662b644c1..1b19df7606 100644 --- a/variants/STM32F3xx/F358VCT/generic_clock.c +++ b/variants/STM32F3xx/F358VCT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F373C(8-B-C)T/generic_clock.c b/variants/STM32F3xx/F373C(8-B-C)T/generic_clock.c index 7fd6a49918..bf93c40028 100644 --- a/variants/STM32F3xx/F373C(8-B-C)T/generic_clock.c +++ b/variants/STM32F3xx/F373C(8-B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F373R(8-B-C)T/generic_clock.c b/variants/STM32F3xx/F373R(8-B-C)T/generic_clock.c index 25d3b6d0bd..949a3fdd29 100644 --- a/variants/STM32F3xx/F373R(8-B-C)T/generic_clock.c +++ b/variants/STM32F3xx/F373R(8-B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F373V(8-B-C)(H-T)/generic_clock.c b/variants/STM32F3xx/F373V(8-B-C)(H-T)/generic_clock.c index 29a3b9aa13..a7e5369b44 100644 --- a/variants/STM32F3xx/F373V(8-B-C)(H-T)/generic_clock.c +++ b/variants/STM32F3xx/F373V(8-B-C)(H-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F378CCT/generic_clock.c b/variants/STM32F3xx/F378CCT/generic_clock.c index f12afed10c..2b8e10d7bf 100644 --- a/variants/STM32F3xx/F378CCT/generic_clock.c +++ b/variants/STM32F3xx/F378CCT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F378RC(T-Y)/generic_clock.c b/variants/STM32F3xx/F378RC(T-Y)/generic_clock.c index 2baa46009d..02754b98a8 100644 --- a/variants/STM32F3xx/F378RC(T-Y)/generic_clock.c +++ b/variants/STM32F3xx/F378RC(T-Y)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F378VC(H-T)/generic_clock.c b/variants/STM32F3xx/F378VC(H-T)/generic_clock.c index df87f1fcdb..ab6ad11f82 100644 --- a/variants/STM32F3xx/F378VC(H-T)/generic_clock.c +++ b/variants/STM32F3xx/F378VC(H-T)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F3xx/F398VET/generic_clock.c b/variants/STM32F3xx/F398VET/generic_clock.c index 94cdaefaf0..bf12fbf727 100644 --- a/variants/STM32F3xx/F398VET/generic_clock.c +++ b/variants/STM32F3xx/F398VET/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F401CC(F-U-Y)_F401C(B-D-E)(U-Y)/generic_clock.c b/variants/STM32F4xx/F401CC(F-U-Y)_F401C(B-D-E)(U-Y)/generic_clock.c index 97bda74fbd..957356059b 100644 --- a/variants/STM32F4xx/F401CC(F-U-Y)_F401C(B-D-E)(U-Y)/generic_clock.c +++ b/variants/STM32F4xx/F401CC(F-U-Y)_F401C(B-D-E)(U-Y)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F401CC(F-U-Y)_F401C(B-D-E)(U-Y)/variant_BLACKPILL_F401Cx.cpp b/variants/STM32F4xx/F401CC(F-U-Y)_F401C(B-D-E)(U-Y)/variant_BLACKPILL_F401Cx.cpp index 3f2cc33951..0ee7f1220b 100644 --- a/variants/STM32F4xx/F401CC(F-U-Y)_F401C(B-D-E)(U-Y)/variant_BLACKPILL_F401Cx.cpp +++ b/variants/STM32F4xx/F401CC(F-U-Y)_F401C(B-D-E)(U-Y)/variant_BLACKPILL_F401Cx.cpp @@ -77,6 +77,9 @@ const pin_size_t analogInputPin[] = { extern "C" { #endif +/** + * @brief System Clock Configuration + */ WEAK void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32F4xx/F401CC(F-U-Y)_F401C(B-D-E)(U-Y)/variant_PYBSTICK26_LITE.cpp b/variants/STM32F4xx/F401CC(F-U-Y)_F401C(B-D-E)(U-Y)/variant_PYBSTICK26_LITE.cpp index 968ba7c5cf..a99f2cb568 100644 --- a/variants/STM32F4xx/F401CC(F-U-Y)_F401C(B-D-E)(U-Y)/variant_PYBSTICK26_LITE.cpp +++ b/variants/STM32F4xx/F401CC(F-U-Y)_F401C(B-D-E)(U-Y)/variant_PYBSTICK26_LITE.cpp @@ -61,6 +61,9 @@ const pin_size_t analogInputPin[] = { extern "C" { #endif +/** + * @brief System Clock Configuration + */ WEAK void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32F4xx/F401R(B-C-D-E)T/generic_clock.c b/variants/STM32F4xx/F401R(B-C-D-E)T/generic_clock.c index ae897f9610..f1a725004c 100644 --- a/variants/STM32F4xx/F401R(B-C-D-E)T/generic_clock.c +++ b/variants/STM32F4xx/F401R(B-C-D-E)T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F401R(B-C-D-E)T/variant_CoreBoard_F401RC.cpp b/variants/STM32F4xx/F401R(B-C-D-E)T/variant_CoreBoard_F401RC.cpp index 8669898dae..c0dc6360b1 100644 --- a/variants/STM32F4xx/F401R(B-C-D-E)T/variant_CoreBoard_F401RC.cpp +++ b/variants/STM32F4xx/F401R(B-C-D-E)T/variant_CoreBoard_F401RC.cpp @@ -97,6 +97,9 @@ const pin_size_t analogInputPin[] = { extern "C" { #endif +/** + * @brief System Clock Configuration + */ WEAK void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32F4xx/F401R(B-C-D-E)T/variant_NUCLEO_F401RE.cpp b/variants/STM32F4xx/F401R(B-C-D-E)T/variant_NUCLEO_F401RE.cpp index 84771eb1a4..5ebfbdf886 100644 --- a/variants/STM32F4xx/F401R(B-C-D-E)T/variant_NUCLEO_F401RE.cpp +++ b/variants/STM32F4xx/F401R(B-C-D-E)T/variant_NUCLEO_F401RE.cpp @@ -102,8 +102,6 @@ extern "C" { #endif /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F401V(B-C-D-E)H/generic_clock.c b/variants/STM32F4xx/F401V(B-C-D-E)H/generic_clock.c index ff7dd47722..2a1722d615 100644 --- a/variants/STM32F4xx/F401V(B-C-D-E)H/generic_clock.c +++ b/variants/STM32F4xx/F401V(B-C-D-E)H/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F401V(B-C-D-E)T/generic_clock.c b/variants/STM32F4xx/F401V(B-C-D-E)T/generic_clock.c index dfb94f7a47..3ab3aa4848 100644 --- a/variants/STM32F4xx/F401V(B-C-D-E)T/generic_clock.c +++ b/variants/STM32F4xx/F401V(B-C-D-E)T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F401V(B-C-D-E)T/variant_ST3DP001_EVAL.cpp b/variants/STM32F4xx/F401V(B-C-D-E)T/variant_ST3DP001_EVAL.cpp index ed7c82d1f3..52e379e371 100644 --- a/variants/STM32F4xx/F401V(B-C-D-E)T/variant_ST3DP001_EVAL.cpp +++ b/variants/STM32F4xx/F401V(B-C-D-E)T/variant_ST3DP001_EVAL.cpp @@ -154,8 +154,6 @@ extern "C" { #endif /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F405O(E-G)Y_F415OGY/generic_clock.c b/variants/STM32F4xx/F405O(E-G)Y_F415OGY/generic_clock.c index d10652cc28..53a8bdd8f5 100644 --- a/variants/STM32F4xx/F405O(E-G)Y_F415OGY/generic_clock.c +++ b/variants/STM32F4xx/F405O(E-G)Y_F415OGY/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F405RGT_F415RGT/generic_clock.c b/variants/STM32F4xx/F405RGT_F415RGT/generic_clock.c index a8a03473ec..cf4ff3e9ab 100644 --- a/variants/STM32F4xx/F405RGT_F415RGT/generic_clock.c +++ b/variants/STM32F4xx/F405RGT_F415RGT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F405RGT_F415RGT/variant_FEATHER_F405.cpp b/variants/STM32F4xx/F405RGT_F415RGT/variant_FEATHER_F405.cpp index 7d9f9746fc..959d6620ea 100644 --- a/variants/STM32F4xx/F405RGT_F415RGT/variant_FEATHER_F405.cpp +++ b/variants/STM32F4xx/F405RGT_F415RGT/variant_FEATHER_F405.cpp @@ -78,8 +78,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F405RGT_F415RGT/variant_MICROMOD_F405.cpp b/variants/STM32F4xx/F405RGT_F415RGT/variant_MICROMOD_F405.cpp index c770cdc8c4..3717080b81 100644 --- a/variants/STM32F4xx/F405RGT_F415RGT/variant_MICROMOD_F405.cpp +++ b/variants/STM32F4xx/F405RGT_F415RGT/variant_MICROMOD_F405.cpp @@ -110,8 +110,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F405VGT_F415VGT/generic_clock.c b/variants/STM32F4xx/F405VGT_F415VGT/generic_clock.c index 92cd8b182b..63fea38d52 100644 --- a/variants/STM32F4xx/F405VGT_F415VGT/generic_clock.c +++ b/variants/STM32F4xx/F405VGT_F415VGT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F405ZGT_F415ZGT/generic_clock.c b/variants/STM32F4xx/F405ZGT_F415ZGT/generic_clock.c index 62034c9dbb..31c203ffba 100644 --- a/variants/STM32F4xx/F405ZGT_F415ZGT/generic_clock.c +++ b/variants/STM32F4xx/F405ZGT_F415ZGT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F407I(E-G)(H-T)_F417I(E-G)(H-T)/generic_clock.c b/variants/STM32F4xx/F407I(E-G)(H-T)_F417I(E-G)(H-T)/generic_clock.c index 9d459b81e0..31ec6fc5bb 100644 --- a/variants/STM32F4xx/F407I(E-G)(H-T)_F417I(E-G)(H-T)/generic_clock.c +++ b/variants/STM32F4xx/F407I(E-G)(H-T)_F417I(E-G)(H-T)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/generic_clock.c b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/generic_clock.c index d2bbbdb58e..b83177c4e1 100644 --- a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/generic_clock.c +++ b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_ARMED_V1.cpp b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_ARMED_V1.cpp index 85ab3f9bd8..a4548ee65f 100644 --- a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_ARMED_V1.cpp +++ b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_ARMED_V1.cpp @@ -128,8 +128,6 @@ extern "C" { * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 5 -* @param None -* @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_BLACK_F407VX.cpp b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_BLACK_F407VX.cpp index 3b70cf84b6..bb11a3f20e 100644 --- a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_BLACK_F407VX.cpp +++ b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_BLACK_F407VX.cpp @@ -103,8 +103,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_BLUE_F407VE_MINI.cpp b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_BLUE_F407VE_MINI.cpp index c51ed2877e..9ee36ad9d4 100644 --- a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_BLUE_F407VE_MINI.cpp +++ b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_BLUE_F407VE_MINI.cpp @@ -142,8 +142,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_DISCO_F407VG.cpp b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_DISCO_F407VG.cpp index c934997f5c..d5100baa17 100644 --- a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_DISCO_F407VG.cpp +++ b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_DISCO_F407VG.cpp @@ -144,8 +144,6 @@ extern "C" { * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_DIYMORE_F407VGT.cpp b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_DIYMORE_F407VGT.cpp index d9098b56d4..f2bd116fdc 100644 --- a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_DIYMORE_F407VGT.cpp +++ b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_DIYMORE_F407VGT.cpp @@ -144,8 +144,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_FK407M1.cpp b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_FK407M1.cpp index b4bfd1902e..5ed66bd029 100644 --- a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_FK407M1.cpp +++ b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_FK407M1.cpp @@ -91,8 +91,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_PRNTR_Vx.cpp b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_PRNTR_Vx.cpp index 170bd577ca..a8bd7e1d0b 100644 --- a/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_PRNTR_Vx.cpp +++ b/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T/variant_PRNTR_Vx.cpp @@ -137,8 +137,6 @@ extern "C" { * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/generic_clock.c b/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/generic_clock.c index bb24f6d13e..403f1fb3b1 100644 --- a/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/generic_clock.c +++ b/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_BLACK_F407ZX.cpp b/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_BLACK_F407ZX.cpp index adb8fc3595..4d9fb41686 100644 --- a/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_BLACK_F407ZX.cpp +++ b/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_BLACK_F407ZX.cpp @@ -119,8 +119,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_VCCGND_F407ZG_MINI.cpp b/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_VCCGND_F407ZG_MINI.cpp index 706050a731..5bedc25f02 100644 --- a/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_VCCGND_F407ZG_MINI.cpp +++ b/variants/STM32F4xx/F407Z(E-G)T_F417Z(E-G)T/variant_VCCGND_F407ZG_MINI.cpp @@ -177,7 +177,6 @@ extern "C" { /******************************************************************************/ /** * @brief System Clock Configuration - * @retval None */ void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F410C(8-B)T/generic_clock.c b/variants/STM32F4xx/F410C(8-B)T/generic_clock.c index b2e849f6ba..1fef7498ac 100644 --- a/variants/STM32F4xx/F410C(8-B)T/generic_clock.c +++ b/variants/STM32F4xx/F410C(8-B)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F410C(8-B)U/generic_clock.c b/variants/STM32F4xx/F410C(8-B)U/generic_clock.c index 879a18da71..8f33811756 100644 --- a/variants/STM32F4xx/F410C(8-B)U/generic_clock.c +++ b/variants/STM32F4xx/F410C(8-B)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F410R(8-B)(I-T)/generic_clock.c b/variants/STM32F4xx/F410R(8-B)(I-T)/generic_clock.c index 8b787ca797..25f14b87bb 100644 --- a/variants/STM32F4xx/F410R(8-B)(I-T)/generic_clock.c +++ b/variants/STM32F4xx/F410R(8-B)(I-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F410R(8-B)(I-T)/variant_NUCLEO_F410RB.cpp b/variants/STM32F4xx/F410R(8-B)(I-T)/variant_NUCLEO_F410RB.cpp index 7a238bef73..8e376a408e 100644 --- a/variants/STM32F4xx/F410R(8-B)(I-T)/variant_NUCLEO_F410RB.cpp +++ b/variants/STM32F4xx/F410R(8-B)(I-T)/variant_NUCLEO_F410RB.cpp @@ -100,8 +100,6 @@ extern "C" { /** * @brief System Clock Configuration * SYSCLK = 100MHz for ARDUINO_NUCLEO_F410RB - * @param None - * @retval None */ void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F410T(8-B)Y/generic_clock.c b/variants/STM32F4xx/F410T(8-B)Y/generic_clock.c index 027c62858c..b0a78b4678 100644 --- a/variants/STM32F4xx/F410T(8-B)Y/generic_clock.c +++ b/variants/STM32F4xx/F410T(8-B)Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F411C(C-E)(U-Y)/generic_clock.c b/variants/STM32F4xx/F411C(C-E)(U-Y)/generic_clock.c index 231c16c98a..a0b099cb67 100644 --- a/variants/STM32F4xx/F411C(C-E)(U-Y)/generic_clock.c +++ b/variants/STM32F4xx/F411C(C-E)(U-Y)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F411C(C-E)(U-Y)/variant_BLACKPILL_F411CE.cpp b/variants/STM32F4xx/F411C(C-E)(U-Y)/variant_BLACKPILL_F411CE.cpp index 8e3648074a..ea7a4f572e 100644 --- a/variants/STM32F4xx/F411C(C-E)(U-Y)/variant_BLACKPILL_F411CE.cpp +++ b/variants/STM32F4xx/F411C(C-E)(U-Y)/variant_BLACKPILL_F411CE.cpp @@ -76,6 +76,9 @@ const pin_size_t analogInputPin[] = { extern "C" { #endif +/** + * @brief System Clock Configuration + */ WEAK void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32F4xx/F411C(C-E)(U-Y)/variant_THUNDERPACK_F411.cpp b/variants/STM32F4xx/F411C(C-E)(U-Y)/variant_THUNDERPACK_F411.cpp index 5297c28d1f..b6d0fc796c 100644 --- a/variants/STM32F4xx/F411C(C-E)(U-Y)/variant_THUNDERPACK_F411.cpp +++ b/variants/STM32F4xx/F411C(C-E)(U-Y)/variant_THUNDERPACK_F411.cpp @@ -54,8 +54,6 @@ extern "C" { /* * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F411R(C-E)T/generic_clock.c b/variants/STM32F4xx/F411R(C-E)T/generic_clock.c index 44011247f8..185ef832e1 100644 --- a/variants/STM32F4xx/F411R(C-E)T/generic_clock.c +++ b/variants/STM32F4xx/F411R(C-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F411R(C-E)T/variant_NUCLEO_F411RE.cpp b/variants/STM32F4xx/F411R(C-E)T/variant_NUCLEO_F411RE.cpp index e4575a8846..02250b6af8 100644 --- a/variants/STM32F4xx/F411R(C-E)T/variant_NUCLEO_F411RE.cpp +++ b/variants/STM32F4xx/F411R(C-E)T/variant_NUCLEO_F411RE.cpp @@ -104,8 +104,6 @@ extern "C" { * @brief System Clock Configuration * SYSCLK = 100000000 Hz for ARDUINO_NUCLEO_F411RE * SYSCLK = 84000000 Hz for ARDUINO_NUCLEO_F401RE - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F411R(C-E)T/variant_PYBSTICK26_STD.cpp b/variants/STM32F4xx/F411R(C-E)T/variant_PYBSTICK26_STD.cpp index eb0ee75c87..4ee50739c1 100644 --- a/variants/STM32F4xx/F411R(C-E)T/variant_PYBSTICK26_STD.cpp +++ b/variants/STM32F4xx/F411R(C-E)T/variant_PYBSTICK26_STD.cpp @@ -74,6 +74,9 @@ const pin_size_t analogInputPin[] = { extern "C" { #endif +/** + * @brief System Clock Configuration + */ WEAK void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32F4xx/F411V(C-E)H/generic_clock.c b/variants/STM32F4xx/F411V(C-E)H/generic_clock.c index 196e172981..fe4ac4d41b 100644 --- a/variants/STM32F4xx/F411V(C-E)H/generic_clock.c +++ b/variants/STM32F4xx/F411V(C-E)H/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F411V(C-E)T/generic_clock.c b/variants/STM32F4xx/F411V(C-E)T/generic_clock.c index 16eb085be5..5e9b7a294f 100644 --- a/variants/STM32F4xx/F411V(C-E)T/generic_clock.c +++ b/variants/STM32F4xx/F411V(C-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F411V(C-E)T/variant_DISCO_F411VE.cpp b/variants/STM32F4xx/F411V(C-E)T/variant_DISCO_F411VE.cpp index 46e41c100b..6303a15b36 100644 --- a/variants/STM32F4xx/F411V(C-E)T/variant_DISCO_F411VE.cpp +++ b/variants/STM32F4xx/F411V(C-E)T/variant_DISCO_F411VE.cpp @@ -132,7 +132,6 @@ extern "C" { /** * @brief System Clock Configuration - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F412C(E-G)U/generic_clock.c b/variants/STM32F4xx/F412C(E-G)U/generic_clock.c index 124700c21e..5d5b01d0f5 100644 --- a/variants/STM32F4xx/F412C(E-G)U/generic_clock.c +++ b/variants/STM32F4xx/F412C(E-G)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F412R(E-G)(T-Y)x(P)/generic_clock.c b/variants/STM32F4xx/F412R(E-G)(T-Y)x(P)/generic_clock.c index 77821b79e7..93259c55a5 100644 --- a/variants/STM32F4xx/F412R(E-G)(T-Y)x(P)/generic_clock.c +++ b/variants/STM32F4xx/F412R(E-G)(T-Y)x(P)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F412R(E-G)(T-Y)x(P)/variant_PYBSTICK26_PRO.cpp b/variants/STM32F4xx/F412R(E-G)(T-Y)x(P)/variant_PYBSTICK26_PRO.cpp index 9cf1508b0d..1a495d7a86 100644 --- a/variants/STM32F4xx/F412R(E-G)(T-Y)x(P)/variant_PYBSTICK26_PRO.cpp +++ b/variants/STM32F4xx/F412R(E-G)(T-Y)x(P)/variant_PYBSTICK26_PRO.cpp @@ -78,6 +78,9 @@ const pin_size_t analogInputPin[] = { extern "C" { #endif +/** + * @brief System Clock Configuration + */ WEAK void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32F4xx/F412V(E-G)H/generic_clock.c b/variants/STM32F4xx/F412V(E-G)H/generic_clock.c index b688d33214..fad51b5e50 100644 --- a/variants/STM32F4xx/F412V(E-G)H/generic_clock.c +++ b/variants/STM32F4xx/F412V(E-G)H/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F412V(E-G)T/generic_clock.c b/variants/STM32F4xx/F412V(E-G)T/generic_clock.c index 9a8d570049..a14c7e925d 100644 --- a/variants/STM32F4xx/F412V(E-G)T/generic_clock.c +++ b/variants/STM32F4xx/F412V(E-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F412Z(E-G)(J-T)/generic_clock.c b/variants/STM32F4xx/F412Z(E-G)(J-T)/generic_clock.c index fc21569d7a..95bb6bc0c2 100644 --- a/variants/STM32F4xx/F412Z(E-G)(J-T)/generic_clock.c +++ b/variants/STM32F4xx/F412Z(E-G)(J-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F412Z(E-G)(J-T)/variant_NUCLEO_F412ZG.cpp b/variants/STM32F4xx/F412Z(E-G)(J-T)/variant_NUCLEO_F412ZG.cpp index 1e5a6794e2..fb4c550400 100644 --- a/variants/STM32F4xx/F412Z(E-G)(J-T)/variant_NUCLEO_F412ZG.cpp +++ b/variants/STM32F4xx/F412Z(E-G)(J-T)/variant_NUCLEO_F412ZG.cpp @@ -162,8 +162,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F413C(G-H)U_F423CHU/generic_clock.c b/variants/STM32F4xx/F413C(G-H)U_F423CHU/generic_clock.c index 4c8696b699..9ee4ee85e4 100644 --- a/variants/STM32F4xx/F413C(G-H)U_F423CHU/generic_clock.c +++ b/variants/STM32F4xx/F413C(G-H)U_F423CHU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F413M(G-H)Y_F423MHY/generic_clock.c b/variants/STM32F4xx/F413M(G-H)Y_F423MHY/generic_clock.c index 742bbca33c..bbad657c10 100644 --- a/variants/STM32F4xx/F413M(G-H)Y_F423MHY/generic_clock.c +++ b/variants/STM32F4xx/F413M(G-H)Y_F423MHY/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F413R(G-H)T_F423RHT/generic_clock.c b/variants/STM32F4xx/F413R(G-H)T_F423RHT/generic_clock.c index 10aa67de30..917c11e66a 100644 --- a/variants/STM32F4xx/F413R(G-H)T_F423RHT/generic_clock.c +++ b/variants/STM32F4xx/F413R(G-H)T_F423RHT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F413V(G-H)H_F423VHH/generic_clock.c b/variants/STM32F4xx/F413V(G-H)H_F423VHH/generic_clock.c index a08b260028..bb071323ea 100644 --- a/variants/STM32F4xx/F413V(G-H)H_F423VHH/generic_clock.c +++ b/variants/STM32F4xx/F413V(G-H)H_F423VHH/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F413V(G-H)T_F423VHT/generic_clock.c b/variants/STM32F4xx/F413V(G-H)T_F423VHT/generic_clock.c index 8192545299..2384b684ed 100644 --- a/variants/STM32F4xx/F413V(G-H)T_F423VHT/generic_clock.c +++ b/variants/STM32F4xx/F413V(G-H)T_F423VHT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F413Z(G-H)(J-T)_F423ZH(J-T)/generic_clock.c b/variants/STM32F4xx/F413Z(G-H)(J-T)_F423ZH(J-T)/generic_clock.c index dcaf17c351..a8b818dc10 100644 --- a/variants/STM32F4xx/F413Z(G-H)(J-T)_F423ZH(J-T)/generic_clock.c +++ b/variants/STM32F4xx/F413Z(G-H)(J-T)_F423ZH(J-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F413Z(G-H)(J-T)_F423ZH(J-T)/variant_DISCO_F413ZH.cpp b/variants/STM32F4xx/F413Z(G-H)(J-T)_F423ZH(J-T)/variant_DISCO_F413ZH.cpp index 43f14a1b98..876f53a0f2 100644 --- a/variants/STM32F4xx/F413Z(G-H)(J-T)_F423ZH(J-T)/variant_DISCO_F413ZH.cpp +++ b/variants/STM32F4xx/F413Z(G-H)(J-T)_F423ZH(J-T)/variant_DISCO_F413ZH.cpp @@ -177,8 +177,6 @@ WEAK void initVariant(void) /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F413Z(G-H)(J-T)_F423ZH(J-T)/variant_NUCLEO_F413ZH.cpp b/variants/STM32F4xx/F413Z(G-H)(J-T)_F423ZH(J-T)/variant_NUCLEO_F413ZH.cpp index 0086ab69a0..0cd9db9563 100644 --- a/variants/STM32F4xx/F413Z(G-H)(J-T)_F423ZH(J-T)/variant_NUCLEO_F413ZH.cpp +++ b/variants/STM32F4xx/F413Z(G-H)(J-T)_F423ZH(J-T)/variant_NUCLEO_F413ZH.cpp @@ -162,8 +162,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F427A(G-I)H_F429A(G-I)H_F437AIH_F439AIH/generic_clock.c b/variants/STM32F4xx/F427A(G-I)H_F429A(G-I)H_F437AIH_F439AIH/generic_clock.c index 42bc9d8b7a..8fd68b3260 100644 --- a/variants/STM32F4xx/F427A(G-I)H_F429A(G-I)H_F437AIH_F439AIH/generic_clock.c +++ b/variants/STM32F4xx/F427A(G-I)H_F429A(G-I)H_F437AIH_F439AIH/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F427I(G-I)(H-T)_F429I(E-G-I)(H-T)_F437I(G-I)(H-T)_F439I(G-I)(H-T)/generic_clock.c b/variants/STM32F4xx/F427I(G-I)(H-T)_F429I(E-G-I)(H-T)_F437I(G-I)(H-T)_F439I(G-I)(H-T)/generic_clock.c index 711909de50..c94b96d6b7 100644 --- a/variants/STM32F4xx/F427I(G-I)(H-T)_F429I(E-G-I)(H-T)_F437I(G-I)(H-T)_F439I(G-I)(H-T)/generic_clock.c +++ b/variants/STM32F4xx/F427I(G-I)(H-T)_F429I(E-G-I)(H-T)_F437I(G-I)(H-T)_F439I(G-I)(H-T)/generic_clock.c @@ -23,8 +23,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F427V(G-I)T_F429V(E-G-I)T_F437V(G-I)T_F439V(G-I)T/generic_clock.c b/variants/STM32F4xx/F427V(G-I)T_F429V(E-G-I)T_F437V(G-I)T_F439V(G-I)T/generic_clock.c index 35d8a15f5f..0220938271 100644 --- a/variants/STM32F4xx/F427V(G-I)T_F429V(E-G-I)T_F437V(G-I)T_F439V(G-I)T/generic_clock.c +++ b/variants/STM32F4xx/F427V(G-I)T_F429V(E-G-I)T_F437V(G-I)T_F439V(G-I)T/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F427Z(G-I)T_F429ZET_F429Z(G-I)(T-Y)_F437Z(G-I)T_F439Z(G-I)(T-Y)/generic_clock.c b/variants/STM32F4xx/F427Z(G-I)T_F429ZET_F429Z(G-I)(T-Y)_F437Z(G-I)T_F439Z(G-I)(T-Y)/generic_clock.c index 9d3395d74f..818f839b0f 100644 --- a/variants/STM32F4xx/F427Z(G-I)T_F429ZET_F429Z(G-I)(T-Y)_F437Z(G-I)T_F439Z(G-I)(T-Y)/generic_clock.c +++ b/variants/STM32F4xx/F427Z(G-I)T_F429ZET_F429Z(G-I)(T-Y)_F437Z(G-I)T_F439Z(G-I)(T-Y)/generic_clock.c @@ -21,8 +21,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F427Z(G-I)T_F429ZET_F429Z(G-I)(T-Y)_F437Z(G-I)T_F439Z(G-I)(T-Y)/variant_DISCO_F429ZI.cpp b/variants/STM32F4xx/F427Z(G-I)T_F429ZET_F429Z(G-I)(T-Y)_F437Z(G-I)T_F439Z(G-I)(T-Y)/variant_DISCO_F429ZI.cpp index ba6fc3ba34..c1b1a7d7ac 100644 --- a/variants/STM32F4xx/F427Z(G-I)T_F429ZET_F429Z(G-I)(T-Y)_F437Z(G-I)T_F439Z(G-I)(T-Y)/variant_DISCO_F429ZI.cpp +++ b/variants/STM32F4xx/F427Z(G-I)T_F429ZET_F429Z(G-I)(T-Y)_F437Z(G-I)T_F439Z(G-I)(T-Y)/variant_DISCO_F429ZI.cpp @@ -166,9 +166,7 @@ extern "C" { #endif /** - * @brief None - * @param None - * @retval None + * @brief System Clock Configuration */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F427Z(G-I)T_F429ZET_F429Z(G-I)(T-Y)_F437Z(G-I)T_F439Z(G-I)(T-Y)/variant_NUCLEO_F4x9ZI.cpp b/variants/STM32F4xx/F427Z(G-I)T_F429ZET_F429Z(G-I)(T-Y)_F437Z(G-I)T_F439Z(G-I)(T-Y)/variant_NUCLEO_F4x9ZI.cpp index 087d2689c5..26859c97fa 100644 --- a/variants/STM32F4xx/F427Z(G-I)T_F429ZET_F429Z(G-I)(T-Y)_F437Z(G-I)T_F439Z(G-I)(T-Y)/variant_NUCLEO_F4x9ZI.cpp +++ b/variants/STM32F4xx/F427Z(G-I)T_F429ZET_F429Z(G-I)(T-Y)_F437Z(G-I)T_F439Z(G-I)(T-Y)/variant_NUCLEO_F4x9ZI.cpp @@ -187,8 +187,6 @@ extern "C" { * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F429B(E-G-I)T_F429N(E-G-I)H_F439B(G-I)T_F439N(G-I)H/generic_clock.c b/variants/STM32F4xx/F429B(E-G-I)T_F429N(E-G-I)H_F439B(G-I)T_F439N(G-I)H/generic_clock.c index 9a2e418e78..20f59fd705 100644 --- a/variants/STM32F4xx/F429B(E-G-I)T_F429N(E-G-I)H_F439B(G-I)T_F439N(G-I)H/generic_clock.c +++ b/variants/STM32F4xx/F429B(E-G-I)T_F429N(E-G-I)H_F439B(G-I)T_F439N(G-I)H/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F446M(C-E)Y/generic_clock.c b/variants/STM32F4xx/F446M(C-E)Y/generic_clock.c index 39d97a9ffc..ea14f5e2a5 100644 --- a/variants/STM32F4xx/F446M(C-E)Y/generic_clock.c +++ b/variants/STM32F4xx/F446M(C-E)Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F446R(C-E)T/generic_clock.c b/variants/STM32F4xx/F446R(C-E)T/generic_clock.c index 2d6d1420d8..fc624ec66f 100644 --- a/variants/STM32F4xx/F446R(C-E)T/generic_clock.c +++ b/variants/STM32F4xx/F446R(C-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F446R(C-E)T/variant_NUCLEO_F446RE.cpp b/variants/STM32F4xx/F446R(C-E)T/variant_NUCLEO_F446RE.cpp index f388f3579e..3fa70d7f2f 100644 --- a/variants/STM32F4xx/F446R(C-E)T/variant_NUCLEO_F446RE.cpp +++ b/variants/STM32F4xx/F446R(C-E)T/variant_NUCLEO_F446RE.cpp @@ -118,8 +118,6 @@ extern "C" { * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F446V(C-E)T/generic_clock.c b/variants/STM32F4xx/F446V(C-E)T/generic_clock.c index 1f83e285e2..37d75d99b2 100644 --- a/variants/STM32F4xx/F446V(C-E)T/generic_clock.c +++ b/variants/STM32F4xx/F446V(C-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F446V(C-E)T/variant_FYSETC_S6.cpp b/variants/STM32F4xx/F446V(C-E)T/variant_FYSETC_S6.cpp index 9308d31da2..497ebb8afa 100644 --- a/variants/STM32F4xx/F446V(C-E)T/variant_FYSETC_S6.cpp +++ b/variants/STM32F4xx/F446V(C-E)T/variant_FYSETC_S6.cpp @@ -133,8 +133,6 @@ extern "C" { * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F446V(C-E)T/variant_RUMBA32.cpp b/variants/STM32F4xx/F446V(C-E)T/variant_RUMBA32.cpp index 66d54fecc6..a50d0de384 100644 --- a/variants/STM32F4xx/F446V(C-E)T/variant_RUMBA32.cpp +++ b/variants/STM32F4xx/F446V(C-E)T/variant_RUMBA32.cpp @@ -140,8 +140,6 @@ extern "C" { * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F446V(C-E)T/variant_VAKE_V1.cpp b/variants/STM32F4xx/F446V(C-E)T/variant_VAKE_V1.cpp index 81bfa78d31..9749ec3e57 100644 --- a/variants/STM32F4xx/F446V(C-E)T/variant_VAKE_V1.cpp +++ b/variants/STM32F4xx/F446V(C-E)T/variant_VAKE_V1.cpp @@ -135,8 +135,6 @@ extern "C" { * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 5 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F446Z(C-E)(H-J-T)/generic_clock.c b/variants/STM32F4xx/F446Z(C-E)(H-J-T)/generic_clock.c index 955a0053b5..5870cd4abd 100644 --- a/variants/STM32F4xx/F446Z(C-E)(H-J-T)/generic_clock.c +++ b/variants/STM32F4xx/F446Z(C-E)(H-J-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F446Z(C-E)(H-J-T)/variant_NUCLEO_F446ZE.cpp b/variants/STM32F4xx/F446Z(C-E)(H-J-T)/variant_NUCLEO_F446ZE.cpp index 2d5b6eeeaf..9abb9d6008 100644 --- a/variants/STM32F4xx/F446Z(C-E)(H-J-T)/variant_NUCLEO_F446ZE.cpp +++ b/variants/STM32F4xx/F446Z(C-E)(H-J-T)/variant_NUCLEO_F446ZE.cpp @@ -171,8 +171,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F469A(E-G-I)(H-Y)_F479A(G-I)(H-Y)/generic_clock.c b/variants/STM32F4xx/F469A(E-G-I)(H-Y)_F479A(G-I)(H-Y)/generic_clock.c index 6ebb33338e..677461a37c 100644 --- a/variants/STM32F4xx/F469A(E-G-I)(H-Y)_F479A(G-I)(H-Y)/generic_clock.c +++ b/variants/STM32F4xx/F469A(E-G-I)(H-Y)_F479A(G-I)(H-Y)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F469B(E-G-I)T_F469N(E-G-I)H_F479B(G-I)T_F479N(G-I)H/generic_clock.c b/variants/STM32F4xx/F469B(E-G-I)T_F469N(E-G-I)H_F479B(G-I)T_F479N(G-I)H/generic_clock.c index f59617a8f5..0646d5074b 100644 --- a/variants/STM32F4xx/F469B(E-G-I)T_F469N(E-G-I)H_F479B(G-I)T_F479N(G-I)H/generic_clock.c +++ b/variants/STM32F4xx/F469B(E-G-I)T_F469N(E-G-I)H_F479B(G-I)T_F479N(G-I)H/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F469I(E-G-I)(H-T)_F479I(G-I)(H-T)/generic_clock.c b/variants/STM32F4xx/F469I(E-G-I)(H-T)_F479I(G-I)(H-T)/generic_clock.c index 62ae8ac1b3..7750a104f6 100644 --- a/variants/STM32F4xx/F469I(E-G-I)(H-T)_F479I(G-I)(H-T)/generic_clock.c +++ b/variants/STM32F4xx/F469I(E-G-I)(H-T)_F479I(G-I)(H-T)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F469V(E-G-I)T_F479V(G-I)T/generic_clock.c b/variants/STM32F4xx/F469V(E-G-I)T_F479V(G-I)T/generic_clock.c index 8b0512dc1e..1c6a637e1b 100644 --- a/variants/STM32F4xx/F469V(E-G-I)T_F479V(G-I)T/generic_clock.c +++ b/variants/STM32F4xx/F469V(E-G-I)T_F479V(G-I)T/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F4xx/F469Z(E-G-I)T_F479Z(G-I)T/generic_clock.c b/variants/STM32F4xx/F469Z(E-G-I)T_F479Z(G-I)T/generic_clock.c index 2f0dd19af1..b368443d08 100644 --- a/variants/STM32F4xx/F469Z(E-G-I)T_F479Z(G-I)T/generic_clock.c +++ b/variants/STM32F4xx/F469Z(E-G-I)T_F479Z(G-I)T/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F722I(C-E)(K-T)_F732IE(K-T)/generic_clock.c b/variants/STM32F7xx/F722I(C-E)(K-T)_F732IE(K-T)/generic_clock.c index ea1ee114ab..99bff6b63d 100644 --- a/variants/STM32F7xx/F722I(C-E)(K-T)_F732IE(K-T)/generic_clock.c +++ b/variants/STM32F7xx/F722I(C-E)(K-T)_F732IE(K-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F722R(C-E)T_F730R8T_F732RET/generic_clock.c b/variants/STM32F7xx/F722R(C-E)T_F730R8T_F732RET/generic_clock.c index ab6fcfc0d4..84652b65a7 100644 --- a/variants/STM32F7xx/F722R(C-E)T_F730R8T_F732RET/generic_clock.c +++ b/variants/STM32F7xx/F722R(C-E)T_F730R8T_F732RET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F722V(C-E)T_F730V8T_F732VET/generic_clock.c b/variants/STM32F7xx/F722V(C-E)T_F730V8T_F732VET/generic_clock.c index 4230b7cfb6..eb8e485cd4 100644 --- a/variants/STM32F7xx/F722V(C-E)T_F730V8T_F732VET/generic_clock.c +++ b/variants/STM32F7xx/F722V(C-E)T_F730V8T_F732VET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F722Z(C-E)T_F732ZET/generic_clock.c b/variants/STM32F7xx/F722Z(C-E)T_F732ZET/generic_clock.c index 02ecf17459..f97dbbc65a 100644 --- a/variants/STM32F7xx/F722Z(C-E)T_F732ZET/generic_clock.c +++ b/variants/STM32F7xx/F722Z(C-E)T_F732ZET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F722Z(C-E)T_F732ZET/variant_NUCLEO_F722ZE.cpp b/variants/STM32F7xx/F722Z(C-E)T_F732ZET/variant_NUCLEO_F722ZE.cpp index 90a046706a..393a2a7130 100644 --- a/variants/STM32F7xx/F722Z(C-E)T_F732ZET/variant_NUCLEO_F722ZE.cpp +++ b/variants/STM32F7xx/F722Z(C-E)T_F732ZET/variant_NUCLEO_F722ZE.cpp @@ -171,8 +171,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F723I(C-E)(K-T)_F730I8K_F733IE(K-T)/generic_clock.c b/variants/STM32F7xx/F723I(C-E)(K-T)_F730I8K_F733IE(K-T)/generic_clock.c index ac1f2886a6..f063746c83 100644 --- a/variants/STM32F7xx/F723I(C-E)(K-T)_F730I8K_F733IE(K-T)/generic_clock.c +++ b/variants/STM32F7xx/F723I(C-E)(K-T)_F730I8K_F733IE(K-T)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F723I(C-E)(K-T)_F730I8K_F733IE(K-T)/variant_DISCO_F723IE.cpp b/variants/STM32F7xx/F723I(C-E)(K-T)_F730I8K_F733IE(K-T)/variant_DISCO_F723IE.cpp index bfb7ce2c76..c33978f80c 100644 --- a/variants/STM32F7xx/F723I(C-E)(K-T)_F730I8K_F733IE(K-T)/variant_DISCO_F723IE.cpp +++ b/variants/STM32F7xx/F723I(C-E)(K-T)_F730I8K_F733IE(K-T)/variant_DISCO_F723IE.cpp @@ -189,8 +189,6 @@ extern "C" { * ST's own reference firmware for this board does the same thing * for the same reason (see MPU_ConfigPSRAM() in the STM32CubeF7 * BSP example Applications/Display/LCD_PicturesFromUSB/Src/main.c). - * @param None - * @retval None */ WEAK void initVariant(void) { @@ -230,8 +228,6 @@ WEAK void initVariant(void) * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 7 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F723R(C-E)V/generic_clock.c b/variants/STM32F7xx/F723R(C-E)V/generic_clock.c index d858e6ac76..f73631c274 100644 --- a/variants/STM32F7xx/F723R(C-E)V/generic_clock.c +++ b/variants/STM32F7xx/F723R(C-E)V/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F723V(C-E)(T-Y)_F733VE(T-Y)/generic_clock.c b/variants/STM32F7xx/F723V(C-E)(T-Y)_F733VE(T-Y)/generic_clock.c index 14ede985a4..c34d35cf43 100644 --- a/variants/STM32F7xx/F723V(C-E)(T-Y)_F733VE(T-Y)/generic_clock.c +++ b/variants/STM32F7xx/F723V(C-E)(T-Y)_F733VE(T-Y)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F723Z(C-E)(I-T)_F730Z8T_F733ZE(I-T)/generic_clock.c b/variants/STM32F7xx/F723Z(C-E)(I-T)_F730Z8T_F733ZE(I-T)/generic_clock.c index d7552fdd89..7f09e57f96 100644 --- a/variants/STM32F7xx/F723Z(C-E)(I-T)_F730Z8T_F733ZE(I-T)/generic_clock.c +++ b/variants/STM32F7xx/F723Z(C-E)(I-T)_F730Z8T_F733ZE(I-T)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F745I(E-G)(K-T)_F746I(E-G)(K-T)_F756IG(K-T)/generic_clock.c b/variants/STM32F7xx/F745I(E-G)(K-T)_F746I(E-G)(K-T)_F756IG(K-T)/generic_clock.c index e0ea1b12e3..fbb96cc6f0 100644 --- a/variants/STM32F7xx/F745I(E-G)(K-T)_F746I(E-G)(K-T)_F756IG(K-T)/generic_clock.c +++ b/variants/STM32F7xx/F745I(E-G)(K-T)_F746I(E-G)(K-T)_F756IG(K-T)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F745V(E-G)(H-T)_F746V(E-G)(H-T)_F750V8T_F756VG(H-T)/generic_clock.c b/variants/STM32F7xx/F745V(E-G)(H-T)_F746V(E-G)(H-T)_F750V8T_F756VG(H-T)/generic_clock.c index 4131420aa7..ab23773d11 100644 --- a/variants/STM32F7xx/F745V(E-G)(H-T)_F746V(E-G)(H-T)_F750V8T_F756VG(H-T)/generic_clock.c +++ b/variants/STM32F7xx/F745V(E-G)(H-T)_F746V(E-G)(H-T)_F750V8T_F756VG(H-T)/generic_clock.c @@ -20,8 +20,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F745Z(E-G)T_F746Z(E-G)(T-Y)_F750Z8T_F756ZG(T-Y)/generic_clock.c b/variants/STM32F7xx/F745Z(E-G)T_F746Z(E-G)(T-Y)_F750Z8T_F756ZG(T-Y)/generic_clock.c index 606514ccd2..7e2e5bf6cc 100644 --- a/variants/STM32F7xx/F745Z(E-G)T_F746Z(E-G)(T-Y)_F750Z8T_F756ZG(T-Y)/generic_clock.c +++ b/variants/STM32F7xx/F745Z(E-G)T_F746Z(E-G)(T-Y)_F750Z8T_F756ZG(T-Y)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F745Z(E-G)T_F746Z(E-G)(T-Y)_F750Z8T_F756ZG(T-Y)/variant_ETHERCAT_DUINO.cpp b/variants/STM32F7xx/F745Z(E-G)T_F746Z(E-G)(T-Y)_F750Z8T_F756ZG(T-Y)/variant_ETHERCAT_DUINO.cpp index 172c360f5d..33bf60929d 100644 --- a/variants/STM32F7xx/F745Z(E-G)T_F746Z(E-G)(T-Y)_F750Z8T_F756ZG(T-Y)/variant_ETHERCAT_DUINO.cpp +++ b/variants/STM32F7xx/F745Z(E-G)T_F746Z(E-G)(T-Y)_F750Z8T_F756ZG(T-Y)/variant_ETHERCAT_DUINO.cpp @@ -135,8 +135,6 @@ extern "C" /** * @brief System Clock Configuration -* @param None -* @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F745Z(E-G)T_F746Z(E-G)(T-Y)_F750Z8T_F756ZG(T-Y)/variant_NUCLEO_F7x6ZG.cpp b/variants/STM32F7xx/F745Z(E-G)T_F746Z(E-G)(T-Y)_F750Z8T_F756ZG(T-Y)/variant_NUCLEO_F7x6ZG.cpp index 9c03da0ae2..d87af0d639 100644 --- a/variants/STM32F7xx/F745Z(E-G)T_F746Z(E-G)(T-Y)_F750Z8T_F756ZG(T-Y)/variant_NUCLEO_F7x6ZG.cpp +++ b/variants/STM32F7xx/F745Z(E-G)T_F746Z(E-G)(T-Y)_F750Z8T_F756ZG(T-Y)/variant_NUCLEO_F7x6ZG.cpp @@ -189,8 +189,6 @@ extern "C" { * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 7 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F746B(E-G)T_F746N(E-G)H_F750N8H_F756BGT_F756NGH/generic_clock.c b/variants/STM32F7xx/F746B(E-G)T_F746N(E-G)H_F750N8H_F756BGT_F756NGH/generic_clock.c index ee195c3d21..0daba2659a 100644 --- a/variants/STM32F7xx/F746B(E-G)T_F746N(E-G)H_F750N8H_F756BGT_F756NGH/generic_clock.c +++ b/variants/STM32F7xx/F746B(E-G)T_F746N(E-G)H_F750N8H_F756BGT_F756NGH/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F746B(E-G)T_F746N(E-G)H_F750N8H_F756BGT_F756NGH/variant_DISCO_F746NG.cpp b/variants/STM32F7xx/F746B(E-G)T_F746N(E-G)H_F750N8H_F756BGT_F756NGH/variant_DISCO_F746NG.cpp index 58a30b516b..01d8326173 100644 --- a/variants/STM32F7xx/F746B(E-G)T_F746N(E-G)H_F750N8H_F756BGT_F756NGH/variant_DISCO_F746NG.cpp +++ b/variants/STM32F7xx/F746B(E-G)T_F746N(E-G)H_F750N8H_F756BGT_F756NGH/variant_DISCO_F746NG.cpp @@ -222,8 +222,6 @@ extern "C" { * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 7 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F765B(G-I)T_F765N(G-I)H_F767B(G-I)T_F767N(G-I)H_F777BIT_F777NIH/generic_clock.c b/variants/STM32F7xx/F765B(G-I)T_F765N(G-I)H_F767B(G-I)T_F767N(G-I)H_F777BIT_F777NIH/generic_clock.c index 6c1528248b..0dde729601 100644 --- a/variants/STM32F7xx/F765B(G-I)T_F765N(G-I)H_F767B(G-I)T_F767N(G-I)H_F777BIT_F777NIH/generic_clock.c +++ b/variants/STM32F7xx/F765B(G-I)T_F765N(G-I)H_F767B(G-I)T_F767N(G-I)H_F777BIT_F777NIH/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F765I(G-I)(K-T)_F767I(G-I)(K-T)_F777II(K-T)/generic_clock.c b/variants/STM32F7xx/F765I(G-I)(K-T)_F767I(G-I)(K-T)_F777II(K-T)/generic_clock.c index 73b5ef782c..e484174388 100644 --- a/variants/STM32F7xx/F765I(G-I)(K-T)_F767I(G-I)(K-T)_F777II(K-T)/generic_clock.c +++ b/variants/STM32F7xx/F765I(G-I)(K-T)_F767I(G-I)(K-T)_F777II(K-T)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F765V(G-I)(H-T)_F767V(G-I)(H-T)_F777VI(H-T)/generic_clock.c b/variants/STM32F7xx/F765V(G-I)(H-T)_F767V(G-I)(H-T)_F777VI(H-T)/generic_clock.c index 13caca1302..709b83439e 100644 --- a/variants/STM32F7xx/F765V(G-I)(H-T)_F767V(G-I)(H-T)_F777VI(H-T)/generic_clock.c +++ b/variants/STM32F7xx/F765V(G-I)(H-T)_F767V(G-I)(H-T)_F777VI(H-T)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F765V(G-I)(H-T)_F767V(G-I)(H-T)_F777VI(H-T)/variant_REMRAM_V1.cpp b/variants/STM32F7xx/F765V(G-I)(H-T)_F767V(G-I)(H-T)_F777VI(H-T)/variant_REMRAM_V1.cpp index 1b0b20be8b..7bf85f5e54 100644 --- a/variants/STM32F7xx/F765V(G-I)(H-T)_F767V(G-I)(H-T)_F777VI(H-T)/variant_REMRAM_V1.cpp +++ b/variants/STM32F7xx/F765V(G-I)(H-T)_F767V(G-I)(H-T)_F777VI(H-T)/variant_REMRAM_V1.cpp @@ -149,8 +149,6 @@ extern "C" * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 7 -* @param None -* @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/generic_clock.c b/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/generic_clock.c index 738c40f096..1b323b0327 100644 --- a/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/generic_clock.c +++ b/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.cpp b/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.cpp index 7f057089a8..21c76fd092 100644 --- a/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.cpp +++ b/variants/STM32F7xx/F765Z(G-I)T_F767Z(G-I)T_F777ZIT/variant_NUCLEO_F767ZI.cpp @@ -188,8 +188,6 @@ extern "C" { * VDD(V) = 3.3 * Main regulator output voltage = Scale1 mode * Flash Latency(WS) = 7 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F768AIY_F769A(G-I)Y_F778AIY_F779AIY/generic_clock.c b/variants/STM32F7xx/F768AIY_F769A(G-I)Y_F778AIY_F779AIY/generic_clock.c index a07e6f64c0..2115dcaca9 100644 --- a/variants/STM32F7xx/F768AIY_F769A(G-I)Y_F778AIY_F779AIY/generic_clock.c +++ b/variants/STM32F7xx/F768AIY_F769A(G-I)Y_F778AIY_F779AIY/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F769B(G-I)T_F769N(G-I)H_F779BIT_F779NIH/generic_clock.c b/variants/STM32F7xx/F769B(G-I)T_F769N(G-I)H_F779BIT_F779NIH/generic_clock.c index c15823ca3a..0f0cd77b74 100644 --- a/variants/STM32F7xx/F769B(G-I)T_F769N(G-I)H_F779BIT_F779NIH/generic_clock.c +++ b/variants/STM32F7xx/F769B(G-I)T_F769N(G-I)H_F779BIT_F779NIH/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32F7xx/F769I(G-I)T_F779IIT/generic_clock.c b/variants/STM32F7xx/F769I(G-I)T_F779IIT/generic_clock.c index 1bbe304d4b..49ab159ad4 100644 --- a/variants/STM32F7xx/F769I(G-I)T_F779IIT/generic_clock.c +++ b/variants/STM32F7xx/F769I(G-I)T_F779IIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G030C(6-8)T/generic_clock.c b/variants/STM32G0xx/G030C(6-8)T/generic_clock.c index 2624500194..6d9e711404 100644 --- a/variants/STM32G0xx/G030C(6-8)T/generic_clock.c +++ b/variants/STM32G0xx/G030C(6-8)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G030F6P/generic_clock.c b/variants/STM32G0xx/G030F6P/generic_clock.c index 040ba7b3b0..f686885b9e 100644 --- a/variants/STM32G0xx/G030F6P/generic_clock.c +++ b/variants/STM32G0xx/G030F6P/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G030J6M/generic_clock.c b/variants/STM32G0xx/G030J6M/generic_clock.c index a01071f898..c89b97f605 100644 --- a/variants/STM32G0xx/G030J6M/generic_clock.c +++ b/variants/STM32G0xx/G030J6M/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G030K(6-8)T/generic_clock.c b/variants/STM32G0xx/G030K(6-8)T/generic_clock.c index e169a6c44f..d73cae4b13 100644 --- a/variants/STM32G0xx/G030K(6-8)T/generic_clock.c +++ b/variants/STM32G0xx/G030K(6-8)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G030K(6-8)T/variant_AURORA_ONE.cpp b/variants/STM32G0xx/G030K(6-8)T/variant_AURORA_ONE.cpp index 95bbf2d306..544a943622 100644 --- a/variants/STM32G0xx/G030K(6-8)T/variant_AURORA_ONE.cpp +++ b/variants/STM32G0xx/G030K(6-8)T/variant_AURORA_ONE.cpp @@ -74,8 +74,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G031C(4-6-8)(T-U)_G041C(6-8)(T-U)/generic_clock.c b/variants/STM32G0xx/G031C(4-6-8)(T-U)_G041C(6-8)(T-U)/generic_clock.c index af2708bd07..d0489b34ee 100644 --- a/variants/STM32G0xx/G031C(4-6-8)(T-U)_G041C(6-8)(T-U)/generic_clock.c +++ b/variants/STM32G0xx/G031C(4-6-8)(T-U)_G041C(6-8)(T-U)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G031F(4-6-8)P_G031Y8Y_G041F(6-8)P_G041Y8Y/generic_clock.c b/variants/STM32G0xx/G031F(4-6-8)P_G031Y8Y_G041F(6-8)P_G041Y8Y/generic_clock.c index e182c39cac..94984c3613 100644 --- a/variants/STM32G0xx/G031F(4-6-8)P_G031Y8Y_G041F(6-8)P_G041Y8Y/generic_clock.c +++ b/variants/STM32G0xx/G031F(4-6-8)P_G031Y8Y_G041F(6-8)P_G041Y8Y/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G031G(4-6-8)U_G041G(6-8)U/generic_clock.c b/variants/STM32G0xx/G031G(4-6-8)U_G041G(6-8)U/generic_clock.c index b3a5dfd57a..0659b1624c 100644 --- a/variants/STM32G0xx/G031G(4-6-8)U_G041G(6-8)U/generic_clock.c +++ b/variants/STM32G0xx/G031G(4-6-8)U_G041G(6-8)U/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G031J(4-6)M_G041J6M/generic_clock.c b/variants/STM32G0xx/G031J(4-6)M_G041J6M/generic_clock.c index f8f2410b1a..60e92c4cf9 100644 --- a/variants/STM32G0xx/G031J(4-6)M_G041J6M/generic_clock.c +++ b/variants/STM32G0xx/G031J(4-6)M_G041J6M/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G031J(4-6)M_G041J6M/variant_DISCO_G0316.cpp b/variants/STM32G0xx/G031J(4-6)M_G041J6M/variant_DISCO_G0316.cpp index cf63c24aef..664df3aaee 100644 --- a/variants/STM32G0xx/G031J(4-6)M_G041J6M/variant_DISCO_G0316.cpp +++ b/variants/STM32G0xx/G031J(4-6)M_G041J6M/variant_DISCO_G0316.cpp @@ -72,8 +72,6 @@ extern "C" { * PLL_P = 2 * PLL_Q = 2 * Flash Latency(WS) = 2 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G031K(4-6-8)(T-U)_G041K(6-8)(T-U)/generic_clock.c b/variants/STM32G0xx/G031K(4-6-8)(T-U)_G041K(6-8)(T-U)/generic_clock.c index 17d02f16a7..5b57f66247 100644 --- a/variants/STM32G0xx/G031K(4-6-8)(T-U)_G041K(6-8)(T-U)/generic_clock.c +++ b/variants/STM32G0xx/G031K(4-6-8)(T-U)_G041K(6-8)(T-U)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G031K(4-6-8)(T-U)_G041K(6-8)(T-U)/variant_NUCLEO_G031K8.cpp b/variants/STM32G0xx/G031K(4-6-8)(T-U)_G041K(6-8)(T-U)/variant_NUCLEO_G031K8.cpp index f5dab09d38..88185ea21b 100644 --- a/variants/STM32G0xx/G031K(4-6-8)(T-U)_G041K(6-8)(T-U)/variant_NUCLEO_G031K8.cpp +++ b/variants/STM32G0xx/G031K(4-6-8)(T-U)_G041K(6-8)(T-U)/variant_NUCLEO_G031K8.cpp @@ -73,8 +73,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G050C(6-8)T/generic_clock.c b/variants/STM32G0xx/G050C(6-8)T/generic_clock.c index abce35c5b6..6ef1974308 100644 --- a/variants/STM32G0xx/G050C(6-8)T/generic_clock.c +++ b/variants/STM32G0xx/G050C(6-8)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G050F6P/generic_clock.c b/variants/STM32G0xx/G050F6P/generic_clock.c index 97a09a0140..40b0abb0d5 100644 --- a/variants/STM32G0xx/G050F6P/generic_clock.c +++ b/variants/STM32G0xx/G050F6P/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G050K(6-8)T/generic_clock.c b/variants/STM32G0xx/G050K(6-8)T/generic_clock.c index 0acb7c9ed5..37d19f76b7 100644 --- a/variants/STM32G0xx/G050K(6-8)T/generic_clock.c +++ b/variants/STM32G0xx/G050K(6-8)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G051C(6-8)(T-U)_G061C(6-8)(T-U)/generic_clock.c b/variants/STM32G0xx/G051C(6-8)(T-U)_G061C(6-8)(T-U)/generic_clock.c index 413775e85b..eb0045acd9 100644 --- a/variants/STM32G0xx/G051C(6-8)(T-U)_G061C(6-8)(T-U)/generic_clock.c +++ b/variants/STM32G0xx/G051C(6-8)(T-U)_G061C(6-8)(T-U)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G051F6P_G051F8(P-Y)_G061F6P_G061F8(P-Y)/generic_clock.c b/variants/STM32G0xx/G051F6P_G051F8(P-Y)_G061F6P_G061F8(P-Y)/generic_clock.c index 5dd32dcad0..34a17de255 100644 --- a/variants/STM32G0xx/G051F6P_G051F8(P-Y)_G061F6P_G061F8(P-Y)/generic_clock.c +++ b/variants/STM32G0xx/G051F6P_G051F8(P-Y)_G061F6P_G061F8(P-Y)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G051G(6-8)U_G061G(6-8)U/generic_clock.c b/variants/STM32G0xx/G051G(6-8)U_G061G(6-8)U/generic_clock.c index 9456aa919a..beca24f36d 100644 --- a/variants/STM32G0xx/G051G(6-8)U_G061G(6-8)U/generic_clock.c +++ b/variants/STM32G0xx/G051G(6-8)U_G061G(6-8)U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G051K(6-8)(T-U)_G061K(6-8)(T-U)/generic_clock.c b/variants/STM32G0xx/G051K(6-8)(T-U)_G061K(6-8)(T-U)/generic_clock.c index ec47321c55..f48a0d5de1 100644 --- a/variants/STM32G0xx/G051K(6-8)(T-U)_G061K(6-8)(T-U)/generic_clock.c +++ b/variants/STM32G0xx/G051K(6-8)(T-U)_G061K(6-8)(T-U)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G070CBT/generic_clock.c b/variants/STM32G0xx/G070CBT/generic_clock.c index 25720fc1bd..ec9fcbdbe6 100644 --- a/variants/STM32G0xx/G070CBT/generic_clock.c +++ b/variants/STM32G0xx/G070CBT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G070KBT/generic_clock.c b/variants/STM32G0xx/G070KBT/generic_clock.c index d84633175a..3ff8e9d8d9 100644 --- a/variants/STM32G0xx/G070KBT/generic_clock.c +++ b/variants/STM32G0xx/G070KBT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G070RBT/generic_clock.c b/variants/STM32G0xx/G070RBT/generic_clock.c index a55722d635..5dc997b3ba 100644 --- a/variants/STM32G0xx/G070RBT/generic_clock.c +++ b/variants/STM32G0xx/G070RBT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G070RBT/variant_NUCLEO_G070RB.cpp b/variants/STM32G0xx/G070RBT/variant_NUCLEO_G070RB.cpp index 944982b846..cf4561659e 100644 --- a/variants/STM32G0xx/G070RBT/variant_NUCLEO_G070RB.cpp +++ b/variants/STM32G0xx/G070RBT/variant_NUCLEO_G070RB.cpp @@ -113,8 +113,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G071C(6-8-B)(T-U)_G081CB(T-U)/generic_clock.c b/variants/STM32G0xx/G071C(6-8-B)(T-U)_G081CB(T-U)/generic_clock.c index 7d8e9f8db1..0f486bde9b 100644 --- a/variants/STM32G0xx/G071C(6-8-B)(T-U)_G081CB(T-U)/generic_clock.c +++ b/variants/STM32G0xx/G071C(6-8-B)(T-U)_G081CB(T-U)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G071C(6-8-B)(T-U)_G081CB(T-U)/variant_AGAFIA_SG0.cpp b/variants/STM32G0xx/G071C(6-8-B)(T-U)_G081CB(T-U)/variant_AGAFIA_SG0.cpp index 2cd80bf7f3..0fc57ba9b9 100644 --- a/variants/STM32G0xx/G071C(6-8-B)(T-U)_G081CB(T-U)/variant_AGAFIA_SG0.cpp +++ b/variants/STM32G0xx/G071C(6-8-B)(T-U)_G081CB(T-U)/variant_AGAFIA_SG0.cpp @@ -122,8 +122,6 @@ extern "C" { * PLL_P = 2 * PLL_Q = 2 * Flash Latency(WS) = 2 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G071EBY_G081EBY/generic_clock.c b/variants/STM32G0xx/G071EBY_G081EBY/generic_clock.c index ccd1f68f37..050c156161 100644 --- a/variants/STM32G0xx/G071EBY_G081EBY/generic_clock.c +++ b/variants/STM32G0xx/G071EBY_G081EBY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G071G(6-8-B)U_G081GBU/generic_clock.c b/variants/STM32G0xx/G071G(6-8-B)U_G081GBU/generic_clock.c index 252d2d0d72..040ed1ffe3 100644 --- a/variants/STM32G0xx/G071G(6-8-B)U_G081GBU/generic_clock.c +++ b/variants/STM32G0xx/G071G(6-8-B)U_G081GBU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G071G(8-B)UxN_G081GBUxN/generic_clock.c b/variants/STM32G0xx/G071G(8-B)UxN_G081GBUxN/generic_clock.c index 12f2a3d325..2f2a6f1e1c 100644 --- a/variants/STM32G0xx/G071G(8-B)UxN_G081GBUxN/generic_clock.c +++ b/variants/STM32G0xx/G071G(8-B)UxN_G081GBUxN/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G071K(6-8-B)(T-U)_G081KB(T-U)/generic_clock.c b/variants/STM32G0xx/G071K(6-8-B)(T-U)_G081KB(T-U)/generic_clock.c index be825a2ea2..de7f5be83a 100644 --- a/variants/STM32G0xx/G071K(6-8-B)(T-U)_G081KB(T-U)/generic_clock.c +++ b/variants/STM32G0xx/G071K(6-8-B)(T-U)_G081KB(T-U)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G071K(8-B)(T-U)xN_G081KB(T-U)xN/generic_clock.c b/variants/STM32G0xx/G071K(8-B)(T-U)xN_G081KB(T-U)xN/generic_clock.c index 6a8b9deebf..f7ed89e68d 100644 --- a/variants/STM32G0xx/G071K(8-B)(T-U)xN_G081KB(T-U)xN/generic_clock.c +++ b/variants/STM32G0xx/G071K(8-B)(T-U)xN_G081KB(T-U)xN/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G071R(6-8)T_G071RB(I-T)_G081RB(I-T)/generic_clock.c b/variants/STM32G0xx/G071R(6-8)T_G071RB(I-T)_G081RB(I-T)/generic_clock.c index 4c8f2033e1..6488db998e 100644 --- a/variants/STM32G0xx/G071R(6-8)T_G071RB(I-T)_G081RB(I-T)/generic_clock.c +++ b/variants/STM32G0xx/G071R(6-8)T_G071RB(I-T)_G081RB(I-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G071R(6-8)T_G071RB(I-T)_G081RB(I-T)/variant_NUCLEO_G071RB.cpp b/variants/STM32G0xx/G071R(6-8)T_G071RB(I-T)_G081RB(I-T)/variant_NUCLEO_G071RB.cpp index 5d0515ba9a..85b0e99de2 100644 --- a/variants/STM32G0xx/G071R(6-8)T_G071RB(I-T)_G081RB(I-T)/variant_NUCLEO_G071RB.cpp +++ b/variants/STM32G0xx/G071R(6-8)T_G071RB(I-T)_G081RB(I-T)/variant_NUCLEO_G071RB.cpp @@ -126,8 +126,6 @@ extern "C" { * PLL_P = 2 * PLL_Q = 2 * Flash Latency(WS) = 2 - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B0CET/generic_clock.c b/variants/STM32G0xx/G0B0CET/generic_clock.c index 6099312c0a..16baea631f 100644 --- a/variants/STM32G0xx/G0B0CET/generic_clock.c +++ b/variants/STM32G0xx/G0B0CET/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B0KET/generic_clock.c b/variants/STM32G0xx/G0B0KET/generic_clock.c index 72ef66c11b..f5b6cac447 100644 --- a/variants/STM32G0xx/G0B0KET/generic_clock.c +++ b/variants/STM32G0xx/G0B0KET/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B0RET/generic_clock.c b/variants/STM32G0xx/G0B0RET/generic_clock.c index cbeccfbdbe..d4612e911c 100644 --- a/variants/STM32G0xx/G0B0RET/generic_clock.c +++ b/variants/STM32G0xx/G0B0RET/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B0VET/generic_clock.c b/variants/STM32G0xx/G0B0VET/generic_clock.c index 742f699b19..b7a30534db 100644 --- a/variants/STM32G0xx/G0B0VET/generic_clock.c +++ b/variants/STM32G0xx/G0B0VET/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B1C(B-C-E)(T-U)_G0C1C(C-E)(T-U)/generic_clock.c b/variants/STM32G0xx/G0B1C(B-C-E)(T-U)_G0C1C(C-E)(T-U)/generic_clock.c index 546c1c55a6..ea24c5e25b 100644 --- a/variants/STM32G0xx/G0B1C(B-C-E)(T-U)_G0C1C(C-E)(T-U)/generic_clock.c +++ b/variants/STM32G0xx/G0B1C(B-C-E)(T-U)_G0C1C(C-E)(T-U)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B1C(B-C-E)(T-U)_G0C1C(C-E)(T-U)/variant_EBB42_V1_1.cpp b/variants/STM32G0xx/G0B1C(B-C-E)(T-U)_G0C1C(C-E)(T-U)/variant_EBB42_V1_1.cpp index 0e85b72a44..604a57c5f5 100644 --- a/variants/STM32G0xx/G0B1C(B-C-E)(T-U)_G0C1C(C-E)(T-U)/variant_EBB42_V1_1.cpp +++ b/variants/STM32G0xx/G0B1C(B-C-E)(T-U)_G0C1C(C-E)(T-U)/variant_EBB42_V1_1.cpp @@ -90,8 +90,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B1C(B-C-E)(T-U)xN_G0C1C(C-E)(T-U)xN/generic_clock.c b/variants/STM32G0xx/G0B1C(B-C-E)(T-U)xN_G0C1C(C-E)(T-U)xN/generic_clock.c index b63c25cb96..4e789d66b3 100644 --- a/variants/STM32G0xx/G0B1C(B-C-E)(T-U)xN_G0C1C(C-E)(T-U)xN/generic_clock.c +++ b/variants/STM32G0xx/G0B1C(B-C-E)(T-U)xN_G0C1C(C-E)(T-U)xN/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B1K(B-C-E)(T-U)_G0C1K(C-E)(T-U)/generic_clock.c b/variants/STM32G0xx/G0B1K(B-C-E)(T-U)_G0C1K(C-E)(T-U)/generic_clock.c index 2d43af93f0..8c579625b0 100644 --- a/variants/STM32G0xx/G0B1K(B-C-E)(T-U)_G0C1K(C-E)(T-U)/generic_clock.c +++ b/variants/STM32G0xx/G0B1K(B-C-E)(T-U)_G0C1K(C-E)(T-U)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B1K(B-C-E)(T-U)xN_G0C1K(C-E)(T-U)xN/generic_clock.c b/variants/STM32G0xx/G0B1K(B-C-E)(T-U)xN_G0C1K(C-E)(T-U)xN/generic_clock.c index 827d810fae..241b303922 100644 --- a/variants/STM32G0xx/G0B1K(B-C-E)(T-U)xN_G0C1K(C-E)(T-U)xN/generic_clock.c +++ b/variants/STM32G0xx/G0B1K(B-C-E)(T-U)xN_G0C1K(C-E)(T-U)xN/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B1M(B-C-E)T_G0C1M(C-E)T/generic_clock.c b/variants/STM32G0xx/G0B1M(B-C-E)T_G0C1M(C-E)T/generic_clock.c index 3129584ca6..61bcdeb813 100644 --- a/variants/STM32G0xx/G0B1M(B-C-E)T_G0C1M(C-E)T/generic_clock.c +++ b/variants/STM32G0xx/G0B1M(B-C-E)T_G0C1M(C-E)T/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B1NEY_G0C1NEY/generic_clock.c b/variants/STM32G0xx/G0B1NEY_G0C1NEY/generic_clock.c index a664bf1fd4..4f2e491333 100644 --- a/variants/STM32G0xx/G0B1NEY_G0C1NEY/generic_clock.c +++ b/variants/STM32G0xx/G0B1NEY_G0C1NEY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B1R(B-C-E)(I-T)xN_G0C1R(C-E)(I-T)xN/generic_clock.c b/variants/STM32G0xx/G0B1R(B-C-E)(I-T)xN_G0C1R(C-E)(I-T)xN/generic_clock.c index 342815a47a..07d5b7bb49 100644 --- a/variants/STM32G0xx/G0B1R(B-C-E)(I-T)xN_G0C1R(C-E)(I-T)xN/generic_clock.c +++ b/variants/STM32G0xx/G0B1R(B-C-E)(I-T)xN_G0C1R(C-E)(I-T)xN/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B1R(B-C-E)T_G0C1R(C-E)T/generic_clock.c b/variants/STM32G0xx/G0B1R(B-C-E)T_G0C1R(C-E)T/generic_clock.c index 1b57b94fc9..0e0fe49b46 100644 --- a/variants/STM32G0xx/G0B1R(B-C-E)T_G0C1R(C-E)T/generic_clock.c +++ b/variants/STM32G0xx/G0B1R(B-C-E)T_G0C1R(C-E)T/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B1R(B-C-E)T_G0C1R(C-E)T/variant_NUCLEO_G0B1RE.cpp b/variants/STM32G0xx/G0B1R(B-C-E)T_G0C1R(C-E)T/variant_NUCLEO_G0B1RE.cpp index bfdf752292..51cdb1ec7a 100644 --- a/variants/STM32G0xx/G0B1R(B-C-E)T_G0C1R(C-E)T/variant_NUCLEO_G0B1RE.cpp +++ b/variants/STM32G0xx/G0B1R(B-C-E)T_G0C1R(C-E)T/variant_NUCLEO_G0B1RE.cpp @@ -113,8 +113,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G0xx/G0B1V(B-C-E)(I-T)_G0C1V(C-E)(I-T)/generic_clock.c b/variants/STM32G0xx/G0B1V(B-C-E)(I-T)_G0C1V(C-E)(I-T)/generic_clock.c index dcd887fbee..703683afc0 100644 --- a/variants/STM32G0xx/G0B1V(B-C-E)(I-T)_G0C1V(C-E)(I-T)/generic_clock.c +++ b/variants/STM32G0xx/G0B1V(B-C-E)(I-T)_G0C1V(C-E)(I-T)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G411C(6-8-B)T/generic_clock.c b/variants/STM32G4xx/G411C(6-8-B)T/generic_clock.c index 06879b8e01..294a9cb259 100644 --- a/variants/STM32G4xx/G411C(6-8-B)T/generic_clock.c +++ b/variants/STM32G4xx/G411C(6-8-B)T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G411C(6-8-B)U/generic_clock.c b/variants/STM32G4xx/G411C(6-8-B)U/generic_clock.c index 0ccb19a435..9780d2c099 100644 --- a/variants/STM32G4xx/G411C(6-8-B)U/generic_clock.c +++ b/variants/STM32G4xx/G411C(6-8-B)U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G411CCT/generic_clock.c b/variants/STM32G4xx/G411CCT/generic_clock.c index 59a90a69b9..ecd07eaf64 100644 --- a/variants/STM32G4xx/G411CCT/generic_clock.c +++ b/variants/STM32G4xx/G411CCT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G411CCU/generic_clock.c b/variants/STM32G4xx/G411CCU/generic_clock.c index 7406c648ba..755faf9065 100644 --- a/variants/STM32G4xx/G411CCU/generic_clock.c +++ b/variants/STM32G4xx/G411CCU/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G411K(6-8-B)(T-U)/generic_clock.c b/variants/STM32G4xx/G411K(6-8-B)(T-U)/generic_clock.c index 6910427742..707e63cf74 100644 --- a/variants/STM32G4xx/G411K(6-8-B)(T-U)/generic_clock.c +++ b/variants/STM32G4xx/G411K(6-8-B)(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G411M(6-8-B)T/generic_clock.c b/variants/STM32G4xx/G411M(6-8-B)T/generic_clock.c index 5abf3b4e9d..79f7b36228 100644 --- a/variants/STM32G4xx/G411M(6-8-B)T/generic_clock.c +++ b/variants/STM32G4xx/G411M(6-8-B)T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G411MCT/generic_clock.c b/variants/STM32G4xx/G411MCT/generic_clock.c index 3c7a07a114..47de73b0e7 100644 --- a/variants/STM32G4xx/G411MCT/generic_clock.c +++ b/variants/STM32G4xx/G411MCT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G411R(6-8-B)T/generic_clock.c b/variants/STM32G4xx/G411R(6-8-B)T/generic_clock.c index b399a11542..9a9353b329 100644 --- a/variants/STM32G4xx/G411R(6-8-B)T/generic_clock.c +++ b/variants/STM32G4xx/G411R(6-8-B)T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G411RCT/generic_clock.c b/variants/STM32G4xx/G411RCT/generic_clock.c index b6c52ab2cf..e5c5df1e9b 100644 --- a/variants/STM32G4xx/G411RCT/generic_clock.c +++ b/variants/STM32G4xx/G411RCT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G414C(B-C)T/generic_clock.c b/variants/STM32G4xx/G414C(B-C)T/generic_clock.c index 4b7b969c51..74611b8a91 100644 --- a/variants/STM32G4xx/G414C(B-C)T/generic_clock.c +++ b/variants/STM32G4xx/G414C(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G414C(B-C)U/generic_clock.c b/variants/STM32G4xx/G414C(B-C)U/generic_clock.c index 15f3d0f7c7..8a8fcd45e4 100644 --- a/variants/STM32G4xx/G414C(B-C)U/generic_clock.c +++ b/variants/STM32G4xx/G414C(B-C)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G414M(B-C)T/generic_clock.c b/variants/STM32G4xx/G414M(B-C)T/generic_clock.c index 36ccd3b907..ba7afa821b 100644 --- a/variants/STM32G4xx/G414M(B-C)T/generic_clock.c +++ b/variants/STM32G4xx/G414M(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G414R(B-C)T/generic_clock.c b/variants/STM32G4xx/G414R(B-C)T/generic_clock.c index 95e84fcfdd..34dd6a262a 100644 --- a/variants/STM32G4xx/G414R(B-C)T/generic_clock.c +++ b/variants/STM32G4xx/G414R(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G414V(B-C)T/generic_clock.c b/variants/STM32G4xx/G414V(B-C)T/generic_clock.c index 11ecdab7b0..f47284e8b9 100644 --- a/variants/STM32G4xx/G414V(B-C)T/generic_clock.c +++ b/variants/STM32G4xx/G414V(B-C)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G431C(6-8-B)T_G441CBT/generic_clock.c b/variants/STM32G4xx/G431C(6-8-B)T_G441CBT/generic_clock.c index 6341219850..02f73e97e9 100644 --- a/variants/STM32G4xx/G431C(6-8-B)T_G441CBT/generic_clock.c +++ b/variants/STM32G4xx/G431C(6-8-B)T_G441CBT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G431C(6-8-B)U_G441CBU/generic_clock.c b/variants/STM32G4xx/G431C(6-8-B)U_G441CBU/generic_clock.c index 614e5eb872..12090bbdca 100644 --- a/variants/STM32G4xx/G431C(6-8-B)U_G441CBU/generic_clock.c +++ b/variants/STM32G4xx/G431C(6-8-B)U_G441CBU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G431C(6-8-B)U_G441CBU/variant_PHOQUE2.cpp b/variants/STM32G4xx/G431C(6-8-B)U_G441CBU/variant_PHOQUE2.cpp index 1e1e91b54a..775b75461e 100644 --- a/variants/STM32G4xx/G431C(6-8-B)U_G441CBU/variant_PHOQUE2.cpp +++ b/variants/STM32G4xx/G431C(6-8-B)U_G441CBU/variant_PHOQUE2.cpp @@ -86,6 +86,9 @@ const pin_size_t analogInputPin[] = { extern "C" { #endif +/** + * @brief System Clock Configuration + */ void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32G4xx/G431CBTxZ/generic_clock.c b/variants/STM32G4xx/G431CBTxZ/generic_clock.c index 709d4f7ea9..2c24c3175f 100644 --- a/variants/STM32G4xx/G431CBTxZ/generic_clock.c +++ b/variants/STM32G4xx/G431CBTxZ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G431CBY_G441CBY/generic_clock.c b/variants/STM32G4xx/G431CBY_G441CBY/generic_clock.c index bfbfef2560..3c33ec37d2 100644 --- a/variants/STM32G4xx/G431CBY_G441CBY/generic_clock.c +++ b/variants/STM32G4xx/G431CBY_G441CBY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G431K(6-8-B)(T-U)_G441KB(T-U)/generic_clock.c b/variants/STM32G4xx/G431K(6-8-B)(T-U)_G441KB(T-U)/generic_clock.c index d0a96f1967..29cb37b2ef 100644 --- a/variants/STM32G4xx/G431K(6-8-B)(T-U)_G441KB(T-U)/generic_clock.c +++ b/variants/STM32G4xx/G431K(6-8-B)(T-U)_G441KB(T-U)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G431M(6-8-B)T_G441MBT/generic_clock.c b/variants/STM32G4xx/G431M(6-8-B)T_G441MBT/generic_clock.c index cbc88f3d27..330b205d23 100644 --- a/variants/STM32G4xx/G431M(6-8-B)T_G441MBT/generic_clock.c +++ b/variants/STM32G4xx/G431M(6-8-B)T_G441MBT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G431R(6-8)(I-T)_G431RB(I-T)x(Z)_G441RB(I-T)/generic_clock.c b/variants/STM32G4xx/G431R(6-8)(I-T)_G431RB(I-T)x(Z)_G441RB(I-T)/generic_clock.c index 2395103b22..3f17dec24f 100644 --- a/variants/STM32G4xx/G431R(6-8)(I-T)_G431RB(I-T)x(Z)_G441RB(I-T)/generic_clock.c +++ b/variants/STM32G4xx/G431R(6-8)(I-T)_G431RB(I-T)x(Z)_G441RB(I-T)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G431V(6-8-B)T_G441VBT/generic_clock.c b/variants/STM32G4xx/G431V(6-8-B)T_G441VBT/generic_clock.c index c458aa2515..6a9229a4a6 100644 --- a/variants/STM32G4xx/G431V(6-8-B)T_G441VBT/generic_clock.c +++ b/variants/STM32G4xx/G431V(6-8-B)T_G441VBT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G431V(6-8-B)T_G441VBT/variant_PHOQUE1.cpp b/variants/STM32G4xx/G431V(6-8-B)T_G441VBT/variant_PHOQUE1.cpp index ca9e952d5a..969b562122 100644 --- a/variants/STM32G4xx/G431V(6-8-B)T_G441VBT/variant_PHOQUE1.cpp +++ b/variants/STM32G4xx/G431V(6-8-B)T_G441VBT/variant_PHOQUE1.cpp @@ -135,6 +135,9 @@ extern "C" const pin_size_t analogInputPin[] = { extern "C" { #endif +/** + * @brief System Clock Configuration + */ void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32G4xx/G471C(C-E)T/generic_clock.c b/variants/STM32G4xx/G471C(C-E)T/generic_clock.c index 0b74cc53f4..6c366df9f6 100644 --- a/variants/STM32G4xx/G471C(C-E)T/generic_clock.c +++ b/variants/STM32G4xx/G471C(C-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G471C(C-E)U/generic_clock.c b/variants/STM32G4xx/G471C(C-E)U/generic_clock.c index ca671c7b16..ba9a9fc753 100644 --- a/variants/STM32G4xx/G471C(C-E)U/generic_clock.c +++ b/variants/STM32G4xx/G471C(C-E)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G471M(C-E)T/generic_clock.c b/variants/STM32G4xx/G471M(C-E)T/generic_clock.c index 606210f81f..6905f0fe61 100644 --- a/variants/STM32G4xx/G471M(C-E)T/generic_clock.c +++ b/variants/STM32G4xx/G471M(C-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G471MEY/generic_clock.c b/variants/STM32G4xx/G471MEY/generic_clock.c index c57e0979d8..2b23a517fc 100644 --- a/variants/STM32G4xx/G471MEY/generic_clock.c +++ b/variants/STM32G4xx/G471MEY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G471Q(C-E)T/generic_clock.c b/variants/STM32G4xx/G471Q(C-E)T/generic_clock.c index 6b950f4e34..dca1959c6e 100644 --- a/variants/STM32G4xx/G471Q(C-E)T/generic_clock.c +++ b/variants/STM32G4xx/G471Q(C-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G471R(C-E)T/generic_clock.c b/variants/STM32G4xx/G471R(C-E)T/generic_clock.c index 1ef4f86ca2..753abf4620 100644 --- a/variants/STM32G4xx/G471R(C-E)T/generic_clock.c +++ b/variants/STM32G4xx/G471R(C-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G471V(C-E)(H-I-T)/generic_clock.c b/variants/STM32G4xx/G471V(C-E)(H-I-T)/generic_clock.c index c48fad793c..991a8df809 100644 --- a/variants/STM32G4xx/G471V(C-E)(H-I-T)/generic_clock.c +++ b/variants/STM32G4xx/G471V(C-E)(H-I-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G473C(B-C-E)T_G474C(B-C-E)T_G483CET_G484CET/generic_clock.c b/variants/STM32G4xx/G473C(B-C-E)T_G474C(B-C-E)T_G483CET_G484CET/generic_clock.c index 084f46c9f4..32eee6c422 100644 --- a/variants/STM32G4xx/G473C(B-C-E)T_G474C(B-C-E)T_G483CET_G484CET/generic_clock.c +++ b/variants/STM32G4xx/G473C(B-C-E)T_G474C(B-C-E)T_G483CET_G484CET/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G473C(B-C-E)U_G474C(B-C-E)U_G483CEU_G484CEU/generic_clock.c b/variants/STM32G4xx/G473C(B-C-E)U_G474C(B-C-E)U_G483CEU_G484CEU/generic_clock.c index b58fe5f220..938ee21a6c 100644 --- a/variants/STM32G4xx/G473C(B-C-E)U_G474C(B-C-E)U_G483CEU_G484CEU/generic_clock.c +++ b/variants/STM32G4xx/G473C(B-C-E)U_G474C(B-C-E)U_G483CEU_G484CEU/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G473M(B-C-E)T_G474M(B-C-E)T_G483MET_G484MET/generic_clock.c b/variants/STM32G4xx/G473M(B-C-E)T_G474M(B-C-E)T_G483MET_G484MET/generic_clock.c index 3469e446c2..e3f4909bfc 100644 --- a/variants/STM32G4xx/G473M(B-C-E)T_G474M(B-C-E)T_G483MET_G484MET/generic_clock.c +++ b/variants/STM32G4xx/G473M(B-C-E)T_G474M(B-C-E)T_G483MET_G484MET/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G473MEY_G474MEY_G483MEY_G484MEY/generic_clock.c b/variants/STM32G4xx/G473MEY_G474MEY_G483MEY_G484MEY/generic_clock.c index ede6015e63..3001cbf3ec 100644 --- a/variants/STM32G4xx/G473MEY_G474MEY_G483MEY_G484MEY/generic_clock.c +++ b/variants/STM32G4xx/G473MEY_G474MEY_G483MEY_G484MEY/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G473P(B-C-E)I_G474P(B-C-E)I_G483PEI_G484PEI/generic_clock.c b/variants/STM32G4xx/G473P(B-C-E)I_G474P(B-C-E)I_G483PEI_G484PEI/generic_clock.c index a40fafdba1..9446a9bcb8 100644 --- a/variants/STM32G4xx/G473P(B-C-E)I_G474P(B-C-E)I_G483PEI_G484PEI/generic_clock.c +++ b/variants/STM32G4xx/G473P(B-C-E)I_G474P(B-C-E)I_G483PEI_G484PEI/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G473Q(B-C)T_G473QETx(Z)_G474Q(B-C-E)T_G483QET_G484QET/generic_clock.c b/variants/STM32G4xx/G473Q(B-C)T_G473QETx(Z)_G474Q(B-C-E)T_G483QET_G484QET/generic_clock.c index 9633e73739..0c39a45ce3 100644 --- a/variants/STM32G4xx/G473Q(B-C)T_G473QETx(Z)_G474Q(B-C-E)T_G483QET_G484QET/generic_clock.c +++ b/variants/STM32G4xx/G473Q(B-C)T_G473QETx(Z)_G474Q(B-C-E)T_G483QET_G484QET/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G473R(B-C)T_G473RETx(Z)_G474R(B-C-E)T_G483RET_G484RET/generic_clock.c b/variants/STM32G4xx/G473R(B-C)T_G473RETx(Z)_G474R(B-C-E)T_G483RET_G484RET/generic_clock.c index 2a73c2bc3f..1e50237d1b 100644 --- a/variants/STM32G4xx/G473R(B-C)T_G473RETx(Z)_G474R(B-C-E)T_G483RET_G484RET/generic_clock.c +++ b/variants/STM32G4xx/G473R(B-C)T_G473RETx(Z)_G474R(B-C-E)T_G483RET_G484RET/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G473V(B-C-E)(H-T)_G474V(B-C-E)(H-T)_G483VE(H-T)_G484VE(H-T)/generic_clock.c b/variants/STM32G4xx/G473V(B-C-E)(H-T)_G474V(B-C-E)(H-T)_G483VE(H-T)_G484VE(H-T)/generic_clock.c index 19cc3eec9d..a4966dfe5e 100644 --- a/variants/STM32G4xx/G473V(B-C-E)(H-T)_G474V(B-C-E)(H-T)_G483VE(H-T)_G484VE(H-T)/generic_clock.c +++ b/variants/STM32G4xx/G473V(B-C-E)(H-T)_G474V(B-C-E)(H-T)_G483VE(H-T)_G484VE(H-T)/generic_clock.c @@ -22,8 +22,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G491C(C-E)T_G4A1CET/generic_clock.c b/variants/STM32G4xx/G491C(C-E)T_G4A1CET/generic_clock.c index 3f878953fb..ed640f94e2 100644 --- a/variants/STM32G4xx/G491C(C-E)T_G4A1CET/generic_clock.c +++ b/variants/STM32G4xx/G491C(C-E)T_G4A1CET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G491C(C-E)U/generic_clock.c b/variants/STM32G4xx/G491C(C-E)U/generic_clock.c index 1e1fa9a114..e33ce4d147 100644 --- a/variants/STM32G4xx/G491C(C-E)U/generic_clock.c +++ b/variants/STM32G4xx/G491C(C-E)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G491K(C-E)U_G4A1KEU/generic_clock.c b/variants/STM32G4xx/G491K(C-E)U_G4A1KEU/generic_clock.c index b6d0ec56f3..af46184c61 100644 --- a/variants/STM32G4xx/G491K(C-E)U_G4A1KEU/generic_clock.c +++ b/variants/STM32G4xx/G491K(C-E)U_G4A1KEU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G491M(C-E)(S-T)_G4A1ME(S-T)/generic_clock.c b/variants/STM32G4xx/G491M(C-E)(S-T)_G4A1ME(S-T)/generic_clock.c index 147446f237..2c1df5225a 100644 --- a/variants/STM32G4xx/G491M(C-E)(S-T)_G4A1ME(S-T)/generic_clock.c +++ b/variants/STM32G4xx/G491M(C-E)(S-T)_G4A1ME(S-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G491RC(I-T)_G491RE(I-T-Y)x(Z)_G4A1RE(I-T-Y)/generic_clock.c b/variants/STM32G4xx/G491RC(I-T)_G491RE(I-T-Y)x(Z)_G4A1RE(I-T-Y)/generic_clock.c index 38f2270994..1d9cf8a55f 100644 --- a/variants/STM32G4xx/G491RC(I-T)_G491RE(I-T-Y)x(Z)_G4A1RE(I-T-Y)/generic_clock.c +++ b/variants/STM32G4xx/G491RC(I-T)_G491RE(I-T-Y)x(Z)_G4A1RE(I-T-Y)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G491V(C-E)T_G4A1VET/generic_clock.c b/variants/STM32G4xx/G491V(C-E)T_G4A1VET/generic_clock.c index c1f94276b5..fcea4eec8e 100644 --- a/variants/STM32G4xx/G491V(C-E)T_G4A1VET/generic_clock.c +++ b/variants/STM32G4xx/G491V(C-E)T_G4A1VET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32G4xx/G4A1CEU/generic_clock.c b/variants/STM32G4xx/G4A1CEU/generic_clock.c index acad3748ed..e5b4d64c13 100644 --- a/variants/STM32G4xx/G4A1CEU/generic_clock.c +++ b/variants/STM32G4xx/G4A1CEU/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H503CB(T-U)/generic_clock.c b/variants/STM32H5xx/H503CB(T-U)/generic_clock.c index e551c58b58..5f4b98880c 100644 --- a/variants/STM32H5xx/H503CB(T-U)/generic_clock.c +++ b/variants/STM32H5xx/H503CB(T-U)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H503EBY/generic_clock.c b/variants/STM32H5xx/H503EBY/generic_clock.c index ae13a79de5..badaf25586 100644 --- a/variants/STM32H5xx/H503EBY/generic_clock.c +++ b/variants/STM32H5xx/H503EBY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H503KBU/generic_clock.c b/variants/STM32H5xx/H503KBU/generic_clock.c index 97c81ecb17..f98788bcd3 100644 --- a/variants/STM32H5xx/H503KBU/generic_clock.c +++ b/variants/STM32H5xx/H503KBU/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H503RBT/generic_clock.c b/variants/STM32H5xx/H503RBT/generic_clock.c index 05793477a7..aedb6685f3 100644 --- a/variants/STM32H5xx/H503RBT/generic_clock.c +++ b/variants/STM32H5xx/H503RBT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H503RBT/variant_NUCLEO_H503RB.cpp b/variants/STM32H5xx/H503RBT/variant_NUCLEO_H503RB.cpp index 69233673c1..ea2607bb4f 100644 --- a/variants/STM32H5xx/H503RBT/variant_NUCLEO_H503RB.cpp +++ b/variants/STM32H5xx/H503RBT/variant_NUCLEO_H503RB.cpp @@ -100,8 +100,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H523C(C-E)(T-U)_H533CE(T-U)/generic_clock.c b/variants/STM32H5xx/H523C(C-E)(T-U)_H533CE(T-U)/generic_clock.c index d330186241..87f67d90a1 100644 --- a/variants/STM32H5xx/H523C(C-E)(T-U)_H533CE(T-U)/generic_clock.c +++ b/variants/STM32H5xx/H523C(C-E)(T-U)_H533CE(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H523HEY_H533HEY/generic_clock.c b/variants/STM32H5xx/H523HEY_H533HEY/generic_clock.c index 4041622d45..4b1cb0c63e 100644 --- a/variants/STM32H5xx/H523HEY_H533HEY/generic_clock.c +++ b/variants/STM32H5xx/H523HEY_H533HEY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H523R(C-E)T_H533RET/generic_clock.c b/variants/STM32H5xx/H523R(C-E)T_H533RET/generic_clock.c index ac7d15cf67..28c4be68f0 100644 --- a/variants/STM32H5xx/H523R(C-E)T_H533RET/generic_clock.c +++ b/variants/STM32H5xx/H523R(C-E)T_H533RET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H523R(C-E)T_H533RET/variant_NUCLEO_H533RE.cpp b/variants/STM32H5xx/H523R(C-E)T_H533RET/variant_NUCLEO_H533RE.cpp index 835a3d9ebf..b1c33b95ba 100644 --- a/variants/STM32H5xx/H523R(C-E)T_H533RET/variant_NUCLEO_H533RE.cpp +++ b/variants/STM32H5xx/H523R(C-E)T_H533RET/variant_NUCLEO_H533RE.cpp @@ -94,8 +94,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H523V(C-E)(I-T)_H533VE(I-T)/generic_clock.c b/variants/STM32H5xx/H523V(C-E)(I-T)_H533VE(I-T)/generic_clock.c index 10e41b336a..3c0d826169 100644 --- a/variants/STM32H5xx/H523V(C-E)(I-T)_H533VE(I-T)/generic_clock.c +++ b/variants/STM32H5xx/H523V(C-E)(I-T)_H533VE(I-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H523Z(C-E)(J-T)_H533ZE(J-T)/generic_clock.c b/variants/STM32H5xx/H523Z(C-E)(J-T)_H533ZE(J-T)/generic_clock.c index 7e9e22fa16..126760f7b0 100644 --- a/variants/STM32H5xx/H523Z(C-E)(J-T)_H533ZE(J-T)/generic_clock.c +++ b/variants/STM32H5xx/H523Z(C-E)(J-T)_H533ZE(J-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H543C(E-G)(T-U)_H553CG(T-U)/generic_clock.c b/variants/STM32H5xx/H543C(E-G)(T-U)_H553CG(T-U)/generic_clock.c index 6ff9b2f4bd..5c917982bf 100644 --- a/variants/STM32H5xx/H543C(E-G)(T-U)_H553CG(T-U)/generic_clock.c +++ b/variants/STM32H5xx/H543C(E-G)(T-U)_H553CG(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H543R(E-G)T_H553RGT/generic_clock.c b/variants/STM32H5xx/H543R(E-G)T_H553RGT/generic_clock.c index 361515a06b..eb42f22164 100644 --- a/variants/STM32H5xx/H543R(E-G)T_H553RGT/generic_clock.c +++ b/variants/STM32H5xx/H543R(E-G)T_H553RGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H543UGY_H553UGY/generic_clock.c b/variants/STM32H5xx/H543UGY_H553UGY/generic_clock.c index bb162fcd48..86ea750f29 100644 --- a/variants/STM32H5xx/H543UGY_H553UGY/generic_clock.c +++ b/variants/STM32H5xx/H543UGY_H553UGY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H543V(E-G)(I-T-Z)_H553VG(I-T-Z)/generic_clock.c b/variants/STM32H5xx/H543V(E-G)(I-T-Z)_H553VG(I-T-Z)/generic_clock.c index 1339788be3..3b21516818 100644 --- a/variants/STM32H5xx/H543V(E-G)(I-T-Z)_H553VG(I-T-Z)/generic_clock.c +++ b/variants/STM32H5xx/H543V(E-G)(I-T-Z)_H553VG(I-T-Z)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H543Z(E-G)(J-T-Z)_H553ZG(J-T-Z)/generic_clock.c b/variants/STM32H5xx/H543Z(E-G)(J-T-Z)_H553ZG(J-T-Z)/generic_clock.c index 88d4320de4..5b13162032 100644 --- a/variants/STM32H5xx/H543Z(E-G)(J-T-Z)_H553ZG(J-T-Z)/generic_clock.c +++ b/variants/STM32H5xx/H543Z(E-G)(J-T-Z)_H553ZG(J-T-Z)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H562A(G-I)I/generic_clock.c b/variants/STM32H5xx/H562A(G-I)I/generic_clock.c index b68513a10f..bf730f7787 100644 --- a/variants/STM32H5xx/H562A(G-I)I/generic_clock.c +++ b/variants/STM32H5xx/H562A(G-I)I/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H562I(G-I)(K-T)/generic_clock.c b/variants/STM32H5xx/H562I(G-I)(K-T)/generic_clock.c index 34a591ba12..358923f97d 100644 --- a/variants/STM32H5xx/H562I(G-I)(K-T)/generic_clock.c +++ b/variants/STM32H5xx/H562I(G-I)(K-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H562R(G-I)T/generic_clock.c b/variants/STM32H5xx/H562R(G-I)T/generic_clock.c index 1a0abf62c2..d8cbe97f24 100644 --- a/variants/STM32H5xx/H562R(G-I)T/generic_clock.c +++ b/variants/STM32H5xx/H562R(G-I)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H562R(G-I)T/variant_WEACT_H562RG.cpp b/variants/STM32H5xx/H562R(G-I)T/variant_WEACT_H562RG.cpp index 9b505c7ca8..e8ca24562d 100644 --- a/variants/STM32H5xx/H562R(G-I)T/variant_WEACT_H562RG.cpp +++ b/variants/STM32H5xx/H562R(G-I)T/variant_WEACT_H562RG.cpp @@ -94,8 +94,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H562R(G-I)V/generic_clock.c b/variants/STM32H5xx/H562R(G-I)V/generic_clock.c index 5434649ace..a325e8906e 100644 --- a/variants/STM32H5xx/H562R(G-I)V/generic_clock.c +++ b/variants/STM32H5xx/H562R(G-I)V/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H562V(G-I)T/generic_clock.c b/variants/STM32H5xx/H562V(G-I)T/generic_clock.c index 042c8bad98..5e0655a872 100644 --- a/variants/STM32H5xx/H562V(G-I)T/generic_clock.c +++ b/variants/STM32H5xx/H562V(G-I)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H562Z(G-I)T/generic_clock.c b/variants/STM32H5xx/H562Z(G-I)T/generic_clock.c index 6a9099fb4c..5d74a2128c 100644 --- a/variants/STM32H5xx/H562Z(G-I)T/generic_clock.c +++ b/variants/STM32H5xx/H562Z(G-I)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563A(G-I)I_H573AII/generic_clock.c b/variants/STM32H5xx/H563A(G-I)I_H573AII/generic_clock.c index 5bee13d537..d83a2ff893 100644 --- a/variants/STM32H5xx/H563A(G-I)I_H573AII/generic_clock.c +++ b/variants/STM32H5xx/H563A(G-I)I_H573AII/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563AIIxQ_H573AIIxQ/generic_clock.c b/variants/STM32H5xx/H563AIIxQ_H573AIIxQ/generic_clock.c index c2db916941..c402ced707 100644 --- a/variants/STM32H5xx/H563AIIxQ_H573AIIxQ/generic_clock.c +++ b/variants/STM32H5xx/H563AIIxQ_H573AIIxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563I(G-I)(K-T)_H563LIHxQ_H573II(K-T)_H573LIHxQ/generic_clock.c b/variants/STM32H5xx/H563I(G-I)(K-T)_H563LIHxQ_H573II(K-T)_H573LIHxQ/generic_clock.c index b75dd46a42..d87f5f5367 100644 --- a/variants/STM32H5xx/H563I(G-I)(K-T)_H563LIHxQ_H573II(K-T)_H573LIHxQ/generic_clock.c +++ b/variants/STM32H5xx/H563I(G-I)(K-T)_H563LIHxQ_H573II(K-T)_H573LIHxQ/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563IIKxQ_H573IIKxQ/generic_clock.c b/variants/STM32H5xx/H563IIKxQ_H573IIKxQ/generic_clock.c index 804709efd0..afde7b771b 100644 --- a/variants/STM32H5xx/H563IIKxQ_H573IIKxQ/generic_clock.c +++ b/variants/STM32H5xx/H563IIKxQ_H573IIKxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563IIKxQ_H573IIKxQ/variant_STM32H573I_DK.cpp b/variants/STM32H5xx/H563IIKxQ_H573IIKxQ/variant_STM32H573I_DK.cpp index ba31dc6d79..41054f4108 100644 --- a/variants/STM32H5xx/H563IIKxQ_H573IIKxQ/variant_STM32H573I_DK.cpp +++ b/variants/STM32H5xx/H563IIKxQ_H573IIKxQ/variant_STM32H573I_DK.cpp @@ -190,8 +190,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563IITxQ_H573IITxQ/generic_clock.c b/variants/STM32H5xx/H563IITxQ_H573IITxQ/generic_clock.c index 7719cc5de0..54d582956a 100644 --- a/variants/STM32H5xx/H563IITxQ_H573IITxQ/generic_clock.c +++ b/variants/STM32H5xx/H563IITxQ_H573IITxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563MIYxQ_H573MIYxQ/generic_clock.c b/variants/STM32H5xx/H563MIYxQ_H573MIYxQ/generic_clock.c index 273a5c2e75..9f3a477987 100644 --- a/variants/STM32H5xx/H563MIYxQ_H573MIYxQ/generic_clock.c +++ b/variants/STM32H5xx/H563MIYxQ_H573MIYxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563R(G-I)T_H573RIT/generic_clock.c b/variants/STM32H5xx/H563R(G-I)T_H573RIT/generic_clock.c index 3ce37be061..312bde87d4 100644 --- a/variants/STM32H5xx/H563R(G-I)T_H573RIT/generic_clock.c +++ b/variants/STM32H5xx/H563R(G-I)T_H573RIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563R(G-I)V_H573RIV/generic_clock.c b/variants/STM32H5xx/H563R(G-I)V_H573RIV/generic_clock.c index fd21409717..a0c3adb4a6 100644 --- a/variants/STM32H5xx/H563R(G-I)V_H573RIV/generic_clock.c +++ b/variants/STM32H5xx/H563R(G-I)V_H573RIV/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563V(G-I)T_H573VIT/generic_clock.c b/variants/STM32H5xx/H563V(G-I)T_H573VIT/generic_clock.c index bb368dae15..e216b17eb5 100644 --- a/variants/STM32H5xx/H563V(G-I)T_H573VIT/generic_clock.c +++ b/variants/STM32H5xx/H563V(G-I)T_H573VIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563VITxQ_H573VITxQ/generic_clock.c b/variants/STM32H5xx/H563VITxQ_H573VITxQ/generic_clock.c index 12dea1c616..c9aeaed648 100644 --- a/variants/STM32H5xx/H563VITxQ_H573VITxQ/generic_clock.c +++ b/variants/STM32H5xx/H563VITxQ_H573VITxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563Z(G-I)T_H573ZIT/generic_clock.c b/variants/STM32H5xx/H563Z(G-I)T_H573ZIT/generic_clock.c index eb6d45bfed..67a7f1745f 100644 --- a/variants/STM32H5xx/H563Z(G-I)T_H573ZIT/generic_clock.c +++ b/variants/STM32H5xx/H563Z(G-I)T_H573ZIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563Z(G-I)T_H573ZIT/variant_NUCLEO_H563ZI.cpp b/variants/STM32H5xx/H563Z(G-I)T_H573ZIT/variant_NUCLEO_H563ZI.cpp index cc87335f92..6083a43cbb 100644 --- a/variants/STM32H5xx/H563Z(G-I)T_H573ZIT/variant_NUCLEO_H563ZI.cpp +++ b/variants/STM32H5xx/H563Z(G-I)T_H573ZIT/variant_NUCLEO_H563ZI.cpp @@ -164,8 +164,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H563ZITxQ_H573ZITxQ/generic_clock.c b/variants/STM32H5xx/H563ZITxQ_H573ZITxQ/generic_clock.c index 54c67d8ebe..d1a78d6409 100644 --- a/variants/STM32H5xx/H563ZITxQ_H573ZITxQ/generic_clock.c +++ b/variants/STM32H5xx/H563ZITxQ_H573ZITxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E4A(J-K)I_H5F4AJI/generic_clock.c b/variants/STM32H5xx/H5E4A(J-K)I_H5F4AJI/generic_clock.c index f8c8415af8..9ad8f4875b 100644 --- a/variants/STM32H5xx/H5E4A(J-K)I_H5F4AJI/generic_clock.c +++ b/variants/STM32H5xx/H5E4A(J-K)I_H5F4AJI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E4AJIxQ_H5F4AJIxQ/generic_clock.c b/variants/STM32H5xx/H5E4AJIxQ_H5F4AJIxQ/generic_clock.c index 5204d113dc..c1cec901ff 100644 --- a/variants/STM32H5xx/H5E4AJIxQ_H5F4AJIxQ/generic_clock.c +++ b/variants/STM32H5xx/H5E4AJIxQ_H5F4AJIxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E4I(J-K)(K-T)_H5F4IJ(K-T)/generic_clock.c b/variants/STM32H5xx/H5E4I(J-K)(K-T)_H5F4IJ(K-T)/generic_clock.c index fe4f39eca8..ac21c943eb 100644 --- a/variants/STM32H5xx/H5E4I(J-K)(K-T)_H5F4IJ(K-T)/generic_clock.c +++ b/variants/STM32H5xx/H5E4I(J-K)(K-T)_H5F4IJ(K-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E4IJKxQ_H5F4IJKxQ/generic_clock.c b/variants/STM32H5xx/H5E4IJKxQ_H5F4IJKxQ/generic_clock.c index bcf1327d19..76f1d26165 100644 --- a/variants/STM32H5xx/H5E4IJKxQ_H5F4IJKxQ/generic_clock.c +++ b/variants/STM32H5xx/H5E4IJKxQ_H5F4IJKxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E4IJTxQ_H5F4IJTxQ/generic_clock.c b/variants/STM32H5xx/H5E4IJTxQ_H5F4IJTxQ/generic_clock.c index bf1b1a8e46..635042bbde 100644 --- a/variants/STM32H5xx/H5E4IJTxQ_H5F4IJTxQ/generic_clock.c +++ b/variants/STM32H5xx/H5E4IJTxQ_H5F4IJTxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E4V(J-K)T_H5F4VJT/generic_clock.c b/variants/STM32H5xx/H5E4V(J-K)T_H5F4VJT/generic_clock.c index 5aae170b4e..0261a173cb 100644 --- a/variants/STM32H5xx/H5E4V(J-K)T_H5F4VJT/generic_clock.c +++ b/variants/STM32H5xx/H5E4V(J-K)T_H5F4VJT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E4VJTxQ_H5F4VJTxQ/generic_clock.c b/variants/STM32H5xx/H5E4VJTxQ_H5F4VJTxQ/generic_clock.c index bbca310765..a83e147e9a 100644 --- a/variants/STM32H5xx/H5E4VJTxQ_H5F4VJTxQ/generic_clock.c +++ b/variants/STM32H5xx/H5E4VJTxQ_H5F4VJTxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E4Z(J-K)J_H5F4ZJJ/generic_clock.c b/variants/STM32H5xx/H5E4Z(J-K)J_H5F4ZJJ/generic_clock.c index a96c8e413d..6d529646bc 100644 --- a/variants/STM32H5xx/H5E4Z(J-K)J_H5F4ZJJ/generic_clock.c +++ b/variants/STM32H5xx/H5E4Z(J-K)J_H5F4ZJJ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E4Z(J-K)T_H5F4ZJT/generic_clock.c b/variants/STM32H5xx/H5E4Z(J-K)T_H5F4ZJT/generic_clock.c index 9aabd8464d..7ed96404ca 100644 --- a/variants/STM32H5xx/H5E4Z(J-K)T_H5F4ZJT/generic_clock.c +++ b/variants/STM32H5xx/H5E4Z(J-K)T_H5F4ZJT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E4ZJJxQ_H5F4ZJJxQ/generic_clock.c b/variants/STM32H5xx/H5E4ZJJxQ_H5F4ZJJxQ/generic_clock.c index e2451295d4..c3822857e3 100644 --- a/variants/STM32H5xx/H5E4ZJJxQ_H5F4ZJJxQ/generic_clock.c +++ b/variants/STM32H5xx/H5E4ZJJxQ_H5F4ZJJxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E4ZJTxQ_H5F4ZJTxQ/generic_clock.c b/variants/STM32H5xx/H5E4ZJTxQ_H5F4ZJTxQ/generic_clock.c index 92e80c3565..78a7c7d16b 100644 --- a/variants/STM32H5xx/H5E4ZJTxQ_H5F4ZJTxQ/generic_clock.c +++ b/variants/STM32H5xx/H5E4ZJTxQ_H5F4ZJTxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E5I(J-K)KxQ_H5F5IJKxQ/generic_clock.c b/variants/STM32H5xx/H5E5I(J-K)KxQ_H5F5IJKxQ/generic_clock.c index 7933b0a28a..9743e41872 100644 --- a/variants/STM32H5xx/H5E5I(J-K)KxQ_H5F5IJKxQ/generic_clock.c +++ b/variants/STM32H5xx/H5E5I(J-K)KxQ_H5F5IJKxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E5I(J-K)TxQ_H5F5IJTxQ/generic_clock.c b/variants/STM32H5xx/H5E5I(J-K)TxQ_H5F5IJTxQ/generic_clock.c index cb4abb6a32..0062c3bd55 100644 --- a/variants/STM32H5xx/H5E5I(J-K)TxQ_H5F5IJTxQ/generic_clock.c +++ b/variants/STM32H5xx/H5E5I(J-K)TxQ_H5F5IJTxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E5L(J-K)HxQ_H5F5LJHxQ/generic_clock.c b/variants/STM32H5xx/H5E5L(J-K)HxQ_H5F5LJHxQ/generic_clock.c index f9c24f7280..d0b108345d 100644 --- a/variants/STM32H5xx/H5E5L(J-K)HxQ_H5F5LJHxQ/generic_clock.c +++ b/variants/STM32H5xx/H5E5L(J-K)HxQ_H5F5LJHxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E5V(J-K)YxQ_H5F5VJYxQ/generic_clock.c b/variants/STM32H5xx/H5E5V(J-K)YxQ_H5F5VJYxQ/generic_clock.c index b15dd43b2f..c6ae736add 100644 --- a/variants/STM32H5xx/H5E5V(J-K)YxQ_H5F5VJYxQ/generic_clock.c +++ b/variants/STM32H5xx/H5E5V(J-K)YxQ_H5F5VJYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E5Z(J-K)T_H5F5ZJT/generic_clock.c b/variants/STM32H5xx/H5E5Z(J-K)T_H5F5ZJT/generic_clock.c index e068d3cec1..3081cfc848 100644 --- a/variants/STM32H5xx/H5E5Z(J-K)T_H5F5ZJT/generic_clock.c +++ b/variants/STM32H5xx/H5E5Z(J-K)T_H5F5ZJT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H5xx/H5E5Z(J-K)T_H5F5ZJT/variant_NUCLEO_H5E5ZJ.cpp b/variants/STM32H5xx/H5E5Z(J-K)T_H5F5ZJT/variant_NUCLEO_H5E5ZJ.cpp index 1ae838fe2c..4bad7d79d2 100644 --- a/variants/STM32H5xx/H5E5Z(J-K)T_H5F5ZJT/variant_NUCLEO_H5E5ZJ.cpp +++ b/variants/STM32H5xx/H5E5Z(J-K)T_H5F5ZJT/variant_NUCLEO_H5E5ZJ.cpp @@ -150,8 +150,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H723V(E-G)(H-T)_H730VB(H-T)_H733VG(H-T)/generic_clock.c b/variants/STM32H7xx/H723V(E-G)(H-T)_H730VB(H-T)_H733VG(H-T)/generic_clock.c index 8a9f1fdac5..3edb97fe0f 100644 --- a/variants/STM32H7xx/H723V(E-G)(H-T)_H730VB(H-T)_H733VG(H-T)/generic_clock.c +++ b/variants/STM32H7xx/H723V(E-G)(H-T)_H730VB(H-T)_H733VG(H-T)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H723V(E-G)(H-T)_H730VB(H-T)_H733VG(H-T)/variant_WeActMiniH723VGTX.cpp b/variants/STM32H7xx/H723V(E-G)(H-T)_H730VB(H-T)_H733VG(H-T)/variant_WeActMiniH723VGTX.cpp index 01638e352d..0db1190040 100644 --- a/variants/STM32H7xx/H723V(E-G)(H-T)_H730VB(H-T)_H733VG(H-T)/variant_WeActMiniH723VGTX.cpp +++ b/variants/STM32H7xx/H723V(E-G)(H-T)_H730VB(H-T)_H733VG(H-T)/variant_WeActMiniH723VGTX.cpp @@ -119,6 +119,9 @@ const pin_size_t analogInputPin[] = { 63 // A15, PB1 }; +/** + * @brief System Clock Configuration + */ WEAK void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {}; diff --git a/variants/STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI/generic_clock.c b/variants/STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI/generic_clock.c index e299f3a6ce..de07f0f117 100644 --- a/variants/STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI/generic_clock.c +++ b/variants/STM32H7xx/H723Z(E-G)I_H730ZBI_H733ZGI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT/generic_clock.c b/variants/STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT/generic_clock.c index bc12a2cd8e..2cc3645720 100644 --- a/variants/STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT/generic_clock.c +++ b/variants/STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT/variant_NUCLEO_H723ZG.cpp b/variants/STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT/variant_NUCLEO_H723ZG.cpp index b9bddafa26..a97baeac5b 100644 --- a/variants/STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT/variant_NUCLEO_H723ZG.cpp +++ b/variants/STM32H7xx/H723Z(E-G)T_H730ZBT_H733ZGT/variant_NUCLEO_H723ZG.cpp @@ -176,8 +176,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H725A(E-G)I_H730ABIxQ_H735AGI/generic_clock.c b/variants/STM32H7xx/H725A(E-G)I_H730ABIxQ_H735AGI/generic_clock.c index c7631f1793..8bf9ac9824 100644 --- a/variants/STM32H7xx/H725A(E-G)I_H730ABIxQ_H735AGI/generic_clock.c +++ b/variants/STM32H7xx/H725A(E-G)I_H730ABIxQ_H735AGI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H725I(E-G)K_H730IBKxQ_H735IGK/generic_clock.c b/variants/STM32H7xx/H725I(E-G)K_H730IBKxQ_H735IGK/generic_clock.c index dc4d89bb68..a87e752c33 100644 --- a/variants/STM32H7xx/H725I(E-G)K_H730IBKxQ_H735IGK/generic_clock.c +++ b/variants/STM32H7xx/H725I(E-G)K_H730IBKxQ_H735IGK/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H725I(E-G)T_H730IBTxQ_H735IGT/generic_clock.c b/variants/STM32H7xx/H725I(E-G)T_H730IBTxQ_H735IGT/generic_clock.c index 014225b7a2..2af42d8052 100644 --- a/variants/STM32H7xx/H725I(E-G)T_H730IBTxQ_H735IGT/generic_clock.c +++ b/variants/STM32H7xx/H725I(E-G)T_H730IBTxQ_H735IGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H725R(E-G)V_H735RGV/generic_clock.c b/variants/STM32H7xx/H725R(E-G)V_H735RGV/generic_clock.c index e53f175b3f..89641e02f9 100644 --- a/variants/STM32H7xx/H725R(E-G)V_H735RGV/generic_clock.c +++ b/variants/STM32H7xx/H725R(E-G)V_H735RGV/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H725V(E-G)H_H735VGH/generic_clock.c b/variants/STM32H7xx/H725V(E-G)H_H735VGH/generic_clock.c index 3ed70c7654..d6e32cb33b 100644 --- a/variants/STM32H7xx/H725V(E-G)H_H735VGH/generic_clock.c +++ b/variants/STM32H7xx/H725V(E-G)H_H735VGH/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H725V(E-G)T_H735VGT/generic_clock.c b/variants/STM32H7xx/H725V(E-G)T_H735VGT/generic_clock.c index 0ef517e976..956b4758b4 100644 --- a/variants/STM32H7xx/H725V(E-G)T_H735VGT/generic_clock.c +++ b/variants/STM32H7xx/H725V(E-G)T_H735VGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H725VGY_H735VGY/generic_clock.c b/variants/STM32H7xx/H725VGY_H735VGY/generic_clock.c index a2b5263d4c..5bc9e83a32 100644 --- a/variants/STM32H7xx/H725VGY_H735VGY/generic_clock.c +++ b/variants/STM32H7xx/H725VGY_H735VGY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H725Z(E-G)T_H735ZGT/generic_clock.c b/variants/STM32H7xx/H725Z(E-G)T_H735ZGT/generic_clock.c index 7adfb781db..26c5cba1d0 100644 --- a/variants/STM32H7xx/H725Z(E-G)T_H735ZGT/generic_clock.c +++ b/variants/STM32H7xx/H725Z(E-G)T_H735ZGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H742A(G-I)I_H743A(G-I)I_H753AII/generic_clock.c b/variants/STM32H7xx/H742A(G-I)I_H743A(G-I)I_H753AII/generic_clock.c index 50dd2863a2..e2edd46d73 100644 --- a/variants/STM32H7xx/H742A(G-I)I_H743A(G-I)I_H753AII/generic_clock.c +++ b/variants/STM32H7xx/H742A(G-I)I_H743A(G-I)I_H753AII/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H742B(G-I)T_H743B(G-I)T_H753BIT/generic_clock.c b/variants/STM32H7xx/H742B(G-I)T_H743B(G-I)T_H753BIT/generic_clock.c index 7877be1ade..af463806b1 100644 --- a/variants/STM32H7xx/H742B(G-I)T_H743B(G-I)T_H753BIT/generic_clock.c +++ b/variants/STM32H7xx/H742B(G-I)T_H743B(G-I)T_H753BIT/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/generic_clock.c b/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/generic_clock.c index 3d3e9484fd..78d505b0db 100644 --- a/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/generic_clock.c +++ b/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/generic_clock.c @@ -20,8 +20,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/variant_DAISY_PATCH_SM.cpp b/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/variant_DAISY_PATCH_SM.cpp index 4b9e6e9db3..ce6680f5e6 100644 --- a/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/variant_DAISY_PATCH_SM.cpp +++ b/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/variant_DAISY_PATCH_SM.cpp @@ -154,8 +154,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/variant_DAISY_PETAL_SM.cpp b/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/variant_DAISY_PETAL_SM.cpp index 64cf00b766..d2b6daf590 100644 --- a/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/variant_DAISY_PETAL_SM.cpp +++ b/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/variant_DAISY_PETAL_SM.cpp @@ -84,8 +84,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/variant_DAISY_SEED.cpp b/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/variant_DAISY_SEED.cpp index e95f059b78..e136afff9e 100644 --- a/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/variant_DAISY_SEED.cpp +++ b/variants/STM32H7xx/H742I(G-I)(K-T)_H743I(G-I)(K-T)_H750IB(K-T)_H753II(K-T)/variant_DAISY_SEED.cpp @@ -84,8 +84,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/generic_clock.c b/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/generic_clock.c index 513fe57b74..062f7ab932 100644 --- a/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/generic_clock.c +++ b/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/generic_clock.c @@ -20,8 +20,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_DevEBoxH7xx.cpp b/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_DevEBoxH7xx.cpp index ac39df518b..ba7f4d169e 100644 --- a/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_DevEBoxH7xx.cpp +++ b/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_DevEBoxH7xx.cpp @@ -121,9 +121,7 @@ const pin_size_t analogInputPin[] = { }; /** - * @brief System Clock Configuration - * @param None - * @retval None + * @brief System Clock Configuration */ WEAK void SystemClock_Config(void) { @@ -259,10 +257,6 @@ WEAK void SystemClock_Config(void) } } -/* - * Power saving mode, mcu runs significantly cooler - * Sysclock 240 Mhz, bus clocks 120 Mhz - */ void SysClkHalfSpeed() { RCC_ClkInitTypeDef RCC_ClkInitStruct = { }; @@ -284,10 +278,6 @@ void SysClkHalfSpeed() } } -/* - * Full speed - sysclk from PLL1 P - 480 Mhz - * Sysclock 480 Mhz, bus clocks 240 Mhz - */ void SysClkFullSpeed() { RCC_ClkInitTypeDef RCC_ClkInitStruct = { }; diff --git a/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_DevEBoxH7xx.h b/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_DevEBoxH7xx.h index 10430f322d..776bcb15d9 100644 --- a/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_DevEBoxH7xx.h +++ b/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_DevEBoxH7xx.h @@ -277,15 +277,16 @@ extern "C" { #endif -/* - * Power saving mode, mcu runs significantly cooler - * Sysclock 240 Mhz, bus clocks 120 Mhz +/** + * @brief Power saving mode, the MCU runs significantly cooler. + * Sysclock 240 MHz, bus clocks 120 MHz. + * @note Uses the PLL configured by SystemClock_Config(). Calls Error_Handler() on failure. */ void SysClkHalfSpeed(); -/* - * Full speed - sysclk from PLL1 P - 480 Mhz - * Sysclock 480 Mhz, bus clocks 240 Mhz +/** + * @brief Full speed, sysclk from PLL1 P: sysclock 480 MHz, bus clocks 240 MHz. + * @note Uses the PLL configured by SystemClock_Config(). Calls Error_Handler() on failure. */ void SysClkFullSpeed(); diff --git a/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_WeActMiniH7xx.cpp b/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_WeActMiniH7xx.cpp index 9d2d574432..8d7537c6a6 100644 --- a/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_WeActMiniH7xx.cpp +++ b/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_WeActMiniH7xx.cpp @@ -121,9 +121,7 @@ const pin_size_t analogInputPin[] = { }; /** - * @brief System Clock Configuration - * @param None - * @retval None + * @brief System Clock Configuration */ WEAK void SystemClock_Config(void) { @@ -259,10 +257,6 @@ WEAK void SystemClock_Config(void) } } -/* - * Power saving mode, mcu runs significantly cooler - * Sysclock 240 Mhz, bus clocks 120 Mhz - */ void SysClkHalfSpeed() { RCC_ClkInitTypeDef RCC_ClkInitStruct = { }; @@ -284,10 +278,6 @@ void SysClkHalfSpeed() } } -/* - * Full speed - sysclk from PLL1 P - 480 Mhz - * Sysclock 480 Mhz, bus clocks 240 Mhz - */ void SysClkFullSpeed() { RCC_ClkInitTypeDef RCC_ClkInitStruct = { }; diff --git a/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_WeActMiniH7xx.h b/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_WeActMiniH7xx.h index a74c67cdd7..e8dbbd37c9 100644 --- a/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_WeActMiniH7xx.h +++ b/variants/STM32H7xx/H742V(G-I)(H-T)_H743V(G-I)(H-T)_H750VBT_H753VI(H-T)/variant_WeActMiniH7xx.h @@ -276,15 +276,16 @@ extern "C" { #endif -/* - * Power saving mode, mcu runs significantly cooler - * Sysclock 240 Mhz, bus clocks 120 Mhz +/** + * @brief Power saving mode, the MCU runs significantly cooler. + * Sysclock 240 MHz, bus clocks 120 MHz. + * @note Uses the PLL configured by SystemClock_Config(). Calls Error_Handler() on failure. */ void SysClkHalfSpeed(); -/* - * Full speed - sysclk from PLL1 P - 480 Mhz - * Sysclock 480 Mhz, bus clocks 240 Mhz +/** + * @brief Full speed, sysclk from PLL1 P: sysclock 480 MHz, bus clocks 240 MHz. + * @note Uses the PLL configured by SystemClock_Config(). Calls Error_Handler() on failure. */ void SysClkFullSpeed(); diff --git a/variants/STM32H7xx/H742X(G-I)H_H743X(G-I)H_H745X(G-I)H_H747X(G-I)H_H750XBH_H753XIH_H755XIH_H757XIH/generic_clock.c b/variants/STM32H7xx/H742X(G-I)H_H743X(G-I)H_H745X(G-I)H_H747X(G-I)H_H750XBH_H753XIH_H755XIH_H757XIH/generic_clock.c index 26228f0a6a..f9a9dc4e05 100644 --- a/variants/STM32H7xx/H742X(G-I)H_H743X(G-I)H_H745X(G-I)H_H747X(G-I)H_H750XBH_H753XIH_H755XIH_H757XIH/generic_clock.c +++ b/variants/STM32H7xx/H742X(G-I)H_H743X(G-I)H_H745X(G-I)H_H747X(G-I)H_H750XBH_H753XIH_H755XIH_H757XIH/generic_clock.c @@ -20,8 +20,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H742X(G-I)H_H743X(G-I)H_H745X(G-I)H_H747X(G-I)H_H750XBH_H753XIH_H755XIH_H757XIH/variant_STM32H747I_DISCO.cpp b/variants/STM32H7xx/H742X(G-I)H_H743X(G-I)H_H745X(G-I)H_H747X(G-I)H_H750XBH_H753XIH_H755XIH_H757XIH/variant_STM32H747I_DISCO.cpp index 36621f7e99..17c4cc2244 100644 --- a/variants/STM32H7xx/H742X(G-I)H_H743X(G-I)H_H745X(G-I)H_H747X(G-I)H_H750XBH_H753XIH_H755XIH_H757XIH/variant_STM32H747I_DISCO.cpp +++ b/variants/STM32H7xx/H742X(G-I)H_H743X(G-I)H_H745X(G-I)H_H747X(G-I)H_H750XBH_H753XIH_H755XIH_H757XIH/variant_STM32H747I_DISCO.cpp @@ -205,8 +205,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT/generic_clock.c b/variants/STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT/generic_clock.c index b9b51f90a7..9964e4d764 100644 --- a/variants/STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT/generic_clock.c +++ b/variants/STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT/generic_clock.c @@ -20,8 +20,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT/variant_NUCLEO_H743ZI.cpp b/variants/STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT/variant_NUCLEO_H743ZI.cpp index 41602285dc..e72cca3fc3 100644 --- a/variants/STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT/variant_NUCLEO_H743ZI.cpp +++ b/variants/STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT/variant_NUCLEO_H743ZI.cpp @@ -307,8 +307,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT/variant_NUCLEO_H753ZI.cpp b/variants/STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT/variant_NUCLEO_H753ZI.cpp index 8576744ce0..7ec462b38c 100644 --- a/variants/STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT/variant_NUCLEO_H753ZI.cpp +++ b/variants/STM32H7xx/H742Z(G-I)T_H743Z(G-I)T_H747A(G-I)I_H747I(G-I)T_H750ZBT_H753ZIT_H757AII_H757IIT/variant_NUCLEO_H753ZI.cpp @@ -176,8 +176,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H745B(G-I)T_H755BIT/generic_clock.c b/variants/STM32H7xx/H745B(G-I)T_H755BIT/generic_clock.c index a0677b65a5..e02011e2e8 100644 --- a/variants/STM32H7xx/H745B(G-I)T_H755BIT/generic_clock.c +++ b/variants/STM32H7xx/H745B(G-I)T_H755BIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H745I(G-I)K_H755IIK/generic_clock.c b/variants/STM32H7xx/H745I(G-I)K_H755IIK/generic_clock.c index f834fea304..9342a618e2 100644 --- a/variants/STM32H7xx/H745I(G-I)K_H755IIK/generic_clock.c +++ b/variants/STM32H7xx/H745I(G-I)K_H755IIK/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H745I(G-I)T_H755IIT/generic_clock.c b/variants/STM32H7xx/H745I(G-I)T_H755IIT/generic_clock.c index 91e46a3be0..60a7578ddb 100644 --- a/variants/STM32H7xx/H745I(G-I)T_H755IIT/generic_clock.c +++ b/variants/STM32H7xx/H745I(G-I)T_H755IIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H745Z(G-I)T_H755ZIT/generic_clock.c b/variants/STM32H7xx/H745Z(G-I)T_H755ZIT/generic_clock.c index f29dd793d8..6d721c10b1 100644 --- a/variants/STM32H7xx/H745Z(G-I)T_H755ZIT/generic_clock.c +++ b/variants/STM32H7xx/H745Z(G-I)T_H755ZIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H745Z(G-I)T_H755ZIT/variant_NUCLEO_H745ZI_Q.cpp b/variants/STM32H7xx/H745Z(G-I)T_H755ZIT/variant_NUCLEO_H745ZI_Q.cpp index 310245b31d..8194335c92 100644 --- a/variants/STM32H7xx/H745Z(G-I)T_H755ZIT/variant_NUCLEO_H745ZI_Q.cpp +++ b/variants/STM32H7xx/H745Z(G-I)T_H755ZIT/variant_NUCLEO_H745ZI_Q.cpp @@ -157,8 +157,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H747B(G-I)T_H757BIT/generic_clock.c b/variants/STM32H7xx/H747B(G-I)T_H757BIT/generic_clock.c index 113b48e530..b920ea6cc9 100644 --- a/variants/STM32H7xx/H747B(G-I)T_H757BIT/generic_clock.c +++ b/variants/STM32H7xx/H747B(G-I)T_H757BIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H747ZIY_H757ZIY/generic_clock.c b/variants/STM32H7xx/H747ZIY_H757ZIY/generic_clock.c index acf2666c03..1f6828bb16 100644 --- a/variants/STM32H7xx/H747ZIY_H757ZIY/generic_clock.c +++ b/variants/STM32H7xx/H747ZIY_H757ZIY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3A(G-I)IxQ_H7B0ABIxQ_H7B3AIIxQ/generic_clock.c b/variants/STM32H7xx/H7A3A(G-I)IxQ_H7B0ABIxQ_H7B3AIIxQ/generic_clock.c index 6a324dc365..f3115f970d 100644 --- a/variants/STM32H7xx/H7A3A(G-I)IxQ_H7B0ABIxQ_H7B3AIIxQ/generic_clock.c +++ b/variants/STM32H7xx/H7A3A(G-I)IxQ_H7B0ABIxQ_H7B3AIIxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3I(G-I)(K-T)_H7B0IBT_H7B3II(K-T)/generic_clock.c b/variants/STM32H7xx/H7A3I(G-I)(K-T)_H7B0IBT_H7B3II(K-T)/generic_clock.c index 28ea7c3278..7b36f17eb4 100644 --- a/variants/STM32H7xx/H7A3I(G-I)(K-T)_H7B0IBT_H7B3II(K-T)/generic_clock.c +++ b/variants/STM32H7xx/H7A3I(G-I)(K-T)_H7B0IBT_H7B3II(K-T)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3I(G-I)KxQ_H7B0IBKxQ_H7B3IIKxQ/generic_clock.c b/variants/STM32H7xx/H7A3I(G-I)KxQ_H7B0IBKxQ_H7B3IIKxQ/generic_clock.c index 3a70aa0c5f..c90a1160ff 100644 --- a/variants/STM32H7xx/H7A3I(G-I)KxQ_H7B0IBKxQ_H7B3IIKxQ/generic_clock.c +++ b/variants/STM32H7xx/H7A3I(G-I)KxQ_H7B0IBKxQ_H7B3IIKxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3I(G-I)TxQ_H7B3IITxQ/generic_clock.c b/variants/STM32H7xx/H7A3I(G-I)TxQ_H7B3IITxQ/generic_clock.c index ad79939a77..21363c0da7 100644 --- a/variants/STM32H7xx/H7A3I(G-I)TxQ_H7B3IITxQ/generic_clock.c +++ b/variants/STM32H7xx/H7A3I(G-I)TxQ_H7B3IITxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3L(G-I)HxQ_H7B3LIHxQ/generic_clock.c b/variants/STM32H7xx/H7A3L(G-I)HxQ_H7B3LIHxQ/generic_clock.c index 19061e5a31..4768243273 100644 --- a/variants/STM32H7xx/H7A3L(G-I)HxQ_H7B3LIHxQ/generic_clock.c +++ b/variants/STM32H7xx/H7A3L(G-I)HxQ_H7B3LIHxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3N(G-I)H_H7B3NIH/generic_clock.c b/variants/STM32H7xx/H7A3N(G-I)H_H7B3NIH/generic_clock.c index fb2c36085d..fc82574608 100644 --- a/variants/STM32H7xx/H7A3N(G-I)H_H7B3NIH/generic_clock.c +++ b/variants/STM32H7xx/H7A3N(G-I)H_H7B3NIH/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3QIYxQ_H7B3QIYxQ/generic_clock.c b/variants/STM32H7xx/H7A3QIYxQ_H7B3QIYxQ/generic_clock.c index 476026442d..787fde2e73 100644 --- a/variants/STM32H7xx/H7A3QIYxQ_H7B3QIYxQ/generic_clock.c +++ b/variants/STM32H7xx/H7A3QIYxQ_H7B3QIYxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3R(G-I)T_H7B0RBT_H7B3RIT/generic_clock.c b/variants/STM32H7xx/H7A3R(G-I)T_H7B0RBT_H7B3RIT/generic_clock.c index 37886b532a..7d4ee62a0c 100644 --- a/variants/STM32H7xx/H7A3R(G-I)T_H7B0RBT_H7B3RIT/generic_clock.c +++ b/variants/STM32H7xx/H7A3R(G-I)T_H7B0RBT_H7B3RIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3V(G-I)(H-T)_H7B0VBT_H7B3VI(H-T)/generic_clock.c b/variants/STM32H7xx/H7A3V(G-I)(H-T)_H7B0VBT_H7B3VI(H-T)/generic_clock.c index 604aac142a..8f2b3514a2 100644 --- a/variants/STM32H7xx/H7A3V(G-I)(H-T)_H7B0VBT_H7B3VI(H-T)/generic_clock.c +++ b/variants/STM32H7xx/H7A3V(G-I)(H-T)_H7B0VBT_H7B3VI(H-T)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3V(G-I)HxQ_H7B3VIHxQ/generic_clock.c b/variants/STM32H7xx/H7A3V(G-I)HxQ_H7B3VIHxQ/generic_clock.c index 9b2fb92a98..c530ed5dc1 100644 --- a/variants/STM32H7xx/H7A3V(G-I)HxQ_H7B3VIHxQ/generic_clock.c +++ b/variants/STM32H7xx/H7A3V(G-I)HxQ_H7B3VIHxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3V(G-I)TxQ_H7B3VITxQ/generic_clock.c b/variants/STM32H7xx/H7A3V(G-I)TxQ_H7B3VITxQ/generic_clock.c index 8bad01cc8a..09d6276cb1 100644 --- a/variants/STM32H7xx/H7A3V(G-I)TxQ_H7B3VITxQ/generic_clock.c +++ b/variants/STM32H7xx/H7A3V(G-I)TxQ_H7B3VITxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3Z(G-I)T_H7B0ZBT_H7B3ZIT/generic_clock.c b/variants/STM32H7xx/H7A3Z(G-I)T_H7B0ZBT_H7B3ZIT/generic_clock.c index 280f76b2d4..5af76d1ec3 100644 --- a/variants/STM32H7xx/H7A3Z(G-I)T_H7B0ZBT_H7B3ZIT/generic_clock.c +++ b/variants/STM32H7xx/H7A3Z(G-I)T_H7B0ZBT_H7B3ZIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ/generic_clock.c b/variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ/generic_clock.c index 668f3dddf0..1e5b820bbe 100644 --- a/variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ/generic_clock.c +++ b/variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ/variant_NUCLEO_H7A3ZI_Q.cpp b/variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ/variant_NUCLEO_H7A3ZI_Q.cpp index baf66a93ff..52d2c1b9fe 100644 --- a/variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ/variant_NUCLEO_H7A3ZI_Q.cpp +++ b/variants/STM32H7xx/H7A3Z(G-I)TxQ_H7B3ZITxQ/variant_NUCLEO_H7A3ZI_Q.cpp @@ -150,8 +150,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L010C6T/generic_clock.c b/variants/STM32L0xx/L010C6T/generic_clock.c index 075dd019e5..e56278b77c 100644 --- a/variants/STM32L0xx/L010C6T/generic_clock.c +++ b/variants/STM32L0xx/L010C6T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L010F4P_L011F(3-4)P_L021F4P/generic_clock.c b/variants/STM32L0xx/L010F4P_L011F(3-4)P_L021F4P/generic_clock.c index 56ff2b1645..0fa500b9e6 100644 --- a/variants/STM32L0xx/L010F4P_L011F(3-4)P_L021F4P/generic_clock.c +++ b/variants/STM32L0xx/L010F4P_L011F(3-4)P_L021F4P/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L010K4T_L011K(3-4)T_L021K4T/generic_clock.c b/variants/STM32L0xx/L010K4T_L011K(3-4)T_L021K4T/generic_clock.c index 94a37cd05f..546f39a34e 100644 --- a/variants/STM32L0xx/L010K4T_L011K(3-4)T_L021K4T/generic_clock.c +++ b/variants/STM32L0xx/L010K4T_L011K(3-4)T_L021K4T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L010K8T/generic_clock.c b/variants/STM32L0xx/L010K8T/generic_clock.c index 4a311f8bd4..e90c669a29 100644 --- a/variants/STM32L0xx/L010K8T/generic_clock.c +++ b/variants/STM32L0xx/L010K8T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L010R8T/generic_clock.c b/variants/STM32L0xx/L010R8T/generic_clock.c index 24f4e4a58f..c8cb59a764 100644 --- a/variants/STM32L0xx/L010R8T/generic_clock.c +++ b/variants/STM32L0xx/L010R8T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L010RBT/generic_clock.c b/variants/STM32L0xx/L010RBT/generic_clock.c index 9ac45d535b..72395d80ca 100644 --- a/variants/STM32L0xx/L010RBT/generic_clock.c +++ b/variants/STM32L0xx/L010RBT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L010RBT/variant_NUCLEO_L010RB.cpp b/variants/STM32L0xx/L010RBT/variant_NUCLEO_L010RB.cpp index 0893483e84..af503ec7e6 100644 --- a/variants/STM32L0xx/L010RBT/variant_NUCLEO_L010RB.cpp +++ b/variants/STM32L0xx/L010RBT/variant_NUCLEO_L010RB.cpp @@ -97,8 +97,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L011D(3-4)P_L021D4P/generic_clock.c b/variants/STM32L0xx/L011D(3-4)P_L021D4P/generic_clock.c index 5f03c973a8..267cc339a3 100644 --- a/variants/STM32L0xx/L011D(3-4)P_L021D4P/generic_clock.c +++ b/variants/STM32L0xx/L011D(3-4)P_L021D4P/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L011E(3-4)Y/generic_clock.c b/variants/STM32L0xx/L011E(3-4)Y/generic_clock.c index bd754bb326..8c426b471d 100644 --- a/variants/STM32L0xx/L011E(3-4)Y/generic_clock.c +++ b/variants/STM32L0xx/L011E(3-4)Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L011F(3-4)U_L021F4U/generic_clock.c b/variants/STM32L0xx/L011F(3-4)U_L021F4U/generic_clock.c index a771625eb7..849b42e429 100644 --- a/variants/STM32L0xx/L011F(3-4)U_L021F4U/generic_clock.c +++ b/variants/STM32L0xx/L011F(3-4)U_L021F4U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L011G(3-4)U_L021G4U/generic_clock.c b/variants/STM32L0xx/L011G(3-4)U_L021G4U/generic_clock.c index 7fc9c71e8e..549ecffb69 100644 --- a/variants/STM32L0xx/L011G(3-4)U_L021G4U/generic_clock.c +++ b/variants/STM32L0xx/L011G(3-4)U_L021G4U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L011K(3-4)U_L021K4U/generic_clock.c b/variants/STM32L0xx/L011K(3-4)U_L021K4U/generic_clock.c index 2b5b7ed4e6..acdd6005b2 100644 --- a/variants/STM32L0xx/L011K(3-4)U_L021K4U/generic_clock.c +++ b/variants/STM32L0xx/L011K(3-4)U_L021K4U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L031C(4-6)(T-U)_L041C4T_L041C6(T-U)/generic_clock.c b/variants/STM32L0xx/L031C(4-6)(T-U)_L041C4T_L041C6(T-U)/generic_clock.c index c7f1a8dad0..92b5840a8c 100644 --- a/variants/STM32L0xx/L031C(4-6)(T-U)_L041C4T_L041C6(T-U)/generic_clock.c +++ b/variants/STM32L0xx/L031C(4-6)(T-U)_L041C4T_L041C6(T-U)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L031E(4-6)Y_L041E6Y/generic_clock.c b/variants/STM32L0xx/L031E(4-6)Y_L041E6Y/generic_clock.c index 25d0e1c80a..6cd3106322 100644 --- a/variants/STM32L0xx/L031E(4-6)Y_L041E6Y/generic_clock.c +++ b/variants/STM32L0xx/L031E(4-6)Y_L041E6Y/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L031F(4-6)P_L041F6P/generic_clock.c b/variants/STM32L0xx/L031F(4-6)P_L041F6P/generic_clock.c index ad387a098c..dea8457f52 100644 --- a/variants/STM32L0xx/L031F(4-6)P_L041F6P/generic_clock.c +++ b/variants/STM32L0xx/L031F(4-6)P_L041F6P/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L031G(4-6)U_L041G6U/generic_clock.c b/variants/STM32L0xx/L031G(4-6)U_L041G6U/generic_clock.c index bed8a9ede4..e200ca70af 100644 --- a/variants/STM32L0xx/L031G(4-6)U_L041G6U/generic_clock.c +++ b/variants/STM32L0xx/L031G(4-6)U_L041G6U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L031G6UxS_L041G6UxS/generic_clock.c b/variants/STM32L0xx/L031G6UxS_L041G6UxS/generic_clock.c index f2ff11eb5e..0b63d00357 100644 --- a/variants/STM32L0xx/L031G6UxS_L041G6UxS/generic_clock.c +++ b/variants/STM32L0xx/L031G6UxS_L041G6UxS/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L031K(4-6)T_L041K6T/generic_clock.c b/variants/STM32L0xx/L031K(4-6)T_L041K6T/generic_clock.c index 3e65e98e5a..11a304c94d 100644 --- a/variants/STM32L0xx/L031K(4-6)T_L041K6T/generic_clock.c +++ b/variants/STM32L0xx/L031K(4-6)T_L041K6T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L031K(4-6)T_L041K6T/variant_NUCLEO_L031K6.cpp b/variants/STM32L0xx/L031K(4-6)T_L041K6T/variant_NUCLEO_L031K6.cpp index d3c70d147a..9f7a38270c 100644 --- a/variants/STM32L0xx/L031K(4-6)T_L041K6T/variant_NUCLEO_L031K6.cpp +++ b/variants/STM32L0xx/L031K(4-6)T_L041K6T/variant_NUCLEO_L031K6.cpp @@ -64,8 +64,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L031K(4-6)U_L041K6U/generic_clock.c b/variants/STM32L0xx/L031K(4-6)U_L041K6U/generic_clock.c index 41fa74c8a6..99e9bfdbc1 100644 --- a/variants/STM32L0xx/L031K(4-6)U_L041K6U/generic_clock.c +++ b/variants/STM32L0xx/L031K(4-6)U_L041K6U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L051C(6-8)(T-U)/generic_clock.c b/variants/STM32L0xx/L051C(6-8)(T-U)/generic_clock.c index 49a055f26a..5a8ae2a8b5 100644 --- a/variants/STM32L0xx/L051C(6-8)(T-U)/generic_clock.c +++ b/variants/STM32L0xx/L051C(6-8)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L051C(6-8)(T-U)/variant_RHF76_052.cpp b/variants/STM32L0xx/L051C(6-8)(T-U)/variant_RHF76_052.cpp index 5bdfe657a7..5d77e10666 100644 --- a/variants/STM32L0xx/L051C(6-8)(T-U)/variant_RHF76_052.cpp +++ b/variants/STM32L0xx/L051C(6-8)(T-U)/variant_RHF76_052.cpp @@ -43,7 +43,6 @@ extern "C" { /** * @brief System Clock Configuration * The system Clock is configured as follow : - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L051K(6-8)T/generic_clock.c b/variants/STM32L0xx/L051K(6-8)T/generic_clock.c index 31f024993c..5ef05504f2 100644 --- a/variants/STM32L0xx/L051K(6-8)T/generic_clock.c +++ b/variants/STM32L0xx/L051K(6-8)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L051K(6-8)U/generic_clock.c b/variants/STM32L0xx/L051K(6-8)U/generic_clock.c index e2f3a17ca8..756fe031ca 100644 --- a/variants/STM32L0xx/L051K(6-8)U/generic_clock.c +++ b/variants/STM32L0xx/L051K(6-8)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L051R(6-8)H/generic_clock.c b/variants/STM32L0xx/L051R(6-8)H/generic_clock.c index 29f08a2cad..5a18f45ace 100644 --- a/variants/STM32L0xx/L051R(6-8)H/generic_clock.c +++ b/variants/STM32L0xx/L051R(6-8)H/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L051R(6-8)T/generic_clock.c b/variants/STM32L0xx/L051R(6-8)T/generic_clock.c index 26f3c573a0..966a13ea1b 100644 --- a/variants/STM32L0xx/L051R(6-8)T/generic_clock.c +++ b/variants/STM32L0xx/L051R(6-8)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L051T(6-8)Y/generic_clock.c b/variants/STM32L0xx/L051T(6-8)Y/generic_clock.c index 240a34f311..bcad789097 100644 --- a/variants/STM32L0xx/L051T(6-8)Y/generic_clock.c +++ b/variants/STM32L0xx/L051T(6-8)Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L052C(6-8)(T-U)_L053C(6-8)(T-U)_L062C8U_L063C8(T-U)/generic_clock.c b/variants/STM32L0xx/L052C(6-8)(T-U)_L053C(6-8)(T-U)_L062C8U_L063C8(T-U)/generic_clock.c index 692ee7b731..fc68f6083b 100644 --- a/variants/STM32L0xx/L052C(6-8)(T-U)_L053C(6-8)(T-U)_L062C8U_L063C8(T-U)/generic_clock.c +++ b/variants/STM32L0xx/L052C(6-8)(T-U)_L053C(6-8)(T-U)_L062C8U_L063C8(T-U)/generic_clock.c @@ -20,8 +20,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L052K(6-8)T_L062K8T/generic_clock.c b/variants/STM32L0xx/L052K(6-8)T_L062K8T/generic_clock.c index 2fd8c740e5..2e393a2cfd 100644 --- a/variants/STM32L0xx/L052K(6-8)T_L062K8T/generic_clock.c +++ b/variants/STM32L0xx/L052K(6-8)T_L062K8T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L052K(6-8)U_L062K8U/generic_clock.c b/variants/STM32L0xx/L052K(6-8)U_L062K8U/generic_clock.c index f5de04d5e4..715e2cc7d7 100644 --- a/variants/STM32L0xx/L052K(6-8)U_L062K8U/generic_clock.c +++ b/variants/STM32L0xx/L052K(6-8)U_L062K8U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L052R(6-8)H_L053R(6-8)H/generic_clock.c b/variants/STM32L0xx/L052R(6-8)H_L053R(6-8)H/generic_clock.c index 4df9ec3126..2aee2c41f5 100644 --- a/variants/STM32L0xx/L052R(6-8)H_L053R(6-8)H/generic_clock.c +++ b/variants/STM32L0xx/L052R(6-8)H_L053R(6-8)H/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/generic_clock.c b/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/generic_clock.c index c9c875c2f6..c90636b5da 100644 --- a/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/generic_clock.c +++ b/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_NUCLEO_L053R8.cpp b/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_NUCLEO_L053R8.cpp index b94a2ce31b..5a7e4f1592 100644 --- a/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_NUCLEO_L053R8.cpp +++ b/variants/STM32L0xx/L052R(6-8)T_L053R(6-8)T_L063R8T/variant_NUCLEO_L053R8.cpp @@ -102,8 +102,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L052T6Y_L052T8(F-Y)/generic_clock.c b/variants/STM32L0xx/L052T6Y_L052T8(F-Y)/generic_clock.c index a39d4b58d2..ad453ec865 100644 --- a/variants/STM32L0xx/L052T6Y_L052T8(F-Y)/generic_clock.c +++ b/variants/STM32L0xx/L052T6Y_L052T8(F-Y)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L071C(8-B-Z)(T-U)_L081CBT_L081CZ(T-U)/generic_clock.c b/variants/STM32L0xx/L071C(8-B-Z)(T-U)_L081CBT_L081CZ(T-U)/generic_clock.c index f3cd18904d..c9ba2955dd 100644 --- a/variants/STM32L0xx/L071C(8-B-Z)(T-U)_L081CBT_L081CZ(T-U)/generic_clock.c +++ b/variants/STM32L0xx/L071C(8-B-Z)(T-U)_L081CBT_L081CZ(T-U)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L071C(B-Z)Y/generic_clock.c b/variants/STM32L0xx/L071C(B-Z)Y/generic_clock.c index e41ee26afe..0b35bf4bc6 100644 --- a/variants/STM32L0xx/L071C(B-Z)Y/generic_clock.c +++ b/variants/STM32L0xx/L071C(B-Z)Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L071K(8-B-Z)U_L081KZU/generic_clock.c b/variants/STM32L0xx/L071K(8-B-Z)U_L081KZU/generic_clock.c index f8a28a91d2..aff87d061f 100644 --- a/variants/STM32L0xx/L071K(8-B-Z)U_L081KZU/generic_clock.c +++ b/variants/STM32L0xx/L071K(8-B-Z)U_L081KZU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L071K(B-Z)T_L081KZT/generic_clock.c b/variants/STM32L0xx/L071K(B-Z)T_L081KZT/generic_clock.c index 700bc18c54..43ce161004 100644 --- a/variants/STM32L0xx/L071K(B-Z)T_L081KZT/generic_clock.c +++ b/variants/STM32L0xx/L071K(B-Z)T_L081KZT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L071R(B-Z)H/generic_clock.c b/variants/STM32L0xx/L071R(B-Z)H/generic_clock.c index 3bc066095f..33fa63f498 100644 --- a/variants/STM32L0xx/L071R(B-Z)H/generic_clock.c +++ b/variants/STM32L0xx/L071R(B-Z)H/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L071R(B-Z)T/generic_clock.c b/variants/STM32L0xx/L071R(B-Z)T/generic_clock.c index ea23ec0538..8e4ae5fbb4 100644 --- a/variants/STM32L0xx/L071R(B-Z)T/generic_clock.c +++ b/variants/STM32L0xx/L071R(B-Z)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L071V(8-B-Z)(I-T)/generic_clock.c b/variants/STM32L0xx/L071V(8-B-Z)(I-T)/generic_clock.c index a22c7497a7..b3b06f7ac1 100644 --- a/variants/STM32L0xx/L071V(8-B-Z)(I-T)/generic_clock.c +++ b/variants/STM32L0xx/L071V(8-B-Z)(I-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L072C(B-Z)(T-U)_L073C(B-Z)(T-U)_L082CZU_L083CBT_L083CZ(T-U)/generic_clock.c b/variants/STM32L0xx/L072C(B-Z)(T-U)_L073C(B-Z)(T-U)_L082CZU_L083CBT_L083CZ(T-U)/generic_clock.c index 3fffeab23c..0ff349b01e 100644 --- a/variants/STM32L0xx/L072C(B-Z)(T-U)_L073C(B-Z)(T-U)_L082CZU_L083CBT_L083CZ(T-U)/generic_clock.c +++ b/variants/STM32L0xx/L072C(B-Z)(T-U)_L073C(B-Z)(T-U)_L082CZU_L083CBT_L083CZ(T-U)/generic_clock.c @@ -20,8 +20,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L072CBY_L072CZ(E-Y)_L073CZY_L082CZY/generic_clock.c b/variants/STM32L0xx/L072CBY_L072CZ(E-Y)_L073CZY_L082CZY/generic_clock.c index 354c1cb942..8966740bdb 100644 --- a/variants/STM32L0xx/L072CBY_L072CZ(E-Y)_L073CZY_L082CZY/generic_clock.c +++ b/variants/STM32L0xx/L072CBY_L072CZ(E-Y)_L073CZY_L082CZY/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L072K(B-Z)T_L082K(B-Z)T/generic_clock.c b/variants/STM32L0xx/L072K(B-Z)T_L082K(B-Z)T/generic_clock.c index 6408c0921b..de30ba61b1 100644 --- a/variants/STM32L0xx/L072K(B-Z)T_L082K(B-Z)T/generic_clock.c +++ b/variants/STM32L0xx/L072K(B-Z)T_L082K(B-Z)T/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L072K(B-Z)T_L082K(B-Z)T/variant_THUNDERPACK_L072.cpp b/variants/STM32L0xx/L072K(B-Z)T_L082K(B-Z)T/variant_THUNDERPACK_L072.cpp index 5450319241..75e02c4e55 100644 --- a/variants/STM32L0xx/L072K(B-Z)T_L082K(B-Z)T/variant_THUNDERPACK_L072.cpp +++ b/variants/STM32L0xx/L072K(B-Z)T_L082K(B-Z)T/variant_THUNDERPACK_L072.cpp @@ -55,8 +55,6 @@ extern "C" { /* * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L072K(B-Z)U_L082K(B-Z)U/generic_clock.c b/variants/STM32L0xx/L072K(B-Z)U_L082K(B-Z)U/generic_clock.c index 74b283f696..cc65981303 100644 --- a/variants/STM32L0xx/L072K(B-Z)U_L082K(B-Z)U/generic_clock.c +++ b/variants/STM32L0xx/L072K(B-Z)U_L082K(B-Z)U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L072R(B-Z)(H-I)_L073RBH_L073RZ(H-I)_L083R(B-Z)H/generic_clock.c b/variants/STM32L0xx/L072R(B-Z)(H-I)_L073RBH_L073RZ(H-I)_L083R(B-Z)H/generic_clock.c index 3446cf0b97..33484825fb 100644 --- a/variants/STM32L0xx/L072R(B-Z)(H-I)_L073RBH_L073RZ(H-I)_L083R(B-Z)H/generic_clock.c +++ b/variants/STM32L0xx/L072R(B-Z)(H-I)_L073RBH_L073RZ(H-I)_L083R(B-Z)H/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/generic_clock.c b/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/generic_clock.c index a45dff0232..8672736127 100644 --- a/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/generic_clock.c +++ b/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/variant_ACSIP_S76S.cpp b/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/variant_ACSIP_S76S.cpp index 30726b24a6..895ff51d01 100644 --- a/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/variant_ACSIP_S76S.cpp +++ b/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/variant_ACSIP_S76S.cpp @@ -96,8 +96,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/variant_NUCLEO_L073RZ.cpp b/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/variant_NUCLEO_L073RZ.cpp index 7e7099d9bf..aed7c9b726 100644 --- a/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/variant_NUCLEO_L073RZ.cpp +++ b/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/variant_NUCLEO_L073RZ.cpp @@ -98,8 +98,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/variant_PX_HER0.cpp b/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/variant_PX_HER0.cpp index faaa693c76..99d4d9ea6e 100644 --- a/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/variant_PX_HER0.cpp +++ b/variants/STM32L0xx/L072R(B-Z)T_L073R(B-Z)T_L083R(B-Z)T/variant_PX_HER0.cpp @@ -86,8 +86,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L0xx/L072V(8-B-Z)(I-T)_L073V(8-B-Z)(I-T)_L083V(8-B-Z)(I-T)/generic_clock.c b/variants/STM32L0xx/L072V(8-B-Z)(I-T)_L073V(8-B-Z)(I-T)_L083V(8-B-Z)(I-T)/generic_clock.c index a257a3e757..fbb97afa82 100644 --- a/variants/STM32L0xx/L072V(8-B-Z)(I-T)_L073V(8-B-Z)(I-T)_L083V(8-B-Z)(I-T)/generic_clock.c +++ b/variants/STM32L0xx/L072V(8-B-Z)(I-T)_L073V(8-B-Z)(I-T)_L083V(8-B-Z)(I-T)/generic_clock.c @@ -23,8 +23,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L100C6Ux(A)_L151C(6-8-B)(T-U)x(A)_L152C(6-8-B)(T-U)x(A)/generic_clock.c b/variants/STM32L1xx/L100C6Ux(A)_L151C(6-8-B)(T-U)x(A)_L152C(6-8-B)(T-U)x(A)/generic_clock.c index 1279affe0a..9fccba3a33 100644 --- a/variants/STM32L1xx/L100C6Ux(A)_L151C(6-8-B)(T-U)x(A)_L152C(6-8-B)(T-U)x(A)/generic_clock.c +++ b/variants/STM32L1xx/L100C6Ux(A)_L151C(6-8-B)(T-U)x(A)_L152C(6-8-B)(T-U)x(A)/generic_clock.c @@ -27,8 +27,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L100C6Ux(A)_L151C(6-8-B)(T-U)x(A)_L152C(6-8-B)(T-U)x(A)/variant_RAK811_TRACKER.cpp b/variants/STM32L1xx/L100C6Ux(A)_L151C(6-8-B)(T-U)x(A)_L152C(6-8-B)(T-U)x(A)/variant_RAK811_TRACKER.cpp index 69da008b89..06ed027b3d 100644 --- a/variants/STM32L1xx/L100C6Ux(A)_L151C(6-8-B)(T-U)x(A)_L152C(6-8-B)(T-U)x(A)/variant_RAK811_TRACKER.cpp +++ b/variants/STM32L1xx/L100C6Ux(A)_L151C(6-8-B)(T-U)x(A)_L152C(6-8-B)(T-U)x(A)/variant_RAK811_TRACKER.cpp @@ -67,8 +67,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L100R(8-B)Tx(A)_L151R(6-8-B)Tx(A)_L152R(6-8-B)Tx(A)/generic_clock.c b/variants/STM32L1xx/L100R(8-B)Tx(A)_L151R(6-8-B)Tx(A)_L152R(6-8-B)Tx(A)/generic_clock.c index 46290e334b..1d45822aa3 100644 --- a/variants/STM32L1xx/L100R(8-B)Tx(A)_L151R(6-8-B)Tx(A)_L152R(6-8-B)Tx(A)/generic_clock.c +++ b/variants/STM32L1xx/L100R(8-B)Tx(A)_L151R(6-8-B)Tx(A)_L152R(6-8-B)Tx(A)/generic_clock.c @@ -22,8 +22,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L100RCT/generic_clock.c b/variants/STM32L1xx/L100RCT/generic_clock.c index 934c35f2b7..5ce043ae2e 100644 --- a/variants/STM32L1xx/L100RCT/generic_clock.c +++ b/variants/STM32L1xx/L100RCT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151CC(T-U)_L152CC(T-U)/generic_clock.c b/variants/STM32L1xx/L151CC(T-U)_L152CC(T-U)/generic_clock.c index 424bf0d3ab..c431671a18 100644 --- a/variants/STM32L1xx/L151CC(T-U)_L152CC(T-U)/generic_clock.c +++ b/variants/STM32L1xx/L151CC(T-U)_L152CC(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151QCH_L152QCH_L162QCH/generic_clock.c b/variants/STM32L1xx/L151QCH_L152QCH_L162QCH/generic_clock.c index 0f2838c75b..a8269821ba 100644 --- a/variants/STM32L1xx/L151QCH_L152QCH_L162QCH/generic_clock.c +++ b/variants/STM32L1xx/L151QCH_L152QCH_L162QCH/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151QDH_L152QDH_L162QDH/generic_clock.c b/variants/STM32L1xx/L151QDH_L152QDH_L162QDH/generic_clock.c index 358e4d6da5..7c10d13151 100644 --- a/variants/STM32L1xx/L151QDH_L152QDH_L162QDH/generic_clock.c +++ b/variants/STM32L1xx/L151QDH_L152QDH_L162QDH/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151QEH_L152QEH/generic_clock.c b/variants/STM32L1xx/L151QEH_L152QEH/generic_clock.c index 168f8771e5..6155882221 100644 --- a/variants/STM32L1xx/L151QEH_L152QEH/generic_clock.c +++ b/variants/STM32L1xx/L151QEH_L152QEH/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151R(6-8-B)Hx(A)_L152R(6-8-B)Hx(A)/generic_clock.c b/variants/STM32L1xx/L151R(6-8-B)Hx(A)_L152R(6-8-B)Hx(A)/generic_clock.c index e2246da3d6..b3b393c0f4 100644 --- a/variants/STM32L1xx/L151R(6-8-B)Hx(A)_L152R(6-8-B)Hx(A)/generic_clock.c +++ b/variants/STM32L1xx/L151R(6-8-B)Hx(A)_L152R(6-8-B)Hx(A)/generic_clock.c @@ -20,8 +20,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151RC(T-Y)x(A)_L151UCY_L152RCTx(A)_L152UCY_L162RCTx(A)/generic_clock.c b/variants/STM32L1xx/L151RC(T-Y)x(A)_L151UCY_L152RCTx(A)_L152UCY_L162RCTx(A)/generic_clock.c index 6ef74766f8..b3794a4471 100644 --- a/variants/STM32L1xx/L151RC(T-Y)x(A)_L151UCY_L152RCTx(A)_L152UCY_L162RCTx(A)/generic_clock.c +++ b/variants/STM32L1xx/L151RC(T-Y)x(A)_L151UCY_L152RCTx(A)_L152UCY_L162RCTx(A)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151RD(T-Y)_L152RD(T-Y)_L162RD(T-Y)/generic_clock.c b/variants/STM32L1xx/L151RD(T-Y)_L152RD(T-Y)_L162RD(T-Y)/generic_clock.c index bc09a327bb..789462f0fa 100644 --- a/variants/STM32L1xx/L151RD(T-Y)_L152RD(T-Y)_L162RD(T-Y)/generic_clock.c +++ b/variants/STM32L1xx/L151RD(T-Y)_L152RD(T-Y)_L162RD(T-Y)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151RET_L152RET_L162RET/generic_clock.c b/variants/STM32L1xx/L151RET_L152RET_L162RET/generic_clock.c index 8d172a9599..3a23225e1f 100644 --- a/variants/STM32L1xx/L151RET_L152RET_L162RET/generic_clock.c +++ b/variants/STM32L1xx/L151RET_L152RET_L162RET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151RET_L152RET_L162RET/variant_NUCLEO_L152RE.cpp b/variants/STM32L1xx/L151RET_L152RET_L162RET/variant_NUCLEO_L152RE.cpp index 49bcce6a9d..cd2bb093ea 100644 --- a/variants/STM32L1xx/L151RET_L152RET_L162RET/variant_NUCLEO_L152RE.cpp +++ b/variants/STM32L1xx/L151RET_L152RET_L162RET/variant_NUCLEO_L152RE.cpp @@ -105,7 +105,6 @@ extern "C" { #endif /** * @brief System Clock Configuration - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151V(8-B)(H-T)x(A)_L152V(8-B)(H-T)x(A)/generic_clock.c b/variants/STM32L1xx/L151V(8-B)(H-T)x(A)_L152V(8-B)(H-T)x(A)/generic_clock.c index 9878190157..002448ddea 100644 --- a/variants/STM32L1xx/L151V(8-B)(H-T)x(A)_L152V(8-B)(H-T)x(A)/generic_clock.c +++ b/variants/STM32L1xx/L151V(8-B)(H-T)x(A)_L152V(8-B)(H-T)x(A)/generic_clock.c @@ -22,8 +22,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151VC(H-T)x(A)_L152VC(H-T)x(A)_L162VC(H-T)x(A)/generic_clock.c b/variants/STM32L1xx/L151VC(H-T)x(A)_L152VC(H-T)x(A)_L162VC(H-T)x(A)/generic_clock.c index 90f92c7782..71b74f4c28 100644 --- a/variants/STM32L1xx/L151VC(H-T)x(A)_L152VC(H-T)x(A)_L162VC(H-T)x(A)/generic_clock.c +++ b/variants/STM32L1xx/L151VC(H-T)x(A)_L152VC(H-T)x(A)_L162VC(H-T)x(A)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151VD(T-Y)xX_L151VE(T-Y)_L152VDTxX_L152VE(T-Y)_L162VDYxX_L162VE(T-Y)/generic_clock.c b/variants/STM32L1xx/L151VD(T-Y)xX_L151VE(T-Y)_L152VDTxX_L152VE(T-Y)_L162VDYxX_L162VE(T-Y)/generic_clock.c index 71ddb5c33e..0a28dc7163 100644 --- a/variants/STM32L1xx/L151VD(T-Y)xX_L151VE(T-Y)_L152VDTxX_L152VE(T-Y)_L162VDYxX_L162VE(T-Y)/generic_clock.c +++ b/variants/STM32L1xx/L151VD(T-Y)xX_L151VE(T-Y)_L152VDTxX_L152VE(T-Y)_L162VDYxX_L162VE(T-Y)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151VDT_L152VDT_L162VDT/generic_clock.c b/variants/STM32L1xx/L151VDT_L152VDT_L162VDT/generic_clock.c index d9b6722cd4..432958f083 100644 --- a/variants/STM32L1xx/L151VDT_L152VDT_L162VDT/generic_clock.c +++ b/variants/STM32L1xx/L151VDT_L152VDT_L162VDT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151ZCT_L152ZCT_L162ZCT/generic_clock.c b/variants/STM32L1xx/L151ZCT_L152ZCT_L162ZCT/generic_clock.c index 646f76fdf2..310efc871c 100644 --- a/variants/STM32L1xx/L151ZCT_L152ZCT_L162ZCT/generic_clock.c +++ b/variants/STM32L1xx/L151ZCT_L152ZCT_L162ZCT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151ZDT_L152ZDT_L162ZDT/generic_clock.c b/variants/STM32L1xx/L151ZDT_L152ZDT_L162ZDT/generic_clock.c index 820a234d08..0c1484bce4 100644 --- a/variants/STM32L1xx/L151ZDT_L152ZDT_L162ZDT/generic_clock.c +++ b/variants/STM32L1xx/L151ZDT_L152ZDT_L162ZDT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L1xx/L151ZET_L152ZET_L162ZET/generic_clock.c b/variants/STM32L1xx/L151ZET_L152ZET_L162ZET/generic_clock.c index a34d4de595..49a55bf35a 100644 --- a/variants/STM32L1xx/L151ZET_L152ZET_L162ZET/generic_clock.c +++ b/variants/STM32L1xx/L151ZET_L152ZET_L162ZET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L412C(8-B)(T-U)_L422CB(T-U)/generic_clock.c b/variants/STM32L4xx/L412C(8-B)(T-U)_L422CB(T-U)/generic_clock.c index 3cdc05379c..22fb097cf0 100644 --- a/variants/STM32L4xx/L412C(8-B)(T-U)_L422CB(T-U)/generic_clock.c +++ b/variants/STM32L4xx/L412C(8-B)(T-U)_L422CB(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L412CB(T-U)xP/generic_clock.c b/variants/STM32L4xx/L412CB(T-U)xP/generic_clock.c index d127cf1827..38d2d2af97 100644 --- a/variants/STM32L4xx/L412CB(T-U)xP/generic_clock.c +++ b/variants/STM32L4xx/L412CB(T-U)xP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L412K(8-B)(T-U)_L422KB(T-U)/generic_clock.c b/variants/STM32L4xx/L412K(8-B)(T-U)_L422KB(T-U)/generic_clock.c index 90f52e1dfb..e8a8559325 100644 --- a/variants/STM32L4xx/L412K(8-B)(T-U)_L422KB(T-U)/generic_clock.c +++ b/variants/STM32L4xx/L412K(8-B)(T-U)_L422KB(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L412K(8-B)(T-U)_L422KB(T-U)/variant_NUCLEO_L412KB.cpp b/variants/STM32L4xx/L412K(8-B)(T-U)_L422KB(T-U)/variant_NUCLEO_L412KB.cpp index fc19e8fc3b..d20b03551b 100644 --- a/variants/STM32L4xx/L412K(8-B)(T-U)_L422KB(T-U)/variant_NUCLEO_L412KB.cpp +++ b/variants/STM32L4xx/L412K(8-B)(T-U)_L422KB(T-U)/variant_NUCLEO_L412KB.cpp @@ -62,8 +62,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L412R(8-B)(I-T)_L422RB(I-T)/generic_clock.c b/variants/STM32L4xx/L412R(8-B)(I-T)_L422RB(I-T)/generic_clock.c index cba581273f..98e9a53648 100644 --- a/variants/STM32L4xx/L412R(8-B)(I-T)_L422RB(I-T)/generic_clock.c +++ b/variants/STM32L4xx/L412R(8-B)(I-T)_L422RB(I-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L412RB(I-T)xP/generic_clock.c b/variants/STM32L4xx/L412RB(I-T)xP/generic_clock.c index 31b14acae6..847807312c 100644 --- a/variants/STM32L4xx/L412RB(I-T)xP/generic_clock.c +++ b/variants/STM32L4xx/L412RB(I-T)xP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L412RB(I-T)xP/variant_NUCLEO_L412RB_P.cpp b/variants/STM32L4xx/L412RB(I-T)xP/variant_NUCLEO_L412RB_P.cpp index 7d34aad82e..0fc577e951 100644 --- a/variants/STM32L4xx/L412RB(I-T)xP/variant_NUCLEO_L412RB_P.cpp +++ b/variants/STM32L4xx/L412RB(I-T)xP/variant_NUCLEO_L412RB_P.cpp @@ -100,8 +100,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L412T(8-B)Y_L422TBY/generic_clock.c b/variants/STM32L4xx/L412T(8-B)Y_L422TBY/generic_clock.c index 7bc40c46a4..81dad5f37b 100644 --- a/variants/STM32L4xx/L412T(8-B)Y_L422TBY/generic_clock.c +++ b/variants/STM32L4xx/L412T(8-B)Y_L422TBY/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L412TBYxP/generic_clock.c b/variants/STM32L4xx/L412TBYxP/generic_clock.c index 330bf09f94..ab614ea4b7 100644 --- a/variants/STM32L4xx/L412TBYxP/generic_clock.c +++ b/variants/STM32L4xx/L412TBYxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L431C(B-C)(T-U)/generic_clock.c b/variants/STM32L4xx/L431C(B-C)(T-U)/generic_clock.c index d954a503fb..51f0717bbd 100644 --- a/variants/STM32L4xx/L431C(B-C)(T-U)/generic_clock.c +++ b/variants/STM32L4xx/L431C(B-C)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L431C(B-C)Y/generic_clock.c b/variants/STM32L4xx/L431C(B-C)Y/generic_clock.c index 58feffd2bf..ad662e7030 100644 --- a/variants/STM32L4xx/L431C(B-C)Y/generic_clock.c +++ b/variants/STM32L4xx/L431C(B-C)Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L431K(B-C)U/generic_clock.c b/variants/STM32L4xx/L431K(B-C)U/generic_clock.c index 9b14362e8d..6a26967d5d 100644 --- a/variants/STM32L4xx/L431K(B-C)U/generic_clock.c +++ b/variants/STM32L4xx/L431K(B-C)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L431R(B-C)(I-T-Y)/generic_clock.c b/variants/STM32L4xx/L431R(B-C)(I-T-Y)/generic_clock.c index eb83e32579..1d596b2fb2 100644 --- a/variants/STM32L4xx/L431R(B-C)(I-T-Y)/generic_clock.c +++ b/variants/STM32L4xx/L431R(B-C)(I-T-Y)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L431VC(I-T)/generic_clock.c b/variants/STM32L4xx/L431VC(I-T)/generic_clock.c index fe2c64e950..5027092f91 100644 --- a/variants/STM32L4xx/L431VC(I-T)/generic_clock.c +++ b/variants/STM32L4xx/L431VC(I-T)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L432K(B-C)U_L442KCU/generic_clock.c b/variants/STM32L4xx/L432K(B-C)U_L442KCU/generic_clock.c index 38b19ff65b..19e3feae2a 100644 --- a/variants/STM32L4xx/L432K(B-C)U_L442KCU/generic_clock.c +++ b/variants/STM32L4xx/L432K(B-C)U_L442KCU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L432K(B-C)U_L442KCU/variant_NUCLEO_L432KC.cpp b/variants/STM32L4xx/L432K(B-C)U_L442KCU/variant_NUCLEO_L432KC.cpp index 9b60e0c2af..e3bd6ef91d 100644 --- a/variants/STM32L4xx/L432K(B-C)U_L442KCU/variant_NUCLEO_L432KC.cpp +++ b/variants/STM32L4xx/L432K(B-C)U_L442KCU/variant_NUCLEO_L432KC.cpp @@ -62,8 +62,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/generic_clock.c b/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/generic_clock.c index 521ebe9fdb..580c216220 100644 --- a/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/generic_clock.c +++ b/variants/STM32L4xx/L433C(B-C)(T-U)_L443CC(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L433C(B-C)Y_L443CC(F-Y)/generic_clock.c b/variants/STM32L4xx/L433C(B-C)Y_L443CC(F-Y)/generic_clock.c index 6dfb25fefe..e8b97b33d0 100644 --- a/variants/STM32L4xx/L433C(B-C)Y_L443CC(F-Y)/generic_clock.c +++ b/variants/STM32L4xx/L433C(B-C)Y_L443CC(F-Y)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L433R(B-C)(I-T-Y)_L443RC(I-T-Y)/generic_clock.c b/variants/STM32L4xx/L433R(B-C)(I-T-Y)_L443RC(I-T-Y)/generic_clock.c index 461ce5544f..43a07f9729 100644 --- a/variants/STM32L4xx/L433R(B-C)(I-T-Y)_L443RC(I-T-Y)/generic_clock.c +++ b/variants/STM32L4xx/L433R(B-C)(I-T-Y)_L443RC(I-T-Y)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L433RCTxP/generic_clock.c b/variants/STM32L4xx/L433RCTxP/generic_clock.c index 6f0a2eb6cc..d7043a6ed8 100644 --- a/variants/STM32L4xx/L433RCTxP/generic_clock.c +++ b/variants/STM32L4xx/L433RCTxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L433RCTxP/variant_NUCLEO_L433RC_P.cpp b/variants/STM32L4xx/L433RCTxP/variant_NUCLEO_L433RC_P.cpp index 7036d6270d..7374853ea3 100644 --- a/variants/STM32L4xx/L433RCTxP/variant_NUCLEO_L433RC_P.cpp +++ b/variants/STM32L4xx/L433RCTxP/variant_NUCLEO_L433RC_P.cpp @@ -100,8 +100,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L433VC(I-T)_L443VC(I-T)/generic_clock.c b/variants/STM32L4xx/L433VC(I-T)_L443VC(I-T)/generic_clock.c index 091820f7f7..604acbd966 100644 --- a/variants/STM32L4xx/L433VC(I-T)_L443VC(I-T)/generic_clock.c +++ b/variants/STM32L4xx/L433VC(I-T)_L443VC(I-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L451CCU_L451CE(T-U)/generic_clock.c b/variants/STM32L4xx/L451CCU_L451CE(T-U)/generic_clock.c index aa0bed6a05..11b23daa57 100644 --- a/variants/STM32L4xx/L451CCU_L451CE(T-U)/generic_clock.c +++ b/variants/STM32L4xx/L451CCU_L451CE(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L451R(C-E)(I-T-Y)/generic_clock.c b/variants/STM32L4xx/L451R(C-E)(I-T-Y)/generic_clock.c index 7c12f937cd..8966753cf6 100644 --- a/variants/STM32L4xx/L451R(C-E)(I-T-Y)/generic_clock.c +++ b/variants/STM32L4xx/L451R(C-E)(I-T-Y)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L451V(C-E)(I-T)/generic_clock.c b/variants/STM32L4xx/L451V(C-E)(I-T)/generic_clock.c index cb61265fb4..ccf45ace24 100644 --- a/variants/STM32L4xx/L451V(C-E)(I-T)/generic_clock.c +++ b/variants/STM32L4xx/L451V(C-E)(I-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L452CCU_L452CE(T-U)x(P)_L462CE(T-U)/generic_clock.c b/variants/STM32L4xx/L452CCU_L452CE(T-U)x(P)_L462CE(T-U)/generic_clock.c index 6add92cb39..84bda2b3e0 100644 --- a/variants/STM32L4xx/L452CCU_L452CE(T-U)x(P)_L462CE(T-U)/generic_clock.c +++ b/variants/STM32L4xx/L452CCU_L452CE(T-U)x(P)_L462CE(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)/generic_clock.c b/variants/STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)/generic_clock.c index 63628b293b..ec5f7a0169 100644 --- a/variants/STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)/generic_clock.c +++ b/variants/STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)/variant_LEAFONY_AP03.cpp b/variants/STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)/variant_LEAFONY_AP03.cpp index e1e8160a03..0bcdbde11c 100644 --- a/variants/STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)/variant_LEAFONY_AP03.cpp +++ b/variants/STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)/variant_LEAFONY_AP03.cpp @@ -60,8 +60,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)/variant_NUCLEO_L452RE.cpp b/variants/STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)/variant_NUCLEO_L452RE.cpp index 728815ba14..d42486bda1 100644 --- a/variants/STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)/variant_NUCLEO_L452RE.cpp +++ b/variants/STM32L4xx/L452RC(I-T-Y)_L452RE(I-T-Y)x(P)_L462RE(I-T-Y)/variant_NUCLEO_L452RE.cpp @@ -98,8 +98,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L452RETxP/generic_clock.c b/variants/STM32L4xx/L452RETxP/generic_clock.c index e68111282f..498dff7fa7 100644 --- a/variants/STM32L4xx/L452RETxP/generic_clock.c +++ b/variants/STM32L4xx/L452RETxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L452RETxP/variant_NUCLEO_L452RE_P.cpp b/variants/STM32L4xx/L452RETxP/variant_NUCLEO_L452RE_P.cpp index 90835a4929..20c77efc39 100644 --- a/variants/STM32L4xx/L452RETxP/variant_NUCLEO_L452RE_P.cpp +++ b/variants/STM32L4xx/L452RETxP/variant_NUCLEO_L452RE_P.cpp @@ -97,8 +97,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L452V(C-E)(I-T)_L462VE(I-T)/generic_clock.c b/variants/STM32L4xx/L452V(C-E)(I-T)_L462VE(I-T)/generic_clock.c index f90bcd325f..d63dd4ecfd 100644 --- a/variants/STM32L4xx/L452V(C-E)(I-T)_L462VE(I-T)/generic_clock.c +++ b/variants/STM32L4xx/L452V(C-E)(I-T)_L462VE(I-T)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L471Q(E-G)I/generic_clock.c b/variants/STM32L4xx/L471Q(E-G)I/generic_clock.c index 11bcc5d798..32ce00e4e2 100644 --- a/variants/STM32L4xx/L471Q(E-G)I/generic_clock.c +++ b/variants/STM32L4xx/L471Q(E-G)I/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L471R(E-G)T/generic_clock.c b/variants/STM32L4xx/L471R(E-G)T/generic_clock.c index 9c45a1a415..7d2e9dcf3b 100644 --- a/variants/STM32L4xx/L471R(E-G)T/generic_clock.c +++ b/variants/STM32L4xx/L471R(E-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L471V(E-G)T/generic_clock.c b/variants/STM32L4xx/L471V(E-G)T/generic_clock.c index ad1ead8c78..4a5810d752 100644 --- a/variants/STM32L4xx/L471V(E-G)T/generic_clock.c +++ b/variants/STM32L4xx/L471V(E-G)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L471Z(E-G)(J-T)/generic_clock.c b/variants/STM32L4xx/L471Z(E-G)(J-T)/generic_clock.c index 9cd4f3e6e4..ba96dfb314 100644 --- a/variants/STM32L4xx/L471Z(E-G)(J-T)/generic_clock.c +++ b/variants/STM32L4xx/L471Z(E-G)(J-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L475R(C-E-G)T_L476R(C-E-G)T_L486RGT/generic_clock.c b/variants/STM32L4xx/L475R(C-E-G)T_L476R(C-E-G)T_L486RGT/generic_clock.c index af6e68558d..47393f339c 100644 --- a/variants/STM32L4xx/L475R(C-E-G)T_L476R(C-E-G)T_L486RGT/generic_clock.c +++ b/variants/STM32L4xx/L475R(C-E-G)T_L476R(C-E-G)T_L486RGT/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L475R(C-E-G)T_L476R(C-E-G)T_L486RGT/variant_NUCLEO_L476RG.cpp b/variants/STM32L4xx/L475R(C-E-G)T_L476R(C-E-G)T_L486RGT/variant_NUCLEO_L476RG.cpp index dd4e1dd440..85c1735770 100644 --- a/variants/STM32L4xx/L475R(C-E-G)T_L476R(C-E-G)T_L486RGT/variant_NUCLEO_L476RG.cpp +++ b/variants/STM32L4xx/L475R(C-E-G)T_L476R(C-E-G)T_L486RGT/variant_NUCLEO_L476RG.cpp @@ -100,8 +100,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L475V(C-E-G)T_L476V(C-E-G)T_L486VGT/generic_clock.c b/variants/STM32L4xx/L475V(C-E-G)T_L476V(C-E-G)T_L486VGT/generic_clock.c index 40c37fd133..5b3f726377 100644 --- a/variants/STM32L4xx/L475V(C-E-G)T_L476V(C-E-G)T_L486VGT/generic_clock.c +++ b/variants/STM32L4xx/L475V(C-E-G)T_L476V(C-E-G)T_L486VGT/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L475V(C-E-G)T_L476V(C-E-G)T_L486VGT/variant_B_L475E_IOT01A.cpp b/variants/STM32L4xx/L475V(C-E-G)T_L476V(C-E-G)T_L486VGT/variant_B_L475E_IOT01A.cpp index f611105b3b..9712a7926f 100644 --- a/variants/STM32L4xx/L475V(C-E-G)T_L476V(C-E-G)T_L486VGT/variant_B_L475E_IOT01A.cpp +++ b/variants/STM32L4xx/L475V(C-E-G)T_L476V(C-E-G)T_L486VGT/variant_B_L475E_IOT01A.cpp @@ -136,8 +136,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L476J(E-G)Y_L485J(C-E)Y_L486JGY/generic_clock.c b/variants/STM32L4xx/L476J(E-G)Y_L485J(C-E)Y_L486JGY/generic_clock.c index 945a238664..3c4ed48828 100644 --- a/variants/STM32L4xx/L476J(E-G)Y_L485J(C-E)Y_L486JGY/generic_clock.c +++ b/variants/STM32L4xx/L476J(E-G)Y_L485J(C-E)Y_L486JGY/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L476JGYxP/generic_clock.c b/variants/STM32L4xx/L476JGYxP/generic_clock.c index 6f49d58cde..3426af9daa 100644 --- a/variants/STM32L4xx/L476JGYxP/generic_clock.c +++ b/variants/STM32L4xx/L476JGYxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L476M(E-G)Y/generic_clock.c b/variants/STM32L4xx/L476M(E-G)Y/generic_clock.c index b712c3b379..d5c92b3ca9 100644 --- a/variants/STM32L4xx/L476M(E-G)Y/generic_clock.c +++ b/variants/STM32L4xx/L476M(E-G)Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L476QEI_L476QGIx(P)_L486QGI/generic_clock.c b/variants/STM32L4xx/L476QEI_L476QGIx(P)_L486QGI/generic_clock.c index ef28f60fbe..4b84d4f82c 100644 --- a/variants/STM32L4xx/L476QEI_L476QGIx(P)_L486QGI/generic_clock.c +++ b/variants/STM32L4xx/L476QEI_L476QGIx(P)_L486QGI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L476VGYxP/generic_clock.c b/variants/STM32L4xx/L476VGYxP/generic_clock.c index 0cf45fd6c1..837c87e422 100644 --- a/variants/STM32L4xx/L476VGYxP/generic_clock.c +++ b/variants/STM32L4xx/L476VGYxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L476ZET_L476ZG(J-T)_L486ZGT/generic_clock.c b/variants/STM32L4xx/L476ZET_L476ZG(J-T)_L486ZGT/generic_clock.c index 365827cafc..6bc895fc08 100644 --- a/variants/STM32L4xx/L476ZET_L476ZG(J-T)_L486ZGT/generic_clock.c +++ b/variants/STM32L4xx/L476ZET_L476ZG(J-T)_L486ZGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L476ZGTxP/generic_clock.c b/variants/STM32L4xx/L476ZGTxP/generic_clock.c index bf95459765..3f0ece775a 100644 --- a/variants/STM32L4xx/L476ZGTxP/generic_clock.c +++ b/variants/STM32L4xx/L476ZGTxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496A(E-G)I_L4A6AGI/generic_clock.c b/variants/STM32L4xx/L496A(E-G)I_L4A6AGI/generic_clock.c index 656c095a2d..71ef59fbaa 100644 --- a/variants/STM32L4xx/L496A(E-G)I_L4A6AGI/generic_clock.c +++ b/variants/STM32L4xx/L496A(E-G)I_L4A6AGI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496AGIxP_L4A6AGIxP/generic_clock.c b/variants/STM32L4xx/L496AGIxP_L4A6AGIxP/generic_clock.c index 25c054cf4f..acaa3f117b 100644 --- a/variants/STM32L4xx/L496AGIxP_L4A6AGIxP/generic_clock.c +++ b/variants/STM32L4xx/L496AGIxP_L4A6AGIxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496QEI_L496QGIx(S)_L4A6QGI/generic_clock.c b/variants/STM32L4xx/L496QEI_L496QGIx(S)_L4A6QGI/generic_clock.c index c9cef42a0d..bee5007fbf 100644 --- a/variants/STM32L4xx/L496QEI_L496QGIx(S)_L4A6QGI/generic_clock.c +++ b/variants/STM32L4xx/L496QEI_L496QGIx(S)_L4A6QGI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496QGIxP_L4A6QGIxP/generic_clock.c b/variants/STM32L4xx/L496QGIxP_L4A6QGIxP/generic_clock.c index 7955b82d63..ebb8d6c287 100644 --- a/variants/STM32L4xx/L496QGIxP_L4A6QGIxP/generic_clock.c +++ b/variants/STM32L4xx/L496QGIxP_L4A6QGIxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496R(E-G)T_L4A6RGT/generic_clock.c b/variants/STM32L4xx/L496R(E-G)T_L4A6RGT/generic_clock.c index 4b0a3604af..5a44b17dbe 100644 --- a/variants/STM32L4xx/L496R(E-G)T_L4A6RGT/generic_clock.c +++ b/variants/STM32L4xx/L496R(E-G)T_L4A6RGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496RGTxP/generic_clock.c b/variants/STM32L4xx/L496RGTxP/generic_clock.c index 2e821b0d79..3ecdbd4908 100644 --- a/variants/STM32L4xx/L496RGTxP/generic_clock.c +++ b/variants/STM32L4xx/L496RGTxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496V(E-G)T_L4A6VGT/generic_clock.c b/variants/STM32L4xx/L496V(E-G)T_L4A6VGT/generic_clock.c index 4655535b3e..658d2b6acb 100644 --- a/variants/STM32L4xx/L496V(E-G)T_L4A6VGT/generic_clock.c +++ b/variants/STM32L4xx/L496V(E-G)T_L4A6VGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496VGTxP_L4A6VGTxP/generic_clock.c b/variants/STM32L4xx/L496VGTxP_L4A6VGTxP/generic_clock.c index fe8e2972b0..00cf02e0a4 100644 --- a/variants/STM32L4xx/L496VGTxP_L4A6VGTxP/generic_clock.c +++ b/variants/STM32L4xx/L496VGTxP_L4A6VGTxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496VGY_L4A6VGY/generic_clock.c b/variants/STM32L4xx/L496VGY_L4A6VGY/generic_clock.c index bb586fad53..4b8e33f327 100644 --- a/variants/STM32L4xx/L496VGY_L4A6VGY/generic_clock.c +++ b/variants/STM32L4xx/L496VGY_L4A6VGY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496VGYxP_L4A6VGYxP/generic_clock.c b/variants/STM32L4xx/L496VGYxP_L4A6VGYxP/generic_clock.c index 382f8167c9..f8e498fabc 100644 --- a/variants/STM32L4xx/L496VGYxP_L4A6VGYxP/generic_clock.c +++ b/variants/STM32L4xx/L496VGYxP_L4A6VGYxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496WGYxP/generic_clock.c b/variants/STM32L4xx/L496WGYxP/generic_clock.c index c887921d81..c46363428f 100644 --- a/variants/STM32L4xx/L496WGYxP/generic_clock.c +++ b/variants/STM32L4xx/L496WGYxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496Z(E-G)T_L4A6ZGT/generic_clock.c b/variants/STM32L4xx/L496Z(E-G)T_L4A6ZGT/generic_clock.c index adba37da4d..0a05bf691b 100644 --- a/variants/STM32L4xx/L496Z(E-G)T_L4A6ZGT/generic_clock.c +++ b/variants/STM32L4xx/L496Z(E-G)T_L4A6ZGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496Z(E-G)T_L4A6ZGT/variant_NUCLEO_L496ZG.cpp b/variants/STM32L4xx/L496Z(E-G)T_L4A6ZGT/variant_NUCLEO_L496ZG.cpp index a51dd5ad3f..e43ae2b2f2 100644 --- a/variants/STM32L4xx/L496Z(E-G)T_L4A6ZGT/variant_NUCLEO_L496ZG.cpp +++ b/variants/STM32L4xx/L496Z(E-G)T_L4A6ZGT/variant_NUCLEO_L496ZG.cpp @@ -179,8 +179,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496ZGTxP_L4A6ZGTxP/generic_clock.c b/variants/STM32L4xx/L496ZGTxP_L4A6ZGTxP/generic_clock.c index 7e5a9fc920..3d28b5e84d 100644 --- a/variants/STM32L4xx/L496ZGTxP_L4A6ZGTxP/generic_clock.c +++ b/variants/STM32L4xx/L496ZGTxP_L4A6ZGTxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L496ZGTxP_L4A6ZGTxP/variant_NUCLEO_L496ZG_P.cpp b/variants/STM32L4xx/L496ZGTxP_L4A6ZGTxP/variant_NUCLEO_L496ZG_P.cpp index 4b05c7d58e..c84b51150b 100644 --- a/variants/STM32L4xx/L496ZGTxP_L4A6ZGTxP/variant_NUCLEO_L496ZG_P.cpp +++ b/variants/STM32L4xx/L496ZGTxP_L4A6ZGTxP/variant_NUCLEO_L496ZG_P.cpp @@ -178,8 +178,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4A6RGTxP/generic_clock.c b/variants/STM32L4xx/L4A6RGTxP/generic_clock.c index b6076fc16b..be42ed9548 100644 --- a/variants/STM32L4xx/L4A6RGTxP/generic_clock.c +++ b/variants/STM32L4xx/L4A6RGTxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5A(G-E)I_L4Q5AGI/generic_clock.c b/variants/STM32L4xx/L4P5A(G-E)I_L4Q5AGI/generic_clock.c index ed560e645d..006018e92b 100644 --- a/variants/STM32L4xx/L4P5A(G-E)I_L4Q5AGI/generic_clock.c +++ b/variants/STM32L4xx/L4P5A(G-E)I_L4Q5AGI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5AGIxP_L4Q5AGIxP/generic_clock.c b/variants/STM32L4xx/L4P5AGIxP_L4Q5AGIxP/generic_clock.c index 09428b0cf6..0494c43da6 100644 --- a/variants/STM32L4xx/L4P5AGIxP_L4Q5AGIxP/generic_clock.c +++ b/variants/STM32L4xx/L4P5AGIxP_L4Q5AGIxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5C(E-G)(T-U)_L4Q5CG(T-U)/generic_clock.c b/variants/STM32L4xx/L4P5C(E-G)(T-U)_L4Q5CG(T-U)/generic_clock.c index 63b801856a..68c13cd09a 100644 --- a/variants/STM32L4xx/L4P5C(E-G)(T-U)_L4Q5CG(T-U)/generic_clock.c +++ b/variants/STM32L4xx/L4P5C(E-G)(T-U)_L4Q5CG(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5CG(T-U)xP_L4Q5CG(T-U)xP/generic_clock.c b/variants/STM32L4xx/L4P5CG(T-U)xP_L4Q5CG(T-U)xP/generic_clock.c index 314c68f0c9..24fc69f96d 100644 --- a/variants/STM32L4xx/L4P5CG(T-U)xP_L4Q5CG(T-U)xP/generic_clock.c +++ b/variants/STM32L4xx/L4P5CG(T-U)xP_L4Q5CG(T-U)xP/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5Q(G-E)I_L4Q5QGI/generic_clock.c b/variants/STM32L4xx/L4P5Q(G-E)I_L4Q5QGI/generic_clock.c index 6201ed4e6f..766017e206 100644 --- a/variants/STM32L4xx/L4P5Q(G-E)I_L4Q5QGI/generic_clock.c +++ b/variants/STM32L4xx/L4P5Q(G-E)I_L4Q5QGI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5QGIx(P-S)_L4Q5QGIxP/generic_clock.c b/variants/STM32L4xx/L4P5QGIx(P-S)_L4Q5QGIxP/generic_clock.c index 33ec0188f6..da37d97285 100644 --- a/variants/STM32L4xx/L4P5QGIx(P-S)_L4Q5QGIxP/generic_clock.c +++ b/variants/STM32L4xx/L4P5QGIx(P-S)_L4Q5QGIxP/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5R(G-E)T/generic_clock.c b/variants/STM32L4xx/L4P5R(G-E)T/generic_clock.c index 3f13c1785c..9d37f8920e 100644 --- a/variants/STM32L4xx/L4P5R(G-E)T/generic_clock.c +++ b/variants/STM32L4xx/L4P5R(G-E)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5RGTxP_L4Q5RGTxP/generic_clock.c b/variants/STM32L4xx/L4P5RGTxP_L4Q5RGTxP/generic_clock.c index e38cf7d0ed..4ff67a673e 100644 --- a/variants/STM32L4xx/L4P5RGTxP_L4Q5RGTxP/generic_clock.c +++ b/variants/STM32L4xx/L4P5RGTxP_L4Q5RGTxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5V(G-E)T_L4Q5VGT/generic_clock.c b/variants/STM32L4xx/L4P5V(G-E)T_L4Q5VGT/generic_clock.c index c166145e48..2a67e2775b 100644 --- a/variants/STM32L4xx/L4P5V(G-E)T_L4Q5VGT/generic_clock.c +++ b/variants/STM32L4xx/L4P5V(G-E)T_L4Q5VGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5V(G-E)Y_L4Q5VGY/generic_clock.c b/variants/STM32L4xx/L4P5V(G-E)Y_L4Q5VGY/generic_clock.c index c6e416d307..ca08b0a266 100644 --- a/variants/STM32L4xx/L4P5V(G-E)Y_L4Q5VGY/generic_clock.c +++ b/variants/STM32L4xx/L4P5V(G-E)Y_L4Q5VGY/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5VGTxP_L4Q5VGTxP/generic_clock.c b/variants/STM32L4xx/L4P5VGTxP_L4Q5VGTxP/generic_clock.c index ab49b32f07..5bde755df7 100644 --- a/variants/STM32L4xx/L4P5VGTxP_L4Q5VGTxP/generic_clock.c +++ b/variants/STM32L4xx/L4P5VGTxP_L4Q5VGTxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5VGYxP_L4Q5VGYxP/generic_clock.c b/variants/STM32L4xx/L4P5VGYxP_L4Q5VGYxP/generic_clock.c index 746af8307d..605c7121f6 100644 --- a/variants/STM32L4xx/L4P5VGYxP_L4Q5VGYxP/generic_clock.c +++ b/variants/STM32L4xx/L4P5VGYxP_L4Q5VGYxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5Z(G-E)T_L4Q5ZGT/generic_clock.c b/variants/STM32L4xx/L4P5Z(G-E)T_L4Q5ZGT/generic_clock.c index fa883464c3..b13485d65f 100644 --- a/variants/STM32L4xx/L4P5Z(G-E)T_L4Q5ZGT/generic_clock.c +++ b/variants/STM32L4xx/L4P5Z(G-E)T_L4Q5ZGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4P5ZGTxP_L4Q5ZGTxP/generic_clock.c b/variants/STM32L4xx/L4P5ZGTxP_L4Q5ZGTxP/generic_clock.c index c70e0dc524..4f1723d77f 100644 --- a/variants/STM32L4xx/L4P5ZGTxP_L4Q5ZGTxP/generic_clock.c +++ b/variants/STM32L4xx/L4P5ZGTxP_L4Q5ZGTxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4Q5RGT/generic_clock.c b/variants/STM32L4xx/L4Q5RGT/generic_clock.c index 238b8801c6..cba1f7eb02 100644 --- a/variants/STM32L4xx/L4Q5RGT/generic_clock.c +++ b/variants/STM32L4xx/L4Q5RGT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R5AGI_L4R5AIIx(P)_L4R7AII_L4S5AII_L4S7AII/generic_clock.c b/variants/STM32L4xx/L4R5AGI_L4R5AIIx(P)_L4R7AII_L4S5AII_L4S7AII/generic_clock.c index 80fc31ef42..7dd90b45c7 100644 --- a/variants/STM32L4xx/L4R5AGI_L4R5AIIx(P)_L4R7AII_L4S5AII_L4S7AII/generic_clock.c +++ b/variants/STM32L4xx/L4R5AGI_L4R5AIIx(P)_L4R7AII_L4S5AII_L4S7AII/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R5QGIx(S)_L4R5QIIx(P)_L4S5QII/generic_clock.c b/variants/STM32L4xx/L4R5QGIx(S)_L4R5QIIx(P)_L4S5QII/generic_clock.c index c0d9320844..9c28afdc82 100644 --- a/variants/STM32L4xx/L4R5QGIx(S)_L4R5QIIx(P)_L4S5QII/generic_clock.c +++ b/variants/STM32L4xx/L4R5QGIx(S)_L4R5QIIx(P)_L4S5QII/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R5V(G-I)T_L4R7VIT_L4S5VIT_L4S7VIT/generic_clock.c b/variants/STM32L4xx/L4R5V(G-I)T_L4R7VIT_L4S5VIT_L4S7VIT/generic_clock.c index 8fc786ecc7..3a9bca36d8 100644 --- a/variants/STM32L4xx/L4R5V(G-I)T_L4R7VIT_L4S5VIT_L4S7VIT/generic_clock.c +++ b/variants/STM32L4xx/L4R5V(G-I)T_L4R7VIT_L4S5VIT_L4S7VIT/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R5V(G-I)T_L4R7VIT_L4S5VIT_L4S7VIT/variant_B_L4S5I_IOT01A.cpp b/variants/STM32L4xx/L4R5V(G-I)T_L4R7VIT_L4S5VIT_L4S7VIT/variant_B_L4S5I_IOT01A.cpp index 4030c00f7d..41c1be4212 100644 --- a/variants/STM32L4xx/L4R5V(G-I)T_L4R7VIT_L4S5VIT_L4S7VIT/variant_B_L4S5I_IOT01A.cpp +++ b/variants/STM32L4xx/L4R5V(G-I)T_L4R7VIT_L4S5VIT_L4S7VIT/variant_B_L4S5I_IOT01A.cpp @@ -137,7 +137,6 @@ extern "C" { /** * @brief System Clock Configuration 120MHz - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R5Z(G-I)T_L4R7ZIT_L4S5ZIT_L4S7ZIT/generic_clock.c b/variants/STM32L4xx/L4R5Z(G-I)T_L4R7ZIT_L4S5ZIT_L4S7ZIT/generic_clock.c index e66d0a4ec6..8ea4019ca2 100644 --- a/variants/STM32L4xx/L4R5Z(G-I)T_L4R7ZIT_L4S5ZIT_L4S7ZIT/generic_clock.c +++ b/variants/STM32L4xx/L4R5Z(G-I)T_L4R7ZIT_L4S5ZIT_L4S7ZIT/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R5Z(G-I)T_L4R7ZIT_L4S5ZIT_L4S7ZIT/variant_NUCLEO_L4R5ZI.cpp b/variants/STM32L4xx/L4R5Z(G-I)T_L4R7ZIT_L4S5ZIT_L4S7ZIT/variant_NUCLEO_L4R5ZI.cpp index 8a255a6125..1119011968 100644 --- a/variants/STM32L4xx/L4R5Z(G-I)T_L4R7ZIT_L4S5ZIT_L4S7ZIT/variant_NUCLEO_L4R5ZI.cpp +++ b/variants/STM32L4xx/L4R5Z(G-I)T_L4R7ZIT_L4S5ZIT_L4S7ZIT/variant_NUCLEO_L4R5ZI.cpp @@ -170,8 +170,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R5Z(G-I)Y_L4R9Z(G-I)Y_L4S5ZIY_L4S9ZIY/generic_clock.c b/variants/STM32L4xx/L4R5Z(G-I)Y_L4R9Z(G-I)Y_L4S5ZIY_L4S9ZIY/generic_clock.c index 3e11c15892..d25b091b96 100644 --- a/variants/STM32L4xx/L4R5Z(G-I)Y_L4R9Z(G-I)Y_L4S5ZIY_L4S9ZIY/generic_clock.c +++ b/variants/STM32L4xx/L4R5Z(G-I)Y_L4R9Z(G-I)Y_L4S5ZIY_L4S9ZIY/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R5ZITxP/generic_clock.c b/variants/STM32L4xx/L4R5ZITxP/generic_clock.c index e65aa45a7e..e8724f36c9 100644 --- a/variants/STM32L4xx/L4R5ZITxP/generic_clock.c +++ b/variants/STM32L4xx/L4R5ZITxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R5ZITxP/variant_NUCLEO_L4R5ZI_P.cpp b/variants/STM32L4xx/L4R5ZITxP/variant_NUCLEO_L4R5ZI_P.cpp index 2019fe4326..3653444d64 100644 --- a/variants/STM32L4xx/L4R5ZITxP/variant_NUCLEO_L4R5ZI_P.cpp +++ b/variants/STM32L4xx/L4R5ZITxP/variant_NUCLEO_L4R5ZI_P.cpp @@ -169,8 +169,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R9A(G-I)I_L4S9AII/generic_clock.c b/variants/STM32L4xx/L4R9A(G-I)I_L4S9AII/generic_clock.c index 487e92dc44..4082c863ca 100644 --- a/variants/STM32L4xx/L4R9A(G-I)I_L4S9AII/generic_clock.c +++ b/variants/STM32L4xx/L4R9A(G-I)I_L4S9AII/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R9V(G-I)T_L4S9VIT/generic_clock.c b/variants/STM32L4xx/L4R9V(G-I)T_L4S9VIT/generic_clock.c index 81cfb57cbb..6f29e415d5 100644 --- a/variants/STM32L4xx/L4R9V(G-I)T_L4S9VIT/generic_clock.c +++ b/variants/STM32L4xx/L4R9V(G-I)T_L4S9VIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R9Z(G-I)J_L4S9ZIJ/generic_clock.c b/variants/STM32L4xx/L4R9Z(G-I)J_L4S9ZIJ/generic_clock.c index abd4ac7919..b9d215b6dc 100644 --- a/variants/STM32L4xx/L4R9Z(G-I)J_L4S9ZIJ/generic_clock.c +++ b/variants/STM32L4xx/L4R9Z(G-I)J_L4S9ZIJ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R9Z(G-I)J_L4S9ZIJ/variant_STEVAL_MKSBOX1V1.cpp b/variants/STM32L4xx/L4R9Z(G-I)J_L4S9ZIJ/variant_STEVAL_MKSBOX1V1.cpp index 89e2b94314..be894fb2ac 100644 --- a/variants/STM32L4xx/L4R9Z(G-I)J_L4S9ZIJ/variant_STEVAL_MKSBOX1V1.cpp +++ b/variants/STM32L4xx/L4R9Z(G-I)J_L4S9ZIJ/variant_STEVAL_MKSBOX1V1.cpp @@ -132,8 +132,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R9Z(G-I)T_L4S9ZIT/generic_clock.c b/variants/STM32L4xx/L4R9Z(G-I)T_L4S9ZIT/generic_clock.c index eb70a55c66..beaea99b67 100644 --- a/variants/STM32L4xx/L4R9Z(G-I)T_L4S9ZIT/generic_clock.c +++ b/variants/STM32L4xx/L4R9Z(G-I)T_L4S9ZIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L4xx/L4R9ZIYxP/generic_clock.c b/variants/STM32L4xx/L4R9ZIYxP/generic_clock.c index 4c3af2aa7c..a641e4808a 100644 --- a/variants/STM32L4xx/L4R9ZIYxP/generic_clock.c +++ b/variants/STM32L4xx/L4R9ZIYxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552C(C-E)(T-U)_L562CE(T-U)/generic_clock.c b/variants/STM32L5xx/L552C(C-E)(T-U)_L562CE(T-U)/generic_clock.c index bf20069b96..7c60bdce2b 100644 --- a/variants/STM32L5xx/L552C(C-E)(T-U)_L562CE(T-U)/generic_clock.c +++ b/variants/STM32L5xx/L552C(C-E)(T-U)_L562CE(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552CE(T-U)xP_L562CE(T-U)xP/generic_clock.c b/variants/STM32L5xx/L552CE(T-U)xP_L562CE(T-U)xP/generic_clock.c index ccb73858e1..5ccd508415 100644 --- a/variants/STM32L5xx/L552CE(T-U)xP_L562CE(T-U)xP/generic_clock.c +++ b/variants/STM32L5xx/L552CE(T-U)xP_L562CE(T-U)xP/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552MEYxP_L562MEYxP/generic_clock.c b/variants/STM32L5xx/L552MEYxP_L562MEYxP/generic_clock.c index 29bdbe95e2..7fe14405f2 100644 --- a/variants/STM32L5xx/L552MEYxP_L562MEYxP/generic_clock.c +++ b/variants/STM32L5xx/L552MEYxP_L562MEYxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552MEYxQ_L562MEYxQ/generic_clock.c b/variants/STM32L5xx/L552MEYxQ_L562MEYxQ/generic_clock.c index 85e73cd646..0ca0b93f31 100644 --- a/variants/STM32L5xx/L552MEYxQ_L562MEYxQ/generic_clock.c +++ b/variants/STM32L5xx/L552MEYxQ_L562MEYxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552Q(C-E)IxQ_L562QEIxQ/generic_clock.c b/variants/STM32L5xx/L552Q(C-E)IxQ_L562QEIxQ/generic_clock.c index fcbb9b3dff..ed2d1f3e49 100644 --- a/variants/STM32L5xx/L552Q(C-E)IxQ_L562QEIxQ/generic_clock.c +++ b/variants/STM32L5xx/L552Q(C-E)IxQ_L562QEIxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552Q(C-E)IxQ_L562QEIxQ/variant_STM32L562E_DK.cpp b/variants/STM32L5xx/L552Q(C-E)IxQ_L562QEIxQ/variant_STM32L562E_DK.cpp index 21b7a925f4..572b7c858e 100644 --- a/variants/STM32L5xx/L552Q(C-E)IxQ_L562QEIxQ/variant_STM32L562E_DK.cpp +++ b/variants/STM32L5xx/L552Q(C-E)IxQ_L562QEIxQ/variant_STM32L562E_DK.cpp @@ -138,8 +138,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552QEI_L562QEI/generic_clock.c b/variants/STM32L5xx/L552QEI_L562QEI/generic_clock.c index 34225dfb72..40a253d3a3 100644 --- a/variants/STM32L5xx/L552QEI_L562QEI/generic_clock.c +++ b/variants/STM32L5xx/L552QEI_L562QEI/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552QEIxP_L562QEIxP/generic_clock.c b/variants/STM32L5xx/L552QEIxP_L562QEIxP/generic_clock.c index 3b6471c396..00e79bf837 100644 --- a/variants/STM32L5xx/L552QEIxP_L562QEIxP/generic_clock.c +++ b/variants/STM32L5xx/L552QEIxP_L562QEIxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552R(C-E)T_L562RET/generic_clock.c b/variants/STM32L5xx/L552R(C-E)T_L562RET/generic_clock.c index 2f42c0c80e..d2366d66be 100644 --- a/variants/STM32L5xx/L552R(C-E)T_L562RET/generic_clock.c +++ b/variants/STM32L5xx/L552R(C-E)T_L562RET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552RETxP_L562RETxP/generic_clock.c b/variants/STM32L5xx/L552RETxP_L562RETxP/generic_clock.c index 1f24b7744b..69759fbb03 100644 --- a/variants/STM32L5xx/L552RETxP_L562RETxP/generic_clock.c +++ b/variants/STM32L5xx/L552RETxP_L562RETxP/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552RETxQ_L562RETxQ/generic_clock.c b/variants/STM32L5xx/L552RETxQ_L562RETxQ/generic_clock.c index 55008ece5c..3883530b57 100644 --- a/variants/STM32L5xx/L552RETxQ_L562RETxQ/generic_clock.c +++ b/variants/STM32L5xx/L552RETxQ_L562RETxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552V(C-E)TxQ_L562VETxQ/generic_clock.c b/variants/STM32L5xx/L552V(C-E)TxQ_L562VETxQ/generic_clock.c index 48503d5fd5..234aff4021 100644 --- a/variants/STM32L5xx/L552V(C-E)TxQ_L562VETxQ/generic_clock.c +++ b/variants/STM32L5xx/L552V(C-E)TxQ_L562VETxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552VET_L562VET/generic_clock.c b/variants/STM32L5xx/L552VET_L562VET/generic_clock.c index 0030a6c032..d6c43b6f6f 100644 --- a/variants/STM32L5xx/L552VET_L562VET/generic_clock.c +++ b/variants/STM32L5xx/L552VET_L562VET/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552Z(C-E)TxQ_L562ZETxQ/generic_clock.c b/variants/STM32L5xx/L552Z(C-E)TxQ_L562ZETxQ/generic_clock.c index 03cc10f75e..1a7a20c38a 100644 --- a/variants/STM32L5xx/L552Z(C-E)TxQ_L562ZETxQ/generic_clock.c +++ b/variants/STM32L5xx/L552Z(C-E)TxQ_L562ZETxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552Z(C-E)TxQ_L562ZETxQ/variant_NUCLEO_L552ZE_Q.cpp b/variants/STM32L5xx/L552Z(C-E)TxQ_L562ZETxQ/variant_NUCLEO_L552ZE_Q.cpp index 02c29255e2..46236e5b60 100644 --- a/variants/STM32L5xx/L552Z(C-E)TxQ_L562ZETxQ/variant_NUCLEO_L552ZE_Q.cpp +++ b/variants/STM32L5xx/L552Z(C-E)TxQ_L562ZETxQ/variant_NUCLEO_L552ZE_Q.cpp @@ -158,8 +158,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32L5xx/L552ZET_L562ZET/generic_clock.c b/variants/STM32L5xx/L552ZET_L562ZET/generic_clock.c index 73ab347c4a..06c9e91927 100644 --- a/variants/STM32L5xx/L552ZET_L562ZET/generic_clock.c +++ b/variants/STM32L5xx/L552ZET_L562ZET/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32MP1xx/MP151AA(B-D)_MP151CA(B-D)_MP151DA(B-D)_MP151FA(B-D)/generic_clock.c b/variants/STM32MP1xx/MP151AA(B-D)_MP151CA(B-D)_MP151DA(B-D)_MP151FA(B-D)/generic_clock.c index 347a778f04..edd949c308 100644 --- a/variants/STM32MP1xx/MP151AA(B-D)_MP151CA(B-D)_MP151DA(B-D)_MP151FA(B-D)/generic_clock.c +++ b/variants/STM32MP1xx/MP151AA(B-D)_MP151CA(B-D)_MP151DA(B-D)_MP151FA(B-D)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32MP1xx/MP151AAA_MP151CAA_MP151DAA_MP151FAA/generic_clock.c b/variants/STM32MP1xx/MP151AAA_MP151CAA_MP151DAA_MP151FAA/generic_clock.c index 8fd59be6a8..b3b898f5f0 100644 --- a/variants/STM32MP1xx/MP151AAA_MP151CAA_MP151DAA_MP151FAA/generic_clock.c +++ b/variants/STM32MP1xx/MP151AAA_MP151CAA_MP151DAA_MP151FAA/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32MP1xx/MP151AAC_MP151CAC_MP151DAC_MP151FAC/generic_clock.c b/variants/STM32MP1xx/MP151AAC_MP151CAC_MP151DAC_MP151FAC/generic_clock.c index 64eebd02f3..a7b5b07a63 100644 --- a/variants/STM32MP1xx/MP151AAC_MP151CAC_MP151DAC_MP151FAC/generic_clock.c +++ b/variants/STM32MP1xx/MP151AAC_MP151CAC_MP151DAC_MP151FAC/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32MP1xx/MP153AA(B-D)_MP153CA(B-D)_MP153DA(B-D)_MP153FA(B-D)_MP157AA(B-D)_MP157CA(B-D)_MP157DA(B-D)_MP157FA(B-D)/generic_clock.c b/variants/STM32MP1xx/MP153AA(B-D)_MP153CA(B-D)_MP153DA(B-D)_MP153FA(B-D)_MP157AA(B-D)_MP157CA(B-D)_MP157DA(B-D)_MP157FA(B-D)/generic_clock.c index 3273fb45bf..867f5fe71e 100644 --- a/variants/STM32MP1xx/MP153AA(B-D)_MP153CA(B-D)_MP153DA(B-D)_MP153FA(B-D)_MP157AA(B-D)_MP157CA(B-D)_MP157DA(B-D)_MP157FA(B-D)/generic_clock.c +++ b/variants/STM32MP1xx/MP153AA(B-D)_MP153CA(B-D)_MP153DA(B-D)_MP153FA(B-D)_MP157AA(B-D)_MP157CA(B-D)_MP157DA(B-D)_MP157FA(B-D)/generic_clock.c @@ -22,8 +22,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32MP1xx/MP153AAA_MP153CAA_MP153DAA_MP153FAA_MP157AAA_MP157CAA_MP157DAA_MP157FAA/generic_clock.c b/variants/STM32MP1xx/MP153AAA_MP153CAA_MP153DAA_MP153FAA_MP157AAA_MP157CAA_MP157DAA_MP157FAA/generic_clock.c index 6556694da5..d238015049 100644 --- a/variants/STM32MP1xx/MP153AAA_MP153CAA_MP153DAA_MP153FAA_MP157AAA_MP157CAA_MP157DAA_MP157FAA/generic_clock.c +++ b/variants/STM32MP1xx/MP153AAA_MP153CAA_MP153DAA_MP153FAA_MP157AAA_MP157CAA_MP157DAA_MP157FAA/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32MP1xx/MP153AAC_MP153CAC_MP153DAC_MP153FAC_MP157AAC_MP157CAC_MP157DAC_MP157FAC/generic_clock.c b/variants/STM32MP1xx/MP153AAC_MP153CAC_MP153DAC_MP153FAC_MP157AAC_MP157CAC_MP157DAC_MP157FAC/generic_clock.c index 1e79ba4bc3..dcd3b0455f 100644 --- a/variants/STM32MP1xx/MP153AAC_MP153CAC_MP153DAC_MP153FAC_MP157AAC_MP157CAC_MP157DAC_MP157FAC/generic_clock.c +++ b/variants/STM32MP1xx/MP153AAC_MP153CAC_MP153DAC_MP153FAC_MP157AAC_MP157CAC_MP157DAC_MP157FAC/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32MP1xx/MP153AAC_MP153CAC_MP153DAC_MP153FAC_MP157AAC_MP157CAC_MP157DAC_MP157FAC/variant_STM32MP157_DK.cpp b/variants/STM32MP1xx/MP153AAC_MP153CAC_MP153DAC_MP153FAC_MP157AAC_MP157CAC_MP157DAC_MP157FAC/variant_STM32MP157_DK.cpp index 0a2f7d9fcf..adc6a4d2cb 100644 --- a/variants/STM32MP1xx/MP153AAC_MP153CAC_MP153DAC_MP153FAC_MP157AAC_MP157CAC_MP157DAC_MP157FAC/variant_STM32MP157_DK.cpp +++ b/variants/STM32MP1xx/MP153AAC_MP153CAC_MP153DAC_MP153FAC_MP157AAC_MP157CAC_MP157DAC_MP157FAC/variant_STM32MP157_DK.cpp @@ -109,8 +109,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ void SystemClock_Config(void) { diff --git a/variants/STM32U0xx/U031C(6-8)(T-U)/generic_clock.c b/variants/STM32U0xx/U031C(6-8)(T-U)/generic_clock.c index 706c7236d4..87f8f8f8f9 100644 --- a/variants/STM32U0xx/U031C(6-8)(T-U)/generic_clock.c +++ b/variants/STM32U0xx/U031C(6-8)(T-U)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U0xx/U031F(4-6-8)P/generic_clock.c b/variants/STM32U0xx/U031F(4-6-8)P/generic_clock.c index e5338511ad..8012a8a57a 100644 --- a/variants/STM32U0xx/U031F(4-6-8)P/generic_clock.c +++ b/variants/STM32U0xx/U031F(4-6-8)P/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U0xx/U031G(6-8)Y/generic_clock.c b/variants/STM32U0xx/U031G(6-8)Y/generic_clock.c index 76cf7dd9d1..9edac615dc 100644 --- a/variants/STM32U0xx/U031G(6-8)Y/generic_clock.c +++ b/variants/STM32U0xx/U031G(6-8)Y/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U0xx/U031K(4-6-8)U/generic_clock.c b/variants/STM32U0xx/U031K(4-6-8)U/generic_clock.c index afce1fa05a..a4f75e8bd6 100644 --- a/variants/STM32U0xx/U031K(4-6-8)U/generic_clock.c +++ b/variants/STM32U0xx/U031K(4-6-8)U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U0xx/U031R(6-8)(I-T)/generic_clock.c b/variants/STM32U0xx/U031R(6-8)(I-T)/generic_clock.c index cb97109803..dfa6094c96 100644 --- a/variants/STM32U0xx/U031R(6-8)(I-T)/generic_clock.c +++ b/variants/STM32U0xx/U031R(6-8)(I-T)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U0xx/U073C(8-B-C)(T-U)_U083CC(T-U)/generic_clock.c b/variants/STM32U0xx/U073C(8-B-C)(T-U)_U083CC(T-U)/generic_clock.c index 1c431ba98a..9c5877409c 100644 --- a/variants/STM32U0xx/U073C(8-B-C)(T-U)_U083CC(T-U)/generic_clock.c +++ b/variants/STM32U0xx/U073C(8-B-C)(T-U)_U083CC(T-U)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U0xx/U073H(8-B-C)Y_U083HCY/generic_clock.c b/variants/STM32U0xx/U073H(8-B-C)Y_U083HCY/generic_clock.c index 13753670c9..1a942b3284 100644 --- a/variants/STM32U0xx/U073H(8-B-C)Y_U083HCY/generic_clock.c +++ b/variants/STM32U0xx/U073H(8-B-C)Y_U083HCY/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U0xx/U073K(8-B-C)U_U083KCU/generic_clock.c b/variants/STM32U0xx/U073K(8-B-C)U_U083KCU/generic_clock.c index 65b832dc4b..07a88c5f65 100644 --- a/variants/STM32U0xx/U073K(8-B-C)U_U083KCU/generic_clock.c +++ b/variants/STM32U0xx/U073K(8-B-C)U_U083KCU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U0xx/U073M(8-B-C)I_U083MCI/generic_clock.c b/variants/STM32U0xx/U073M(8-B-C)I_U083MCI/generic_clock.c index 7c3aaceeba..d12ae9989f 100644 --- a/variants/STM32U0xx/U073M(8-B-C)I_U083MCI/generic_clock.c +++ b/variants/STM32U0xx/U073M(8-B-C)I_U083MCI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U0xx/U073M(8-B-C)T_U083MCT/generic_clock.c b/variants/STM32U0xx/U073M(8-B-C)T_U083MCT/generic_clock.c index 53b0480e23..d659cd3c71 100644 --- a/variants/STM32U0xx/U073M(8-B-C)T_U083MCT/generic_clock.c +++ b/variants/STM32U0xx/U073M(8-B-C)T_U083MCT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U0xx/U073R(8-B-C)(I-T)_U083RC(I-T)/generic_clock.c b/variants/STM32U0xx/U073R(8-B-C)(I-T)_U083RC(I-T)/generic_clock.c index 7bb738af85..b1cca706c1 100644 --- a/variants/STM32U0xx/U073R(8-B-C)(I-T)_U083RC(I-T)/generic_clock.c +++ b/variants/STM32U0xx/U073R(8-B-C)(I-T)_U083RC(I-T)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U0xx/U073R(8-B-C)(I-T)_U083RC(I-T)/variant_NUCLEO_U083RC.cpp b/variants/STM32U0xx/U073R(8-B-C)(I-T)_U083RC(I-T)/variant_NUCLEO_U083RC.cpp index 4bdba69752..23b3071ccd 100644 --- a/variants/STM32U0xx/U073R(8-B-C)(I-T)_U083RC(I-T)/variant_NUCLEO_U083RC.cpp +++ b/variants/STM32U0xx/U073R(8-B-C)(I-T)_U083RC(I-T)/variant_NUCLEO_U083RC.cpp @@ -96,8 +96,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U335C(B-C)(T-U)_U345CC(T-U)/generic_clock.c b/variants/STM32U3xx/U335C(B-C)(T-U)_U345CC(T-U)/generic_clock.c index 65c4952046..6f9dbcf9c1 100644 --- a/variants/STM32U3xx/U335C(B-C)(T-U)_U345CC(T-U)/generic_clock.c +++ b/variants/STM32U3xx/U335C(B-C)(T-U)_U345CC(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U335C(B-C)(T-U)xQ_U345CC(T-U)xQ/generic_clock.c b/variants/STM32U3xx/U335C(B-C)(T-U)xQ_U345CC(T-U)xQ/generic_clock.c index 54c714866f..45b46d0042 100644 --- a/variants/STM32U3xx/U335C(B-C)(T-U)xQ_U345CC(T-U)xQ/generic_clock.c +++ b/variants/STM32U3xx/U335C(B-C)(T-U)xQ_U345CC(T-U)xQ/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U335C(B-C)YxQ_U345CCYxQ/generic_clock.c b/variants/STM32U3xx/U335C(B-C)YxQ_U345CCYxQ/generic_clock.c index 3c5865debf..4f4b906cd6 100644 --- a/variants/STM32U3xx/U335C(B-C)YxQ_U345CCYxQ/generic_clock.c +++ b/variants/STM32U3xx/U335C(B-C)YxQ_U345CCYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U335K(B-C)U_U345KCU/generic_clock.c b/variants/STM32U3xx/U335K(B-C)U_U345KCU/generic_clock.c index f094b55cc0..d7269921f8 100644 --- a/variants/STM32U3xx/U335K(B-C)U_U345KCU/generic_clock.c +++ b/variants/STM32U3xx/U335K(B-C)U_U345KCU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U335K(B-C)YxQ_U345KCYxQ/generic_clock.c b/variants/STM32U3xx/U335K(B-C)YxQ_U345KCYxQ/generic_clock.c index e1153901a3..81e83d76ad 100644 --- a/variants/STM32U3xx/U335K(B-C)YxQ_U345KCYxQ/generic_clock.c +++ b/variants/STM32U3xx/U335K(B-C)YxQ_U345KCYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U335R(B-C)I_U345RCI/generic_clock.c b/variants/STM32U3xx/U335R(B-C)I_U345RCI/generic_clock.c index befbf1a8c8..06eefe657c 100644 --- a/variants/STM32U3xx/U335R(B-C)I_U345RCI/generic_clock.c +++ b/variants/STM32U3xx/U335R(B-C)I_U345RCI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U335R(B-C)IxQ_U345RCIxQ/generic_clock.c b/variants/STM32U3xx/U335R(B-C)IxQ_U345RCIxQ/generic_clock.c index 259fbc585e..cdbfc27e70 100644 --- a/variants/STM32U3xx/U335R(B-C)IxQ_U345RCIxQ/generic_clock.c +++ b/variants/STM32U3xx/U335R(B-C)IxQ_U345RCIxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U335R(B-C)T_U345RCT/generic_clock.c b/variants/STM32U3xx/U335R(B-C)T_U345RCT/generic_clock.c index e99913c268..124b13e8b2 100644 --- a/variants/STM32U3xx/U335R(B-C)T_U345RCT/generic_clock.c +++ b/variants/STM32U3xx/U335R(B-C)T_U345RCT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U335R(B-C)TxQ_U345RCTxQ/generic_clock.c b/variants/STM32U3xx/U335R(B-C)TxQ_U345RCTxQ/generic_clock.c index f61140e569..af5802d156 100644 --- a/variants/STM32U3xx/U335R(B-C)TxQ_U345RCTxQ/generic_clock.c +++ b/variants/STM32U3xx/U335R(B-C)TxQ_U345RCTxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356C(C-E)(T-U)_U366CE(T-U)/generic_clock.c b/variants/STM32U3xx/U356C(C-E)(T-U)_U366CE(T-U)/generic_clock.c index 0939a2c52f..747c0f8e5b 100644 --- a/variants/STM32U3xx/U356C(C-E)(T-U)_U366CE(T-U)/generic_clock.c +++ b/variants/STM32U3xx/U356C(C-E)(T-U)_U366CE(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356C(C-E)(T-U)xQ_U366CE(T-U)xQ/generic_clock.c b/variants/STM32U3xx/U356C(C-E)(T-U)xQ_U366CE(T-U)xQ/generic_clock.c index a0380ebb6d..ac659bdcd9 100644 --- a/variants/STM32U3xx/U356C(C-E)(T-U)xQ_U366CE(T-U)xQ/generic_clock.c +++ b/variants/STM32U3xx/U356C(C-E)(T-U)xQ_U366CE(T-U)xQ/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356C(C-E)YxQ_U366CEYxQ/generic_clock.c b/variants/STM32U3xx/U356C(C-E)YxQ_U366CEYxQ/generic_clock.c index fa1268dbb9..1bc35cd22b 100644 --- a/variants/STM32U3xx/U356C(C-E)YxQ_U366CEYxQ/generic_clock.c +++ b/variants/STM32U3xx/U356C(C-E)YxQ_U366CEYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356K(C-E)U_U366KEU/generic_clock.c b/variants/STM32U3xx/U356K(C-E)U_U366KEU/generic_clock.c index aaeb7d7871..d56816ce68 100644 --- a/variants/STM32U3xx/U356K(C-E)U_U366KEU/generic_clock.c +++ b/variants/STM32U3xx/U356K(C-E)U_U366KEU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356R(C-E)I_U366REI/generic_clock.c b/variants/STM32U3xx/U356R(C-E)I_U366REI/generic_clock.c index b91f2b82b5..69633ab460 100644 --- a/variants/STM32U3xx/U356R(C-E)I_U366REI/generic_clock.c +++ b/variants/STM32U3xx/U356R(C-E)I_U366REI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356R(C-E)IxQ_U366REIxQ/generic_clock.c b/variants/STM32U3xx/U356R(C-E)IxQ_U366REIxQ/generic_clock.c index ca2650c881..b4a5be74fb 100644 --- a/variants/STM32U3xx/U356R(C-E)IxQ_U366REIxQ/generic_clock.c +++ b/variants/STM32U3xx/U356R(C-E)IxQ_U366REIxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356R(C-E)T_U366RET/generic_clock.c b/variants/STM32U3xx/U356R(C-E)T_U366RET/generic_clock.c index 39bb6d86d9..2fb065f042 100644 --- a/variants/STM32U3xx/U356R(C-E)T_U366RET/generic_clock.c +++ b/variants/STM32U3xx/U356R(C-E)T_U366RET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356R(C-E)TxQ_U366RETxQ/generic_clock.c b/variants/STM32U3xx/U356R(C-E)TxQ_U366RETxQ/generic_clock.c index 3dbfc691f6..df4a0e4de8 100644 --- a/variants/STM32U3xx/U356R(C-E)TxQ_U366RETxQ/generic_clock.c +++ b/variants/STM32U3xx/U356R(C-E)TxQ_U366RETxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356R(C-E)YxQ_U366REYxQ/generic_clock.c b/variants/STM32U3xx/U356R(C-E)YxQ_U366REYxQ/generic_clock.c index 2c3ee7a790..b438892dae 100644 --- a/variants/STM32U3xx/U356R(C-E)YxQ_U366REYxQ/generic_clock.c +++ b/variants/STM32U3xx/U356R(C-E)YxQ_U366REYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356V(C-E)I_U366VEI/generic_clock.c b/variants/STM32U3xx/U356V(C-E)I_U366VEI/generic_clock.c index 76449b5890..f5ce31faac 100644 --- a/variants/STM32U3xx/U356V(C-E)I_U366VEI/generic_clock.c +++ b/variants/STM32U3xx/U356V(C-E)I_U366VEI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356V(C-E)IxQ_U366VEIxQ/generic_clock.c b/variants/STM32U3xx/U356V(C-E)IxQ_U366VEIxQ/generic_clock.c index 0b2ea4bf49..626eee4553 100644 --- a/variants/STM32U3xx/U356V(C-E)IxQ_U366VEIxQ/generic_clock.c +++ b/variants/STM32U3xx/U356V(C-E)IxQ_U366VEIxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356V(C-E)T_U366VET/generic_clock.c b/variants/STM32U3xx/U356V(C-E)T_U366VET/generic_clock.c index 3a46d01a8e..ba80a49c21 100644 --- a/variants/STM32U3xx/U356V(C-E)T_U366VET/generic_clock.c +++ b/variants/STM32U3xx/U356V(C-E)T_U366VET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U356V(C-E)TxQ_U366VETxQ/generic_clock.c b/variants/STM32U3xx/U356V(C-E)TxQ_U366VETxQ/generic_clock.c index d9aa0a47ba..507b36f1c3 100644 --- a/variants/STM32U3xx/U356V(C-E)TxQ_U366VETxQ/generic_clock.c +++ b/variants/STM32U3xx/U356V(C-E)TxQ_U366VETxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375C(E-G)(T-U)_U385CG(T-U)/generic_clock.c b/variants/STM32U3xx/U375C(E-G)(T-U)_U385CG(T-U)/generic_clock.c index b1171bb64b..d4af08a781 100644 --- a/variants/STM32U3xx/U375C(E-G)(T-U)_U385CG(T-U)/generic_clock.c +++ b/variants/STM32U3xx/U375C(E-G)(T-U)_U385CG(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375C(E-G)(T-U)xQ_U385CG(T-U)xQ/generic_clock.c b/variants/STM32U3xx/U375C(E-G)(T-U)xQ_U385CG(T-U)xQ/generic_clock.c index 37daf459e5..e4424da02d 100644 --- a/variants/STM32U3xx/U375C(E-G)(T-U)xQ_U385CG(T-U)xQ/generic_clock.c +++ b/variants/STM32U3xx/U375C(E-G)(T-U)xQ_U385CG(T-U)xQ/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375C(E-G)YxQ_U385CGYxQ/generic_clock.c b/variants/STM32U3xx/U375C(E-G)YxQ_U385CGYxQ/generic_clock.c index 50eae6f2fa..d567258b26 100644 --- a/variants/STM32U3xx/U375C(E-G)YxQ_U385CGYxQ/generic_clock.c +++ b/variants/STM32U3xx/U375C(E-G)YxQ_U385CGYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375K(E-G)U_U385KGU/generic_clock.c b/variants/STM32U3xx/U375K(E-G)U_U385KGU/generic_clock.c index a9defaec52..80a10985b4 100644 --- a/variants/STM32U3xx/U375K(E-G)U_U385KGU/generic_clock.c +++ b/variants/STM32U3xx/U375K(E-G)U_U385KGU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375R(E-G)I_U385RGI/generic_clock.c b/variants/STM32U3xx/U375R(E-G)I_U385RGI/generic_clock.c index efe5978046..b16d9d0c53 100644 --- a/variants/STM32U3xx/U375R(E-G)I_U385RGI/generic_clock.c +++ b/variants/STM32U3xx/U375R(E-G)I_U385RGI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375R(E-G)IxQ_U385RGIxQ/generic_clock.c b/variants/STM32U3xx/U375R(E-G)IxQ_U385RGIxQ/generic_clock.c index f33fd4e6c8..9b194530cd 100644 --- a/variants/STM32U3xx/U375R(E-G)IxQ_U385RGIxQ/generic_clock.c +++ b/variants/STM32U3xx/U375R(E-G)IxQ_U385RGIxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375R(E-G)T_U385RGT/generic_clock.c b/variants/STM32U3xx/U375R(E-G)T_U385RGT/generic_clock.c index 4d63b3f000..c9bd2334c5 100644 --- a/variants/STM32U3xx/U375R(E-G)T_U385RGT/generic_clock.c +++ b/variants/STM32U3xx/U375R(E-G)T_U385RGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375R(E-G)TxQ_U385RGTxQ/generic_clock.c b/variants/STM32U3xx/U375R(E-G)TxQ_U385RGTxQ/generic_clock.c index 57747f2106..9fb45d1217 100644 --- a/variants/STM32U3xx/U375R(E-G)TxQ_U385RGTxQ/generic_clock.c +++ b/variants/STM32U3xx/U375R(E-G)TxQ_U385RGTxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375R(E-G)YxG_U385RGYxG/generic_clock.c b/variants/STM32U3xx/U375R(E-G)YxG_U385RGYxG/generic_clock.c index ddda945598..01d34ec548 100644 --- a/variants/STM32U3xx/U375R(E-G)YxG_U385RGYxG/generic_clock.c +++ b/variants/STM32U3xx/U375R(E-G)YxG_U385RGYxG/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375R(E-G)YxQ_U385RGYxQ/generic_clock.c b/variants/STM32U3xx/U375R(E-G)YxQ_U385RGYxQ/generic_clock.c index 3d5c1745bd..94f78bc497 100644 --- a/variants/STM32U3xx/U375R(E-G)YxQ_U385RGYxQ/generic_clock.c +++ b/variants/STM32U3xx/U375R(E-G)YxQ_U385RGYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375V(E-G)I_U385VGI/generic_clock.c b/variants/STM32U3xx/U375V(E-G)I_U385VGI/generic_clock.c index 17b0a89cc2..9b807f7958 100644 --- a/variants/STM32U3xx/U375V(E-G)I_U385VGI/generic_clock.c +++ b/variants/STM32U3xx/U375V(E-G)I_U385VGI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375V(E-G)IxQ_U385VGIxQ/generic_clock.c b/variants/STM32U3xx/U375V(E-G)IxQ_U385VGIxQ/generic_clock.c index e8f9fc9d5c..ddb702d224 100644 --- a/variants/STM32U3xx/U375V(E-G)IxQ_U385VGIxQ/generic_clock.c +++ b/variants/STM32U3xx/U375V(E-G)IxQ_U385VGIxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375V(E-G)T_U385VGT/generic_clock.c b/variants/STM32U3xx/U375V(E-G)T_U385VGT/generic_clock.c index 44252b1832..29c8ca82d3 100644 --- a/variants/STM32U3xx/U375V(E-G)T_U385VGT/generic_clock.c +++ b/variants/STM32U3xx/U375V(E-G)T_U385VGT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U375V(E-G)TxQ_U385VGTxQ/generic_clock.c b/variants/STM32U3xx/U375V(E-G)TxQ_U385VGTxQ/generic_clock.c index 790312b41c..edd058920b 100644 --- a/variants/STM32U3xx/U375V(E-G)TxQ_U385VGTxQ/generic_clock.c +++ b/variants/STM32U3xx/U375V(E-G)TxQ_U385VGTxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5C(G-I)(T-U)_U3C5CI(T-U)/generic_clock.c b/variants/STM32U3xx/U3B5C(G-I)(T-U)_U3C5CI(T-U)/generic_clock.c index da73f3e7e8..f9c5638fcb 100644 --- a/variants/STM32U3xx/U3B5C(G-I)(T-U)_U3C5CI(T-U)/generic_clock.c +++ b/variants/STM32U3xx/U3B5C(G-I)(T-U)_U3C5CI(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5C(G-I)(T-U)xQ_U3C5CI(T-U)xQ/generic_clock.c b/variants/STM32U3xx/U3B5C(G-I)(T-U)xQ_U3C5CI(T-U)xQ/generic_clock.c index bc935c4366..f91bb34d7d 100644 --- a/variants/STM32U3xx/U3B5C(G-I)(T-U)xQ_U3C5CI(T-U)xQ/generic_clock.c +++ b/variants/STM32U3xx/U3B5C(G-I)(T-U)xQ_U3C5CI(T-U)xQ/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5J(G-I)YxQ_U3C5JIYxQ/generic_clock.c b/variants/STM32U3xx/U3B5J(G-I)YxQ_U3C5JIYxQ/generic_clock.c index 3c81ae458d..37d9d00bcb 100644 --- a/variants/STM32U3xx/U3B5J(G-I)YxQ_U3C5JIYxQ/generic_clock.c +++ b/variants/STM32U3xx/U3B5J(G-I)YxQ_U3C5JIYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5Q(G-I)I_U3C5QII/generic_clock.c b/variants/STM32U3xx/U3B5Q(G-I)I_U3C5QII/generic_clock.c index 3be0a2ef3d..07aa782b09 100644 --- a/variants/STM32U3xx/U3B5Q(G-I)I_U3C5QII/generic_clock.c +++ b/variants/STM32U3xx/U3B5Q(G-I)I_U3C5QII/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5Q(G-I)IxQ_U3C5QIIxQ/generic_clock.c b/variants/STM32U3xx/U3B5Q(G-I)IxQ_U3C5QIIxQ/generic_clock.c index 00b152c96b..1356a01728 100644 --- a/variants/STM32U3xx/U3B5Q(G-I)IxQ_U3C5QIIxQ/generic_clock.c +++ b/variants/STM32U3xx/U3B5Q(G-I)IxQ_U3C5QIIxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5R(G-I)T_U3C5RIT/generic_clock.c b/variants/STM32U3xx/U3B5R(G-I)T_U3C5RIT/generic_clock.c index 330d977272..da6fdf214f 100644 --- a/variants/STM32U3xx/U3B5R(G-I)T_U3C5RIT/generic_clock.c +++ b/variants/STM32U3xx/U3B5R(G-I)T_U3C5RIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5R(G-I)TxQ_U3C5RITxQ/generic_clock.c b/variants/STM32U3xx/U3B5R(G-I)TxQ_U3C5RITxQ/generic_clock.c index 12251a327a..660a9b159a 100644 --- a/variants/STM32U3xx/U3B5R(G-I)TxQ_U3C5RITxQ/generic_clock.c +++ b/variants/STM32U3xx/U3B5R(G-I)TxQ_U3C5RITxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5V(G-I)T_U3C5VIT/generic_clock.c b/variants/STM32U3xx/U3B5V(G-I)T_U3C5VIT/generic_clock.c index fc5a3b6a7c..8dddce4aab 100644 --- a/variants/STM32U3xx/U3B5V(G-I)T_U3C5VIT/generic_clock.c +++ b/variants/STM32U3xx/U3B5V(G-I)T_U3C5VIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5V(G-I)TxQ_U3C5VITxQ/generic_clock.c b/variants/STM32U3xx/U3B5V(G-I)TxQ_U3C5VITxQ/generic_clock.c index b090bab71d..8c0a40bef9 100644 --- a/variants/STM32U3xx/U3B5V(G-I)TxQ_U3C5VITxQ/generic_clock.c +++ b/variants/STM32U3xx/U3B5V(G-I)TxQ_U3C5VITxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5V(G-I)YxQ_U3C5VIYxQ/generic_clock.c b/variants/STM32U3xx/U3B5V(G-I)YxQ_U3C5VIYxQ/generic_clock.c index f3268a875c..76754ca8db 100644 --- a/variants/STM32U3xx/U3B5V(G-I)YxQ_U3C5VIYxQ/generic_clock.c +++ b/variants/STM32U3xx/U3B5V(G-I)YxQ_U3C5VIYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5W(G-I)YxQ_U3C5WIYxQ/generic_clock.c b/variants/STM32U3xx/U3B5W(G-I)YxQ_U3C5WIYxQ/generic_clock.c index 39f076ba85..f179f02771 100644 --- a/variants/STM32U3xx/U3B5W(G-I)YxQ_U3C5WIYxQ/generic_clock.c +++ b/variants/STM32U3xx/U3B5W(G-I)YxQ_U3C5WIYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5Z(G-I)T_U3C5ZIT/generic_clock.c b/variants/STM32U3xx/U3B5Z(G-I)T_U3C5ZIT/generic_clock.c index 3d1e85fb3d..beaf9b0561 100644 --- a/variants/STM32U3xx/U3B5Z(G-I)T_U3C5ZIT/generic_clock.c +++ b/variants/STM32U3xx/U3B5Z(G-I)T_U3C5ZIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U3xx/U3B5Z(G-I)TxQ_U3C5ZITxQ/generic_clock.c b/variants/STM32U3xx/U3B5Z(G-I)TxQ_U3C5ZITxQ/generic_clock.c index 763c5c030a..3bab3f690b 100644 --- a/variants/STM32U3xx/U3B5Z(G-I)TxQ_U3C5ZITxQ/generic_clock.c +++ b/variants/STM32U3xx/U3B5Z(G-I)TxQ_U3C5ZITxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U535C(B-C-E)(T-U)_U545CE(T-U)/generic_clock.c b/variants/STM32U5xx/U535C(B-C-E)(T-U)_U545CE(T-U)/generic_clock.c index 0a055a78bb..5f64e431de 100644 --- a/variants/STM32U5xx/U535C(B-C-E)(T-U)_U545CE(T-U)/generic_clock.c +++ b/variants/STM32U5xx/U535C(B-C-E)(T-U)_U545CE(T-U)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U535C(B-C-E)(T-U)xQ_U545CE(T-U)xQ/generic_clock.c b/variants/STM32U5xx/U535C(B-C-E)(T-U)xQ_U545CE(T-U)xQ/generic_clock.c index dc948c3790..d84b3908fb 100644 --- a/variants/STM32U5xx/U535C(B-C-E)(T-U)xQ_U545CE(T-U)xQ/generic_clock.c +++ b/variants/STM32U5xx/U535C(B-C-E)(T-U)xQ_U545CE(T-U)xQ/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U535JEYxQ_U545JEYxQ/generic_clock.c b/variants/STM32U5xx/U535JEYxQ_U545JEYxQ/generic_clock.c index b936a1557e..a015702687 100644 --- a/variants/STM32U5xx/U535JEYxQ_U545JEYxQ/generic_clock.c +++ b/variants/STM32U5xx/U535JEYxQ_U545JEYxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U535N(C-E)YxQ_U545NEYxQ/generic_clock.c b/variants/STM32U5xx/U535N(C-E)YxQ_U545NEYxQ/generic_clock.c index 49b011c9de..99a3c295ee 100644 --- a/variants/STM32U5xx/U535N(C-E)YxQ_U545NEYxQ/generic_clock.c +++ b/variants/STM32U5xx/U535N(C-E)YxQ_U545NEYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U535R(B-C-E)I_U545REI/generic_clock.c b/variants/STM32U5xx/U535R(B-C-E)I_U545REI/generic_clock.c index ccb9db7cfc..77f5348505 100644 --- a/variants/STM32U5xx/U535R(B-C-E)I_U545REI/generic_clock.c +++ b/variants/STM32U5xx/U535R(B-C-E)I_U545REI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U535R(B-C-E)IxQ_U545REIxQ/generic_clock.c b/variants/STM32U5xx/U535R(B-C-E)IxQ_U545REIxQ/generic_clock.c index 867df6bb6c..d6373dcd7d 100644 --- a/variants/STM32U5xx/U535R(B-C-E)IxQ_U545REIxQ/generic_clock.c +++ b/variants/STM32U5xx/U535R(B-C-E)IxQ_U545REIxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U535R(B-C-E)T_U545RET/generic_clock.c b/variants/STM32U5xx/U535R(B-C-E)T_U545RET/generic_clock.c index 2d4728cded..e045d004a6 100644 --- a/variants/STM32U5xx/U535R(B-C-E)T_U545RET/generic_clock.c +++ b/variants/STM32U5xx/U535R(B-C-E)T_U545RET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U535R(B-C-E)TxQ_U545RETxQ/generic_clock.c b/variants/STM32U5xx/U535R(B-C-E)TxQ_U545RETxQ/generic_clock.c index bc24e2167c..414722c98c 100644 --- a/variants/STM32U5xx/U535R(B-C-E)TxQ_U545RETxQ/generic_clock.c +++ b/variants/STM32U5xx/U535R(B-C-E)TxQ_U545RETxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U535V(C-E)I_U545VEI/generic_clock.c b/variants/STM32U5xx/U535V(C-E)I_U545VEI/generic_clock.c index 172c68d598..718ca0da46 100644 --- a/variants/STM32U5xx/U535V(C-E)I_U545VEI/generic_clock.c +++ b/variants/STM32U5xx/U535V(C-E)I_U545VEI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U535V(C-E)IxQ_U545VEIxQ/generic_clock.c b/variants/STM32U5xx/U535V(C-E)IxQ_U545VEIxQ/generic_clock.c index 5e721fbc4b..c42e60f4fc 100644 --- a/variants/STM32U5xx/U535V(C-E)IxQ_U545VEIxQ/generic_clock.c +++ b/variants/STM32U5xx/U535V(C-E)IxQ_U545VEIxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U535V(C-E)T_U545VET/generic_clock.c b/variants/STM32U5xx/U535V(C-E)T_U545VET/generic_clock.c index 2ca0273ce3..ac5bc23934 100644 --- a/variants/STM32U5xx/U535V(C-E)T_U545VET/generic_clock.c +++ b/variants/STM32U5xx/U535V(C-E)T_U545VET/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U535V(C-E)TxQ_U545VETxQ/generic_clock.c b/variants/STM32U5xx/U535V(C-E)TxQ_U545VETxQ/generic_clock.c index 8ce62a7804..9abb76ab70 100644 --- a/variants/STM32U5xx/U535V(C-E)TxQ_U545VETxQ/generic_clock.c +++ b/variants/STM32U5xx/U535V(C-E)TxQ_U545VETxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575A(G-I)I_U585AII/generic_clock.c b/variants/STM32U5xx/U575A(G-I)I_U585AII/generic_clock.c index 3492865235..473118329c 100644 --- a/variants/STM32U5xx/U575A(G-I)I_U585AII/generic_clock.c +++ b/variants/STM32U5xx/U575A(G-I)I_U585AII/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575A(G-I)IxQ_U585AIIxQ/generic_clock.c b/variants/STM32U5xx/U575A(G-I)IxQ_U585AIIxQ/generic_clock.c index e15e124936..34c2189902 100644 --- a/variants/STM32U5xx/U575A(G-I)IxQ_U585AIIxQ/generic_clock.c +++ b/variants/STM32U5xx/U575A(G-I)IxQ_U585AIIxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575C(G-I)(T-U)_U585CI(T-U)/generic_clock.c b/variants/STM32U5xx/U575C(G-I)(T-U)_U585CI(T-U)/generic_clock.c index 1d67c73267..b739e975a8 100644 --- a/variants/STM32U5xx/U575C(G-I)(T-U)_U585CI(T-U)/generic_clock.c +++ b/variants/STM32U5xx/U575C(G-I)(T-U)_U585CI(T-U)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575C(G-I)(T-U)xQ_U585CI(T-U)xQ/generic_clock.c b/variants/STM32U5xx/U575C(G-I)(T-U)xQ_U585CI(T-U)xQ/generic_clock.c index 4f7f0b58e4..08b9c8855a 100644 --- a/variants/STM32U5xx/U575C(G-I)(T-U)xQ_U585CI(T-U)xQ/generic_clock.c +++ b/variants/STM32U5xx/U575C(G-I)(T-U)xQ_U585CI(T-U)xQ/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575O(G-I)YxQ_U585OIYxQ/generic_clock.c b/variants/STM32U5xx/U575O(G-I)YxQ_U585OIYxQ/generic_clock.c index 8bb7300f22..f8264f531e 100644 --- a/variants/STM32U5xx/U575O(G-I)YxQ_U585OIYxQ/generic_clock.c +++ b/variants/STM32U5xx/U575O(G-I)YxQ_U585OIYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575Q(G-I)I_U585QII/generic_clock.c b/variants/STM32U5xx/U575Q(G-I)I_U585QII/generic_clock.c index 9e8cb9e3e2..0c7054861f 100644 --- a/variants/STM32U5xx/U575Q(G-I)I_U585QII/generic_clock.c +++ b/variants/STM32U5xx/U575Q(G-I)I_U585QII/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575Q(G-I)IxQ_U585QIIxQ/generic_clock.c b/variants/STM32U5xx/U575Q(G-I)IxQ_U585QIIxQ/generic_clock.c index b6d9bbf076..0b50c6f85d 100644 --- a/variants/STM32U5xx/U575Q(G-I)IxQ_U585QIIxQ/generic_clock.c +++ b/variants/STM32U5xx/U575Q(G-I)IxQ_U585QIIxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575R(G-I)T_U585RIT/generic_clock.c b/variants/STM32U5xx/U575R(G-I)T_U585RIT/generic_clock.c index 0ae4fab2bb..05d0035e58 100644 --- a/variants/STM32U5xx/U575R(G-I)T_U585RIT/generic_clock.c +++ b/variants/STM32U5xx/U575R(G-I)T_U585RIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575R(G-I)TxQ_U585RITxQ/generic_clock.c b/variants/STM32U5xx/U575R(G-I)TxQ_U585RITxQ/generic_clock.c index 3b5f6cdccd..6175a34c8c 100644 --- a/variants/STM32U5xx/U575R(G-I)TxQ_U585RITxQ/generic_clock.c +++ b/variants/STM32U5xx/U575R(G-I)TxQ_U585RITxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575V(G-I)T_U585VIT/generic_clock.c b/variants/STM32U5xx/U575V(G-I)T_U585VIT/generic_clock.c index e41599be8a..869e91b988 100644 --- a/variants/STM32U5xx/U575V(G-I)T_U585VIT/generic_clock.c +++ b/variants/STM32U5xx/U575V(G-I)T_U585VIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575V(G-I)TxQ_U585VITxQ/generic_clock.c b/variants/STM32U5xx/U575V(G-I)TxQ_U585VITxQ/generic_clock.c index 04c8cd60d3..d26dbf8858 100644 --- a/variants/STM32U5xx/U575V(G-I)TxQ_U585VITxQ/generic_clock.c +++ b/variants/STM32U5xx/U575V(G-I)TxQ_U585VITxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575Z(G-I)T_U585ZIT/generic_clock.c b/variants/STM32U5xx/U575Z(G-I)T_U585ZIT/generic_clock.c index e0c634c562..b584d014b8 100644 --- a/variants/STM32U5xx/U575Z(G-I)T_U585ZIT/generic_clock.c +++ b/variants/STM32U5xx/U575Z(G-I)T_U585ZIT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U575Z(G-I)TxQ_U585ZITxQ/generic_clock.c b/variants/STM32U5xx/U575Z(G-I)TxQ_U585ZITxQ/generic_clock.c index da8a0316af..c45c11cf88 100644 --- a/variants/STM32U5xx/U575Z(G-I)TxQ_U585ZITxQ/generic_clock.c +++ b/variants/STM32U5xx/U575Z(G-I)TxQ_U585ZITxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U595A(I-J)H_U5A5AJH/generic_clock.c b/variants/STM32U5xx/U595A(I-J)H_U5A5AJH/generic_clock.c index 28199f9387..aa7f845618 100644 --- a/variants/STM32U5xx/U595A(I-J)H_U5A5AJH/generic_clock.c +++ b/variants/STM32U5xx/U595A(I-J)H_U5A5AJH/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U595A(I-J)HxQ_U5A5AJHxQ/generic_clock.c b/variants/STM32U5xx/U595A(I-J)HxQ_U5A5AJHxQ/generic_clock.c index a92b9ecd76..3f042f9819 100644 --- a/variants/STM32U5xx/U595A(I-J)HxQ_U5A5AJHxQ/generic_clock.c +++ b/variants/STM32U5xx/U595A(I-J)HxQ_U5A5AJHxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U595Q(I-J)I_U5A5QJI/generic_clock.c b/variants/STM32U5xx/U595Q(I-J)I_U5A5QJI/generic_clock.c index 270468732a..29b5162c57 100644 --- a/variants/STM32U5xx/U595Q(I-J)I_U5A5QJI/generic_clock.c +++ b/variants/STM32U5xx/U595Q(I-J)I_U5A5QJI/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U595Q(I-J)IxQ_U5A5Q(I-J)IxQ/generic_clock.c b/variants/STM32U5xx/U595Q(I-J)IxQ_U5A5Q(I-J)IxQ/generic_clock.c index e6c4833335..2496465f7a 100644 --- a/variants/STM32U5xx/U595Q(I-J)IxQ_U5A5Q(I-J)IxQ/generic_clock.c +++ b/variants/STM32U5xx/U595Q(I-J)IxQ_U5A5Q(I-J)IxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U595R(I-J)T_U5A5RJT/generic_clock.c b/variants/STM32U5xx/U595R(I-J)T_U5A5RJT/generic_clock.c index 5892ccdc4e..7764514d39 100644 --- a/variants/STM32U5xx/U595R(I-J)T_U5A5RJT/generic_clock.c +++ b/variants/STM32U5xx/U595R(I-J)T_U5A5RJT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U595R(I-J)TxQ_U5A5RJTxQ/generic_clock.c b/variants/STM32U5xx/U595R(I-J)TxQ_U5A5RJTxQ/generic_clock.c index 8171d8f9d3..c0e236b833 100644 --- a/variants/STM32U5xx/U595R(I-J)TxQ_U5A5RJTxQ/generic_clock.c +++ b/variants/STM32U5xx/U595R(I-J)TxQ_U5A5RJTxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U595V(I-J)T_U599VJT_U5A5VJT/generic_clock.c b/variants/STM32U5xx/U595V(I-J)T_U599VJT_U5A5VJT/generic_clock.c index e92ee9edf4..829a0cd764 100644 --- a/variants/STM32U5xx/U595V(I-J)T_U599VJT_U5A5VJT/generic_clock.c +++ b/variants/STM32U5xx/U595V(I-J)T_U599VJT_U5A5VJT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U595V(I-J)TxQ_U599V(I-J)TxQ_U5A5VJTxQ_U5A9VJTxQ/generic_clock.c b/variants/STM32U5xx/U595V(I-J)TxQ_U599V(I-J)TxQ_U5A5VJTxQ_U5A9VJTxQ/generic_clock.c index 21512430e4..a39a43c698 100644 --- a/variants/STM32U5xx/U595V(I-J)TxQ_U599V(I-J)TxQ_U5A5VJTxQ_U5A9VJTxQ/generic_clock.c +++ b/variants/STM32U5xx/U595V(I-J)TxQ_U599V(I-J)TxQ_U5A5VJTxQ_U5A9VJTxQ/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U595Z(I-J)T_U5A5ZJT/generic_clock.c b/variants/STM32U5xx/U595Z(I-J)T_U5A5ZJT/generic_clock.c index 20885d336e..515ff3e71a 100644 --- a/variants/STM32U5xx/U595Z(I-J)T_U5A5ZJT/generic_clock.c +++ b/variants/STM32U5xx/U595Z(I-J)T_U5A5ZJT/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U595Z(I-J)TxQ_U599Z(I-J)TxQ_U5A5ZJTxQ_U5A9ZJTxQ/generic_clock.c b/variants/STM32U5xx/U595Z(I-J)TxQ_U599Z(I-J)TxQ_U5A5ZJTxQ_U5A9ZJTxQ/generic_clock.c index ea9b2d2688..db96b558d5 100644 --- a/variants/STM32U5xx/U595Z(I-J)TxQ_U599Z(I-J)TxQ_U5A5ZJTxQ_U5A9ZJTxQ/generic_clock.c +++ b/variants/STM32U5xx/U595Z(I-J)TxQ_U599Z(I-J)TxQ_U5A5ZJTxQ_U5A9ZJTxQ/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U595Z(I-J)YxQ_U5A5ZJYxQ/generic_clock.c b/variants/STM32U5xx/U595Z(I-J)YxQ_U5A5ZJYxQ/generic_clock.c index f9662a5c0b..24bca84bf3 100644 --- a/variants/STM32U5xx/U595Z(I-J)YxQ_U5A5ZJYxQ/generic_clock.c +++ b/variants/STM32U5xx/U595Z(I-J)YxQ_U5A5ZJYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U599BJYxQ_U5A9BJYxQ/generic_clock.c b/variants/STM32U5xx/U599BJYxQ_U5A9BJYxQ/generic_clock.c index f6ed4e9da0..af03626399 100644 --- a/variants/STM32U5xx/U599BJYxQ_U5A9BJYxQ/generic_clock.c +++ b/variants/STM32U5xx/U599BJYxQ_U5A9BJYxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U599N(I-J)HxQ_U5A9NJHxQ/generic_clock.c b/variants/STM32U5xx/U599N(I-J)HxQ_U5A9NJHxQ/generic_clock.c index 67d33cd81f..626bb0e9c3 100644 --- a/variants/STM32U5xx/U599N(I-J)HxQ_U5A9NJHxQ/generic_clock.c +++ b/variants/STM32U5xx/U599N(I-J)HxQ_U5A9NJHxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U599Z(I-J)YxQ_U5A9ZJYxQ/generic_clock.c b/variants/STM32U5xx/U599Z(I-J)YxQ_U5A9ZJYxQ/generic_clock.c index fb43c8cd02..5f5d70189e 100644 --- a/variants/STM32U5xx/U599Z(I-J)YxQ_U5A9ZJYxQ/generic_clock.c +++ b/variants/STM32U5xx/U599Z(I-J)YxQ_U5A9ZJYxQ/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5F7V(I-J)T/generic_clock.c b/variants/STM32U5xx/U5F7V(I-J)T/generic_clock.c index e7b2146499..2ccaec8ec5 100644 --- a/variants/STM32U5xx/U5F7V(I-J)T/generic_clock.c +++ b/variants/STM32U5xx/U5F7V(I-J)T/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5F7V(I-J)TxQ/generic_clock.c b/variants/STM32U5xx/U5F7V(I-J)TxQ/generic_clock.c index dc23788ffb..22caea86ad 100644 --- a/variants/STM32U5xx/U5F7V(I-J)TxQ/generic_clock.c +++ b/variants/STM32U5xx/U5F7V(I-J)TxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5F9BJYxQ_U5G9BJYxQ/generic_clock.c b/variants/STM32U5xx/U5F9BJYxQ_U5G9BJYxQ/generic_clock.c index d928142587..2a7786fe8a 100644 --- a/variants/STM32U5xx/U5F9BJYxQ_U5G9BJYxQ/generic_clock.c +++ b/variants/STM32U5xx/U5F9BJYxQ_U5G9BJYxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5F9NJHxQ/generic_clock.c b/variants/STM32U5xx/U5F9NJHxQ/generic_clock.c index 5425cd99ae..9b054720e5 100644 --- a/variants/STM32U5xx/U5F9NJHxQ/generic_clock.c +++ b/variants/STM32U5xx/U5F9NJHxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5F9V(I-J)TxQ/generic_clock.c b/variants/STM32U5xx/U5F9V(I-J)TxQ/generic_clock.c index faeaac1825..327ab8a053 100644 --- a/variants/STM32U5xx/U5F9V(I-J)TxQ/generic_clock.c +++ b/variants/STM32U5xx/U5F9V(I-J)TxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5F9Z(I-J)JxQ/generic_clock.c b/variants/STM32U5xx/U5F9Z(I-J)JxQ/generic_clock.c index 6158061ae9..ce9326fafb 100644 --- a/variants/STM32U5xx/U5F9Z(I-J)JxQ/generic_clock.c +++ b/variants/STM32U5xx/U5F9Z(I-J)JxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5F9Z(I-J)TxQ/generic_clock.c b/variants/STM32U5xx/U5F9Z(I-J)TxQ/generic_clock.c index 9a76b19a3e..3f4b335a0f 100644 --- a/variants/STM32U5xx/U5F9Z(I-J)TxQ/generic_clock.c +++ b/variants/STM32U5xx/U5F9Z(I-J)TxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5G7VJT/generic_clock.c b/variants/STM32U5xx/U5G7VJT/generic_clock.c index 48f675554d..6b87b0fb6c 100644 --- a/variants/STM32U5xx/U5G7VJT/generic_clock.c +++ b/variants/STM32U5xx/U5G7VJT/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5G7VJTxQ/generic_clock.c b/variants/STM32U5xx/U5G7VJTxQ/generic_clock.c index b9def588c5..5ec356f7ca 100644 --- a/variants/STM32U5xx/U5G7VJTxQ/generic_clock.c +++ b/variants/STM32U5xx/U5G7VJTxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5G9NJHxQ/generic_clock.c b/variants/STM32U5xx/U5G9NJHxQ/generic_clock.c index 0be85f7601..48274b7d27 100644 --- a/variants/STM32U5xx/U5G9NJHxQ/generic_clock.c +++ b/variants/STM32U5xx/U5G9NJHxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5G9VJTxQ/generic_clock.c b/variants/STM32U5xx/U5G9VJTxQ/generic_clock.c index c2e0899a04..706c63be75 100644 --- a/variants/STM32U5xx/U5G9VJTxQ/generic_clock.c +++ b/variants/STM32U5xx/U5G9VJTxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5G9ZJJxQ/generic_clock.c b/variants/STM32U5xx/U5G9ZJJxQ/generic_clock.c index 14098e5f25..0e3311d80c 100644 --- a/variants/STM32U5xx/U5G9ZJJxQ/generic_clock.c +++ b/variants/STM32U5xx/U5G9ZJJxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32U5xx/U5G9ZJTxQ/generic_clock.c b/variants/STM32U5xx/U5G9ZJTxQ/generic_clock.c index 56530fffee..7f5098fb0b 100644 --- a/variants/STM32U5xx/U5G9ZJTxQ/generic_clock.c +++ b/variants/STM32U5xx/U5G9ZJTxQ/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF/generic_clock.c b/variants/STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF/generic_clock.c index ab958f4dda..ccdd472934 100644 --- a/variants/STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF/generic_clock.c +++ b/variants/STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF/variant_NUCLEO_WB09KE.cpp b/variants/STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF/variant_NUCLEO_WB09KE.cpp index ade85d7b03..93d275f48a 100644 --- a/variants/STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF/variant_NUCLEO_WB09KE.cpp +++ b/variants/STM32WB0x/WB05KZV_WB05TZF_WB09KEV_WB09TEF/variant_NUCLEO_WB09KE.cpp @@ -57,8 +57,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WB0x/WB06CCF_WB07CCF/generic_clock.c b/variants/STM32WB0x/WB06CCF_WB07CCF/generic_clock.c index 416598b1e2..2e7ca22333 100644 --- a/variants/STM32WB0x/WB06CCF_WB07CCF/generic_clock.c +++ b/variants/STM32WB0x/WB06CCF_WB07CCF/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WB0x/WB06CCV_WB07CCV/generic_clock.c b/variants/STM32WB0x/WB06CCV_WB07CCV/generic_clock.c index 7d088ae872..238df9981b 100644 --- a/variants/STM32WB0x/WB06CCV_WB07CCV/generic_clock.c +++ b/variants/STM32WB0x/WB06CCV_WB07CCV/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WB0x/WB06KCV_WB07KCV/generic_clock.c b/variants/STM32WB0x/WB06KCV_WB07KCV/generic_clock.c index fe7299b956..2ede139548 100644 --- a/variants/STM32WB0x/WB06KCV_WB07KCV/generic_clock.c +++ b/variants/STM32WB0x/WB06KCV_WB07KCV/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA23CEU/generic_clock.c b/variants/STM32WBAxx/WBA23CEU/generic_clock.c index 029979b4ed..b78d2db2f8 100644 --- a/variants/STM32WBAxx/WBA23CEU/generic_clock.c +++ b/variants/STM32WBAxx/WBA23CEU/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA23KEU/generic_clock.c b/variants/STM32WBAxx/WBA23KEU/generic_clock.c index 47caaa72a9..3b7d2f14ac 100644 --- a/variants/STM32WBAxx/WBA23KEU/generic_clock.c +++ b/variants/STM32WBAxx/WBA23KEU/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA25CEU/generic_clock.c b/variants/STM32WBAxx/WBA25CEU/generic_clock.c index 4c96fcef45..871d0e3f26 100644 --- a/variants/STM32WBAxx/WBA25CEU/generic_clock.c +++ b/variants/STM32WBAxx/WBA25CEU/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA25HEF/generic_clock.c b/variants/STM32WBAxx/WBA25HEF/generic_clock.c index a29d9939f0..f74904583d 100644 --- a/variants/STM32WBAxx/WBA25HEF/generic_clock.c +++ b/variants/STM32WBAxx/WBA25HEF/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA50KGU/generic_clock.c b/variants/STM32WBAxx/WBA50KGU/generic_clock.c index 2b077dd796..01fdbace4d 100644 --- a/variants/STM32WBAxx/WBA50KGU/generic_clock.c +++ b/variants/STM32WBAxx/WBA50KGU/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA52C(E-G)U_WBA54C(E-G)U/generic_clock.c b/variants/STM32WBAxx/WBA52C(E-G)U_WBA54C(E-G)U/generic_clock.c index 5fe0f8a655..2193fb28a9 100644 --- a/variants/STM32WBAxx/WBA52C(E-G)U_WBA54C(E-G)U/generic_clock.c +++ b/variants/STM32WBAxx/WBA52C(E-G)U_WBA54C(E-G)U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA52K(E-G)U_WBA54K(E-G)U/generic_clock.c b/variants/STM32WBAxx/WBA52K(E-G)U_WBA54K(E-G)U/generic_clock.c index 9d191ccae9..d33c968545 100644 --- a/variants/STM32WBAxx/WBA52K(E-G)U_WBA54K(E-G)U/generic_clock.c +++ b/variants/STM32WBAxx/WBA52K(E-G)U_WBA54K(E-G)U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA55C(E-G)U/generic_clock.c b/variants/STM32WBAxx/WBA55C(E-G)U/generic_clock.c index 42459d52ea..fa3156d01c 100644 --- a/variants/STM32WBAxx/WBA55C(E-G)U/generic_clock.c +++ b/variants/STM32WBAxx/WBA55C(E-G)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA55C(E-G)U/variant_NUCLEO_WBA55CG.cpp b/variants/STM32WBAxx/WBA55C(E-G)U/variant_NUCLEO_WBA55CG.cpp index 7c4b6b6482..88b8eb603a 100644 --- a/variants/STM32WBAxx/WBA55C(E-G)U/variant_NUCLEO_WBA55CG.cpp +++ b/variants/STM32WBAxx/WBA55C(E-G)U/variant_NUCLEO_WBA55CG.cpp @@ -66,8 +66,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA55H(E-G)F/generic_clock.c b/variants/STM32WBAxx/WBA55H(E-G)F/generic_clock.c index 5dbdf0c13a..10173963f1 100644 --- a/variants/STM32WBAxx/WBA55H(E-G)F/generic_clock.c +++ b/variants/STM32WBAxx/WBA55H(E-G)F/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA55U(E-G)I/generic_clock.c b/variants/STM32WBAxx/WBA55U(E-G)I/generic_clock.c index 372712bf7c..2a844395dd 100644 --- a/variants/STM32WBAxx/WBA55U(E-G)I/generic_clock.c +++ b/variants/STM32WBAxx/WBA55U(E-G)I/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA5MMGH/generic_clock.c b/variants/STM32WBAxx/WBA5MMGH/generic_clock.c index b9ef909d59..1b5a0bc810 100644 --- a/variants/STM32WBAxx/WBA5MMGH/generic_clock.c +++ b/variants/STM32WBAxx/WBA5MMGH/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA62C(G-I)U_WBA64C(G-I)U/generic_clock.c b/variants/STM32WBAxx/WBA62C(G-I)U_WBA64C(G-I)U/generic_clock.c index 359c0269ba..777292adbc 100644 --- a/variants/STM32WBAxx/WBA62C(G-I)U_WBA64C(G-I)U/generic_clock.c +++ b/variants/STM32WBAxx/WBA62C(G-I)U_WBA64C(G-I)U/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA62M(G-I)F_WBA65M(G-I)F/generic_clock.c b/variants/STM32WBAxx/WBA62M(G-I)F_WBA65M(G-I)F/generic_clock.c index 6e5da4f21e..29145296e4 100644 --- a/variants/STM32WBAxx/WBA62M(G-I)F_WBA65M(G-I)F/generic_clock.c +++ b/variants/STM32WBAxx/WBA62M(G-I)F_WBA65M(G-I)F/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA62P(G-I)I_WBA65P(G-I)I/generic_clock.c b/variants/STM32WBAxx/WBA62P(G-I)I_WBA65P(G-I)I/generic_clock.c index ddc02d097b..6a4d1d1a79 100644 --- a/variants/STM32WBAxx/WBA62P(G-I)I_WBA65P(G-I)I/generic_clock.c +++ b/variants/STM32WBAxx/WBA62P(G-I)I_WBA65P(G-I)I/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA63C(G-I)U/generic_clock.c b/variants/STM32WBAxx/WBA63C(G-I)U/generic_clock.c index db4dcb7ac6..cefdc58c92 100644 --- a/variants/STM32WBAxx/WBA63C(G-I)U/generic_clock.c +++ b/variants/STM32WBAxx/WBA63C(G-I)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA65C(G-I)U/generic_clock.c b/variants/STM32WBAxx/WBA65C(G-I)U/generic_clock.c index 208a7f4d8f..ffda7d1755 100644 --- a/variants/STM32WBAxx/WBA65C(G-I)U/generic_clock.c +++ b/variants/STM32WBAxx/WBA65C(G-I)U/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA65R(G-I)V/generic_clock.c b/variants/STM32WBAxx/WBA65R(G-I)V/generic_clock.c index c8da48434e..e2b1240c00 100644 --- a/variants/STM32WBAxx/WBA65R(G-I)V/generic_clock.c +++ b/variants/STM32WBAxx/WBA65R(G-I)V/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBAxx/WBA6MOIH/generic_clock.c b/variants/STM32WBAxx/WBA6MOIH/generic_clock.c index 3a03c42977..3dfc2e589f 100644 --- a/variants/STM32WBAxx/WBA6MOIH/generic_clock.c +++ b/variants/STM32WBAxx/WBA6MOIH/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB10CCU/generic_clock.c b/variants/STM32WBxx/WB10CCU/generic_clock.c index 1b74e0268e..c2891a5750 100644 --- a/variants/STM32WBxx/WB10CCU/generic_clock.c +++ b/variants/STM32WBxx/WB10CCU/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB15CCU/generic_clock.c b/variants/STM32WBxx/WB15CCU/generic_clock.c index 213d6b63bd..75107e0fdc 100644 --- a/variants/STM32WBxx/WB15CCU/generic_clock.c +++ b/variants/STM32WBxx/WB15CCU/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB15CCU/variant_NUCLEO_WB15CC.cpp b/variants/STM32WBxx/WB15CCU/variant_NUCLEO_WB15CC.cpp index b4cf6fe311..1d8a756d21 100644 --- a/variants/STM32WBxx/WB15CCU/variant_NUCLEO_WB15CC.cpp +++ b/variants/STM32WBxx/WB15CCU/variant_NUCLEO_WB15CC.cpp @@ -72,8 +72,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB15CCUxE/generic_clock.c b/variants/STM32WBxx/WB15CCUxE/generic_clock.c index 2b718423cd..56e62f979b 100644 --- a/variants/STM32WBxx/WB15CCUxE/generic_clock.c +++ b/variants/STM32WBxx/WB15CCUxE/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB15CCY/generic_clock.c b/variants/STM32WBxx/WB15CCY/generic_clock.c index a1980f390a..57e9d0deed 100644 --- a/variants/STM32WBxx/WB15CCY/generic_clock.c +++ b/variants/STM32WBxx/WB15CCY/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB1MMCH/generic_clock.c b/variants/STM32WBxx/WB1MMCH/generic_clock.c index fee72e1435..d3d6b9d298 100644 --- a/variants/STM32WBxx/WB1MMCH/generic_clock.c +++ b/variants/STM32WBxx/WB1MMCH/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB30CEUxA_WB50CGU/generic_clock.c b/variants/STM32WBxx/WB30CEUxA_WB50CGU/generic_clock.c index cfb065384f..5766f6ee24 100644 --- a/variants/STM32WBxx/WB30CEUxA_WB50CGU/generic_clock.c +++ b/variants/STM32WBxx/WB30CEUxA_WB50CGU/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/generic_clock.c b/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/generic_clock.c index f9fad5c979..bcd8d10e1b 100644 --- a/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/generic_clock.c +++ b/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/variant_MKR_SHARKY.cpp b/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/variant_MKR_SHARKY.cpp index f48d93e59f..fb488d371a 100644 --- a/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/variant_MKR_SHARKY.cpp +++ b/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/variant_MKR_SHARKY.cpp @@ -64,8 +64,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/variant_P_NUCLEO_WB55_USB_DONGLE.cpp b/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/variant_P_NUCLEO_WB55_USB_DONGLE.cpp index 15b5857045..7d528b8c95 100644 --- a/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/variant_P_NUCLEO_WB55_USB_DONGLE.cpp +++ b/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/variant_P_NUCLEO_WB55_USB_DONGLE.cpp @@ -67,8 +67,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/variant_WEACT_WB55CGU6.cpp b/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/variant_WEACT_WB55CGU6.cpp index 89d12abb7b..604f74ae4c 100644 --- a/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/variant_WEACT_WB55CGU6.cpp +++ b/variants/STM32WBxx/WB35C(C-E)UxA_WB55C(C-E-G)U/variant_WEACT_WB55CGU6.cpp @@ -63,8 +63,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None * * Board is fitted with a 32MHz HSE crystal (X2) and a 32.768kHz LSE * crystal (X1). SYSCLK is driven directly by HSE (no PLL needed) and diff --git a/variants/STM32WBxx/WB55R(C-E-G)V/generic_clock.c b/variants/STM32WBxx/WB55R(C-E-G)V/generic_clock.c index 51bc66d071..f5eaf6708c 100644 --- a/variants/STM32WBxx/WB55R(C-E-G)V/generic_clock.c +++ b/variants/STM32WBxx/WB55R(C-E-G)V/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB55R(C-E-G)V/variant_P_NUCLEO_WB55RG.cpp b/variants/STM32WBxx/WB55R(C-E-G)V/variant_P_NUCLEO_WB55RG.cpp index 7915a2fb1c..023f38f481 100644 --- a/variants/STM32WBxx/WB55R(C-E-G)V/variant_P_NUCLEO_WB55RG.cpp +++ b/variants/STM32WBxx/WB55R(C-E-G)V/variant_P_NUCLEO_WB55RG.cpp @@ -99,8 +99,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.cpp b/variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.cpp index 519cf75414..db594eb52a 100644 --- a/variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.cpp +++ b/variants/STM32WBxx/WB55R(C-E-G)V/variant_STEAM32_WB55RG.cpp @@ -81,8 +81,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB55V(C-E-G)(Q-Y)_WB55VYY/generic_clock.c b/variants/STM32WBxx/WB55V(C-E-G)(Q-Y)_WB55VYY/generic_clock.c index bf94430b8c..91a1db13fb 100644 --- a/variants/STM32WBxx/WB55V(C-E-G)(Q-Y)_WB55VYY/generic_clock.c +++ b/variants/STM32WBxx/WB55V(C-E-G)(Q-Y)_WB55VYY/generic_clock.c @@ -19,8 +19,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB5MMGH/generic_clock.c b/variants/STM32WBxx/WB5MMGH/generic_clock.c index 0ee30fc00b..a66411a5ce 100644 --- a/variants/STM32WBxx/WB5MMGH/generic_clock.c +++ b/variants/STM32WBxx/WB5MMGH/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB5MMGH/variant_SFE_MMPB_STM32WB5MMG.cpp b/variants/STM32WBxx/WB5MMGH/variant_SFE_MMPB_STM32WB5MMG.cpp index ae3aa7eb1c..130922bfe2 100644 --- a/variants/STM32WBxx/WB5MMGH/variant_SFE_MMPB_STM32WB5MMG.cpp +++ b/variants/STM32WBxx/WB5MMGH/variant_SFE_MMPB_STM32WB5MMG.cpp @@ -78,8 +78,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ void SystemClock_Config(void) { diff --git a/variants/STM32WBxx/WB5MMGH/variant_STM32WB5MM_DK.cpp b/variants/STM32WBxx/WB5MMGH/variant_STM32WB5MM_DK.cpp index 2a1fa6ebbf..30af1f17e4 100644 --- a/variants/STM32WBxx/WB5MMGH/variant_STM32WB5MM_DK.cpp +++ b/variants/STM32WBxx/WB5MMGH/variant_STM32WB5MM_DK.cpp @@ -110,8 +110,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WL3x/WL30K(8-B)V/generic_clock.c b/variants/STM32WL3x/WL30K(8-B)V/generic_clock.c index d0d062ad3a..b196f1cca3 100644 --- a/variants/STM32WL3x/WL30K(8-B)V/generic_clock.c +++ b/variants/STM32WL3x/WL30K(8-B)V/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WL3x/WL31C(8-B)V/generic_clock.c b/variants/STM32WL3x/WL31C(8-B)V/generic_clock.c index e3b0be96c3..02e51d4a64 100644 --- a/variants/STM32WL3x/WL31C(8-B)V/generic_clock.c +++ b/variants/STM32WL3x/WL31C(8-B)V/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WL3x/WL31K(8-B)V_WL33K(8-B-C)Vx(X)/generic_clock.c b/variants/STM32WL3x/WL31K(8-B)V_WL33K(8-B-C)Vx(X)/generic_clock.c index 881a4c6abc..af0840c7bd 100644 --- a/variants/STM32WL3x/WL31K(8-B)V_WL33K(8-B-C)Vx(X)/generic_clock.c +++ b/variants/STM32WL3x/WL31K(8-B)V_WL33K(8-B-C)Vx(X)/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WL3x/WL33C(8-B-C)Vx(X)/generic_clock.c b/variants/STM32WL3x/WL33C(8-B-C)Vx(X)/generic_clock.c index 3b394221d1..5f88924417 100644 --- a/variants/STM32WL3x/WL33C(8-B-C)Vx(X)/generic_clock.c +++ b/variants/STM32WL3x/WL33C(8-B-C)Vx(X)/generic_clock.c @@ -17,8 +17,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WL3x/WL33C(8-B-C)Vx(X)/variant_NUCLEO_WL33CCx.cpp b/variants/STM32WL3x/WL33C(8-B-C)Vx(X)/variant_NUCLEO_WL33CCx.cpp index ebedcd3b6b..41a9c37b2d 100644 --- a/variants/STM32WL3x/WL33C(8-B-C)Vx(X)/variant_NUCLEO_WL33CCx.cpp +++ b/variants/STM32WL3x/WL33C(8-B-C)Vx(X)/variant_NUCLEO_WL33CCx.cpp @@ -65,8 +65,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WL3x/WL3RK(8-B)Vx(X)/generic_clock.c b/variants/STM32WL3x/WL3RK(8-B)Vx(X)/generic_clock.c index 163bc7b677..b122ca9613 100644 --- a/variants/STM32WL3x/WL3RK(8-B)Vx(X)/generic_clock.c +++ b/variants/STM32WL3x/WL3RK(8-B)Vx(X)/generic_clock.c @@ -16,8 +16,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/generic_clock.c b/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/generic_clock.c index 53ab9131e4..d76885a1a7 100644 --- a/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/generic_clock.c +++ b/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_GENERIC_NODE_SE_TTI.cpp b/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_GENERIC_NODE_SE_TTI.cpp index 473730a600..8d5daade65 100644 --- a/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_GENERIC_NODE_SE_TTI.cpp +++ b/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_GENERIC_NODE_SE_TTI.cpp @@ -62,8 +62,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_RAK3172_MODULE.cpp b/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_RAK3172_MODULE.cpp index ed0c3d81f0..25bcc2e252 100644 --- a/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_RAK3172_MODULE.cpp +++ b/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_RAK3172_MODULE.cpp @@ -63,8 +63,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_WE_OCEANUS1.cpp b/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_WE_OCEANUS1.cpp index a1031bc5b5..662ab2b2e4 100644 --- a/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_WE_OCEANUS1.cpp +++ b/variants/STM32WLxx/WL54CCU_WL55CCU_WLE4C(8-B-C)U_WLE5C(8-B-C)U/variant_WE_OCEANUS1.cpp @@ -63,8 +63,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/generic_clock.c b/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/generic_clock.c index 40f42118b7..8aa4919d23 100644 --- a/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/generic_clock.c +++ b/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/generic_clock.c @@ -18,8 +18,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_ELV_BM_TRX1.cpp b/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_ELV_BM_TRX1.cpp index faf409c40b..4612b9d541 100644 --- a/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_ELV_BM_TRX1.cpp +++ b/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_ELV_BM_TRX1.cpp @@ -59,8 +59,6 @@ extern "C" { /* * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_LORA_E5_MINI.cpp b/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_LORA_E5_MINI.cpp index 4963b5acae..79c1e56c78 100644 --- a/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_LORA_E5_MINI.cpp +++ b/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_LORA_E5_MINI.cpp @@ -64,8 +64,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_NUCLEO_WL55JC1.cpp b/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_NUCLEO_WL55JC1.cpp index bcfa7de76e..d29aa4b8a2 100644 --- a/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_NUCLEO_WL55JC1.cpp +++ b/variants/STM32WLxx/WL54JCI_WL55JCI_WLE4J(8-B-C)I_WLE5J(8-B-C)I/variant_NUCLEO_WL55JC1.cpp @@ -83,8 +83,6 @@ extern "C" { /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) { diff --git a/variants/STM32WLxx/WL5MOCHx(S)/generic_clock.c b/variants/STM32WLxx/WL5MOCHx(S)/generic_clock.c index 8e1628e6bb..3da67e8a6c 100644 --- a/variants/STM32WLxx/WL5MOCHx(S)/generic_clock.c +++ b/variants/STM32WLxx/WL5MOCHx(S)/generic_clock.c @@ -15,8 +15,6 @@ /** * @brief System Clock Configuration - * @param None - * @retval None */ WEAK void SystemClock_Config(void) {