diff --git a/cores/arduino/board.h b/cores/arduino/board.h index 830ac728b6..0d79fcdfac 100644 --- a/cores/arduino/board.h +++ b/cores/arduino/board.h @@ -5,9 +5,6 @@ * Core and peripherals registers definitions */ #include "interrupt.h" -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus #include "analog.h" #include "clock.h" #include "core_callback.h" @@ -21,8 +18,11 @@ extern "C" { #include "twi.h" #include "uart.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ void init(void) ; #ifdef __cplusplus } -#endif // __cplusplus +#endif /* __cplusplus */ #endif /* _BOARD_H_ */ diff --git a/cores/arduino/stm32/analog.c b/cores/arduino/stm32/analog.c index f6ba3dc9de..078145d784 100644 --- a/cores/arduino/stm32/analog.c +++ b/cores/arduino/stm32/analog.c @@ -35,17 +35,6 @@ * ****************************************************************************** */ -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f4xx_system - * @{ - */ - -/** @addtogroup STM32F4xx_System_Private_Includes - * @{ - */ #include "stm32_def.h" #include "analog.h" #include "timer.h" @@ -55,20 +44,7 @@ extern "C" { #endif -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_TypesDefinitions - * @{ - */ -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Defines - * @{ - */ +/* Private_Defines */ #if defined(ADC_SAMPLETIME_8CYCLES_5) #define SAMPLINGTIME ADC_SAMPLETIME_8CYCLES_5; #elif defined(ADC_SAMPLETIME_12CYCLES_5) @@ -102,30 +78,11 @@ extern "C" { #ifndef ADC_REGULAR_RANK_1 #define ADC_REGULAR_RANK_1 1 #endif -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ -/** @addtogroup STM32F4xx_System_Private_Variables - * @{ - */ +/* Private_Variables */ static PinName g_current_pin = NC; -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_FunctionPrototypes - * @{ - */ +/* Private Functions */ static uint32_t get_adc_channel(PinName pin) { uint32_t function = pinmap_function(pin, PinMap_ADC); @@ -804,23 +761,6 @@ void pwm_stop(PinName pin) HAL_TIM_PWM_DeInit(&timHandle); } - -/** - * @} - */ - - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ #ifdef __cplusplus } #endif diff --git a/cores/arduino/stm32/analog.h b/cores/arduino/stm32/analog.h index beba57fdb1..8a49f42048 100644 --- a/cores/arduino/stm32/analog.h +++ b/cores/arduino/stm32/analog.h @@ -47,9 +47,6 @@ extern "C" { #endif -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ void dac_write_value(PinName pin, uint32_t value, uint8_t do_init); void dac_stop(PinName pin); diff --git a/cores/arduino/stm32/interrupt.cpp b/cores/arduino/stm32/interrupt.cpp index 91f0c4b0d8..f1351b51e1 100644 --- a/cores/arduino/stm32/interrupt.cpp +++ b/cores/arduino/stm32/interrupt.cpp @@ -35,27 +35,10 @@ * ****************************************************************************** */ -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f4xx_system - * @{ - */ - -/** @addtogroup STM32F4xx_System_Private_Includes - * @{ - */ #include "stm32_def.h" #include "interrupt.h" -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_TypesDefinitions - * @{ - */ +/* Private Types */ /*As we can have only one interrupt/pin id, don't need to get the port info*/ typedef struct { @@ -63,29 +46,10 @@ typedef struct { std::function callback; } gpio_irq_conf_str; -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Defines - * @{ - */ +/* Private_Defines */ #define NB_EXTI (16) -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ -/** @addtogroup STM32F4xx_System_Private_Variables - * @{ - */ +/* Private Variables */ static gpio_irq_conf_str gpio_irq_conf[NB_EXTI] = { #if defined (STM32F0xx) || defined (STM32L0xx) {.irqnb = EXTI0_1_IRQn, .callback = NULL}, //GPIO_PIN_0 @@ -123,25 +87,14 @@ static gpio_irq_conf_str gpio_irq_conf[NB_EXTI] = { {.irqnb = EXTI15_10_IRQn, .callback = NULL} //GPIO_PIN_15 #endif }; -/** - * @} - */ -/** @addtogroup STM32F4xx_System_Private_FunctionPrototypes - * @{ - */ - -static uint8_t get_pin_id(uint16_t pin); - -/** - * @} - */ +/* Private Functions */ /** * @brief This function returns the pin ID function of the HAL PIN definition * @param pin : one of the gpio pin * @retval None */ -uint8_t get_pin_id(uint16_t pin) +static uint8_t get_pin_id(uint16_t pin) { uint8_t id = 0; @@ -397,15 +350,4 @@ void EXTI15_10_IRQHandler(void) } #endif #endif -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/cores/arduino/stm32/interrupt.h b/cores/arduino/stm32/interrupt.h index 799c5497e1..60ba61bd8a 100644 --- a/cores/arduino/stm32/interrupt.h +++ b/cores/arduino/stm32/interrupt.h @@ -54,9 +54,6 @@ typedef std::function callback_function_t; void stm32_interrupt_enable(GPIO_TypeDef *port, uint16_t pin, callback_function_t callback, uint32_t mode); #endif -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ void stm32_interrupt_enable(GPIO_TypeDef *port, uint16_t pin, void (*callback)(void), uint32_t mode); void stm32_interrupt_disable(GPIO_TypeDef *port, uint16_t pin); diff --git a/cores/arduino/stm32/spi_com.c b/cores/arduino/stm32/spi_com.c index 9b5d4f0dd5..e7a65e7817 100644 --- a/cores/arduino/stm32/spi_com.c +++ b/cores/arduino/stm32/spi_com.c @@ -35,17 +35,6 @@ * ****************************************************************************** */ -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f4xx_system - * @{ - */ - -/** @addtogroup STM32F4xx_System_Private_Includes - * @{ - */ #include "core_debug.h" #include "stm32_def.h" #include "spi_com.h" @@ -56,53 +45,7 @@ extern "C" { #endif -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Defines - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Variables - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_FunctionPrototypes - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Functions - * @{ - */ +/* Private Functions */ /** * @brief return clock freq of an SPI instance * @param spi_inst : SPI instance @@ -460,18 +403,6 @@ spi_status_e spi_transfer(spi_t *obj, uint8_t *tx_buffer, return ret; } - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ #ifdef __cplusplus } #endif diff --git a/cores/arduino/stm32/spi_com.h b/cores/arduino/stm32/spi_com.h index c2238b4dba..0b15e011c0 100644 --- a/cores/arduino/stm32/spi_com.h +++ b/cores/arduino/stm32/spi_com.h @@ -94,9 +94,6 @@ typedef enum { SPI_ERROR = 2 } spi_status_e; -/* Exported constants --------------------------------------------------------*/ - -/* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ void spi_init(spi_t *obj, uint32_t speed, spi_mode_e mode, uint8_t msb); void spi_deinit(spi_t *obj); diff --git a/cores/arduino/stm32/timer.c b/cores/arduino/stm32/timer.c index 98291db36c..8653720f4b 100644 --- a/cores/arduino/stm32/timer.c +++ b/cores/arduino/stm32/timer.c @@ -35,17 +35,6 @@ * ****************************************************************************** */ -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f4xx_system - * @{ - */ - -/** @addtogroup STM32F4xx_System_Private_Includes - * @{ - */ #include "core_debug.h" #include "timer.h" #include "board.h" @@ -54,56 +43,13 @@ extern "C" { #endif -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Defines - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_FunctionPrototypes -* @{ -*/ - +/* Private Functions */ static void HAL_TIMx_PeriodElapsedCallback(stimer_t *obj); -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Variables - * @{ - */ - +/* Private Variables */ #define TIMER_NUM (22) static TIM_HandleTypeDef *timer_handles[TIMER_NUM] = {NULL}; - -/** - * @} - */ - /** * @brief Enable the timer clock * @param htim : one of the defined timer @@ -1421,17 +1367,6 @@ void TIM22_IRQHandler(void) } #endif //TIM22_BASE -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ #ifdef __cplusplus } #endif diff --git a/cores/arduino/stm32/timer.h b/cores/arduino/stm32/timer.h index 7ede8518ca..87c23dec49 100644 --- a/cores/arduino/stm32/timer.h +++ b/cores/arduino/stm32/timer.h @@ -182,7 +182,6 @@ struct timer_s { #endif #endif -/* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ void timer_enable_clock(TIM_HandleTypeDef *htim); diff --git a/cores/arduino/stm32/twi.c b/cores/arduino/stm32/twi.c index 729cd74153..078d500868 100644 --- a/cores/arduino/stm32/twi.c +++ b/cores/arduino/stm32/twi.c @@ -35,42 +35,16 @@ * ****************************************************************************** */ - -/** @addtogroup CMSIS - * @{ - */ - -/** @addtogroup stm32f4xx_system - * @{ - */ - -/** @addtogroup STM32F4xx_System_Private_Includes - * @{ - */ #include "core_debug.h" #include "stm32_def.h" #include "twi.h" #include "PinAF_STM32F1.h" -/** - * @} - */ - #ifdef __cplusplus extern "C" { #endif -/** @addtogroup STM32F4xx_System_Private_TypesDefinitions - * @{ - */ -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Defines - * @{ - */ - +/* Private Defines */ /// @brief I2C timout in tick unit #define I2C_TIMEOUT_TICK 100 @@ -78,31 +52,6 @@ extern "C" { #define SLAVE_MODE_RECEIVE 1 #define SLAVE_MODE_LISTEN 2 - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Macros - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_TypesDefinitions - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Variables - * @{ - */ - /* Family specific description for I2C */ #if defined(STM32F7xx) || defined(STM32H7xx) || defined(STM32L4xx) #define I2C_NUM (4) @@ -114,25 +63,9 @@ extern "C" { #error "Unknown Family - unknown I2C_NUM" #endif +/* Private Variables */ static I2C_HandleTypeDef *i2c_handles[I2C_NUM]; -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_FunctionPrototypes - * @{ - */ - -/** - * @} - */ - -/** @addtogroup STM32F4xx_System_Private_Functions - * @{ - */ - - /** * @brief Default init and setup GPIO and I2C peripheral * @param obj : pointer to i2c_t structure @@ -752,18 +685,6 @@ void I2C4_ER_IRQHandler(void) #endif // !defined(STM32F0xx) && !defined(STM32L0xx) #endif // I2C4_BASE -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - #ifdef __cplusplus } #endif diff --git a/cores/arduino/stm32/twi.h b/cores/arduino/stm32/twi.h index bcccf19543..46b381b16f 100644 --- a/cores/arduino/stm32/twi.h +++ b/cores/arduino/stm32/twi.h @@ -141,8 +141,6 @@ typedef enum { #endif } i2c_timing_e; -/* Exported constants --------------------------------------------------------*/ -/* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ void i2c_init(i2c_t *obj); void i2c_custom_init(i2c_t *obj, i2c_timing_e timing, uint32_t addressingMode,