ext: stm32cube: update stm32f3xx cube version
Update Cube version for STM32F3XX family from version: V1.7.0 to version: V1.9.0 Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
24a5f1012e
commit
653d0242ca
|
@ -2,14 +2,12 @@
|
|||
******************************************************************************
|
||||
* @file stm32_hal_legacy.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief This file contains aliases definition for the STM32Cube HAL constants
|
||||
* macros and functions maintained for legacy purpose.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
|
@ -382,7 +380,7 @@
|
|||
/** @defgroup LL_FMC_Aliased_Defines LL FMC Aliased Defines maintained for compatibility purpose
|
||||
* @{
|
||||
*/
|
||||
#if defined(STM32L4) || defined(STM32F7)
|
||||
#if defined(STM32L4) || defined(STM32F7) || defined(STM32H7)
|
||||
#define FMC_NAND_PCC_WAIT_FEATURE_DISABLE FMC_NAND_WAIT_FEATURE_DISABLE
|
||||
#define FMC_NAND_PCC_WAIT_FEATURE_ENABLE FMC_NAND_WAIT_FEATURE_ENABLE
|
||||
#define FMC_NAND_PCC_MEM_BUS_WIDTH_8 FMC_NAND_MEM_BUS_WIDTH_8
|
||||
|
@ -946,12 +944,9 @@
|
|||
#define ETH_MAC_RXFIFO_BELOW_THRESHOLD 0x00000100U /* Rx FIFO fill level: fill-level below flow-control de-activate threshold */
|
||||
#define ETH_MAC_RXFIFO_ABOVE_THRESHOLD 0x00000200U /* Rx FIFO fill level: fill-level above flow-control activate threshold */
|
||||
#define ETH_MAC_RXFIFO_FULL 0x00000300U /* Rx FIFO fill level: full */
|
||||
#if defined(STM32F1)
|
||||
#else
|
||||
#define ETH_MAC_READCONTROLLER_IDLE 0x00000000U /* Rx FIFO read controller IDLE state */
|
||||
#define ETH_MAC_READCONTROLLER_READING_DATA 0x00000020U /* Rx FIFO read controller Reading frame data */
|
||||
#define ETH_MAC_READCONTROLLER_READING_STATUS 0x00000040U /* Rx FIFO read controller Reading frame status (or time-stamp) */
|
||||
#endif
|
||||
#define ETH_MAC_READCONTROLLER_FLUSHING 0x00000060U /* Rx FIFO read controller Flushing the frame data and status */
|
||||
#define ETH_MAC_RXFIFO_WRITE_ACTIVE 0x00000010U /* Rx FIFO write controller active */
|
||||
#define ETH_MAC_SMALL_FIFO_NOTACTIVE 0x00000000U /* MAC small FIFO read / write controllers not active */
|
||||
|
@ -980,7 +975,7 @@
|
|||
* @}
|
||||
*/
|
||||
|
||||
#if defined(STM32L4xx) || defined(STM32F7) || defined(STM32F427xx) || defined(STM32F437xx) ||\
|
||||
#if defined(STM32L4) || defined(STM32F7) || defined(STM32F427xx) || defined(STM32F437xx) ||\
|
||||
defined(STM32F429xx) || defined(STM32F439xx) || defined(STM32F469xx) || defined(STM32F479xx)
|
||||
/** @defgroup HAL_DMA2D_Aliased_Defines HAL DMA2D Aliased Defines maintained for legacy purpose
|
||||
* @{
|
||||
|
@ -1005,7 +1000,7 @@
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
#endif /* STM32L4xx || STM32F7*/
|
||||
#endif /* STM32L4 || STM32F7*/
|
||||
|
||||
/** @defgroup HAL_PPP_Aliased_Defines HAL PPP Aliased Defines maintained for legacy purpose
|
||||
* @{
|
||||
|
@ -1190,6 +1185,9 @@
|
|||
* @{
|
||||
*/
|
||||
#define HAL_LTDC_LineEvenCallback HAL_LTDC_LineEventCallback
|
||||
#define HAL_LTDC_Relaod HAL_LTDC_Reload
|
||||
#define HAL_LTDC_StructInitFromVideoConfig HAL_LTDCEx_StructInitFromVideoConfig
|
||||
#define HAL_LTDC_StructInitFromAdaptedCommandConfig HAL_LTDCEx_StructInitFromAdaptedCommandConfig
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -1625,7 +1623,11 @@
|
|||
|
||||
#define __HAL_I2C_RESET_CR2 I2C_RESET_CR2
|
||||
#define __HAL_I2C_GENERATE_START I2C_GENERATE_START
|
||||
#if defined(STM32F1)
|
||||
#define __HAL_I2C_FREQ_RANGE I2C_FREQRANGE
|
||||
#else
|
||||
#define __HAL_I2C_FREQ_RANGE I2C_FREQ_RANGE
|
||||
#endif /* STM32F1 */
|
||||
#define __HAL_I2C_RISE_TIME I2C_RISE_TIME
|
||||
#define __HAL_I2C_SPEED_STANDARD I2C_SPEED_STANDARD
|
||||
#define __HAL_I2C_SPEED_FAST I2C_SPEED_FAST
|
||||
|
@ -2631,7 +2633,7 @@
|
|||
#define SdioClockSelection Sdmmc1ClockSelection
|
||||
#define RCC_PERIPHCLK_SDIO RCC_PERIPHCLK_SDMMC1
|
||||
#define __HAL_RCC_SDIO_CONFIG __HAL_RCC_SDMMC1_CONFIG
|
||||
#define __HAL_RCC_GET_SDIO_SOURCE __HAL_RCC_GET_SDMMC1_SOURCE
|
||||
#define __HAL_RCC_GET_SDIO_SOURCE __HAL_RCC_GET_SDMMC1_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(STM32F7)
|
||||
|
@ -2792,6 +2794,15 @@
|
|||
#define RCC_SWPMI1CLKSOURCE_PCLK RCC_SWPMI1CLKSOURCE_PCLK1
|
||||
#define RCC_LPTIM1CLKSOURCE_PCLK RCC_LPTIM1CLKSOURCE_PCLK1
|
||||
#define RCC_LPTIM2CLKSOURCE_PCLK RCC_LPTIM2CLKSOURCE_PCLK1
|
||||
|
||||
#define RCC_DFSDM1AUDIOCLKSOURCE_I2SAPB1 RCC_DFSDM1AUDIOCLKSOURCE_I2S1
|
||||
#define RCC_DFSDM1AUDIOCLKSOURCE_I2SAPB2 RCC_DFSDM1AUDIOCLKSOURCE_I2S2
|
||||
#define RCC_DFSDM2AUDIOCLKSOURCE_I2SAPB1 RCC_DFSDM2AUDIOCLKSOURCE_I2S1
|
||||
#define RCC_DFSDM2AUDIOCLKSOURCE_I2SAPB2 RCC_DFSDM2AUDIOCLKSOURCE_I2S2
|
||||
#define RCC_DFSDM1CLKSOURCE_APB2 RCC_DFSDM1CLKSOURCE_PCLK2
|
||||
#define RCC_DFSDM2CLKSOURCE_APB2 RCC_DFSDM2CLKSOURCE_PCLK2
|
||||
#define RCC_FMPI2C1CLKSOURCE_APB RCC_FMPI2C1CLKSOURCE_PCLK1
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -2888,8 +2899,8 @@
|
|||
#define __HAL_SD_SDMMC_CLEAR_FLAG __HAL_SD_SDIO_CLEAR_FLAG
|
||||
#define __HAL_SD_SDMMC_GET_IT __HAL_SD_SDIO_GET_IT
|
||||
#define __HAL_SD_SDMMC_CLEAR_IT __HAL_SD_SDIO_CLEAR_IT
|
||||
#define SDMMC_STATIC_FLAGS SDIO_STATIC_FLAGS
|
||||
#define SDMMC_CMD0TIMEOUT SDIO_CMD0TIMEOUT
|
||||
#define SDMMC_STATIC_FLAGS SDIO_STATIC_FLAGS
|
||||
#define SDMMC_CMD0TIMEOUT SDIO_CMD0TIMEOUT
|
||||
#define SD_SDMMC_SEND_IF_COND SD_SDIO_SEND_IF_COND
|
||||
/* alias CMSIS */
|
||||
#define SDMMC1_IRQn SDIO_IRQn
|
||||
|
@ -2921,6 +2932,14 @@
|
|||
#define SDIO_IRQn SDMMC1_IRQn
|
||||
#define SDIO_IRQHandler SDMMC1_IRQHandler
|
||||
#endif
|
||||
|
||||
#if defined(STM32F7) || defined(STM32F4) || defined(STM32F2)
|
||||
#define HAL_SD_CardCIDTypedef HAL_SD_CardCIDTypeDef
|
||||
#define HAL_SD_CardCSDTypedef HAL_SD_CardCSDTypeDef
|
||||
#define HAL_SD_CardStatusTypedef HAL_SD_CardStatusTypeDef
|
||||
#define HAL_SD_CardStateTypedef HAL_SD_CardStateTypeDef
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -3109,6 +3128,7 @@
|
|||
* @{
|
||||
*/
|
||||
#define __HAL_LTDC_LAYER LTDC_LAYER
|
||||
#define __HAL_LTDC_RELOAD_CONFIG __HAL_LTDC_RELOAD_IMMEDIATE_CONFIG
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -3150,3 +3170,4 @@
|
|||
#endif /* ___STM32_HAL_LEGACY */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32_assert.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief STM32 assert template file.
|
||||
* This file should be copied to the application folder and renamed
|
||||
* to stm32_assert.h.
|
||||
|
@ -52,15 +50,15 @@
|
|||
#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__))
|
||||
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((char *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void assert_failed(uint8_t* file, uint32_t line);
|
||||
void assert_failed(char* file, uint32_t line);
|
||||
#else
|
||||
#define assert_param(expr) ((void)0U)
|
||||
#endif /* USE_FULL_ASSERT */
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief This file contains all the functions prototypes for the HAL
|
||||
* module driver.
|
||||
******************************************************************************
|
||||
|
@ -81,7 +79,7 @@
|
|||
/* --- CFGR2 Register ---*/
|
||||
/* Alias word address of BYP_ADDR_PAR bit */
|
||||
#define CFGR2_OFFSET (SYSCFG_OFFSET + 0x18U)
|
||||
#define BYPADDRPAR_BitNumber 0x04
|
||||
#define BYPADDRPAR_BitNumber 0x04U
|
||||
#define CFGR2_BYPADDRPAR_BB (PERIPH_BB_BASE + (CFGR2_OFFSET * 32U) + (BYPADDRPAR_BitNumber * 4U))
|
||||
/**
|
||||
* @}
|
||||
|
@ -97,53 +95,53 @@
|
|||
* @{
|
||||
*/
|
||||
#define HAL_REMAPDMA_ADC24_DMA2_CH34 (0x00000100U) /*!< ADC24 DMA remap (STM32F303xB/C/E, STM32F358xx and STM32F398xx devices)
|
||||
1: Remap (ADC24 DMA requests mapped on DMA2 channels 3 and 4U) */
|
||||
1: Remap (ADC24 DMA requests mapped on DMA2 channels 3 and 4) */
|
||||
#define HAL_REMAPDMA_TIM16_DMA1_CH6 (0x00000800U) /*!< TIM16 DMA request remap
|
||||
1: Remap (TIM16_CH1 and TIM16_UP DMA requests mapped on DMA1 channel 6U) */
|
||||
1: Remap (TIM16_CH1 and TIM16_UP DMA requests mapped on DMA1 channel 6) */
|
||||
#define HAL_REMAPDMA_TIM17_DMA1_CH7 (0x00001000U) /*!< TIM17 DMA request remap
|
||||
1: Remap (TIM17_CH1 and TIM17_UP DMA requests mapped on DMA1 channel 7U) */
|
||||
1: Remap (TIM17_CH1 and TIM17_UP DMA requests mapped on DMA1 channel 7) */
|
||||
#define HAL_REMAPDMA_TIM6_DAC1_CH1_DMA1_CH3 (0x00002000U) /*!< TIM6 and DAC channel1 DMA remap (STM32F303xB/C/E, STM32F358xx and STM32F398xx devices)
|
||||
1: Remap (TIM6_UP and DAC_CH1 DMA requests mapped on DMA1 channel 3U) */
|
||||
1: Remap (TIM6_UP and DAC_CH1 DMA requests mapped on DMA1 channel 3) */
|
||||
#define HAL_REMAPDMA_TIM7_DAC1_CH2_DMA1_CH4 (0x00004000U) /*!< TIM7 and DAC channel2 DMA remap (STM32F303xB/C/E, STM32F358xx and STM32F398xx devices)
|
||||
1: Remap (TIM7_UP and DAC_CH2 DMA requests mapped on DMA1 channel 4U) */
|
||||
#define HAL_REMAPDMA_DAC2_CH1_DMA1_CH5 (0x00008000U) /*!< DAC2 channel1 DMA remap (STM32F303x4/6U/8 devices only)
|
||||
1: Remap (DAC2_CH1 DMA requests mapped on DMA1 channel 5U) */
|
||||
#define HAL_REMAPDMA_TIM18_DAC2_CH1_DMA1_CH5 (0x00008000U) /*!< DAC2 channel1 DMA remap (STM32F303x4/6U/8 devices only)
|
||||
1: Remap (DAC2_CH1 DMA requests mapped on DMA1 channel 5U) */
|
||||
1: Remap (TIM7_UP and DAC_CH2 DMA requests mapped on DMA1 channel 4) */
|
||||
#define HAL_REMAPDMA_DAC2_CH1_DMA1_CH5 (0x00008000U) /*!< DAC2 channel1 DMA remap (STM32F303x4/6/8 devices only)
|
||||
1: Remap (DAC2_CH1 DMA requests mapped on DMA1 channel 5) */
|
||||
#define HAL_REMAPDMA_TIM18_DAC2_CH1_DMA1_CH5 (0x00008000U) /*!< DAC2 channel1 DMA remap (STM32F303x4/6/8 devices only)
|
||||
1: Remap (DAC2_CH1 DMA requests mapped on DMA1 channel 5) */
|
||||
#if defined(SYSCFG_CFGR3_DMA_RMP)
|
||||
#if !defined(HAL_REMAP_CFGR3_MASK)
|
||||
#define HAL_REMAP_CFGR3_MASK (0x01000000U)
|
||||
#endif
|
||||
|
||||
#define HAL_REMAPDMA_SPI1_RX_DMA1_CH2 (0x01000003U) /*!< SPI1_RX DMA remap (STM32F303x4/6U/8 devices only)
|
||||
11: Map on DMA1 channel 2U */
|
||||
#define HAL_REMAPDMA_SPI1_RX_DMA1_CH4 (0x01000001U) /*!< SPI1_RX DMA remap (STM32F303x4/6U/8 devices only)
|
||||
01: Map on DMA1 channel 4U */
|
||||
#define HAL_REMAPDMA_SPI1_RX_DMA1_CH6 (0x01000002U) /*!< SPI1_RX DMA remap (STM32F303x4/6U/8 devices only)
|
||||
10: Map on DMA1 channel 6U */
|
||||
#define HAL_REMAPDMA_SPI1_TX_DMA1_CH3 (0x0100000CU) /*!< SPI1_TX DMA remap (STM32F303x4/6U/8 devices only)
|
||||
11: Map on DMA1 channel 3U */
|
||||
#define HAL_REMAPDMA_SPI1_TX_DMA1_CH5 (0x01000004U) /*!< SPI1_TX DMA remap (STM32F303x4/6U/8 devices only)
|
||||
01: Map on DMA1 channel 5U */
|
||||
#define HAL_REMAPDMA_SPI1_TX_DMA1_CH7 (0x01000008U) /*!< SPI1_TX DMA remap (STM32F303x4/6U/8 devices only)
|
||||
10: Map on DMA1 channel 7U */
|
||||
#define HAL_REMAPDMA_I2C1_RX_DMA1_CH7 (0x01000030U) /*!< I2C1_RX DMA remap (STM32F303x4/6U/8 devices only)
|
||||
11: Map on DMA1 channel 7U */
|
||||
#define HAL_REMAPDMA_I2C1_RX_DMA1_CH3 (0x01000010U) /*!< I2C1_RX DMA remap (STM32F303x4/6U/8 devices only)
|
||||
01: Map on DMA1 channel 3U */
|
||||
#define HAL_REMAPDMA_I2C1_RX_DMA1_CH5 (0x01000020U) /*!< I2C1_RX DMA remap (STM32F303x4/6U/8 devices only)
|
||||
10: Map on DMA1 channel 5U */
|
||||
#define HAL_REMAPDMA_I2C1_TX_DMA1_CH6 (0x010000C0U) /*!< I2C1_TX DMA remap (STM32F303x4/6U/8 devices only)
|
||||
11: Map on DMA1 channel 6U */
|
||||
#define HAL_REMAPDMA_I2C1_TX_DMA1_CH2 (0x01000040U) /*!< I2C1_TX DMA remap (STM32F303x4/6U/8 devices only)
|
||||
01: Map on DMA1 channel 2U */
|
||||
#define HAL_REMAPDMA_I2C1_TX_DMA1_CH4 (0x01000080U) /*!< I2C1_TX DMA remap (STM32F303x4/6U/8 devices only)
|
||||
10: Map on DMA1 channel 4U */
|
||||
#define HAL_REMAPDMA_SPI1_RX_DMA1_CH2 (0x01000003U) /*!< SPI1_RX DMA remap (STM32F303x4/6/8 devices only)
|
||||
11: Map on DMA1 channel 2 */
|
||||
#define HAL_REMAPDMA_SPI1_RX_DMA1_CH4 (0x01000001U) /*!< SPI1_RX DMA remap (STM32F303x4/6/8 devices only)
|
||||
01: Map on DMA1 channel 4 */
|
||||
#define HAL_REMAPDMA_SPI1_RX_DMA1_CH6 (0x01000002U) /*!< SPI1_RX DMA remap (STM32F303x4/6/8 devices only)
|
||||
10: Map on DMA1 channel 6 */
|
||||
#define HAL_REMAPDMA_SPI1_TX_DMA1_CH3 (0x0100000CU) /*!< SPI1_TX DMA remap (STM32F303x4/6/8 devices only)
|
||||
11: Map on DMA1 channel 3 */
|
||||
#define HAL_REMAPDMA_SPI1_TX_DMA1_CH5 (0x01000004U) /*!< SPI1_TX DMA remap (STM32F303x4/6/8 devices only)
|
||||
01: Map on DMA1 channel 5 */
|
||||
#define HAL_REMAPDMA_SPI1_TX_DMA1_CH7 (0x01000008U) /*!< SPI1_TX DMA remap (STM32F303x4/6/8 devices only)
|
||||
10: Map on DMA1 channel 7 */
|
||||
#define HAL_REMAPDMA_I2C1_RX_DMA1_CH7 (0x01000030U) /*!< I2C1_RX DMA remap (STM32F303x4/6/8 devices only)
|
||||
11: Map on DMA1 channel 7 */
|
||||
#define HAL_REMAPDMA_I2C1_RX_DMA1_CH3 (0x01000010U) /*!< I2C1_RX DMA remap (STM32F303x4/6/8 devices only)
|
||||
01: Map on DMA1 channel 3 */
|
||||
#define HAL_REMAPDMA_I2C1_RX_DMA1_CH5 (0x01000020U) /*!< I2C1_RX DMA remap (STM32F303x4/6/8 devices only)
|
||||
10: Map on DMA1 channel 5 */
|
||||
#define HAL_REMAPDMA_I2C1_TX_DMA1_CH6 (0x010000C0U) /*!< I2C1_TX DMA remap (STM32F303x4/6/8 devices only)
|
||||
11: Map on DMA1 channel 6 */
|
||||
#define HAL_REMAPDMA_I2C1_TX_DMA1_CH2 (0x01000040U) /*!< I2C1_TX DMA remap (STM32F303x4/6/8 devices only)
|
||||
01: Map on DMA1 channel 2 */
|
||||
#define HAL_REMAPDMA_I2C1_TX_DMA1_CH4 (0x01000080U) /*!< I2C1_TX DMA remap (STM32F303x4/6/8 devices only)
|
||||
10: Map on DMA1 channel 4 */
|
||||
#define HAL_REMAPDMA_ADC2_DMA1_CH2 (0x01000100U) /*!< ADC2 DMA remap
|
||||
x0: No remap (ADC2 on DMA2)
|
||||
10: Map on DMA1 channel 2U */
|
||||
10: Map on DMA1 channel 2 */
|
||||
#define HAL_REMAPDMA_ADC2_DMA1_CH4 (0x01000300U) /*!< ADC2 DMA remap
|
||||
11: Map on DMA1 channel 4U */
|
||||
11: Map on DMA1 channel 4 */
|
||||
#endif /* SYSCFG_CFGR3_DMA_RMP */
|
||||
|
||||
#if defined(SYSCFG_CFGR3_DMA_RMP)
|
||||
|
@ -241,7 +239,7 @@
|
|||
0: No remap (TIM2_CC1)
|
||||
1: Remap (TIM20_TRGO) */
|
||||
#define HAL_REMAPADCTRIGGER_ADC12_JEXT6 SYSCFG_CFGR4_ADC12_JEXT6_RMP /*!< Input trigger of ADC12 injected channel JEXT6
|
||||
0: No remap (EXTI line 15U)
|
||||
0: No remap (EXTI line 15)
|
||||
1: Remap (TIM20_TRGO2) */
|
||||
#define HAL_REMAPADCTRIGGER_ADC12_JEXT13 SYSCFG_CFGR4_ADC12_JEXT13_RMP /*!< Input trigger of ADC12 injected channel JEXT13
|
||||
0: No remap (TIM3_CC1)
|
||||
|
@ -250,11 +248,11 @@
|
|||
#define IS_HAL_REMAPADCTRIGGER(RMP) ((((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT2) == HAL_REMAPADCTRIGGER_ADC12_EXT2) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT3) == HAL_REMAPADCTRIGGER_ADC12_EXT3) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT5) == HAL_REMAPADCTRIGGER_ADC12_EXT5) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT13U) == HAL_REMAPADCTRIGGER_ADC12_EXT13U) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT15U) == HAL_REMAPADCTRIGGER_ADC12_EXT15U) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT13) == HAL_REMAPADCTRIGGER_ADC12_EXT13) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT15) == HAL_REMAPADCTRIGGER_ADC12_EXT15) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_JEXT3) == HAL_REMAPADCTRIGGER_ADC12_JEXT3) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_JEXT6) == HAL_REMAPADCTRIGGER_ADC12_JEXT6) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_JEXT13U) == HAL_REMAPADCTRIGGER_ADC12_JEXT13U))
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_JEXT13) == HAL_REMAPADCTRIGGER_ADC12_JEXT13))
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -283,13 +281,13 @@
|
|||
0: No remap (TIM2_CC1)
|
||||
1: Remap (TIM20_TRGO) */
|
||||
#define HAL_REMAPADCTRIGGER_ADC12_JEXT6 SYSCFG_CFGR4_ADC12_JEXT6_RMP /*!< Input trigger of ADC12 injected channel JEXT6
|
||||
0: No remap (EXTI line 15U)
|
||||
0: No remap (EXTI line 15)
|
||||
1: Remap (TIM20_TRGO2) */
|
||||
#define HAL_REMAPADCTRIGGER_ADC12_JEXT13 SYSCFG_CFGR4_ADC12_JEXT13_RMP /*!< Input trigger of ADC12 injected channel JEXT13
|
||||
0: No remap (TIM3_CC1)
|
||||
1: Remap (TIM20_CC4) */
|
||||
#define HAL_REMAPADCTRIGGER_ADC34_EXT5 SYSCFG_CFGR4_ADC34_EXT5_RMP /*!< Input trigger of ADC34 regular channel EXT5
|
||||
0: No remap (EXTI line 2U)
|
||||
0: No remap (EXTI line 2)
|
||||
1: Remap (TIM20_TRGO) */
|
||||
#define HAL_REMAPADCTRIGGER_ADC34_EXT6 SYSCFG_CFGR4_ADC34_EXT6_RMP /*!< Input trigger of ADC34 regular channel EXT6
|
||||
0: No remap (TIM4_CC1)
|
||||
|
@ -310,17 +308,17 @@
|
|||
#define IS_HAL_REMAPADCTRIGGER(RMP) ((((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT2) == HAL_REMAPADCTRIGGER_ADC12_EXT2) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT3) == HAL_REMAPADCTRIGGER_ADC12_EXT3) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT5) == HAL_REMAPADCTRIGGER_ADC12_EXT5) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT13U) == HAL_REMAPADCTRIGGER_ADC12_EXT13U) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT15U) == HAL_REMAPADCTRIGGER_ADC12_EXT15U) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT13) == HAL_REMAPADCTRIGGER_ADC12_EXT13) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT15) == HAL_REMAPADCTRIGGER_ADC12_EXT15) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_JEXT3) == HAL_REMAPADCTRIGGER_ADC12_JEXT3) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_JEXT6) == HAL_REMAPADCTRIGGER_ADC12_JEXT6) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_JEXT13U) == HAL_REMAPADCTRIGGER_ADC12_JEXT13U) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC12_JEXT13) == HAL_REMAPADCTRIGGER_ADC12_JEXT13) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC34_EXT5) == HAL_REMAPADCTRIGGER_ADC34_EXT5) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC34_EXT6) == HAL_REMAPADCTRIGGER_ADC34_EXT6) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC34_EXT15U) == HAL_REMAPADCTRIGGER_ADC34_EXT15U) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC34_EXT15) == HAL_REMAPADCTRIGGER_ADC34_EXT15) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC34_JEXT5) == HAL_REMAPADCTRIGGER_ADC34_JEXT5) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC34_JEXT11U) == HAL_REMAPADCTRIGGER_ADC34_JEXT11U) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC34_JEXT14U) == HAL_REMAPADCTRIGGER_ADC34_JEXT14U))
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC34_JEXT11) == HAL_REMAPADCTRIGGER_ADC34_JEXT11) || \
|
||||
(((RMP) & HAL_REMAPADCTRIGGER_ADC34_JEXT14) == HAL_REMAPADCTRIGGER_ADC34_JEXT14))
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -356,26 +354,26 @@
|
|||
/** @defgroup HAL_Page_Write_Protection HAL CCM RAM page write protection
|
||||
* @{
|
||||
*/
|
||||
#define HAL_SYSCFG_WP_PAGE0 (SYSCFG_RCR_PAGE0) /*!< ICODE SRAM Write protection page 0U */
|
||||
#define HAL_SYSCFG_WP_PAGE1 (SYSCFG_RCR_PAGE1) /*!< ICODE SRAM Write protection page 1U */
|
||||
#define HAL_SYSCFG_WP_PAGE2 (SYSCFG_RCR_PAGE2) /*!< ICODE SRAM Write protection page 2U */
|
||||
#define HAL_SYSCFG_WP_PAGE3 (SYSCFG_RCR_PAGE3) /*!< ICODE SRAM Write protection page 3U */
|
||||
#define HAL_SYSCFG_WP_PAGE0 (SYSCFG_RCR_PAGE0) /*!< ICODE SRAM Write protection page 0 */
|
||||
#define HAL_SYSCFG_WP_PAGE1 (SYSCFG_RCR_PAGE1) /*!< ICODE SRAM Write protection page 1 */
|
||||
#define HAL_SYSCFG_WP_PAGE2 (SYSCFG_RCR_PAGE2) /*!< ICODE SRAM Write protection page 2 */
|
||||
#define HAL_SYSCFG_WP_PAGE3 (SYSCFG_RCR_PAGE3) /*!< ICODE SRAM Write protection page 3 */
|
||||
#if defined(SYSCFG_RCR_PAGE4)
|
||||
/* More than 4KB CCM-SRAM defined */
|
||||
#define HAL_SYSCFG_WP_PAGE4 (SYSCFG_RCR_PAGE4) /*!< ICODE SRAM Write protection page 4U */
|
||||
#define HAL_SYSCFG_WP_PAGE5 (SYSCFG_RCR_PAGE5) /*!< ICODE SRAM Write protection page 5U */
|
||||
#define HAL_SYSCFG_WP_PAGE6 (SYSCFG_RCR_PAGE6) /*!< ICODE SRAM Write protection page 6U */
|
||||
#define HAL_SYSCFG_WP_PAGE7 (SYSCFG_RCR_PAGE7) /*!< ICODE SRAM Write protection page 7U */
|
||||
#define HAL_SYSCFG_WP_PAGE4 (SYSCFG_RCR_PAGE4) /*!< ICODE SRAM Write protection page 4 */
|
||||
#define HAL_SYSCFG_WP_PAGE5 (SYSCFG_RCR_PAGE5) /*!< ICODE SRAM Write protection page 5 */
|
||||
#define HAL_SYSCFG_WP_PAGE6 (SYSCFG_RCR_PAGE6) /*!< ICODE SRAM Write protection page 6 */
|
||||
#define HAL_SYSCFG_WP_PAGE7 (SYSCFG_RCR_PAGE7) /*!< ICODE SRAM Write protection page 7 */
|
||||
#endif /* SYSCFG_RCR_PAGE4 */
|
||||
#if defined(SYSCFG_RCR_PAGE8)
|
||||
#define HAL_SYSCFG_WP_PAGE8 (SYSCFG_RCR_PAGE8) /*!< ICODE SRAM Write protection page 8U */
|
||||
#define HAL_SYSCFG_WP_PAGE9 (SYSCFG_RCR_PAGE9) /*!< ICODE SRAM Write protection page 9U */
|
||||
#define HAL_SYSCFG_WP_PAGE10 (SYSCFG_RCR_PAGE10U) /*!< ICODE SRAM Write protection page 10U */
|
||||
#define HAL_SYSCFG_WP_PAGE11 (SYSCFG_RCR_PAGE11U) /*!< ICODE SRAM Write protection page 11U */
|
||||
#define HAL_SYSCFG_WP_PAGE12 (SYSCFG_RCR_PAGE12U) /*!< ICODE SRAM Write protection page 12U */
|
||||
#define HAL_SYSCFG_WP_PAGE13 (SYSCFG_RCR_PAGE13U) /*!< ICODE SRAM Write protection page 13U */
|
||||
#define HAL_SYSCFG_WP_PAGE14 (SYSCFG_RCR_PAGE14U) /*!< ICODE SRAM Write protection page 14U */
|
||||
#define HAL_SYSCFG_WP_PAGE15 (SYSCFG_RCR_PAGE15U) /*!< ICODE SRAM Write protection page 15U */
|
||||
#define HAL_SYSCFG_WP_PAGE8 (SYSCFG_RCR_PAGE8) /*!< ICODE SRAM Write protection page 8 */
|
||||
#define HAL_SYSCFG_WP_PAGE9 (SYSCFG_RCR_PAGE9) /*!< ICODE SRAM Write protection page 9 */
|
||||
#define HAL_SYSCFG_WP_PAGE10 (SYSCFG_RCR_PAGE10) /*!< ICODE SRAM Write protection page 10 */
|
||||
#define HAL_SYSCFG_WP_PAGE11 (SYSCFG_RCR_PAGE11) /*!< ICODE SRAM Write protection page 11 */
|
||||
#define HAL_SYSCFG_WP_PAGE12 (SYSCFG_RCR_PAGE12) /*!< ICODE SRAM Write protection page 12 */
|
||||
#define HAL_SYSCFG_WP_PAGE13 (SYSCFG_RCR_PAGE13) /*!< ICODE SRAM Write protection page 13 */
|
||||
#define HAL_SYSCFG_WP_PAGE14 (SYSCFG_RCR_PAGE14) /*!< ICODE SRAM Write protection page 14 */
|
||||
#define HAL_SYSCFG_WP_PAGE15 (SYSCFG_RCR_PAGE15) /*!< ICODE SRAM Write protection page 15 */
|
||||
#endif /* SYSCFG_RCR_PAGE8 */
|
||||
|
||||
#if defined(SYSCFG_RCR_PAGE8)
|
||||
|
@ -632,7 +630,7 @@
|
|||
*/
|
||||
#if defined(SYSCFG_CFGR3_DMA_RMP) && defined(SYSCFG_CFGR1_DMA_RMP)
|
||||
/** @brief DMA remapping enable/disable macros
|
||||
* @param __DMA_REMAP__: This parameter can be a value of @ref HAL_DMA_Remapping
|
||||
* @param __DMA_REMAP__ This parameter can be a value of @ref HAL_DMA_Remapping
|
||||
*/
|
||||
#define __HAL_DMA_REMAP_CHANNEL_ENABLE(__DMA_REMAP__) do {assert_param(IS_DMA_REMAP((__DMA_REMAP__))); \
|
||||
(((__DMA_REMAP__) & HAL_REMAP_CFGR3_MASK) ? \
|
||||
|
@ -646,7 +644,7 @@
|
|||
}while(0U)
|
||||
#elif defined(SYSCFG_CFGR1_DMA_RMP)
|
||||
/** @brief DMA remapping enable/disable macros
|
||||
* @param __DMA_REMAP__: This parameter can be a value of @ref HAL_DMA_Remapping
|
||||
* @param __DMA_REMAP__ This parameter can be a value of @ref HAL_DMA_Remapping
|
||||
*/
|
||||
#define __HAL_DMA_REMAP_CHANNEL_ENABLE(__DMA_REMAP__) do {assert_param(IS_DMA_REMAP((__DMA_REMAP__))); \
|
||||
SYSCFG->CFGR1 |= (__DMA_REMAP__); \
|
||||
|
@ -663,7 +661,7 @@
|
|||
* @{
|
||||
*/
|
||||
/** @brief Fast-mode Plus driving capability enable/disable macros
|
||||
* @param __FASTMODEPLUS__: This parameter can be a value of @ref SYSCFG_FastModePlus_GPIO values.
|
||||
* @param __FASTMODEPLUS__ This parameter can be a value of @ref SYSCFG_FastModePlus_GPIO values.
|
||||
* That you can find above these macros.
|
||||
*/
|
||||
#define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) do {assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__)));\
|
||||
|
@ -681,7 +679,7 @@
|
|||
* @{
|
||||
*/
|
||||
/** @brief SYSCFG interrupt enable/disable macros
|
||||
* @param __INTERRUPT__: This parameter can be a value of @ref HAL_SYSCFG_Interrupts
|
||||
* @param __INTERRUPT__ This parameter can be a value of @ref HAL_SYSCFG_Interrupts
|
||||
*/
|
||||
#define __HAL_SYSCFG_INTERRUPT_ENABLE(__INTERRUPT__) do {assert_param(IS_HAL_SYSCFG_INTERRUPT((__INTERRUPT__))); \
|
||||
SYSCFG->CFGR1 |= (__INTERRUPT__); \
|
||||
|
@ -773,7 +771,7 @@
|
|||
*/
|
||||
#if defined(SYSCFG_CFGR3_TRIGGER_RMP)
|
||||
/** @brief Trigger remapping enable/disable macros
|
||||
* @param __TRIGGER_REMAP__: This parameter can be a value of @ref HAL_Trigger_Remapping
|
||||
* @param __TRIGGER_REMAP__ This parameter can be a value of @ref HAL_Trigger_Remapping
|
||||
*/
|
||||
#define __HAL_REMAPTRIGGER_ENABLE(__TRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPTRIGGER((__TRIGGER_REMAP__))); \
|
||||
(((__TRIGGER_REMAP__) & HAL_REMAP_CFGR3_MASK) ? \
|
||||
|
@ -787,7 +785,7 @@
|
|||
}while(0U)
|
||||
#else
|
||||
/** @brief Trigger remapping enable/disable macros
|
||||
* @param __TRIGGER_REMAP__: This parameter can be a value of @ref HAL_Trigger_Remapping
|
||||
* @param __TRIGGER_REMAP__ This parameter can be a value of @ref HAL_Trigger_Remapping
|
||||
*/
|
||||
#define __HAL_REMAPTRIGGER_ENABLE(__TRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPTRIGGER((__TRIGGER_REMAP__))); \
|
||||
(SYSCFG->CFGR1 |= (__TRIGGER_REMAP__)); \
|
||||
|
@ -805,7 +803,7 @@
|
|||
* @{
|
||||
*/
|
||||
/** @brief ADC trigger remapping enable/disable macros
|
||||
* @param __ADCTRIGGER_REMAP__: This parameter can be a value of @ref HAL_ADC_Trigger_Remapping
|
||||
* @param __ADCTRIGGER_REMAP__ This parameter can be a value of @ref HAL_ADC_Trigger_Remapping
|
||||
*/
|
||||
#define __HAL_REMAPADCTRIGGER_ENABLE(__ADCTRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPADCTRIGGER((__ADCTRIGGER_REMAP__))); \
|
||||
(SYSCFG->CFGR4 |= (__ADCTRIGGER_REMAP__)); \
|
||||
|
@ -838,7 +836,7 @@
|
|||
* @{
|
||||
*/
|
||||
/** @brief CCM RAM page write protection enable macro
|
||||
* @param __PAGE_WP__: This parameter can be a value of @ref HAL_Page_Write_Protection
|
||||
* @param __PAGE_WP__ This parameter can be a value of @ref HAL_Page_Write_Protection
|
||||
* @note write protection can only be disabled by a system reset
|
||||
*/
|
||||
#define __HAL_SYSCFG_SRAM_WRP_ENABLE(__PAGE_WP__) do {assert_param(IS_HAL_SYSCFG_WP_PAGE((__PAGE_WP__))); \
|
||||
|
@ -884,6 +882,9 @@ uint32_t HAL_GetTick(void);
|
|||
uint32_t HAL_GetHalVersion(void);
|
||||
uint32_t HAL_GetREVID(void);
|
||||
uint32_t HAL_GetDEVID(void);
|
||||
uint32_t HAL_GetUIDw0(void);
|
||||
uint32_t HAL_GetUIDw1(void);
|
||||
uint32_t HAL_GetUIDw2(void);
|
||||
void HAL_DBGMCU_EnableDBGSleepMode(void);
|
||||
void HAL_DBGMCU_DisableDBGSleepMode(void);
|
||||
void HAL_DBGMCU_EnableDBGStopMode(void);
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_adc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file containing functions prototypes of ADC HAL library.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -142,7 +140,7 @@ typedef struct __ADC_HandleTypeDef
|
|||
* @{
|
||||
*/
|
||||
/** @brief Reset ADC handle state
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_ADC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_ADC_STATE_RESET)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_adc_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file containing functions prototypes of ADC HAL library.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -797,7 +795,6 @@ typedef struct
|
|||
*/
|
||||
#define ADC_EOC_SINGLE_CONV ((uint32_t) ADC_ISR_EOC)
|
||||
#define ADC_EOC_SEQ_CONV ((uint32_t) ADC_ISR_EOS)
|
||||
#define ADC_EOC_SINGLE_SEQ_CONV ((uint32_t)(ADC_ISR_EOC | ADC_ISR_EOS)) /*!< reserved for future use */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -1345,7 +1342,7 @@ typedef struct
|
|||
/* External triggers of regular group for ADC1 */
|
||||
#define ADC_EXTERNALTRIGCONV_T2_CC2 ADC_EXTERNALTRIG_T2_CC2
|
||||
#define ADC_EXTERNALTRIGCONV_T3_TRGO ADC_EXTERNALTRIG_T3_TRGO
|
||||
#define ADC_EXTERNALTRIGCONV_T4_CC2 ADC_EXTERNALTRIG_T4_CC2
|
||||
#define ADC_EXTERNALTRIGCONV_T4_CC4 ADC_EXTERNALTRIG_T4_CC4
|
||||
#define ADC_EXTERNALTRIGCONV_T19_TRGO ADC_EXTERNALTRIG_T19_TRGO
|
||||
#define ADC_EXTERNALTRIGCONV_T19_CC3 ADC_EXTERNALTRIG_T19_CC3
|
||||
#define ADC_EXTERNALTRIGCONV_T19_CC4 ADC_EXTERNALTRIG_T19_CC4
|
||||
|
@ -1824,7 +1821,7 @@ typedef struct
|
|||
#define ADC_EXTERNALTRIG_T19_CC4 ((uint32_t)ADC_CR2_EXTSEL_1)
|
||||
#define ADC_EXTERNALTRIG_T2_CC2 ((uint32_t)(ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))
|
||||
#define ADC_EXTERNALTRIG_T3_TRGO ((uint32_t)ADC_CR2_EXTSEL_2)
|
||||
#define ADC_EXTERNALTRIG_T4_CC2 ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0))
|
||||
#define ADC_EXTERNALTRIG_T4_CC4 ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0))
|
||||
#define ADC_EXTERNALTRIG_EXT_IT11 ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1))
|
||||
#define ADC_SWSTART ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))
|
||||
/**
|
||||
|
@ -1922,7 +1919,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enable the ADC peripheral
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @note ADC enable requires a delay for ADC stabilization time
|
||||
* (refer to device datasheet, parameter tSTAB)
|
||||
* @note On STM32F3 devices, some hardware constraints must be strictly
|
||||
|
@ -1939,7 +1936,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Disable the ADC peripheral
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @note On STM32F3 devices, some hardware constraints must be strictly
|
||||
* respected before using this macro:
|
||||
* - ADC state requirements: ADC must be enabled, no conversion on
|
||||
|
@ -1955,8 +1952,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enable the ADC end of conversion interrupt.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __INTERRUPT__: ADC Interrupt
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __INTERRUPT__ ADC Interrupt
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg ADC_IT_RDY: ADC Ready (ADRDY) interrupt source
|
||||
* @arg ADC_IT_EOSMP: ADC End of Sampling interrupt source
|
||||
|
@ -1976,8 +1973,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Disable the ADC end of conversion interrupt.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __INTERRUPT__: ADC Interrupt
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __INTERRUPT__ ADC Interrupt
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg ADC_IT_RDY: ADC Ready (ADRDY) interrupt source
|
||||
* @arg ADC_IT_EOSMP: ADC End of Sampling interrupt source
|
||||
|
@ -1996,8 +1993,8 @@ typedef struct
|
|||
(CLEAR_BIT((__HANDLE__)->Instance->IER, (__INTERRUPT__)))
|
||||
|
||||
/** @brief Checks if the specified ADC interrupt source is enabled or disabled.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __INTERRUPT__: ADC interrupt source to check
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __INTERRUPT__ ADC interrupt source to check
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg ADC_IT_RDY: ADC Ready (ADRDY) interrupt source
|
||||
* @arg ADC_IT_EOSMP: ADC End of Sampling interrupt source
|
||||
|
@ -2017,8 +2014,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Get the selected ADC's flag status.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __FLAG__: ADC flag
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __FLAG__ ADC flag
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg ADC_FLAG_RDY: ADC Ready (ADRDY) flag
|
||||
* @arg ADC_FLAG_EOSMP: ADC End of Sampling flag
|
||||
|
@ -2038,8 +2035,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Clear the ADC's pending flags
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __FLAG__: ADC flag
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __FLAG__ ADC flag
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg ADC_FLAG_RDY: ADC Ready (ADRDY) flag
|
||||
* @arg ADC_FLAG_EOSMP: ADC End of Sampling flag
|
||||
|
@ -2060,7 +2057,7 @@ typedef struct
|
|||
(WRITE_REG((__HANDLE__)->Instance->ISR, (__FLAG__)))
|
||||
|
||||
/** @brief Reset ADC handle state
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_ADC_RESET_HANDLE_STATE(__HANDLE__) \
|
||||
|
@ -2079,7 +2076,7 @@ typedef struct
|
|||
* (refer to device datasheet, parameter tSTAB)
|
||||
* @note On STM32F37x devices, if ADC is already enabled this macro trigs
|
||||
* a conversion SW start on regular group.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_ADC_ENABLE(__HANDLE__) \
|
||||
|
@ -2087,15 +2084,15 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Disable the ADC peripheral
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_ADC_DISABLE(__HANDLE__) \
|
||||
(CLEAR_BIT((__HANDLE__)->Instance->CR2, (ADC_CR2_ADON)))
|
||||
|
||||
/** @brief Enable the ADC end of conversion interrupt.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __INTERRUPT__: ADC Interrupt
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __INTERRUPT__ ADC Interrupt
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg ADC_IT_EOC: ADC End of Regular Conversion interrupt source
|
||||
* @arg ADC_IT_JEOC: ADC End of Injected Conversion interrupt source
|
||||
|
@ -2106,8 +2103,8 @@ typedef struct
|
|||
(SET_BIT((__HANDLE__)->Instance->CR1, (__INTERRUPT__)))
|
||||
|
||||
/** @brief Disable the ADC end of conversion interrupt.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __INTERRUPT__: ADC Interrupt
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __INTERRUPT__ ADC Interrupt
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg ADC_IT_EOC: ADC End of Regular Conversion interrupt source
|
||||
* @arg ADC_IT_JEOC: ADC End of Injected Conversion interrupt source
|
||||
|
@ -2118,8 +2115,8 @@ typedef struct
|
|||
(CLEAR_BIT((__HANDLE__)->Instance->CR1, (__INTERRUPT__)))
|
||||
|
||||
/** @brief Checks if the specified ADC interrupt source is enabled or disabled.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __INTERRUPT__: ADC interrupt source to check
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __INTERRUPT__ ADC interrupt source to check
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg ADC_IT_EOC: ADC End of Regular Conversion interrupt source
|
||||
* @arg ADC_IT_JEOC: ADC End of Injected Conversion interrupt source
|
||||
|
@ -2130,8 +2127,8 @@ typedef struct
|
|||
(((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__))
|
||||
|
||||
/** @brief Get the selected ADC's flag status.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __FLAG__: ADC flag
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __FLAG__ ADC flag
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg ADC_FLAG_STRT: ADC Regular group start flag
|
||||
* @arg ADC_FLAG_JSTRT: ADC Injected group start flag
|
||||
|
@ -2144,8 +2141,8 @@ typedef struct
|
|||
((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
|
||||
|
||||
/** @brief Clear the ADC's pending flags
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __FLAG__: ADC flag
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __FLAG__ ADC flag
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg ADC_FLAG_STRT: ADC Regular group start flag
|
||||
* @arg ADC_FLAG_JSTRT: ADC Injected group start flag
|
||||
|
@ -2158,7 +2155,7 @@ typedef struct
|
|||
(WRITE_REG((__HANDLE__)->Instance->SR, ~(__FLAG__)))
|
||||
|
||||
/** @brief Reset ADC handle state
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_ADC_RESET_HANDLE_STATE(__HANDLE__) \
|
||||
|
@ -2184,7 +2181,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Verification of hardware constraints before ADC can be enabled
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval SET (ADC can be enabled) or RESET (ADC cannot be enabled)
|
||||
*/
|
||||
#define ADC_ENABLING_CONDITIONS(__HANDLE__) \
|
||||
|
@ -2196,7 +2193,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Verification of ADC state: enabled or disabled
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval SET (ADC enabled) or RESET (ADC disabled)
|
||||
*/
|
||||
#define ADC_IS_ENABLE(__HANDLE__) \
|
||||
|
@ -2207,7 +2204,7 @@ typedef struct
|
|||
/**
|
||||
* @brief Test if conversion trigger of regular group is software start
|
||||
* or external trigger.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval SET (software start) or RESET (external trigger)
|
||||
*/
|
||||
#define ADC_IS_SOFTWARE_START_REGULAR(__HANDLE__) \
|
||||
|
@ -2216,7 +2213,7 @@ typedef struct
|
|||
/**
|
||||
* @brief Test if conversion trigger of injected group is software start
|
||||
* or external trigger.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval SET (software start) or RESET (external trigger)
|
||||
*/
|
||||
#define ADC_IS_SOFTWARE_START_INJECTED(__HANDLE__) \
|
||||
|
@ -2224,7 +2221,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check if no conversion on going on regular and/or injected groups
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval SET (conversion is on going) or RESET (no conversion is on going)
|
||||
*/
|
||||
#define ADC_IS_CONVERSION_ONGOING_REGULAR_INJECTED(__HANDLE__) \
|
||||
|
@ -2233,7 +2230,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check if no conversion on going on regular group
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval SET (conversion is on going) or RESET (no conversion is on going)
|
||||
*/
|
||||
#define ADC_IS_CONVERSION_ONGOING_REGULAR(__HANDLE__) \
|
||||
|
@ -2242,7 +2239,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check if no conversion on going on injected group
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval SET (conversion is on going) or RESET (no conversion is on going)
|
||||
*/
|
||||
#define ADC_IS_CONVERSION_ONGOING_INJECTED(__HANDLE__) \
|
||||
|
@ -2252,7 +2249,7 @@ typedef struct
|
|||
/**
|
||||
* @brief Returns resolution bits in CFGR1 register: RES[1:0].
|
||||
* Returned value is among parameters to @ref ADCEx_Resolution.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_GET_RESOLUTION(__HANDLE__) (((__HANDLE__)->Instance->CFGR) & ADC_CFGR_RES)
|
||||
|
@ -2268,63 +2265,63 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Clear ADC error code (set it to error code: "no error")
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CLEAR_ERRORCODE(__HANDLE__) ((__HANDLE__)->ErrorCode = HAL_ADC_ERROR_NONE)
|
||||
|
||||
/**
|
||||
* @brief Set the ADC's sample time for Channels numbers between 0 and 9.
|
||||
* @param _SAMPLETIME_: Sample time parameter.
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _SAMPLETIME_ Sample time parameter.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_SMPR1(_SAMPLETIME_, _CHANNELNB_) ((_SAMPLETIME_) << (3U * (_CHANNELNB_)))
|
||||
|
||||
/**
|
||||
* @brief Set the ADC's sample time for Channels numbers between 10 and 18.
|
||||
* @param _SAMPLETIME_: Sample time parameter.
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _SAMPLETIME_ Sample time parameter.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_SMPR2(_SAMPLETIME_, _CHANNELNB_) ((_SAMPLETIME_) << (3U * ((_CHANNELNB_) - 10U)))
|
||||
|
||||
/**
|
||||
* @brief Set the selected regular Channel rank for rank between 1 and 4.
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _RANKNB_: Rank number.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @param _RANKNB_ Rank number.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_SQR1_RK(_CHANNELNB_, _RANKNB_) ((_CHANNELNB_) << (6U * (_RANKNB_)))
|
||||
|
||||
/**
|
||||
* @brief Set the selected regular Channel rank for rank between 5 and 9.
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _RANKNB_: Rank number.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @param _RANKNB_ Rank number.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_SQR2_RK(_CHANNELNB_, _RANKNB_) ((_CHANNELNB_) << (6U * ((_RANKNB_) - 5U)))
|
||||
|
||||
/**
|
||||
* @brief Set the selected regular Channel rank for rank between 10 and 14.
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _RANKNB_: Rank number.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @param _RANKNB_ Rank number.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_SQR3_RK(_CHANNELNB_, _RANKNB_) ((_CHANNELNB_) << (6U * ((_RANKNB_) - 10U)))
|
||||
|
||||
/**
|
||||
* @brief Set the selected regular Channel rank for rank between 15 and 16.
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _RANKNB_: Rank number.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @param _RANKNB_ Rank number.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_SQR4_RK(_CHANNELNB_, _RANKNB_) ((_CHANNELNB_) << (6U * ((_RANKNB_) - 15U)))
|
||||
|
||||
/**
|
||||
* @brief Set the selected injected Channel rank.
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _RANKNB_: Rank number.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @param _RANKNB_ Rank number.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_JSQR_RK(_CHANNELNB_, _RANKNB_) ((_CHANNELNB_) << (6U * (_RANKNB_) +2U))
|
||||
|
@ -2332,70 +2329,70 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Set the Analog Watchdog 1 channel.
|
||||
* @param _CHANNEL_: channel to be monitored by Analog Watchdog 1.
|
||||
* @param _CHANNEL_ channel to be monitored by Analog Watchdog 1.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CFGR_AWD1CH_SHIFT(_CHANNEL_) ((_CHANNEL_) << 26U)
|
||||
|
||||
/**
|
||||
* @brief Configure the channel number into Analog Watchdog 2 or 3.
|
||||
* @param _CHANNEL_: ADC Channel
|
||||
* @param _CHANNEL_ ADC Channel
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CFGR_AWD23CR(_CHANNEL_) (1U << (_CHANNEL_))
|
||||
|
||||
/**
|
||||
* @brief Enable automatic conversion of injected group
|
||||
* @param _INJECT_AUTO_CONVERSION_: Injected automatic conversion.
|
||||
* @param _INJECT_AUTO_CONVERSION_ Injected automatic conversion.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CFGR_INJECT_AUTO_CONVERSION(_INJECT_AUTO_CONVERSION_) ((_INJECT_AUTO_CONVERSION_) << 25U)
|
||||
|
||||
/**
|
||||
* @brief Enable ADC injected context queue
|
||||
* @param _INJECT_CONTEXT_QUEUE_MODE_: Injected context queue mode.
|
||||
* @param _INJECT_CONTEXT_QUEUE_MODE_ Injected context queue mode.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CFGR_INJECT_CONTEXT_QUEUE(_INJECT_CONTEXT_QUEUE_MODE_) ((_INJECT_CONTEXT_QUEUE_MODE_) << 21U)
|
||||
|
||||
/**
|
||||
* @brief Enable ADC discontinuous conversion mode for injected group
|
||||
* @param _INJECT_DISCONTINUOUS_MODE_: Injected discontinuous mode.
|
||||
* @param _INJECT_DISCONTINUOUS_MODE_ Injected discontinuous mode.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CFGR_INJECT_DISCCONTINUOUS(_INJECT_DISCONTINUOUS_MODE_) ((_INJECT_DISCONTINUOUS_MODE_) << 20U)
|
||||
|
||||
/**
|
||||
* @brief Enable ADC discontinuous conversion mode for regular group
|
||||
* @param _REG_DISCONTINUOUS_MODE_: Regular discontinuous mode.
|
||||
* @param _REG_DISCONTINUOUS_MODE_ Regular discontinuous mode.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CFGR_REG_DISCCONTINUOUS(_REG_DISCONTINUOUS_MODE_) ((_REG_DISCONTINUOUS_MODE_) << 16U)
|
||||
|
||||
/**
|
||||
* @brief Configures the number of discontinuous conversions for regular group.
|
||||
* @param _NBR_DISCONTINUOUS_CONV_: Number of discontinuous conversions.
|
||||
* @param _NBR_DISCONTINUOUS_CONV_ Number of discontinuous conversions.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CFGR_DISCONTINUOUS_NUM(_NBR_DISCONTINUOUS_CONV_) (((_NBR_DISCONTINUOUS_CONV_) - 1U) << 17U)
|
||||
|
||||
/**
|
||||
* @brief Enable the ADC auto delay mode.
|
||||
* @param _AUTOWAIT_: Auto delay bit enable or disable.
|
||||
* @param _AUTOWAIT_ Auto delay bit enable or disable.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CFGR_AUTOWAIT(_AUTOWAIT_) ((_AUTOWAIT_) << 14U)
|
||||
|
||||
/**
|
||||
* @brief Enable ADC continuous conversion mode.
|
||||
* @param _CONTINUOUS_MODE_: Continuous mode.
|
||||
* @param _CONTINUOUS_MODE_ Continuous mode.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CFGR_CONTINUOUS(_CONTINUOUS_MODE_) ((_CONTINUOUS_MODE_) << 13U)
|
||||
|
||||
/**
|
||||
* @brief Enable ADC overrun mode.
|
||||
* @param _OVERRUN_MODE_: Overrun mode.
|
||||
* @param _OVERRUN_MODE_ Overrun mode.
|
||||
* @retval Overrun bit setting to be programmed into CFGR register
|
||||
*/
|
||||
/* Note: Bit ADC_CFGR_OVRMOD not used directly in constant */
|
||||
|
@ -2408,7 +2405,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enable the ADC DMA continuous request.
|
||||
* @param _DMACONTREQ_MODE_: DMA continuous request mode.
|
||||
* @param _DMACONTREQ_MODE_ DMA continuous request mode.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CFGR_DMACONTREQ(_DMACONTREQ_MODE_) ((_DMACONTREQ_MODE_) << 1U)
|
||||
|
@ -2423,8 +2420,8 @@ typedef struct
|
|||
* exceptions below are circular and do not point to any other trigger
|
||||
* with direct treatment.
|
||||
* For devices with 2 ADCs or less: this macro makes no change.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __EXT_TRIG_CONV__: External trigger selected for regular group.
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __EXT_TRIG_CONV__ External trigger selected for regular group.
|
||||
* @retval External trigger to be programmed into EXTSEL bits of CFGR register
|
||||
*/
|
||||
#if defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -2513,8 +2510,8 @@ typedef struct
|
|||
* with direct treatment, except trigger
|
||||
* ADC_EXTERNALTRIGINJECCONV_T4_CC3 differentiated with SW offset.
|
||||
* For devices with 2 ADCs or less: this macro makes no change.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __EXT_TRIG_INJECTCONV__: External trigger selected for injected group
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __EXT_TRIG_INJECTCONV__ External trigger selected for injected group
|
||||
* @retval External trigger to be programmed into JEXTSEL bits of JSQR register
|
||||
*/
|
||||
#if defined(STM32F303xC) || defined(STM32F303xE) || defined(STM32F398xx) || defined(STM32F358xx)
|
||||
|
@ -2599,49 +2596,49 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Configure the channel number into offset OFRx register
|
||||
* @param _CHANNEL_: ADC Channel
|
||||
* @param _CHANNEL_ ADC Channel
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_OFR_CHANNEL(_CHANNEL_) ((_CHANNEL_) << 26U)
|
||||
|
||||
/**
|
||||
* @brief Configure the channel number into differential mode selection register
|
||||
* @param _CHANNEL_: ADC Channel
|
||||
* @param _CHANNEL_ ADC Channel
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_DIFSEL_CHANNEL(_CHANNEL_) (1U << (_CHANNEL_))
|
||||
|
||||
/**
|
||||
* @brief Calibration factor in differential mode to be set into calibration register
|
||||
* @param _Calibration_Factor_: Calibration factor value
|
||||
* @param _Calibration_Factor_ Calibration factor value
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CALFACT_DIFF_SET(_Calibration_Factor_) ((_Calibration_Factor_) << 16U)
|
||||
|
||||
/**
|
||||
* @brief Calibration factor in differential mode to be retrieved from calibration register
|
||||
* @param _Calibration_Factor_: Calibration factor value
|
||||
* @param _Calibration_Factor_ Calibration factor value
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CALFACT_DIFF_GET(_Calibration_Factor_) ((_Calibration_Factor_) >> 16U)
|
||||
|
||||
/**
|
||||
* @brief Configure the analog watchdog high threshold into registers TR1, TR2 or TR3.
|
||||
* @param _Threshold_: Threshold value
|
||||
* @param _Threshold_ Threshold value
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_TRX_HIGHTHRESHOLD(_Threshold_) ((_Threshold_) << 16U)
|
||||
|
||||
/**
|
||||
* @brief Enable the ADC DMA continuous request for ADC multimode.
|
||||
* @param _DMAContReq_MODE_: DMA continuous request mode.
|
||||
* @param _DMAContReq_MODE_ DMA continuous request mode.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CCR_MULTI_DMACONTREQ(_DMAContReq_MODE_) ((_DMAContReq_MODE_) << 13U)
|
||||
|
||||
/**
|
||||
* @brief Verification of hardware constraints before ADC can be disabled
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval SET (ADC can be disabled) or RESET (ADC cannot be disabled)
|
||||
*/
|
||||
#define ADC_DISABLING_CONDITIONS(__HANDLE__) \
|
||||
|
@ -2658,8 +2655,8 @@ typedef struct
|
|||
* If resolution 8 bits, shift of 4 ranks on the left.
|
||||
* If resolution 6 bits, shift of 6 ranks on the left.
|
||||
* therefore, shift = (12 - resolution) = 12 - (12- (((RES[1:0]) >> 3)*2))
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param _Offset_: Value to be shifted
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param _Offset_ Value to be shifted
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_OFFSET_SHIFT_RESOLUTION(__HANDLE__, _Offset_) \
|
||||
|
@ -2673,8 +2670,8 @@ typedef struct
|
|||
* If resolution 8 bits, shift of 4 ranks on the left.
|
||||
* If resolution 6 bits, shift of 6 ranks on the left.
|
||||
* therefore, shift = (12 - resolution) = 12 - (12- (((RES[1:0]) >> 3)*2))
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param _Threshold_: Value to be shifted
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param _Threshold_ Value to be shifted
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_AWD1THRESHOLD_SHIFT_RESOLUTION(__HANDLE__, _Threshold_) \
|
||||
|
@ -2687,8 +2684,8 @@ typedef struct
|
|||
* If resolution 10 bits, shift of 2 ranks on the right (the 2 LSB are discarded)
|
||||
* If resolution 8 bits, no shift.
|
||||
* If resolution 6 bits, shift of 2 ranks on the left (the 2 LSB are set to 0)
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param _Threshold_: Value to be shifted
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param _Threshold_ Value to be shifted
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_AWD23THRESHOLD_SHIFT_RESOLUTION(__HANDLE__, _Threshold_) \
|
||||
|
@ -2699,7 +2696,7 @@ typedef struct
|
|||
/**
|
||||
* @brief Defines if the selected ADC is within ADC common register ADC1_2 or ADC3_4
|
||||
* if available (ADC2, ADC3, ADC4 availability depends on STM32 product)
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval Common control register ADC1_2 or ADC3_4
|
||||
*/
|
||||
#if defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -2728,7 +2725,7 @@ typedef struct
|
|||
/**
|
||||
* @brief Defines if the selected ADC is within ADC common register ADC1_2 or ADC3_4
|
||||
* if available (ADC2, ADC3, ADC4 availability depends on STM32 product)
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval Common control register ADC1_2 or ADC3_4
|
||||
*/
|
||||
#if defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -2756,7 +2753,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Selection of ADC common register CCR bits MULTI[4:0]corresponding to the selected ADC (applicable for devices with several ADCs)
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
#if defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -2787,7 +2784,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Verification of condition for ADC start conversion: ADC must be in non-multimode, or multimode with handle of ADC master (applicable for devices with several ADCs)
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
#if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -2807,7 +2804,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Verification of condition for ADC group regular start conversion: ADC must be in non-multimode or multimode on group injected only, or multimode with handle of ADC master (applicable for devices with several ADCs)
|
||||
* @param __HANDLE__: ADC handle.
|
||||
* @param __HANDLE__ ADC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -2829,7 +2826,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Verification of condition for ADC group injected start conversion: ADC must be in non-multimode or multimode on group regular only, or multimode with handle of ADC master (applicable for devices with several ADCs)
|
||||
* @param __HANDLE__: ADC handle.
|
||||
* @param __HANDLE__ ADC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -2851,7 +2848,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check ADC multimode setting: In case of multimode, check whether ADC master of the selected ADC has feature auto-injection enabled (applicable for devices with several ADCs)
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
#if defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -2881,8 +2878,8 @@ typedef struct
|
|||
/**
|
||||
* @brief Set handle of the other ADC sharing the same common register ADC1_2 or ADC3_4
|
||||
* if available (ADC2, ADC3, ADC4 availability depends on STM32 product)
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE_OTHER_ADC__: other ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __HANDLE_OTHER_ADC__ other ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
#if defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -2934,8 +2931,8 @@ typedef struct
|
|||
/**
|
||||
* @brief Set handle of the ADC slave associated to the ADC master
|
||||
* if available (ADC2, ADC3, ADC4 availability depends on STM32 product)
|
||||
* @param __HANDLE_MASTER__: ADC master handle
|
||||
* @param __HANDLE_SLAVE__: ADC slave handle
|
||||
* @param __HANDLE_MASTER__ ADC master handle
|
||||
* @param __HANDLE_SLAVE__ ADC slave handle
|
||||
* @retval None
|
||||
*/
|
||||
#if defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -2986,8 +2983,7 @@ typedef struct
|
|||
((SCAN_MODE) == ADC_SCAN_ENABLE) )
|
||||
|
||||
#define IS_ADC_EOC_SELECTION(EOC_SELECTION) (((EOC_SELECTION) == ADC_EOC_SINGLE_CONV) || \
|
||||
((EOC_SELECTION) == ADC_EOC_SEQ_CONV) || \
|
||||
((EOC_SELECTION) == ADC_EOC_SINGLE_SEQ_CONV) )
|
||||
((EOC_SELECTION) == ADC_EOC_SEQ_CONV) )
|
||||
|
||||
#define IS_ADC_OVERRUN(OVR) (((OVR) == ADC_OVR_DATA_PRESERVED) || \
|
||||
((OVR) == ADC_OVR_DATA_OVERWRITTEN) )
|
||||
|
@ -3497,7 +3493,7 @@ typedef struct
|
|||
*/
|
||||
/**
|
||||
* @brief Calibration factor length verification (7 bits maximum)
|
||||
* @param _Calibration_Factor_: Calibration factor value
|
||||
* @param _Calibration_Factor_ Calibration factor value
|
||||
* @retval None
|
||||
*/
|
||||
#define IS_ADC_CALFACT(_Calibration_Factor_) ((_Calibration_Factor_) <= (0x7FU))
|
||||
|
@ -3515,7 +3511,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Verification of ADC state: enabled or disabled
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval SET (ADC enabled) or RESET (ADC disabled)
|
||||
*/
|
||||
#define ADC_IS_ENABLE(__HANDLE__) \
|
||||
|
@ -3525,7 +3521,7 @@ typedef struct
|
|||
/**
|
||||
* @brief Test if conversion trigger of regular group is software start
|
||||
* or external trigger.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval SET (software start) or RESET (external trigger)
|
||||
*/
|
||||
#define ADC_IS_SOFTWARE_START_REGULAR(__HANDLE__) \
|
||||
|
@ -3534,7 +3530,7 @@ typedef struct
|
|||
/**
|
||||
* @brief Test if conversion trigger of injected group is software start
|
||||
* or external trigger.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval SET (software start) or RESET (external trigger)
|
||||
*/
|
||||
#define ADC_IS_SOFTWARE_START_INJECTED(__HANDLE__) \
|
||||
|
@ -3551,7 +3547,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Clear ADC error code (set it to error code: "no error")
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CLEAR_ERRORCODE(__HANDLE__) \
|
||||
|
@ -3559,7 +3555,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Set ADC number of conversions into regular channel sequence length.
|
||||
* @param _NbrOfConversion_: Regular channel sequence length
|
||||
* @param _NbrOfConversion_ Regular channel sequence length
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_SQR1_L_SHIFT(_NbrOfConversion_) \
|
||||
|
@ -3567,8 +3563,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Set the ADC's sample time for channel numbers between 10 and 18.
|
||||
* @param _SAMPLETIME_: Sample time parameter.
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _SAMPLETIME_ Sample time parameter.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_SMPR1(_SAMPLETIME_, _CHANNELNB_) \
|
||||
|
@ -3576,8 +3572,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Set the ADC's sample time for channel numbers between 0 and 9.
|
||||
* @param _SAMPLETIME_: Sample time parameter.
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _SAMPLETIME_ Sample time parameter.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_SMPR2(_SAMPLETIME_, _CHANNELNB_) \
|
||||
|
@ -3585,8 +3581,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Set the selected regular channel rank for rank between 1 and 6.
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _RANKNB_: Rank number.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @param _RANKNB_ Rank number.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_SQR3_RK(_CHANNELNB_, _RANKNB_) \
|
||||
|
@ -3594,8 +3590,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Set the selected regular channel rank for rank between 7 and 12.
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _RANKNB_: Rank number.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @param _RANKNB_ Rank number.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_SQR2_RK(_CHANNELNB_, _RANKNB_) \
|
||||
|
@ -3603,8 +3599,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Set the selected regular channel rank for rank between 13 and 16.
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _RANKNB_: Rank number.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @param _RANKNB_ Rank number.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_SQR1_RK(_CHANNELNB_, _RANKNB_) \
|
||||
|
@ -3612,7 +3608,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Set the injected sequence length.
|
||||
* @param _JSQR_JL_: Sequence length.
|
||||
* @param _JSQR_JL_ Sequence length.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_JSQR_JL_SHIFT(_JSQR_JL_) \
|
||||
|
@ -3623,9 +3619,9 @@ typedef struct
|
|||
* Note: on STM32F37x devices, channel rank position in JSQR register
|
||||
* is depending on total number of ranks selected into
|
||||
* injected sequencer (ranks sequence starting from 4-JL)
|
||||
* @param _CHANNELNB_: Channel number.
|
||||
* @param _RANKNB_: Rank number.
|
||||
* @param _JSQR_JL_: Sequence length.
|
||||
* @param _CHANNELNB_ Channel number.
|
||||
* @param _RANKNB_ Rank number.
|
||||
* @param _JSQR_JL_ Sequence length.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_JSQR_RK_JL(_CHANNELNB_, _RANKNB_, _JSQR_JL_) \
|
||||
|
@ -3633,7 +3629,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enable ADC continuous conversion mode.
|
||||
* @param _CONTINUOUS_MODE_: Continuous mode.
|
||||
* @param _CONTINUOUS_MODE_ Continuous mode.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CR2_CONTINUOUS(_CONTINUOUS_MODE_) \
|
||||
|
@ -3641,7 +3637,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Configures the number of discontinuous conversions for the regular group channels.
|
||||
* @param _NBR_DISCONTINUOUS_CONV_: Number of discontinuous conversions.
|
||||
* @param _NBR_DISCONTINUOUS_CONV_ Number of discontinuous conversions.
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CR1_DISCONTINUOUS_NUM(_NBR_DISCONTINUOUS_CONV_) \
|
||||
|
@ -3649,7 +3645,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enable ADC scan mode to convert multiple ranks with sequencer.
|
||||
* @param _SCAN_MODE_: Scan conversion mode.
|
||||
* @param _SCAN_MODE_ Scan conversion mode.
|
||||
* @retval None
|
||||
*/
|
||||
/* Note: Scan mode is compared to ENABLE for legacy purpose, this parameter */
|
||||
|
@ -3661,7 +3657,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Calibration factor in differential mode to be set into calibration register
|
||||
* @param _Calibration_Factor_: Calibration factor value
|
||||
* @param _Calibration_Factor_ Calibration factor value
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CALFACT_DIFF_SET(_Calibration_Factor_) \
|
||||
|
@ -3669,7 +3665,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Calibration factor in differential mode to be retrieved from calibration register
|
||||
* @param _Calibration_Factor_: Calibration factor value
|
||||
* @param _Calibration_Factor_ Calibration factor value
|
||||
* @retval None
|
||||
*/
|
||||
#define ADC_CALFACT_DIFF_GET(_Calibration_Factor_) \
|
||||
|
@ -3685,7 +3681,7 @@ typedef struct
|
|||
* between 41.5 cycles and 71.5 cycles {41.5 cycles; 55.5 cycles; 71.5cycles}
|
||||
* equal to 239.5 cycles
|
||||
* Unit: ADC clock cycles
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @retval ADC conversion cycles on all channels
|
||||
*/
|
||||
#define ADC_CONVCYCLES_MAX_RANGE(__HANDLE__) \
|
||||
|
@ -3784,7 +3780,7 @@ typedef struct
|
|||
|
||||
#define IS_ADC_EXTTRIG(REGTRIG) (((REGTRIG) == ADC_EXTERNALTRIGCONV_T2_CC2) || \
|
||||
((REGTRIG) == ADC_EXTERNALTRIGCONV_T3_TRGO) || \
|
||||
((REGTRIG) == ADC_EXTERNALTRIGCONV_T4_CC2) || \
|
||||
((REGTRIG) == ADC_EXTERNALTRIGCONV_T4_CC4) || \
|
||||
((REGTRIG) == ADC_EXTERNALTRIGCONV_T19_TRGO) || \
|
||||
((REGTRIG) == ADC_EXTERNALTRIGCONV_T19_CC3) || \
|
||||
((REGTRIG) == ADC_EXTERNALTRIGCONV_T19_CC4) || \
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_can.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of CAN HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -66,17 +64,21 @@
|
|||
*/
|
||||
/**
|
||||
* @brief HAL State structures definition
|
||||
*/
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
HAL_CAN_STATE_RESET = 0x00U, /*!< CAN not yet initialized or disabled */
|
||||
HAL_CAN_STATE_READY = 0x01U, /*!< CAN initialized and ready for use */
|
||||
HAL_CAN_STATE_BUSY = 0x02U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_TX = 0x12U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_RX = 0x22U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_TX_RX = 0x32U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_RX0 = 0x22U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_RX1 = 0x32U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_TX_RX0 = 0x42U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_TX_RX1 = 0x52U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_RX0_RX1 = 0x62U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_BUSY_TX_RX0_RX1 = 0x72U, /*!< CAN process is ongoing */
|
||||
HAL_CAN_STATE_TIMEOUT = 0x03U, /*!< CAN in Timeout state */
|
||||
HAL_CAN_STATE_ERROR = 0x04 /*!< CAN error state */
|
||||
HAL_CAN_STATE_ERROR = 0x04U /*!< CAN error state */
|
||||
|
||||
}HAL_CAN_StateTypeDef;
|
||||
|
||||
|
@ -232,7 +234,9 @@ typedef struct
|
|||
|
||||
CanTxMsgTypeDef* pTxMsg; /*!< Pointer to transmit structure */
|
||||
|
||||
CanRxMsgTypeDef* pRxMsg; /*!< Pointer to reception structure */
|
||||
CanRxMsgTypeDef* pRxMsg; /*!< Pointer to reception structure for RX FIFO0 msg */
|
||||
|
||||
CanRxMsgTypeDef* pRx1Msg; /*!< Pointer to reception structure for RX FIFO1 msg */
|
||||
|
||||
HAL_LockTypeDef Lock; /*!< CAN locking object */
|
||||
|
||||
|
@ -265,6 +269,9 @@ typedef struct
|
|||
#define HAL_CAN_ERROR_BR (0x00000040U) /*!< Bit recessive */
|
||||
#define HAL_CAN_ERROR_BD (0x00000080U) /*!< LEC dominant */
|
||||
#define HAL_CAN_ERROR_CRC (0x00000100U) /*!< LEC transfer error */
|
||||
#define HAL_CAN_ERROR_FOV0 (0x00000200U) /*!< FIFO0 overrun error */
|
||||
#define HAL_CAN_ERROR_FOV1 (0x00000400U) /*!< FIFO1 overrun error */
|
||||
#define HAL_CAN_ERROR_TXFAIL (0x00000800U) /*!< Transmit failure */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -281,7 +288,7 @@ typedef struct
|
|||
/** @defgroup CAN_operating_mode CAN Operating Mode
|
||||
* @{
|
||||
*/
|
||||
#define CAN_MODE_NORMAL (0x00000000U) /*!< Normal mode */
|
||||
#define CAN_MODE_NORMAL (0x00000000U) /*!< Normal mode */
|
||||
#define CAN_MODE_LOOPBACK ((uint32_t)CAN_BTR_LBKM) /*!< Loopback mode */
|
||||
#define CAN_MODE_SILENT ((uint32_t)CAN_BTR_SILM) /*!< Silent mode */
|
||||
#define CAN_MODE_SILENT_LOOPBACK ((uint32_t)(CAN_BTR_LBKM | CAN_BTR_SILM)) /*!< Loopback combined with silent mode */
|
||||
|
@ -293,7 +300,7 @@ typedef struct
|
|||
/** @defgroup CAN_synchronisation_jump_width CAN Synchronization Jump Width
|
||||
* @{
|
||||
*/
|
||||
#define CAN_SJW_1TQ (0x00000000U) /*!< 1 time quantum */
|
||||
#define CAN_SJW_1TQ (0x00000000U) /*!< 1 time quantum */
|
||||
#define CAN_SJW_2TQ ((uint32_t)CAN_BTR_SJW_0) /*!< 2 time quantum */
|
||||
#define CAN_SJW_3TQ ((uint32_t)CAN_BTR_SJW_1) /*!< 3 time quantum */
|
||||
#define CAN_SJW_4TQ ((uint32_t)CAN_BTR_SJW) /*!< 4 time quantum */
|
||||
|
@ -304,7 +311,7 @@ typedef struct
|
|||
/** @defgroup CAN_time_quantum_in_bit_segment_1 CAN Time Quantum in Bit Segment 1
|
||||
* @{
|
||||
*/
|
||||
#define CAN_BS1_1TQ (0x00000000U) /*!< 1 time quantum */
|
||||
#define CAN_BS1_1TQ (0x00000000U) /*!< 1 time quantum */
|
||||
#define CAN_BS1_2TQ ((uint32_t)CAN_BTR_TS1_0) /*!< 2 time quantum */
|
||||
#define CAN_BS1_3TQ ((uint32_t)CAN_BTR_TS1_1) /*!< 3 time quantum */
|
||||
#define CAN_BS1_4TQ ((uint32_t)(CAN_BTR_TS1_1 | CAN_BTR_TS1_0)) /*!< 4 time quantum */
|
||||
|
@ -327,7 +334,7 @@ typedef struct
|
|||
/** @defgroup CAN_time_quantum_in_bit_segment_2 CAN Time Quantum in Bit Segment 2
|
||||
* @{
|
||||
*/
|
||||
#define CAN_BS2_1TQ (0x00000000U) /*!< 1 time quantum */
|
||||
#define CAN_BS2_1TQ (0x00000000U) /*!< 1 time quantum */
|
||||
#define CAN_BS2_2TQ ((uint32_t)CAN_BTR_TS2_0) /*!< 2 time quantum */
|
||||
#define CAN_BS2_3TQ ((uint32_t)CAN_BTR_TS2_1) /*!< 3 time quantum */
|
||||
#define CAN_BS2_4TQ ((uint32_t)(CAN_BTR_TS2_1 | CAN_BTR_TS2_0)) /*!< 4 time quantum */
|
||||
|
@ -420,9 +427,11 @@ typedef struct
|
|||
#define CAN_FLAG_FOV1 (0x00000404U) /*!< FIFO 1 Overrun flag */
|
||||
|
||||
/* Operating Mode Flags */
|
||||
#define CAN_FLAG_WKU (0x00000103U) /*!< Wake up flag */
|
||||
#define CAN_FLAG_SLAK (0x00000101U) /*!< Sleep acknowledge flag */
|
||||
#define CAN_FLAG_SLAKI (0x00000104U) /*!< Sleep acknowledge flag */
|
||||
#define CAN_FLAG_INAK (0x00000100U) /*!< Initialization acknowledge flag */
|
||||
#define CAN_FLAG_SLAK (0x00000101U) /*!< Sleep acknowledge flag */
|
||||
#define CAN_FLAG_ERRI (0x00000102U) /*!< Error flag */
|
||||
#define CAN_FLAG_WKU (0x00000103U) /*!< Wake up flag */
|
||||
#define CAN_FLAG_SLAKI (0x00000104U) /*!< Sleep acknowledge flag */
|
||||
/* @note When SLAK interrupt is disabled (SLKIE=0U), no polling on SLAKI is possible.
|
||||
In this case the SLAK bit can be polled.*/
|
||||
|
||||
|
@ -485,39 +494,39 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Reset CAN handle state
|
||||
* @param __HANDLE__: CAN handle.
|
||||
* @param __HANDLE__ CAN handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_CAN_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CAN_STATE_RESET)
|
||||
|
||||
/**
|
||||
* @brief Enable the specified CAN interrupts.
|
||||
* @param __HANDLE__: CAN handle.
|
||||
* @param __INTERRUPT__: CAN Interrupt
|
||||
* @param __HANDLE__ CAN handle.
|
||||
* @param __INTERRUPT__ CAN Interrupt
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_CAN_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->IER) |= (__INTERRUPT__))
|
||||
|
||||
/**
|
||||
* @brief Disable the specified CAN interrupts.
|
||||
* @param __HANDLE__: CAN handle.
|
||||
* @param __INTERRUPT__: CAN Interrupt
|
||||
* @param __HANDLE__ CAN handle.
|
||||
* @param __INTERRUPT__ CAN Interrupt
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_CAN_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->IER) &= ~(__INTERRUPT__))
|
||||
|
||||
/**
|
||||
* @brief Return the number of pending received messages.
|
||||
* @param __HANDLE__: CAN handle.
|
||||
* @param __FIFONUMBER__: Receive FIFO number, CAN_FIFO0 or CAN_FIFO1.
|
||||
* @param __HANDLE__ CAN handle.
|
||||
* @param __FIFONUMBER__ Receive FIFO number, CAN_FIFO0 or CAN_FIFO1.
|
||||
* @retval The number of pending message.
|
||||
*/
|
||||
#define __HAL_CAN_MSG_PENDING(__HANDLE__, __FIFONUMBER__) (((__FIFONUMBER__) == CAN_FIFO0)? \
|
||||
((uint8_t)((__HANDLE__)->Instance->RF0R&0x03U)) : ((uint8_t)((__HANDLE__)->Instance->RF1R&0x03U)))
|
||||
|
||||
/** @brief Check whether the specified CAN flag is set or not.
|
||||
* @param __HANDLE__: specifies the CAN Handle.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the CAN Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg CAN_TSR_RQCP0: Request MailBox0 Flag
|
||||
* @arg CAN_TSR_RQCP1: Request MailBox1 Flag
|
||||
|
@ -550,8 +559,8 @@ typedef struct
|
|||
((((__HANDLE__)->Instance->ESR) & (1U << ((__FLAG__) & CAN_FLAG_MASK))) == (1U << ((__FLAG__) & CAN_FLAG_MASK))))
|
||||
|
||||
/** @brief Clear the specified CAN pending flag.
|
||||
* @param __HANDLE__: specifies the CAN Handle.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the CAN Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg CAN_TSR_RQCP0: Request MailBox0 Flag
|
||||
* @arg CAN_TSR_RQCP1: Request MailBox1 Flag
|
||||
|
@ -583,8 +592,8 @@ typedef struct
|
|||
|
||||
|
||||
/** @brief Check if the specified CAN interrupt source is enabled or disabled.
|
||||
* @param __HANDLE__: specifies the CAN Handle.
|
||||
* @param __INTERRUPT__: specifies the CAN interrupt source to check.
|
||||
* @param __HANDLE__ specifies the CAN Handle.
|
||||
* @param __INTERRUPT__ specifies the CAN interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg CAN_IT_TME: Transmit mailbox empty interrupt enable
|
||||
* @arg CAN_IT_FMP0: FIFO0 message pending interrupt enablev
|
||||
|
@ -595,21 +604,19 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check the transmission status of a CAN Frame.
|
||||
* @param __HANDLE__: CAN handle.
|
||||
* @param __TRANSMITMAILBOX__: the number of the mailbox that is used for transmission.
|
||||
* @param __HANDLE__ CAN handle.
|
||||
* @param __TRANSMITMAILBOX__ the number of the mailbox that is used for transmission.
|
||||
* @retval The new status of transmission (TRUE or FALSE).
|
||||
*/
|
||||
#define __HAL_CAN_TRANSMIT_STATUS(__HANDLE__, __TRANSMITMAILBOX__)\
|
||||
(((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_0)? ((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP0 | CAN_TSR_TXOK0 | CAN_TSR_TME0)) == (CAN_TSR_RQCP0 | CAN_TSR_TXOK0 | CAN_TSR_TME0)) :\
|
||||
((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_1)? ((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP1 | CAN_TSR_TXOK1 | CAN_TSR_TME1)) == (CAN_TSR_RQCP1 | CAN_TSR_TXOK1 | CAN_TSR_TME1)) :\
|
||||
((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP2 | CAN_TSR_TXOK2 | CAN_TSR_TME2)) == (CAN_TSR_RQCP2 | CAN_TSR_TXOK2 | CAN_TSR_TME2)))
|
||||
(((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_0)? ((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP0 | CAN_TSR_TME0)) == (CAN_TSR_RQCP0 | CAN_TSR_TME0)) :\
|
||||
((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_1)? ((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP1 | CAN_TSR_TME1)) == (CAN_TSR_RQCP1 | CAN_TSR_TME1)) :\
|
||||
((((__HANDLE__)->Instance->TSR) & (CAN_TSR_RQCP2 | CAN_TSR_TME2)) == (CAN_TSR_RQCP2 | CAN_TSR_TME2)))
|
||||
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Release the specified receive FIFO.
|
||||
* @param __HANDLE__: CAN handle.
|
||||
* @param __FIFONUMBER__: Receive FIFO number, CAN_FIFO0 or CAN_FIFO1.
|
||||
* @param __HANDLE__ CAN handle.
|
||||
* @param __FIFONUMBER__ Receive FIFO number, CAN_FIFO0 or CAN_FIFO1.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_CAN_FIFO_RELEASE(__HANDLE__, __FIFONUMBER__) (((__FIFONUMBER__) == CAN_FIFO0)? \
|
||||
|
@ -617,8 +624,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Cancel a transmit request.
|
||||
* @param __HANDLE__: specifies the CAN Handle.
|
||||
* @param __TRANSMITMAILBOX__: the number of the mailbox that is used for transmission.
|
||||
* @param __HANDLE__ specifies the CAN Handle.
|
||||
* @param __TRANSMITMAILBOX__ the number of the mailbox that is used for transmission.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_CAN_CANCEL_TRANSMIT(__HANDLE__, __TRANSMITMAILBOX__)\
|
||||
|
@ -628,8 +635,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enable or disables the DBG Freeze for CAN.
|
||||
* @param __HANDLE__: specifies the CAN Handle.
|
||||
* @param __NEWSTATE__: new state of the CAN peripheral.
|
||||
* @param __HANDLE__ specifies the CAN Handle.
|
||||
* @param __NEWSTATE__ new state of the CAN peripheral.
|
||||
* This parameter can be: ENABLE (CAN reception/transmission is frozen
|
||||
* during debug. Reception FIFOs can still be accessed/controlled normally)
|
||||
* or DISABLE (CAN is working during debug).
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_cec.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of CEC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -428,7 +426,7 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Reset CEC handle gstate & RxState
|
||||
* @param __HANDLE__: CEC handle.
|
||||
* @param __HANDLE__ CEC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_CEC_RESET_HANDLE_STATE(__HANDLE__) do{ \
|
||||
|
@ -437,8 +435,8 @@ typedef struct
|
|||
} while(0U)
|
||||
|
||||
/** @brief Checks whether or not the specified CEC interrupt flag is set.
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* @arg CEC_FLAG_TXACKE: Tx Missing acknowledge Error
|
||||
* @arg CEC_FLAG_TXERR: Tx Error.
|
||||
* @arg CEC_FLAG_TXUDR: Tx-Buffer Underrun.
|
||||
|
@ -457,8 +455,8 @@ typedef struct
|
|||
#define __HAL_CEC_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR & (__FLAG__))
|
||||
|
||||
/** @brief Clears the interrupt or status flag when raised (write at 1U)
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __FLAG__: specifies the interrupt/status flag to clear.
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @param __FLAG__ specifies the interrupt/status flag to clear.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg CEC_FLAG_TXACKE: Tx Missing acknowledge Error
|
||||
* @arg CEC_FLAG_TXERR: Tx Error.
|
||||
|
@ -478,8 +476,8 @@ typedef struct
|
|||
#define __HAL_CEC_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR |= (__FLAG__))
|
||||
|
||||
/** @brief Enables the specified CEC interrupt.
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __INTERRUPT__: specifies the CEC interrupt to enable.
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @param __INTERRUPT__ specifies the CEC interrupt to enable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg CEC_IT_TXACKE: Tx Missing acknowledge Error IT Enable
|
||||
* @arg CEC_IT_TXERR: Tx Error IT Enable
|
||||
|
@ -499,8 +497,8 @@ typedef struct
|
|||
#define __HAL_CEC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))
|
||||
|
||||
/** @brief Disables the specified CEC interrupt.
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __INTERRUPT__: specifies the CEC interrupt to disable.
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @param __INTERRUPT__ specifies the CEC interrupt to disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg CEC_IT_TXACKE: Tx Missing acknowledge Error IT Enable
|
||||
* @arg CEC_IT_TXERR: Tx Error IT Enable
|
||||
|
@ -520,8 +518,8 @@ typedef struct
|
|||
#define __HAL_CEC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= (~(__INTERRUPT__)))
|
||||
|
||||
/** @brief Checks whether or not the specified CEC interrupt is enabled.
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __INTERRUPT__: specifies the CEC interrupt to check.
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @param __INTERRUPT__ specifies the CEC interrupt to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg CEC_IT_TXACKE: Tx Missing acknowledge Error IT Enable
|
||||
* @arg CEC_IT_TXERR: Tx Error IT Enable
|
||||
|
@ -541,52 +539,52 @@ typedef struct
|
|||
#define __HAL_CEC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER & (__INTERRUPT__))
|
||||
|
||||
/** @brief Enables the CEC device
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @retval none
|
||||
*/
|
||||
#define __HAL_CEC_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= CEC_CR_CECEN)
|
||||
|
||||
/** @brief Disables the CEC device
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @retval none
|
||||
*/
|
||||
#define __HAL_CEC_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~CEC_CR_CECEN)
|
||||
|
||||
/** @brief Set Transmission Start flag
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @retval none
|
||||
*/
|
||||
#define __HAL_CEC_FIRST_BYTE_TX_SET(__HANDLE__) ((__HANDLE__)->Instance->CR |= CEC_CR_TXSOM)
|
||||
|
||||
/** @brief Set Transmission End flag
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @retval none
|
||||
* If the CEC message consists of only one byte, TXEOM must be set before of TXSOM.
|
||||
*/
|
||||
#define __HAL_CEC_LAST_BYTE_TX_SET(__HANDLE__) ((__HANDLE__)->Instance->CR |= CEC_CR_TXEOM)
|
||||
|
||||
/** @brief Get Transmission Start flag
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @retval FlagStatus
|
||||
*/
|
||||
#define __HAL_CEC_GET_TRANSMISSION_START_FLAG(__HANDLE__) ((__HANDLE__)->Instance->CR & CEC_CR_TXSOM)
|
||||
|
||||
/** @brief Get Transmission End flag
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @retval FlagStatus
|
||||
*/
|
||||
#define __HAL_CEC_GET_TRANSMISSION_END_FLAG(__HANDLE__) ((__HANDLE__)->Instance->CR & CEC_CR_TXEOM)
|
||||
|
||||
/** @brief Clear OAR register
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @retval none
|
||||
*/
|
||||
#define __HAL_CEC_CLEAR_OAR(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CFGR, CEC_CFGR_OAR)
|
||||
|
||||
/** @brief Set OAR register (without resetting previously set address in case of multi-address mode)
|
||||
* To reset OAR, __HAL_CEC_CLEAR_OAR() needs to be called beforehand
|
||||
* @param __HANDLE__: specifies the CEC Handle.
|
||||
* @param __ADDRESS__: Own Address value (CEC logical address is identified by bit position)
|
||||
* @param __HANDLE__ specifies the CEC Handle.
|
||||
* @param __ADDRESS__ Own Address value (CEC logical address is identified by bit position)
|
||||
* @retval none
|
||||
*/
|
||||
#define __HAL_CEC_SET_OAR(__HANDLE__,__ADDRESS__) SET_BIT((__HANDLE__)->Instance->CFGR, (__ADDRESS__)<< CEC_CFGR_OAR_LSB_POS)
|
||||
|
@ -701,21 +699,21 @@ uint32_t HAL_CEC_GetError(CEC_HandleTypeDef *hcec);
|
|||
* The message size is the payload size: without counting the header,
|
||||
* it varies from 0 byte (ping operation, one header only, no payload) to
|
||||
* 15 bytes (1 opcode and up to 14 operands following the header).
|
||||
* @param __SIZE__: CEC message size.
|
||||
* @param __SIZE__ CEC message size.
|
||||
* @retval Test result (TRUE or FALSE).
|
||||
*/
|
||||
#define IS_CEC_MSGSIZE(__SIZE__) ((__SIZE__) <= 0x10U)
|
||||
|
||||
/** @brief Check CEC device Own Address Register (OAR) setting.
|
||||
* OAR address is written in a 15-bit field within CEC_CFGR register.
|
||||
* @param __ADDRESS__: CEC own address.
|
||||
* @param __ADDRESS__ CEC own address.
|
||||
* @retval Test result (TRUE or FALSE).
|
||||
*/
|
||||
#define IS_CEC_OWN_ADDRESS(__ADDRESS__) ((__ADDRESS__) <= 0x7FFFU)
|
||||
|
||||
/** @brief Check CEC initiator or destination logical address setting.
|
||||
* Initiator and destination addresses are coded over 4 bits.
|
||||
* @param __ADDRESS__: CEC initiator or logical address.
|
||||
* @param __ADDRESS__ CEC initiator or logical address.
|
||||
* @retval Test result (TRUE or FALSE).
|
||||
*/
|
||||
#define IS_CEC_ADDRESS(__ADDRESS__) ((__ADDRESS__) <= 0x0FU)
|
||||
|
@ -748,3 +746,4 @@ uint32_t HAL_CEC_GetError(CEC_HandleTypeDef *hcec);
|
|||
#endif /* __STM32F3xx_HAL_CEC_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_comp.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of COMP HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_comp_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of COMP HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -442,16 +440,6 @@
|
|||
* @{
|
||||
*/
|
||||
#define COMP_WINDOWMODE_DISABLE (0x00000000U) /*!< Window mode disabled */
|
||||
#define COMP_WINDOWMODE_ENABLE COMP_CSR_COMPxWNDWEN /*!< Window mode enabled: non inverting input of comparator X (x=2U,4,6U)
|
||||
is connected to the non inverting input of comparator X-1U */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#elif defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx)
|
||||
/** @defgroup COMPEx_WindowMode COMP Extended WindowMode (STM32F302xE/STM32F303xE/STM32F398xx Product devices)
|
||||
* @{
|
||||
*/
|
||||
#define COMP_WINDOWMODE_DISABLE (0x00000000U) /*!< Window mode disabled */
|
||||
#define COMP_WINDOWMODE_ENABLE COMP_CSR_COMPxWNDWEN /*!< Window mode enabled: non inverting input of comparator X (x=2U,4,6U)
|
||||
is connected to the non inverting input of comparator X-1U */
|
||||
/**
|
||||
|
@ -1501,7 +1489,7 @@
|
|||
defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx)
|
||||
/**
|
||||
* @brief Get the specified EXTI line for a comparator instance
|
||||
* @param __INSTANCE__: specifies the COMP instance.
|
||||
* @param __INSTANCE__ specifies the COMP instance.
|
||||
* @retval value of @ref COMPEx_ExtiLineEvent
|
||||
*/
|
||||
#define COMP_GET_EXTI_LINE(__INSTANCE__) (((__INSTANCE__) == COMP2) ? COMP_EXTI_LINE_COMP2 : \
|
||||
|
@ -1514,7 +1502,7 @@
|
|||
defined(STM32F302xC)
|
||||
/**
|
||||
* @brief Get the specified EXTI line for a comparator instance
|
||||
* @param __INSTANCE__: specifies the COMP instance.
|
||||
* @param __INSTANCE__ specifies the COMP instance.
|
||||
* @retval value of @ref COMPEx_ExtiLineEvent
|
||||
*/
|
||||
#define COMP_GET_EXTI_LINE(__INSTANCE__) (((__INSTANCE__) == COMP1) ? COMP_EXTI_LINE_COMP1 : \
|
||||
|
@ -1528,7 +1516,7 @@
|
|||
defined(STM32F303xC) || defined(STM32F358xx)
|
||||
/**
|
||||
* @brief Get the specified EXTI line for a comparator instance
|
||||
* @param __INSTANCE__: specifies the COMP instance.
|
||||
* @param __INSTANCE__ specifies the COMP instance.
|
||||
* @retval value of @ref COMPEx_ExtiLineEvent
|
||||
*/
|
||||
#define COMP_GET_EXTI_LINE(__INSTANCE__) (((__INSTANCE__) == COMP1) ? COMP_EXTI_LINE_COMP1 : \
|
||||
|
@ -1544,7 +1532,7 @@
|
|||
#if defined(STM32F373xC) || defined(STM32F378xx)
|
||||
/**
|
||||
* @brief Get the specified EXTI line for a comparator instance
|
||||
* @param __INSTANCE__: specifies the COMP instance.
|
||||
* @param __INSTANCE__ specifies the COMP instance.
|
||||
* @retval value of @ref COMPEx_ExtiLineEvent
|
||||
*/
|
||||
#define COMP_GET_EXTI_LINE(__INSTANCE__) (((__INSTANCE__) == COMP1) ? COMP_EXTI_LINE_COMP1 : \
|
||||
|
@ -1615,7 +1603,7 @@
|
|||
|
||||
/**
|
||||
* @brief Enable the Exti Line rising edge trigger.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be enabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be enabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1623,7 +1611,7 @@
|
|||
|
||||
/**
|
||||
* @brief Disable the Exti Line rising edge trigger.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be disabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be disabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1631,7 +1619,7 @@
|
|||
|
||||
/**
|
||||
* @brief Enable the Exti Line falling edge trigger.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be enabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be enabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1639,7 +1627,7 @@
|
|||
|
||||
/**
|
||||
* @brief Disable the Exti Line falling edge trigger.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be disabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be disabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1647,7 +1635,7 @@
|
|||
|
||||
/**
|
||||
* @brief Enable the COMP Exti Line interrupt generation.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be enabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be enabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1655,7 +1643,7 @@
|
|||
|
||||
/**
|
||||
* @brief Disable the COMP Exti Line interrupt generation.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be disabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be disabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1663,7 +1651,7 @@
|
|||
|
||||
/**
|
||||
* @brief Enable the COMP Exti Line event generation.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be enabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be enabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1671,7 +1659,7 @@
|
|||
|
||||
/**
|
||||
* @brief Disable the COMP Exti Line event generation.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be disabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be disabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1679,7 +1667,7 @@
|
|||
|
||||
/**
|
||||
* @brief Check whether the specified EXTI line flag is set or not.
|
||||
* @param __FLAG__: specifies the COMP Exti sources to be checked.
|
||||
* @param __FLAG__ specifies the COMP Exti sources to be checked.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval The state of __FLAG__ (SET or RESET).
|
||||
*/
|
||||
|
@ -1687,7 +1675,7 @@
|
|||
|
||||
/**
|
||||
* @brief Clear the COMP Exti flags.
|
||||
* @param __FLAG__: specifies the COMP Exti sources to be cleared.
|
||||
* @param __FLAG__ specifies the COMP Exti sources to be cleared.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1726,7 +1714,7 @@
|
|||
|
||||
/**
|
||||
* @brief Enable the Exti Line rising edge trigger.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be enabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be enabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1734,7 +1722,7 @@
|
|||
|
||||
/**
|
||||
* @brief Disable the Exti Line rising edge trigger.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be disabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be disabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1742,7 +1730,7 @@
|
|||
|
||||
/**
|
||||
* @brief Enable the Exti Line falling edge trigger.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be enabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be enabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1750,7 +1738,7 @@
|
|||
|
||||
/**
|
||||
* @brief Disable the Exti Line falling edge trigger.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be disabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be disabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1758,7 +1746,7 @@
|
|||
|
||||
/**
|
||||
* @brief Enable the COMP Exti Line interrupt generation.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be enabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be enabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1766,7 +1754,7 @@
|
|||
|
||||
/**
|
||||
* @brief Disable the COMP Exti Line interrupt generation.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be disabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be disabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1774,7 +1762,7 @@
|
|||
|
||||
/**
|
||||
* @brief Enable the COMP Exti Line event generation.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be enabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be enabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1782,7 +1770,7 @@
|
|||
|
||||
/**
|
||||
* @brief Disable the COMP Exti Line event generation.
|
||||
* @param __EXTILINE__: specifies the COMP Exti sources to be disabled.
|
||||
* @param __EXTILINE__ specifies the COMP Exti sources to be disabled.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -1790,7 +1778,7 @@
|
|||
|
||||
/**
|
||||
* @brief Check whether the specified EXTI line flag is set or not.
|
||||
* @param __FLAG__: specifies the COMP Exti sources to be checked.
|
||||
* @param __FLAG__ specifies the COMP Exti sources to be checked.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval The state of __FLAG__ (SET or RESET).
|
||||
*/
|
||||
|
@ -1798,7 +1786,7 @@
|
|||
|
||||
/**
|
||||
* @brief Clear the COMP Exti flags.
|
||||
* @param __FLAG__: specifies the COMP Exti sources to be cleared.
|
||||
* @param __FLAG__ specifies the COMP Exti sources to be cleared.
|
||||
* This parameter can be a value of @ref COMPEx_ExtiLineEvent
|
||||
* @retval None.
|
||||
*/
|
||||
|
@ -2395,8 +2383,7 @@
|
|||
|| \
|
||||
(((INPUT) == COMP_NONINVERTINGINPUT_IO1)))
|
||||
|
||||
#define IS_COMP_WINDOWMODE(WINDOWMODE) (((WINDOWMODE) == COMP_WINDOWMODE_DISABLE) || \
|
||||
((WINDOWMODE) == COMP_WINDOWMODE_ENABLE))
|
||||
#define IS_COMP_WINDOWMODE(WINDOWMODE) ((WINDOWMODE) == (WINDOWMODE)) /*!< Not available: check always true */
|
||||
|
||||
#define IS_COMP_MODE(MODE) ((MODE) == (MODE)) /*!< Not available: check always true */
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_conf.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief HAL configuration file.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -162,10 +160,11 @@
|
|||
*/
|
||||
#define VDD_VALUE (3300U) /*!< Value of VDD in mv */
|
||||
#define TICK_INT_PRIORITY ((uint32_t)(1U<<__NVIC_PRIO_BITS) - 1U) /*!< tick interrupt priority (lowest by default) */
|
||||
#define USE_RTOS 0
|
||||
#define PREFETCH_ENABLE 1
|
||||
#define INSTRUCTION_CACHE_ENABLE 0
|
||||
#define DATA_CACHE_ENABLE 0
|
||||
#define USE_RTOS 0U
|
||||
#define PREFETCH_ENABLE 1U
|
||||
#define INSTRUCTION_CACHE_ENABLE 0U
|
||||
#define DATA_CACHE_ENABLE 0U
|
||||
#define USE_SPI_CRC 1U
|
||||
|
||||
/* ########################## Assert Selection ############################## */
|
||||
/**
|
||||
|
@ -315,15 +314,15 @@
|
|||
#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__))
|
||||
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((char *)__FILE__, __LINE__))
|
||||
/* Exported functions ------------------------------------------------------- */
|
||||
void assert_failed(uint8_t* file, uint32_t line);
|
||||
void assert_failed(char* file, uint32_t line);
|
||||
#else
|
||||
#define assert_param(expr) ((void)0U)
|
||||
#endif /* USE_FULL_ASSERT */
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_cortex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of CORTEX HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_crc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of CRC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -231,37 +229,37 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Reset CRC handle state.
|
||||
* @param __HANDLE__: CRC handle.
|
||||
* @param __HANDLE__ CRC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_CRC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CRC_STATE_RESET)
|
||||
|
||||
/**
|
||||
* @brief Reset CRC Data Register.
|
||||
* @param __HANDLE__: CRC handle
|
||||
* @param __HANDLE__ CRC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_CRC_DR_RESET(__HANDLE__) ((__HANDLE__)->Instance->CR |= CRC_CR_RESET)
|
||||
|
||||
/**
|
||||
* @brief Set CRC INIT non-default value
|
||||
* @param __HANDLE__: CRC handle
|
||||
* @param __INIT__: 32-bit initial value
|
||||
* @param __HANDLE__ CRC handle
|
||||
* @param __INIT__ 32-bit initial value
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_CRC_INITIALCRCVALUE_CONFIG(__HANDLE__, __INIT__) ((__HANDLE__)->Instance->INIT = (__INIT__))
|
||||
|
||||
/**
|
||||
* @brief Store a 8-bit data in the Independent Data(ID) register.
|
||||
* @param __HANDLE__: CRC handle
|
||||
* @param __VALUE__: 8-bit value to be stored in the ID register
|
||||
* @param __HANDLE__ CRC handle
|
||||
* @param __VALUE__ 8-bit value to be stored in the ID register
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_CRC_SET_IDR(__HANDLE__, __VALUE__) (WRITE_REG((__HANDLE__)->Instance->IDR, (__VALUE__)))
|
||||
|
||||
/**
|
||||
* @brief Return the 8-bit data stored in the Independent Data(ID) register.
|
||||
* @param __HANDLE__: CRC handle
|
||||
* @param __HANDLE__ CRC handle
|
||||
* @retval 8-bit value of the ID register
|
||||
*/
|
||||
#define __HAL_CRC_GET_IDR(__HANDLE__) (((__HANDLE__)->Instance->IDR) & CRC_IDR_IDR)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_crc_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of CRC HAL extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -92,22 +90,22 @@
|
|||
|
||||
/**
|
||||
* @brief Set CRC output reversal
|
||||
* @param __HANDLE__: CRC handle
|
||||
* @param __HANDLE__ CRC handle
|
||||
* @retval None.
|
||||
*/
|
||||
#define __HAL_CRC_OUTPUTREVERSAL_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= CRC_CR_REV_OUT)
|
||||
|
||||
/**
|
||||
* @brief Unset CRC output reversal
|
||||
* @param __HANDLE__: CRC handle
|
||||
* @param __HANDLE__ CRC handle
|
||||
* @retval None.
|
||||
*/
|
||||
#define __HAL_CRC_OUTPUTREVERSAL_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(CRC_CR_REV_OUT))
|
||||
|
||||
/**
|
||||
* @brief Set CRC non-default polynomial
|
||||
* @param __HANDLE__: CRC handle
|
||||
* @param __POLYNOMIAL__: 7, 8, 16 or 32-bit polynomial
|
||||
* @param __HANDLE__ CRC handle
|
||||
* @param __POLYNOMIAL__ 7, 8, 16 or 32-bit polynomial
|
||||
* @retval None.
|
||||
*/
|
||||
#define __HAL_CRC_POLYNOMIAL_CONFIG(__HANDLE__, __POLYNOMIAL__) ((__HANDLE__)->Instance->POL = (__POLYNOMIAL__))
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_dac.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of DAC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -226,48 +224,48 @@ typedef struct __DAC_HandleTypeDef
|
|||
*/
|
||||
|
||||
/** @brief Reset DAC handle state
|
||||
* @param __HANDLE__: specifies the DAC handle.
|
||||
* @param __HANDLE__ specifies the DAC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_DAC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DAC_STATE_RESET)
|
||||
|
||||
/** @brief Enable the DAC channel
|
||||
* @param __HANDLE__: specifies the DAC handle.
|
||||
* @param __DAC_Channel__: specifies the DAC channel
|
||||
* @param __HANDLE__ specifies the DAC handle.
|
||||
* @param __DAC_Channel__ specifies the DAC channel
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_DAC_ENABLE(__HANDLE__, __DAC_Channel__) \
|
||||
((__HANDLE__)->Instance->CR |= (DAC_CR_EN1 << (__DAC_Channel__)))
|
||||
|
||||
/** @brief Disable the DAC channel
|
||||
* @param __HANDLE__: specifies the DAC handle
|
||||
* @param __DAC_Channel__: specifies the DAC channel.
|
||||
* @param __HANDLE__ specifies the DAC handle
|
||||
* @param __DAC_Channel__ specifies the DAC channel.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_DAC_DISABLE(__HANDLE__, __DAC_Channel__) \
|
||||
((__HANDLE__)->Instance->CR &= ~(DAC_CR_EN1 << (__DAC_Channel__)))
|
||||
|
||||
/** @brief Set DHR12R1 alignment
|
||||
* @param __ALIGNMENT__: specifies the DAC alignment
|
||||
* @param __ALIGNMENT__ specifies the DAC alignment
|
||||
* @retval None
|
||||
*/
|
||||
#define DAC_DHR12R1_ALIGNMENT(__ALIGNMENT__) ((0x00000008U) + (__ALIGNMENT__))
|
||||
|
||||
/** @brief Set DHR12R2 alignment
|
||||
* @param __ALIGNMENT__: specifies the DAC alignment
|
||||
* @param __ALIGNMENT__ specifies the DAC alignment
|
||||
* @retval None
|
||||
*/
|
||||
#define DAC_DHR12R2_ALIGNMENT(__ALIGNMENT__) ((0x00000014U) + (__ALIGNMENT__))
|
||||
|
||||
/** @brief Set DHR12RD alignment
|
||||
* @param __ALIGNMENT__: specifies the DAC alignment
|
||||
* @param __ALIGNMENT__ specifies the DAC alignment
|
||||
* @retval None
|
||||
*/
|
||||
#define DAC_DHR12RD_ALIGNMENT(__ALIGNMENT__) ((0x00000020U) + (__ALIGNMENT__))
|
||||
|
||||
/** @brief Enable the DAC interrupt
|
||||
* @param __HANDLE__: specifies the DAC handle
|
||||
* @param __INTERRUPT__: specifies the DAC interrupt.
|
||||
* @param __HANDLE__ specifies the DAC handle
|
||||
* @param __INTERRUPT__ specifies the DAC interrupt.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg DAC_IT_DMAUDR1: DAC channel 1 DMA underrun interrupt
|
||||
* @arg DAC_IT_DMAUDR2: DAC channel 2 DMA underrun interrupt
|
||||
|
@ -276,8 +274,8 @@ typedef struct __DAC_HandleTypeDef
|
|||
#define __HAL_DAC_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR) |= (__INTERRUPT__))
|
||||
|
||||
/** @brief Disable the DAC interrupt
|
||||
* @param __HANDLE__: specifies the DAC handle
|
||||
* @param __INTERRUPT__: specifies the DAC interrupt.
|
||||
* @param __HANDLE__ specifies the DAC handle
|
||||
* @param __INTERRUPT__ specifies the DAC interrupt.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg DAC_IT_DMAUDR1: DAC channel 1 DMA underrun interrupt
|
||||
* @arg DAC_IT_DMAUDR2: DAC channel 2 DMA underrun interrupt
|
||||
|
@ -286,8 +284,8 @@ typedef struct __DAC_HandleTypeDef
|
|||
#define __HAL_DAC_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR) &= ~(__INTERRUPT__))
|
||||
|
||||
/** @brief Check whether the specified DAC interrupt source is enabled or not
|
||||
* @param __HANDLE__: DAC handle
|
||||
* @param __INTERRUPT__: DAC interrupt source to check
|
||||
* @param __HANDLE__ DAC handle
|
||||
* @param __INTERRUPT__ DAC interrupt source to check
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg DAC_IT_DMAUDR1: DAC channel 1 DMA underrun interrupt
|
||||
* @arg DAC_IT_DMAUDR2: DAC channel 2 DMA underrun interrupt
|
||||
|
@ -296,8 +294,8 @@ typedef struct __DAC_HandleTypeDef
|
|||
#define __HAL_DAC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR & (__INTERRUPT__)) == (__INTERRUPT__))
|
||||
|
||||
/** @brief Get the selected DAC's flag status
|
||||
* @param __HANDLE__: specifies the DAC handle.
|
||||
* @param __FLAG__: specifies the DAC flag to get.
|
||||
* @param __HANDLE__ specifies the DAC handle.
|
||||
* @param __FLAG__ specifies the DAC flag to get.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg DAC_FLAG_DMAUDR1: DAC channel 1 DMA underrun flag
|
||||
* @arg DAC_FLAG_DMAUDR2: DAC channel 2 DMA underrun flag
|
||||
|
@ -306,8 +304,8 @@ typedef struct __DAC_HandleTypeDef
|
|||
#define __HAL_DAC_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
|
||||
|
||||
/** @brief Clear the DAC's flag
|
||||
* @param __HANDLE__: specifies the DAC handle.
|
||||
* @param __FLAG__: specifies the DAC flag to clear.
|
||||
* @param __HANDLE__ specifies the DAC handle.
|
||||
* @param __FLAG__ specifies the DAC flag to clear.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg DAC_FLAG_DMAUDR1: DAC channel 1 DMA underrun flag
|
||||
* @arg DAC_FLAG_DMAUDR2: DAC channel 2 DMA underrun flag
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_dac_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of DAC HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_def.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief This file contains HAL common defines, enumeration, macros and
|
||||
* structures definitions.
|
||||
******************************************************************************
|
||||
|
@ -46,7 +44,9 @@
|
|||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f3xx.h"
|
||||
#if defined USE_LEGACY
|
||||
#include "Legacy/stm32_hal_legacy.h"
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
|
@ -86,7 +86,7 @@ typedef enum
|
|||
#define UNUSED(x) ((void)(x))
|
||||
|
||||
/** @brief Reset the Handle's State field.
|
||||
* @param __HANDLE__: specifies the Peripheral Handle.
|
||||
* @param __HANDLE__ specifies the Peripheral Handle.
|
||||
* @note This macro can be used for the following purpose:
|
||||
* - When the Handle is declared as local variable; before passing it as parameter
|
||||
* to HAL_PPP_Init() for the first time, it is mandatory to use this macro
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_dma.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of DMA HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -299,21 +297,21 @@ typedef struct __DMA_HandleTypeDef
|
|||
*/
|
||||
|
||||
/** @brief Reset DMA handle state
|
||||
* @param __HANDLE__: DMA handle.
|
||||
* @param __HANDLE__ DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_DMA_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DMA_STATE_RESET)
|
||||
|
||||
/**
|
||||
* @brief Enable the specified DMA Channel.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_DMA_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CCR |= DMA_CCR_EN)
|
||||
|
||||
/**
|
||||
* @brief Disable the specified DMA Channel.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_DMA_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CCR &= ~DMA_CCR_EN)
|
||||
|
@ -323,8 +321,8 @@ typedef struct __DMA_HandleTypeDef
|
|||
|
||||
/**
|
||||
* @brief Enables the specified DMA Channel interrupts.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __INTERRUPT__: specifies the DMA interrupt sources to be enabled or disabled.
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @param __INTERRUPT__ specifies the DMA interrupt sources to be enabled or disabled.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg DMA_IT_TC: Transfer complete interrupt mask
|
||||
* @arg DMA_IT_HT: Half transfer complete interrupt mask
|
||||
|
@ -335,8 +333,8 @@ typedef struct __DMA_HandleTypeDef
|
|||
|
||||
/**
|
||||
* @brief Disables the specified DMA Channel interrupts.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __INTERRUPT__: specifies the DMA interrupt sources to be enabled or disabled.
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @param __INTERRUPT__ specifies the DMA interrupt sources to be enabled or disabled.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg DMA_IT_TC: Transfer complete interrupt mask
|
||||
* @arg DMA_IT_HT: Half transfer complete interrupt mask
|
||||
|
@ -347,8 +345,8 @@ typedef struct __DMA_HandleTypeDef
|
|||
|
||||
/**
|
||||
* @brief Checks whether the specified DMA Channel interrupt is enabled or disabled.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __INTERRUPT__: specifies the DMA interrupt source to check.
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @param __INTERRUPT__ specifies the DMA interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DMA_IT_TC: Transfer complete interrupt mask
|
||||
* @arg DMA_IT_HT: Half transfer complete interrupt mask
|
||||
|
@ -359,7 +357,7 @@ typedef struct __DMA_HandleTypeDef
|
|||
|
||||
/**
|
||||
* @brief Returns the number of remaining data units in the current DMAy Channelx transfer.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __HANDLE__ DMA handle
|
||||
*
|
||||
* @retval The number of remaining data units in the current DMA Channel transfer.
|
||||
*/
|
||||
|
@ -430,7 +428,7 @@ uint32_t HAL_DMA_GetError(DMA_HandleTypeDef *hdma);
|
|||
|
||||
#define IS_DMA_PERIPHERAL_INC_STATE(STATE) (((STATE) == DMA_PINC_ENABLE) || \
|
||||
((STATE) == DMA_PINC_DISABLE))
|
||||
|
||||
|
||||
#define IS_DMA_MEMORY_INC_STATE(STATE) (((STATE) == DMA_MINC_ENABLE) || \
|
||||
((STATE) == DMA_MINC_DISABLE))
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_dma_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of DMA HAL extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -67,7 +65,7 @@
|
|||
defined(STM32F373xC) || defined(STM32F378xx)
|
||||
/**
|
||||
* @brief Returns the current DMA Channel transfer complete flag.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @retval The specified transfer complete flag index.
|
||||
*/
|
||||
#define __HAL_DMA_GET_TC_FLAG_INDEX(__HANDLE__) \
|
||||
|
@ -86,7 +84,7 @@
|
|||
|
||||
/**
|
||||
* @brief Returns the current DMA Channel half transfer complete flag.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @retval The specified half transfer complete flag index.
|
||||
*/
|
||||
#define __HAL_DMA_GET_HT_FLAG_INDEX(__HANDLE__)\
|
||||
|
@ -105,7 +103,7 @@
|
|||
|
||||
/**
|
||||
* @brief Returns the current DMA Channel transfer error flag.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @retval The specified transfer error flag index.
|
||||
*/
|
||||
#define __HAL_DMA_GET_TE_FLAG_INDEX(__HANDLE__)\
|
||||
|
@ -124,7 +122,7 @@
|
|||
|
||||
/**
|
||||
* @brief Return the current DMA Channel Global interrupt flag.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @retval The specified transfer error flag index.
|
||||
*/
|
||||
#define __HAL_DMA_GET_GI_FLAG_INDEX(__HANDLE__)\
|
||||
|
@ -143,8 +141,8 @@
|
|||
|
||||
/**
|
||||
* @brief Get the DMA Channel pending flags.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __FLAG__: Get the specified flag.
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @param __FLAG__ Get the specified flag.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg DMA_FLAG_TCx: Transfer complete flag
|
||||
* @arg DMA_FLAG_HTx: Half transfer complete flag
|
||||
|
@ -158,8 +156,8 @@
|
|||
|
||||
/**
|
||||
* @brief Clears the DMA Channel pending flags.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __FLAG__: specifies the flag to clear.
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @param __FLAG__ specifies the flag to clear.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg DMA_FLAG_TCx: Transfer complete flag
|
||||
* @arg DMA_FLAG_HTx: Half transfer complete flag
|
||||
|
@ -182,7 +180,7 @@
|
|||
|
||||
/**
|
||||
* @brief Returns the current DMA Channel transfer complete flag.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @retval The specified transfer complete flag index.
|
||||
*/
|
||||
#define __HAL_DMA_GET_TC_FLAG_INDEX(__HANDLE__) \
|
||||
|
@ -196,7 +194,7 @@
|
|||
|
||||
/**
|
||||
* @brief Returns the current DMA Channel half transfer complete flag.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @retval The specified half transfer complete flag index.
|
||||
*/
|
||||
#define __HAL_DMA_GET_HT_FLAG_INDEX(__HANDLE__)\
|
||||
|
@ -210,7 +208,7 @@
|
|||
|
||||
/**
|
||||
* @brief Returns the current DMA Channel transfer error flag.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @retval The specified transfer error flag index.
|
||||
*/
|
||||
#define __HAL_DMA_GET_TE_FLAG_INDEX(__HANDLE__)\
|
||||
|
@ -224,7 +222,7 @@
|
|||
|
||||
/**
|
||||
* @brief Return the current DMA Channel Global interrupt flag.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @retval The specified transfer error flag index.
|
||||
*/
|
||||
#define __HAL_DMA_GET_GI_FLAG_INDEX(__HANDLE__)\
|
||||
|
@ -238,8 +236,8 @@
|
|||
|
||||
/**
|
||||
* @brief Get the DMA Channel pending flags.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __FLAG__: Get the specified flag.
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @param __FLAG__ Get the specified flag.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg DMA_FLAG_TCx: Transfer complete flag
|
||||
* @arg DMA_FLAG_HTx: Half transfer complete flag
|
||||
|
@ -252,8 +250,8 @@
|
|||
|
||||
/**
|
||||
* @brief Clears the DMA Channel pending flags.
|
||||
* @param __HANDLE__: DMA handle
|
||||
* @param __FLAG__: specifies the flag to clear.
|
||||
* @param __HANDLE__ DMA handle
|
||||
* @param __FLAG__ specifies the flag to clear.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg DMA_FLAG_TCx: Transfer complete flag
|
||||
* @arg DMA_FLAG_HTx: Half transfer complete flag
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_flash.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of Flash HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -396,3 +394,4 @@ HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout);
|
|||
#endif /* __STM32F3xx_HAL_FLASH_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_flash_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of Flash HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -497,3 +495,4 @@ uint32_t HAL_FLASHEx_OBGetUserData(uint32_t DATAAdress);
|
|||
#endif /* __STM32F3xx_HAL_FLASH_EX_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_gpio.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of GPIO HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -181,7 +179,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Check whether the specified EXTI line flag is set or not.
|
||||
* @param __EXTI_LINE__: specifies the EXTI line flag to check.
|
||||
* @param __EXTI_LINE__ specifies the EXTI line flag to check.
|
||||
* This parameter can be GPIO_PIN_x where x can be(0..15)
|
||||
* @retval The new state of __EXTI_LINE__ (SET or RESET).
|
||||
*/
|
||||
|
@ -189,7 +187,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Clear the EXTI's line pending flags.
|
||||
* @param __EXTI_LINE__: specifies the EXTI lines flags to clear.
|
||||
* @param __EXTI_LINE__ specifies the EXTI lines flags to clear.
|
||||
* This parameter can be any combination of GPIO_PIN_x where x can be (0..15)
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -197,7 +195,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Check whether the specified EXTI line is asserted or not.
|
||||
* @param __EXTI_LINE__: specifies the EXTI line to check.
|
||||
* @param __EXTI_LINE__ specifies the EXTI line to check.
|
||||
* This parameter can be GPIO_PIN_x where x can be(0..15)
|
||||
* @retval The new state of __EXTI_LINE__ (SET or RESET).
|
||||
*/
|
||||
|
@ -205,7 +203,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Clear the EXTI's line pending bits.
|
||||
* @param __EXTI_LINE__: specifies the EXTI lines to clear.
|
||||
* @param __EXTI_LINE__ specifies the EXTI lines to clear.
|
||||
* This parameter can be any combination of GPIO_PIN_x where x can be (0..15)
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -213,7 +211,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Generate a Software interrupt on selected EXTI line.
|
||||
* @param __EXTI_LINE__: specifies the EXTI line to check.
|
||||
* @param __EXTI_LINE__ specifies the EXTI line to check.
|
||||
* This parameter can be GPIO_PIN_x where x can be(0..15)
|
||||
* @retval None
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_gpio_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of GPIO HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_hrtim.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of HRTIM HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -1330,8 +1328,9 @@ typedef struct {
|
|||
* @brief Constants defining whether or not an external event is programmed in
|
||||
fast mode
|
||||
*/
|
||||
#define HRTIM_EVENTFASTMODE_DISABLE (0x00000000U) /*!< External Event is acting asynchronously on outputs (low latency mode) */
|
||||
#define HRTIM_EVENTFASTMODE_ENABLE (HRTIM_EECR1_EE1FAST) /*!< External Event is re-synchronized by the HRTIM logic before acting on outputs */
|
||||
|
||||
#define HRTIM_EVENTFASTMODE_ENABLE (0x00000000U) /*!< External Event is re-synchronized by the HRTIM logic before acting on outputs */
|
||||
#define HRTIM_EVENTFASTMODE_DISABLE (HRTIM_EECR1_EE1FAST) /*!< External Event is acting asynchronously on outputs (low latency mode) */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -2363,7 +2362,7 @@ typedef struct {
|
|||
((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_WINDOWINGCMP2) || \
|
||||
((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_WINDOWINGCMP3) || \
|
||||
((TIMEVENTFILTER) == HRTIM_TIMEVENTFILTER_WINDOWINGTIM))
|
||||
|
||||
|
||||
#define IS_HRTIM_TIMEVENTLATCH(TIMEVENTLATCH)\
|
||||
(((TIMEVENTLATCH) == HRTIM_TIMEVENTLATCH_DISABLED) || \
|
||||
((TIMEVENTLATCH) == HRTIM_TIMEVENTLATCH_ENABLED))
|
||||
|
@ -2377,11 +2376,11 @@ typedef struct {
|
|||
((PRESCALERRATIO) == HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV4) || \
|
||||
((PRESCALERRATIO) == HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV8) || \
|
||||
((PRESCALERRATIO) == HRTIM_TIMDEADTIME_PRESCALERRATIO_DIV16))
|
||||
|
||||
|
||||
#define IS_HRTIM_TIMDEADTIME_RISINGSIGN(RISINGSIGN)\
|
||||
(((RISINGSIGN) == HRTIM_TIMDEADTIME_RISINGSIGN_POSITIVE) || \
|
||||
((RISINGSIGN) == HRTIM_TIMDEADTIME_RISINGSIGN_NEGATIVE))
|
||||
|
||||
|
||||
#define IS_HRTIM_TIMDEADTIME_RISINGLOCK(RISINGLOCK)\
|
||||
(((RISINGLOCK) == HRTIM_TIMDEADTIME_RISINGLOCK_WRITE) || \
|
||||
((RISINGLOCK) == HRTIM_TIMDEADTIME_RISINGLOCK_READONLY))
|
||||
|
@ -2529,7 +2528,7 @@ typedef struct {
|
|||
((FILTER) == HRTIM_EVENTFILTER_13) || \
|
||||
((FILTER) == HRTIM_EVENTFILTER_14) || \
|
||||
((FILTER) == HRTIM_EVENTFILTER_15))))
|
||||
|
||||
|
||||
#define IS_HRTIM_EVENTPRESCALER(EVENTPRESCALER)\
|
||||
(((EVENTPRESCALER) == HRTIM_EVENTPRESCALER_DIV1) || \
|
||||
((EVENTPRESCALER) == HRTIM_EVENTPRESCALER_DIV2) || \
|
||||
|
@ -2670,11 +2669,11 @@ typedef struct {
|
|||
(((TIMER) == HRTIM_TIMERINDEX_TIMER_D) && (((BURSTDMA) & 0xFFE00000U) == 0x00000000U)) \
|
||||
|| \
|
||||
(((TIMER) == HRTIM_TIMERINDEX_TIMER_E) && (((BURSTDMA) & 0xFFE00000U) == 0x00000000U)))
|
||||
|
||||
|
||||
#define IS_HRTIM_BURSTMODECTL(BURSTMODECTL)\
|
||||
(((BURSTMODECTL) == HRTIM_BURSTMODECTL_DISABLED) || \
|
||||
((BURSTMODECTL) == HRTIM_BURSTMODECTL_ENABLED))
|
||||
|
||||
|
||||
#define IS_HRTIM_TIMERUPDATE(TIMERUPDATE) (((TIMERUPDATE) & 0xFFFFFFC0U) == 0x00000000U)
|
||||
|
||||
#define IS_HRTIM_TIMERRESET(TIMERRESET) (((TIMERRESET) & 0xFFFFC0FFU) == 0x00000000U)
|
||||
|
@ -2701,14 +2700,14 @@ typedef struct {
|
|||
*/
|
||||
|
||||
/** @brief Reset HRTIM handle state
|
||||
* @param __HANDLE__: HRTIM handle.
|
||||
* @param __HANDLE__ HRTIM handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_HRTIM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_HRTIM_STATE_RESET)
|
||||
|
||||
/** @brief Enables or disables the timer counter(s)
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __TIMERS__: timers to enable/disable
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __TIMERS__ timers to enable/disable
|
||||
* This parameter can be any combinations of the following values:
|
||||
* @arg HRTIM_TIMERID_MASTER: Master timer identifier
|
||||
* @arg HRTIM_TIMERID_TIMER_A: Timer A identifier
|
||||
|
@ -2771,8 +2770,8 @@ typedef struct {
|
|||
} while(0U)
|
||||
|
||||
/** @brief Enables or disables the specified HRTIM common interrupts.
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__: specifies the interrupt source to enable or disable.
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__ specifies the interrupt source to enable or disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_IT_FLT1: Fault 1 interrupt enable
|
||||
* @arg HRTIM_IT_FLT2: Fault 2 interrupt enable
|
||||
|
@ -2788,8 +2787,8 @@ typedef struct {
|
|||
#define __HAL_HRTIM_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sCommonRegs.IER &= ~(__INTERRUPT__))
|
||||
|
||||
/** @brief Enables or disables the specified HRTIM Master timer interrupts.
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__: specifies the interrupt source to enable or disable.
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__ specifies the interrupt source to enable or disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_MASTER_IT_MCMP1: Master compare 1 interrupt enable
|
||||
* @arg HRTIM_MASTER_IT_MCMP2: Master compare 2 interrupt enable
|
||||
|
@ -2804,9 +2803,9 @@ typedef struct {
|
|||
#define __HAL_HRTIM_MASTER_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sMasterRegs.MDIER &= ~(__INTERRUPT__))
|
||||
|
||||
/** @brief Enables or disables the specified HRTIM Timerx interrupts.
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __TIMER__: specified the timing unit (Timer A to E)
|
||||
* @param __INTERRUPT__: specifies the interrupt source to enable or disable.
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __TIMER__ specified the timing unit (Timer A to E)
|
||||
* @param __INTERRUPT__ specifies the interrupt source to enable or disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_TIM_IT_CMP1: Timer compare 1 interrupt enable
|
||||
* @arg HRTIM_TIM_IT_CMP2: Timer compare 2 interrupt enable
|
||||
|
@ -2828,8 +2827,8 @@ typedef struct {
|
|||
#define __HAL_HRTIM_TIMER_DISABLE_IT(__HANDLE__, __TIMER__, __INTERRUPT__) ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxDIER &= ~(__INTERRUPT__))
|
||||
|
||||
/** @brief Checks if the specified HRTIM common interrupt source is enabled or disabled.
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__: specifies the interrupt source to check.
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__ specifies the interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_IT_FLT1: Fault 1 interrupt enable
|
||||
* @arg HRTIM_IT_FLT2: Fault 2 interrupt enable
|
||||
|
@ -2844,8 +2843,8 @@ typedef struct {
|
|||
#define __HAL_HRTIM_GET_ITSTATUS(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->sCommonRegs.IER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
|
||||
|
||||
/** @brief Checks if the specified HRTIM Master interrupt source is enabled or disabled.
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__: specifies the interrupt source to check.
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__ specifies the interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_MASTER_IT_MCMP1: Master compare 1 interrupt enable
|
||||
* @arg HRTIM_MASTER_IT_MCMP2: Master compare 2 interrupt enable
|
||||
|
@ -2859,9 +2858,9 @@ typedef struct {
|
|||
#define __HAL_HRTIM_MASTER_GET_ITSTATUS(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->sMasterRegs.MDIER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
|
||||
|
||||
/** @brief Checks if the specified HRTIM Timerx interrupt source is enabled or disabled.
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __TIMER__: specified the timing unit (Timer A to E)
|
||||
* @param __INTERRUPT__: specifies the interrupt source to check.
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __TIMER__ specified the timing unit (Timer A to E)
|
||||
* @param __INTERRUPT__ specifies the interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_MASTER_IT_MCMP1: Master compare 1 interrupt enable
|
||||
* @arg HRTIM_MASTER_IT_MCMP2: Master compare 2 interrupt enable
|
||||
|
@ -2889,8 +2888,8 @@ typedef struct {
|
|||
#define __HAL_HRTIM_TIMER_GET_ITSTATUS(__HANDLE__, __TIMER__, __INTERRUPT__) ((((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxDIER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
|
||||
|
||||
/** @brief Clears the specified HRTIM common pending flag.
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__: specifies the interrupt pending bit to clear.
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__ specifies the interrupt pending bit to clear.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_IT_FLT1: Fault 1 interrupt clear flag
|
||||
* @arg HRTIM_IT_FLT2: Fault 2 interrupt clear flag
|
||||
|
@ -2905,8 +2904,8 @@ typedef struct {
|
|||
#define __HAL_HRTIM_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sCommonRegs.ICR = (__INTERRUPT__))
|
||||
|
||||
/** @brief Clears the specified HRTIM Master pending flag.
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__: specifies the interrupt pending bit to clear.
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__ specifies the interrupt pending bit to clear.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_MASTER_IT_MCMP1: Master compare 1 interrupt clear flag
|
||||
* @arg HRTIM_MASTER_IT_MCMP2: Master compare 2 interrupt clear flag
|
||||
|
@ -2920,9 +2919,9 @@ typedef struct {
|
|||
#define __HAL_HRTIM_MASTER_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sMasterRegs.MICR = (__INTERRUPT__))
|
||||
|
||||
/** @brief Clears the specified HRTIM Timerx pending flag.
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __TIMER__: specified the timing unit (Timer A to E)
|
||||
* @param __INTERRUPT__: specifies the interrupt pending bit to clear.
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __TIMER__ specified the timing unit (Timer A to E)
|
||||
* @param __INTERRUPT__ specifies the interrupt pending bit to clear.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_TIM_IT_CMP1: Timer compare 1 interrupt clear flag
|
||||
* @arg HRTIM_TIM_IT_CMP2: Timer compare 2 interrupt clear flag
|
||||
|
@ -2944,8 +2943,8 @@ typedef struct {
|
|||
|
||||
/* DMA HANDLING */
|
||||
/** @brief Enables or disables the specified HRTIM common interrupts.
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__: specifies the interrupt source to enable or disable.
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __INTERRUPT__ specifies the interrupt source to enable or disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_IT_FLT1: Fault 1 interrupt enable
|
||||
* @arg HRTIM_IT_FLT2: Fault 2 interrupt enable
|
||||
|
@ -2961,8 +2960,8 @@ typedef struct {
|
|||
#define __HAL_HRTIM_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->sCommonRegs.IER &= ~(__INTERRUPT__))
|
||||
|
||||
/** @brief Enables or disables the specified HRTIM Master timer DMA requets.
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __DMA__: specifies the DMA request to enable or disable.
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __DMA__ specifies the DMA request to enable or disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_MASTER_DMA_MCMP1: Master compare 1 DMA resquest enable
|
||||
* @arg HRTIM_MASTER_DMA_MCMP2: Master compare 2 DMA resquest enable
|
||||
|
@ -2977,9 +2976,9 @@ typedef struct {
|
|||
#define __HAL_HRTIM_MASTER_DISABLE_DMA(__HANDLE__, __DMA__) ((__HANDLE__)->Instance->sMasterRegs.MDIER &= ~(__DMA__))
|
||||
|
||||
/** @brief Enables or disables the specified HRTIM Timerx DMA requests.
|
||||
* @param __HANDLE__: specifies the HRTIM Handle.
|
||||
* @param __TIMER__: specified the timing unit (Timer A to E)
|
||||
* @param __DMA__: specifies the DMA request to enable or disable.
|
||||
* @param __HANDLE__ specifies the HRTIM Handle.
|
||||
* @param __TIMER__ specified the timing unit (Timer A to E)
|
||||
* @param __DMA__ specifies the DMA request to enable or disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_TIM_DMA_CMP1: Timer compare 1 DMA resquest enable
|
||||
* @arg HRTIM_TIM_DMA_CMP2: Timer compare 2 DMA resquest enable
|
||||
|
@ -3010,12 +3009,12 @@ typedef struct {
|
|||
#define __HAL_HRTIM_TIMER_CLEAR_FLAG(__HANDLE__, __TIMER__, __FLAG__) ((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxICR = (__FLAG__))
|
||||
|
||||
/** @brief Sets the HRTIM timer Counter Register value on runtime
|
||||
* @param __HANDLE__: HRTIM Handle.
|
||||
* @param __TIMER__: HRTIM timer
|
||||
* @param __HANDLE__ HRTIM Handle.
|
||||
* @param __TIMER__ HRTIM timer
|
||||
* This parameter can be one of the following values:
|
||||
* @arg 0x5 for master timer
|
||||
* @arg 0x0 to 0x4 for timers A to E
|
||||
* @param __COUNTER__: specifies the Counter Register new value.
|
||||
* @param __COUNTER__ specifies the Counter Register new value.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_HRTIM_SETCOUNTER(__HANDLE__, __TIMER__, __COUNTER__) \
|
||||
|
@ -3023,8 +3022,8 @@ typedef struct {
|
|||
((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CNTxR = (__COUNTER__)))
|
||||
|
||||
/** @brief Gets the HRTIM timer Counter Register value on runtime
|
||||
* @param __HANDLE__: HRTIM Handle.
|
||||
* @param __TIMER__: HRTIM timer
|
||||
* @param __HANDLE__ HRTIM Handle.
|
||||
* @param __TIMER__ HRTIM timer
|
||||
* This parameter can be one of the following values:
|
||||
* @arg 0x5 for master timer
|
||||
* @arg 0x0 to 0x4 for timers A to E
|
||||
|
@ -3035,12 +3034,12 @@ typedef struct {
|
|||
((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CNTxR))
|
||||
|
||||
/** @brief Sets the HRTIM timer Period value on runtime
|
||||
* @param __HANDLE__: HRTIM Handle.
|
||||
* @param __TIMER__: HRTIM timer
|
||||
* @param __HANDLE__ HRTIM Handle.
|
||||
* @param __TIMER__ HRTIM timer
|
||||
* This parameter can be one of the following values:
|
||||
* @arg 0x5 for master timer
|
||||
* @arg 0x0 to 0x4 for timers A to E
|
||||
* @param __PERIOD__: specifies the Period Register new value.
|
||||
* @param __PERIOD__ specifies the Period Register new value.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_HRTIM_SETPERIOD(__HANDLE__, __TIMER__, __PERIOD__) \
|
||||
|
@ -3048,8 +3047,8 @@ typedef struct {
|
|||
((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].PERxR = (__PERIOD__)))
|
||||
|
||||
/** @brief Gets the HRTIM timer Period Register value on runtime
|
||||
* @param __HANDLE__: HRTIM Handle.
|
||||
* @param __TIMER__: HRTIM timer
|
||||
* @param __HANDLE__ HRTIM Handle.
|
||||
* @param __TIMER__ HRTIM timer
|
||||
* This parameter can be one of the following values:
|
||||
* @arg 0x5 for master timer
|
||||
* @arg 0x0 to 0x4 for timers A to E
|
||||
|
@ -3060,12 +3059,12 @@ typedef struct {
|
|||
((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].PERxR))
|
||||
|
||||
/** @brief Sets the HRTIM timer clock prescaler value on runtime
|
||||
* @param __HANDLE__: HRTIM Handle.
|
||||
* @param __TIMER__: HRTIM timer
|
||||
* @param __HANDLE__ HRTIM Handle.
|
||||
* @param __TIMER__ HRTIM timer
|
||||
* This parameter can be one of the following values:
|
||||
* @arg 0x5 for master timer
|
||||
* @arg 0x0 to 0x4 for timers A to E
|
||||
* @param __PRESCALER__: specifies the clock prescaler new value.
|
||||
* @param __PRESCALER__ specifies the clock prescaler new value.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_PRESCALERRATIO_MUL32: fHRCK: 4.608 GHz - Resolution: 217 ps - Min PWM frequency: 70.3 kHz (fHRTIM=144MHz)
|
||||
* @arg HRTIM_PRESCALERRATIO_MUL16: fHRCK: 2.304 GHz - Resolution: 434 ps - Min PWM frequency: 35.1 KHz (fHRTIM=144MHz)
|
||||
|
@ -3078,12 +3077,12 @@ typedef struct {
|
|||
* @retval None
|
||||
*/
|
||||
#define __HAL_HRTIM_SETCLOCKPRESCALER(__HANDLE__, __TIMER__, __PRESCALER__) \
|
||||
(((__TIMER__) == HRTIM_TIMERINDEX_MASTER) ? ((__HANDLE__)->Instance->sMasterRegs.MCR |= (__PRESCALER__)) :\
|
||||
((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxCR |= (__PRESCALER__)))
|
||||
(((__TIMER__) == HRTIM_TIMERINDEX_MASTER) ? (MODIFY_REG((__HANDLE__)->Instance->sMasterRegs.MCR, HRTIM_MCR_CK_PSC, (__PRESCALER__))) :\
|
||||
(MODIFY_REG((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxCR, HRTIM_TIMCR_CK_PSC, (__PRESCALER__))))
|
||||
|
||||
/** @brief Gets the HRTIM timer clock prescaler value on runtime
|
||||
* @param __HANDLE__: HRTIM Handle.
|
||||
* @param __TIMER__: HRTIM timer
|
||||
* @param __HANDLE__ HRTIM Handle.
|
||||
* @param __TIMER__ HRTIM timer
|
||||
* This parameter can be one of the following values:
|
||||
* @arg 0x5 for master timer
|
||||
* @arg 0x0 to 0x4 for timers A to E
|
||||
|
@ -3094,17 +3093,17 @@ typedef struct {
|
|||
((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].TIMxCR & HRTIM_TIMCR_CK_PSC))
|
||||
|
||||
/** @brief Sets the HRTIM timer Compare Register value on runtime
|
||||
* @param __HANDLE__: HRTIM Handle.
|
||||
* @param __TIMER__: HRTIM timer
|
||||
* @param __HANDLE__ HRTIM Handle.
|
||||
* @param __TIMER__ HRTIM timer
|
||||
* This parameter can be one of the following values:
|
||||
* @arg 0x0 to 0x4 for timers A to E
|
||||
* @param __COMPAREUNIT__: timer compare unit
|
||||
* @param __COMPAREUNIT__ timer compare unit
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_COMPAREUNIT_1: Compare unit 1
|
||||
* @arg HRTIM_COMPAREUNIT_2: Compare unit 2
|
||||
* @arg HRTIM_COMPAREUNIT_3: Compare unit 3
|
||||
* @arg HRTIM_COMPAREUNIT_4: Compare unit 4
|
||||
* @param __COMPARE__: specifies the Compare new value.
|
||||
* @param __COMPARE__ specifies the Compare new value.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_HRTIM_SETCOMPARE(__HANDLE__, __TIMER__, __COMPAREUNIT__, __COMPARE__) \
|
||||
|
@ -3120,11 +3119,11 @@ typedef struct {
|
|||
((__HANDLE__)->Instance->sTimerxRegs[(__TIMER__)].CMP4xR = (__COMPARE__))))
|
||||
|
||||
/** @brief Gets the HRTIM timer Compare Register value on runtime
|
||||
* @param __HANDLE__: HRTIM Handle.
|
||||
* @param __TIMER__: HRTIM timer
|
||||
* @param __HANDLE__ HRTIM Handle.
|
||||
* @param __TIMER__ HRTIM timer
|
||||
* This parameter can be one of the following values:
|
||||
* @arg 0x0 to 0x4 for timers A to E
|
||||
* @param __COMPAREUNIT__: timer compare unit
|
||||
* @param __COMPAREUNIT__ timer compare unit
|
||||
* This parameter can be one of the following values:
|
||||
* @arg HRTIM_COMPAREUNIT_1: Compare unit 1
|
||||
* @arg HRTIM_COMPAREUNIT_2: Compare unit 2
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_i2c.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of I2C HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -40,7 +38,7 @@
|
|||
#define __STM32F3xx_HAL_I2C_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
|
@ -90,7 +88,7 @@ typedef struct
|
|||
uint32_t NoStretchMode; /*!< Specifies if nostretch mode is selected.
|
||||
This parameter can be a value of @ref I2C_NOSTRETCH_MODE */
|
||||
|
||||
}I2C_InitTypeDef;
|
||||
} I2C_InitTypeDef;
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
@ -139,7 +137,7 @@ typedef enum
|
|||
HAL_I2C_STATE_TIMEOUT = 0xA0U, /*!< Timeout state */
|
||||
HAL_I2C_STATE_ERROR = 0xE0U /*!< Error */
|
||||
|
||||
}HAL_I2C_StateTypeDef;
|
||||
} HAL_I2C_StateTypeDef;
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
@ -170,7 +168,7 @@ typedef enum
|
|||
HAL_I2C_MODE_SLAVE = 0x20U, /*!< I2C communication is in Slave Mode */
|
||||
HAL_I2C_MODE_MEM = 0x40U /*!< I2C communication is in Memory Mode */
|
||||
|
||||
}HAL_I2C_ModeTypeDef;
|
||||
} HAL_I2C_ModeTypeDef;
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
@ -213,7 +211,7 @@ typedef struct __I2C_HandleTypeDef
|
|||
|
||||
__IO uint32_t PreviousState; /*!< I2C communication Previous state */
|
||||
|
||||
HAL_StatusTypeDef (*XferISR)(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, uint32_t ITSources); /*!< I2C transfer IRQ handler function pointer */
|
||||
HAL_StatusTypeDef(*XferISR)(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, uint32_t ITSources); /*!< I2C transfer IRQ handler function pointer */
|
||||
|
||||
DMA_HandleTypeDef *hdmatx; /*!< I2C Tx DMA handle parameters */
|
||||
|
||||
|
@ -228,7 +226,7 @@ typedef struct __I2C_HandleTypeDef
|
|||
__IO uint32_t ErrorCode; /*!< I2C Error code */
|
||||
|
||||
__IO uint32_t AddrEventCount; /*!< I2C Address Event counter */
|
||||
}I2C_HandleTypeDef;
|
||||
} I2C_HandleTypeDef;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -506,7 +504,7 @@ typedef struct __I2C_HandleTypeDef
|
|||
#define __HAL_I2C_DISABLE(__HANDLE__) (CLEAR_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_PE))
|
||||
|
||||
/** @brief Generate a Non-Acknowledge I2C peripheral in Slave mode.
|
||||
* @param __HANDLE__: specifies the I2C Handle.
|
||||
* @param __HANDLE__ specifies the I2C Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_I2C_GENERATE_NACK(__HANDLE__) (SET_BIT((__HANDLE__)->Instance->CR2, I2C_CR2_NACK))
|
||||
|
@ -527,7 +525,7 @@ typedef struct __I2C_HandleTypeDef
|
|||
*/
|
||||
/* Initialization and de-initialization functions******************************/
|
||||
HAL_StatusTypeDef HAL_I2C_Init(I2C_HandleTypeDef *hi2c);
|
||||
HAL_StatusTypeDef HAL_I2C_DeInit (I2C_HandleTypeDef *hi2c);
|
||||
HAL_StatusTypeDef HAL_I2C_DeInit(I2C_HandleTypeDef *hi2c);
|
||||
void HAL_I2C_MspInit(I2C_HandleTypeDef *hi2c);
|
||||
void HAL_I2C_MspDeInit(I2C_HandleTypeDef *hi2c);
|
||||
/**
|
||||
|
@ -538,7 +536,7 @@ void HAL_I2C_MspDeInit(I2C_HandleTypeDef *hi2c);
|
|||
* @{
|
||||
*/
|
||||
/* IO operation functions ****************************************************/
|
||||
/******* Blocking mode: Polling */
|
||||
/******* Blocking mode: Polling */
|
||||
HAL_StatusTypeDef HAL_I2C_Master_Transmit(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t Timeout);
|
||||
HAL_StatusTypeDef HAL_I2C_Master_Receive(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size, uint32_t Timeout);
|
||||
HAL_StatusTypeDef HAL_I2C_Slave_Transmit(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, uint32_t Timeout);
|
||||
|
@ -547,7 +545,7 @@ HAL_StatusTypeDef HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t DevAddress
|
|||
HAL_StatusTypeDef HAL_I2C_Mem_Read(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout);
|
||||
HAL_StatusTypeDef HAL_I2C_IsDeviceReady(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint32_t Trials, uint32_t Timeout);
|
||||
|
||||
/******* Non-Blocking mode: Interrupt */
|
||||
/******* Non-Blocking mode: Interrupt */
|
||||
HAL_StatusTypeDef HAL_I2C_Master_Transmit_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size);
|
||||
HAL_StatusTypeDef HAL_I2C_Master_Receive_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size);
|
||||
HAL_StatusTypeDef HAL_I2C_Slave_Transmit_IT(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size);
|
||||
|
@ -563,7 +561,7 @@ HAL_StatusTypeDef HAL_I2C_EnableListen_IT(I2C_HandleTypeDef *hi2c);
|
|||
HAL_StatusTypeDef HAL_I2C_DisableListen_IT(I2C_HandleTypeDef *hi2c);
|
||||
HAL_StatusTypeDef HAL_I2C_Master_Abort_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress);
|
||||
|
||||
/******* Non-Blocking mode: DMA */
|
||||
/******* Non-Blocking mode: DMA */
|
||||
HAL_StatusTypeDef HAL_I2C_Master_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size);
|
||||
HAL_StatusTypeDef HAL_I2C_Master_Receive_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint8_t *pData, uint16_t Size);
|
||||
HAL_StatusTypeDef HAL_I2C_Slave_Transmit_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size);
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_i2c_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of I2C HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -40,7 +38,7 @@
|
|||
#define __STM32F3xx_HAL_I2C_EX_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_i2s.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of I2S HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -324,21 +322,21 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Reset I2S handle state
|
||||
* @param __HANDLE__: I2S handle.
|
||||
* @param __HANDLE__ I2S handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_I2S_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_I2S_STATE_RESET)
|
||||
|
||||
/** @brief Enable or disable the specified SPI peripheral (in I2S mode).
|
||||
* @param __HANDLE__: specifies the I2S Handle.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_I2S_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->I2SCFGR |= SPI_I2SCFGR_I2SE)
|
||||
#define __HAL_I2S_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->I2SCFGR &= (uint16_t)(~SPI_I2SCFGR_I2SE))
|
||||
|
||||
/** @brief Enable or disable the specified I2S interrupts.
|
||||
* @param __HANDLE__: specifies the I2S Handle.
|
||||
* @param __INTERRUPT__: specifies the interrupt source to enable or disable.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* @param __INTERRUPT__ specifies the interrupt source to enable or disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg I2S_IT_TXE: Tx buffer empty interrupt enable
|
||||
* @arg I2S_IT_RXNE: RX buffer not empty interrupt enable
|
||||
|
@ -349,9 +347,9 @@ typedef struct
|
|||
#define __HAL_I2S_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR2 &= (uint16_t)(~(__INTERRUPT__)))
|
||||
|
||||
/** @brief Checks if the specified I2S interrupt source is enabled or disabled.
|
||||
* @param __HANDLE__: specifies the I2S Handle.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* This parameter can be I2S where x: 1, 2, or 3 to select the I2S peripheral.
|
||||
* @param __INTERRUPT__: specifies the I2S interrupt source to check.
|
||||
* @param __INTERRUPT__ specifies the I2S interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg I2S_IT_TXE: Tx buffer empty interrupt enable
|
||||
* @arg I2S_IT_RXNE: RX buffer not empty interrupt enable
|
||||
|
@ -361,8 +359,8 @@ typedef struct
|
|||
#define __HAL_I2S_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
|
||||
|
||||
/** @brief Checks whether the specified I2S flag is set or not.
|
||||
* @param __HANDLE__: specifies the I2S Handle.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg I2S_FLAG_RXNE: Receive buffer not empty flag
|
||||
* @arg I2S_FLAG_TXE: Transmit buffer empty flag
|
||||
|
@ -376,7 +374,7 @@ typedef struct
|
|||
#define __HAL_I2S_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
|
||||
|
||||
/** @brief Clears the I2S OVR pending flag.
|
||||
* @param __HANDLE__: specifies the I2S Handle.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_I2S_CLEAR_OVRFLAG(__HANDLE__) do{ \
|
||||
|
@ -386,7 +384,7 @@ typedef struct
|
|||
UNUSED(tmpreg); \
|
||||
}while(0U)
|
||||
/** @brief Clears the I2S UDR pending flag.
|
||||
* @param __HANDLE__: specifies the I2S Handle.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_I2S_CLEAR_UDRFLAG(__HANDLE__) do{\
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_i2s_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of I2S HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -69,15 +67,15 @@
|
|||
#define I2SxEXT(__INSTANCE__) ((__INSTANCE__) == (SPI2)? (SPI_TypeDef *)(I2S2ext_BASE): (SPI_TypeDef *)(I2S3ext_BASE))
|
||||
|
||||
/** @brief Enable or disable the specified I2SExt peripheral.
|
||||
* @param __HANDLE__: specifies the I2S Handle.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_I2SEXT_ENABLE(__HANDLE__) (I2SxEXT((__HANDLE__)->Instance)->I2SCFGR |= SPI_I2SCFGR_I2SE)
|
||||
#define __HAL_I2SEXT_DISABLE(__HANDLE__) (I2SxEXT((__HANDLE__)->Instance)->I2SCFGR &= ~SPI_I2SCFGR_I2SE)
|
||||
|
||||
/** @brief Enable or disable the specified I2SExt interrupts.
|
||||
* @param __HANDLE__: specifies the I2S Handle.
|
||||
* @param __INTERRUPT__: specifies the interrupt source to enable or disable.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* @param __INTERRUPT__ specifies the interrupt source to enable or disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg I2S_IT_TXE: Tx buffer empty interrupt enable
|
||||
* @arg I2S_IT_RXNE: RX buffer not empty interrupt enable
|
||||
|
@ -88,9 +86,9 @@
|
|||
#define __HAL_I2SEXT_DISABLE_IT(__HANDLE__, __INTERRUPT__) (I2SxEXT((__HANDLE__)->Instance)->CR2 &= ~(__INTERRUPT__))
|
||||
|
||||
/** @brief Checks if the specified I2SExt interrupt source is enabled or disabled.
|
||||
* @param __HANDLE__: specifies the I2S Handle.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* This parameter can be I2S where x: 1, 2, or 3 to select the I2S peripheral.
|
||||
* @param __INTERRUPT__: specifies the I2S interrupt source to check.
|
||||
* @param __INTERRUPT__ specifies the I2S interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg I2S_IT_TXE: Tx buffer empty interrupt enable
|
||||
* @arg I2S_IT_RXNE: RX buffer not empty interrupt enable
|
||||
|
@ -100,8 +98,8 @@
|
|||
#define __HAL_I2SEXT_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((I2SxEXT((__HANDLE__)->Instance)->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
|
||||
|
||||
/** @brief Checks whether the specified I2SExt flag is set or not.
|
||||
* @param __HANDLE__: specifies the I2S Handle.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg I2S_FLAG_RXNE: Receive buffer not empty flag
|
||||
* @arg I2S_FLAG_TXE: Transmit buffer empty flag
|
||||
|
@ -115,13 +113,13 @@
|
|||
#define __HAL_I2SEXT_GET_FLAG(__HANDLE__, __FLAG__) (((I2SxEXT((__HANDLE__)->Instance)->SR) & (__FLAG__)) == (__FLAG__))
|
||||
|
||||
/** @brief Clears the I2SExt OVR pending flag.
|
||||
* @param __HANDLE__: specifies the I2S Handle.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_I2SEXT_CLEAR_OVRFLAG(__HANDLE__) do{(I2SxEXT((__HANDLE__)->Instance)->DR;\
|
||||
(I2SxEXT((__HANDLE__)->Instance)->SR;}while(0U)
|
||||
/** @brief Clears the I2SExt UDR pending flag.
|
||||
* @param __HANDLE__: specifies the I2S Handle.
|
||||
* @param __HANDLE__ specifies the I2S Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_I2SEXT_CLEAR_UDRFLAG(__HANDLE__)(I2SxEXT((__HANDLE__)->Instance)->SR)
|
||||
|
@ -176,6 +174,8 @@ HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_DMA(I2S_HandleTypeDef *hi2s, uint16_
|
|||
/* I2S IRQHandler and Callbacks used in non blocking modes (Interrupt and DMA) */
|
||||
void HAL_I2S_FullDuplex_IRQHandler(I2S_HandleTypeDef *hi2s);
|
||||
void HAL_I2S_TxRxCpltCallback(I2S_HandleTypeDef *hi2s);
|
||||
/* Callback used in non blocking modes (DMA only) */
|
||||
void HAL_I2S_TxRxHalfCpltCallback(I2S_HandleTypeDef *hi2s);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_irda.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief This file contains all the functions prototypes for the IRDA
|
||||
* firmware library.
|
||||
******************************************************************************
|
||||
|
@ -400,7 +398,7 @@ typedef enum
|
|||
*/
|
||||
|
||||
/** @brief Reset IRDA handle state.
|
||||
* @param __HANDLE__: IRDA handle.
|
||||
* @param __HANDLE__ IRDA handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_IRDA_RESET_HANDLE_STATE(__HANDLE__) do{ \
|
||||
|
@ -409,7 +407,7 @@ typedef enum
|
|||
} while(0U)
|
||||
|
||||
/** @brief Flush the IRDA DR register.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_IRDA_FLUSH_DRREGISTER(__HANDLE__) \
|
||||
|
@ -419,8 +417,8 @@ typedef enum
|
|||
} while(0U)
|
||||
|
||||
/** @brief Clear the specified IRDA pending flag.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg @ref IRDA_CLEAR_PEF
|
||||
* @arg @ref IRDA_CLEAR_FEF
|
||||
|
@ -433,39 +431,39 @@ typedef enum
|
|||
#define __HAL_IRDA_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
|
||||
|
||||
/** @brief Clear the IRDA PE pending flag.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_IRDA_CLEAR_PEFLAG(__HANDLE__) __HAL_IRDA_CLEAR_FLAG((__HANDLE__), IRDA_CLEAR_PEF)
|
||||
|
||||
|
||||
/** @brief Clear the IRDA FE pending flag.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_IRDA_CLEAR_FEFLAG(__HANDLE__) __HAL_IRDA_CLEAR_FLAG((__HANDLE__), IRDA_CLEAR_FEF)
|
||||
|
||||
/** @brief Clear the IRDA NE pending flag.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_IRDA_CLEAR_NEFLAG(__HANDLE__) __HAL_IRDA_CLEAR_FLAG((__HANDLE__), IRDA_CLEAR_NEF)
|
||||
|
||||
/** @brief Clear the IRDA ORE pending flag.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_IRDA_CLEAR_OREFLAG(__HANDLE__) __HAL_IRDA_CLEAR_FLAG((__HANDLE__), IRDA_CLEAR_OREF)
|
||||
|
||||
/** @brief Clear the IRDA IDLE pending flag.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_IRDA_CLEAR_IDLEFLAG(__HANDLE__) __HAL_IRDA_CLEAR_FLAG((__HANDLE__), IRDA_CLEAR_IDLEF)
|
||||
|
||||
/** @brief Check whether the specified IRDA flag is set or not.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref IRDA_FLAG_REACK Receive enable acknowledge flag
|
||||
* @arg @ref IRDA_FLAG_TEACK Transmit enable acknowledge flag
|
||||
|
@ -485,8 +483,8 @@ typedef enum
|
|||
|
||||
|
||||
/** @brief Enable the specified IRDA interrupt.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __INTERRUPT__: specifies the IRDA interrupt source to enable.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @param __INTERRUPT__ specifies the IRDA interrupt source to enable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref IRDA_IT_TXE Transmit Data Register empty interrupt
|
||||
* @arg @ref IRDA_IT_TC Transmission complete interrupt
|
||||
|
@ -501,8 +499,8 @@ typedef enum
|
|||
((__HANDLE__)->Instance->CR3 |= (1U << ((__INTERRUPT__) & IRDA_IT_MASK))))
|
||||
|
||||
/** @brief Disable the specified IRDA interrupt.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __INTERRUPT__: specifies the IRDA interrupt source to disable.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @param __INTERRUPT__ specifies the IRDA interrupt source to disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref IRDA_IT_TXE Transmit Data Register empty interrupt
|
||||
* @arg @ref IRDA_IT_TC Transmission complete interrupt
|
||||
|
@ -518,8 +516,8 @@ typedef enum
|
|||
|
||||
|
||||
/** @brief Check whether the specified IRDA interrupt has occurred or not.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __IT__: specifies the IRDA interrupt source to check.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @param __IT__ specifies the IRDA interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref IRDA_IT_TXE Transmit Data Register empty interrupt
|
||||
* @arg @ref IRDA_IT_TC Transmission complete interrupt
|
||||
|
@ -534,8 +532,8 @@ typedef enum
|
|||
#define __HAL_IRDA_GET_IT(__HANDLE__, __IT__) ((__HANDLE__)->Instance->ISR & (1U << ((__IT__)>> 0x08U)))
|
||||
|
||||
/** @brief Check whether the specified IRDA interrupt source is enabled or not.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __IT__: specifies the IRDA interrupt source to check.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @param __IT__ specifies the IRDA interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref IRDA_IT_TXE Transmit Data Register empty interrupt
|
||||
* @arg @ref IRDA_IT_TC Transmission complete interrupt
|
||||
|
@ -550,8 +548,8 @@ typedef enum
|
|||
|
||||
|
||||
/** @brief Clear the specified IRDA ISR flag, in setting the proper ICR register flag.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __IT_CLEAR__: specifies the interrupt clear register flag that needs to be set
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @param __IT_CLEAR__ specifies the interrupt clear register flag that needs to be set
|
||||
* to clear the corresponding interrupt
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref IRDA_CLEAR_PEF Parity Error Clear Flag
|
||||
|
@ -565,8 +563,8 @@ typedef enum
|
|||
|
||||
|
||||
/** @brief Set a specific IRDA request flag.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __REQ__: specifies the request flag to set
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @param __REQ__ specifies the request flag to set
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref IRDA_AUTOBAUD_REQUEST Auto-Baud Rate Request
|
||||
* @arg @ref IRDA_RXDATA_FLUSH_REQUEST Receive Data flush Request
|
||||
|
@ -577,25 +575,25 @@ typedef enum
|
|||
#define __HAL_IRDA_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (uint16_t)(__REQ__))
|
||||
|
||||
/** @brief Enable the IRDA one bit sample method.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_IRDA_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
|
||||
|
||||
/** @brief Disable the IRDA one bit sample method.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_IRDA_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3 &= (uint32_t)~((uint32_t)USART_CR3_ONEBIT))
|
||||
|
||||
/** @brief Enable UART/USART associated to IRDA Handle.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_IRDA_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)
|
||||
|
||||
/** @brief Disable UART/USART associated to IRDA Handle.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_IRDA_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
|
||||
|
@ -610,20 +608,20 @@ typedef enum
|
|||
*/
|
||||
|
||||
/** @brief Ensure that IRDA Baud rate is less or equal to maximum value.
|
||||
* @param __BAUDRATE__: specifies the IRDA Baudrate set by the user.
|
||||
* @param __BAUDRATE__ specifies the IRDA Baudrate set by the user.
|
||||
* @retval True or False
|
||||
*/
|
||||
#define IS_IRDA_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) < 115201U)
|
||||
|
||||
/** @brief Ensure that IRDA prescaler value is strictly larger than 0.
|
||||
* @param __PRESCALER__: specifies the IRDA prescaler value set by the user.
|
||||
* @param __PRESCALER__ specifies the IRDA prescaler value set by the user.
|
||||
* @retval True or False
|
||||
*/
|
||||
#define IS_IRDA_PRESCALER(__PRESCALER__) ((__PRESCALER__) > 0U)
|
||||
|
||||
/**
|
||||
* @brief Ensure that IRDA frame parity is valid.
|
||||
* @param __PARITY__: IRDA frame parity.
|
||||
* @param __PARITY__ IRDA frame parity.
|
||||
* @retval SET (__PARITY__ is valid) or RESET (__PARITY__ is invalid)
|
||||
*/
|
||||
#define IS_IRDA_PARITY(__PARITY__) (((__PARITY__) == IRDA_PARITY_NONE) || \
|
||||
|
@ -632,14 +630,14 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that IRDA communication mode is valid.
|
||||
* @param __MODE__: IRDA communication mode.
|
||||
* @param __MODE__ IRDA communication mode.
|
||||
* @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
|
||||
*/
|
||||
#define IS_IRDA_TX_RX_MODE(__MODE__) ((((__MODE__) & (~((uint32_t)(IRDA_MODE_TX_RX)))) == 0x00U) && ((__MODE__) != 0x00U))
|
||||
|
||||
/**
|
||||
* @brief Ensure that IRDA power mode is valid.
|
||||
* @param __MODE__: IRDA power mode.
|
||||
* @param __MODE__ IRDA power mode.
|
||||
* @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
|
||||
*/
|
||||
#define IS_IRDA_POWERMODE(__MODE__) (((__MODE__) == IRDA_POWERMODE_LOWPOWER) || \
|
||||
|
@ -647,7 +645,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that IRDA state is valid.
|
||||
* @param __STATE__: IRDA state mode.
|
||||
* @param __STATE__ IRDA state mode.
|
||||
* @retval SET (__STATE__ is valid) or RESET (__STATE__ is invalid)
|
||||
*/
|
||||
#define IS_IRDA_STATE(__STATE__) (((__STATE__) == IRDA_STATE_DISABLE) || \
|
||||
|
@ -655,7 +653,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that IRDA associated UART/USART mode is valid.
|
||||
* @param __MODE__: IRDA associated UART/USART mode.
|
||||
* @param __MODE__ IRDA associated UART/USART mode.
|
||||
* @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
|
||||
*/
|
||||
#define IS_IRDA_MODE(__MODE__) (((__MODE__) == IRDA_MODE_DISABLE) || \
|
||||
|
@ -663,7 +661,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that IRDA sampling rate is valid.
|
||||
* @param __ONEBIT__: IRDA sampling rate.
|
||||
* @param __ONEBIT__ IRDA sampling rate.
|
||||
* @retval SET (__ONEBIT__ is valid) or RESET (__ONEBIT__ is invalid)
|
||||
*/
|
||||
#define IS_IRDA_ONE_BIT_SAMPLE(__ONEBIT__) (((__ONEBIT__) == IRDA_ONE_BIT_SAMPLE_DISABLE) || \
|
||||
|
@ -671,7 +669,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that IRDA DMA TX mode is valid.
|
||||
* @param __DMATX__: IRDA DMA TX mode.
|
||||
* @param __DMATX__ IRDA DMA TX mode.
|
||||
* @retval SET (__DMATX__ is valid) or RESET (__DMATX__ is invalid)
|
||||
*/
|
||||
#define IS_IRDA_DMA_TX(__DMATX__) (((__DMATX__) == IRDA_DMA_TX_DISABLE) || \
|
||||
|
@ -679,7 +677,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that IRDA DMA RX mode is valid.
|
||||
* @param __DMARX__: IRDA DMA RX mode.
|
||||
* @param __DMARX__ IRDA DMA RX mode.
|
||||
* @retval SET (__DMARX__ is valid) or RESET (__DMARX__ is invalid)
|
||||
*/
|
||||
#define IS_IRDA_DMA_RX(__DMARX__) (((__DMARX__) == IRDA_DMA_RX_DISABLE) || \
|
||||
|
@ -687,7 +685,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that IRDA request is valid.
|
||||
* @param __PARAM__: IRDA request.
|
||||
* @param __PARAM__ IRDA request.
|
||||
* @retval SET (__PARAM__ is valid) or RESET (__PARAM__ is invalid)
|
||||
*/
|
||||
#define IS_IRDA_REQUEST_PARAMETER(__PARAM__) (((__PARAM__) == IRDA_AUTOBAUD_REQUEST) || \
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_irda_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of IRDA HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -93,8 +91,8 @@
|
|||
*/
|
||||
|
||||
/** @brief Report the IRDA clock source.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __CLOCKSOURCE__: output variable.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @param __CLOCKSOURCE__ output variable.
|
||||
* @retval IRDA clocking source, written in __CLOCKSOURCE__.
|
||||
*/
|
||||
#if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -330,7 +328,7 @@
|
|||
* by the reception API().
|
||||
* This masking operation is not carried out in the case of
|
||||
* DMA transfers.
|
||||
* @param __HANDLE__: specifies the IRDA Handle.
|
||||
* @param __HANDLE__ specifies the IRDA Handle.
|
||||
* @retval None, the mask to apply to the associated UART RDR register is stored in (__HANDLE__)->Mask field.
|
||||
*/
|
||||
#if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -403,7 +401,7 @@
|
|||
/* STM32F334x8 */
|
||||
/**
|
||||
* @brief Ensure that IRDA frame length is valid.
|
||||
* @param __LENGTH__: IRDA frame length.
|
||||
* @param __LENGTH__ IRDA frame length.
|
||||
* @retval SET (__LENGTH__ is valid) or RESET (__LENGTH__ is invalid)
|
||||
*/
|
||||
#if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -439,3 +437,4 @@
|
|||
#endif /* __STM32F3xx_HAL_IRDA_EX_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_iwdg.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of IWDG HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_nand.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of NAND HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -55,70 +53,6 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup NAND_Private_Constants
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define NAND_DEVICE1 FMC_BANK2
|
||||
#define NAND_DEVICE2 FMC_BANK3
|
||||
#define NAND_WRITE_TIMEOUT (1000U)
|
||||
|
||||
#define CMD_AREA ((uint32_t)(1U<<16U)) /* A16U = CLE high */
|
||||
#define ADDR_AREA ((uint32_t)(1U<<17U)) /* A17U = ALE high */
|
||||
|
||||
#define NAND_CMD_AREA_A ((uint8_t)0x00U)
|
||||
#define NAND_CMD_AREA_B ((uint8_t)0x01U)
|
||||
#define NAND_CMD_AREA_C ((uint8_t)0x50U)
|
||||
#define NAND_CMD_AREA_TRUE1 ((uint8_t)0x30U)
|
||||
|
||||
#define NAND_CMD_WRITE0 ((uint8_t)0x80U)
|
||||
#define NAND_CMD_WRITE_TRUE1 ((uint8_t)0x10U)
|
||||
#define NAND_CMD_ERASE0 ((uint8_t)0x60U)
|
||||
#define NAND_CMD_ERASE1 ((uint8_t)0xD0U)
|
||||
#define NAND_CMD_READID ((uint8_t)0x90U)
|
||||
#define NAND_CMD_STATUS ((uint8_t)0x70U)
|
||||
#define NAND_CMD_LOCK_STATUS ((uint8_t)0x7AU)
|
||||
#define NAND_CMD_RESET ((uint8_t)0xFFU)
|
||||
|
||||
/* NAND memory status */
|
||||
#define NAND_VALID_ADDRESS (0x00000100U)
|
||||
#define NAND_INVALID_ADDRESS (0x00000200U)
|
||||
#define NAND_TIMEOUT_ERROR (0x00000400U)
|
||||
#define NAND_BUSY (0x00000000U)
|
||||
#define NAND_ERROR (0x00000001U)
|
||||
#define NAND_READY (0x00000040U)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @addtogroup NAND_Private_Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief NAND memory address computation.
|
||||
* @param __ADDRESS__: NAND memory address.
|
||||
* @param __HANDLE__ : NAND handle.
|
||||
* @retval NAND Raw address value
|
||||
*/
|
||||
#define ARRAY_ADDRESS(__ADDRESS__ , __HANDLE__) (((__ADDRESS__)->Page) + \
|
||||
(((__ADDRESS__)->Block + (((__ADDRESS__)->Zone) * ((__HANDLE__)->Info.ZoneSize)))* ((__HANDLE__)->Info.BlockSize * ((__HANDLE__)->Info.PageSize + (__HANDLE__)->Info.SpareAreaSize))))
|
||||
|
||||
/**
|
||||
* @brief NAND memory address cycling.
|
||||
* @param __ADDRESS__: NAND memory address.
|
||||
* @retval NAND address cycling value.
|
||||
*/
|
||||
#define ADDR_1ST_CYCLE(__ADDRESS__) (uint8_t)(__ADDRESS__) /* 1st addressing cycle */
|
||||
#define ADDR_2ND_CYCLE(__ADDRESS__) (uint8_t)((__ADDRESS__) >> 8U) /* 2nd addressing cycle */
|
||||
#define ADDR_3RD_CYCLE(__ADDRESS__) (uint8_t)((__ADDRESS__) >> 16U) /* 3rd addressing cycle */
|
||||
#define ADDR_4TH_CYCLE(__ADDRESS__) (uint8_t)((__ADDRESS__) >> 24U) /* 4th addressing cycle */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Exported typedef ----------------------------------------------------------*/
|
||||
/* Exported types ------------------------------------------------------------*/
|
||||
/** @defgroup NAND_Exported_Types NAND Exported Types
|
||||
|
@ -133,7 +67,7 @@ typedef enum
|
|||
HAL_NAND_STATE_RESET = 0x00U, /*!< NAND not yet initialized or disabled */
|
||||
HAL_NAND_STATE_READY = 0x01U, /*!< NAND initialized and ready for use */
|
||||
HAL_NAND_STATE_BUSY = 0x02U, /*!< NAND internal process is ongoing */
|
||||
HAL_NAND_STATE_ERROR = 0x03 /*!< NAND error state */
|
||||
HAL_NAND_STATE_ERROR = 0x03U /*!< NAND error state */
|
||||
}HAL_NAND_StateTypeDef;
|
||||
|
||||
/**
|
||||
|
@ -157,11 +91,11 @@ typedef struct
|
|||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint16_t Page; /*!< NAND memory Page address */
|
||||
uint16_t Page; /*!< NAND memory Page address */
|
||||
|
||||
uint16_t Zone; /*!< NAND memory Zone address */
|
||||
uint16_t Plane; /*!< NAND memory Plane address */
|
||||
|
||||
uint16_t Block; /*!< NAND memory Block address */
|
||||
uint16_t Block; /*!< NAND memory Block address */
|
||||
|
||||
}NAND_AddressTypeDef;
|
||||
|
||||
|
@ -170,45 +104,56 @@ typedef struct
|
|||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t PageSize; /*!< NAND memory page (without spare area) size measured in K. bytes */
|
||||
uint32_t PageSize; /*!< NAND memory page (without spare area) size measured in bytes
|
||||
for 8 bits adressing or words for 16 bits addressing */
|
||||
|
||||
uint32_t SpareAreaSize; /*!< NAND memory spare area size measured in K. bytes */
|
||||
uint32_t SpareAreaSize; /*!< NAND memory spare area size measured in bytes
|
||||
for 8 bits adressing or words for 16 bits addressing */
|
||||
|
||||
uint32_t BlockSize; /*!< NAND memory block size number of pages */
|
||||
uint32_t BlockSize; /*!< NAND memory block size measured in number of pages */
|
||||
|
||||
uint32_t BlockNbr; /*!< NAND memory number of blocks */
|
||||
uint32_t BlockNbr; /*!< NAND memory number of total blocks */
|
||||
|
||||
uint32_t ZoneSize; /*!< NAND memory zone size measured in number of blocks */
|
||||
}NAND_InfoTypeDef;
|
||||
uint32_t PlaneNbr; /*!< NAND memory number of planes */
|
||||
|
||||
uint32_t PlaneSize; /*!< NAND memory plane size measured in number of blocks */
|
||||
|
||||
FunctionalState ExtraCommandEnable; /*!< NAND extra command needed for Page reading mode. This
|
||||
parameter is mandatory for some NAND parts after the read
|
||||
command (NAND_CMD_AREA_TRUE1) and before DATA reading sequence.
|
||||
Example: Toshiba THTH58BYG3S0HBAI6.
|
||||
This parameter could be ENABLE or DISABLE
|
||||
Please check the Read Mode sequnece in the NAND device datasheet */
|
||||
}NAND_DeviceConfigTypeDef;
|
||||
|
||||
/**
|
||||
* @brief NAND handle Structure definition
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
FMC_NAND_TypeDef *Instance; /*!< Register base address */
|
||||
FMC_NAND_TypeDef *Instance; /*!< Register base address */
|
||||
|
||||
FMC_NAND_InitTypeDef Init; /*!< NAND device control configuration parameters */
|
||||
FMC_NAND_InitTypeDef Init; /*!< NAND device control configuration parameters */
|
||||
|
||||
HAL_LockTypeDef Lock; /*!< NAND locking object */
|
||||
HAL_LockTypeDef Lock; /*!< NAND locking object */
|
||||
|
||||
__IO HAL_NAND_StateTypeDef State; /*!< NAND device access state */
|
||||
__IO HAL_NAND_StateTypeDef State; /*!< NAND device access state */
|
||||
|
||||
NAND_DeviceConfigTypeDef Config; /*!< NAND phusical characteristic information structure */
|
||||
|
||||
NAND_InfoTypeDef Info; /*!< NAND characteristic information structure */
|
||||
}NAND_HandleTypeDef;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Exported constants --------------------------------------------------------*/
|
||||
/* Exported macro ------------------------------------------------------------*/
|
||||
/* Exported macros ------------------------------------------------------------*/
|
||||
/** @defgroup NAND_Exported_Macros NAND Exported Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @brief Reset NAND handle state
|
||||
* @param __HANDLE__: specifies the NAND handle.
|
||||
* @param __HANDLE__ specifies the NAND handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_NAND_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_NAND_STATE_RESET)
|
||||
|
@ -226,13 +171,19 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
|
||||
/* Initialization/de-initialization functions ********************************/
|
||||
/* Initialization/de-initialization functions ********************************/
|
||||
HAL_StatusTypeDef HAL_NAND_Init(NAND_HandleTypeDef *hnand, FMC_NAND_PCC_TimingTypeDef *ComSpace_Timing, FMC_NAND_PCC_TimingTypeDef *AttSpace_Timing);
|
||||
HAL_StatusTypeDef HAL_NAND_DeInit(NAND_HandleTypeDef *hnand);
|
||||
void HAL_NAND_MspInit(NAND_HandleTypeDef *hnand);
|
||||
void HAL_NAND_MspDeInit(NAND_HandleTypeDef *hnand);
|
||||
|
||||
HAL_StatusTypeDef HAL_NAND_ConfigDevice(NAND_HandleTypeDef *hnand, NAND_DeviceConfigTypeDef *pDeviceConfig);
|
||||
|
||||
HAL_StatusTypeDef HAL_NAND_Read_ID(NAND_HandleTypeDef *hnand, NAND_IDTypeDef *pNAND_ID);
|
||||
|
||||
void HAL_NAND_MspInit(NAND_HandleTypeDef *hnand);
|
||||
void HAL_NAND_MspDeInit(NAND_HandleTypeDef *hnand);
|
||||
void HAL_NAND_IRQHandler(NAND_HandleTypeDef *hnand);
|
||||
void HAL_NAND_ITCallback(NAND_HandleTypeDef *hnand);
|
||||
void HAL_NAND_ITCallback(NAND_HandleTypeDef *hnand);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
@ -243,13 +194,20 @@ void HAL_NAND_ITCallback(NAND_HandleTypeDef *hnand);
|
|||
*/
|
||||
|
||||
/* IO operation functions ****************************************************/
|
||||
HAL_StatusTypeDef HAL_NAND_Read_ID(NAND_HandleTypeDef *hnand, NAND_IDTypeDef *pNAND_ID);
|
||||
HAL_StatusTypeDef HAL_NAND_Reset(NAND_HandleTypeDef *hnand);
|
||||
HAL_StatusTypeDef HAL_NAND_Read_Page(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer, uint32_t NumPageToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_Page(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer, uint32_t NumPageToWrite);
|
||||
HAL_StatusTypeDef HAL_NAND_Read_SpareArea(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer, uint32_t NumSpareAreaToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_SpareArea(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer, uint32_t NumSpareAreaTowrite);
|
||||
|
||||
HAL_StatusTypeDef HAL_NAND_Read_Page_8b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer, uint32_t NumPageToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_Page_8b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer, uint32_t NumPageToWrite);
|
||||
HAL_StatusTypeDef HAL_NAND_Read_SpareArea_8b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer, uint32_t NumSpareAreaToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_SpareArea_8b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint8_t *pBuffer, uint32_t NumSpareAreaTowrite);
|
||||
|
||||
HAL_StatusTypeDef HAL_NAND_Read_Page_16b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint16_t *pBuffer, uint32_t NumPageToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_Page_16b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint16_t *pBuffer, uint32_t NumPageToWrite);
|
||||
HAL_StatusTypeDef HAL_NAND_Read_SpareArea_16b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint16_t *pBuffer, uint32_t NumSpareAreaToRead);
|
||||
HAL_StatusTypeDef HAL_NAND_Write_SpareArea_16b(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress, uint16_t *pBuffer, uint32_t NumSpareAreaTowrite);
|
||||
|
||||
HAL_StatusTypeDef HAL_NAND_Erase_Block(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress);
|
||||
|
||||
uint32_t HAL_NAND_Read_Status(NAND_HandleTypeDef *hnand);
|
||||
uint32_t HAL_NAND_Address_Inc(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress);
|
||||
|
||||
|
@ -273,11 +231,8 @@ HAL_StatusTypeDef HAL_NAND_GetECC(NAND_HandleTypeDef *hnand, uint32_t *ECCval,
|
|||
/** @addtogroup NAND_Exported_Functions_Group4 Peripheral State functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* NAND State functions *******************************************************/
|
||||
HAL_NAND_StateTypeDef HAL_NAND_GetState(NAND_HandleTypeDef *hnand);
|
||||
uint32_t HAL_NAND_Read_Status(NAND_HandleTypeDef *hnand);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -286,6 +241,90 @@ uint32_t HAL_NAND_Read_Status(NAND_HandleTypeDef *hnand);
|
|||
* @}
|
||||
*/
|
||||
|
||||
/* Private types -------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
/* Private constants ---------------------------------------------------------*/
|
||||
/** @defgroup NAND_Private_Constants NAND Private Constants
|
||||
* @{
|
||||
*/
|
||||
#define NAND_DEVICE1 FMC_BANK2
|
||||
#define NAND_DEVICE2 FMC_BANK3
|
||||
#define NAND_WRITE_TIMEOUT 0x01000000U
|
||||
|
||||
#define CMD_AREA ((uint32_t)(1U<<16U)) /* A16 = CLE high */
|
||||
#define ADDR_AREA ((uint32_t)(1U<<17U)) /* A17 = ALE high */
|
||||
|
||||
#define NAND_CMD_AREA_A ((uint8_t)0x00)
|
||||
#define NAND_CMD_AREA_B ((uint8_t)0x01)
|
||||
#define NAND_CMD_AREA_C ((uint8_t)0x50)
|
||||
#define NAND_CMD_AREA_TRUE1 ((uint8_t)0x30)
|
||||
|
||||
#define NAND_CMD_WRITE0 ((uint8_t)0x80)
|
||||
#define NAND_CMD_WRITE_TRUE1 ((uint8_t)0x10)
|
||||
#define NAND_CMD_ERASE0 ((uint8_t)0x60)
|
||||
#define NAND_CMD_ERASE1 ((uint8_t)0xD0)
|
||||
#define NAND_CMD_READID ((uint8_t)0x90)
|
||||
#define NAND_CMD_STATUS ((uint8_t)0x70)
|
||||
#define NAND_CMD_LOCK_STATUS ((uint8_t)0x7A)
|
||||
#define NAND_CMD_RESET ((uint8_t)0xFF)
|
||||
|
||||
/* NAND memory status */
|
||||
#define NAND_VALID_ADDRESS 0x00000100U
|
||||
#define NAND_INVALID_ADDRESS 0x00000200U
|
||||
#define NAND_TIMEOUT_ERROR 0x00000400U
|
||||
#define NAND_BUSY 0x00000000U
|
||||
#define NAND_ERROR 0x00000001U
|
||||
#define NAND_READY 0x00000040U
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Private macros ------------------------------------------------------------*/
|
||||
/** @defgroup NAND_Private_Macros NAND Private Macros
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief NAND memory address computation.
|
||||
* @param __ADDRESS__ NAND memory address.
|
||||
* @param __HANDLE__ NAND handle.
|
||||
* @retval NAND Raw address value
|
||||
*/
|
||||
#define ARRAY_ADDRESS(__ADDRESS__ , __HANDLE__) ((__ADDRESS__)->Page + \
|
||||
(((__ADDRESS__)->Block + (((__ADDRESS__)->Plane) * ((__HANDLE__)->Config.PlaneSize)))* ((__HANDLE__)->Config.BlockSize)))
|
||||
|
||||
/**
|
||||
* @brief NAND memory Column address computation.
|
||||
* @param __HANDLE__ NAND handle.
|
||||
* @retval NAND Raw address value
|
||||
*/
|
||||
#define COLUMN_ADDRESS( __HANDLE__) ((__HANDLE__)->Config.PageSize)
|
||||
|
||||
/**
|
||||
* @brief NAND memory address cycling.
|
||||
* @param __ADDRESS__ NAND memory address.
|
||||
* @retval NAND address cycling value.
|
||||
*/
|
||||
#define ADDR_1ST_CYCLE(__ADDRESS__) (uint8_t)(__ADDRESS__) /* 1st addressing cycle */
|
||||
#define ADDR_2ND_CYCLE(__ADDRESS__) (uint8_t)((__ADDRESS__) >> 8) /* 2nd addressing cycle */
|
||||
#define ADDR_3RD_CYCLE(__ADDRESS__) (uint8_t)((__ADDRESS__) >> 16) /* 3rd addressing cycle */
|
||||
#define ADDR_4TH_CYCLE(__ADDRESS__) (uint8_t)((__ADDRESS__) >> 24) /* 4th addressing cycle */
|
||||
|
||||
/**
|
||||
* @brief NAND memory Columns cycling.
|
||||
* @param __ADDRESS__ NAND memory address.
|
||||
* @retval NAND Column address cycling value.
|
||||
*/
|
||||
#define COLUMN_1ST_CYCLE(__ADDRESS__) (uint8_t)(__ADDRESS__) /* 1st Column addressing cycle */
|
||||
#define COLUMN_2ND_CYCLE(__ADDRESS__) (uint8_t)((__ADDRESS__) >> 8) /* 2nd Column addressing cycle */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_nor.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of NOR HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -92,9 +90,9 @@
|
|||
|
||||
/**
|
||||
* @brief NOR memory address shifting.
|
||||
* @param __NOR_ADDRESS: NOR base address
|
||||
* @param __NOR_MEMORY_WIDTH_: NOR memory width
|
||||
* @param __ADDRESS__: NOR memory address
|
||||
* @param __NOR_ADDRESS NOR base address
|
||||
* @param __NOR_MEMORY_WIDTH_ NOR memory width
|
||||
* @param __ADDRESS__ NOR memory address
|
||||
* @retval NOR shifted address value
|
||||
*/
|
||||
#define NOR_ADDR_SHIFT(__NOR_ADDRESS, __NOR_MEMORY_WIDTH_, __ADDRESS__) \
|
||||
|
@ -104,8 +102,8 @@
|
|||
|
||||
/**
|
||||
* @brief NOR memory write data to specified address.
|
||||
* @param __ADDRESS__: NOR memory address
|
||||
* @param __DATA__: Data to write
|
||||
* @param __ADDRESS__ NOR memory address
|
||||
* @param __DATA__ Data to write
|
||||
* @retval None
|
||||
*/
|
||||
#define NOR_WRITE(__ADDRESS__, __DATA__) (*(__IO uint16_t *)((uint32_t)(__ADDRESS__)) = (__DATA__))
|
||||
|
@ -203,7 +201,7 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Reset NOR handle state
|
||||
* @param __HANDLE__: NOR handle
|
||||
* @param __HANDLE__ NOR handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_NOR_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_NOR_STATE_RESET)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_opamp.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of OPAMP HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -308,10 +306,10 @@ typedef uint32_t OPAMP_TrimmingValueTypeDef;
|
|||
* @{
|
||||
*/
|
||||
|
||||
#define OPAMP_PGA_GAIN_2 (0x00000000U) /*!< PGA gain = 2U */
|
||||
#define OPAMP_PGA_GAIN_4 OPAMP_CSR_PGGAIN_0 /*!< PGA gain = 4U */
|
||||
#define OPAMP_PGA_GAIN_8 OPAMP_CSR_PGGAIN_1 /*!< PGA gain = 8U */
|
||||
#define OPAMP_PGA_GAIN_16 (OPAMP_CSR_PGGAIN_0 | OPAMP_CSR_PGGAIN_1) /*!< PGA gain = 16U */
|
||||
#define OPAMP_PGA_GAIN_2 (0x00000000U) /*!< PGA gain = 2 */
|
||||
#define OPAMP_PGA_GAIN_4 OPAMP_CSR_PGGAIN_0 /*!< PGA gain = 4 */
|
||||
#define OPAMP_PGA_GAIN_8 OPAMP_CSR_PGGAIN_1 /*!< PGA gain = 8 */
|
||||
#define OPAMP_PGA_GAIN_16 (OPAMP_CSR_PGGAIN_0 | OPAMP_CSR_PGGAIN_1) /*!< PGA gain = 16 */
|
||||
|
||||
#define IS_OPAMP_PGA_GAIN(GAIN) (((GAIN) == OPAMP_PGA_GAIN_2) || \
|
||||
((GAIN) == OPAMP_PGA_GAIN_4) || \
|
||||
|
@ -416,7 +414,7 @@ typedef uint32_t OPAMP_TrimmingValueTypeDef;
|
|||
*/
|
||||
|
||||
/** @brief Reset OPAMP handle state
|
||||
* @param __HANDLE__: OPAMP handle.
|
||||
* @param __HANDLE__ OPAMP handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_OPAMP_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_OPAMP_STATE_RESET)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_opamp_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of OPAMP HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_pccard.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of PCCARD HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -175,7 +173,7 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Reset PCCARD handle state
|
||||
* @param __HANDLE__: specifies the PCCARD handle.
|
||||
* @param __HANDLE__ specifies the PCCARD handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_PCCARD_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_PCCARD_STATE_RESET)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_pcd.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of PCD HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -226,7 +224,7 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#define __HAL_PCD_GET_FLAG(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->ISTR) & (__INTERRUPT__)) == (__INTERRUPT__))
|
||||
#define __HAL_PCD_CLEAR_FLAG(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->ISTR) &= (uint16_t)(~(__INTERRUPT__))))
|
||||
#define __HAL_PCD_CLEAR_FLAG(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->ISTR) = (uint16_t)(~(__INTERRUPT__))))
|
||||
|
||||
#define __HAL_USB_WAKEUP_EXTI_ENABLE_IT() EXTI->IMR |= USB_WAKEUP_EXTI_LINE
|
||||
#define __HAL_USB_WAKEUP_EXTI_DISABLE_IT() EXTI->IMR &= ~(USB_WAKEUP_EXTI_LINE)
|
||||
|
@ -413,9 +411,9 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief sets the type in the endpoint register(bits EP_TYPE[1:0])
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param wType: Endpoint Type.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @param wType Endpoint Type.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_SET_EPTYPE(USBx, bEpNum,wType) (PCD_SET_ENDPOINT((USBx), (bEpNum),\
|
||||
|
@ -423,8 +421,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief gets the type in the endpoint register(bits EP_TYPE[1:0])
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval Endpoint Type
|
||||
*/
|
||||
#define PCD_GET_EPTYPE(USBx, bEpNum) (((uint16_t)(PCD_GET_ENDPOINT((USBx), (bEpNum)))) & USB_EP_T_FIELD)
|
||||
|
@ -433,9 +431,9 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
/**
|
||||
* @brief free buffer used from the application realizing it to the line
|
||||
toggles bit SW_BUF in the double buffered endpoint register
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param bDir: Direction
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @param bDir Direction
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_FreeUserBuffer(USBx, bEpNum, bDir)\
|
||||
|
@ -469,9 +467,9 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief sets the status for tx transfer (bits STAT_TX[1:0]).
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param wState: new state
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @param wState new state
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_SET_EP_TX_STATUS(USBx, bEpNum, wState) { register uint16_t _wRegVal;\
|
||||
|
@ -492,9 +490,9 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief sets the status for rx transfer (bits STAT_TX[1:0])
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param wState: new state
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @param wState new state
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_SET_EP_RX_STATUS(USBx, bEpNum,wState) {\
|
||||
|
@ -516,10 +514,10 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief sets the status for rx & tx (bits STAT_TX[1:0] & STAT_RX[1:0])
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param wStaterx: new state.
|
||||
* @param wStatetx: new state.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @param wStaterx new state.
|
||||
* @param wStatetx new state.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_SET_EP_TXRX_STATUS(USBx,bEpNum,wStaterx,wStatetx) {\
|
||||
|
@ -552,8 +550,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
/**
|
||||
* @brief gets the status for tx/rx transfer (bits STAT_TX[1:0]
|
||||
* /STAT_RX[1:0])
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval status
|
||||
*/
|
||||
#define PCD_GET_EP_TX_STATUS(USBx, bEpNum) (((uint32_t)(PCD_GET_ENDPOINT((USBx), (bEpNum)))) & USB_EPTX_STAT)
|
||||
|
@ -561,8 +559,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief sets directly the VALID tx/rx-status into the endpoint register
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_SET_EP_TX_VALID(USBx, bEpNum) (PCD_SET_EP_TX_STATUS((USBx), (bEpNum), USB_EP_TX_VALID))
|
||||
|
@ -571,8 +569,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief checks stall condition in an endpoint.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval TRUE = endpoint in stall condition.
|
||||
*/
|
||||
#define PCD_GET_EP_TX_STALL_STATUS(USBx, bEpNum) (PCD_GET_EP_TX_STATUS((USBx), (bEpNum)) \
|
||||
|
@ -582,8 +580,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief set & clear EP_KIND bit.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_SET_EP_KIND(USBx, bEpNum) (PCD_SET_ENDPOINT((USBx), (bEpNum), \
|
||||
|
@ -593,8 +591,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Sets/clears directly STATUS_OUT bit in the endpoint register.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_SET_OUT_STATUS(USBx, bEpNum) PCD_SET_EP_KIND((USBx), (bEpNum))
|
||||
|
@ -602,8 +600,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Sets/clears directly EP_KIND bit in the endpoint register.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_SET_EP_DBUF(USBx, bEpNum) PCD_SET_EP_KIND((USBx), (bEpNum))
|
||||
|
@ -611,8 +609,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Clears bit CTR_RX / CTR_TX in the endpoint register.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_CLEAR_RX_EP_CTR(USBx, bEpNum) (PCD_SET_ENDPOINT((USBx), (bEpNum),\
|
||||
|
@ -622,8 +620,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Toggles DTOG_RX / DTOG_TX bit in the endpoint register.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_RX_DTOG(USBx, bEpNum) (PCD_SET_ENDPOINT((USBx), (bEpNum), \
|
||||
|
@ -633,8 +631,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Clears DTOG_RX / DTOG_TX bit in the endpoint register.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_CLEAR_RX_DTOG(USBx, bEpNum) if((((uint32_t)(PCD_GET_ENDPOINT((USBx), (bEpNum)))) & USB_EP_DTOG_RX) != 0)\
|
||||
|
@ -648,9 +646,9 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Sets address in an endpoint register.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param bAddr: Address.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @param bAddr Address.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_SET_EP_ADDRESS(USBx, bEpNum,bAddr) PCD_SET_ENDPOINT((USBx), (bEpNum),\
|
||||
|
@ -658,17 +656,17 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Gets address in an endpoint register.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_GET_EP_ADDRESS(USBx, bEpNum) ((uint8_t)(PCD_GET_ENDPOINT((USBx), (bEpNum)) & USB_EPADDR_FIELD))
|
||||
|
||||
/**
|
||||
* @brief sets address of the tx/rx buffer.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param wAddr: address to be set (must be word aligned).
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @param wAddr address to be set (must be word aligned).
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_SET_EP_TX_ADDRESS(USBx, bEpNum,wAddr) (*PCD_EP_TX_ADDRESS((USBx), (bEpNum)) = (((wAddr) >> 1U) << 1U))
|
||||
|
@ -676,8 +674,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Gets address of the tx/rx buffer.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval address of the buffer.
|
||||
*/
|
||||
#define PCD_GET_EP_TX_ADDRESS(USBx, bEpNum) ((uint16_t)*PCD_EP_TX_ADDRESS((USBx), (bEpNum)))
|
||||
|
@ -685,9 +683,9 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Sets counter of rx buffer with no. of blocks.
|
||||
* @param dwReg: Register
|
||||
* @param wCount: Counter.
|
||||
* @param wNBlocks: no. of Blocks.
|
||||
* @param dwReg Register
|
||||
* @param wCount Counter.
|
||||
* @param wNBlocks no. of Blocks.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_CALC_BLK32(dwReg,wCount,wNBlocks) {\
|
||||
|
@ -728,17 +726,17 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief sets counter for the tx/rx buffer.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param wCount: Counter value.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @param wCount Counter value.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_SET_EP_TX_CNT(USBx, bEpNum,wCount) (*PCD_EP_TX_CNT((USBx), (bEpNum)) = (wCount))
|
||||
|
||||
/**
|
||||
* @brief gets counter of the tx buffer.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval Counter value
|
||||
*/
|
||||
#define PCD_GET_EP_TX_CNT(USBx, bEpNum)((uint16_t)(*PCD_EP_TX_CNT((USBx), (bEpNum))) & 0x3ffU)
|
||||
|
@ -746,8 +744,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Sets buffer 0/1 address in a double buffer endpoint.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @param wBuf0Addr: buffer 0 address.
|
||||
* @retval Counter value
|
||||
*/
|
||||
|
@ -756,8 +754,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Sets addresses in a double buffer endpoint.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @param wBuf0Addr: buffer 0 address.
|
||||
* @param wBuf1Addr = buffer 1 address.
|
||||
* @retval None
|
||||
|
@ -769,8 +767,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Gets buffer 0/1 address of a double buffer endpoint.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_GET_EP_DBUF0_ADDR(USBx, bEpNum) (PCD_GET_EP_TX_ADDRESS((USBx), (bEpNum)))
|
||||
|
@ -778,11 +776,11 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Gets buffer 0/1 address of a double buffer endpoint.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param bDir: endpoint dir EP_DBUF_OUT = OUT
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @param bDir endpoint dir EP_DBUF_OUT = OUT
|
||||
* EP_DBUF_IN = IN
|
||||
* @param wCount: Counter value
|
||||
* @param wCount Counter value
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_SET_EP_DBUF0_CNT(USBx, bEpNum, bDir, wCount) { \
|
||||
|
@ -813,8 +811,8 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
|
|||
|
||||
/**
|
||||
* @brief Gets buffer 0/1 rx/tx counter for double buffering.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval None
|
||||
*/
|
||||
#define PCD_GET_EP_DBUF0_CNT(USBx, bEpNum) (PCD_GET_EP_TX_CNT((USBx), (bEpNum)))
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_pcd_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of PCD HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -67,8 +65,8 @@
|
|||
*/
|
||||
/**
|
||||
* @brief Gets address in an endpoint register.
|
||||
* @param USBx: USB peripheral instance register address.
|
||||
* @param bEpNum: Endpoint Number.
|
||||
* @param USBx USB peripheral instance register address.
|
||||
* @param bEpNum Endpoint Number.
|
||||
* @retval None
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_pwr.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of PWR HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -119,7 +117,7 @@
|
|||
*/
|
||||
|
||||
/** @brief Check PWR flag is set or not.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg PWR_FLAG_WU: Wake Up flag. This flag indicates that a wakeup event
|
||||
* was received from the WKUP pin or from the RTC alarm (Alarm A
|
||||
|
@ -139,7 +137,7 @@
|
|||
#define __HAL_PWR_GET_FLAG(__FLAG__) ((PWR->CSR & (__FLAG__)) == (__FLAG__))
|
||||
|
||||
/** @brief Clear the PWR's pending flags.
|
||||
* @param __FLAG__: specifies the flag to clear.
|
||||
* @param __FLAG__ specifies the flag to clear.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg PWR_FLAG_WU: Wake Up flag
|
||||
* @arg PWR_FLAG_SB: StandBy flag
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_pwr_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of PWR HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_rcc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of RCC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -1755,3 +1753,4 @@ void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct,
|
|||
#endif /* __STM32F3xx_HAL_RCC_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_rcc_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of RCC HAL Extension module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -598,7 +596,7 @@ typedef struct
|
|||
|
||||
uint32_t Tim34ClockSelection; /*!< TIM3 & TIM4 clock source
|
||||
This parameter can be a value of @ref RCCEx_TIM34_Clock_Source */
|
||||
|
||||
|
||||
uint32_t Tim15ClockSelection; /*!< TIM15 clock source
|
||||
This parameter can be a value of @ref RCCEx_TIM15_Clock_Source */
|
||||
|
||||
|
@ -3842,3 +3840,4 @@ uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk);
|
|||
#endif /* __STM32F3xx_HAL_RCC_EX_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_rtc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of RTC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -68,7 +66,7 @@ typedef enum
|
|||
HAL_RTC_STATE_READY = 0x01U, /*!< RTC initialized and ready for use */
|
||||
HAL_RTC_STATE_BUSY = 0x02U, /*!< RTC process is ongoing */
|
||||
HAL_RTC_STATE_TIMEOUT = 0x03U, /*!< RTC timeout state */
|
||||
HAL_RTC_STATE_ERROR = 0x04 /*!< RTC error state */
|
||||
HAL_RTC_STATE_ERROR = 0x04U /*!< RTC error state */
|
||||
|
||||
}HAL_RTCStateTypeDef;
|
||||
|
||||
|
@ -81,10 +79,10 @@ typedef struct
|
|||
This parameter can be a value of @ref RTC_Hour_Formats */
|
||||
|
||||
uint32_t AsynchPrediv; /*!< Specifies the RTC Asynchronous Predivider value.
|
||||
This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7FU */
|
||||
This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7F */
|
||||
|
||||
uint32_t SynchPrediv; /*!< Specifies the RTC Synchronous Predivider value.
|
||||
This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7FFFU */
|
||||
This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x7FFF */
|
||||
|
||||
uint32_t OutPut; /*!< Specifies which signal will be routed to the RTC output.
|
||||
This parameter can be a value of @ref RTCEx_Output_selection_Definitions */
|
||||
|
@ -106,21 +104,21 @@ typedef struct
|
|||
This parameter must be a number between Min_Data = 0 and Max_Data = 23 if the RTC_HourFormat_24 is selected */
|
||||
|
||||
uint8_t Minutes; /*!< Specifies the RTC Time Minutes.
|
||||
This parameter must be a number between Min_Data = 0 and Max_Data = 59U */
|
||||
This parameter must be a number between Min_Data = 0 and Max_Data = 59 */
|
||||
|
||||
uint8_t Seconds; /*!< Specifies the RTC Time Seconds.
|
||||
This parameter must be a number between Min_Data = 0 and Max_Data = 59U */
|
||||
This parameter must be a number between Min_Data = 0 and Max_Data = 59 */
|
||||
|
||||
uint8_t TimeFormat; /*!< Specifies the RTC AM/PM Time.
|
||||
This parameter can be a value of @ref RTC_AM_PM_Definitions */
|
||||
|
||||
uint32_t SubSeconds; /*!< Specifies the RTC_SSR RTC Sub Second register content.
|
||||
This parameter corresponds to a time unit range between [0U-1] Second
|
||||
This parameter corresponds to a time unit range between [0-1] Second
|
||||
with [1 Sec / SecondFraction +1] granularity */
|
||||
|
||||
uint32_t SecondFraction; /*!< Specifies the range or granularity of Sub Second register content
|
||||
corresponding to Synchronous pre-scaler factor value (PREDIV_S)
|
||||
This parameter corresponds to a time unit range between [0U-1] Second
|
||||
This parameter corresponds to a time unit range between [0-1] Second
|
||||
with [1 Sec / SecondFraction +1] granularity.
|
||||
This field will be used only by HAL_RTC_GetTime function */
|
||||
|
||||
|
@ -144,10 +142,10 @@ typedef struct
|
|||
This parameter can be a value of @ref RTC_Month_Date_Definitions */
|
||||
|
||||
uint8_t Date; /*!< Specifies the RTC Date.
|
||||
This parameter must be a number between Min_Data = 1 and Max_Data = 31U */
|
||||
This parameter must be a number between Min_Data = 1 and Max_Data = 31 */
|
||||
|
||||
uint8_t Year; /*!< Specifies the RTC Date Year.
|
||||
This parameter must be a number between Min_Data = 0 and Max_Data = 99U */
|
||||
This parameter must be a number between Min_Data = 0 and Max_Data = 99 */
|
||||
|
||||
}RTC_DateTypeDef;
|
||||
|
||||
|
@ -168,7 +166,7 @@ typedef struct
|
|||
This parameter can be a value of @ref RTC_AlarmDateWeekDay_Definitions */
|
||||
|
||||
uint8_t AlarmDateWeekDay; /*!< Specifies the RTC Alarm Date/WeekDay.
|
||||
If the Alarm Date is selected, this parameter must be set to a value in the 1U-31 range.
|
||||
If the Alarm Date is selected, this parameter must be set to a value in the 1-31 range.
|
||||
If the Alarm WeekDay is selected, this parameter can be a value of @ref RTC_WeekDay_Definitions */
|
||||
|
||||
uint32_t Alarm; /*!< Specifies the alarm .
|
||||
|
@ -201,7 +199,7 @@ typedef struct
|
|||
/** @defgroup RTC_Hour_Formats RTC Hour Formats
|
||||
* @{
|
||||
*/
|
||||
#define RTC_HOURFORMAT_24 (0x00000000U)
|
||||
#define RTC_HOURFORMAT_24 0x00000000U
|
||||
#define RTC_HOURFORMAT_12 RTC_CR_FMT
|
||||
/**
|
||||
* @}
|
||||
|
@ -210,7 +208,7 @@ typedef struct
|
|||
/** @defgroup RTC_Output_Polarity_Definitions RTC Output Polarity Definitions
|
||||
* @{
|
||||
*/
|
||||
#define RTC_OUTPUT_POLARITY_HIGH (0x00000000U)
|
||||
#define RTC_OUTPUT_POLARITY_HIGH 0x00000000U
|
||||
#define RTC_OUTPUT_POLARITY_LOW RTC_CR_POL
|
||||
/**
|
||||
* @}
|
||||
|
@ -219,7 +217,7 @@ typedef struct
|
|||
/** @defgroup RTC_Output_Type_ALARM_OUT RTC Output Type ALARM OUT
|
||||
* @{
|
||||
*/
|
||||
#define RTC_OUTPUT_TYPE_OPENDRAIN (0x00000000U)
|
||||
#define RTC_OUTPUT_TYPE_OPENDRAIN 0x00000000U
|
||||
#define RTC_OUTPUT_TYPE_PUSHPULL RTC_TAFCR_ALARMOUTTYPE
|
||||
/**
|
||||
* @}
|
||||
|
@ -228,8 +226,8 @@ typedef struct
|
|||
/** @defgroup RTC_AM_PM_Definitions RTC AM PM Definitions
|
||||
* @{
|
||||
*/
|
||||
#define RTC_HOURFORMAT12_AM ((uint8_t)0x00U)
|
||||
#define RTC_HOURFORMAT12_PM ((uint8_t)0x40U)
|
||||
#define RTC_HOURFORMAT12_AM ((uint8_t)0x00)
|
||||
#define RTC_HOURFORMAT12_PM ((uint8_t)0x40)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -237,7 +235,7 @@ typedef struct
|
|||
/** @defgroup RTC_DayLightSaving_Definitions RTC DayLightSaving Definitions
|
||||
* @{
|
||||
*/
|
||||
#define RTC_DAYLIGHTSAVING_NONE (0x00000000U)
|
||||
#define RTC_DAYLIGHTSAVING_NONE 0x00000000U
|
||||
#define RTC_DAYLIGHTSAVING_SUB1H RTC_CR_SUB1H
|
||||
#define RTC_DAYLIGHTSAVING_ADD1H RTC_CR_ADD1H
|
||||
/**
|
||||
|
@ -247,7 +245,7 @@ typedef struct
|
|||
/** @defgroup RTC_StoreOperation_Definitions RTC StoreOperation Definitions
|
||||
* @{
|
||||
*/
|
||||
#define RTC_STOREOPERATION_RESET (0x00000000U)
|
||||
#define RTC_STOREOPERATION_RESET 0x00000000U
|
||||
#define RTC_STOREOPERATION_SET RTC_CR_BCK
|
||||
/**
|
||||
* @}
|
||||
|
@ -256,8 +254,8 @@ typedef struct
|
|||
/** @defgroup RTC_Input_parameter_format_definitions RTC Input parameter format definitions
|
||||
* @{
|
||||
*/
|
||||
#define RTC_FORMAT_BIN (0x000000000U)
|
||||
#define RTC_FORMAT_BCD (0x000000001U)
|
||||
#define RTC_FORMAT_BIN 0x000000000U
|
||||
#define RTC_FORMAT_BCD 0x000000001U
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -266,18 +264,18 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
/* Coded in BCD format */
|
||||
#define RTC_MONTH_JANUARY ((uint8_t)0x01U)
|
||||
#define RTC_MONTH_FEBRUARY ((uint8_t)0x02U)
|
||||
#define RTC_MONTH_MARCH ((uint8_t)0x03U)
|
||||
#define RTC_MONTH_APRIL ((uint8_t)0x04U)
|
||||
#define RTC_MONTH_MAY ((uint8_t)0x05U)
|
||||
#define RTC_MONTH_JUNE ((uint8_t)0x06U)
|
||||
#define RTC_MONTH_JULY ((uint8_t)0x07U)
|
||||
#define RTC_MONTH_AUGUST ((uint8_t)0x08U)
|
||||
#define RTC_MONTH_SEPTEMBER ((uint8_t)0x09U)
|
||||
#define RTC_MONTH_OCTOBER ((uint8_t)0x10U)
|
||||
#define RTC_MONTH_NOVEMBER ((uint8_t)0x11U)
|
||||
#define RTC_MONTH_DECEMBER ((uint8_t)0x12U)
|
||||
#define RTC_MONTH_JANUARY ((uint8_t)0x01)
|
||||
#define RTC_MONTH_FEBRUARY ((uint8_t)0x02)
|
||||
#define RTC_MONTH_MARCH ((uint8_t)0x03)
|
||||
#define RTC_MONTH_APRIL ((uint8_t)0x04)
|
||||
#define RTC_MONTH_MAY ((uint8_t)0x05)
|
||||
#define RTC_MONTH_JUNE ((uint8_t)0x06)
|
||||
#define RTC_MONTH_JULY ((uint8_t)0x07)
|
||||
#define RTC_MONTH_AUGUST ((uint8_t)0x08)
|
||||
#define RTC_MONTH_SEPTEMBER ((uint8_t)0x09)
|
||||
#define RTC_MONTH_OCTOBER ((uint8_t)0x10)
|
||||
#define RTC_MONTH_NOVEMBER ((uint8_t)0x11)
|
||||
#define RTC_MONTH_DECEMBER ((uint8_t)0x12)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -285,13 +283,13 @@ typedef struct
|
|||
/** @defgroup RTC_WeekDay_Definitions RTC WeekDay Definitions
|
||||
* @{
|
||||
*/
|
||||
#define RTC_WEEKDAY_MONDAY ((uint8_t)0x01U)
|
||||
#define RTC_WEEKDAY_TUESDAY ((uint8_t)0x02U)
|
||||
#define RTC_WEEKDAY_WEDNESDAY ((uint8_t)0x03U)
|
||||
#define RTC_WEEKDAY_THURSDAY ((uint8_t)0x04U)
|
||||
#define RTC_WEEKDAY_FRIDAY ((uint8_t)0x05U)
|
||||
#define RTC_WEEKDAY_SATURDAY ((uint8_t)0x06U)
|
||||
#define RTC_WEEKDAY_SUNDAY ((uint8_t)0x07U)
|
||||
#define RTC_WEEKDAY_MONDAY ((uint8_t)0x01)
|
||||
#define RTC_WEEKDAY_TUESDAY ((uint8_t)0x02)
|
||||
#define RTC_WEEKDAY_WEDNESDAY ((uint8_t)0x03)
|
||||
#define RTC_WEEKDAY_THURSDAY ((uint8_t)0x04)
|
||||
#define RTC_WEEKDAY_FRIDAY ((uint8_t)0x05)
|
||||
#define RTC_WEEKDAY_SATURDAY ((uint8_t)0x06)
|
||||
#define RTC_WEEKDAY_SUNDAY ((uint8_t)0x07)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -299,7 +297,7 @@ typedef struct
|
|||
/** @defgroup RTC_AlarmDateWeekDay_Definitions RTC AlarmDateWeekDay Definitions
|
||||
* @{
|
||||
*/
|
||||
#define RTC_ALARMDATEWEEKDAYSEL_DATE (0x00000000U)
|
||||
#define RTC_ALARMDATEWEEKDAYSEL_DATE 0x00000000U
|
||||
#define RTC_ALARMDATEWEEKDAYSEL_WEEKDAY RTC_ALRMAR_WDSEL
|
||||
/**
|
||||
* @}
|
||||
|
@ -308,7 +306,7 @@ typedef struct
|
|||
/** @defgroup RTC_AlarmMask_Definitions RTC AlarmMask Definitions
|
||||
* @{
|
||||
*/
|
||||
#define RTC_ALARMMASK_NONE (0x00000000U)
|
||||
#define RTC_ALARMMASK_NONE 0x00000000U
|
||||
#define RTC_ALARMMASK_DATEWEEKDAY RTC_ALRMAR_MSK4
|
||||
#define RTC_ALARMMASK_HOURS RTC_ALRMAR_MSK3
|
||||
#define RTC_ALARMMASK_MINUTES RTC_ALRMAR_MSK2
|
||||
|
@ -334,7 +332,7 @@ typedef struct
|
|||
/** @defgroup RTC_Alarm_Sub_Seconds_Masks_Definitions RTC Alarm Sub Seconds Masks Definitions
|
||||
* @{
|
||||
*/
|
||||
#define RTC_ALARMSUBSECONDMASK_ALL (0x00000000U) /*!< All Alarm SS fields are masked.
|
||||
#define RTC_ALARMSUBSECONDMASK_ALL 0x00000000U /*!< All Alarm SS fields are masked.
|
||||
There is no comparison on sub seconds
|
||||
for Alarm */
|
||||
#define RTC_ALARMSUBSECONDMASK_SS14_1 RTC_ALRMASSR_MASKSS_0 /*!< SS[14:1] are ignored in Alarm
|
||||
|
@ -365,7 +363,8 @@ typedef struct
|
|||
comparison. Only SS[12:0] are compared */
|
||||
#define RTC_ALARMSUBSECONDMASK_SS14 (RTC_ALRMASSR_MASKSS_1 | RTC_ALRMASSR_MASKSS_2 | RTC_ALRMASSR_MASKSS_3) /*!< SS[14] is don't care in Alarm
|
||||
comparison.Only SS[13:0] are compared */
|
||||
#define RTC_ALARMSUBSECONDMASK_NONE RTC_ALRMASSR_MASKSS /*!< SS[14:0] are compared and must match to activate alarm. */
|
||||
#define RTC_ALARMSUBSECONDMASK_NONE RTC_ALRMASSR_MASKSS /*!< SS[14:0] are compared and must match
|
||||
to activate alarm. */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -378,10 +377,10 @@ typedef struct
|
|||
#define RTC_IT_ALRB RTC_CR_ALRBIE
|
||||
#define RTC_IT_ALRA RTC_CR_ALRAIE
|
||||
#define RTC_IT_TAMP RTC_TAFCR_TAMPIE /* Used only to Enable the Tamper Interrupt */
|
||||
#define RTC_IT_TAMP1 (0x00020000U) /*only for RTC_ISR flag check*/
|
||||
#define RTC_IT_TAMP2 (0x00040000U) /*only for RTC_ISR flag check*/
|
||||
#define RTC_IT_TAMP1 0x00020000U /*only for RTC_ISR flag check*/
|
||||
#define RTC_IT_TAMP2 0x00040000U /*only for RTC_ISR flag check*/
|
||||
#if defined(RTC_TAMPER3_SUPPORT)
|
||||
#define RTC_IT_TAMP3 (0x00080000U) /*only for RTC_ISR flag check*/
|
||||
#define RTC_IT_TAMP3 0x00080000U /*only for RTC_ISR flag check*/
|
||||
#endif /* RTC_TAMPER3_SUPPORT */
|
||||
/**
|
||||
* @}
|
||||
|
@ -422,14 +421,14 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Reset RTC handle state
|
||||
* @param __HANDLE__: RTC handle.
|
||||
* @param __HANDLE__ RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_RTC_STATE_RESET)
|
||||
|
||||
/**
|
||||
* @brief Disable the write protection for RTC registers.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_WRITEPROTECTION_DISABLE(__HANDLE__) \
|
||||
|
@ -440,7 +439,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enable the write protection for RTC registers.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_WRITEPROTECTION_ENABLE(__HANDLE__) \
|
||||
|
@ -450,36 +449,36 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enable the RTC ALARMA peripheral.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_ALARMA_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRAE))
|
||||
|
||||
/**
|
||||
* @brief Disable the RTC ALARMA peripheral.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_ALARMA_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRAE))
|
||||
|
||||
/**
|
||||
* @brief Enable the RTC ALARMB peripheral.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_ALARMB_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_ALRBE))
|
||||
|
||||
/**
|
||||
* @brief Disable the RTC ALARMB peripheral.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_ALARMB_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ALRBE))
|
||||
|
||||
/**
|
||||
* @brief Enable the RTC Alarm interrupt.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC Alarm interrupt sources to be enabled or disabled.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC Alarm interrupt sources to be enabled or disabled.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg RTC_IT_ALRA: Alarm A interrupt
|
||||
* @arg RTC_IT_ALRB: Alarm B interrupt
|
||||
|
@ -489,8 +488,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Disable the RTC Alarm interrupt.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC Alarm interrupt sources to be enabled or disabled.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC Alarm interrupt sources to be enabled or disabled.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg RTC_IT_ALRA: Alarm A interrupt
|
||||
* @arg RTC_IT_ALRB: Alarm B interrupt
|
||||
|
@ -500,8 +499,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check whether the specified RTC Alarm interrupt has occurred or not.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC Alarm interrupt to check.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC Alarm interrupt to check.
|
||||
* This parameter can be:
|
||||
* @arg RTC_IT_ALRA: Alarm A interrupt
|
||||
* @arg RTC_IT_ALRB: Alarm B interrupt
|
||||
|
@ -511,8 +510,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check whether the specified RTC Alarm interrupt has been enabled or not.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC Alarm interrupt sources to check.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC Alarm interrupt sources to check.
|
||||
* This parameter can be:
|
||||
* @arg RTC_IT_ALRA: Alarm A interrupt
|
||||
* @arg RTC_IT_ALRB: Alarm B interrupt
|
||||
|
@ -522,8 +521,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Get the selected RTC Alarm's flag status.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __FLAG__: specifies the RTC Alarm Flag sources to check.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __FLAG__ specifies the RTC Alarm Flag sources to check.
|
||||
* This parameter can be:
|
||||
* @arg RTC_FLAG_ALRAF
|
||||
* @arg RTC_FLAG_ALRBF
|
||||
|
@ -535,8 +534,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Clear the RTC Alarm's pending flags.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __FLAG__: specifies the RTC Alarm Flag sources to clear.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __FLAG__ specifies the RTC Alarm Flag sources to clear.
|
||||
* This parameter can be:
|
||||
* @arg RTC_FLAG_ALRAF
|
||||
* @arg RTC_FLAG_ALRBF
|
||||
|
@ -703,10 +702,10 @@ HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc);
|
|||
* @{
|
||||
*/
|
||||
/* Masks Definition */
|
||||
#define RTC_TR_RESERVED_MASK (0x007F7F7FU)
|
||||
#define RTC_DR_RESERVED_MASK (0x00FFFF3FU)
|
||||
#define RTC_INIT_MASK (0xFFFFFFFFU)
|
||||
#define RTC_RSF_MASK (0xFFFFFF5FU)
|
||||
#define RTC_TR_RESERVED_MASK 0x007F7F7FU
|
||||
#define RTC_DR_RESERVED_MASK 0x00FFFF3FU
|
||||
#define RTC_INIT_MASK 0xFFFFFFFFU
|
||||
#define RTC_RSF_MASK 0xFFFFFF5FU
|
||||
#define RTC_FLAGS_MASK ((uint32_t) (RTC_FLAG_RECALPF | RTC_FLAG_TAMP3F | RTC_FLAG_TAMP2F | \
|
||||
RTC_FLAG_TAMP1F| RTC_FLAG_TSOVF | RTC_FLAG_TSF | \
|
||||
RTC_FLAG_WUTF | RTC_FLAG_ALRBF | RTC_FLAG_ALRAF | \
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_rtc_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of RTC HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -98,7 +96,7 @@ typedef struct
|
|||
/** @defgroup RTCEx_Output_selection_Definitions RTC Extended Output Selection Definition
|
||||
* @{
|
||||
*/
|
||||
#define RTC_OUTPUT_DISABLE (0x00000000U)
|
||||
#define RTC_OUTPUT_DISABLE 0x00000000U
|
||||
#define RTC_OUTPUT_ALARMA RTC_CR_OSEL_0
|
||||
#define RTC_OUTPUT_ALARMB RTC_CR_OSEL_1
|
||||
#define RTC_OUTPUT_WAKEUP RTC_CR_OSEL
|
||||
|
@ -110,47 +108,47 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#if RTC_BKP_NUMBER > 0U
|
||||
#define RTC_BKP_DR0 (0x00000000U)
|
||||
#define RTC_BKP_DR1 (0x00000001U)
|
||||
#define RTC_BKP_DR2 (0x00000002U)
|
||||
#define RTC_BKP_DR3 (0x00000003U)
|
||||
#define RTC_BKP_DR4 (0x00000004U)
|
||||
#define RTC_BKP_DR0 0x00000000U
|
||||
#define RTC_BKP_DR1 0x00000001U
|
||||
#define RTC_BKP_DR2 0x00000002U
|
||||
#define RTC_BKP_DR3 0x00000003U
|
||||
#define RTC_BKP_DR4 0x00000004U
|
||||
#endif /* RTC_BKP_NUMBER > 0U */
|
||||
|
||||
#if RTC_BKP_NUMBER > 5U
|
||||
#define RTC_BKP_DR5 (0x00000005U)
|
||||
#define RTC_BKP_DR6 (0x00000006U)
|
||||
#define RTC_BKP_DR7 (0x00000007U)
|
||||
#define RTC_BKP_DR8 (0x00000008U)
|
||||
#define RTC_BKP_DR9 (0x00000009U)
|
||||
#define RTC_BKP_DR10 (0x0000000AU)
|
||||
#define RTC_BKP_DR11 (0x0000000BU)
|
||||
#define RTC_BKP_DR12 (0x0000000CU)
|
||||
#define RTC_BKP_DR13 (0x0000000DU)
|
||||
#define RTC_BKP_DR14 (0x0000000EU)
|
||||
#define RTC_BKP_DR15 (0x0000000FU)
|
||||
#define RTC_BKP_DR5 0x00000005U
|
||||
#define RTC_BKP_DR6 0x00000006U
|
||||
#define RTC_BKP_DR7 0x00000007U
|
||||
#define RTC_BKP_DR8 0x00000008U
|
||||
#define RTC_BKP_DR9 0x00000009U
|
||||
#define RTC_BKP_DR10 0x0000000AU
|
||||
#define RTC_BKP_DR11 0x0000000BU
|
||||
#define RTC_BKP_DR12 0x0000000CU
|
||||
#define RTC_BKP_DR13 0x0000000DU
|
||||
#define RTC_BKP_DR14 0x0000000EU
|
||||
#define RTC_BKP_DR15 0x0000000FU
|
||||
#endif /* RTC_BKP_NUMBER > 5U */
|
||||
|
||||
#if RTC_BKP_NUMBER > 16U
|
||||
#define RTC_BKP_DR16 (0x00000010U)
|
||||
#define RTC_BKP_DR17 (0x00000011U)
|
||||
#define RTC_BKP_DR18 (0x00000012U)
|
||||
#define RTC_BKP_DR19 (0x00000013U)
|
||||
#define RTC_BKP_DR16 0x00000010U
|
||||
#define RTC_BKP_DR17 0x00000011U
|
||||
#define RTC_BKP_DR18 0x00000012U
|
||||
#define RTC_BKP_DR19 0x00000013U
|
||||
#endif /* RTC_BKP_NUMBER > 16U */
|
||||
|
||||
#if RTC_BKP_NUMBER > 20U
|
||||
#define RTC_BKP_DR20 (0x00000014U)
|
||||
#define RTC_BKP_DR21 (0x00000015U)
|
||||
#define RTC_BKP_DR22 (0x00000016U)
|
||||
#define RTC_BKP_DR23 (0x00000017U)
|
||||
#define RTC_BKP_DR24 (0x00000018U)
|
||||
#define RTC_BKP_DR25 (0x00000019U)
|
||||
#define RTC_BKP_DR26 (0x0000001AU)
|
||||
#define RTC_BKP_DR27 (0x0000001BU)
|
||||
#define RTC_BKP_DR28 (0x0000001CU)
|
||||
#define RTC_BKP_DR29 (0x0000001DU)
|
||||
#define RTC_BKP_DR30 (0x0000001EU)
|
||||
#define RTC_BKP_DR31 (0x0000001FU)
|
||||
#define RTC_BKP_DR20 0x00000014U
|
||||
#define RTC_BKP_DR21 0x00000015U
|
||||
#define RTC_BKP_DR22 0x00000016U
|
||||
#define RTC_BKP_DR23 0x00000017U
|
||||
#define RTC_BKP_DR24 0x00000018U
|
||||
#define RTC_BKP_DR25 0x00000019U
|
||||
#define RTC_BKP_DR26 0x0000001AU
|
||||
#define RTC_BKP_DR27 0x0000001BU
|
||||
#define RTC_BKP_DR28 0x0000001CU
|
||||
#define RTC_BKP_DR29 0x0000001DU
|
||||
#define RTC_BKP_DR30 0x0000001EU
|
||||
#define RTC_BKP_DR31 0x0000001FU
|
||||
#endif /* RTC_BKP_NUMBER > 20U */
|
||||
/**
|
||||
* @}
|
||||
|
@ -159,7 +157,7 @@ typedef struct
|
|||
/** @defgroup RTCEx_Time_Stamp_Edges_definitions RTC Extended Time Stamp Edges definition
|
||||
* @{
|
||||
*/
|
||||
#define RTC_TIMESTAMPEDGE_RISING (0x00000000U)
|
||||
#define RTC_TIMESTAMPEDGE_RISING 0x00000000U
|
||||
#define RTC_TIMESTAMPEDGE_FALLING RTC_CR_TSEDGE
|
||||
/**
|
||||
* @}
|
||||
|
@ -168,7 +166,7 @@ typedef struct
|
|||
/** @defgroup RTCEx_TimeStamp_Pin_Selections RTC Extended TimeStamp Pin Selection
|
||||
* @{
|
||||
*/
|
||||
#define RTC_TIMESTAMPPIN_DEFAULT (0x00000000U)
|
||||
#define RTC_TIMESTAMPPIN_DEFAULT 0x00000000U
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -189,7 +187,7 @@ typedef struct
|
|||
/** @defgroup RTCEx_Tamper_Trigger_Definitions RTC Extended Tamper Trigger Definition
|
||||
* @{
|
||||
*/
|
||||
#define RTC_TAMPERTRIGGER_RISINGEDGE (0x00000000U)
|
||||
#define RTC_TAMPERTRIGGER_RISINGEDGE 0x00000000U
|
||||
#define RTC_TAMPERTRIGGER_FALLINGEDGE RTC_TAFCR_TAMP1TRG
|
||||
#define RTC_TAMPERTRIGGER_LOWLEVEL RTC_TAMPERTRIGGER_RISINGEDGE
|
||||
#define RTC_TAMPERTRIGGER_HIGHLEVEL RTC_TAMPERTRIGGER_FALLINGEDGE
|
||||
|
@ -200,13 +198,13 @@ typedef struct
|
|||
/** @defgroup RTCEx_Tamper_Filter_Definitions RTC Extended Tamper Filter Definition
|
||||
* @{
|
||||
*/
|
||||
#define RTC_TAMPERFILTER_DISABLE (0x00000000U) /*!< Tamper filter is disabled */
|
||||
#define RTC_TAMPERFILTER_DISABLE 0x00000000U /*!< Tamper filter is disabled */
|
||||
|
||||
#define RTC_TAMPERFILTER_2SAMPLE RTC_TAFCR_TAMPFLT_0 /*!< Tamper is activated after 2
|
||||
consecutive samples at the active level */
|
||||
#define RTC_TAMPERFILTER_4SAMPLE RTC_TAFCR_TAMPFLT_1 /*!< Tamper is activated after 4
|
||||
#define RTC_TAMPERFILTER_4SAMPLE RTC_TAFCR_TAMPFLT_1 /*!< Tamper is activated after 4
|
||||
consecutive samples at the active level */
|
||||
#define RTC_TAMPERFILTER_8SAMPLE RTC_TAFCR_TAMPFLT /*!< Tamper is activated after 8
|
||||
#define RTC_TAMPERFILTER_8SAMPLE RTC_TAFCR_TAMPFLT /*!< Tamper is activated after 8
|
||||
consecutive samples at the active level. */
|
||||
/**
|
||||
* @}
|
||||
|
@ -215,7 +213,7 @@ typedef struct
|
|||
/** @defgroup RTCEx_Tamper_Sampling_Frequencies_Definitions RTC Extended Tamper Sampling Frequencies Definition
|
||||
* @{
|
||||
*/
|
||||
#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768 (0x00000000U) /*!< Each of the tamper inputs are sampled
|
||||
#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768 0x00000000U /*!< Each of the tamper inputs are sampled
|
||||
with a frequency = RTCCLK / 32768U */
|
||||
#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV16384 RTC_TAFCR_TAMPFREQ_0 /*!< Each of the tamper inputs are sampled
|
||||
with a frequency = RTCCLK / 16384U */
|
||||
|
@ -238,7 +236,7 @@ typedef struct
|
|||
/** @defgroup RTCEx_Tamper_Pin_Precharge_Duration_Definitions RTC Extended Tamper Pin Precharge Duration Definition
|
||||
* @{
|
||||
*/
|
||||
#define RTC_TAMPERPRECHARGEDURATION_1RTCCLK (0x00000000U) /*!< Tamper pins are pre-charged before
|
||||
#define RTC_TAMPERPRECHARGEDURATION_1RTCCLK 0x00000000U /*!< Tamper pins are pre-charged before
|
||||
sampling during 1 RTCCLK cycle */
|
||||
#define RTC_TAMPERPRECHARGEDURATION_2RTCCLK RTC_TAFCR_TAMPPRCH_0 /*!< Tamper pins are pre-charged before
|
||||
sampling during 2 RTCCLK cycles */
|
||||
|
@ -254,7 +252,7 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#define RTC_TIMESTAMPONTAMPERDETECTION_ENABLE ((uint32_t)RTC_TAFCR_TAMPTS) /*!< TimeStamp on Tamper Detection event saved */
|
||||
#define RTC_TIMESTAMPONTAMPERDETECTION_DISABLE (0x00000000U) /*!< TimeStamp on Tamper Detection event is not saved */
|
||||
#define RTC_TIMESTAMPONTAMPERDETECTION_DISABLE 0x00000000U /*!< TimeStamp on Tamper Detection event is not saved */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -262,7 +260,7 @@ typedef struct
|
|||
/** @defgroup RTCEx_Tamper_Pull_UP_Definitions RTC Extended Tamper Pull UP Definition
|
||||
* @{
|
||||
*/
|
||||
#define RTC_TAMPER_PULLUP_ENABLE (0x00000000U) /*!< Tamper pins are pre-charged before sampling */
|
||||
#define RTC_TAMPER_PULLUP_ENABLE 0x00000000U /*!< Tamper pins are pre-charged before sampling */
|
||||
#define RTC_TAMPER_PULLUP_DISABLE ((uint32_t)RTC_TAFCR_TAMPPUDIS) /*!< Tamper pins are not pre-charged before sampling */
|
||||
/**
|
||||
* @}
|
||||
|
@ -271,7 +269,7 @@ typedef struct
|
|||
/** @defgroup RTCEx_Wakeup_Timer_Definitions RTC Extended Wakeup Timer Definition
|
||||
* @{
|
||||
*/
|
||||
#define RTC_WAKEUPCLOCK_RTCCLK_DIV16 (0x00000000U)
|
||||
#define RTC_WAKEUPCLOCK_RTCCLK_DIV16 0x00000000U
|
||||
#define RTC_WAKEUPCLOCK_RTCCLK_DIV8 RTC_CR_WUCKSEL_0
|
||||
#define RTC_WAKEUPCLOCK_RTCCLK_DIV4 RTC_CR_WUCKSEL_1
|
||||
#define RTC_WAKEUPCLOCK_RTCCLK_DIV2 (RTC_CR_WUCKSEL_0 | RTC_CR_WUCKSEL_1)
|
||||
|
@ -284,11 +282,11 @@ typedef struct
|
|||
/** @defgroup RTCEx_Smooth_calib_period_Definitions RTC Extended Smooth calib period Definition
|
||||
* @{
|
||||
*/
|
||||
#define RTC_SMOOTHCALIB_PERIOD_32SEC (0x00000000U) /*!< If RTCCLK = 32768 Hz, Smooth calibation
|
||||
#define RTC_SMOOTHCALIB_PERIOD_32SEC 0x00000000U /*!< If RTCCLK = 32768 Hz, Smooth calibation
|
||||
period is 32s, else 2exp20 RTCCLK seconds */
|
||||
#define RTC_SMOOTHCALIB_PERIOD_16SEC RTC_CALR_CALW16 /*!< If RTCCLK = 32768 Hz, Smooth calibation
|
||||
#define RTC_SMOOTHCALIB_PERIOD_16SEC RTC_CALR_CALW16 /*!< If RTCCLK = 32768 Hz, Smooth calibation
|
||||
period is 16s, else 2exp19 RTCCLK seconds */
|
||||
#define RTC_SMOOTHCALIB_PERIOD_8SEC RTC_CALR_CALW8 /*!< If RTCCLK = 32768 Hz, Smooth calibation
|
||||
#define RTC_SMOOTHCALIB_PERIOD_8SEC RTC_CALR_CALW8 /*!< If RTCCLK = 32768 Hz, Smooth calibation
|
||||
period is 8s, else 2exp18 RTCCLK seconds */
|
||||
/**
|
||||
* @}
|
||||
|
@ -297,11 +295,11 @@ typedef struct
|
|||
/** @defgroup RTCEx_Smooth_calib_Plus_pulses_Definitions RTC Extended Smooth calib Plus pulses Definition
|
||||
* @{
|
||||
*/
|
||||
#define RTC_SMOOTHCALIB_PLUSPULSES_RESET (0x00000000U) /*!< The number of RTCCLK pulses subbstited
|
||||
during a 32-second window = CALM[8:0] */
|
||||
#define RTC_SMOOTHCALIB_PLUSPULSES_SET RTC_CALR_CALP /*!< The number of RTCCLK pulses added
|
||||
during a X -second window = Y - CALM[8:0]
|
||||
with Y = 512U, 256U, 128 when X = 32U, 16U, 8U */
|
||||
#define RTC_SMOOTHCALIB_PLUSPULSES_RESET 0x00000000U /*!< The number of RTCCLK pulses subbstited
|
||||
during a 32-second window = CALM[8:0] */
|
||||
#define RTC_SMOOTHCALIB_PLUSPULSES_SET RTC_CALR_CALP /*!< The number of RTCCLK pulses added
|
||||
during a X -second window = Y - CALM[8:0]
|
||||
with Y = 512U, 256U, 128 when X = 32U, 16U, 8U */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -309,7 +307,7 @@ typedef struct
|
|||
/** @defgroup RTCEx_Calib_Output_selection_Definitions RTC Extended Calib Output selection Definition
|
||||
* @{
|
||||
*/
|
||||
#define RTC_CALIBOUTPUT_512HZ (0x00000000U)
|
||||
#define RTC_CALIBOUTPUT_512HZ 0x00000000U
|
||||
#define RTC_CALIBOUTPUT_1HZ RTC_CR_COSEL
|
||||
/**
|
||||
* @}
|
||||
|
@ -318,7 +316,7 @@ typedef struct
|
|||
/** @defgroup RTCEx_Add_1_Second_Parameter_Definition RTC Extended Add 1 Second Parameter Definition
|
||||
* @{
|
||||
*/
|
||||
#define RTC_SHIFTADD1S_RESET (0x00000000U)
|
||||
#define RTC_SHIFTADD1S_RESET 0x00000000U
|
||||
#define RTC_SHIFTADD1S_SET RTC_SHIFTR_ADD1S
|
||||
/**
|
||||
* @}
|
||||
|
@ -339,22 +337,22 @@ typedef struct
|
|||
*/
|
||||
/**
|
||||
* @brief Enable the RTC WakeUp Timer peripheral.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_WAKEUPTIMER_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_WUTE))
|
||||
|
||||
/**
|
||||
* @brief Disable the RTC WakeUp Timer peripheral.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_WAKEUPTIMER_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_WUTE))
|
||||
|
||||
/**
|
||||
* @brief Enable the RTC WakeUpTimer interrupt.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC WakeUpTimer interrupt sources to be enabled.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC WakeUpTimer interrupt sources to be enabled.
|
||||
* This parameter can be:
|
||||
* @arg RTC_IT_WUT: WakeUpTimer interrupt
|
||||
* @retval None
|
||||
|
@ -363,8 +361,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Disable the RTC WakeUpTimer interrupt.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC WakeUpTimer interrupt sources to be disabled.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC WakeUpTimer interrupt sources to be disabled.
|
||||
* This parameter can be:
|
||||
* @arg RTC_IT_WUT: WakeUpTimer interrupt
|
||||
* @retval None
|
||||
|
@ -373,8 +371,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check whether the specified RTC WakeUpTimer interrupt has occurred or not.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC WakeUpTimer interrupt to check.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC WakeUpTimer interrupt to check.
|
||||
* This parameter can be:
|
||||
* @arg RTC_IT_WUT: WakeUpTimer interrupt
|
||||
* @retval None
|
||||
|
@ -383,8 +381,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check whether the specified RTC Wake Up timer interrupt has been enabled or not.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC Wake Up timer interrupt sources to check.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC Wake Up timer interrupt sources to check.
|
||||
* This parameter can be:
|
||||
* @arg RTC_IT_WUT: WakeUpTimer interrupt
|
||||
* @retval None
|
||||
|
@ -393,8 +391,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Get the selected RTC WakeUpTimer's flag status.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __FLAG__: specifies the RTC WakeUpTimer Flag is pending or not.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __FLAG__ specifies the RTC WakeUpTimer Flag is pending or not.
|
||||
* This parameter can be:
|
||||
* @arg RTC_FLAG_WUTF
|
||||
* @arg RTC_FLAG_WUTWF
|
||||
|
@ -404,8 +402,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Clear the RTC Wake Up timer's pending flags.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __FLAG__: specifies the RTC WakeUpTimer Flag to clear.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __FLAG__ specifies the RTC WakeUpTimer Flag to clear.
|
||||
* This parameter can be:
|
||||
* @arg RTC_FLAG_WUTF
|
||||
* @retval None
|
||||
|
@ -502,22 +500,22 @@ typedef struct
|
|||
*/
|
||||
/**
|
||||
* @brief Enable the RTC TimeStamp peripheral.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_TIMESTAMP_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_TSE))
|
||||
|
||||
/**
|
||||
* @brief Disable the RTC TimeStamp peripheral.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_TIMESTAMP_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_TSE))
|
||||
|
||||
/**
|
||||
* @brief Enable the RTC TimeStamp interrupt.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC TimeStamp interrupt source to be enabled.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC TimeStamp interrupt source to be enabled.
|
||||
* This parameter can be:
|
||||
* @arg RTC_IT_TS: TimeStamp interrupt
|
||||
* @retval None
|
||||
|
@ -526,8 +524,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Disable the RTC TimeStamp interrupt.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC TimeStamp interrupt source to be disabled.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC TimeStamp interrupt source to be disabled.
|
||||
* This parameter can be:
|
||||
* @arg RTC_IT_TS: TimeStamp interrupt
|
||||
* @retval None
|
||||
|
@ -536,8 +534,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check whether the specified RTC TimeStamp interrupt has occurred or not.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC TimeStamp interrupt to check.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC TimeStamp interrupt to check.
|
||||
* This parameter can be:
|
||||
* @arg RTC_IT_TS: TimeStamp interrupt
|
||||
* @retval None
|
||||
|
@ -546,8 +544,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check whether the specified RTC Time Stamp interrupt has been enabled or not.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC Time Stamp interrupt source to check.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC Time Stamp interrupt source to check.
|
||||
* This parameter can be:
|
||||
* @arg RTC_IT_TS: TimeStamp interrupt
|
||||
* @retval None
|
||||
|
@ -556,8 +554,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Get the selected RTC TimeStamp's flag status.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __FLAG__: specifies the RTC TimeStamp Flag is pending or not.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __FLAG__ specifies the RTC TimeStamp Flag is pending or not.
|
||||
* This parameter can be:
|
||||
* @arg RTC_FLAG_TSF
|
||||
* @arg RTC_FLAG_TSOVF
|
||||
|
@ -567,8 +565,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Clear the RTC Time Stamp's pending flags.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __FLAG__: specifies the RTC Alarm Flag to clear.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __FLAG__ specifies the RTC Alarm Flag to clear.
|
||||
* This parameter can be:
|
||||
* @arg RTC_FLAG_TSF
|
||||
* @retval None
|
||||
|
@ -586,28 +584,28 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enable the RTC Tamper1 input detection.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_TAMPER1_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->TAFCR |= (RTC_TAFCR_TAMP1E))
|
||||
|
||||
/**
|
||||
* @brief Disable the RTC Tamper1 input detection.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_TAMPER1_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->TAFCR &= ~(RTC_TAFCR_TAMP1E))
|
||||
|
||||
/**
|
||||
* @brief Enable the RTC Tamper2 input detection.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_TAMPER2_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->TAFCR |= (RTC_TAFCR_TAMP2E))
|
||||
|
||||
/**
|
||||
* @brief Disable the RTC Tamper2 input detection.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_TAMPER2_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->TAFCR &= ~(RTC_TAFCR_TAMP2E))
|
||||
|
@ -615,14 +613,14 @@ typedef struct
|
|||
#if defined(RTC_TAMPER3_SUPPORT)
|
||||
/**
|
||||
* @brief Enable the RTC Tamper3 input detection.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_TAMPER3_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->TAFCR |= (RTC_TAFCR_TAMP3E))
|
||||
|
||||
/**
|
||||
* @brief Disable the RTC Tamper3 input detection.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_TAMPER3_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->TAFCR &= ~(RTC_TAFCR_TAMP3E))
|
||||
|
@ -630,8 +628,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enable the RTC Tamper interrupt.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC Tamper interrupt sources to be enabled.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC Tamper interrupt sources to be enabled.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg RTC_IT_TAMP: Tamper interrupt
|
||||
* @retval None
|
||||
|
@ -640,8 +638,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Disable the RTC Tamper interrupt.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC Tamper interrupt sources to be disabled.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC Tamper interrupt sources to be disabled.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg RTC_IT_TAMP: Tamper interrupt
|
||||
* @retval None
|
||||
|
@ -650,8 +648,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check whether the specified RTC Tamper interrupt has occurred or not.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC Tamper interrupt to check.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC Tamper interrupt to check.
|
||||
* This parameter can be:
|
||||
* @arg RTC_IT_TAMP1: Tamper1 interrupt
|
||||
* @arg RTC_IT_TAMP2: Tamper2 interrupt
|
||||
|
@ -663,8 +661,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Check whether the specified RTC Tamper interrupt has been enabled or not.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __INTERRUPT__: specifies the RTC Tamper interrupt source to check.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __INTERRUPT__ specifies the RTC Tamper interrupt source to check.
|
||||
* This parameter can be:
|
||||
* @arg RTC_IT_TAMP: Tamper interrupt
|
||||
* @retval None
|
||||
|
@ -673,8 +671,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Get the selected RTC Tamper's flag status.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __FLAG__: specifies the RTC Tamper Flag is pending or not.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __FLAG__ specifies the RTC Tamper Flag is pending or not.
|
||||
* This parameter can be:
|
||||
* @arg RTC_FLAG_TAMP1F
|
||||
* @arg RTC_FLAG_TAMP2F
|
||||
|
@ -687,8 +685,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Clear the RTC Tamper's pending flags.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __FLAG__: specifies the RTC Tamper Flag to clear.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __FLAG__ specifies the RTC Tamper Flag to clear.
|
||||
* This parameter can be:
|
||||
* @arg RTC_FLAG_TAMP1F
|
||||
* @arg RTC_FLAG_TAMP2F
|
||||
|
@ -799,36 +797,36 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enable the RTC calibration output.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_CALIBRATION_OUTPUT_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_COE))
|
||||
|
||||
/**
|
||||
* @brief Disable the calibration output.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_CALIBRATION_OUTPUT_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_COE))
|
||||
|
||||
/**
|
||||
* @brief Enable the clock reference detection.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_CLOCKREF_DETECTION_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= (RTC_CR_REFCKON))
|
||||
|
||||
/**
|
||||
* @brief Disable the clock reference detection.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_CLOCKREF_DETECTION_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(RTC_CR_REFCKON))
|
||||
|
||||
/**
|
||||
* @brief Get the selected RTC shift operation's flag status.
|
||||
* @param __HANDLE__: specifies the RTC handle.
|
||||
* @param __FLAG__: specifies the RTC shift operation Flag is pending or not.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @param __FLAG__ specifies the RTC shift operation Flag is pending or not.
|
||||
* This parameter can be:
|
||||
* @arg RTC_FLAG_SHPF
|
||||
* @retval None
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_sdadc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief This file contains all the functions prototypes for the SDADC
|
||||
* firmware library.
|
||||
******************************************************************************
|
||||
|
@ -382,8 +380,8 @@ typedef struct
|
|||
/* final user. */
|
||||
|
||||
/** @brief Enable the ADC end of conversion interrupt.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __INTERRUPT__: ADC Interrupt
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __INTERRUPT__ ADC Interrupt
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg SDADC_IT_EOCAL: End of calibration interrupt enable
|
||||
* @arg SDADC_IT_JEOC: Injected end of conversion interrupt enable
|
||||
|
@ -396,8 +394,8 @@ typedef struct
|
|||
(SET_BIT((__HANDLE__)->Instance->CR1, (__INTERRUPT__)))
|
||||
|
||||
/** @brief Disable the ADC end of conversion interrupt.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __INTERRUPT__: ADC Interrupt
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __INTERRUPT__ ADC Interrupt
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg SDADC_IT_EOCAL: End of calibration interrupt enable
|
||||
* @arg SDADC_IT_JEOC: Injected end of conversion interrupt enable
|
||||
|
@ -410,8 +408,8 @@ typedef struct
|
|||
(CLEAR_BIT((__HANDLE__)->Instance->CR1, (__INTERRUPT__)))
|
||||
|
||||
/** @brief Checks if the specified ADC interrupt source is enabled or disabled.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __INTERRUPT__: ADC interrupt source to check
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __INTERRUPT__ ADC interrupt source to check
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg SDADC_IT_EOCAL: End of calibration interrupt enable
|
||||
* @arg SDADC_IT_JEOC: Injected end of conversion interrupt enable
|
||||
|
@ -424,8 +422,8 @@ typedef struct
|
|||
(((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__))
|
||||
|
||||
/** @brief Get the selected ADC's flag status.
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __FLAG__: ADC flag
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __FLAG__ ADC flag
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg SDADC_FLAG_EOCAL: End of calibration flag
|
||||
* @arg SDADC_FLAG_JEOC: End of injected conversion flag
|
||||
|
@ -438,8 +436,8 @@ typedef struct
|
|||
((((__HANDLE__)->Instance->ISR) & (__FLAG__)) == (__FLAG__))
|
||||
|
||||
/** @brief Clear the ADC's pending flags
|
||||
* @param __HANDLE__: ADC handle
|
||||
* @param __FLAG__: ADC flag
|
||||
* @param __HANDLE__ ADC handle
|
||||
* @param __FLAG__ ADC flag
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg SDADC_FLAG_EOCAL: End of calibration flag
|
||||
* @arg SDADC_FLAG_JEOC: End of injected conversion flag
|
||||
|
@ -452,7 +450,7 @@ typedef struct
|
|||
(CLEAR_BIT((__HANDLE__)->Instance->ISR, (__FLAG__)))
|
||||
|
||||
/** @brief Reset SDADC handle state
|
||||
* @param __HANDLE__: SDADC handle.
|
||||
* @param __HANDLE__ SDADC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SDADC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SDADC_STATE_RESET)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_smartcard.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of SMARTCARD HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -576,7 +574,7 @@ typedef enum
|
|||
*/
|
||||
|
||||
/** @brief Reset SMARTCARD handle states.
|
||||
* @param __HANDLE__: SMARTCARD handle.
|
||||
* @param __HANDLE__ SMARTCARD handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_RESET_HANDLE_STATE(__HANDLE__) do{ \
|
||||
|
@ -585,7 +583,7 @@ typedef enum
|
|||
} while(0U)
|
||||
|
||||
/** @brief Flush the Smartcard Data registers.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_FLUSH_DRREGISTER(__HANDLE__) \
|
||||
|
@ -595,8 +593,8 @@ typedef enum
|
|||
} while(0U)
|
||||
|
||||
/** @brief Clear the specified SMARTCARD pending flag.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg @ref SMARTCARD_CLEAR_PEF Parity error clear flag
|
||||
* @arg @ref SMARTCARD_CLEAR_FEF Framing error clear flag
|
||||
|
@ -611,39 +609,39 @@ typedef enum
|
|||
#define __HAL_SMARTCARD_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
|
||||
|
||||
/** @brief Clear the SMARTCARD PE pending flag.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_CLEAR_PEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_PEF)
|
||||
|
||||
|
||||
/** @brief Clear the SMARTCARD FE pending flag.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_CLEAR_FEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_FEF)
|
||||
|
||||
/** @brief Clear the SMARTCARD NE pending flag.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_CLEAR_NEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_NEF)
|
||||
|
||||
/** @brief Clear the SMARTCARD ORE pending flag.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_CLEAR_OREFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_OREF)
|
||||
|
||||
/** @brief Clear the SMARTCARD IDLE pending flag.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_CLEAR_IDLEFLAG(__HANDLE__) __HAL_SMARTCARD_CLEAR_FLAG((__HANDLE__), SMARTCARD_CLEAR_IDLEF)
|
||||
|
||||
/** @brief Check whether the specified Smartcard flag is set or not.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref SMARTCARD_FLAG_REACK Receive enable acknowledge flag
|
||||
* @arg @ref SMARTCARD_FLAG_TEACK Transmit enable acknowledge flag
|
||||
|
@ -664,8 +662,8 @@ typedef enum
|
|||
|
||||
|
||||
/** @brief Enable the specified SmartCard interrupt.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __INTERRUPT__: specifies the SMARTCARD interrupt to enable.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @param __INTERRUPT__ specifies the SMARTCARD interrupt to enable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref SMARTCARD_IT_EOB End of block interrupt
|
||||
* @arg @ref SMARTCARD_IT_RTO Receive timeout interrupt
|
||||
|
@ -677,13 +675,13 @@ typedef enum
|
|||
* @arg @ref SMARTCARD_IT_ERR Error interrupt(frame error, noise error, overrun error)
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((((uint8_t)(__INTERRUPT__)) >> 5U) == 1U)? ((__HANDLE__)->Instance->CR1 |= (1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
|
||||
((((uint8_t)(__INTERRUPT__)) >> 5U) == 2U)? ((__HANDLE__)->Instance->CR2 |= (1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
|
||||
#define __HAL_SMARTCARD_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((((__INTERRUPT__) & 0xFFU) >> 5U) == 1U)? ((__HANDLE__)->Instance->CR1 |= (1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
|
||||
((((__INTERRUPT__) & 0xFFU) >> 5U) == 2U)? ((__HANDLE__)->Instance->CR2 |= (1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
|
||||
((__HANDLE__)->Instance->CR3 |= (1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))))
|
||||
|
||||
/** @brief Disable the specified SmartCard interrupt.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __INTERRUPT__: specifies the SMARTCARD interrupt to disable.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @param __INTERRUPT__ specifies the SMARTCARD interrupt to disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref SMARTCARD_IT_EOB End of block interrupt
|
||||
* @arg @ref SMARTCARD_IT_RTO Receive timeout interrupt
|
||||
|
@ -695,14 +693,14 @@ typedef enum
|
|||
* @arg @ref SMARTCARD_IT_ERR Error interrupt(frame error, noise error, overrun error)
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((((uint8_t)(__INTERRUPT__)) >> 5U) == 1U)? ((__HANDLE__)->Instance->CR1 &= ~ (1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
|
||||
((((uint8_t)(__INTERRUPT__)) >> 5U) == 2U)? ((__HANDLE__)->Instance->CR2 &= ~ (1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
|
||||
#define __HAL_SMARTCARD_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((((__INTERRUPT__) & 0xFFU) >> 5U) == 1U)? ((__HANDLE__)->Instance->CR1 &= ~ (1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
|
||||
((((__INTERRUPT__) & 0xFFU) >> 5U) == 2U)? ((__HANDLE__)->Instance->CR2 &= ~ (1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \
|
||||
((__HANDLE__)->Instance->CR3 &= ~ (1U << ((__INTERRUPT__) & SMARTCARD_IT_MASK))))
|
||||
|
||||
|
||||
/** @brief Check whether the specified SmartCard interrupt has occurred or not.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __IT__: specifies the SMARTCARD interrupt to check.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @param __IT__ specifies the SMARTCARD interrupt to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref SMARTCARD_IT_EOB End of block interrupt
|
||||
* @arg @ref SMARTCARD_IT_RTO Receive timeout interrupt
|
||||
|
@ -719,8 +717,8 @@ typedef enum
|
|||
#define __HAL_SMARTCARD_GET_IT(__HANDLE__, __IT__) ((__HANDLE__)->Instance->ISR & (1U << ((__IT__)>> 0x08U)))
|
||||
|
||||
/** @brief Check whether the specified SmartCard interrupt source is enabled or not.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __IT__: specifies the SMARTCARD interrupt source to check.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @param __IT__ specifies the SMARTCARD interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref SMARTCARD_IT_EOB End of block interrupt
|
||||
* @arg @ref SMARTCARD_IT_RTO Receive timeout interrupt
|
||||
|
@ -732,14 +730,14 @@ typedef enum
|
|||
* @arg @ref SMARTCARD_IT_PE Parity error interrupt
|
||||
* @retval The new state of __IT__ (TRUE or FALSE).
|
||||
*/
|
||||
#define __HAL_SMARTCARD_GET_IT_SOURCE(__HANDLE__, __IT__) ((((((uint8_t)(__IT__)) >> 5U) == 1U)? (__HANDLE__)->Instance->CR1 : \
|
||||
(((((uint8_t)(__IT__)) >> 5U) == 2U)? (__HANDLE__)->Instance->CR2 : \
|
||||
#define __HAL_SMARTCARD_GET_IT_SOURCE(__HANDLE__, __IT__) ((((((__IT__) & 0xFFU) >> 5U) == 1U)? (__HANDLE__)->Instance->CR1 : \
|
||||
(((((__IT__) & 0xFFU) >> 5U) == 2U)? (__HANDLE__)->Instance->CR2 : \
|
||||
(__HANDLE__)->Instance->CR3)) & (1U << (((uint16_t)(__IT__)) & SMARTCARD_IT_MASK)))
|
||||
|
||||
|
||||
/** @brief Clear the specified SMARTCARD ISR flag, in setting the proper ICR register flag.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __IT_CLEAR__: specifies the interrupt clear register flag that needs to be set
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @param __IT_CLEAR__ specifies the interrupt clear register flag that needs to be set
|
||||
* to clear the corresponding interrupt.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref SMARTCARD_CLEAR_PEF Parity error clear flag
|
||||
|
@ -755,8 +753,8 @@ typedef enum
|
|||
#define __HAL_SMARTCARD_CLEAR_IT(__HANDLE__, __IT_CLEAR__) ((__HANDLE__)->Instance->ICR = (uint32_t)(__IT_CLEAR__))
|
||||
|
||||
/** @brief Set a specific SMARTCARD request flag.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __REQ__: specifies the request flag to set
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @param __REQ__ specifies the request flag to set
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref SMARTCARD_RXDATA_FLUSH_REQUEST Receive data flush Request
|
||||
* @arg @ref SMARTCARD_TXDATA_FLUSH_REQUEST Transmit data flush Request
|
||||
|
@ -766,25 +764,25 @@ typedef enum
|
|||
#define __HAL_SMARTCARD_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (uint16_t)(__REQ__))
|
||||
|
||||
/** @brief Enable the SMARTCARD one bit sample method.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
|
||||
|
||||
/** @brief Disable the SMARTCARD one bit sample method.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3 &= (uint32_t)~((uint32_t)USART_CR3_ONEBIT))
|
||||
|
||||
/** @brief Enable the USART associated to the SMARTCARD Handle.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)
|
||||
|
||||
/** @brief Disable the USART associated to the SMARTCARD Handle
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SMARTCARD_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
|
||||
|
@ -801,42 +799,42 @@ typedef enum
|
|||
/** @brief Check the Baud rate range.
|
||||
* @note The maximum Baud Rate is derived from the maximum clock on F3 (72 MHz)
|
||||
* divided by the oversampling used on the SMARTCARD (i.e. 16).
|
||||
* @param __BAUDRATE__: Baud rate set by the configuration function.
|
||||
* @param __BAUDRATE__ Baud rate set by the configuration function.
|
||||
* @retval Test result (TRUE or FALSE)
|
||||
*/
|
||||
#define IS_SMARTCARD_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) < 4500001U)
|
||||
|
||||
/** @brief Check the block length range.
|
||||
* @note The maximum SMARTCARD block length is 0xFF.
|
||||
* @param __LENGTH__: block length.
|
||||
* @param __LENGTH__ block length.
|
||||
* @retval Test result (TRUE or FALSE)
|
||||
*/
|
||||
#define IS_SMARTCARD_BLOCKLENGTH(__LENGTH__) ((__LENGTH__) <= 0xFFU)
|
||||
|
||||
/** @brief Check the receiver timeout value.
|
||||
* @note The maximum SMARTCARD receiver timeout value is 0xFFFFFF.
|
||||
* @param __TIMEOUTVALUE__: receiver timeout value.
|
||||
* @param __TIMEOUTVALUE__ receiver timeout value.
|
||||
* @retval Test result (TRUE or FALSE)
|
||||
*/
|
||||
#define IS_SMARTCARD_TIMEOUT_VALUE(__TIMEOUTVALUE__) ((__TIMEOUTVALUE__) <= 0xFFFFFFU)
|
||||
|
||||
/** @brief Check the SMARTCARD autoretry counter value.
|
||||
* @note The maximum number of retransmissions is 0x7.
|
||||
* @param __COUNT__: number of retransmissions.
|
||||
* @param __COUNT__ number of retransmissions.
|
||||
* @retval Test result (TRUE or FALSE)
|
||||
*/
|
||||
#define IS_SMARTCARD_AUTORETRY_COUNT(__COUNT__) ((__COUNT__) <= 0x7U)
|
||||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame length is valid.
|
||||
* @param __LENGTH__: SMARTCARD frame length.
|
||||
* @param __LENGTH__ SMARTCARD frame length.
|
||||
* @retval SET (__LENGTH__ is valid) or RESET (__LENGTH__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_WORD_LENGTH(__LENGTH__) ((__LENGTH__) == SMARTCARD_WORDLENGTH_9B)
|
||||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame number of stop bits is valid.
|
||||
* @param __STOPBITS__: SMARTCARD frame number of stop bits.
|
||||
* @param __STOPBITS__ SMARTCARD frame number of stop bits.
|
||||
* @retval SET (__STOPBITS__ is valid) or RESET (__STOPBITS__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_STOPBITS(__STOPBITS__) (((__STOPBITS__) == SMARTCARD_STOPBITS_0_5) ||\
|
||||
|
@ -844,7 +842,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame parity is valid.
|
||||
* @param __PARITY__: SMARTCARD frame parity.
|
||||
* @param __PARITY__ SMARTCARD frame parity.
|
||||
* @retval SET (__PARITY__ is valid) or RESET (__PARITY__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_PARITY(__PARITY__) (((__PARITY__) == SMARTCARD_PARITY_EVEN) || \
|
||||
|
@ -852,28 +850,28 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD communication mode is valid.
|
||||
* @param __MODE__: SMARTCARD communication mode.
|
||||
* @param __MODE__ SMARTCARD communication mode.
|
||||
* @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_MODE(__MODE__) ((((__MODE__) & (uint16_t)0xFFF3U) == 0x00U) && ((__MODE__) != (uint16_t)0x00U))
|
||||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame polarity is valid.
|
||||
* @param __CPOL__: SMARTCARD frame polarity.
|
||||
* @param __CPOL__ SMARTCARD frame polarity.
|
||||
* @retval SET (__CPOL__ is valid) or RESET (__CPOL__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_POLARITY(__CPOL__) (((__CPOL__) == SMARTCARD_POLARITY_LOW) || ((__CPOL__) == SMARTCARD_POLARITY_HIGH))
|
||||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame phase is valid.
|
||||
* @param __CPHA__: SMARTCARD frame phase.
|
||||
* @param __CPHA__ SMARTCARD frame phase.
|
||||
* @retval SET (__CPHA__ is valid) or RESET (__CPHA__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_PHASE(__CPHA__) (((__CPHA__) == SMARTCARD_PHASE_1EDGE) || ((__CPHA__) == SMARTCARD_PHASE_2EDGE))
|
||||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame last bit clock pulse setting is valid.
|
||||
* @param __LASTBIT__: SMARTCARD frame last bit clock pulse setting.
|
||||
* @param __LASTBIT__ SMARTCARD frame last bit clock pulse setting.
|
||||
* @retval SET (__LASTBIT__ is valid) or RESET (__LASTBIT__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_LASTBIT(__LASTBIT__) (((__LASTBIT__) == SMARTCARD_LASTBIT_DISABLE) || \
|
||||
|
@ -881,7 +879,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame sampling is valid.
|
||||
* @param __ONEBIT__: SMARTCARD frame sampling.
|
||||
* @param __ONEBIT__ SMARTCARD frame sampling.
|
||||
* @retval SET (__ONEBIT__ is valid) or RESET (__ONEBIT__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_ONE_BIT_SAMPLE(__ONEBIT__) (((__ONEBIT__) == SMARTCARD_ONE_BIT_SAMPLE_DISABLE) || \
|
||||
|
@ -889,7 +887,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD NACK transmission setting is valid.
|
||||
* @param __NACK__: SMARTCARD NACK transmission setting.
|
||||
* @param __NACK__ SMARTCARD NACK transmission setting.
|
||||
* @retval SET (__NACK__ is valid) or RESET (__NACK__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_NACK(__NACK__) (((__NACK__) == SMARTCARD_NACK_ENABLE) || \
|
||||
|
@ -897,7 +895,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD receiver timeout setting is valid.
|
||||
* @param __TIMEOUT__: SMARTCARD receiver timeout setting.
|
||||
* @param __TIMEOUT__ SMARTCARD receiver timeout setting.
|
||||
* @retval SET (__TIMEOUT__ is valid) or RESET (__TIMEOUT__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_TIMEOUT(__TIMEOUT__) (((__TIMEOUT__) == SMARTCARD_TIMEOUT_DISABLE) || \
|
||||
|
@ -905,7 +903,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD advanced features initialization is valid.
|
||||
* @param __INIT__: SMARTCARD advanced features initialization.
|
||||
* @param __INIT__ SMARTCARD advanced features initialization.
|
||||
* @retval SET (__INIT__ is valid) or RESET (__INIT__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_ADVFEATURE_INIT(__INIT__) ((__INIT__) <= (SMARTCARD_ADVFEATURE_NO_INIT | \
|
||||
|
@ -919,7 +917,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame TX inversion setting is valid.
|
||||
* @param __TXINV__: SMARTCARD frame TX inversion setting.
|
||||
* @param __TXINV__ SMARTCARD frame TX inversion setting.
|
||||
* @retval SET (__TXINV__ is valid) or RESET (__TXINV__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_ADVFEATURE_TXINV(__TXINV__) (((__TXINV__) == SMARTCARD_ADVFEATURE_TXINV_DISABLE) || \
|
||||
|
@ -927,7 +925,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame RX inversion setting is valid.
|
||||
* @param __RXINV__: SMARTCARD frame RX inversion setting.
|
||||
* @param __RXINV__ SMARTCARD frame RX inversion setting.
|
||||
* @retval SET (__RXINV__ is valid) or RESET (__RXINV__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_ADVFEATURE_RXINV(__RXINV__) (((__RXINV__) == SMARTCARD_ADVFEATURE_RXINV_DISABLE) || \
|
||||
|
@ -935,7 +933,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame data inversion setting is valid.
|
||||
* @param __DATAINV__: SMARTCARD frame data inversion setting.
|
||||
* @param __DATAINV__ SMARTCARD frame data inversion setting.
|
||||
* @retval SET (__DATAINV__ is valid) or RESET (__DATAINV__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_ADVFEATURE_DATAINV(__DATAINV__) (((__DATAINV__) == SMARTCARD_ADVFEATURE_DATAINV_DISABLE) || \
|
||||
|
@ -943,7 +941,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame RX/TX pins swap setting is valid.
|
||||
* @param __SWAP__: SMARTCARD frame RX/TX pins swap setting.
|
||||
* @param __SWAP__ SMARTCARD frame RX/TX pins swap setting.
|
||||
* @retval SET (__SWAP__ is valid) or RESET (__SWAP__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_ADVFEATURE_SWAP(__SWAP__) (((__SWAP__) == SMARTCARD_ADVFEATURE_SWAP_DISABLE) || \
|
||||
|
@ -951,7 +949,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame overrun setting is valid.
|
||||
* @param __OVERRUN__: SMARTCARD frame overrun setting.
|
||||
* @param __OVERRUN__ SMARTCARD frame overrun setting.
|
||||
* @retval SET (__OVERRUN__ is valid) or RESET (__OVERRUN__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_OVERRUN(__OVERRUN__) (((__OVERRUN__) == SMARTCARD_ADVFEATURE_OVERRUN_ENABLE) || \
|
||||
|
@ -959,7 +957,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD DMA enabling or disabling on error setting is valid.
|
||||
* @param __DMA__: SMARTCARD DMA enabling or disabling on error setting.
|
||||
* @param __DMA__ SMARTCARD DMA enabling or disabling on error setting.
|
||||
* @retval SET (__DMA__ is valid) or RESET (__DMA__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_ADVFEATURE_DMAONRXERROR(__DMA__) (((__DMA__) == SMARTCARD_ADVFEATURE_DMA_ENABLEONRXERROR) || \
|
||||
|
@ -967,7 +965,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD frame MSB first setting is valid.
|
||||
* @param __MSBFIRST__: SMARTCARD frame MSB first setting.
|
||||
* @param __MSBFIRST__ SMARTCARD frame MSB first setting.
|
||||
* @retval SET (__MSBFIRST__ is valid) or RESET (__MSBFIRST__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_ADVFEATURE_MSBFIRST(__MSBFIRST__) (((__MSBFIRST__) == SMARTCARD_ADVFEATURE_MSBFIRST_DISABLE) || \
|
||||
|
@ -975,7 +973,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* @brief Ensure that SMARTCARD request parameter is valid.
|
||||
* @param __PARAM__: SMARTCARD request parameter.
|
||||
* @param __PARAM__ SMARTCARD request parameter.
|
||||
* @retval SET (__PARAM__ is valid) or RESET (__PARAM__ is invalid)
|
||||
*/
|
||||
#define IS_SMARTCARD_REQUEST_PARAMETER(__PARAM__) (((__PARAM__) == SMARTCARD_RXDATA_FLUSH_REQUEST) || \
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_smartcard_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of SMARTCARD HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -63,8 +61,8 @@
|
|||
*/
|
||||
|
||||
/** @brief Report the SMARTCARD clock source.
|
||||
* @param __HANDLE__: specifies the SMARTCARD Handle.
|
||||
* @param __CLOCKSOURCE__: output variable.
|
||||
* @param __HANDLE__ specifies the SMARTCARD Handle.
|
||||
* @param __CLOCKSOURCE__ output variable.
|
||||
* @retval the SMARTCARD clocking source, written in __CLOCKSOURCE__.
|
||||
*/
|
||||
#if defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) || \
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_smbus.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of SMBUS HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -40,7 +38,7 @@
|
|||
#define __STM32F3xx_HAL_SMBUS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
|
@ -99,7 +97,7 @@ typedef struct
|
|||
This parameter can be a value of @ref SMBUS_peripheral_mode */
|
||||
|
||||
uint32_t SMBusTimeout; /*!< Specifies the content of the 32 Bits SMBUS_TIMEOUT_register value.
|
||||
(Enable bits and different timeout values)
|
||||
(Enable bits and different timeout values)
|
||||
This parameter calculated by referring to SMBUS initialization
|
||||
section in Reference manual */
|
||||
} SMBUS_InitTypeDef;
|
||||
|
@ -168,7 +166,7 @@ typedef struct
|
|||
|
||||
__IO uint32_t ErrorCode; /*!< SMBUS Error code */
|
||||
|
||||
}SMBUS_HandleTypeDef;
|
||||
} SMBUS_HandleTypeDef;
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -429,17 +427,17 @@ typedef struct
|
|||
* @param __HANDLE__ specifies the SMBUS Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref SMBUS_FLAG_TXE Transmit data register empty
|
||||
* @arg @ref SMBUS_FLAG_TXE Transmit data register empty
|
||||
* @arg @ref SMBUS_FLAG_TXIS Transmit interrupt status
|
||||
* @arg @ref SMBUS_FLAG_RXNE Receive data register not empty
|
||||
* @arg @ref SMBUS_FLAG_ADDR Address matched (slave mode)
|
||||
* @arg @ref SMBUS_FLAG_AF NACK received flag
|
||||
* @arg @ref SMBUS_FLAG_AF NACK received flag
|
||||
* @arg @ref SMBUS_FLAG_STOPF STOP detection flag
|
||||
* @arg @ref SMBUS_FLAG_TC Transfer complete (master mode)
|
||||
* @arg @ref SMBUS_FLAG_TCR Transfer complete reload
|
||||
* @arg @ref SMBUS_FLAG_TC Transfer complete (master mode)
|
||||
* @arg @ref SMBUS_FLAG_TCR Transfer complete reload
|
||||
* @arg @ref SMBUS_FLAG_BERR Bus error
|
||||
* @arg @ref SMBUS_FLAG_ARLO Arbitration lost
|
||||
* @arg @ref SMBUS_FLAG_OVR Overrun/Underrun
|
||||
* @arg @ref SMBUS_FLAG_OVR Overrun/Underrun
|
||||
* @arg @ref SMBUS_FLAG_PECERR PEC error in reception
|
||||
* @arg @ref SMBUS_FLAG_TIMEOUT Timeout or Tlow detection flag
|
||||
* @arg @ref SMBUS_FLAG_ALERT SMBus alert
|
||||
|
@ -456,11 +454,11 @@ typedef struct
|
|||
* @param __FLAG__ specifies the flag to clear.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg @ref SMBUS_FLAG_ADDR Address matched (slave mode)
|
||||
* @arg @ref SMBUS_FLAG_AF NACK received flag
|
||||
* @arg @ref SMBUS_FLAG_AF NACK received flag
|
||||
* @arg @ref SMBUS_FLAG_STOPF STOP detection flag
|
||||
* @arg @ref SMBUS_FLAG_BERR Bus error
|
||||
* @arg @ref SMBUS_FLAG_ARLO Arbitration lost
|
||||
* @arg @ref SMBUS_FLAG_OVR Overrun/Underrun
|
||||
* @arg @ref SMBUS_FLAG_OVR Overrun/Underrun
|
||||
* @arg @ref SMBUS_FLAG_PECERR PEC error in reception
|
||||
* @arg @ref SMBUS_FLAG_TIMEOUT Timeout or Tlow detection flag
|
||||
* @arg @ref SMBUS_FLAG_ALERT SMBus alert
|
||||
|
@ -502,6 +500,8 @@ typedef struct
|
|||
#define IS_SMBUS_ANALOG_FILTER(FILTER) (((FILTER) == SMBUS_ANALOGFILTER_ENABLE) || \
|
||||
((FILTER) == SMBUS_ANALOGFILTER_DISABLE))
|
||||
|
||||
#define IS_SMBUS_DIGITAL_FILTER(FILTER) ((FILTER) <= 0x0000000FU)
|
||||
|
||||
#define IS_SMBUS_ADDRESSING_MODE(MODE) (((MODE) == SMBUS_ADDRESSINGMODE_7BIT) || \
|
||||
((MODE) == SMBUS_ADDRESSINGMODE_10BIT))
|
||||
|
||||
|
@ -592,9 +592,11 @@ typedef struct
|
|||
|
||||
/* Initialization and de-initialization functions **********************************/
|
||||
HAL_StatusTypeDef HAL_SMBUS_Init(SMBUS_HandleTypeDef *hsmbus);
|
||||
HAL_StatusTypeDef HAL_SMBUS_DeInit (SMBUS_HandleTypeDef *hsmbus);
|
||||
HAL_StatusTypeDef HAL_SMBUS_DeInit(SMBUS_HandleTypeDef *hsmbus);
|
||||
void HAL_SMBUS_MspInit(SMBUS_HandleTypeDef *hsmbus);
|
||||
void HAL_SMBUS_MspDeInit(SMBUS_HandleTypeDef *hsmbus);
|
||||
HAL_StatusTypeDef HAL_SMBUS_ConfigAnalogFilter(SMBUS_HandleTypeDef *hsmbus, uint32_t AnalogFilter);
|
||||
HAL_StatusTypeDef HAL_SMBUS_ConfigDigitalFilter(SMBUS_HandleTypeDef *hsmbus, uint32_t DigitalFilter);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_spi.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of SPI HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -398,16 +396,16 @@ typedef struct __SPI_HandleTypeDef
|
|||
*/
|
||||
|
||||
/** @brief Reset SPI handle state.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SPI_STATE_RESET)
|
||||
|
||||
/** @brief Enable the specified SPI interrupts.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @param __INTERRUPT__: specifies the interrupt source to enable.
|
||||
* @param __INTERRUPT__ specifies the interrupt source to enable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SPI_IT_TXE: Tx buffer empty interrupt enable
|
||||
* @arg SPI_IT_RXNE: RX buffer not empty interrupt enable
|
||||
|
@ -417,9 +415,9 @@ typedef struct __SPI_HandleTypeDef
|
|||
#define __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))
|
||||
|
||||
/** @brief Disable the specified SPI interrupts.
|
||||
* @param __HANDLE__: specifies the SPI handle.
|
||||
* @param __HANDLE__ specifies the SPI handle.
|
||||
* This parameter can be SPIx where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @param __INTERRUPT__: specifies the interrupt source to disable.
|
||||
* @param __INTERRUPT__ specifies the interrupt source to disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SPI_IT_TXE: Tx buffer empty interrupt enable
|
||||
* @arg SPI_IT_RXNE: RX buffer not empty interrupt enable
|
||||
|
@ -429,9 +427,9 @@ typedef struct __SPI_HandleTypeDef
|
|||
#define __HAL_SPI_DISABLE_IT(__HANDLE__, __INTERRUPT__) CLEAR_BIT((__HANDLE__)->Instance->CR2, (__INTERRUPT__))
|
||||
|
||||
/** @brief Check whether the specified SPI interrupt source is enabled or not.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @param __INTERRUPT__: specifies the SPI interrupt source to check.
|
||||
* @param __INTERRUPT__ specifies the SPI interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SPI_IT_TXE: Tx buffer empty interrupt enable
|
||||
* @arg SPI_IT_RXNE: RX buffer not empty interrupt enable
|
||||
|
@ -441,9 +439,9 @@ typedef struct __SPI_HandleTypeDef
|
|||
#define __HAL_SPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
|
||||
|
||||
/** @brief Check whether the specified SPI flag is set or not.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SPI_FLAG_RXNE: Receive buffer not empty flag
|
||||
* @arg SPI_FLAG_TXE: Transmit buffer empty flag
|
||||
|
@ -459,14 +457,14 @@ typedef struct __SPI_HandleTypeDef
|
|||
#define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
|
||||
|
||||
/** @brief Clear the SPI CRCERR pending flag.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SPI_CLEAR_CRCERRFLAG(__HANDLE__) ((__HANDLE__)->Instance->SR = (uint16_t)(~SPI_FLAG_CRCERR))
|
||||
|
||||
/** @brief Clear the SPI MODF pending flag.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -479,7 +477,7 @@ typedef struct __SPI_HandleTypeDef
|
|||
} while(0U)
|
||||
|
||||
/** @brief Clear the SPI OVR pending flag.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -492,7 +490,7 @@ typedef struct __SPI_HandleTypeDef
|
|||
} while(0U)
|
||||
|
||||
/** @brief Clear the SPI FRE pending flag.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -504,14 +502,14 @@ typedef struct __SPI_HandleTypeDef
|
|||
}while(0U)
|
||||
|
||||
/** @brief Enable the SPI peripheral.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SPI_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_SPE)
|
||||
|
||||
/** @brief Disable the SPI peripheral.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -527,21 +525,21 @@ typedef struct __SPI_HandleTypeDef
|
|||
*/
|
||||
|
||||
/** @brief Set the SPI transmit-only mode.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define SPI_1LINE_TX(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_BIDIOE)
|
||||
|
||||
/** @brief Set the SPI receive-only mode.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
#define SPI_1LINE_RX(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR1, SPI_CR1_BIDIOE)
|
||||
|
||||
/** @brief Reset the CRC calculation of the SPI.
|
||||
* @param __HANDLE__: specifies the SPI Handle.
|
||||
* @param __HANDLE__ specifies the SPI Handle.
|
||||
* This parameter can be SPI where x: 1, 2, or 3 to select the SPI peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -613,6 +611,7 @@ typedef struct __SPI_HandleTypeDef
|
|||
|
||||
#define IS_SPI_DMA_HANDLE(HANDLE) ((HANDLE) != NULL)
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_spi_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of SPI HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_sram.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of SRAM HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -104,7 +102,7 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Reset SRAM handle state
|
||||
* @param __HANDLE__: SRAM handle
|
||||
* @param __HANDLE__ SRAM handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_SRAM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SRAM_STATE_RESET)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_tim.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of TIM HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -516,6 +514,9 @@ typedef struct
|
|||
#define TIM_FLAG_COM (TIM_SR_COMIF)
|
||||
#define TIM_FLAG_TRIGGER (TIM_SR_TIF)
|
||||
#define TIM_FLAG_BREAK (TIM_SR_BIF)
|
||||
#if defined(TIM_SR_B2IF)
|
||||
#define TIM_FLAG_BREAK2 (TIM_SR_B2IF)
|
||||
#endif
|
||||
#define TIM_FLAG_CC1OF (TIM_SR_CC1OF)
|
||||
#define TIM_FLAG_CC2OF (TIM_SR_CC2OF)
|
||||
#define TIM_FLAG_CC3OF (TIM_SR_CC3OF)
|
||||
|
@ -772,28 +773,28 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Reset TIM handle state
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TIM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_TIM_STATE_RESET)
|
||||
|
||||
/**
|
||||
* @brief Enable the TIM peripheral.
|
||||
* @param __HANDLE__: TIM handle
|
||||
* @param __HANDLE__ TIM handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TIM_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1|=(TIM_CR1_CEN))
|
||||
|
||||
/**
|
||||
* @brief Enable the TIM main Output.
|
||||
* @param __HANDLE__: TIM handle
|
||||
* @param __HANDLE__ TIM handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TIM_MOE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->BDTR|=(TIM_BDTR_MOE))
|
||||
|
||||
/**
|
||||
* @brief Disable the TIM peripheral.
|
||||
* @param __HANDLE__: TIM handle
|
||||
* @param __HANDLE__ TIM handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TIM_DISABLE(__HANDLE__) \
|
||||
|
@ -810,7 +811,7 @@ typedef struct
|
|||
channels have been disabled */
|
||||
/**
|
||||
* @brief Disable the TIM main Output.
|
||||
* @param __HANDLE__: TIM handle
|
||||
* @param __HANDLE__ TIM handle
|
||||
* @retval None
|
||||
* @note The Main Output Enable of a timer instance is disabled only if all the CCx and CCxN channels have been disabled
|
||||
*/
|
||||
|
@ -828,7 +829,7 @@ typedef struct
|
|||
/* The Main Output Enable of a timer instance is disabled unconditionally */
|
||||
/**
|
||||
* @brief Disable the TIM main Output.
|
||||
* @param __HANDLE__: TIM handle
|
||||
* @param __HANDLE__ TIM handle
|
||||
* @retval None
|
||||
* @note The Main Output Enable of a timer instance is disabled uncondiotionally
|
||||
*/
|
||||
|
@ -836,8 +837,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enables the specified TIM interrupt.
|
||||
* @param __HANDLE__: specifies the TIM Handle.
|
||||
* @param __INTERRUPT__: specifies the TIM interrupt source to enable.
|
||||
* @param __HANDLE__ specifies the TIM Handle.
|
||||
* @param __INTERRUPT__ specifies the TIM interrupt source to enable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_IT_UPDATE: Update interrupt
|
||||
* @arg TIM_IT_CC1: Capture/Compare 1 interrupt
|
||||
|
@ -853,8 +854,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Disables the specified TIM interrupt.
|
||||
* @param __HANDLE__: specifies the TIM Handle.
|
||||
* @param __INTERRUPT__: specifies the TIM interrupt source to disable.
|
||||
* @param __HANDLE__ specifies the TIM Handle.
|
||||
* @param __INTERRUPT__ specifies the TIM interrupt source to disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_IT_UPDATE: Update interrupt
|
||||
* @arg TIM_IT_CC1: Capture/Compare 1 interrupt
|
||||
|
@ -870,8 +871,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enables the specified DMA request.
|
||||
* @param __HANDLE__: specifies the TIM Handle.
|
||||
* @param __DMA__: specifies the TIM DMA request to enable.
|
||||
* @param __HANDLE__ specifies the TIM Handle.
|
||||
* @param __DMA__ specifies the TIM DMA request to enable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_DMA_UPDATE: Update DMA request
|
||||
* @arg TIM_DMA_CC1: Capture/Compare 1 DMA request
|
||||
|
@ -886,8 +887,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Disables the specified DMA request.
|
||||
* @param __HANDLE__: specifies the TIM Handle.
|
||||
* @param __DMA__: specifies the TIM DMA request to disable.
|
||||
* @param __HANDLE__ specifies the TIM Handle.
|
||||
* @param __DMA__ specifies the TIM DMA request to disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_DMA_UPDATE: Update DMA request
|
||||
* @arg TIM_DMA_CC1: Capture/Compare 1 DMA request
|
||||
|
@ -902,8 +903,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Checks whether the specified TIM interrupt flag is set or not.
|
||||
* @param __HANDLE__: specifies the TIM Handle.
|
||||
* @param __FLAG__: specifies the TIM interrupt flag to check.
|
||||
* @param __HANDLE__ specifies the TIM Handle.
|
||||
* @param __FLAG__ specifies the TIM interrupt flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_FLAG_UPDATE: Update interrupt flag
|
||||
* @arg TIM_FLAG_CC1: Capture/Compare 1 interrupt flag
|
||||
|
@ -923,8 +924,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Clears the specified TIM interrupt flag.
|
||||
* @param __HANDLE__: specifies the TIM Handle.
|
||||
* @param __FLAG__: specifies the TIM interrupt flag to clear.
|
||||
* @param __HANDLE__ specifies the TIM Handle.
|
||||
* @param __FLAG__ specifies the TIM interrupt flag to clear.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_FLAG_UPDATE: Update interrupt flag
|
||||
* @arg TIM_FLAG_CC1: Capture/Compare 1 interrupt flag
|
||||
|
@ -944,23 +945,23 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Checks whether the specified TIM interrupt has occurred or not.
|
||||
* @param __HANDLE__: TIM handle
|
||||
* @param __INTERRUPT__: specifies the TIM interrupt source to check.
|
||||
* @param __HANDLE__ TIM handle
|
||||
* @param __INTERRUPT__ specifies the TIM interrupt source to check.
|
||||
* @retval The state of TIM_IT (SET or RESET).
|
||||
*/
|
||||
#define __HAL_TIM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->DIER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
|
||||
|
||||
/**
|
||||
* @brief Clear the TIM interrupt pending bits
|
||||
* @param __HANDLE__: TIM handle
|
||||
* @param __INTERRUPT__: specifies the interrupt pending bit to clear.
|
||||
* @param __HANDLE__ TIM handle
|
||||
* @param __INTERRUPT__ specifies the interrupt pending bit to clear.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TIM_CLEAR_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->SR = ~(__INTERRUPT__))
|
||||
|
||||
/**
|
||||
* @brief Indicates whether or not the TIM Counter is used as downcounter
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @retval False (Counter used as upcounter) or True (Counter used as downcounter)
|
||||
* @note This macro is particularly usefull to get the counting mode when the timer operates in Center-aligned mode or Encoder mode.
|
||||
*/
|
||||
|
@ -968,24 +969,24 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Sets the TIM active prescaler register value on update event.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __PRESC__: specifies the active prescaler register new value.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __PRESC__ specifies the active prescaler register new value.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TIM_SET_PRESCALER (__HANDLE__, __PRESC__) ((__HANDLE__)->Instance->PSC = (__PRESC__))
|
||||
#define __HAL_TIM_SET_PRESCALER(__HANDLE__, __PRESC__) ((__HANDLE__)->Instance->PSC = (__PRESC__))
|
||||
|
||||
/**
|
||||
* @brief Sets the TIM Counter Register value on runtime.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __COUNTER__: specifies the Counter register new value.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __COUNTER__ specifies the Counter register new value.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TIM_SET_COUNTER(__HANDLE__, __COUNTER__) ((__HANDLE__)->Instance->CNT = (__COUNTER__))
|
||||
|
||||
/**
|
||||
* @brief Gets the TIM Counter Register value on runtime.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @retval None
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @retval 16-bit or 32-bit value of the timer counter register (TIMx_CNT)
|
||||
*/
|
||||
#define __HAL_TIM_GET_COUNTER(__HANDLE__) \
|
||||
((__HANDLE__)->Instance->CNT)
|
||||
|
@ -993,8 +994,8 @@ typedef struct
|
|||
/**
|
||||
* @brief Sets the TIM Autoreload Register value on runtime without calling
|
||||
* another time any Init function.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __AUTORELOAD__: specifies the Counter register new value.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __AUTORELOAD__ specifies the Counter register new value.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TIM_SET_AUTORELOAD(__HANDLE__, __AUTORELOAD__) \
|
||||
|
@ -1005,8 +1006,8 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Gets the TIM Autoreload Register value on runtime
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @retval None
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @retval 16-bit or 32-bit value of the timer auto-reload register(TIMx_ARR)
|
||||
*/
|
||||
#define __HAL_TIM_GET_AUTORELOAD(__HANDLE__) \
|
||||
((__HANDLE__)->Instance->ARR)
|
||||
|
@ -1014,12 +1015,12 @@ typedef struct
|
|||
/**
|
||||
* @brief Sets the TIM Clock Division value on runtime without calling
|
||||
* another time any Init function.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __CKD__: specifies the clock division value.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __CKD__ specifies the clock division value.
|
||||
* This parameter can be one of the following value:
|
||||
* @arg TIM_CLOCKDIVISION_DIV1
|
||||
* @arg TIM_CLOCKDIVISION_DIV2
|
||||
* @arg TIM_CLOCKDIVISION_DIV4
|
||||
* @arg TIM_CLOCKDIVISION_DIV1: tDTS=tCK_INT
|
||||
* @arg TIM_CLOCKDIVISION_DIV2: tDTS=2*tCK_INT
|
||||
* @arg TIM_CLOCKDIVISION_DIV4: tDTS=4*tCK_INT
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TIM_SET_CLOCKDIVISION(__HANDLE__, __CKD__) \
|
||||
|
@ -1031,8 +1032,11 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Gets the TIM Clock Division value on runtime
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @retval None
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @retval The clock division can be one of the following values:
|
||||
* @arg TIM_CLOCKDIVISION_DIV1: tDTS=tCK_INT
|
||||
* @arg TIM_CLOCKDIVISION_DIV2: tDTS=2*tCK_INT
|
||||
* @arg TIM_CLOCKDIVISION_DIV4: tDTS=4*tCK_INT
|
||||
*/
|
||||
#define __HAL_TIM_GET_CLOCKDIVISION(__HANDLE__) \
|
||||
((__HANDLE__)->Instance->CR1 & TIM_CR1_CKD)
|
||||
|
@ -1040,14 +1044,14 @@ typedef struct
|
|||
/**
|
||||
* @brief Sets the TIM Input Capture prescaler on runtime without calling
|
||||
* another time HAL_TIM_IC_ConfigChannel() function.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __CHANNEL__: TIM Channels to be configured.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __CHANNEL__ TIM Channels to be configured.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_CHANNEL_1: TIM Channel 1 selected
|
||||
* @arg TIM_CHANNEL_2: TIM Channel 2 selected
|
||||
* @arg TIM_CHANNEL_3: TIM Channel 3 selected
|
||||
* @arg TIM_CHANNEL_4: TIM Channel 4 selected
|
||||
* @param __ICPSC__: specifies the Input Capture4 prescaler new value.
|
||||
* @param __ICPSC__ specifies the Input Capture4 prescaler new value.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_ICPSC_DIV1: no prescaler
|
||||
* @arg TIM_ICPSC_DIV2: capture is done once every 2 events
|
||||
|
@ -1063,14 +1067,18 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Gets the TIM Input Capture prescaler on runtime
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __CHANNEL__: TIM Channels to be configured.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __CHANNEL__ TIM Channels to be configured.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_CHANNEL_1: get input capture 1 prescaler value
|
||||
* @arg TIM_CHANNEL_2: get input capture 2 prescaler value
|
||||
* @arg TIM_CHANNEL_3: get input capture 3 prescaler value
|
||||
* @arg TIM_CHANNEL_4: get input capture 4 prescaler value
|
||||
* @retval None
|
||||
* @retval The input capture prescaler can be one of the following values:
|
||||
* @arg TIM_ICPSC_DIV1: no prescaler
|
||||
* @arg TIM_ICPSC_DIV2: capture is done once every 2 events
|
||||
* @arg TIM_ICPSC_DIV4: capture is done once every 4 events
|
||||
* @arg TIM_ICPSC_DIV8: capture is done once every 8 events
|
||||
*/
|
||||
#define __HAL_TIM_GET_ICPRESCALER(__HANDLE__, __CHANNEL__) \
|
||||
(((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->Instance->CCMR1 & TIM_CCMR1_IC1PSC) :\
|
||||
|
@ -1080,7 +1088,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Set the Update Request Source (URS) bit of the TIMx_CR1 register
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @note When the USR bit of the TIMx_CR1 register is set, only counter
|
||||
* overflow/underflow generates an update interrupt or DMA request (if
|
||||
* enabled)
|
||||
|
@ -1091,7 +1099,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Reset the Update Request Source (URS) bit of the TIMx_CR1 register
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @note When the USR bit of the TIMx_CR1 register is reset, any of the
|
||||
* following events generate an update interrupt or DMA request (if
|
||||
* enabled):
|
||||
|
@ -1105,14 +1113,14 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Sets the TIM Capture x input polarity on runtime.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __CHANNEL__: TIM Channels to be configured.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __CHANNEL__ TIM Channels to be configured.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_CHANNEL_1: TIM Channel 1 selected
|
||||
* @arg TIM_CHANNEL_2: TIM Channel 2 selected
|
||||
* @arg TIM_CHANNEL_3: TIM Channel 3 selected
|
||||
* @arg TIM_CHANNEL_4: TIM Channel 4 selected
|
||||
* @param __POLARITY__: Polarity for TIx source
|
||||
* @param __POLARITY__ Polarity for TIx source
|
||||
* @arg TIM_INPUTCHANNELPOLARITY_RISING: Rising Edge
|
||||
* @arg TIM_INPUTCHANNELPOLARITY_FALLING: Falling Edge
|
||||
* @arg TIM_INPUTCHANNELPOLARITY_BOTHEDGE: Rising and Falling Edge
|
||||
|
@ -1317,12 +1325,14 @@ typedef struct
|
|||
((LENGTH) == TIM_DMABURSTLENGTH_17TRANSFERS) || \
|
||||
((LENGTH) == TIM_DMABURSTLENGTH_18TRANSFERS))
|
||||
|
||||
#define IS_TIM_DMA_DATA_LENGTH(LENGTH) (((LENGTH) >= 0x1U) && ((LENGTH) < 0x10000U))
|
||||
|
||||
#define IS_TIM_IC_FILTER(ICFILTER) ((ICFILTER) <= 0xFU)
|
||||
|
||||
/** @brief Set TIM IC prescaler
|
||||
* @param __HANDLE__: TIM handle
|
||||
* @param __CHANNEL__: specifies TIM Channel
|
||||
* @param __ICPSC__: specifies the prescaler value.
|
||||
* @param __HANDLE__ TIM handle
|
||||
* @param __CHANNEL__ specifies TIM Channel
|
||||
* @param __ICPSC__ specifies the prescaler value.
|
||||
* @retval None
|
||||
*/
|
||||
#define TIM_SET_ICPRESCALERVALUE(__HANDLE__, __CHANNEL__, __ICPSC__) \
|
||||
|
@ -1332,8 +1342,8 @@ typedef struct
|
|||
((__HANDLE__)->Instance->CCMR2 |= ((__ICPSC__) << 8U)))
|
||||
|
||||
/** @brief Reset TIM IC prescaler
|
||||
* @param __HANDLE__: TIM handle
|
||||
* @param __CHANNEL__: specifies TIM Channel
|
||||
* @param __HANDLE__ TIM handle
|
||||
* @param __CHANNEL__ specifies TIM Channel
|
||||
* @retval None
|
||||
*/
|
||||
#define TIM_RESET_ICPRESCALERVALUE(__HANDLE__, __CHANNEL__) \
|
||||
|
@ -1343,9 +1353,9 @@ typedef struct
|
|||
((__HANDLE__)->Instance->CCMR2 &= (uint16_t)~TIM_CCMR2_IC4PSC))
|
||||
|
||||
/** @brief Set TIM IC polarity
|
||||
* @param __HANDLE__: TIM handle
|
||||
* @param __CHANNEL__: specifies TIM Channel
|
||||
* @param __POLARITY__: specifies TIM Channel Polarity
|
||||
* @param __HANDLE__ TIM handle
|
||||
* @param __CHANNEL__ specifies TIM Channel
|
||||
* @param __POLARITY__ specifies TIM Channel Polarity
|
||||
* @retval None
|
||||
*/
|
||||
#define TIM_SET_CAPTUREPOLARITY(__HANDLE__, __CHANNEL__, __POLARITY__) \
|
||||
|
@ -1355,8 +1365,8 @@ typedef struct
|
|||
((__HANDLE__)->Instance->CCER |= (((__POLARITY__) << 12U))))
|
||||
|
||||
/** @brief Reset TIM IC polarity
|
||||
* @param __HANDLE__: TIM handle
|
||||
* @param __CHANNEL__: specifies TIM Channel
|
||||
* @param __HANDLE__ TIM handle
|
||||
* @param __CHANNEL__ specifies TIM Channel
|
||||
* @retval None
|
||||
*/
|
||||
#define TIM_RESET_CAPTUREPOLARITY(__HANDLE__, __CHANNEL__) \
|
||||
|
@ -1526,9 +1536,13 @@ HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchronization(TIM_HandleTypeDef *htim, TI
|
|||
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchronization_IT(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef * sSlaveConfig);
|
||||
HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress, uint32_t BurstRequestSrc, \
|
||||
uint32_t *BurstBuffer, uint32_t BurstLength);
|
||||
HAL_StatusTypeDef HAL_TIM_DMABurst_MultiWriteStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress, uint32_t BurstRequestSrc, \
|
||||
uint32_t *BurstBuffer, uint32_t BurstLength, uint32_t DataLength);
|
||||
HAL_StatusTypeDef HAL_TIM_DMABurst_WriteStop(TIM_HandleTypeDef *htim, uint32_t BurstRequestSrc);
|
||||
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress, uint32_t BurstRequestSrc, \
|
||||
uint32_t *BurstBuffer, uint32_t BurstLength);
|
||||
HAL_StatusTypeDef HAL_TIM_DMABurst_MultiReadStart(TIM_HandleTypeDef *htim, uint32_t BurstBaseAddress, uint32_t BurstRequestSrc, \
|
||||
uint32_t *BurstBuffer, uint32_t BurstLength, uint32_t DataLength);
|
||||
HAL_StatusTypeDef HAL_TIM_DMABurst_ReadStop(TIM_HandleTypeDef *htim, uint32_t BurstRequestSrc);
|
||||
HAL_StatusTypeDef HAL_TIM_GenerateEvent(TIM_HandleTypeDef *htim, uint32_t EventSource);
|
||||
uint32_t HAL_TIM_ReadCapturedValue(TIM_HandleTypeDef *htim, uint32_t Channel);
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_tim_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of TIM HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -910,14 +908,14 @@ typedef struct {
|
|||
/**
|
||||
* @brief Sets the TIM Capture Compare Register value on runtime without
|
||||
* calling another time ConfigChannel function.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __CHANNEL__: TIM Channels to be configured.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __CHANNEL__ TIM Channels to be configured.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_CHANNEL_1: TIM Channel 1 selected
|
||||
* @arg TIM_CHANNEL_2: TIM Channel 2 selected
|
||||
* @arg TIM_CHANNEL_3: TIM Channel 3 selected
|
||||
* @arg TIM_CHANNEL_4: TIM Channel 4 selected
|
||||
* @param __COMPARE__: specifies the Capture Compare register new value.
|
||||
* @param __COMPARE__ specifies the Capture Compare register new value.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TIM_SET_COMPARE(__HANDLE__, __CHANNEL__, __COMPARE__) \
|
||||
|
@ -925,8 +923,8 @@ typedef struct {
|
|||
|
||||
/**
|
||||
* @brief Gets the TIM Capture Compare Register value on runtime
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __CHANNEL__: TIM Channel associated with the capture compare register
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __CHANNEL__ TIM Channel associated with the capture compare register
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_CHANNEL_1: get capture/compare 1 register value
|
||||
* @arg TIM_CHANNEL_2: get capture/compare 2 register value
|
||||
|
@ -939,8 +937,8 @@ typedef struct {
|
|||
|
||||
/**
|
||||
* @brief Sets the TIM Output compare preload.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __CHANNEL__: TIM Channels to be configured.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __CHANNEL__ TIM Channels to be configured.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_CHANNEL_1: TIM Channel 1 selected
|
||||
* @arg TIM_CHANNEL_2: TIM Channel 2 selected
|
||||
|
@ -956,8 +954,8 @@ typedef struct {
|
|||
|
||||
/**
|
||||
* @brief Resets the TIM Output compare preload.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __CHANNEL__: TIM Channels to be configured.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __CHANNEL__ TIM Channels to be configured.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_CHANNEL_1: TIM Channel 1 selected
|
||||
* @arg TIM_CHANNEL_2: TIM Channel 2 selected
|
||||
|
@ -980,8 +978,8 @@ typedef struct {
|
|||
/**
|
||||
* @brief Sets the TIM Capture Compare Register value on runtime without
|
||||
* calling another time ConfigChannel function.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __CHANNEL__: TIM Channels to be configured.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __CHANNEL__ TIM Channels to be configured.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_CHANNEL_1: TIM Channel 1 selected
|
||||
* @arg TIM_CHANNEL_2: TIM Channel 2 selected
|
||||
|
@ -989,7 +987,7 @@ typedef struct {
|
|||
* @arg TIM_CHANNEL_4: TIM Channel 4 selected
|
||||
* @arg TIM_CHANNEL_5: TIM Channel 5 selected
|
||||
* @arg TIM_CHANNEL_6: TIM Channel 6 selected
|
||||
* @param __COMPARE__: specifies the Capture Compare register new value.
|
||||
* @param __COMPARE__ specifies the Capture Compare register new value.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TIM_SET_COMPARE(__HANDLE__, __CHANNEL__, __COMPARE__) \
|
||||
|
@ -1002,8 +1000,8 @@ typedef struct {
|
|||
|
||||
/**
|
||||
* @brief Gets the TIM Capture Compare Register value on runtime
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __CHANNEL__: TIM Channel associated with the capture compare register
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __CHANNEL__ TIM Channel associated with the capture compare register
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_CHANNEL_1: get capture/compare 1 register value
|
||||
* @arg TIM_CHANNEL_2: get capture/compare 2 register value
|
||||
|
@ -1023,8 +1021,8 @@ typedef struct {
|
|||
|
||||
/**
|
||||
* @brief Sets the TIM Output compare preload.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __CHANNEL__: TIM Channels to be configured.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __CHANNEL__ TIM Channels to be configured.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_CHANNEL_1: TIM Channel 1 selected
|
||||
* @arg TIM_CHANNEL_2: TIM Channel 2 selected
|
||||
|
@ -1044,8 +1042,8 @@ typedef struct {
|
|||
|
||||
/**
|
||||
* @brief Resets the TIM Output compare preload.
|
||||
* @param __HANDLE__: TIM handle.
|
||||
* @param __CHANNEL__: TIM Channels to be configured.
|
||||
* @param __HANDLE__ TIM handle.
|
||||
* @param __CHANNEL__ TIM Channels to be configured.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg TIM_CHANNEL_1: TIM Channel 1 selected
|
||||
* @arg TIM_CHANNEL_2: TIM Channel 2 selected
|
||||
|
@ -1198,6 +1196,7 @@ HAL_StatusTypeDef HAL_TIMEx_GroupChannel5(TIM_HandleTypeDef *htim, uint32_t Chan
|
|||
/* Extended Callback *********************************************************/
|
||||
void HAL_TIMEx_CommutationCallback(TIM_HandleTypeDef *htim);
|
||||
void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim);
|
||||
void HAL_TIMEx_Break2Callback(TIM_HandleTypeDef *htim);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_tsc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of TSC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -369,189 +367,189 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Reset TSC handle state.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_TSC_STATE_RESET)
|
||||
|
||||
/**
|
||||
* @brief Enable the TSC peripheral.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= TSC_CR_TSCE)
|
||||
|
||||
/**
|
||||
* @brief Disable the TSC peripheral.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= (uint32_t)(~TSC_CR_TSCE))
|
||||
|
||||
/**
|
||||
* @brief Start acquisition.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_START_ACQ(__HANDLE__) ((__HANDLE__)->Instance->CR |= TSC_CR_START)
|
||||
|
||||
/**
|
||||
* @brief Stop acquisition.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_STOP_ACQ(__HANDLE__) ((__HANDLE__)->Instance->CR &= (uint32_t)(~TSC_CR_START))
|
||||
|
||||
/**
|
||||
* @brief Set IO default mode to output push-pull low.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_SET_IODEF_OUTPPLOW(__HANDLE__) ((__HANDLE__)->Instance->CR &= (uint32_t)(~TSC_CR_IODEF))
|
||||
|
||||
/**
|
||||
* @brief Set IO default mode to input floating.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_SET_IODEF_INFLOAT(__HANDLE__) ((__HANDLE__)->Instance->CR |= TSC_CR_IODEF)
|
||||
|
||||
/**
|
||||
* @brief Set synchronization polarity to falling edge.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_SET_SYNC_POL_FALL(__HANDLE__) ((__HANDLE__)->Instance->CR &= (uint32_t)(~TSC_CR_SYNCPOL))
|
||||
|
||||
/**
|
||||
* @brief Set synchronization polarity to rising edge and high level.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_SET_SYNC_POL_RISE_HIGH(__HANDLE__) ((__HANDLE__)->Instance->CR |= TSC_CR_SYNCPOL)
|
||||
|
||||
/**
|
||||
* @brief Enable TSC interrupt.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __INTERRUPT__: TSC interrupt
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __INTERRUPT__ TSC interrupt
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))
|
||||
|
||||
/**
|
||||
* @brief Disable TSC interrupt.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __INTERRUPT__: TSC interrupt
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __INTERRUPT__ TSC interrupt
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= (uint32_t)(~(__INTERRUPT__)))
|
||||
|
||||
/** @brief Check whether the specified TSC interrupt source is enabled or not.
|
||||
* @param __HANDLE__: TSC Handle
|
||||
* @param __INTERRUPT__: TSC interrupt
|
||||
* @param __HANDLE__ TSC Handle
|
||||
* @param __INTERRUPT__ TSC interrupt
|
||||
* @retval SET or RESET
|
||||
*/
|
||||
#define __HAL_TSC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->IER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
|
||||
|
||||
/**
|
||||
* @brief Check whether the specified TSC flag is set or not.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __FLAG__: TSC flag
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __FLAG__ TSC flag
|
||||
* @retval SET or RESET
|
||||
*/
|
||||
#define __HAL_TSC_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__)) ? SET : RESET)
|
||||
|
||||
/**
|
||||
* @brief Clear the TSC's pending flag.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __FLAG__: TSC flag
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __FLAG__ TSC flag
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
|
||||
|
||||
/**
|
||||
* @brief Enable schmitt trigger hysteresis on a group of IOs.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __GX_IOY_MASK__: IOs mask
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __GX_IOY_MASK__ IOs mask
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_ENABLE_HYSTERESIS(__HANDLE__, __GX_IOY_MASK__) ((__HANDLE__)->Instance->IOHCR |= (__GX_IOY_MASK__))
|
||||
|
||||
/**
|
||||
* @brief Disable schmitt trigger hysteresis on a group of IOs.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __GX_IOY_MASK__: IOs mask
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __GX_IOY_MASK__ IOs mask
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_DISABLE_HYSTERESIS(__HANDLE__, __GX_IOY_MASK__) ((__HANDLE__)->Instance->IOHCR &= (uint32_t)(~(__GX_IOY_MASK__)))
|
||||
|
||||
/**
|
||||
* @brief Open analog switch on a group of IOs.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __GX_IOY_MASK__: IOs mask
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __GX_IOY_MASK__ IOs mask
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_OPEN_ANALOG_SWITCH(__HANDLE__, __GX_IOY_MASK__) ((__HANDLE__)->Instance->IOASCR &= (uint32_t)(~(__GX_IOY_MASK__)))
|
||||
|
||||
/**
|
||||
* @brief Close analog switch on a group of IOs.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __GX_IOY_MASK__: IOs mask
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __GX_IOY_MASK__ IOs mask
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_CLOSE_ANALOG_SWITCH(__HANDLE__, __GX_IOY_MASK__) ((__HANDLE__)->Instance->IOASCR |= (__GX_IOY_MASK__))
|
||||
|
||||
/**
|
||||
* @brief Enable a group of IOs in channel mode.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __GX_IOY_MASK__: IOs mask
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __GX_IOY_MASK__ IOs mask
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_ENABLE_CHANNEL(__HANDLE__, __GX_IOY_MASK__) ((__HANDLE__)->Instance->IOCCR |= (__GX_IOY_MASK__))
|
||||
|
||||
/**
|
||||
* @brief Disable a group of channel IOs.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __GX_IOY_MASK__: IOs mask
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __GX_IOY_MASK__ IOs mask
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_DISABLE_CHANNEL(__HANDLE__, __GX_IOY_MASK__) ((__HANDLE__)->Instance->IOCCR &= (uint32_t)(~(__GX_IOY_MASK__)))
|
||||
|
||||
/**
|
||||
* @brief Enable a group of IOs in sampling mode.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __GX_IOY_MASK__: IOs mask
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __GX_IOY_MASK__ IOs mask
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_ENABLE_SAMPLING(__HANDLE__, __GX_IOY_MASK__) ((__HANDLE__)->Instance->IOSCR |= (__GX_IOY_MASK__))
|
||||
|
||||
/**
|
||||
* @brief Disable a group of sampling IOs.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __GX_IOY_MASK__: IOs mask
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __GX_IOY_MASK__ IOs mask
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_DISABLE_SAMPLING(__HANDLE__, __GX_IOY_MASK__) ((__HANDLE__)->Instance->IOSCR &= (uint32_t)(~(__GX_IOY_MASK__)))
|
||||
|
||||
/**
|
||||
* @brief Enable acquisition groups.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __GX_MASK__: Groups mask
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __GX_MASK__ Groups mask
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_ENABLE_GROUP(__HANDLE__, __GX_MASK__) ((__HANDLE__)->Instance->IOGCSR |= (__GX_MASK__))
|
||||
|
||||
/**
|
||||
* @brief Disable acquisition groups.
|
||||
* @param __HANDLE__: TSC handle
|
||||
* @param __GX_MASK__: Groups mask
|
||||
* @param __HANDLE__ TSC handle
|
||||
* @param __GX_MASK__ Groups mask
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_TSC_DISABLE_GROUP(__HANDLE__, __GX_MASK__) ((__HANDLE__)->Instance->IOGCSR &= (uint32_t)(~(__GX_MASK__)))
|
||||
|
||||
/** @brief Gets acquisition group status.
|
||||
* @param __HANDLE__: TSC Handle
|
||||
* @param __GX_INDEX__: Group index
|
||||
* @param __HANDLE__ TSC Handle
|
||||
* @param __GX_INDEX__ Group index
|
||||
* @retval SET or RESET
|
||||
*/
|
||||
#define __HAL_TSC_GET_GROUP_STATUS(__HANDLE__, __GX_INDEX__) \
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_uart.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of UART HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -710,7 +708,7 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Reset UART handle states.
|
||||
* @param __HANDLE__: UART handle.
|
||||
* @param __HANDLE__ UART handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_RESET_HANDLE_STATE(__HANDLE__) do{ \
|
||||
|
@ -718,7 +716,7 @@ typedef struct
|
|||
(__HANDLE__)->RxState = HAL_UART_STATE_RESET; \
|
||||
} while(0U)
|
||||
/** @brief Flush the UART Data registers.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_FLUSH_DRREGISTER(__HANDLE__) \
|
||||
|
@ -728,8 +726,8 @@ typedef struct
|
|||
} while(0U)
|
||||
|
||||
/** @brief Clear the specified UART pending flag.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg @ref UART_CLEAR_PEF Parity Error Clear Flag
|
||||
* @arg @ref UART_CLEAR_FEF Framing Error Clear Flag
|
||||
|
@ -748,38 +746,38 @@ typedef struct
|
|||
#define __HAL_UART_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
|
||||
|
||||
/** @brief Clear the UART PE pending flag.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_CLEAR_PEFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_PEF)
|
||||
|
||||
/** @brief Clear the UART FE pending flag.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_CLEAR_FEFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_FEF)
|
||||
|
||||
/** @brief Clear the UART NE pending flag.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_CLEAR_NEFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_NEF)
|
||||
|
||||
/** @brief Clear the UART ORE pending flag.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_CLEAR_OREFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_OREF)
|
||||
|
||||
/** @brief Clear the UART IDLE pending flag.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_CLEAR_IDLEFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_IDLEF)
|
||||
|
||||
/** @brief Check whether the specified UART flag is set or not.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref UART_FLAG_REACK Receive enable acknowledge flag
|
||||
* @arg @ref UART_FLAG_TEACK Transmit enable acknowledge flag
|
||||
|
@ -807,8 +805,8 @@ typedef struct
|
|||
#define __HAL_UART_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))
|
||||
|
||||
/** @brief Enable the specified UART interrupt.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __INTERRUPT__: specifies the UART interrupt source to enable.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @param __INTERRUPT__ specifies the UART interrupt source to enable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref UART_IT_WUF Wakeup from stop mode interrupt
|
||||
* @arg @ref UART_IT_CM Character match interrupt
|
||||
|
@ -828,8 +826,8 @@ typedef struct
|
|||
|
||||
|
||||
/** @brief Disable the specified UART interrupt.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __INTERRUPT__: specifies the UART interrupt source to disable.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @param __INTERRUPT__ specifies the UART interrupt source to disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref UART_IT_WUF Wakeup from stop mode interrupt
|
||||
* @arg @ref UART_IT_CM Character match interrupt
|
||||
|
@ -848,8 +846,8 @@ typedef struct
|
|||
((__HANDLE__)->Instance->CR3 &= ~ (1U << ((__INTERRUPT__) & UART_IT_MASK))))
|
||||
|
||||
/** @brief Check whether the specified UART interrupt has occurred or not.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __IT__: specifies the UART interrupt to check.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @param __IT__ specifies the UART interrupt to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref UART_IT_WUF Wakeup from stop mode interrupt
|
||||
* @arg @ref UART_IT_CM Character match interrupt
|
||||
|
@ -868,8 +866,8 @@ typedef struct
|
|||
#define __HAL_UART_GET_IT(__HANDLE__, __IT__) ((__HANDLE__)->Instance->ISR & (1U << ((__IT__)>> 0x08U)))
|
||||
|
||||
/** @brief Check whether the specified UART interrupt source is enabled or not.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __IT__: specifies the UART interrupt source to check.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @param __IT__ specifies the UART interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref UART_IT_WUF Wakeup from stop mode interrupt
|
||||
* @arg @ref UART_IT_CM Character match interrupt
|
||||
|
@ -887,8 +885,8 @@ typedef struct
|
|||
(__HANDLE__)->Instance->CR2 : (__HANDLE__)->Instance->CR3)) & (1U << (((uint16_t)(__IT__)) & UART_IT_MASK)))
|
||||
|
||||
/** @brief Clear the specified UART ISR flag, in setting the proper ICR register flag.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __IT_CLEAR__: specifies the interrupt clear register flag that needs to be set
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @param __IT_CLEAR__ specifies the interrupt clear register flag that needs to be set
|
||||
* to clear the corresponding interrupt
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref UART_CLEAR_PEF Parity Error Clear Flag
|
||||
|
@ -908,8 +906,8 @@ typedef struct
|
|||
#define __HAL_UART_CLEAR_IT(__HANDLE__, __IT_CLEAR__) ((__HANDLE__)->Instance->ICR = (uint32_t)(__IT_CLEAR__))
|
||||
|
||||
/** @brief Set a specific UART request flag.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __REQ__: specifies the request flag to set
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @param __REQ__ specifies the request flag to set
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref UART_AUTOBAUD_REQUEST Auto-Baud Rate Request
|
||||
* @arg @ref UART_SENDBREAK_REQUEST Send Break Request
|
||||
|
@ -921,25 +919,25 @@ typedef struct
|
|||
#define __HAL_UART_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (uint32_t)(__REQ__))
|
||||
|
||||
/** @brief Enable the UART one bit sample method.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
|
||||
|
||||
/** @brief Disable the UART one bit sample method.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3 &= (uint32_t)~((uint32_t)USART_CR3_ONEBIT))
|
||||
|
||||
/** @brief Enable UART.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)
|
||||
|
||||
/** @brief Disable UART.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
|
||||
|
@ -953,7 +951,7 @@ typedef struct
|
|||
* - UART instance should have already been initialised (through call of HAL_UART_Init() )
|
||||
* - macro could only be called when corresponding UART instance is disabled (i.e. __HAL_UART_DISABLE(__HANDLE__))
|
||||
* and should be followed by an Enable macro (i.e. __HAL_UART_ENABLE(__HANDLE__)).
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_HWCONTROL_CTS_ENABLE(__HANDLE__) \
|
||||
|
@ -971,7 +969,7 @@ typedef struct
|
|||
* - UART instance should have already been initialised (through call of HAL_UART_Init() )
|
||||
* - macro could only be called when corresponding UART instance is disabled (i.e. __HAL_UART_DISABLE(__HANDLE__))
|
||||
* and should be followed by an Enable macro (i.e. __HAL_UART_ENABLE(__HANDLE__)).
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_HWCONTROL_CTS_DISABLE(__HANDLE__) \
|
||||
|
@ -989,7 +987,7 @@ typedef struct
|
|||
* - UART instance should have already been initialised (through call of HAL_UART_Init() )
|
||||
* - macro could only be called when corresponding UART instance is disabled (i.e. __HAL_UART_DISABLE(__HANDLE__))
|
||||
* and should be followed by an Enable macro (i.e. __HAL_UART_ENABLE(__HANDLE__)).
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_HWCONTROL_RTS_ENABLE(__HANDLE__) \
|
||||
|
@ -1007,7 +1005,7 @@ typedef struct
|
|||
* - UART instance should have already been initialised (through call of HAL_UART_Init() )
|
||||
* - macro could only be called when corresponding UART instance is disabled (i.e. __HAL_UART_DISABLE(__HANDLE__))
|
||||
* and should be followed by an Enable macro (i.e. __HAL_UART_ENABLE(__HANDLE__)).
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_UART_HWCONTROL_RTS_DISABLE(__HANDLE__) \
|
||||
|
@ -1025,21 +1023,21 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
/** @brief BRR division operation to set BRR register in 8-bit oversampling mode.
|
||||
* @param __PCLK__: UART clock.
|
||||
* @param __BAUD__: Baud rate set by the user.
|
||||
* @param __PCLK__ UART clock.
|
||||
* @param __BAUD__ Baud rate set by the user.
|
||||
* @retval Division result
|
||||
*/
|
||||
#define UART_DIV_SAMPLING8(__PCLK__, __BAUD__) ((((__PCLK__)*2U) + ((__BAUD__)/2U)) / (__BAUD__))
|
||||
|
||||
/** @brief BRR division operation to set BRR register in 16-bit oversampling mode.
|
||||
* @param __PCLK__: UART clock.
|
||||
* @param __BAUD__: Baud rate set by the user.
|
||||
* @param __PCLK__ UART clock.
|
||||
* @param __BAUD__ Baud rate set by the user.
|
||||
* @retval Division result
|
||||
*/
|
||||
#define UART_DIV_SAMPLING16(__PCLK__, __BAUD__) (((__PCLK__) + ((__BAUD__)/2U)) / (__BAUD__))
|
||||
|
||||
/** @brief Check UART Baud rate.
|
||||
* @param __BAUDRATE__: Baudrate specified by the user.
|
||||
* @param __BAUDRATE__ Baudrate specified by the user.
|
||||
* The maximum Baud Rate is derived from the maximum clock on F3 (i.e. 72 MHz)
|
||||
* divided by the smallest oversampling used on the USART (i.e. 8)
|
||||
* @retval SET (__BAUDRATE__ is valid) or RESET (__BAUDRATE__ is invalid)
|
||||
|
@ -1047,20 +1045,20 @@ typedef struct
|
|||
#define IS_UART_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) < 9000001U)
|
||||
|
||||
/** @brief Check UART assertion time.
|
||||
* @param __TIME__: 5-bit value assertion time.
|
||||
* @param __TIME__ 5-bit value assertion time.
|
||||
* @retval Test result (TRUE or FALSE).
|
||||
*/
|
||||
#define IS_UART_ASSERTIONTIME(__TIME__) ((__TIME__) <= 0x1FU)
|
||||
|
||||
/** @brief Check UART deassertion time.
|
||||
* @param __TIME__: 5-bit value deassertion time.
|
||||
* @param __TIME__ 5-bit value deassertion time.
|
||||
* @retval Test result (TRUE or FALSE).
|
||||
*/
|
||||
#define IS_UART_DEASSERTIONTIME(__TIME__) ((__TIME__) <= 0x1FU)
|
||||
|
||||
/**
|
||||
* @brief Ensure that UART frame number of stop bits is valid.
|
||||
* @param __STOPBITS__: UART frame number of stop bits.
|
||||
* @param __STOPBITS__ UART frame number of stop bits.
|
||||
* @retval SET (__STOPBITS__ is valid) or RESET (__STOPBITS__ is invalid)
|
||||
*/
|
||||
#define IS_UART_STOPBITS(__STOPBITS__) (((__STOPBITS__) == UART_STOPBITS_0_5) || \
|
||||
|
@ -1070,7 +1068,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART frame parity is valid.
|
||||
* @param __PARITY__: UART frame parity.
|
||||
* @param __PARITY__ UART frame parity.
|
||||
* @retval SET (__PARITY__ is valid) or RESET (__PARITY__ is invalid)
|
||||
*/
|
||||
#define IS_UART_PARITY(__PARITY__) (((__PARITY__) == UART_PARITY_NONE) || \
|
||||
|
@ -1079,7 +1077,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART hardware flow control is valid.
|
||||
* @param __CONTROL__: UART hardware flow control.
|
||||
* @param __CONTROL__ UART hardware flow control.
|
||||
* @retval SET (__CONTROL__ is valid) or RESET (__CONTROL__ is invalid)
|
||||
*/
|
||||
#define IS_UART_HARDWARE_FLOW_CONTROL(__CONTROL__)\
|
||||
|
@ -1090,14 +1088,14 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART communication mode is valid.
|
||||
* @param __MODE__: UART communication mode.
|
||||
* @param __MODE__ UART communication mode.
|
||||
* @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
|
||||
*/
|
||||
#define IS_UART_MODE(__MODE__) ((((__MODE__) & (~((uint32_t)(UART_MODE_TX_RX)))) == 0x00U) && ((__MODE__) != 0x00U))
|
||||
|
||||
/**
|
||||
* @brief Ensure that UART state is valid.
|
||||
* @param __STATE__: UART state.
|
||||
* @param __STATE__ UART state.
|
||||
* @retval SET (__STATE__ is valid) or RESET (__STATE__ is invalid)
|
||||
*/
|
||||
#define IS_UART_STATE(__STATE__) (((__STATE__) == UART_STATE_DISABLE) || \
|
||||
|
@ -1105,7 +1103,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART oversampling is valid.
|
||||
* @param __SAMPLING__: UART oversampling.
|
||||
* @param __SAMPLING__ UART oversampling.
|
||||
* @retval SET (__SAMPLING__ is valid) or RESET (__SAMPLING__ is invalid)
|
||||
*/
|
||||
#define IS_UART_OVERSAMPLING(__SAMPLING__) (((__SAMPLING__) == UART_OVERSAMPLING_16) || \
|
||||
|
@ -1113,7 +1111,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART frame sampling is valid.
|
||||
* @param __ONEBIT__: UART frame sampling.
|
||||
* @param __ONEBIT__ UART frame sampling.
|
||||
* @retval SET (__ONEBIT__ is valid) or RESET (__ONEBIT__ is invalid)
|
||||
*/
|
||||
#define IS_UART_ONE_BIT_SAMPLE(__ONEBIT__) (((__ONEBIT__) == UART_ONE_BIT_SAMPLE_DISABLE) || \
|
||||
|
@ -1121,7 +1119,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that Address Length detection parameter is valid.
|
||||
* @param __ADDRESS__: UART Adress length value.
|
||||
* @param __ADDRESS__ UART Adress length value.
|
||||
* @retval SET (__ADDRESS__ is valid) or RESET (__ADDRESS__ is invalid)
|
||||
*/
|
||||
#define IS_UART_ADDRESSLENGTH_DETECT(__ADDRESS__) (((__ADDRESS__) == UART_ADDRESS_DETECT_4B) || \
|
||||
|
@ -1129,7 +1127,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART auto Baud rate detection mode is valid.
|
||||
* @param __MODE__: UART auto Baud rate detection mode.
|
||||
* @param __MODE__ UART auto Baud rate detection mode.
|
||||
* @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
|
||||
*/
|
||||
#define IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(__MODE__) (((__MODE__) == UART_ADVFEATURE_AUTOBAUDRATE_ONSTARTBIT) || \
|
||||
|
@ -1139,7 +1137,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART receiver timeout setting is valid.
|
||||
* @param __TIMEOUT__: UART receiver timeout setting.
|
||||
* @param __TIMEOUT__ UART receiver timeout setting.
|
||||
* @retval SET (__TIMEOUT__ is valid) or RESET (__TIMEOUT__ is invalid)
|
||||
*/
|
||||
#define IS_UART_RECEIVER_TIMEOUT(__TIMEOUT__) (((__TIMEOUT__) == UART_RECEIVER_TIMEOUT_DISABLE) || \
|
||||
|
@ -1147,7 +1145,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART LIN state is valid.
|
||||
* @param __LIN__: UART LIN state.
|
||||
* @param __LIN__ UART LIN state.
|
||||
* @retval SET (__LIN__ is valid) or RESET (__LIN__ is invalid)
|
||||
*/
|
||||
#define IS_UART_LIN(__LIN__) (((__LIN__) == UART_LIN_DISABLE) || \
|
||||
|
@ -1155,7 +1153,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART LIN break detection length is valid.
|
||||
* @param __LENGTH__: UART LIN break detection length.
|
||||
* @param __LENGTH__ UART LIN break detection length.
|
||||
* @retval SET (__LENGTH__ is valid) or RESET (__LENGTH__ is invalid)
|
||||
*/
|
||||
#define IS_UART_LIN_BREAK_DETECT_LENGTH(__LENGTH__) (((__LENGTH__) == UART_LINBREAKDETECTLENGTH_10B) || \
|
||||
|
@ -1163,7 +1161,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART DMA TX state is valid.
|
||||
* @param __DMATX__: UART DMA TX state.
|
||||
* @param __DMATX__ UART DMA TX state.
|
||||
* @retval SET (__DMATX__ is valid) or RESET (__DMATX__ is invalid)
|
||||
*/
|
||||
#define IS_UART_DMA_TX(__DMATX__) (((__DMATX__) == UART_DMA_TX_DISABLE) || \
|
||||
|
@ -1171,7 +1169,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART DMA RX state is valid.
|
||||
* @param __DMARX__: UART DMA RX state.
|
||||
* @param __DMARX__ UART DMA RX state.
|
||||
* @retval SET (__DMARX__ is valid) or RESET (__DMARX__ is invalid)
|
||||
*/
|
||||
#define IS_UART_DMA_RX(__DMARX__) (((__DMARX__) == UART_DMA_RX_DISABLE) || \
|
||||
|
@ -1179,7 +1177,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART half-duplex state is valid.
|
||||
* @param __HDSEL__: UART half-duplex state.
|
||||
* @param __HDSEL__ UART half-duplex state.
|
||||
* @retval SET (__HDSEL__ is valid) or RESET (__HDSEL__ is invalid)
|
||||
*/
|
||||
#define IS_UART_HALF_DUPLEX(__HDSEL__) (((__HDSEL__) == UART_HALF_DUPLEX_DISABLE) || \
|
||||
|
@ -1187,7 +1185,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART wake-up method is valid.
|
||||
* @param __WAKEUP__: UART wake-up method .
|
||||
* @param __WAKEUP__ UART wake-up method .
|
||||
* @retval SET (__WAKEUP__ is valid) or RESET (__WAKEUP__ is invalid)
|
||||
*/
|
||||
#define IS_UART_WAKEUPMETHOD(__WAKEUP__) (((__WAKEUP__) == UART_WAKEUPMETHOD_IDLELINE) || \
|
||||
|
@ -1195,7 +1193,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART advanced features initialization is valid.
|
||||
* @param __INIT__: UART advanced features initialization.
|
||||
* @param __INIT__ UART advanced features initialization.
|
||||
* @retval SET (__INIT__ is valid) or RESET (__INIT__ is invalid)
|
||||
*/
|
||||
#define IS_UART_ADVFEATURE_INIT(__INIT__) ((__INIT__) <= (UART_ADVFEATURE_NO_INIT | \
|
||||
|
@ -1210,7 +1208,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART frame TX inversion setting is valid.
|
||||
* @param __TXINV__: UART frame TX inversion setting.
|
||||
* @param __TXINV__ UART frame TX inversion setting.
|
||||
* @retval SET (__TXINV__ is valid) or RESET (__TXINV__ is invalid)
|
||||
*/
|
||||
#define IS_UART_ADVFEATURE_TXINV(__TXINV__) (((__TXINV__) == UART_ADVFEATURE_TXINV_DISABLE) || \
|
||||
|
@ -1218,7 +1216,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART frame RX inversion setting is valid.
|
||||
* @param __RXINV__: UART frame RX inversion setting.
|
||||
* @param __RXINV__ UART frame RX inversion setting.
|
||||
* @retval SET (__RXINV__ is valid) or RESET (__RXINV__ is invalid)
|
||||
*/
|
||||
#define IS_UART_ADVFEATURE_RXINV(__RXINV__) (((__RXINV__) == UART_ADVFEATURE_RXINV_DISABLE) || \
|
||||
|
@ -1226,7 +1224,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART frame data inversion setting is valid.
|
||||
* @param __DATAINV__: UART frame data inversion setting.
|
||||
* @param __DATAINV__ UART frame data inversion setting.
|
||||
* @retval SET (__DATAINV__ is valid) or RESET (__DATAINV__ is invalid)
|
||||
*/
|
||||
#define IS_UART_ADVFEATURE_DATAINV(__DATAINV__) (((__DATAINV__) == UART_ADVFEATURE_DATAINV_DISABLE) || \
|
||||
|
@ -1234,7 +1232,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART frame RX/TX pins swap setting is valid.
|
||||
* @param __SWAP__: UART frame RX/TX pins swap setting.
|
||||
* @param __SWAP__ UART frame RX/TX pins swap setting.
|
||||
* @retval SET (__SWAP__ is valid) or RESET (__SWAP__ is invalid)
|
||||
*/
|
||||
#define IS_UART_ADVFEATURE_SWAP(__SWAP__) (((__SWAP__) == UART_ADVFEATURE_SWAP_DISABLE) || \
|
||||
|
@ -1242,7 +1240,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART frame overrun setting is valid.
|
||||
* @param __OVERRUN__: UART frame overrun setting.
|
||||
* @param __OVERRUN__ UART frame overrun setting.
|
||||
* @retval SET (__OVERRUN__ is valid) or RESET (__OVERRUN__ is invalid)
|
||||
*/
|
||||
#define IS_UART_OVERRUN(__OVERRUN__) (((__OVERRUN__) == UART_ADVFEATURE_OVERRUN_ENABLE) || \
|
||||
|
@ -1250,7 +1248,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART auto Baud rate state is valid.
|
||||
* @param __AUTOBAUDRATE__: UART auto Baud rate state.
|
||||
* @param __AUTOBAUDRATE__ UART auto Baud rate state.
|
||||
* @retval SET (__AUTOBAUDRATE__ is valid) or RESET (__AUTOBAUDRATE__ is invalid)
|
||||
*/
|
||||
#define IS_UART_ADVFEATURE_AUTOBAUDRATE(__AUTOBAUDRATE__) (((__AUTOBAUDRATE__) == UART_ADVFEATURE_AUTOBAUDRATE_DISABLE) || \
|
||||
|
@ -1258,7 +1256,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART DMA enabling or disabling on error setting is valid.
|
||||
* @param __DMA__: UART DMA enabling or disabling on error setting.
|
||||
* @param __DMA__ UART DMA enabling or disabling on error setting.
|
||||
* @retval SET (__DMA__ is valid) or RESET (__DMA__ is invalid)
|
||||
*/
|
||||
#define IS_UART_ADVFEATURE_DMAONRXERROR(__DMA__) (((__DMA__) == UART_ADVFEATURE_DMA_ENABLEONRXERROR) || \
|
||||
|
@ -1266,7 +1264,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART frame MSB first setting is valid.
|
||||
* @param __MSBFIRST__: UART frame MSB first setting.
|
||||
* @param __MSBFIRST__ UART frame MSB first setting.
|
||||
* @retval SET (__MSBFIRST__ is valid) or RESET (__MSBFIRST__ is invalid)
|
||||
*/
|
||||
#define IS_UART_ADVFEATURE_MSBFIRST(__MSBFIRST__) (((__MSBFIRST__) == UART_ADVFEATURE_MSBFIRST_DISABLE) || \
|
||||
|
@ -1274,7 +1272,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART stop mode state is valid.
|
||||
* @param __STOPMODE__: UART stop mode state.
|
||||
* @param __STOPMODE__ UART stop mode state.
|
||||
* @retval SET (__STOPMODE__ is valid) or RESET (__STOPMODE__ is invalid)
|
||||
*/
|
||||
#define IS_UART_ADVFEATURE_STOPMODE(__STOPMODE__) (((__STOPMODE__) == UART_ADVFEATURE_STOPMODE_DISABLE) || \
|
||||
|
@ -1282,7 +1280,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART mute mode state is valid.
|
||||
* @param __MUTE__: UART mute mode state.
|
||||
* @param __MUTE__ UART mute mode state.
|
||||
* @retval SET (__MUTE__ is valid) or RESET (__MUTE__ is invalid)
|
||||
*/
|
||||
#define IS_UART_MUTE_MODE(__MUTE__) (((__MUTE__) == UART_ADVFEATURE_MUTEMODE_DISABLE) || \
|
||||
|
@ -1290,7 +1288,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART wake-up selection is valid.
|
||||
* @param __WAKE__: UART wake-up selection.
|
||||
* @param __WAKE__ UART wake-up selection.
|
||||
* @retval SET (__WAKE__ is valid) or RESET (__WAKE__ is invalid)
|
||||
*/
|
||||
#define IS_UART_WAKEUP_SELECTION(__WAKE__) (((__WAKE__) == UART_WAKEUP_ON_ADDRESS) || \
|
||||
|
@ -1299,7 +1297,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART driver enable polarity is valid.
|
||||
* @param __POLARITY__: UART driver enable polarity.
|
||||
* @param __POLARITY__ UART driver enable polarity.
|
||||
* @retval SET (__POLARITY__ is valid) or RESET (__POLARITY__ is invalid)
|
||||
*/
|
||||
#define IS_UART_DE_POLARITY(__POLARITY__) (((__POLARITY__) == UART_DE_POLARITY_HIGH) || \
|
||||
|
@ -1307,7 +1305,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART request parameter is valid.
|
||||
* @param __PARAM__: UART request parameter.
|
||||
* @param __PARAM__ UART request parameter.
|
||||
* @retval SET (__PARAM__ is valid) or RESET (__PARAM__ is invalid)
|
||||
*/
|
||||
#define IS_UART_REQUEST_PARAMETER(__PARAM__) (((__PARAM__) == UART_AUTOBAUD_REQUEST) || \
|
||||
|
@ -1445,3 +1443,4 @@ void UART_Wakeup_AddressConfig(UART_HandleTypeDef *huart, UART_WakeUpTypeDef Wak
|
|||
#endif /* __STM32F3xx_HAL_UART_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_uart_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of UART HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -127,8 +125,8 @@ void HAL_UARTEx_WakeupCallback(UART_HandleTypeDef *huart);
|
|||
*/
|
||||
|
||||
/** @brief Report the UART clock source.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __CLOCKSOURCE__: output variable.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @param __CLOCKSOURCE__ output variable.
|
||||
* @retval UART clocking source, written in __CLOCKSOURCE__.
|
||||
*/
|
||||
#if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -364,7 +362,7 @@ void HAL_UARTEx_WakeupCallback(UART_HandleTypeDef *huart);
|
|||
* by the reception API().
|
||||
* This masking operation is not carried out in the case of
|
||||
* DMA transfers.
|
||||
* @param __HANDLE__: specifies the UART Handle.
|
||||
* @param __HANDLE__ specifies the UART Handle.
|
||||
* @retval None, the mask to apply to UART RDR register is stored in (__HANDLE__)->Mask field.
|
||||
*/
|
||||
#if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -438,7 +436,7 @@ void HAL_UARTEx_WakeupCallback(UART_HandleTypeDef *huart);
|
|||
|
||||
/**
|
||||
* @brief Ensure that UART frame length is valid.
|
||||
* @param __LENGTH__: UART frame length.
|
||||
* @param __LENGTH__ UART frame length.
|
||||
* @retval SET (__LENGTH__ is valid) or RESET (__LENGTH__ is invalid)
|
||||
*/
|
||||
#if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -474,3 +472,4 @@ void HAL_UARTEx_WakeupCallback(UART_HandleTypeDef *huart);
|
|||
#endif /* __STM32F3xx_HAL_UART_EX_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_usart.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of USART HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -336,13 +334,13 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Reset USART handle state.
|
||||
* @param __HANDLE__: USART handle.
|
||||
* @param __HANDLE__ USART handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_USART_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_USART_STATE_RESET)
|
||||
|
||||
/** @brief Flush the USART Data registers.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_USART_FLUSH_DRREGISTER(__HANDLE__) \
|
||||
|
@ -352,8 +350,8 @@ typedef struct
|
|||
} while(0U)
|
||||
|
||||
/** @brief Check whether the specified USART flag is set or not.
|
||||
* @param __HANDLE__: specifies the USART Handle
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the USART Handle
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref USART_FLAG_REACK Receive enable acknowledge flag
|
||||
* @arg @ref USART_FLAG_TEACK Transmit enable acknowledge flag
|
||||
|
@ -372,8 +370,8 @@ typedef struct
|
|||
#define __HAL_USART_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))
|
||||
|
||||
/** @brief Clear the specified USART pending flag.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __FLAG__: specifies the flag to check.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @param __FLAG__ specifies the flag to check.
|
||||
* This parameter can be any combination of the following values:
|
||||
* @arg @ref USART_CLEAR_PEF
|
||||
* @arg @ref USART_CLEAR_FEF
|
||||
|
@ -387,38 +385,38 @@ typedef struct
|
|||
#define __HAL_USART_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
|
||||
|
||||
/** @brief Clear the USART PE pending flag.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_USART_CLEAR_PEFLAG(__HANDLE__) __HAL_USART_CLEAR_FLAG((__HANDLE__), USART_CLEAR_PEF)
|
||||
|
||||
/** @brief Clear the USART FE pending flag.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_USART_CLEAR_FEFLAG(__HANDLE__) __HAL_USART_CLEAR_FLAG((__HANDLE__), USART_CLEAR_FEF)
|
||||
|
||||
/** @brief Clear the USART NE pending flag.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_USART_CLEAR_NEFLAG(__HANDLE__) __HAL_USART_CLEAR_FLAG((__HANDLE__), USART_CLEAR_NEF)
|
||||
|
||||
/** @brief Clear the USART ORE pending flag.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_USART_CLEAR_OREFLAG(__HANDLE__) __HAL_USART_CLEAR_FLAG((__HANDLE__), USART_CLEAR_OREF)
|
||||
|
||||
/** @brief Clear the USART IDLE pending flag.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_USART_CLEAR_IDLEFLAG(__HANDLE__) __HAL_USART_CLEAR_FLAG((__HANDLE__), USART_CLEAR_IDLEF)
|
||||
|
||||
/** @brief Enable the specified USART interrupt.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __INTERRUPT__: specifies the USART interrupt source to enable.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @param __INTERRUPT__ specifies the USART interrupt source to enable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref USART_IT_TXE Transmit Data Register empty interrupt
|
||||
* @arg @ref USART_IT_TC Transmission complete interrupt
|
||||
|
@ -433,8 +431,8 @@ typedef struct
|
|||
((__HANDLE__)->Instance->CR3 |= (1U << ((__INTERRUPT__) & USART_IT_MASK))))
|
||||
|
||||
/** @brief Disable the specified USART interrupt.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __INTERRUPT__: specifies the USART interrupt source to disable.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @param __INTERRUPT__ specifies the USART interrupt source to disable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref USART_IT_TXE Transmit Data Register empty interrupt
|
||||
* @arg @ref USART_IT_TC Transmission complete interrupt
|
||||
|
@ -450,8 +448,8 @@ typedef struct
|
|||
|
||||
|
||||
/** @brief Check whether the specified USART interrupt has occurred or not.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __IT__: specifies the USART interrupt source to check.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @param __IT__ specifies the USART interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref USART_IT_TXE Transmit Data Register empty interrupt
|
||||
* @arg @ref USART_IT_TC Transmission complete interrupt
|
||||
|
@ -466,8 +464,8 @@ typedef struct
|
|||
#define __HAL_USART_GET_IT(__HANDLE__, __IT__) ((__HANDLE__)->Instance->ISR & (1U << ((__IT__)>> 0x08U)))
|
||||
|
||||
/** @brief Check whether the specified USART interrupt source is enabled or not.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __IT__: specifies the USART interrupt source to check.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @param __IT__ specifies the USART interrupt source to check.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref USART_IT_TXE Transmit Data Register empty interrupt
|
||||
* @arg @ref USART_IT_TC Transmission complete interrupt
|
||||
|
@ -485,8 +483,8 @@ typedef struct
|
|||
|
||||
|
||||
/** @brief Clear the specified USART ISR flag, in setting the proper ICR register flag.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __IT_CLEAR__: specifies the interrupt clear register flag that needs to be set
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @param __IT_CLEAR__ specifies the interrupt clear register flag that needs to be set
|
||||
* to clear the corresponding interrupt.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref USART_CLEAR_PEF Parity Error Clear Flag
|
||||
|
@ -501,8 +499,8 @@ typedef struct
|
|||
#define __HAL_USART_CLEAR_IT(__HANDLE__, __IT_CLEAR__) ((__HANDLE__)->Instance->ICR = (uint32_t)(__IT_CLEAR__))
|
||||
|
||||
/** @brief Set a specific USART request flag.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __REQ__: specifies the request flag to set.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @param __REQ__ specifies the request flag to set.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg @ref USART_RXDATA_FLUSH_REQUEST Receive Data flush Request
|
||||
* @arg @ref USART_TXDATA_FLUSH_REQUEST Transmit data flush Request
|
||||
|
@ -512,25 +510,25 @@ typedef struct
|
|||
#define __HAL_USART_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (__REQ__))
|
||||
|
||||
/** @brief Enable the USART one bit sample method.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_USART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
|
||||
|
||||
/** @brief Disable the USART one bit sample method.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_USART_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3 &= (uint32_t)~((uint32_t)USART_CR3_ONEBIT))
|
||||
|
||||
/** @brief Enable USART.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_USART_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)
|
||||
|
||||
/** @brief Disable USART.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_USART_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
|
||||
|
@ -545,7 +543,7 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @brief Check USART Baud rate.
|
||||
* @param __BAUDRATE__: Baudrate specified by the user.
|
||||
* @param __BAUDRATE__ Baudrate specified by the user.
|
||||
* The maximum Baud Rate is derived from the maximum clock on F3 (i.e. 72 MHz)
|
||||
* divided by the smallest oversampling used on the USART (i.e. 8).
|
||||
* @retval Test result (TRUE or FALSE).
|
||||
|
@ -554,7 +552,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that USART frame number of stop bits is valid.
|
||||
* @param __STOPBITS__: USART frame number of stop bits.
|
||||
* @param __STOPBITS__ USART frame number of stop bits.
|
||||
* @retval SET (__STOPBITS__ is valid) or RESET (__STOPBITS__ is invalid)
|
||||
*/
|
||||
#define IS_USART_STOPBITS(__STOPBITS__) (((__STOPBITS__) == USART_STOPBITS_0_5) || \
|
||||
|
@ -564,7 +562,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that USART frame parity is valid.
|
||||
* @param __PARITY__: USART frame parity.
|
||||
* @param __PARITY__ USART frame parity.
|
||||
* @retval SET (__PARITY__ is valid) or RESET (__PARITY__ is invalid)
|
||||
*/
|
||||
#define IS_USART_PARITY(__PARITY__) (((__PARITY__) == USART_PARITY_NONE) || \
|
||||
|
@ -573,14 +571,14 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that USART communication mode is valid.
|
||||
* @param __MODE__: USART communication mode.
|
||||
* @param __MODE__ USART communication mode.
|
||||
* @retval SET (__MODE__ is valid) or RESET (__MODE__ is invalid)
|
||||
*/
|
||||
#define IS_USART_MODE(__MODE__) ((((__MODE__) & 0xFFFFFFF3U) == 0x00U) && ((__MODE__) != 0x00U))
|
||||
|
||||
/**
|
||||
* @brief Ensure that USART clock state is valid.
|
||||
* @param __CLOCK__: USART clock state.
|
||||
* @param __CLOCK__ USART clock state.
|
||||
* @retval SET (__CLOCK__ is valid) or RESET (__CLOCK__ is invalid)
|
||||
*/
|
||||
#define IS_USART_CLOCK(__CLOCK__) (((__CLOCK__) == USART_CLOCK_DISABLE) || \
|
||||
|
@ -588,21 +586,21 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that USART frame polarity is valid.
|
||||
* @param __CPOL__: USART frame polarity.
|
||||
* @param __CPOL__ USART frame polarity.
|
||||
* @retval SET (__CPOL__ is valid) or RESET (__CPOL__ is invalid)
|
||||
*/
|
||||
#define IS_USART_POLARITY(__CPOL__) (((__CPOL__) == USART_POLARITY_LOW) || ((__CPOL__) == USART_POLARITY_HIGH))
|
||||
|
||||
/**
|
||||
* @brief Ensure that USART frame phase is valid.
|
||||
* @param __CPHA__: USART frame phase.
|
||||
* @param __CPHA__ USART frame phase.
|
||||
* @retval SET (__CPHA__ is valid) or RESET (__CPHA__ is invalid)
|
||||
*/
|
||||
#define IS_USART_PHASE(__CPHA__) (((__CPHA__) == USART_PHASE_1EDGE) || ((__CPHA__) == USART_PHASE_2EDGE))
|
||||
|
||||
/**
|
||||
* @brief Ensure that USART frame last bit clock pulse setting is valid.
|
||||
* @param __LASTBIT__: USART frame last bit clock pulse setting.
|
||||
* @param __LASTBIT__ USART frame last bit clock pulse setting.
|
||||
* @retval SET (__LASTBIT__ is valid) or RESET (__LASTBIT__ is invalid)
|
||||
*/
|
||||
#define IS_USART_LASTBIT(__LASTBIT__) (((__LASTBIT__) == USART_LASTBIT_DISABLE) || \
|
||||
|
@ -610,7 +608,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Ensure that USART request parameter is valid.
|
||||
* @param __PARAM__: USART request parameter.
|
||||
* @param __PARAM__ USART request parameter.
|
||||
* @retval SET (__PARAM__ is valid) or RESET (__PARAM__ is invalid)
|
||||
*/
|
||||
#define IS_USART_REQUEST_PARAMETER(__PARAM__) (((__PARAM__) == USART_RXDATA_FLUSH_REQUEST) || \
|
||||
|
@ -709,3 +707,4 @@ uint32_t HAL_USART_GetError(USART_HandleTypeDef *husart);
|
|||
#endif /* __STM32F3xx_HAL_USART_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_usart_ex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of USART HAL Extended module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -89,8 +87,8 @@
|
|||
*/
|
||||
|
||||
/** @brief Report the USART clock source.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __CLOCKSOURCE__: output variable.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @param __CLOCKSOURCE__ output variable.
|
||||
* @retval the USART clocking source, written in __CLOCKSOURCE__.
|
||||
*/
|
||||
#if defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) || \
|
||||
|
@ -210,7 +208,7 @@
|
|||
* by the reception API().
|
||||
* This masking operation is not carried out in the case of
|
||||
* DMA transfers.
|
||||
* @param __HANDLE__: specifies the USART Handle.
|
||||
* @param __HANDLE__ specifies the USART Handle.
|
||||
* @retval None, the mask to apply to USART RDR register is stored in (__HANDLE__)->Mask field.
|
||||
*/
|
||||
#if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -285,7 +283,7 @@
|
|||
|
||||
/**
|
||||
* @brief Ensure that USART frame length is valid.
|
||||
* @param __LENGTH__: USART frame length.
|
||||
* @param __LENGTH__ USART frame length.
|
||||
* @retval SET (__LENGTH__ is valid) or RESET (__LENGTH__ is invalid)
|
||||
*/
|
||||
#if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
|
||||
|
@ -321,3 +319,4 @@
|
|||
#endif /* __STM32F3xx_HAL_USART_EX_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_wwdg.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of WWDG HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -176,7 +174,7 @@ typedef struct
|
|||
|
||||
/**
|
||||
* @brief Enable the WWDG early wakeup interrupt.
|
||||
* @param __HANDLE__: WWDG handle
|
||||
* @param __HANDLE__ WWDG handle
|
||||
* @param __INTERRUPT__ specifies the interrupt to enable.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg WWDG_IT_EWI: Early wakeup interrupt
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_adc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of ADC LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -1605,7 +1603,7 @@ typedef struct
|
|||
* @note Example:
|
||||
* __LL_ADC_DECIMAL_NB_TO_CHANNEL(4)
|
||||
* will return a data equivalent to "LL_ADC_CHANNEL_4".
|
||||
* @param __DECIMAL_NB__: Value between Min_Data=0 and Max_Data=18
|
||||
* @param __DECIMAL_NB__ Value between Min_Data=0 and Max_Data=18
|
||||
* @retval Returned value can be one of the following values:
|
||||
* @arg @ref LL_ADC_CHANNEL_0
|
||||
* @arg @ref LL_ADC_CHANNEL_1
|
||||
|
@ -2317,7 +2315,7 @@ typedef struct
|
|||
* internal voltage reference VrefInt.
|
||||
* Otherwise, this macro performs the processing to scale
|
||||
* ADC conversion data to 12 bits.
|
||||
* @param __VREFINT_ADC_DATA__: ADC conversion data (resolution 12 bits)
|
||||
* @param __VREFINT_ADC_DATA__ ADC conversion data (resolution 12 bits)
|
||||
* of internal voltage reference VrefInt (unit: digital value).
|
||||
* @param __ADC_RESOLUTION__ This parameter can be one of the following values:
|
||||
* @arg @ref LL_ADC_RESOLUTION_12B
|
||||
|
@ -5479,7 +5477,7 @@ __STATIC_INLINE void LL_ADC_ConfigAnalogWDThresholds(ADC_TypeDef *ADCx, uint32_t
|
|||
* @param AWDThresholdsHighLow This parameter can be one of the following values:
|
||||
* @arg @ref LL_ADC_AWD_THRESHOLD_HIGH
|
||||
* @arg @ref LL_ADC_AWD_THRESHOLD_LOW
|
||||
* @param AWDThresholdValue: Value between Min_Data=0x000 and Max_Data=0xFFF
|
||||
* @param AWDThresholdValue Value between Min_Data=0x000 and Max_Data=0xFFF
|
||||
* @retval None
|
||||
*/
|
||||
__STATIC_INLINE void LL_ADC_SetAnalogWDThresholds(ADC_TypeDef *ADCx, uint32_t AWDy, uint32_t AWDThresholdsHighLow, uint32_t AWDThresholdValue)
|
||||
|
@ -7472,9 +7470,9 @@ void LL_ADC_INJ_StructInit(LL_ADC_INJ_InitTypeDef *ADC_INJ_InitStruct);
|
|||
#define VREFINT_CAL_ADDR ((uint16_t*) ((uint32_t)0x1FFFF7BAU)) /* Internal voltage reference, address of parameter VREFINT_CAL: VrefInt ADC raw data acquired at temperature 30 DegC (tolerance: +-5 DegC), Vref+ = 3.3 V (tolerance: +-10 mV). */
|
||||
#define VREFINT_CAL_VREF ((uint32_t) 3300U) /* Analog voltage reference (Vref+) value with which temperature sensor has been calibrated in production (tolerance: +-10 mV) (unit: mV). */
|
||||
/* Temperature sensor */
|
||||
#define TEMPSENSOR_CAL1_ADDR ((uint16_t*) ((uint32_t)0x1FFFF7B8U)) /* Internal temperature sensor, address of parameter TS_CAL1: On STM32F37x, temperature sensor ADC raw data acquired at temperature 25 DegC (tolerance: +-5 DegC), Vref+ = 3.3 V (tolerance: +-10 mV). */
|
||||
#define TEMPSENSOR_CAL1_ADDR ((uint16_t*) ((uint32_t)0x1FFFF7B8U)) /* Internal temperature sensor, address of parameter TS_CAL1: On STM32F37x, temperature sensor ADC raw data acquired at temperature 30 DegC (tolerance: +-5 DegC), Vref+ = 3.3 V (tolerance: +-10 mV). */
|
||||
#define TEMPSENSOR_CAL2_ADDR ((uint16_t*) ((uint32_t)0x1FFFF7C2U)) /* Internal temperature sensor, address of parameter TS_CAL2: On STM32F37x, temperature sensor ADC raw data acquired at temperature 110 DegC (tolerance: +-5 DegC), Vref+ = 3.3 V (tolerance: +-10 mV). */
|
||||
#define TEMPSENSOR_CAL1_TEMP (( int32_t) 25) /* Internal temperature sensor, temperature at which temperature sensor has been calibrated in production for data into TEMPSENSOR_CAL1_ADDR (tolerance: +-5 DegC) (unit: DegC). */
|
||||
#define TEMPSENSOR_CAL1_TEMP (( int32_t) 30) /* Internal temperature sensor, temperature at which temperature sensor has been calibrated in production for data into TEMPSENSOR_CAL1_ADDR (tolerance: +-5 DegC) (unit: DegC). */
|
||||
#define TEMPSENSOR_CAL2_TEMP (( int32_t) 110) /* Internal temperature sensor, temperature at which temperature sensor has been calibrated in production for data into TEMPSENSOR_CAL2_ADDR (tolerance: +-5 DegC) (unit: DegC). */
|
||||
#define TEMPSENSOR_CAL_VREFANALOG ((uint32_t) 3300U) /* Analog voltage reference (Vref+) voltage with which temperature sensor has been calibrated in production (+-10 mV) (unit: mV). */
|
||||
|
||||
|
@ -8177,7 +8175,7 @@ typedef struct
|
|||
* @note Example:
|
||||
* __LL_ADC_DECIMAL_NB_TO_CHANNEL(4)
|
||||
* will return a data equivalent to "LL_ADC_CHANNEL_4".
|
||||
* @param __DECIMAL_NB__: Value between Min_Data=0 and Max_Data=18
|
||||
* @param __DECIMAL_NB__ Value between Min_Data=0 and Max_Data=18
|
||||
* @retval Returned value can be one of the following values:
|
||||
* @arg @ref LL_ADC_CHANNEL_0
|
||||
* @arg @ref LL_ADC_CHANNEL_1
|
||||
|
@ -8631,7 +8629,7 @@ typedef struct
|
|||
* On STM32F37x, the only ADC resolution available is 12 bits.
|
||||
* The parameter of ADC resolution is kept for compatibility purpose
|
||||
* over other STM32 families.
|
||||
* @param __VREFINT_ADC_DATA__: ADC conversion data (resolution 12 bits)
|
||||
* @param __VREFINT_ADC_DATA__ ADC conversion data (resolution 12 bits)
|
||||
* of internal voltage reference VrefInt (unit: digital value).
|
||||
* @param __ADC_RESOLUTION__ This parameter can be one of the following values:
|
||||
* @arg @ref LL_ADC_RESOLUTION_12B
|
||||
|
@ -10260,7 +10258,7 @@ __STATIC_INLINE uint32_t LL_ADC_GetAnalogWDMonitChannels(ADC_TypeDef *ADCx)
|
|||
* @param AWDThresholdsHighLow This parameter can be one of the following values:
|
||||
* @arg @ref LL_ADC_AWD_THRESHOLD_HIGH
|
||||
* @arg @ref LL_ADC_AWD_THRESHOLD_LOW
|
||||
* @param AWDThresholdValue: Value between Min_Data=0x000 and Max_Data=0xFFF
|
||||
* @param AWDThresholdValue Value between Min_Data=0x000 and Max_Data=0xFFF
|
||||
* @retval None
|
||||
*/
|
||||
__STATIC_INLINE void LL_ADC_SetAnalogWDThresholds(ADC_TypeDef *ADCx, uint32_t AWDThresholdsHighLow, uint32_t AWDThresholdValue)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_bus.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of BUS LL module.
|
||||
|
||||
@verbatim
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_comp.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of COMP LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -219,7 +217,7 @@ typedef struct
|
|||
#else
|
||||
#define LL_COMP_INPUT_MINUS_IO1 (COMP_CSR_COMPxINSEL_2 | COMP_CSR_COMPxINSEL_1 ) /*!< Comparator input minus connected to IO1 (pin PA0 for COMP1, pin PA2 for COMP2, PD15 for COMP3, PE8 for COMP4, PD13 for COMP5, PD10 for COMP6, PC0 for COMP7 (COMP instance availability depends on the selected device)) */
|
||||
#endif
|
||||
#define LL_COMP_INPUT_MINUS_IO2 (COMP_CSR_COMPxINSEL_2 | COMP_CSR_COMPxINSEL_1 | COMP_CSR_COMPxINSEL_0) /*!< Comparator input minus connected to IO2 ( PB12 for COMP3, PB2 for COMP4, PB10 for COMP5, PB15 for COMP6 (COMP instance availability depends on the selected device)) */
|
||||
#define LL_COMP_INPUT_MINUS_IO2 (COMP_CSR_COMPxINSEL_2 | COMP_CSR_COMPxINSEL_1 | COMP_CSR_COMPxINSEL_0) /*!< Comparator input minus connected to IO2 (PB12 for COMP3, PB2 for COMP4, PB10 for COMP5, PB15 for COMP6 (COMP instance availability depends on the selected device)) */
|
||||
#if defined(STM32F301x8) || defined(STM32F318xx) || defined(STM32F334x8) || defined(STM32F302x8) || defined(STM32F303x8) || defined(STM32F328xx)
|
||||
/* This device has no comparator input minus IO3 */
|
||||
#else
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_cortex.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of CORTEX LL module.
|
||||
@verbatim
|
||||
==============================================================================
|
||||
|
@ -86,8 +84,8 @@ extern "C" {
|
|||
/** @defgroup CORTEX_LL_EC_CLKSOURCE_HCLK SYSTICK Clock Source
|
||||
* @{
|
||||
*/
|
||||
#define LL_SYSTICK_CLKSOURCE_HCLK_DIV8 ((uint32_t)0x00000000U) /*!< AHB clock divided by 8 selected as SysTick clock source.*/
|
||||
#define LL_SYSTICK_CLKSOURCE_HCLK ((uint32_t)SysTick_CTRL_CLKSOURCE_Msk) /*!< AHB clock selected as SysTick clock source. */
|
||||
#define LL_SYSTICK_CLKSOURCE_HCLK_DIV8 0x00000000U /*!< AHB clock divided by 8 selected as SysTick clock source.*/
|
||||
#define LL_SYSTICK_CLKSOURCE_HCLK SysTick_CTRL_CLKSOURCE_Msk /*!< AHB clock selected as SysTick clock source. */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -107,7 +105,7 @@ extern "C" {
|
|||
/** @defgroup CORTEX_LL_EC_CTRL_HFNMI_PRIVDEF MPU Control
|
||||
* @{
|
||||
*/
|
||||
#define LL_MPU_CTRL_HFNMI_PRIVDEF_NONE ((uint32_t)0x00000000U) /*!< Disable NMI and privileged SW access */
|
||||
#define LL_MPU_CTRL_HFNMI_PRIVDEF_NONE 0x00000000U /*!< Disable NMI and privileged SW access */
|
||||
#define LL_MPU_CTRL_HARDFAULT_NMI MPU_CTRL_HFNMIENA_Msk /*!< Enables the operation of MPU during hard fault, NMI, and FAULTMASK handlers */
|
||||
#define LL_MPU_CTRL_PRIVILEGED_DEFAULT MPU_CTRL_PRIVDEFENA_Msk /*!< Enable privileged software access to default memory map */
|
||||
#define LL_MPU_CTRL_HFNMI_PRIVDEF (MPU_CTRL_HFNMIENA_Msk | MPU_CTRL_PRIVDEFENA_Msk) /*!< Enable NMI and privileged SW access */
|
||||
|
@ -118,14 +116,14 @@ extern "C" {
|
|||
/** @defgroup CORTEX_LL_EC_REGION MPU Region Number
|
||||
* @{
|
||||
*/
|
||||
#define LL_MPU_REGION_NUMBER0 ((uint32_t)0x00U) /*!< REGION Number 0 */
|
||||
#define LL_MPU_REGION_NUMBER1 ((uint32_t)0x01U) /*!< REGION Number 1 */
|
||||
#define LL_MPU_REGION_NUMBER2 ((uint32_t)0x02U) /*!< REGION Number 2 */
|
||||
#define LL_MPU_REGION_NUMBER3 ((uint32_t)0x03U) /*!< REGION Number 3 */
|
||||
#define LL_MPU_REGION_NUMBER4 ((uint32_t)0x04U) /*!< REGION Number 4 */
|
||||
#define LL_MPU_REGION_NUMBER5 ((uint32_t)0x05U) /*!< REGION Number 5 */
|
||||
#define LL_MPU_REGION_NUMBER6 ((uint32_t)0x06U) /*!< REGION Number 6 */
|
||||
#define LL_MPU_REGION_NUMBER7 ((uint32_t)0x07U) /*!< REGION Number 7 */
|
||||
#define LL_MPU_REGION_NUMBER0 0x00U /*!< REGION Number 0 */
|
||||
#define LL_MPU_REGION_NUMBER1 0x01U /*!< REGION Number 1 */
|
||||
#define LL_MPU_REGION_NUMBER2 0x02U /*!< REGION Number 2 */
|
||||
#define LL_MPU_REGION_NUMBER3 0x03U /*!< REGION Number 3 */
|
||||
#define LL_MPU_REGION_NUMBER4 0x04U /*!< REGION Number 4 */
|
||||
#define LL_MPU_REGION_NUMBER5 0x05U /*!< REGION Number 5 */
|
||||
#define LL_MPU_REGION_NUMBER6 0x06U /*!< REGION Number 6 */
|
||||
#define LL_MPU_REGION_NUMBER7 0x07U /*!< REGION Number 7 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -133,34 +131,34 @@ extern "C" {
|
|||
/** @defgroup CORTEX_LL_EC_REGION_SIZE MPU Region Size
|
||||
* @{
|
||||
*/
|
||||
#define LL_MPU_REGION_SIZE_32B ((uint32_t)(0x04U << MPU_RASR_SIZE_Pos)) /*!< 32B Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_64B ((uint32_t)(0x05U << MPU_RASR_SIZE_Pos)) /*!< 64B Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_128B ((uint32_t)(0x06U << MPU_RASR_SIZE_Pos)) /*!< 128B Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_256B ((uint32_t)(0x07U << MPU_RASR_SIZE_Pos)) /*!< 256B Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_512B ((uint32_t)(0x08U << MPU_RASR_SIZE_Pos)) /*!< 512B Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_1KB ((uint32_t)(0x09U << MPU_RASR_SIZE_Pos)) /*!< 1KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_2KB ((uint32_t)(0x0AU << MPU_RASR_SIZE_Pos)) /*!< 2KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_4KB ((uint32_t)(0x0BU << MPU_RASR_SIZE_Pos)) /*!< 4KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_8KB ((uint32_t)(0x0CU << MPU_RASR_SIZE_Pos)) /*!< 8KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_16KB ((uint32_t)(0x0DU << MPU_RASR_SIZE_Pos)) /*!< 16KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_32KB ((uint32_t)(0x0EU << MPU_RASR_SIZE_Pos)) /*!< 32KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_64KB ((uint32_t)(0x0FU << MPU_RASR_SIZE_Pos)) /*!< 64KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_128KB ((uint32_t)(0x10U << MPU_RASR_SIZE_Pos)) /*!< 128KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_256KB ((uint32_t)(0x11U << MPU_RASR_SIZE_Pos)) /*!< 256KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_512KB ((uint32_t)(0x12U << MPU_RASR_SIZE_Pos)) /*!< 512KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_1MB ((uint32_t)(0x13U << MPU_RASR_SIZE_Pos)) /*!< 1MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_2MB ((uint32_t)(0x14U << MPU_RASR_SIZE_Pos)) /*!< 2MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_4MB ((uint32_t)(0x15U << MPU_RASR_SIZE_Pos)) /*!< 4MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_8MB ((uint32_t)(0x16U << MPU_RASR_SIZE_Pos)) /*!< 8MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_16MB ((uint32_t)(0x17U << MPU_RASR_SIZE_Pos)) /*!< 16MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_32MB ((uint32_t)(0x18U << MPU_RASR_SIZE_Pos)) /*!< 32MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_64MB ((uint32_t)(0x19U << MPU_RASR_SIZE_Pos)) /*!< 64MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_128MB ((uint32_t)(0x1AU << MPU_RASR_SIZE_Pos)) /*!< 128MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_256MB ((uint32_t)(0x1BU << MPU_RASR_SIZE_Pos)) /*!< 256MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_512MB ((uint32_t)(0x1CU << MPU_RASR_SIZE_Pos)) /*!< 512MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_1GB ((uint32_t)(0x1DU << MPU_RASR_SIZE_Pos)) /*!< 1GB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_2GB ((uint32_t)(0x1EU << MPU_RASR_SIZE_Pos)) /*!< 2GB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_4GB ((uint32_t)(0x1FU << MPU_RASR_SIZE_Pos)) /*!< 4GB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_32B (0x04U << MPU_RASR_SIZE_Pos) /*!< 32B Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_64B (0x05U << MPU_RASR_SIZE_Pos) /*!< 64B Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_128B (0x06U << MPU_RASR_SIZE_Pos) /*!< 128B Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_256B (0x07U << MPU_RASR_SIZE_Pos) /*!< 256B Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_512B (0x08U << MPU_RASR_SIZE_Pos) /*!< 512B Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_1KB (0x09U << MPU_RASR_SIZE_Pos) /*!< 1KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_2KB (0x0AU << MPU_RASR_SIZE_Pos) /*!< 2KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_4KB (0x0BU << MPU_RASR_SIZE_Pos) /*!< 4KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_8KB (0x0CU << MPU_RASR_SIZE_Pos) /*!< 8KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_16KB (0x0DU << MPU_RASR_SIZE_Pos) /*!< 16KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_32KB (0x0EU << MPU_RASR_SIZE_Pos) /*!< 32KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_64KB (0x0FU << MPU_RASR_SIZE_Pos) /*!< 64KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_128KB (0x10U << MPU_RASR_SIZE_Pos) /*!< 128KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_256KB (0x11U << MPU_RASR_SIZE_Pos) /*!< 256KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_512KB (0x12U << MPU_RASR_SIZE_Pos) /*!< 512KB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_1MB (0x13U << MPU_RASR_SIZE_Pos) /*!< 1MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_2MB (0x14U << MPU_RASR_SIZE_Pos) /*!< 2MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_4MB (0x15U << MPU_RASR_SIZE_Pos) /*!< 4MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_8MB (0x16U << MPU_RASR_SIZE_Pos) /*!< 8MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_16MB (0x17U << MPU_RASR_SIZE_Pos) /*!< 16MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_32MB (0x18U << MPU_RASR_SIZE_Pos) /*!< 32MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_64MB (0x19U << MPU_RASR_SIZE_Pos) /*!< 64MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_128MB (0x1AU << MPU_RASR_SIZE_Pos) /*!< 128MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_256MB (0x1BU << MPU_RASR_SIZE_Pos) /*!< 256MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_512MB (0x1CU << MPU_RASR_SIZE_Pos) /*!< 512MB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_1GB (0x1DU << MPU_RASR_SIZE_Pos) /*!< 1GB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_2GB (0x1EU << MPU_RASR_SIZE_Pos) /*!< 2GB Size of the MPU protection region */
|
||||
#define LL_MPU_REGION_SIZE_4GB (0x1FU << MPU_RASR_SIZE_Pos) /*!< 4GB Size of the MPU protection region */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -168,12 +166,12 @@ extern "C" {
|
|||
/** @defgroup CORTEX_LL_EC_REGION_PRIVILEDGES MPU Region Privileges
|
||||
* @{
|
||||
*/
|
||||
#define LL_MPU_REGION_NO_ACCESS ((uint32_t)(0x00U << MPU_RASR_AP_Pos)) /*!< No access*/
|
||||
#define LL_MPU_REGION_PRIV_RW ((uint32_t)(0x01U << MPU_RASR_AP_Pos)) /*!< RW privileged (privileged access only)*/
|
||||
#define LL_MPU_REGION_PRIV_RW_URO ((uint32_t)(0x02U << MPU_RASR_AP_Pos)) /*!< RW privileged - RO user (Write in a user program generates a fault) */
|
||||
#define LL_MPU_REGION_FULL_ACCESS ((uint32_t)(0x03U << MPU_RASR_AP_Pos)) /*!< RW privileged & user (Full access) */
|
||||
#define LL_MPU_REGION_PRIV_RO ((uint32_t)(0x05U << MPU_RASR_AP_Pos)) /*!< RO privileged (privileged read only)*/
|
||||
#define LL_MPU_REGION_PRIV_RO_URO ((uint32_t)(0x06U << MPU_RASR_AP_Pos)) /*!< RO privileged & user (read only) */
|
||||
#define LL_MPU_REGION_NO_ACCESS (0x00U << MPU_RASR_AP_Pos) /*!< No access*/
|
||||
#define LL_MPU_REGION_PRIV_RW (0x01U << MPU_RASR_AP_Pos) /*!< RW privileged (privileged access only)*/
|
||||
#define LL_MPU_REGION_PRIV_RW_URO (0x02U << MPU_RASR_AP_Pos) /*!< RW privileged - RO user (Write in a user program generates a fault) */
|
||||
#define LL_MPU_REGION_FULL_ACCESS (0x03U << MPU_RASR_AP_Pos) /*!< RW privileged & user (Full access) */
|
||||
#define LL_MPU_REGION_PRIV_RO (0x05U << MPU_RASR_AP_Pos) /*!< RO privileged (privileged read only)*/
|
||||
#define LL_MPU_REGION_PRIV_RO_URO (0x06U << MPU_RASR_AP_Pos) /*!< RO privileged & user (read only) */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -181,10 +179,10 @@ extern "C" {
|
|||
/** @defgroup CORTEX_LL_EC_TEX MPU TEX Level
|
||||
* @{
|
||||
*/
|
||||
#define LL_MPU_TEX_LEVEL0 ((uint32_t)(0x00U << MPU_RASR_TEX_Pos)) /*!< b000 for TEX bits */
|
||||
#define LL_MPU_TEX_LEVEL1 ((uint32_t)(0x01U << MPU_RASR_TEX_Pos)) /*!< b001 for TEX bits */
|
||||
#define LL_MPU_TEX_LEVEL2 ((uint32_t)(0x02U << MPU_RASR_TEX_Pos)) /*!< b010 for TEX bits */
|
||||
#define LL_MPU_TEX_LEVEL4 ((uint32_t)(0x04U << MPU_RASR_TEX_Pos)) /*!< b100 for TEX bits */
|
||||
#define LL_MPU_TEX_LEVEL0 (0x00U << MPU_RASR_TEX_Pos) /*!< b000 for TEX bits */
|
||||
#define LL_MPU_TEX_LEVEL1 (0x01U << MPU_RASR_TEX_Pos) /*!< b001 for TEX bits */
|
||||
#define LL_MPU_TEX_LEVEL2 (0x02U << MPU_RASR_TEX_Pos) /*!< b010 for TEX bits */
|
||||
#define LL_MPU_TEX_LEVEL4 (0x04U << MPU_RASR_TEX_Pos) /*!< b100 for TEX bits */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -192,7 +190,7 @@ extern "C" {
|
|||
/** @defgroup CORTEX_LL_EC_INSTRUCTION_ACCESS MPU Instruction Access
|
||||
* @{
|
||||
*/
|
||||
#define LL_MPU_INSTRUCTION_ACCESS_ENABLE ((uint32_t)0x00U) /*!< Instruction fetches enabled */
|
||||
#define LL_MPU_INSTRUCTION_ACCESS_ENABLE 0x00U /*!< Instruction fetches enabled */
|
||||
#define LL_MPU_INSTRUCTION_ACCESS_DISABLE MPU_RASR_XN_Msk /*!< Instruction fetches disabled*/
|
||||
/**
|
||||
* @}
|
||||
|
@ -202,7 +200,7 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
#define LL_MPU_ACCESS_SHAREABLE MPU_RASR_S_Msk /*!< Shareable memory attribute */
|
||||
#define LL_MPU_ACCESS_NOT_SHAREABLE ((uint32_t)0x00U) /*!< Not Shareable memory attribute */
|
||||
#define LL_MPU_ACCESS_NOT_SHAREABLE 0x00U /*!< Not Shareable memory attribute */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -211,7 +209,7 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
#define LL_MPU_ACCESS_CACHEABLE MPU_RASR_C_Msk /*!< Cacheable memory attribute */
|
||||
#define LL_MPU_ACCESS_NOT_CACHEABLE ((uint32_t)0x00U) /*!< Not Cacheable memory attribute */
|
||||
#define LL_MPU_ACCESS_NOT_CACHEABLE 0x00U /*!< Not Cacheable memory attribute */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -220,7 +218,7 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
#define LL_MPU_ACCESS_BUFFERABLE MPU_RASR_B_Msk /*!< Bufferable memory attribute */
|
||||
#define LL_MPU_ACCESS_NOT_BUFFERABLE ((uint32_t)0x00U) /*!< Not Bufferable memory attribute */
|
||||
#define LL_MPU_ACCESS_NOT_BUFFERABLE 0x00U /*!< Not Bufferable memory attribute */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_crc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of CRC LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -70,7 +68,7 @@ extern "C" {
|
|||
/** @defgroup CRC_LL_EC_POLYLENGTH Polynomial length
|
||||
* @{
|
||||
*/
|
||||
#define LL_CRC_POLYLENGTH_32B (uint32_t)0x00000000U /*!< 32 bits Polynomial size */
|
||||
#define LL_CRC_POLYLENGTH_32B 0x00000000U /*!< 32 bits Polynomial size */
|
||||
#define LL_CRC_POLYLENGTH_16B CRC_CR_POLYSIZE_0 /*!< 16 bits Polynomial size */
|
||||
#define LL_CRC_POLYLENGTH_8B CRC_CR_POLYSIZE_1 /*!< 8 bits Polynomial size */
|
||||
#define LL_CRC_POLYLENGTH_7B (CRC_CR_POLYSIZE_1 | CRC_CR_POLYSIZE_0) /*!< 7 bits Polynomial size */
|
||||
|
@ -81,7 +79,7 @@ extern "C" {
|
|||
/** @defgroup CRC_LL_EC_INDATA_REVERSE Input Data Reverse
|
||||
* @{
|
||||
*/
|
||||
#define LL_CRC_INDATA_REVERSE_NONE (uint32_t)0x00000000U /*!< Input Data bit order not affected */
|
||||
#define LL_CRC_INDATA_REVERSE_NONE 0x00000000U /*!< Input Data bit order not affected */
|
||||
#define LL_CRC_INDATA_REVERSE_BYTE CRC_CR_REV_IN_0 /*!< Input Data bit reversal done by byte */
|
||||
#define LL_CRC_INDATA_REVERSE_HALFWORD CRC_CR_REV_IN_1 /*!< Input Data bit reversal done by half-word */
|
||||
#define LL_CRC_INDATA_REVERSE_WORD (CRC_CR_REV_IN_1 | CRC_CR_REV_IN_0) /*!< Input Data bit reversal done by word */
|
||||
|
@ -92,7 +90,7 @@ extern "C" {
|
|||
/** @defgroup CRC_LL_EC_OUTDATA_REVERSE Output Data Reverse
|
||||
* @{
|
||||
*/
|
||||
#define LL_CRC_OUTDATA_REVERSE_NONE (uint32_t)0x00000000U /*!< Output Data bit order not affected */
|
||||
#define LL_CRC_OUTDATA_REVERSE_NONE 0x00000000U /*!< Output Data bit order not affected */
|
||||
#define LL_CRC_OUTDATA_REVERSE_BIT CRC_CR_REV_OUT /*!< Output Data bit reversal done by bit */
|
||||
/**
|
||||
* @}
|
||||
|
@ -103,7 +101,7 @@ extern "C" {
|
|||
* X^32 + X^26 + X^23 + X^22 + X^16 + X^12 + X^11 + X^10 +X^8 + X^7 + X^5 + X^4 + X^2 + X + 1 .
|
||||
* @{
|
||||
*/
|
||||
#define LL_CRC_DEFAULT_CRC32_POLY (uint32_t)0x04C11DB7U /*!< Default CRC generating polynomial value */
|
||||
#define LL_CRC_DEFAULT_CRC32_POLY 0x04C11DB7U /*!< Default CRC generating polynomial value */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -111,7 +109,7 @@ extern "C" {
|
|||
/** @defgroup CRC_LL_EC_Default_InitValue Default CRC computation initialization value
|
||||
* @{
|
||||
*/
|
||||
#define LL_CRC_DEFAULT_CRC_INITVALUE (uint32_t)0xFFFFFFFFU /*!< Default CRC computation initialization value */
|
||||
#define LL_CRC_DEFAULT_CRC_INITVALUE 0xFFFFFFFFU /*!< Default CRC computation initialization value */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_dac.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of DAC LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_dma.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of DMA LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -77,18 +75,6 @@ static const uint8_t CHANNEL_OFFSET_TAB[] =
|
|||
*/
|
||||
|
||||
/* Private constants ---------------------------------------------------------*/
|
||||
/** @defgroup DMA_LL_Private_Constants DMA Private Constants
|
||||
* @{
|
||||
*/
|
||||
/* Define used to get CSELR register offset */
|
||||
#define DMA_CSELR_OFFSET (uint32_t)(DMA1_CSELR_BASE - DMA1_BASE)
|
||||
|
||||
/* Defines used for the bit position in the register and perform offsets */
|
||||
#define DMA_POSITION_CSELR_CXS POSITION_VAL(DMA_CSELR_C1S << ((Channel-1U)*4U))
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Private macros ------------------------------------------------------------*/
|
||||
#if defined(USE_FULL_LL_DRIVER)
|
||||
/** @defgroup DMA_LL_Private_Macros DMA Private Macros
|
||||
|
@ -261,15 +247,15 @@ typedef struct
|
|||
/** @defgroup DMA_LL_EC_CHANNEL CHANNEL
|
||||
* @{
|
||||
*/
|
||||
#define LL_DMA_CHANNEL_1 ((uint32_t)0x00000001U) /*!< DMA Channel 1 */
|
||||
#define LL_DMA_CHANNEL_2 ((uint32_t)0x00000002U) /*!< DMA Channel 2 */
|
||||
#define LL_DMA_CHANNEL_3 ((uint32_t)0x00000003U) /*!< DMA Channel 3 */
|
||||
#define LL_DMA_CHANNEL_4 ((uint32_t)0x00000004U) /*!< DMA Channel 4 */
|
||||
#define LL_DMA_CHANNEL_5 ((uint32_t)0x00000005U) /*!< DMA Channel 5 */
|
||||
#define LL_DMA_CHANNEL_6 ((uint32_t)0x00000006U) /*!< DMA Channel 6 */
|
||||
#define LL_DMA_CHANNEL_7 ((uint32_t)0x00000007U) /*!< DMA Channel 7 */
|
||||
#define LL_DMA_CHANNEL_1 0x00000001U /*!< DMA Channel 1 */
|
||||
#define LL_DMA_CHANNEL_2 0x00000002U /*!< DMA Channel 2 */
|
||||
#define LL_DMA_CHANNEL_3 0x00000003U /*!< DMA Channel 3 */
|
||||
#define LL_DMA_CHANNEL_4 0x00000004U /*!< DMA Channel 4 */
|
||||
#define LL_DMA_CHANNEL_5 0x00000005U /*!< DMA Channel 5 */
|
||||
#define LL_DMA_CHANNEL_6 0x00000006U /*!< DMA Channel 6 */
|
||||
#define LL_DMA_CHANNEL_7 0x00000007U /*!< DMA Channel 7 */
|
||||
#if defined(USE_FULL_LL_DRIVER)
|
||||
#define LL_DMA_CHANNEL_ALL ((uint32_t)0xFFFF0000U) /*!< DMA Channel all (used only for function @ref LL_DMA_DeInit(). */
|
||||
#define LL_DMA_CHANNEL_ALL 0xFFFF0000U /*!< DMA Channel all (used only for function @ref LL_DMA_DeInit(). */
|
||||
#endif /*USE_FULL_LL_DRIVER*/
|
||||
/**
|
||||
* @}
|
||||
|
@ -278,7 +264,7 @@ typedef struct
|
|||
/** @defgroup DMA_LL_EC_DIRECTION Transfer Direction
|
||||
* @{
|
||||
*/
|
||||
#define LL_DMA_DIRECTION_PERIPH_TO_MEMORY ((uint32_t)0x00000000U) /*!< Peripheral to memory direction */
|
||||
#define LL_DMA_DIRECTION_PERIPH_TO_MEMORY 0x00000000U /*!< Peripheral to memory direction */
|
||||
#define LL_DMA_DIRECTION_MEMORY_TO_PERIPH DMA_CCR_DIR /*!< Memory to peripheral direction */
|
||||
#define LL_DMA_DIRECTION_MEMORY_TO_MEMORY DMA_CCR_MEM2MEM /*!< Memory to memory direction */
|
||||
/**
|
||||
|
@ -288,7 +274,7 @@ typedef struct
|
|||
/** @defgroup DMA_LL_EC_MODE Transfer mode
|
||||
* @{
|
||||
*/
|
||||
#define LL_DMA_MODE_NORMAL ((uint32_t)0x00000000U) /*!< Normal Mode */
|
||||
#define LL_DMA_MODE_NORMAL 0x00000000U /*!< Normal Mode */
|
||||
#define LL_DMA_MODE_CIRCULAR DMA_CCR_CIRC /*!< Circular Mode */
|
||||
/**
|
||||
* @}
|
||||
|
@ -298,7 +284,7 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#define LL_DMA_PERIPH_INCREMENT DMA_CCR_PINC /*!< Peripheral increment mode Enable */
|
||||
#define LL_DMA_PERIPH_NOINCREMENT ((uint32_t)0x00000000U) /*!< Peripheral increment mode Disable */
|
||||
#define LL_DMA_PERIPH_NOINCREMENT 0x00000000U /*!< Peripheral increment mode Disable */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -307,7 +293,7 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#define LL_DMA_MEMORY_INCREMENT DMA_CCR_MINC /*!< Memory increment mode Enable */
|
||||
#define LL_DMA_MEMORY_NOINCREMENT ((uint32_t)0x00000000U) /*!< Memory increment mode Disable */
|
||||
#define LL_DMA_MEMORY_NOINCREMENT 0x00000000U /*!< Memory increment mode Disable */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -315,7 +301,7 @@ typedef struct
|
|||
/** @defgroup DMA_LL_EC_PDATAALIGN Peripheral data alignment
|
||||
* @{
|
||||
*/
|
||||
#define LL_DMA_PDATAALIGN_BYTE ((uint32_t)0x00000000U) /*!< Peripheral data alignment : Byte */
|
||||
#define LL_DMA_PDATAALIGN_BYTE 0x00000000U /*!< Peripheral data alignment : Byte */
|
||||
#define LL_DMA_PDATAALIGN_HALFWORD DMA_CCR_PSIZE_0 /*!< Peripheral data alignment : HalfWord */
|
||||
#define LL_DMA_PDATAALIGN_WORD DMA_CCR_PSIZE_1 /*!< Peripheral data alignment : Word */
|
||||
/**
|
||||
|
@ -325,7 +311,7 @@ typedef struct
|
|||
/** @defgroup DMA_LL_EC_MDATAALIGN Memory data alignment
|
||||
* @{
|
||||
*/
|
||||
#define LL_DMA_MDATAALIGN_BYTE ((uint32_t)0x00000000U) /*!< Memory data alignment : Byte */
|
||||
#define LL_DMA_MDATAALIGN_BYTE 0x00000000U /*!< Memory data alignment : Byte */
|
||||
#define LL_DMA_MDATAALIGN_HALFWORD DMA_CCR_MSIZE_0 /*!< Memory data alignment : HalfWord */
|
||||
#define LL_DMA_MDATAALIGN_WORD DMA_CCR_MSIZE_1 /*!< Memory data alignment : Word */
|
||||
/**
|
||||
|
@ -335,7 +321,7 @@ typedef struct
|
|||
/** @defgroup DMA_LL_EC_PRIORITY Transfer Priority level
|
||||
* @{
|
||||
*/
|
||||
#define LL_DMA_PRIORITY_LOW ((uint32_t)0x00000000U) /*!< Priority level : Low */
|
||||
#define LL_DMA_PRIORITY_LOW 0x00000000U /*!< Priority level : Low */
|
||||
#define LL_DMA_PRIORITY_MEDIUM DMA_CCR_PL_0 /*!< Priority level : Medium */
|
||||
#define LL_DMA_PRIORITY_HIGH DMA_CCR_PL_1 /*!< Priority level : High */
|
||||
#define LL_DMA_PRIORITY_VERYHIGH DMA_CCR_PL /*!< Priority level : Very_High */
|
||||
|
@ -973,7 +959,8 @@ __STATIC_INLINE uint32_t LL_DMA_GetDataLength(DMA_TypeDef *DMAx, uint32_t Channe
|
|||
|
||||
/**
|
||||
* @brief Configure the Source and Destination addresses.
|
||||
* @note Each IP using DMA provides an API to get directly the register adress (LL_PPP_DMA_GetRegAddr)
|
||||
* @note This API must not be called when the DMA channel is enabled.
|
||||
* @note Each IP using DMA provides an API to get directly the register adress (LL_PPP_DMA_GetRegAddr).
|
||||
* @rmtoll CPAR PA LL_DMA_ConfigAddresses\n
|
||||
* CMAR MA LL_DMA_ConfigAddresses
|
||||
* @param DMAx DMAx Instance
|
||||
|
@ -999,24 +986,21 @@ __STATIC_INLINE void LL_DMA_ConfigAddresses(DMA_TypeDef *DMAx, uint32_t Channel,
|
|||
/* Direction Memory to Periph */
|
||||
if (Direction == LL_DMA_DIRECTION_MEMORY_TO_PERIPH)
|
||||
{
|
||||
MODIFY_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CMAR, DMA_CMAR_MA,
|
||||
SrcAddress);
|
||||
MODIFY_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CPAR, DMA_CPAR_PA,
|
||||
DstAddress);
|
||||
WRITE_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CMAR, SrcAddress);
|
||||
WRITE_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CPAR, DstAddress);
|
||||
}
|
||||
/* Direction Periph to Memory and Memory to Memory */
|
||||
else
|
||||
{
|
||||
MODIFY_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CPAR, DMA_CPAR_PA,
|
||||
SrcAddress);
|
||||
MODIFY_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CMAR, DMA_CMAR_MA,
|
||||
DstAddress);
|
||||
WRITE_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CPAR, SrcAddress);
|
||||
WRITE_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CMAR, DstAddress);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Memory address.
|
||||
* @note Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only.
|
||||
* @note This API must not be called when the DMA channel is enabled.
|
||||
* @rmtoll CMAR MA LL_DMA_SetMemoryAddress
|
||||
* @param DMAx DMAx Instance
|
||||
* @param Channel This parameter can be one of the following values:
|
||||
|
@ -1032,13 +1016,13 @@ __STATIC_INLINE void LL_DMA_ConfigAddresses(DMA_TypeDef *DMAx, uint32_t Channel,
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_SetMemoryAddress(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryAddress)
|
||||
{
|
||||
MODIFY_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CMAR, DMA_CMAR_MA,
|
||||
MemoryAddress);
|
||||
WRITE_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CMAR, MemoryAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Peripheral address.
|
||||
* @note Interface used for direction LL_DMA_DIRECTION_PERIPH_TO_MEMORY or LL_DMA_DIRECTION_MEMORY_TO_PERIPH only.
|
||||
* @note This API must not be called when the DMA channel is enabled.
|
||||
* @rmtoll CPAR PA LL_DMA_SetPeriphAddress
|
||||
* @param DMAx DMAx Instance
|
||||
* @param Channel This parameter can be one of the following values:
|
||||
|
@ -1054,8 +1038,7 @@ __STATIC_INLINE void LL_DMA_SetMemoryAddress(DMA_TypeDef *DMAx, uint32_t Channel
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_SetPeriphAddress(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t PeriphAddress)
|
||||
{
|
||||
MODIFY_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CPAR, DMA_CPAR_PA,
|
||||
PeriphAddress);
|
||||
WRITE_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CPAR, PeriphAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1075,8 +1058,7 @@ __STATIC_INLINE void LL_DMA_SetPeriphAddress(DMA_TypeDef *DMAx, uint32_t Channel
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_DMA_GetMemoryAddress(DMA_TypeDef *DMAx, uint32_t Channel)
|
||||
{
|
||||
return (READ_BIT(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CMAR,
|
||||
DMA_CMAR_MA));
|
||||
return (READ_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CMAR));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1096,13 +1078,13 @@ __STATIC_INLINE uint32_t LL_DMA_GetMemoryAddress(DMA_TypeDef *DMAx, uint32_t Cha
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_DMA_GetPeriphAddress(DMA_TypeDef *DMAx, uint32_t Channel)
|
||||
{
|
||||
return (READ_BIT(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CPAR,
|
||||
DMA_CPAR_PA));
|
||||
return (READ_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CPAR));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Memory to Memory Source address.
|
||||
* @note Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only.
|
||||
* @note This API must not be called when the DMA channel is enabled.
|
||||
* @rmtoll CPAR PA LL_DMA_SetM2MSrcAddress
|
||||
* @param DMAx DMAx Instance
|
||||
* @param Channel This parameter can be one of the following values:
|
||||
|
@ -1118,13 +1100,13 @@ __STATIC_INLINE uint32_t LL_DMA_GetPeriphAddress(DMA_TypeDef *DMAx, uint32_t Cha
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_SetM2MSrcAddress(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryAddress)
|
||||
{
|
||||
MODIFY_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CPAR, DMA_CPAR_PA,
|
||||
MemoryAddress);
|
||||
WRITE_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CPAR, MemoryAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the Memory to Memory Destination address.
|
||||
* @note Interface used for direction LL_DMA_DIRECTION_MEMORY_TO_MEMORY only.
|
||||
* @note This API must not be called when the DMA channel is enabled.
|
||||
* @rmtoll CMAR MA LL_DMA_SetM2MDstAddress
|
||||
* @param DMAx DMAx Instance
|
||||
* @param Channel This parameter can be one of the following values:
|
||||
|
@ -1140,8 +1122,7 @@ __STATIC_INLINE void LL_DMA_SetM2MSrcAddress(DMA_TypeDef *DMAx, uint32_t Channel
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_SetM2MDstAddress(DMA_TypeDef *DMAx, uint32_t Channel, uint32_t MemoryAddress)
|
||||
{
|
||||
MODIFY_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CMAR, DMA_CMAR_MA,
|
||||
MemoryAddress);
|
||||
WRITE_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CMAR, MemoryAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1161,8 +1142,7 @@ __STATIC_INLINE void LL_DMA_SetM2MDstAddress(DMA_TypeDef *DMAx, uint32_t Channel
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_DMA_GetM2MSrcAddress(DMA_TypeDef *DMAx, uint32_t Channel)
|
||||
{
|
||||
return (READ_BIT(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CPAR,
|
||||
DMA_CPAR_PA));
|
||||
return (READ_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CPAR));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1182,8 +1162,7 @@ __STATIC_INLINE uint32_t LL_DMA_GetM2MSrcAddress(DMA_TypeDef *DMAx, uint32_t Cha
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_DMA_GetM2MDstAddress(DMA_TypeDef *DMAx, uint32_t Channel)
|
||||
{
|
||||
return (READ_BIT(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CMAR,
|
||||
DMA_CMAR_MA));
|
||||
return (READ_REG(((DMA_Channel_TypeDef *)((uint32_t)((uint32_t)DMAx + CHANNEL_OFFSET_TAB[Channel - 1U])))->CMAR));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1511,7 +1490,7 @@ __STATIC_INLINE uint32_t LL_DMA_IsActiveFlag_TE7(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_GI1(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CGIF1);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1522,7 +1501,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_GI1(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_GI2(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CGIF2);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1533,7 +1512,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_GI2(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_GI3(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CGIF3);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF3);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1544,7 +1523,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_GI3(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_GI4(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CGIF4);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF4);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1555,7 +1534,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_GI4(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_GI5(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CGIF5);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF5);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1566,7 +1545,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_GI5(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_GI6(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CGIF6);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF6);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1577,7 +1556,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_GI6(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_GI7(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CGIF7);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CGIF7);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1588,7 +1567,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_GI7(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TC1(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTCIF1);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1599,7 +1578,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TC1(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TC2(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTCIF2);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1610,7 +1589,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TC2(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TC3(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTCIF3);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF3);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1621,7 +1600,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TC3(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TC4(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTCIF4);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF4);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1632,7 +1611,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TC4(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TC5(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTCIF5);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF5);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1643,7 +1622,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TC5(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TC6(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTCIF6);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF6);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1654,7 +1633,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TC6(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TC7(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTCIF7);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTCIF7);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1665,7 +1644,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TC7(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_HT1(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CHTIF1);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1676,7 +1655,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_HT1(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_HT2(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CHTIF2);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1687,7 +1666,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_HT2(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_HT3(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CHTIF3);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF3);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1698,7 +1677,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_HT3(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_HT4(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CHTIF4);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF4);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1709,7 +1688,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_HT4(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_HT5(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CHTIF5);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF5);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1720,7 +1699,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_HT5(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_HT6(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CHTIF6);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF6);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1731,7 +1710,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_HT6(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_HT7(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CHTIF7);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CHTIF7);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1742,7 +1721,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_HT7(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TE1(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTEIF1);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1753,7 +1732,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TE1(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TE2(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTEIF2);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1764,7 +1743,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TE2(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TE3(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTEIF3);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF3);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1775,7 +1754,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TE3(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TE4(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTEIF4);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF4);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1786,7 +1765,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TE4(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TE5(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTEIF5);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF5);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1797,7 +1776,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TE5(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TE6(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTEIF6);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF6);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1808,7 +1787,7 @@ __STATIC_INLINE void LL_DMA_ClearFlag_TE6(DMA_TypeDef *DMAx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_DMA_ClearFlag_TE7(DMA_TypeDef *DMAx)
|
||||
{
|
||||
SET_BIT(DMAx->IFCR, DMA_IFCR_CTEIF7);
|
||||
WRITE_REG(DMAx->IFCR, DMA_IFCR_CTEIF7);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_exti.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of EXTI LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -190,14 +188,17 @@ typedef struct
|
|||
#if defined(EXTI_IMR2_IM39)
|
||||
#define LL_EXTI_LINE_39 EXTI_IMR2_IM39 /*!< Extended line 39 */
|
||||
#endif
|
||||
#if defined(EXTI_IMR2_IM40)
|
||||
#define LL_EXTI_LINE_40 EXTI_IMR2_IM40 /*!< Extended line 40 */
|
||||
#endif
|
||||
#define LL_EXTI_LINE_ALL_32_63 EXTI_IMR2_IM /*!< All Extended line not reserved*/
|
||||
|
||||
#endif
|
||||
|
||||
#define LL_EXTI_LINE_ALL ((uint32_t)0xFFFFFFFFU) /*!< All Extended line */
|
||||
#define LL_EXTI_LINE_ALL (0xFFFFFFFFU) /*!< All Extended line */
|
||||
|
||||
#if defined(USE_FULL_LL_DRIVER)
|
||||
#define LL_EXTI_LINE_NONE ((uint32_t)0x00000000U) /*!< None Extended line */
|
||||
#define LL_EXTI_LINE_NONE (0x00000000U) /*!< None Extended line */
|
||||
#endif /*USE_FULL_LL_DRIVER*/
|
||||
|
||||
/**
|
||||
|
@ -1154,10 +1155,10 @@ __STATIC_INLINE void LL_EXTI_GenerateSWI_0_31(uint32_t ExtiLine)
|
|||
#if defined(EXTI_32_63_SUPPORT)
|
||||
/**
|
||||
* @brief Generate a software Interrupt Event for Lines in range 32 to 63
|
||||
* @note If the interrupt is enabled on this line inthe EXTI_IMR, writing a 1 to
|
||||
* this bit when it is at '0' sets the corresponding pending bit in EXTI_PR
|
||||
* @note If the interrupt is enabled on this line inthe EXTI_IMR2, writing a 1 to
|
||||
* this bit when it is at '0' sets the corresponding pending bit in EXTI_PR2
|
||||
* resulting in an interrupt request generation.
|
||||
* This bit is cleared by clearing the corresponding bit in the EXTI_PR
|
||||
* This bit is cleared by clearing the corresponding bit in the EXTI_PR2
|
||||
* register (by writing a 1 into the bit)
|
||||
* @rmtoll SWIER2 SWIx LL_EXTI_GenerateSWI_32_63
|
||||
* @param ExtiLine This parameter can be a combination of the following values:
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_fmc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of FMC HAL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -1081,3 +1079,4 @@ HAL_StatusTypeDef FMC_PCCARD_DeInit(FMC_PCCARD_TypeDef *Device);
|
|||
#endif /* __STM32F3xx_LL_FMC_H */
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_gpio.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of GPIO LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -152,7 +150,7 @@ typedef struct
|
|||
/** @defgroup GPIO_LL_EC_MODE Mode
|
||||
* @{
|
||||
*/
|
||||
#define LL_GPIO_MODE_INPUT ((uint32_t)0x00000000U) /*!< Select input mode */
|
||||
#define LL_GPIO_MODE_INPUT (0x00000000U) /*!< Select input mode */
|
||||
#define LL_GPIO_MODE_OUTPUT GPIO_MODER_MODER0_0 /*!< Select output mode */
|
||||
#define LL_GPIO_MODE_ALTERNATE GPIO_MODER_MODER0_1 /*!< Select alternate function mode */
|
||||
#define LL_GPIO_MODE_ANALOG GPIO_MODER_MODER0 /*!< Select analog mode */
|
||||
|
@ -163,7 +161,7 @@ typedef struct
|
|||
/** @defgroup GPIO_LL_EC_OUTPUT Output Type
|
||||
* @{
|
||||
*/
|
||||
#define LL_GPIO_OUTPUT_PUSHPULL ((uint32_t)0x00000000U) /*!< Select push-pull as output type */
|
||||
#define LL_GPIO_OUTPUT_PUSHPULL (0x00000000U) /*!< Select push-pull as output type */
|
||||
#define LL_GPIO_OUTPUT_OPENDRAIN GPIO_OTYPER_OT_0 /*!< Select open-drain as output type */
|
||||
/**
|
||||
* @}
|
||||
|
@ -172,7 +170,7 @@ typedef struct
|
|||
/** @defgroup GPIO_LL_EC_SPEED Output Speed
|
||||
* @{
|
||||
*/
|
||||
#define LL_GPIO_SPEED_FREQ_LOW ((uint32_t)0x00000000U) /*!< Select I/O low output speed */
|
||||
#define LL_GPIO_SPEED_FREQ_LOW (0x00000000U) /*!< Select I/O low output speed */
|
||||
#define LL_GPIO_SPEED_FREQ_MEDIUM GPIO_OSPEEDER_OSPEEDR0_0 /*!< Select I/O medium output speed */
|
||||
#define LL_GPIO_SPEED_FREQ_HIGH GPIO_OSPEEDER_OSPEEDR0 /*!< Select I/O high output speed */
|
||||
/**
|
||||
|
@ -182,7 +180,7 @@ typedef struct
|
|||
/** @defgroup GPIO_LL_EC_PULL Pull Up Pull Down
|
||||
* @{
|
||||
*/
|
||||
#define LL_GPIO_PULL_NO ((uint32_t)0x00000000U) /*!< Select I/O no pull */
|
||||
#define LL_GPIO_PULL_NO (0x00000000U) /*!< Select I/O no pull */
|
||||
#define LL_GPIO_PULL_UP GPIO_PUPDR_PUPDR0_0 /*!< Select I/O pull up */
|
||||
#define LL_GPIO_PULL_DOWN GPIO_PUPDR_PUPDR0_1 /*!< Select I/O pull down */
|
||||
/**
|
||||
|
@ -192,22 +190,22 @@ typedef struct
|
|||
/** @defgroup GPIO_LL_EC_AF Alternate Function
|
||||
* @{
|
||||
*/
|
||||
#define LL_GPIO_AF_0 ((uint32_t)0x0000000U) /*!< Select alternate function 0 */
|
||||
#define LL_GPIO_AF_1 ((uint32_t)0x0000001U) /*!< Select alternate function 1 */
|
||||
#define LL_GPIO_AF_2 ((uint32_t)0x0000002U) /*!< Select alternate function 2 */
|
||||
#define LL_GPIO_AF_3 ((uint32_t)0x0000003U) /*!< Select alternate function 3 */
|
||||
#define LL_GPIO_AF_4 ((uint32_t)0x0000004U) /*!< Select alternate function 4 */
|
||||
#define LL_GPIO_AF_5 ((uint32_t)0x0000005U) /*!< Select alternate function 5 */
|
||||
#define LL_GPIO_AF_6 ((uint32_t)0x0000006U) /*!< Select alternate function 6 */
|
||||
#define LL_GPIO_AF_7 ((uint32_t)0x0000007U) /*!< Select alternate function 7 */
|
||||
#define LL_GPIO_AF_8 ((uint32_t)0x0000008U) /*!< Select alternate function 8 */
|
||||
#define LL_GPIO_AF_9 ((uint32_t)0x0000009U) /*!< Select alternate function 9 */
|
||||
#define LL_GPIO_AF_10 ((uint32_t)0x000000AU) /*!< Select alternate function 10 */
|
||||
#define LL_GPIO_AF_11 ((uint32_t)0x000000BU) /*!< Select alternate function 11 */
|
||||
#define LL_GPIO_AF_12 ((uint32_t)0x000000CU) /*!< Select alternate function 12 */
|
||||
#define LL_GPIO_AF_13 ((uint32_t)0x000000DU) /*!< Select alternate function 13 */
|
||||
#define LL_GPIO_AF_14 ((uint32_t)0x000000EU) /*!< Select alternate function 14 */
|
||||
#define LL_GPIO_AF_15 ((uint32_t)0x000000FU) /*!< Select alternate function 15 */
|
||||
#define LL_GPIO_AF_0 (0x0000000U) /*!< Select alternate function 0 */
|
||||
#define LL_GPIO_AF_1 (0x0000001U) /*!< Select alternate function 1 */
|
||||
#define LL_GPIO_AF_2 (0x0000002U) /*!< Select alternate function 2 */
|
||||
#define LL_GPIO_AF_3 (0x0000003U) /*!< Select alternate function 3 */
|
||||
#define LL_GPIO_AF_4 (0x0000004U) /*!< Select alternate function 4 */
|
||||
#define LL_GPIO_AF_5 (0x0000005U) /*!< Select alternate function 5 */
|
||||
#define LL_GPIO_AF_6 (0x0000006U) /*!< Select alternate function 6 */
|
||||
#define LL_GPIO_AF_7 (0x0000007U) /*!< Select alternate function 7 */
|
||||
#define LL_GPIO_AF_8 (0x0000008U) /*!< Select alternate function 8 */
|
||||
#define LL_GPIO_AF_9 (0x0000009U) /*!< Select alternate function 9 */
|
||||
#define LL_GPIO_AF_10 (0x000000AU) /*!< Select alternate function 10 */
|
||||
#define LL_GPIO_AF_11 (0x000000BU) /*!< Select alternate function 11 */
|
||||
#define LL_GPIO_AF_12 (0x000000CU) /*!< Select alternate function 12 */
|
||||
#define LL_GPIO_AF_13 (0x000000DU) /*!< Select alternate function 13 */
|
||||
#define LL_GPIO_AF_14 (0x000000EU) /*!< Select alternate function 14 */
|
||||
#define LL_GPIO_AF_15 (0x000000FU) /*!< Select alternate function 15 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_hrtim.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of HRTIM LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_i2c.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of I2C LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -188,9 +186,9 @@ typedef struct
|
|||
/** @defgroup I2C_LL_EC_PERIPHERAL_MODE Peripheral Mode
|
||||
* @{
|
||||
*/
|
||||
#define LL_I2C_MODE_I2C ((uint32_t)0x00000000U) /*!< I2C Master or Slave mode */
|
||||
#define LL_I2C_MODE_I2C 0x00000000U /*!< I2C Master or Slave mode */
|
||||
#define LL_I2C_MODE_SMBUS_HOST I2C_CR1_SMBHEN /*!< SMBus Host address acknowledge */
|
||||
#define LL_I2C_MODE_SMBUS_DEVICE ((uint32_t)0x00000000U) /*!< SMBus Device default mode (Default address not acknowledge) */
|
||||
#define LL_I2C_MODE_SMBUS_DEVICE 0x00000000U /*!< SMBus Device default mode (Default address not acknowledge) */
|
||||
#define LL_I2C_MODE_SMBUS_DEVICE_ARP I2C_CR1_SMBDEN /*!< SMBus Device Default address acknowledge */
|
||||
/**
|
||||
* @}
|
||||
|
@ -199,7 +197,7 @@ typedef struct
|
|||
/** @defgroup I2C_LL_EC_ANALOGFILTER_SELECTION Analog Filter Selection
|
||||
* @{
|
||||
*/
|
||||
#define LL_I2C_ANALOGFILTER_ENABLE ((uint32_t)0x00000000U) /*!< Analog filter is enabled. */
|
||||
#define LL_I2C_ANALOGFILTER_ENABLE 0x00000000U /*!< Analog filter is enabled. */
|
||||
#define LL_I2C_ANALOGFILTER_DISABLE I2C_CR1_ANFOFF /*!< Analog filter is disabled. */
|
||||
/**
|
||||
* @}
|
||||
|
@ -208,7 +206,7 @@ typedef struct
|
|||
/** @defgroup I2C_LL_EC_ADDRESSING_MODE Master Addressing Mode
|
||||
* @{
|
||||
*/
|
||||
#define LL_I2C_ADDRESSING_MODE_7BIT ((uint32_t) 0x00000000U) /*!< Master operates in 7-bit addressing mode. */
|
||||
#define LL_I2C_ADDRESSING_MODE_7BIT 0x00000000U /*!< Master operates in 7-bit addressing mode. */
|
||||
#define LL_I2C_ADDRESSING_MODE_10BIT I2C_CR2_ADD10 /*!< Master operates in 10-bit addressing mode.*/
|
||||
/**
|
||||
* @}
|
||||
|
@ -217,7 +215,7 @@ typedef struct
|
|||
/** @defgroup I2C_LL_EC_OWNADDRESS1 Own Address 1 Length
|
||||
* @{
|
||||
*/
|
||||
#define LL_I2C_OWNADDRESS1_7BIT ((uint32_t)0x00000000U) /*!< Own address 1 is a 7-bit address. */
|
||||
#define LL_I2C_OWNADDRESS1_7BIT 0x00000000U /*!< Own address 1 is a 7-bit address. */
|
||||
#define LL_I2C_OWNADDRESS1_10BIT I2C_OAR1_OA1MODE /*!< Own address 1 is a 10-bit address.*/
|
||||
/**
|
||||
* @}
|
||||
|
@ -241,7 +239,7 @@ typedef struct
|
|||
/** @defgroup I2C_LL_EC_I2C_ACKNOWLEDGE Acknowledge Generation
|
||||
* @{
|
||||
*/
|
||||
#define LL_I2C_ACK ((uint32_t) 0x00000000U) /*!< ACK is sent after current received byte. */
|
||||
#define LL_I2C_ACK 0x00000000U /*!< ACK is sent after current received byte. */
|
||||
#define LL_I2C_NACK I2C_CR2_NACK /*!< NACK is sent after current received byte.*/
|
||||
/**
|
||||
* @}
|
||||
|
@ -250,7 +248,7 @@ typedef struct
|
|||
/** @defgroup I2C_LL_EC_ADDRSLAVE Slave Address Length
|
||||
* @{
|
||||
*/
|
||||
#define LL_I2C_ADDRSLAVE_7BIT ((uint32_t)0x00000000U) /*!< Slave Address in 7-bit. */
|
||||
#define LL_I2C_ADDRSLAVE_7BIT 0x00000000U /*!< Slave Address in 7-bit. */
|
||||
#define LL_I2C_ADDRSLAVE_10BIT I2C_CR2_ADD10 /*!< Slave Address in 10-bit.*/
|
||||
/**
|
||||
* @}
|
||||
|
@ -259,7 +257,7 @@ typedef struct
|
|||
/** @defgroup I2C_LL_EC_REQUEST Transfer Request Direction
|
||||
* @{
|
||||
*/
|
||||
#define LL_I2C_REQUEST_WRITE ((uint32_t)0x00000000U) /*!< Master request a write transfer. */
|
||||
#define LL_I2C_REQUEST_WRITE 0x00000000U /*!< Master request a write transfer. */
|
||||
#define LL_I2C_REQUEST_READ I2C_CR2_RD_WRN /*!< Master request a read transfer. */
|
||||
/**
|
||||
* @}
|
||||
|
@ -270,7 +268,7 @@ typedef struct
|
|||
*/
|
||||
#define LL_I2C_MODE_RELOAD I2C_CR2_RELOAD /*!< Enable I2C Reload mode. */
|
||||
#define LL_I2C_MODE_AUTOEND I2C_CR2_AUTOEND /*!< Enable I2C Automatic end mode with no HW PEC comparison. */
|
||||
#define LL_I2C_MODE_SOFTEND ((uint32_t)0x00000000U) /*!< Enable I2C Software end mode with no HW PEC comparison. */
|
||||
#define LL_I2C_MODE_SOFTEND 0x00000000U /*!< Enable I2C Software end mode with no HW PEC comparison. */
|
||||
#define LL_I2C_MODE_SMBUS_RELOAD LL_I2C_MODE_RELOAD /*!< Enable SMBUS Automatic end mode with HW PEC comparison. */
|
||||
#define LL_I2C_MODE_SMBUS_AUTOEND_NO_PEC LL_I2C_MODE_AUTOEND /*!< Enable SMBUS Automatic end mode with HW PEC comparison. */
|
||||
#define LL_I2C_MODE_SMBUS_SOFTEND_NO_PEC LL_I2C_MODE_SOFTEND /*!< Enable SMBUS Software end mode with HW PEC comparison. */
|
||||
|
@ -283,7 +281,7 @@ typedef struct
|
|||
/** @defgroup I2C_LL_EC_GENERATE Start And Stop Generation
|
||||
* @{
|
||||
*/
|
||||
#define LL_I2C_GENERATE_NOSTARTSTOP ((uint32_t)0x00000000U) /*!< Don't Generate Stop and Start condition. */
|
||||
#define LL_I2C_GENERATE_NOSTARTSTOP 0x00000000U /*!< Don't Generate Stop and Start condition. */
|
||||
#define LL_I2C_GENERATE_STOP I2C_CR2_STOP /*!< Generate Stop condition (Size should be set to 0). */
|
||||
#define LL_I2C_GENERATE_START_READ (uint32_t)(I2C_CR2_START | I2C_CR2_RD_WRN) /*!< Generate Start for read request. */
|
||||
#define LL_I2C_GENERATE_START_WRITE I2C_CR2_START /*!< Generate Start for write request. */
|
||||
|
@ -298,7 +296,7 @@ typedef struct
|
|||
/** @defgroup I2C_LL_EC_DIRECTION Read Write Direction
|
||||
* @{
|
||||
*/
|
||||
#define LL_I2C_DIRECTION_WRITE ((uint32_t)0x00000000U) /*!< Write transfer request by master, slave enters receiver mode. */
|
||||
#define LL_I2C_DIRECTION_WRITE 0x00000000U /*!< Write transfer request by master, slave enters receiver mode. */
|
||||
#define LL_I2C_DIRECTION_READ I2C_ISR_DIR /*!< Read transfer request by master, slave enters transmitter mode.*/
|
||||
/**
|
||||
* @}
|
||||
|
@ -307,8 +305,8 @@ typedef struct
|
|||
/** @defgroup I2C_LL_EC_DMA_REG_DATA DMA Register Data
|
||||
* @{
|
||||
*/
|
||||
#define LL_I2C_DMA_REG_DATA_TRANSMIT ((uint32_t)0x00000000U) /*!< Get address of data register used for transmission */
|
||||
#define LL_I2C_DMA_REG_DATA_RECEIVE ((uint32_t)0x00000001U) /*!< Get address of data register used for reception */
|
||||
#define LL_I2C_DMA_REG_DATA_TRANSMIT 0x00000000U /*!< Get address of data register used for transmission */
|
||||
#define LL_I2C_DMA_REG_DATA_RECEIVE 0x00000001U /*!< Get address of data register used for reception */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -316,7 +314,7 @@ typedef struct
|
|||
/** @defgroup I2C_LL_EC_SMBUS_TIMEOUTA_MODE SMBus TimeoutA Mode SCL SDA Timeout
|
||||
* @{
|
||||
*/
|
||||
#define LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW ((uint32_t) 0x00000000U) /*!< TimeoutA is used to detect SCL low level timeout. */
|
||||
#define LL_I2C_SMBUS_TIMEOUTA_MODE_SCL_LOW 0x00000000U /*!< TimeoutA is used to detect SCL low level timeout. */
|
||||
#define LL_I2C_SMBUS_TIMEOUTA_MODE_SDA_SCL_HIGH I2C_TIMEOUTR_TIDLE /*!< TimeoutA is used to detect both SCL and SDA high level timeout.*/
|
||||
/**
|
||||
* @}
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_iwdg.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of IWDG LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -64,10 +62,10 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
#define LL_IWDG_KEY_RELOAD ((uint32_t)0x0000AAAAU) /*!< IWDG Reload Counter Enable */
|
||||
#define LL_IWDG_KEY_ENABLE ((uint32_t)0x0000CCCCU) /*!< IWDG Peripheral Enable */
|
||||
#define LL_IWDG_KEY_WR_ACCESS_ENABLE ((uint32_t)0x00005555U) /*!< IWDG KR Write Access Enable */
|
||||
#define LL_IWDG_KEY_WR_ACCESS_DISABLE ((uint32_t)0x00000000U) /*!< IWDG KR Write Access Disable */
|
||||
#define LL_IWDG_KEY_RELOAD 0x0000AAAAU /*!< IWDG Reload Counter Enable */
|
||||
#define LL_IWDG_KEY_ENABLE 0x0000CCCCU /*!< IWDG Peripheral Enable */
|
||||
#define LL_IWDG_KEY_WR_ACCESS_ENABLE 0x00005555U /*!< IWDG KR Write Access Enable */
|
||||
#define LL_IWDG_KEY_WR_ACCESS_DISABLE 0x00000000U /*!< IWDG KR Write Access Disable */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
@ -96,7 +94,7 @@ extern "C" {
|
|||
/** @defgroup IWDG_LL_EC_PRESCALER Prescaler Divider
|
||||
* @{
|
||||
*/
|
||||
#define LL_IWDG_PRESCALER_4 ((uint32_t)0x00000000U) /*!< Divider by 4 */
|
||||
#define LL_IWDG_PRESCALER_4 0x00000000U /*!< Divider by 4 */
|
||||
#define LL_IWDG_PRESCALER_8 (IWDG_PR_PR_0) /*!< Divider by 8 */
|
||||
#define LL_IWDG_PRESCALER_16 (IWDG_PR_PR_1) /*!< Divider by 16 */
|
||||
#define LL_IWDG_PRESCALER_32 (IWDG_PR_PR_1 | IWDG_PR_PR_0) /*!< Divider by 32 */
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_opamp.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of OPAMP LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_pwr.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of PWR LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -102,7 +100,7 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
#define LL_PWR_MODE_STOP_MAINREGU 0x00000000U /*!< Enter Stop mode when the CPU enters deepsleep */
|
||||
#define LL_PWR_MODE_STOP_LPREGU (PWR_CR_LPDS) /*!< Enter Stop mode (ith low power regulator ON) when the CPU enters deepsleep */
|
||||
#define LL_PWR_MODE_STOP_LPREGU (PWR_CR_LPDS) /*!< Enter Stop mode (with low power Regulator ON) when the CPU enters deepsleep */
|
||||
#define LL_PWR_MODE_STANDBY (PWR_CR_PDDS) /*!< Enter Standby mode when the CPU enters deepsleep */
|
||||
/**
|
||||
* @}
|
||||
|
@ -112,8 +110,8 @@ extern "C" {
|
|||
/** @defgroup PWR_LL_EC_REGU_MODE_DS_MODE Regulator Mode In Deep Sleep Mode
|
||||
* @{
|
||||
*/
|
||||
#define LL_PWR_REGU_DSMODE_MAIN 0x00000000U /*!< Voltage regulator in main mode during deepsleep mode */
|
||||
#define LL_PWR_REGU_DSMODE_LOW_POWER (PWR_CR_LPDS) /*!< Voltage regulator in low-power mode during deepsleep mode */
|
||||
#define LL_PWR_REGU_DSMODE_MAIN 0x00000000U /*!< Voltage Regulator in main mode during deepsleep mode */
|
||||
#define LL_PWR_REGU_DSMODE_LOW_POWER (PWR_CR_LPDS) /*!< Voltage Regulator in low-power mode during deepsleep mode */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -286,7 +284,7 @@ __STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpAccess(void)
|
|||
|
||||
#if defined(PWR_CR_LPDS)
|
||||
/**
|
||||
* @brief Set voltage regulator mode during deep sleep mode
|
||||
* @brief Set voltage Regulator mode during deep sleep mode
|
||||
* @rmtoll CR LPDS LL_PWR_SetRegulModeDS
|
||||
* @param RegulMode This parameter can be one of the following values:
|
||||
* @arg @ref LL_PWR_REGU_DSMODE_MAIN
|
||||
|
@ -299,7 +297,7 @@ __STATIC_INLINE void LL_PWR_SetRegulModeDS(uint32_t RegulMode)
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Get voltage regulator mode during deep sleep mode
|
||||
* @brief Get voltage Regulator mode during deep sleep mode
|
||||
* @rmtoll CR LPDS LL_PWR_GetRegulModeDS
|
||||
* @retval Returned value can be one of the following values:
|
||||
* @arg @ref LL_PWR_REGU_DSMODE_MAIN
|
||||
|
@ -312,7 +310,7 @@ __STATIC_INLINE uint32_t LL_PWR_GetRegulModeDS(void)
|
|||
#endif /* PWR_CR_LPDS */
|
||||
|
||||
/**
|
||||
* @brief Set power down mode when CPU enters deepsleep
|
||||
* @brief Set Power Down mode when CPU enters deepsleep
|
||||
* @rmtoll CR PDDS LL_PWR_SetPowerMode\n
|
||||
* @rmtoll CR LPDS LL_PWR_SetPowerMode
|
||||
* @param PDMode This parameter can be one of the following values:
|
||||
|
@ -327,7 +325,7 @@ __STATIC_INLINE void LL_PWR_SetPowerMode(uint32_t PDMode)
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Get power down mode when CPU enters deepsleep
|
||||
* @brief Get Power Down mode when CPU enters deepsleep
|
||||
* @rmtoll CR PDDS LL_PWR_GetPowerMode\n
|
||||
* @rmtoll CR LPDS LL_PWR_GetPowerMode
|
||||
* @retval Returned value can be one of the following values:
|
||||
|
@ -534,6 +532,11 @@ __STATIC_INLINE void LL_PWR_ClearFlag_WU(void)
|
|||
{
|
||||
SET_BIT(PWR->CR, PWR_CR_CWUF);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#if defined(USE_FULL_LL_DRIVER)
|
||||
/** @defgroup PWR_LL_EF_Init De-initialization function
|
||||
* @{
|
||||
|
@ -552,10 +555,6 @@ ErrorStatus LL_PWR_DeInit(void);
|
|||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* defined(PWR) */
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_rcc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of RCC LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -58,14 +56,6 @@ extern "C" {
|
|||
|
||||
/* Private types -------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
/** @defgroup RCC_LL_Private_Variables RCC Private Variables
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* Private constants ---------------------------------------------------------*/
|
||||
/** @defgroup RCC_LL_Private_Constants RCC Private Constants
|
||||
* @{
|
||||
|
@ -144,19 +134,19 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#if !defined (HSE_VALUE)
|
||||
#define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the HSE oscillator in Hz */
|
||||
#define HSE_VALUE 8000000U /*!< Value of the HSE oscillator in Hz */
|
||||
#endif /* HSE_VALUE */
|
||||
|
||||
#if !defined (HSI_VALUE)
|
||||
#define HSI_VALUE ((uint32_t)8000000U) /*!< Value of the HSI oscillator in Hz */
|
||||
#define HSI_VALUE 8000000U /*!< Value of the HSI oscillator in Hz */
|
||||
#endif /* HSI_VALUE */
|
||||
|
||||
#if !defined (LSE_VALUE)
|
||||
#define LSE_VALUE ((uint32_t)32768U) /*!< Value of the LSE oscillator in Hz */
|
||||
#define LSE_VALUE 32768U /*!< Value of the LSE oscillator in Hz */
|
||||
#endif /* LSE_VALUE */
|
||||
|
||||
#if !defined (LSI_VALUE)
|
||||
#define LSI_VALUE ((uint32_t)32000U) /*!< Value of the LSI oscillator in Hz */
|
||||
#define LSI_VALUE 32000U /*!< Value of the LSI oscillator in Hz */
|
||||
#endif /* LSI_VALUE */
|
||||
/**
|
||||
* @}
|
||||
|
@ -323,8 +313,8 @@ typedef struct
|
|||
/** @defgroup RCC_LL_EC_PERIPH_FREQUENCY Peripheral clock frequency
|
||||
* @{
|
||||
*/
|
||||
#define LL_RCC_PERIPH_FREQUENCY_NO (uint32_t)0x00000000U /*!< No clock enabled for the peripheral */
|
||||
#define LL_RCC_PERIPH_FREQUENCY_NA (uint32_t)0xFFFFFFFFU /*!< Frequency cannot be provided as external clock */
|
||||
#define LL_RCC_PERIPH_FREQUENCY_NO 0x00000000U /*!< No clock enabled for the peripheral */
|
||||
#define LL_RCC_PERIPH_FREQUENCY_NA 0xFFFFFFFFU /*!< Frequency cannot be provided as external clock */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -767,7 +757,7 @@ typedef struct
|
|||
/** @defgroup RCC_LL_EC_RTC_CLKSOURCE RTC clock source selection
|
||||
* @{
|
||||
*/
|
||||
#define LL_RCC_RTC_CLKSOURCE_NONE (uint32_t)0x00000000U /*!< No clock used as RTC clock */
|
||||
#define LL_RCC_RTC_CLKSOURCE_NONE 0x00000000U /*!< No clock used as RTC clock */
|
||||
#define LL_RCC_RTC_CLKSOURCE_LSE RCC_BDCR_RTCSEL_0 /*!< LSE oscillator clock used as RTC clock */
|
||||
#define LL_RCC_RTC_CLKSOURCE_LSI RCC_BDCR_RTCSEL_1 /*!< LSI oscillator clock used as RTC clock */
|
||||
#define LL_RCC_RTC_CLKSOURCE_HSE_DIV32 RCC_BDCR_RTCSEL /*!< HSE oscillator clock divided by 32 used as RTC clock */
|
||||
|
@ -890,7 +880,7 @@ typedef struct
|
|||
* @note ex: @ref __LL_RCC_CALC_PLLCLK_FREQ (HSE_VALUE, @ref LL_RCC_PLL_GetMultiplicator()
|
||||
* , @ref LL_RCC_PLL_GetPrediv());
|
||||
* @param __INPUTFREQ__ PLL Input frequency (based on HSE/HSI)
|
||||
* @param __PLLMUL__: This parameter can be one of the following values:
|
||||
* @param __PLLMUL__ This parameter can be one of the following values:
|
||||
* @arg @ref LL_RCC_PLL_MUL_2
|
||||
* @arg @ref LL_RCC_PLL_MUL_3
|
||||
* @arg @ref LL_RCC_PLL_MUL_4
|
||||
|
@ -906,7 +896,7 @@ typedef struct
|
|||
* @arg @ref LL_RCC_PLL_MUL_14
|
||||
* @arg @ref LL_RCC_PLL_MUL_15
|
||||
* @arg @ref LL_RCC_PLL_MUL_16
|
||||
* @param __PLLPREDIV__: This parameter can be one of the following values:
|
||||
* @param __PLLPREDIV__ This parameter can be one of the following values:
|
||||
* @arg @ref LL_RCC_PREDIV_DIV_1
|
||||
* @arg @ref LL_RCC_PREDIV_DIV_2
|
||||
* @arg @ref LL_RCC_PREDIV_DIV_3
|
||||
|
@ -933,7 +923,7 @@ typedef struct
|
|||
* @brief Helper macro to calculate the PLLCLK frequency
|
||||
* @note ex: @ref __LL_RCC_CALC_PLLCLK_FREQ (HSE_VALUE / (@ref LL_RCC_PLL_GetPrediv () + 1), @ref LL_RCC_PLL_GetMultiplicator());
|
||||
* @param __INPUTFREQ__ PLL Input frequency (based on HSE div Prediv / HSI div 2)
|
||||
* @param __PLLMUL__: This parameter can be one of the following values:
|
||||
* @param __PLLMUL__ This parameter can be one of the following values:
|
||||
* @arg @ref LL_RCC_PLL_MUL_2
|
||||
* @arg @ref LL_RCC_PLL_MUL_3
|
||||
* @arg @ref LL_RCC_PLL_MUL_4
|
||||
|
@ -959,7 +949,7 @@ typedef struct
|
|||
* @note: __AHBPRESCALER__ be retrieved by @ref LL_RCC_GetAHBPrescaler
|
||||
* ex: __LL_RCC_CALC_HCLK_FREQ(LL_RCC_GetAHBPrescaler())
|
||||
* @param __SYSCLKFREQ__ SYSCLK frequency (based on HSE/HSI/PLLCLK)
|
||||
* @param __AHBPRESCALER__: This parameter can be one of the following values:
|
||||
* @param __AHBPRESCALER__ This parameter can be one of the following values:
|
||||
* @arg @ref LL_RCC_SYSCLK_DIV_1
|
||||
* @arg @ref LL_RCC_SYSCLK_DIV_2
|
||||
* @arg @ref LL_RCC_SYSCLK_DIV_4
|
||||
|
@ -971,7 +961,7 @@ typedef struct
|
|||
* @arg @ref LL_RCC_SYSCLK_DIV_512
|
||||
* @retval HCLK clock frequency (in Hz)
|
||||
*/
|
||||
#define __LL_RCC_CALC_HCLK_FREQ(__SYSCLKFREQ__, __AHBPRESCALER__) ((__SYSCLKFREQ__) >> AHBPrescTable[((__AHBPRESCALER__) & RCC_CFGR_HPRE) >> RCC_POSITION_HPRE])
|
||||
#define __LL_RCC_CALC_HCLK_FREQ(__SYSCLKFREQ__, __AHBPRESCALER__) ((__SYSCLKFREQ__) >> AHBPrescTable[((__AHBPRESCALER__) & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos])
|
||||
|
||||
/**
|
||||
* @brief Helper macro to calculate the PCLK1 frequency (ABP1)
|
||||
|
@ -986,7 +976,7 @@ typedef struct
|
|||
* @arg @ref LL_RCC_APB1_DIV_16
|
||||
* @retval PCLK1 clock frequency (in Hz)
|
||||
*/
|
||||
#define __LL_RCC_CALC_PCLK1_FREQ(__HCLKFREQ__, __APB1PRESCALER__) ((__HCLKFREQ__) >> APBPrescTable[(__APB1PRESCALER__) >> RCC_POSITION_PPRE1])
|
||||
#define __LL_RCC_CALC_PCLK1_FREQ(__HCLKFREQ__, __APB1PRESCALER__) ((__HCLKFREQ__) >> APBPrescTable[(__APB1PRESCALER__) >> RCC_CFGR_PPRE1_Pos])
|
||||
|
||||
/**
|
||||
* @brief Helper macro to calculate the PCLK2 frequency (ABP2)
|
||||
|
@ -1001,7 +991,7 @@ typedef struct
|
|||
* @arg @ref LL_RCC_APB2_DIV_16
|
||||
* @retval PCLK2 clock frequency (in Hz)
|
||||
*/
|
||||
#define __LL_RCC_CALC_PCLK2_FREQ(__HCLKFREQ__, __APB2PRESCALER__) ((__HCLKFREQ__) >> APBPrescTable[(__APB2PRESCALER__) >> RCC_POSITION_PPRE2])
|
||||
#define __LL_RCC_CALC_PCLK2_FREQ(__HCLKFREQ__, __APB2PRESCALER__) ((__HCLKFREQ__) >> APBPrescTable[(__APB2PRESCALER__) >> RCC_CFGR_PPRE2_Pos])
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
@ -1138,7 +1128,7 @@ __STATIC_INLINE uint32_t LL_RCC_HSI_IsReady(void)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibration(void)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(RCC->CR, RCC_CR_HSICAL) >> RCC_POSITION_HSICAL);
|
||||
return (uint32_t)(READ_BIT(RCC->CR, RCC_CR_HSICAL) >> RCC_CR_HSICAL_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1152,7 +1142,7 @@ __STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibration(void)
|
|||
*/
|
||||
__STATIC_INLINE void LL_RCC_HSI_SetCalibTrimming(uint32_t Value)
|
||||
{
|
||||
MODIFY_REG(RCC->CR, RCC_CR_HSITRIM, Value << RCC_POSITION_HSITRIM);
|
||||
MODIFY_REG(RCC->CR, RCC_CR_HSITRIM, Value << RCC_CR_HSITRIM_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1162,7 +1152,7 @@ __STATIC_INLINE void LL_RCC_HSI_SetCalibTrimming(uint32_t Value)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RCC_HSI_GetCalibTrimming(void)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(RCC->CR, RCC_CR_HSITRIM) >> RCC_POSITION_HSITRIM);
|
||||
return (uint32_t)(READ_BIT(RCC->CR, RCC_CR_HSITRIM) >> RCC_CR_HSITRIM_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_rtc.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of RTC LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -63,58 +61,20 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
/* Masks Definition */
|
||||
#define RTC_INIT_MASK (0xFFFFFFFFU)
|
||||
#define RTC_RSF_MASK (0xFFFFFF5FU)
|
||||
#define RTC_INIT_MASK 0xFFFFFFFFU
|
||||
#define RTC_RSF_MASK 0xFFFFFF5FU
|
||||
|
||||
/* Write protection defines */
|
||||
#define RTC_WRITE_PROTECTION_DISABLE ((uint8_t)0xFFU)
|
||||
#define RTC_WRITE_PROTECTION_ENABLE_1 ((uint8_t)0xCAU)
|
||||
#define RTC_WRITE_PROTECTION_ENABLE_2 ((uint8_t)0x53U)
|
||||
|
||||
/* Defines used for the bit position in the register and perform offsets */
|
||||
#define RTC_POSITION_TR_HT (uint32_t)POSITION_VAL(RTC_TR_HT)
|
||||
#define RTC_POSITION_TR_HU (uint32_t)POSITION_VAL(RTC_TR_HU)
|
||||
#define RTC_POSITION_TR_MT (uint32_t)POSITION_VAL(RTC_TR_MNT)
|
||||
#define RTC_POSITION_TR_MU (uint32_t)POSITION_VAL(RTC_TR_MNU)
|
||||
#define RTC_POSITION_TR_ST (uint32_t)POSITION_VAL(RTC_TR_ST)
|
||||
#define RTC_POSITION_TR_SU (uint32_t)POSITION_VAL(RTC_TR_SU)
|
||||
#define RTC_POSITION_DR_YT (uint32_t)POSITION_VAL(RTC_DR_YT)
|
||||
#define RTC_POSITION_DR_YU (uint32_t)POSITION_VAL(RTC_DR_YU)
|
||||
#define RTC_POSITION_DR_MT (uint32_t)POSITION_VAL(RTC_DR_MT)
|
||||
#define RTC_POSITION_DR_MU (uint32_t)POSITION_VAL(RTC_DR_MU)
|
||||
#define RTC_POSITION_DR_DT (uint32_t)POSITION_VAL(RTC_DR_DT)
|
||||
#define RTC_POSITION_DR_DU (uint32_t)POSITION_VAL(RTC_DR_DU)
|
||||
#define RTC_POSITION_DR_WDU (uint32_t)POSITION_VAL(RTC_DR_WDU)
|
||||
#define RTC_POSITION_ALMA_DT (uint32_t)POSITION_VAL(RTC_ALRMAR_DT)
|
||||
#define RTC_POSITION_ALMA_DU (uint32_t)POSITION_VAL(RTC_ALRMAR_DU)
|
||||
#define RTC_POSITION_ALMA_HT (uint32_t)POSITION_VAL(RTC_ALRMAR_HT)
|
||||
#define RTC_POSITION_ALMA_HU (uint32_t)POSITION_VAL(RTC_ALRMAR_HU)
|
||||
#define RTC_POSITION_ALMA_MT (uint32_t)POSITION_VAL(RTC_ALRMAR_MNT)
|
||||
#define RTC_POSITION_ALMA_MU (uint32_t)POSITION_VAL(RTC_ALRMAR_MNU)
|
||||
#define RTC_POSITION_ALMA_SU (uint32_t)POSITION_VAL(RTC_ALRMAR_SU)
|
||||
#define RTC_POSITION_ALMA_ST (uint32_t)POSITION_VAL(RTC_ALRMAR_ST)
|
||||
#define RTC_POSITION_ALMB_DT (uint32_t)POSITION_VAL(RTC_ALRMBR_DT)
|
||||
#define RTC_POSITION_ALMB_DU (uint32_t)POSITION_VAL(RTC_ALRMBR_DU)
|
||||
#define RTC_POSITION_ALMB_HT (uint32_t)POSITION_VAL(RTC_ALRMBR_HT)
|
||||
#define RTC_POSITION_ALMB_HU (uint32_t)POSITION_VAL(RTC_ALRMBR_HU)
|
||||
#define RTC_POSITION_ALMB_MT (uint32_t)POSITION_VAL(RTC_ALRMBR_MNT)
|
||||
#define RTC_POSITION_ALMB_MU (uint32_t)POSITION_VAL(RTC_ALRMBR_MNU)
|
||||
#define RTC_POSITION_ALMB_SU (uint32_t)POSITION_VAL(RTC_ALRMBR_SU)
|
||||
#define RTC_POSITION_ALMB_ST (uint32_t)POSITION_VAL(RTC_ALRMBR_ST)
|
||||
#define RTC_POSITION_PRER_PREDIV_A (uint32_t)POSITION_VAL(RTC_PRER_PREDIV_A)
|
||||
#define RTC_POSITION_ALMA_MASKSS (uint32_t)POSITION_VAL(RTC_ALRMASSR_MASKSS)
|
||||
#define RTC_POSITION_ALMB_MASKSS (uint32_t)POSITION_VAL(RTC_ALRMBSSR_MASKSS)
|
||||
#define RTC_POSITION_TS_HU (uint32_t)POSITION_VAL(RTC_TSTR_HU)
|
||||
#define RTC_POSITION_TS_MNU (uint32_t)POSITION_VAL(RTC_TSTR_MNU)
|
||||
#define RTC_POSITION_TS_WDU (uint32_t)POSITION_VAL(RTC_TSDR_WDU)
|
||||
#define RTC_POSITION_TS_MU (uint32_t)POSITION_VAL(RTC_TSDR_MU)
|
||||
|
||||
/* Defines used to combine date & time */
|
||||
#define RTC_OFFSET_WEEKDAY (uint32_t)24U
|
||||
#define RTC_OFFSET_DAY (uint32_t)16U
|
||||
#define RTC_OFFSET_MONTH (uint32_t)8U
|
||||
#define RTC_OFFSET_HOUR (uint32_t)16U
|
||||
#define RTC_OFFSET_MINUTE (uint32_t)8U
|
||||
#define RTC_OFFSET_WEEKDAY 24U
|
||||
#define RTC_OFFSET_DAY 16U
|
||||
#define RTC_OFFSET_MONTH 8U
|
||||
#define RTC_OFFSET_HOUR 16U
|
||||
#define RTC_OFFSET_MINUTE 8U
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
@ -261,8 +221,8 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_FORMAT FORMAT
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_FORMAT_BIN ((uint32_t)0x000000000U) /*!< Binary data format */
|
||||
#define LL_RTC_FORMAT_BCD ((uint32_t)0x000000001U) /*!< BCD data format */
|
||||
#define LL_RTC_FORMAT_BIN 0x000000000U /*!< Binary data format */
|
||||
#define LL_RTC_FORMAT_BCD 0x000000001U /*!< BCD data format */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -270,7 +230,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_ALMA_WEEKDAY_SELECTION RTC Alarm A Date WeekDay
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_ALMA_DATEWEEKDAYSEL_DATE ((uint32_t)0x00000000U) /*!< Alarm A Date is selected */
|
||||
#define LL_RTC_ALMA_DATEWEEKDAYSEL_DATE 0x00000000U /*!< Alarm A Date is selected */
|
||||
#define LL_RTC_ALMA_DATEWEEKDAYSEL_WEEKDAY RTC_ALRMAR_WDSEL /*!< Alarm A WeekDay is selected */
|
||||
/**
|
||||
* @}
|
||||
|
@ -279,7 +239,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_ALMB_WEEKDAY_SELECTION RTC Alarm B Date WeekDay
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_ALMB_DATEWEEKDAYSEL_DATE ((uint32_t)0x00000000U) /*!< Alarm B Date is selected */
|
||||
#define LL_RTC_ALMB_DATEWEEKDAYSEL_DATE 0x00000000U /*!< Alarm B Date is selected */
|
||||
#define LL_RTC_ALMB_DATEWEEKDAYSEL_WEEKDAY RTC_ALRMBR_WDSEL /*!< Alarm B WeekDay is selected */
|
||||
/**
|
||||
* @}
|
||||
|
@ -360,7 +320,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_HOURFORMAT HOUR FORMAT
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_HOURFORMAT_24HOUR (uint32_t)0x00000000U /*!< 24 hour/day format */
|
||||
#define LL_RTC_HOURFORMAT_24HOUR 0x00000000U /*!< 24 hour/day format */
|
||||
#define LL_RTC_HOURFORMAT_AMPM RTC_CR_FMT /*!< AM/PM hour format */
|
||||
/**
|
||||
* @}
|
||||
|
@ -369,7 +329,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_ALARMOUT ALARM OUTPUT
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_ALARMOUT_DISABLE ((uint32_t)0x00000000U) /*!< Output disabled */
|
||||
#define LL_RTC_ALARMOUT_DISABLE 0x00000000U /*!< Output disabled */
|
||||
#define LL_RTC_ALARMOUT_ALMA RTC_CR_OSEL_0 /*!< Alarm A output enabled */
|
||||
#define LL_RTC_ALARMOUT_ALMB RTC_CR_OSEL_1 /*!< Alarm B output enabled */
|
||||
#define LL_RTC_ALARMOUT_WAKEUP RTC_CR_OSEL /*!< Wakeup output enabled */
|
||||
|
@ -380,7 +340,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_ALARM_OUTPUTTYPE ALARM OUTPUT TYPE
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN (uint32_t)0x00000000U /*!< RTC_ALARM, when mapped on PC13, is open-drain output */
|
||||
#define LL_RTC_ALARM_OUTPUTTYPE_OPENDRAIN 0x00000000U /*!< RTC_ALARM, when mapped on PC13, is open-drain output */
|
||||
#define LL_RTC_ALARM_OUTPUTTYPE_PUSHPULL RTC_TAFCR_ALARMOUTTYPE /*!< RTC_ALARM, when mapped on PC13, is push-pull output */
|
||||
/**
|
||||
* @}
|
||||
|
@ -399,7 +359,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_OUTPUTPOLARITY_PIN OUTPUT POLARITY PIN
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_OUTPUTPOLARITY_PIN_HIGH (uint32_t)0x00000000U /*!< Pin is high when ALRAF/ALRBF/WUTF is asserted (depending on OSEL)*/
|
||||
#define LL_RTC_OUTPUTPOLARITY_PIN_HIGH 0x00000000U /*!< Pin is high when ALRAF/ALRBF/WUTF is asserted (depending on OSEL)*/
|
||||
#define LL_RTC_OUTPUTPOLARITY_PIN_LOW RTC_CR_POL /*!< Pin is low when ALRAF/ALRBF/WUTF is asserted (depending on OSEL) */
|
||||
/**
|
||||
* @}
|
||||
|
@ -408,7 +368,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_TIME_FORMAT TIME FORMAT
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_TIME_FORMAT_AM_OR_24 (uint32_t)0x00000000U /*!< AM or 24-hour format */
|
||||
#define LL_RTC_TIME_FORMAT_AM_OR_24 0x00000000U /*!< AM or 24-hour format */
|
||||
#define LL_RTC_TIME_FORMAT_PM RTC_TR_PM /*!< PM */
|
||||
/**
|
||||
* @}
|
||||
|
@ -417,7 +377,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_SHIFT_SECOND SHIFT SECOND
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_SHIFT_SECOND_DELAY (uint32_t)0x00000000U /* Delay (seconds) = SUBFS / (PREDIV_S + 1) */
|
||||
#define LL_RTC_SHIFT_SECOND_DELAY 0x00000000U /* Delay (seconds) = SUBFS / (PREDIV_S + 1) */
|
||||
#define LL_RTC_SHIFT_SECOND_ADVANCE RTC_SHIFTR_ADD1S /* Advance (seconds) = (1 - (SUBFS / (PREDIV_S + 1))) */
|
||||
/**
|
||||
* @}
|
||||
|
@ -426,7 +386,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_ALMA_MASK ALARMA MASK
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_ALMA_MASK_NONE ((uint32_t)0x00000000U) /*!< No masks applied on Alarm A*/
|
||||
#define LL_RTC_ALMA_MASK_NONE 0x00000000U /*!< No masks applied on Alarm A*/
|
||||
#define LL_RTC_ALMA_MASK_DATEWEEKDAY RTC_ALRMAR_MSK4 /*!< Date/day do not care in Alarm A comparison */
|
||||
#define LL_RTC_ALMA_MASK_HOURS RTC_ALRMAR_MSK3 /*!< Hours do not care in Alarm A comparison */
|
||||
#define LL_RTC_ALMA_MASK_MINUTES RTC_ALRMAR_MSK2 /*!< Minutes do not care in Alarm A comparison */
|
||||
|
@ -439,7 +399,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_ALMA_TIME_FORMAT ALARMA TIME FORMAT
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_ALMA_TIME_FORMAT_AM (uint32_t)0x00000000U /*!< AM or 24-hour format */
|
||||
#define LL_RTC_ALMA_TIME_FORMAT_AM 0x00000000U /*!< AM or 24-hour format */
|
||||
#define LL_RTC_ALMA_TIME_FORMAT_PM RTC_ALRMAR_PM /*!< PM */
|
||||
/**
|
||||
* @}
|
||||
|
@ -448,7 +408,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_ALMB_MASK ALARMB MASK
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_ALMB_MASK_NONE ((uint32_t)0x00000000U) /*!< No masks applied on Alarm B*/
|
||||
#define LL_RTC_ALMB_MASK_NONE 0x00000000U /*!< No masks applied on Alarm B*/
|
||||
#define LL_RTC_ALMB_MASK_DATEWEEKDAY RTC_ALRMBR_MSK4 /*!< Date/day do not care in Alarm B comparison */
|
||||
#define LL_RTC_ALMB_MASK_HOURS RTC_ALRMBR_MSK3 /*!< Hours do not care in Alarm B comparison */
|
||||
#define LL_RTC_ALMB_MASK_MINUTES RTC_ALRMBR_MSK2 /*!< Minutes do not care in Alarm B comparison */
|
||||
|
@ -461,7 +421,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_ALMB_TIME_FORMAT ALARMB TIME FORMAT
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_ALMB_TIME_FORMAT_AM (uint32_t)0x00000000U /*!< AM or 24-hour format */
|
||||
#define LL_RTC_ALMB_TIME_FORMAT_AM 0x00000000U /*!< AM or 24-hour format */
|
||||
#define LL_RTC_ALMB_TIME_FORMAT_PM RTC_ALRMBR_PM /*!< PM */
|
||||
/**
|
||||
* @}
|
||||
|
@ -470,7 +430,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_TIMESTAMP_EDGE TIMESTAMP EDGE
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_TIMESTAMP_EDGE_RISING (uint32_t)0x00000000U /*!< RTC_TS input rising edge generates a time-stamp event */
|
||||
#define LL_RTC_TIMESTAMP_EDGE_RISING 0x00000000U /*!< RTC_TS input rising edge generates a time-stamp event */
|
||||
#define LL_RTC_TIMESTAMP_EDGE_FALLING RTC_CR_TSEDGE /*!< RTC_TS input falling edge generates a time-stamp even */
|
||||
/**
|
||||
* @}
|
||||
|
@ -479,7 +439,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_TS_TIME_FORMAT TIMESTAMP TIME FORMAT
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_TS_TIME_FORMAT_AM (uint32_t)0x00000000U /*!< AM or 24-hour format */
|
||||
#define LL_RTC_TS_TIME_FORMAT_AM 0x00000000U /*!< AM or 24-hour format */
|
||||
#define LL_RTC_TS_TIME_FORMAT_PM RTC_TSTR_PM /*!< PM */
|
||||
/**
|
||||
* @}
|
||||
|
@ -537,7 +497,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_TAMPER_DURATION TAMPER DURATION
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_TAMPER_DURATION_1RTCCLK ((uint32_t)0x00000000U) /*!< Tamper pins are pre-charged before sampling during 1 RTCCLK cycle */
|
||||
#define LL_RTC_TAMPER_DURATION_1RTCCLK 0x00000000U /*!< Tamper pins are pre-charged before sampling during 1 RTCCLK cycle */
|
||||
#define LL_RTC_TAMPER_DURATION_2RTCCLK RTC_TAFCR_TAMPPRCH_0 /*!< Tamper pins are pre-charged before sampling during 2 RTCCLK cycles */
|
||||
#define LL_RTC_TAMPER_DURATION_4RTCCLK RTC_TAFCR_TAMPPRCH_1 /*!< Tamper pins are pre-charged before sampling during 4 RTCCLK cycles */
|
||||
#define LL_RTC_TAMPER_DURATION_8RTCCLK RTC_TAFCR_TAMPPRCH /*!< Tamper pins are pre-charged before sampling during 8 RTCCLK cycles */
|
||||
|
@ -550,7 +510,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_TAMPER_FILTER TAMPER FILTER
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_TAMPER_FILTER_DISABLE ((uint32_t)0x00000000U) /*!< Tamper filter is disabled */
|
||||
#define LL_RTC_TAMPER_FILTER_DISABLE 0x00000000U /*!< Tamper filter is disabled */
|
||||
#define LL_RTC_TAMPER_FILTER_2SAMPLE RTC_TAFCR_TAMPFLT_0 /*!< Tamper is activated after 2 consecutive samples at the active level */
|
||||
#define LL_RTC_TAMPER_FILTER_4SAMPLE RTC_TAFCR_TAMPFLT_1 /*!< Tamper is activated after 4 consecutive samples at the active level */
|
||||
#define LL_RTC_TAMPER_FILTER_8SAMPLE RTC_TAFCR_TAMPFLT /*!< Tamper is activated after 8 consecutive samples at the active level. */
|
||||
|
@ -563,7 +523,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_TAMPER_SAMPLFREQDIV TAMPER SAMPLING FREQUENCY DIVIDER
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_TAMPER_SAMPLFREQDIV_32768 ((uint32_t)0x00000000U) /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 32768 */
|
||||
#define LL_RTC_TAMPER_SAMPLFREQDIV_32768 0x00000000U /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 32768 */
|
||||
#define LL_RTC_TAMPER_SAMPLFREQDIV_16384 RTC_TAFCR_TAMPFREQ_0 /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 16384 */
|
||||
#define LL_RTC_TAMPER_SAMPLFREQDIV_8192 RTC_TAFCR_TAMPFREQ_1 /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 8192 */
|
||||
#define LL_RTC_TAMPER_SAMPLFREQDIV_4096 (RTC_TAFCR_TAMPFREQ_1 | RTC_TAFCR_TAMPFREQ_0) /*!< Each of the tamper inputs are sampled with a frequency = RTCCLK / 4096 */
|
||||
|
@ -595,7 +555,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_WAKEUPCLOCK_DIV WAKEUP CLOCK DIV
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_WAKEUPCLOCK_DIV_16 ((uint32_t)0x00000000U) /*!< RTC/16 clock is selected */
|
||||
#define LL_RTC_WAKEUPCLOCK_DIV_16 0x00000000U /*!< RTC/16 clock is selected */
|
||||
#define LL_RTC_WAKEUPCLOCK_DIV_8 (RTC_CR_WUCKSEL_0) /*!< RTC/8 clock is selected */
|
||||
#define LL_RTC_WAKEUPCLOCK_DIV_4 (RTC_CR_WUCKSEL_1) /*!< RTC/4 clock is selected */
|
||||
#define LL_RTC_WAKEUPCLOCK_DIV_2 (RTC_CR_WUCKSEL_1 | RTC_CR_WUCKSEL_0) /*!< RTC/2 clock is selected */
|
||||
|
@ -609,45 +569,45 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_BKP BACKUP
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_BKP_DR0 ((uint32_t)0x00000000U)
|
||||
#define LL_RTC_BKP_DR1 ((uint32_t)0x00000001U)
|
||||
#define LL_RTC_BKP_DR2 ((uint32_t)0x00000002U)
|
||||
#define LL_RTC_BKP_DR3 ((uint32_t)0x00000003U)
|
||||
#define LL_RTC_BKP_DR4 ((uint32_t)0x00000004U)
|
||||
#define LL_RTC_BKP_DR0 0x00000000U
|
||||
#define LL_RTC_BKP_DR1 0x00000001U
|
||||
#define LL_RTC_BKP_DR2 0x00000002U
|
||||
#define LL_RTC_BKP_DR3 0x00000003U
|
||||
#define LL_RTC_BKP_DR4 0x00000004U
|
||||
#if RTC_BKP_NUMBER > 5
|
||||
#define LL_RTC_BKP_DR5 ((uint32_t)0x00000005U)
|
||||
#define LL_RTC_BKP_DR6 ((uint32_t)0x00000006U)
|
||||
#define LL_RTC_BKP_DR7 ((uint32_t)0x00000007U)
|
||||
#define LL_RTC_BKP_DR8 ((uint32_t)0x00000008U)
|
||||
#define LL_RTC_BKP_DR9 ((uint32_t)0x00000009U)
|
||||
#define LL_RTC_BKP_DR10 ((uint32_t)0x0000000AU)
|
||||
#define LL_RTC_BKP_DR11 ((uint32_t)0x0000000BU)
|
||||
#define LL_RTC_BKP_DR12 ((uint32_t)0x0000000CU)
|
||||
#define LL_RTC_BKP_DR13 ((uint32_t)0x0000000DU)
|
||||
#define LL_RTC_BKP_DR14 ((uint32_t)0x0000000EU)
|
||||
#define LL_RTC_BKP_DR15 ((uint32_t)0x0000000FU)
|
||||
#define LL_RTC_BKP_DR5 0x00000005U
|
||||
#define LL_RTC_BKP_DR6 0x00000006U
|
||||
#define LL_RTC_BKP_DR7 0x00000007U
|
||||
#define LL_RTC_BKP_DR8 0x00000008U
|
||||
#define LL_RTC_BKP_DR9 0x00000009U
|
||||
#define LL_RTC_BKP_DR10 0x0000000AU
|
||||
#define LL_RTC_BKP_DR11 0x0000000BU
|
||||
#define LL_RTC_BKP_DR12 0x0000000CU
|
||||
#define LL_RTC_BKP_DR13 0x0000000DU
|
||||
#define LL_RTC_BKP_DR14 0x0000000EU
|
||||
#define LL_RTC_BKP_DR15 0x0000000FU
|
||||
#endif /* RTC_BKP_NUMBER > 5 */
|
||||
|
||||
#if RTC_BKP_NUMBER > 16
|
||||
#define LL_RTC_BKP_DR16 ((uint32_t)0x00000010U)
|
||||
#define LL_RTC_BKP_DR17 ((uint32_t)0x00000011U)
|
||||
#define LL_RTC_BKP_DR18 ((uint32_t)0x00000012U)
|
||||
#define LL_RTC_BKP_DR19 ((uint32_t)0x00000013U)
|
||||
#define LL_RTC_BKP_DR16 0x00000010U
|
||||
#define LL_RTC_BKP_DR17 0x00000011U
|
||||
#define LL_RTC_BKP_DR18 0x00000012U
|
||||
#define LL_RTC_BKP_DR19 0x00000013U
|
||||
#endif /* RTC_BKP_NUMBER > 16 */
|
||||
|
||||
#if RTC_BKP_NUMBER > 20
|
||||
#define LL_RTC_BKP_DR20 ((uint32_t)0x00000014U)
|
||||
#define LL_RTC_BKP_DR21 ((uint32_t)0x00000015U)
|
||||
#define LL_RTC_BKP_DR22 ((uint32_t)0x00000016U)
|
||||
#define LL_RTC_BKP_DR23 ((uint32_t)0x00000017U)
|
||||
#define LL_RTC_BKP_DR24 ((uint32_t)0x00000018U)
|
||||
#define LL_RTC_BKP_DR25 ((uint32_t)0x00000019U)
|
||||
#define LL_RTC_BKP_DR26 ((uint32_t)0x0000001AU)
|
||||
#define LL_RTC_BKP_DR27 ((uint32_t)0x0000001BU)
|
||||
#define LL_RTC_BKP_DR28 ((uint32_t)0x0000001CU)
|
||||
#define LL_RTC_BKP_DR29 ((uint32_t)0x0000001DU)
|
||||
#define LL_RTC_BKP_DR30 ((uint32_t)0x0000001EU)
|
||||
#define LL_RTC_BKP_DR31 ((uint32_t)0x0000001FU)
|
||||
#define LL_RTC_BKP_DR20 0x00000014U
|
||||
#define LL_RTC_BKP_DR21 0x00000015U
|
||||
#define LL_RTC_BKP_DR22 0x00000016U
|
||||
#define LL_RTC_BKP_DR23 0x00000017U
|
||||
#define LL_RTC_BKP_DR24 0x00000018U
|
||||
#define LL_RTC_BKP_DR25 0x00000019U
|
||||
#define LL_RTC_BKP_DR26 0x0000001AU
|
||||
#define LL_RTC_BKP_DR27 0x0000001BU
|
||||
#define LL_RTC_BKP_DR28 0x0000001CU
|
||||
#define LL_RTC_BKP_DR29 0x0000001DU
|
||||
#define LL_RTC_BKP_DR30 0x0000001EU
|
||||
#define LL_RTC_BKP_DR31 0x0000001FU
|
||||
#endif /* RTC_BKP_NUMBER > 20 */
|
||||
/**
|
||||
* @}
|
||||
|
@ -657,9 +617,9 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_CALIB_OUTPUT Calibration output
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_CALIB_OUTPUT_NONE (uint32_t)0x00000000U /*!< Calibration output disabled */
|
||||
#define LL_RTC_CALIB_OUTPUT_1HZ (RTC_CR_COE | RTC_CR_COSEL) /*!< Calibration output is 512 Hz */
|
||||
#define LL_RTC_CALIB_OUTPUT_512HZ (RTC_CR_COE) /*!< Calibration output is 1 Hz */
|
||||
#define LL_RTC_CALIB_OUTPUT_NONE 0x00000000U /*!< Calibration output disabled */
|
||||
#define LL_RTC_CALIB_OUTPUT_1HZ (RTC_CR_COE | RTC_CR_COSEL) /*!< Calibration output is 1 Hz */
|
||||
#define LL_RTC_CALIB_OUTPUT_512HZ (RTC_CR_COE) /*!< Calibration output is 512 Hz */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -667,7 +627,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_CALIB_INSERTPULSE Calibration pulse insertion
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_CALIB_INSERTPULSE_NONE (uint32_t)0x00000000U /*!< No RTCCLK pulses are added */
|
||||
#define LL_RTC_CALIB_INSERTPULSE_NONE 0x00000000U /*!< No RTCCLK pulses are added */
|
||||
#define LL_RTC_CALIB_INSERTPULSE_SET RTC_CALR_CALP /*!< One RTCCLK pulse is effectively inserted every 2exp11 pulses (frequency increased by 488.5 ppm) */
|
||||
/**
|
||||
* @}
|
||||
|
@ -676,7 +636,7 @@ typedef struct
|
|||
/** @defgroup RTC_LL_EC_CALIB_PERIOD Calibration period
|
||||
* @{
|
||||
*/
|
||||
#define LL_RTC_CALIB_PERIOD_32SEC (uint32_t)0x00000000U /*!< Use a 32-second calibration cycle period */
|
||||
#define LL_RTC_CALIB_PERIOD_32SEC 0x00000000U /*!< Use a 32-second calibration cycle period */
|
||||
#define LL_RTC_CALIB_PERIOD_16SEC RTC_CALR_CALW16 /*!< Use a 16-second calibration cycle period */
|
||||
#define LL_RTC_CALIB_PERIOD_8SEC RTC_CALR_CALW8 /*!< Use a 8-second calibration cycle period */
|
||||
/**
|
||||
|
@ -1123,7 +1083,7 @@ __STATIC_INLINE void LL_RTC_DisableRefClock(RTC_TypeDef *RTCx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_RTC_SetAsynchPrescaler(RTC_TypeDef *RTCx, uint32_t AsynchPrescaler)
|
||||
{
|
||||
MODIFY_REG(RTCx->PRER, RTC_PRER_PREDIV_A, AsynchPrescaler << RTC_POSITION_PRER_PREDIV_A);
|
||||
MODIFY_REG(RTCx->PRER, RTC_PRER_PREDIV_A, AsynchPrescaler << RTC_PRER_PREDIV_A_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1146,7 +1106,7 @@ __STATIC_INLINE void LL_RTC_SetSynchPrescaler(RTC_TypeDef *RTCx, uint32_t SynchP
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_GetAsynchPrescaler(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(RTCx->PRER, RTC_PRER_PREDIV_A) >> RTC_POSITION_PRER_PREDIV_A);
|
||||
return (uint32_t)(READ_BIT(RTCx->PRER, RTC_PRER_PREDIV_A) >> RTC_PRER_PREDIV_A_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1238,7 +1198,7 @@ __STATIC_INLINE uint32_t LL_RTC_TIME_GetFormat(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_TIME_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
|
||||
{
|
||||
MODIFY_REG(RTCx->TR, (RTC_TR_HT | RTC_TR_HU),
|
||||
(((Hours & 0xF0U) << (RTC_POSITION_TR_HT - 4U)) | ((Hours & 0x0FU) << RTC_POSITION_TR_HU)));
|
||||
(((Hours & 0xF0U) << (RTC_TR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_TR_HU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1259,7 +1219,7 @@ __STATIC_INLINE uint32_t LL_RTC_TIME_GetHour(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->TR, (RTC_TR_HT | RTC_TR_HU));
|
||||
return (uint32_t)((((temp & RTC_TR_HT) >> RTC_POSITION_TR_HT) << 4U) | ((temp & RTC_TR_HU) >> RTC_POSITION_TR_HU));
|
||||
return (uint32_t)((((temp & RTC_TR_HT) >> RTC_TR_HT_Pos) << 4U) | ((temp & RTC_TR_HU) >> RTC_TR_HU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1276,7 +1236,7 @@ __STATIC_INLINE uint32_t LL_RTC_TIME_GetHour(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_TIME_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
|
||||
{
|
||||
MODIFY_REG(RTCx->TR, (RTC_TR_MNT | RTC_TR_MNU),
|
||||
(((Minutes & 0xF0U) << (RTC_POSITION_TR_MT - 4U)) | ((Minutes & 0x0FU) << RTC_POSITION_TR_MU)));
|
||||
(((Minutes & 0xF0U) << (RTC_TR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_TR_MNU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1297,7 +1257,7 @@ __STATIC_INLINE uint32_t LL_RTC_TIME_GetMinute(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->TR, (RTC_TR_MNT | RTC_TR_MNU));
|
||||
return (uint32_t)((((temp & RTC_TR_MNT) >> RTC_POSITION_TR_MT) << 4U) | ((temp & RTC_TR_MNU) >> RTC_POSITION_TR_MU));
|
||||
return (uint32_t)((((temp & RTC_TR_MNT) >> RTC_TR_MNT_Pos) << 4U) | ((temp & RTC_TR_MNU) >> RTC_TR_MNU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1314,7 +1274,7 @@ __STATIC_INLINE uint32_t LL_RTC_TIME_GetMinute(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_TIME_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
|
||||
{
|
||||
MODIFY_REG(RTCx->TR, (RTC_TR_ST | RTC_TR_SU),
|
||||
(((Seconds & 0xF0U) << (RTC_POSITION_TR_ST - 4U)) | ((Seconds & 0x0FU) << RTC_POSITION_TR_SU)));
|
||||
(((Seconds & 0xF0U) << (RTC_TR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_TR_SU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1335,7 +1295,7 @@ __STATIC_INLINE uint32_t LL_RTC_TIME_GetSecond(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->TR, (RTC_TR_ST | RTC_TR_SU));
|
||||
return (uint32_t)((((temp & RTC_TR_ST) >> RTC_POSITION_TR_ST) << 4U) | ((temp & RTC_TR_SU) >> RTC_POSITION_TR_SU));
|
||||
return (uint32_t)((((temp & RTC_TR_ST) >> RTC_TR_ST_Pos) << 4U) | ((temp & RTC_TR_SU) >> RTC_TR_SU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1364,9 +1324,9 @@ __STATIC_INLINE void LL_RTC_TIME_Config(RTC_TypeDef *RTCx, uint32_t Format12_24,
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = Format12_24 | \
|
||||
(((Hours & 0xF0U) << (RTC_POSITION_TR_HT - 4U)) | ((Hours & 0x0FU) << RTC_POSITION_TR_HU)) | \
|
||||
(((Minutes & 0xF0U) << (RTC_POSITION_TR_MT - 4U)) | ((Minutes & 0x0FU) << RTC_POSITION_TR_MU)) | \
|
||||
(((Seconds & 0xF0U) << (RTC_POSITION_TR_ST - 4U)) | ((Seconds & 0x0FU) << RTC_POSITION_TR_SU));
|
||||
(((Hours & 0xF0U) << (RTC_TR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_TR_HU_Pos)) | \
|
||||
(((Minutes & 0xF0U) << (RTC_TR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_TR_MNU_Pos)) | \
|
||||
(((Seconds & 0xF0U) << (RTC_TR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_TR_SU_Pos));
|
||||
MODIFY_REG(RTCx->TR, (RTC_TR_PM | RTC_TR_HT | RTC_TR_HU | RTC_TR_MNT | RTC_TR_MNU | RTC_TR_ST | RTC_TR_SU), temp);
|
||||
}
|
||||
|
||||
|
@ -1389,42 +1349,47 @@ __STATIC_INLINE void LL_RTC_TIME_Config(RTC_TypeDef *RTCx, uint32_t Format12_24,
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_TIME_Get(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (uint32_t)((LL_RTC_TIME_GetHour(RTCx) << RTC_OFFSET_HOUR) | (LL_RTC_TIME_GetMinute(RTCx) << RTC_OFFSET_MINUTE) | LL_RTC_TIME_GetSecond(RTCx));
|
||||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->TR, (RTC_TR_HT | RTC_TR_HU | RTC_TR_MNT | RTC_TR_MNU | RTC_TR_ST | RTC_TR_SU));
|
||||
return (uint32_t)((((((temp & RTC_TR_HT) >> RTC_TR_HT_Pos) << 4U) | ((temp & RTC_TR_HU) >> RTC_TR_HU_Pos)) << RTC_OFFSET_HOUR) | \
|
||||
(((((temp & RTC_TR_MNT) >> RTC_TR_MNT_Pos) << 4U) | ((temp & RTC_TR_MNU) >> RTC_TR_MNU_Pos)) << RTC_OFFSET_MINUTE) | \
|
||||
((((temp & RTC_TR_ST) >> RTC_TR_ST_Pos) << 4U) | ((temp & RTC_TR_SU) >> RTC_TR_SU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Memorize whether the daylight saving time change has been performed
|
||||
* @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
|
||||
* @rmtoll CR BCK LL_RTC_TIME_EnableDayLightStore
|
||||
* @rmtoll CR BKP LL_RTC_TIME_EnableDayLightStore
|
||||
* @param RTCx RTC Instance
|
||||
* @retval None
|
||||
*/
|
||||
__STATIC_INLINE void LL_RTC_TIME_EnableDayLightStore(RTC_TypeDef *RTCx)
|
||||
{
|
||||
SET_BIT(RTCx->CR, RTC_CR_BCK);
|
||||
SET_BIT(RTCx->CR, RTC_CR_BKP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Disable memorization whether the daylight saving time change has been performed.
|
||||
* @note Bit is write-protected. @ref LL_RTC_DisableWriteProtection function should be called before.
|
||||
* @rmtoll CR BCK LL_RTC_TIME_DisableDayLightStore
|
||||
* @rmtoll CR BKP LL_RTC_TIME_DisableDayLightStore
|
||||
* @param RTCx RTC Instance
|
||||
* @retval None
|
||||
*/
|
||||
__STATIC_INLINE void LL_RTC_TIME_DisableDayLightStore(RTC_TypeDef *RTCx)
|
||||
{
|
||||
CLEAR_BIT(RTCx->CR, RTC_CR_BCK);
|
||||
CLEAR_BIT(RTCx->CR, RTC_CR_BKP);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if RTC Day Light Saving stored operation has been enabled or not
|
||||
* @rmtoll CR BCK LL_RTC_TIME_IsDayLightStoreEnabled
|
||||
* @rmtoll CR BKP LL_RTC_TIME_IsDayLightStoreEnabled
|
||||
* @param RTCx RTC Instance
|
||||
* @retval State of bit (1 or 0).
|
||||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_TIME_IsDayLightStoreEnabled(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (READ_BIT(RTCx->CR, RTC_CR_BCK) == (RTC_CR_BCK));
|
||||
return (READ_BIT(RTCx->CR, RTC_CR_BKP) == (RTC_CR_BKP));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1508,7 +1473,7 @@ __STATIC_INLINE void LL_RTC_TIME_Synchronize(RTC_TypeDef *RTCx, uint32_t ShiftSe
|
|||
__STATIC_INLINE void LL_RTC_DATE_SetYear(RTC_TypeDef *RTCx, uint32_t Year)
|
||||
{
|
||||
MODIFY_REG(RTCx->DR, (RTC_DR_YT | RTC_DR_YU),
|
||||
(((Year & 0xF0U) << (RTC_POSITION_DR_YT - 4U)) | ((Year & 0x0FU) << RTC_POSITION_DR_YU)));
|
||||
(((Year & 0xF0U) << (RTC_DR_YT_Pos - 4U)) | ((Year & 0x0FU) << RTC_DR_YU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1526,7 +1491,7 @@ __STATIC_INLINE uint32_t LL_RTC_DATE_GetYear(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->DR, (RTC_DR_YT | RTC_DR_YU));
|
||||
return (uint32_t)((((temp & RTC_DR_YT) >> RTC_POSITION_DR_YT) << 4U) | ((temp & RTC_DR_YU) >> RTC_POSITION_DR_YU));
|
||||
return (uint32_t)((((temp & RTC_DR_YT) >> RTC_DR_YT_Pos) << 4U) | ((temp & RTC_DR_YU) >> RTC_DR_YU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1545,7 +1510,7 @@ __STATIC_INLINE uint32_t LL_RTC_DATE_GetYear(RTC_TypeDef *RTCx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_RTC_DATE_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
|
||||
{
|
||||
MODIFY_REG(RTCx->DR, RTC_DR_WDU, WeekDay << RTC_POSITION_DR_WDU);
|
||||
MODIFY_REG(RTCx->DR, RTC_DR_WDU, WeekDay << RTC_DR_WDU_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1565,7 +1530,7 @@ __STATIC_INLINE void LL_RTC_DATE_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_DATE_GetWeekDay(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(RTCx->DR, RTC_DR_WDU) >> RTC_POSITION_DR_WDU);
|
||||
return (uint32_t)(READ_BIT(RTCx->DR, RTC_DR_WDU) >> RTC_DR_WDU_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1592,7 +1557,7 @@ __STATIC_INLINE uint32_t LL_RTC_DATE_GetWeekDay(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_DATE_SetMonth(RTC_TypeDef *RTCx, uint32_t Month)
|
||||
{
|
||||
MODIFY_REG(RTCx->DR, (RTC_DR_MT | RTC_DR_MU),
|
||||
(((Month & 0xF0U) << (RTC_POSITION_DR_MT - 4U)) | ((Month & 0x0FU) << RTC_POSITION_DR_MU)));
|
||||
(((Month & 0xF0U) << (RTC_DR_MT_Pos - 4U)) | ((Month & 0x0FU) << RTC_DR_MU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1622,7 +1587,7 @@ __STATIC_INLINE uint32_t LL_RTC_DATE_GetMonth(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->DR, (RTC_DR_MT | RTC_DR_MU));
|
||||
return (uint32_t)((((temp & RTC_DR_MT) >> RTC_POSITION_DR_MT) << 4U) | ((temp & RTC_DR_MU) >> RTC_POSITION_DR_MU));
|
||||
return (uint32_t)((((temp & RTC_DR_MT) >> RTC_DR_MT_Pos) << 4U) | ((temp & RTC_DR_MU) >> RTC_DR_MU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1637,7 +1602,7 @@ __STATIC_INLINE uint32_t LL_RTC_DATE_GetMonth(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_DATE_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
|
||||
{
|
||||
MODIFY_REG(RTCx->DR, (RTC_DR_DT | RTC_DR_DU),
|
||||
(((Day & 0xF0U) << (RTC_POSITION_DR_DT - 4U)) | ((Day & 0x0FU) << RTC_POSITION_DR_DU)));
|
||||
(((Day & 0xF0U) << (RTC_DR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_DR_DU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1655,7 +1620,7 @@ __STATIC_INLINE uint32_t LL_RTC_DATE_GetDay(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->DR, (RTC_DR_DT | RTC_DR_DU));
|
||||
return (uint32_t)((((temp & RTC_DR_DT) >> RTC_POSITION_DR_DT) << 4U) | ((temp & RTC_DR_DU) >> RTC_POSITION_DR_DU));
|
||||
return (uint32_t)((((temp & RTC_DR_DT) >> RTC_DR_DT_Pos) << 4U) | ((temp & RTC_DR_DU) >> RTC_DR_DU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1697,10 +1662,10 @@ __STATIC_INLINE void LL_RTC_DATE_Config(RTC_TypeDef *RTCx, uint32_t WeekDay, uin
|
|||
{
|
||||
register uint32_t temp = 0U;
|
||||
|
||||
temp = (WeekDay << RTC_POSITION_DR_WDU) | \
|
||||
(((Year & 0xF0U) << (RTC_POSITION_DR_YT - 4U)) | ((Year & 0x0FU) << RTC_POSITION_DR_YU)) | \
|
||||
(((Month & 0xF0U) << (RTC_POSITION_DR_MT - 4U)) | ((Month & 0x0FU) << RTC_POSITION_DR_MU)) | \
|
||||
(((Day & 0xF0U) << (RTC_POSITION_DR_DT - 4U)) | ((Day & 0x0FU) << RTC_POSITION_DR_DU));
|
||||
temp = (WeekDay << RTC_DR_WDU_Pos) | \
|
||||
(((Year & 0xF0U) << (RTC_DR_YT_Pos - 4U)) | ((Year & 0x0FU) << RTC_DR_YU_Pos)) | \
|
||||
(((Month & 0xF0U) << (RTC_DR_MT_Pos - 4U)) | ((Month & 0x0FU) << RTC_DR_MU_Pos)) | \
|
||||
(((Day & 0xF0U) << (RTC_DR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_DR_DU_Pos));
|
||||
|
||||
MODIFY_REG(RTCx->DR, (RTC_DR_WDU | RTC_DR_MT | RTC_DR_MU | RTC_DR_DT | RTC_DR_DU | RTC_DR_YT | RTC_DR_YU), temp);
|
||||
}
|
||||
|
@ -1723,7 +1688,13 @@ __STATIC_INLINE void LL_RTC_DATE_Config(RTC_TypeDef *RTCx, uint32_t WeekDay, uin
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_DATE_Get(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (uint32_t)((LL_RTC_DATE_GetWeekDay(RTCx) << RTC_OFFSET_WEEKDAY) | (LL_RTC_DATE_GetDay(RTCx) << RTC_OFFSET_DAY) | (LL_RTC_DATE_GetMonth(RTCx) << RTC_OFFSET_MONTH) | LL_RTC_DATE_GetYear(RTCx));
|
||||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->DR, (RTC_DR_WDU | RTC_DR_MT | RTC_DR_MU | RTC_DR_DT | RTC_DR_DU | RTC_DR_YT | RTC_DR_YU));
|
||||
return (uint32_t)((((temp & RTC_DR_WDU) >> RTC_DR_WDU_Pos) << RTC_OFFSET_WEEKDAY) | \
|
||||
(((((temp & RTC_DR_DT) >> RTC_DR_DT_Pos) << 4U) | ((temp & RTC_DR_DU) >> RTC_DR_DU_Pos)) << RTC_OFFSET_DAY) | \
|
||||
(((((temp & RTC_DR_MT) >> RTC_DR_MT_Pos) << 4U) | ((temp & RTC_DR_MU) >> RTC_DR_MU_Pos)) << RTC_OFFSET_MONTH) | \
|
||||
((((temp & RTC_DR_YT) >> RTC_DR_YT_Pos) << 4U) | ((temp & RTC_DR_YU) >> RTC_DR_YU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1833,7 +1804,7 @@ __STATIC_INLINE void LL_RTC_ALMA_DisableWeekday(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_ALMA_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
|
||||
{
|
||||
MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_DT | RTC_ALRMAR_DU),
|
||||
(((Day & 0xF0U) << (RTC_POSITION_ALMA_DT - 4U)) | ((Day & 0x0FU) << RTC_POSITION_ALMA_DU)));
|
||||
(((Day & 0xF0U) << (RTC_ALRMAR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_ALRMAR_DU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1849,7 +1820,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMA_GetDay(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_DT | RTC_ALRMAR_DU));
|
||||
return (uint32_t)((((temp & RTC_ALRMAR_DT) >> RTC_POSITION_ALMA_DT) << 4U) | ((temp & RTC_ALRMAR_DU) >> RTC_POSITION_ALMA_DU));
|
||||
return (uint32_t)((((temp & RTC_ALRMAR_DT) >> RTC_ALRMAR_DT_Pos) << 4U) | ((temp & RTC_ALRMAR_DU) >> RTC_ALRMAR_DU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1868,7 +1839,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMA_GetDay(RTC_TypeDef *RTCx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_RTC_ALMA_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
|
||||
{
|
||||
MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_DU, WeekDay << RTC_POSITION_ALMA_DU);
|
||||
MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_DU, WeekDay << RTC_ALRMAR_DU_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1886,7 +1857,7 @@ __STATIC_INLINE void LL_RTC_ALMA_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetWeekDay(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_DU) >> RTC_POSITION_ALMA_DU);
|
||||
return (uint32_t)(READ_BIT(RTCx->ALRMAR, RTC_ALRMAR_DU) >> RTC_ALRMAR_DU_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1928,7 +1899,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMA_GetTimeFormat(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_ALMA_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
|
||||
{
|
||||
MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_HT | RTC_ALRMAR_HU),
|
||||
(((Hours & 0xF0U) << (RTC_POSITION_ALMA_HT - 4U)) | ((Hours & 0x0FU) << RTC_POSITION_ALMA_HU)));
|
||||
(((Hours & 0xF0U) << (RTC_ALRMAR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMAR_HU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1944,7 +1915,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMA_GetHour(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_HT | RTC_ALRMAR_HU));
|
||||
return (uint32_t)((((temp & RTC_ALRMAR_HT) >> RTC_POSITION_ALMA_HT) << 4U) | ((temp & RTC_ALRMAR_HU) >> RTC_POSITION_ALMA_HU));
|
||||
return (uint32_t)((((temp & RTC_ALRMAR_HT) >> RTC_ALRMAR_HT_Pos) << 4U) | ((temp & RTC_ALRMAR_HU) >> RTC_ALRMAR_HU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1959,7 +1930,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMA_GetHour(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_ALMA_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
|
||||
{
|
||||
MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU),
|
||||
(((Minutes & 0xF0U) << (RTC_POSITION_ALMA_MT - 4U)) | ((Minutes & 0x0FU) << RTC_POSITION_ALMA_MU)));
|
||||
(((Minutes & 0xF0U) << (RTC_ALRMAR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMAR_MNU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1975,7 +1946,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMA_GetMinute(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_MNT | RTC_ALRMAR_MNU));
|
||||
return (uint32_t)((((temp & RTC_ALRMAR_MNT) >> RTC_POSITION_ALMA_MT) << 4U) | ((temp & RTC_ALRMAR_MNU) >> RTC_POSITION_ALMA_MU));
|
||||
return (uint32_t)((((temp & RTC_ALRMAR_MNT) >> RTC_ALRMAR_MNT_Pos) << 4U) | ((temp & RTC_ALRMAR_MNU) >> RTC_ALRMAR_MNU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1990,7 +1961,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMA_GetMinute(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_ALMA_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
|
||||
{
|
||||
MODIFY_REG(RTCx->ALRMAR, (RTC_ALRMAR_ST | RTC_ALRMAR_SU),
|
||||
(((Seconds & 0xF0U) << (RTC_POSITION_ALMA_ST - 4U)) | ((Seconds & 0x0FU) << RTC_POSITION_ALMA_SU)));
|
||||
(((Seconds & 0xF0U) << (RTC_ALRMAR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMAR_SU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2006,7 +1977,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMA_GetSecond(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->ALRMAR, (RTC_ALRMAR_ST | RTC_ALRMAR_SU));
|
||||
return (uint32_t)((((temp & RTC_ALRMAR_ST) >> RTC_POSITION_ALMA_ST) << 4U) | ((temp & RTC_ALRMAR_SU) >> RTC_POSITION_ALMA_SU));
|
||||
return (uint32_t)((((temp & RTC_ALRMAR_ST) >> RTC_ALRMAR_ST_Pos) << 4U) | ((temp & RTC_ALRMAR_SU) >> RTC_ALRMAR_SU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2031,9 +2002,9 @@ __STATIC_INLINE void LL_RTC_ALMA_ConfigTime(RTC_TypeDef *RTCx, uint32_t Format12
|
|||
{
|
||||
register uint32_t temp = 0U;
|
||||
|
||||
temp = Format12_24 | (((Hours & 0xF0U) << (RTC_POSITION_ALMA_HT - 4U)) | ((Hours & 0x0FU) << RTC_POSITION_ALMA_HU)) | \
|
||||
(((Minutes & 0xF0U) << (RTC_POSITION_ALMA_MT - 4U)) | ((Minutes & 0x0FU) << RTC_POSITION_ALMA_MU)) | \
|
||||
(((Seconds & 0xF0U) << (RTC_POSITION_ALMA_ST - 4U)) | ((Seconds & 0x0FU) << RTC_POSITION_ALMA_SU));
|
||||
temp = Format12_24 | (((Hours & 0xF0U) << (RTC_ALRMAR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMAR_HU_Pos)) | \
|
||||
(((Minutes & 0xF0U) << (RTC_ALRMAR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMAR_MNU_Pos)) | \
|
||||
(((Seconds & 0xF0U) << (RTC_ALRMAR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMAR_SU_Pos));
|
||||
|
||||
MODIFY_REG(RTCx->ALRMAR, RTC_ALRMAR_PM | RTC_ALRMAR_HT | RTC_ALRMAR_HU | RTC_ALRMAR_MNT | RTC_ALRMAR_MNU | RTC_ALRMAR_ST | RTC_ALRMAR_SU, temp);
|
||||
}
|
||||
|
@ -2067,7 +2038,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMA_GetTime(RTC_TypeDef *RTCx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_RTC_ALMA_SetSubSecondMask(RTC_TypeDef *RTCx, uint32_t Mask)
|
||||
{
|
||||
MODIFY_REG(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS, Mask << RTC_POSITION_ALMA_MASKSS);
|
||||
MODIFY_REG(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS, Mask << RTC_ALRMASSR_MASKSS_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2078,7 +2049,7 @@ __STATIC_INLINE void LL_RTC_ALMA_SetSubSecondMask(RTC_TypeDef *RTCx, uint32_t Ma
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_ALMA_GetSubSecondMask(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS) >> RTC_POSITION_ALMA_MASKSS);
|
||||
return (uint32_t)(READ_BIT(RTCx->ALRMASSR, RTC_ALRMASSR_MASKSS) >> RTC_ALRMASSR_MASKSS_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2211,7 +2182,7 @@ __STATIC_INLINE void LL_RTC_ALMB_DisableWeekday(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_ALMB_SetDay(RTC_TypeDef *RTCx, uint32_t Day)
|
||||
{
|
||||
MODIFY_REG(RTC->ALRMBR, (RTC_ALRMBR_DT | RTC_ALRMBR_DU),
|
||||
(((Day & 0xF0U) << (RTC_POSITION_ALMB_DT - 4U)) | ((Day & 0x0FU) << RTC_POSITION_ALMB_DU)));
|
||||
(((Day & 0xF0U) << (RTC_ALRMBR_DT_Pos - 4U)) | ((Day & 0x0FU) << RTC_ALRMBR_DU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2227,7 +2198,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMB_GetDay(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_DT | RTC_ALRMBR_DU));
|
||||
return (uint32_t)((((temp & RTC_ALRMBR_DT) >> RTC_POSITION_ALMB_DT) << 4U) | ((temp & RTC_ALRMBR_DU) >> RTC_POSITION_ALMB_DU));
|
||||
return (uint32_t)((((temp & RTC_ALRMBR_DT) >> RTC_ALRMBR_DT_Pos) << 4U) | ((temp & RTC_ALRMBR_DU) >> RTC_ALRMBR_DU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2246,7 +2217,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMB_GetDay(RTC_TypeDef *RTCx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_RTC_ALMB_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
|
||||
{
|
||||
MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_DU, WeekDay << RTC_POSITION_ALMB_DU);
|
||||
MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_DU, WeekDay << RTC_ALRMBR_DU_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2264,7 +2235,7 @@ __STATIC_INLINE void LL_RTC_ALMB_SetWeekDay(RTC_TypeDef *RTCx, uint32_t WeekDay)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_ALMB_GetWeekDay(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_DU) >> RTC_POSITION_ALMB_DU);
|
||||
return (uint32_t)(READ_BIT(RTCx->ALRMBR, RTC_ALRMBR_DU) >> RTC_ALRMBR_DU_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2306,7 +2277,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMB_GetTimeFormat(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_ALMB_SetHour(RTC_TypeDef *RTCx, uint32_t Hours)
|
||||
{
|
||||
MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_HT | RTC_ALRMBR_HU),
|
||||
(((Hours & 0xF0U) << (RTC_POSITION_ALMB_HT - 4U)) | ((Hours & 0x0FU) << RTC_POSITION_ALMB_HU)));
|
||||
(((Hours & 0xF0U) << (RTC_ALRMBR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMBR_HU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2322,7 +2293,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMB_GetHour(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_HT | RTC_ALRMBR_HU));
|
||||
return (uint32_t)((((temp & RTC_ALRMBR_HT) >> RTC_POSITION_ALMB_HT) << 4U) | ((temp & RTC_ALRMBR_HU) >> RTC_POSITION_ALMB_HU));
|
||||
return (uint32_t)((((temp & RTC_ALRMBR_HT) >> RTC_ALRMBR_HT_Pos) << 4U) | ((temp & RTC_ALRMBR_HU) >> RTC_ALRMBR_HU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2337,7 +2308,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMB_GetHour(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_ALMB_SetMinute(RTC_TypeDef *RTCx, uint32_t Minutes)
|
||||
{
|
||||
MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_MNT | RTC_ALRMBR_MNU),
|
||||
(((Minutes & 0xF0U) << (RTC_POSITION_ALMB_MT - 4U)) | ((Minutes & 0x0FU) << RTC_POSITION_ALMB_MU)));
|
||||
(((Minutes & 0xF0U) << (RTC_ALRMBR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMBR_MNU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2353,7 +2324,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMB_GetMinute(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_MNT | RTC_ALRMBR_MNU));
|
||||
return (uint32_t)((((temp & RTC_ALRMBR_MNT) >> RTC_POSITION_ALMB_MT) << 4U) | ((temp & RTC_ALRMBR_MNU) >> RTC_POSITION_ALMB_MU));
|
||||
return (uint32_t)((((temp & RTC_ALRMBR_MNT) >> RTC_ALRMBR_MNT_Pos) << 4U) | ((temp & RTC_ALRMBR_MNU) >> RTC_ALRMBR_MNU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2368,7 +2339,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMB_GetMinute(RTC_TypeDef *RTCx)
|
|||
__STATIC_INLINE void LL_RTC_ALMB_SetSecond(RTC_TypeDef *RTCx, uint32_t Seconds)
|
||||
{
|
||||
MODIFY_REG(RTCx->ALRMBR, (RTC_ALRMBR_ST | RTC_ALRMBR_SU),
|
||||
(((Seconds & 0xF0U) << (RTC_POSITION_ALMB_ST - 4U)) | ((Seconds & 0x0FU) << RTC_POSITION_ALMB_SU)));
|
||||
(((Seconds & 0xF0U) << (RTC_ALRMBR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMBR_SU_Pos)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2384,7 +2355,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMB_GetSecond(RTC_TypeDef *RTCx)
|
|||
register uint32_t temp = 0U;
|
||||
|
||||
temp = READ_BIT(RTCx->ALRMBR, (RTC_ALRMBR_ST | RTC_ALRMBR_SU));
|
||||
return (uint32_t)((((temp & RTC_ALRMBR_ST) >> RTC_POSITION_ALMB_ST) << 4U) | ((temp & RTC_ALRMBR_SU) >> RTC_POSITION_ALMB_SU));
|
||||
return (uint32_t)((((temp & RTC_ALRMBR_ST) >> RTC_ALRMBR_ST_Pos) << 4U) | ((temp & RTC_ALRMBR_SU) >> RTC_ALRMBR_SU_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2409,9 +2380,9 @@ __STATIC_INLINE void LL_RTC_ALMB_ConfigTime(RTC_TypeDef *RTCx, uint32_t Format12
|
|||
{
|
||||
register uint32_t temp = 0U;
|
||||
|
||||
temp = Format12_24 | (((Hours & 0xF0U) << (RTC_POSITION_ALMB_HT - 4U)) | ((Hours & 0x0FU) << RTC_POSITION_ALMB_HU)) | \
|
||||
(((Minutes & 0xF0U) << (RTC_POSITION_ALMB_MT - 4U)) | ((Minutes & 0x0FU) << RTC_POSITION_ALMB_MU)) | \
|
||||
(((Seconds & 0xF0U) << (RTC_POSITION_ALMB_ST - 4U)) | ((Seconds & 0x0FU) << RTC_POSITION_ALMB_SU));
|
||||
temp = Format12_24 | (((Hours & 0xF0U) << (RTC_ALRMBR_HT_Pos - 4U)) | ((Hours & 0x0FU) << RTC_ALRMBR_HU_Pos)) | \
|
||||
(((Minutes & 0xF0U) << (RTC_ALRMBR_MNT_Pos - 4U)) | ((Minutes & 0x0FU) << RTC_ALRMBR_MNU_Pos)) | \
|
||||
(((Seconds & 0xF0U) << (RTC_ALRMBR_ST_Pos - 4U)) | ((Seconds & 0x0FU) << RTC_ALRMBR_SU_Pos));
|
||||
|
||||
MODIFY_REG(RTCx->ALRMBR, RTC_ALRMBR_PM| RTC_ALRMBR_HT | RTC_ALRMBR_HU | RTC_ALRMBR_MNT | RTC_ALRMBR_MNU | RTC_ALRMBR_ST | RTC_ALRMBR_SU, temp);
|
||||
}
|
||||
|
@ -2445,7 +2416,7 @@ __STATIC_INLINE uint32_t LL_RTC_ALMB_GetTime(RTC_TypeDef *RTCx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_RTC_ALMB_SetSubSecondMask(RTC_TypeDef *RTCx, uint32_t Mask)
|
||||
{
|
||||
MODIFY_REG(RTCx->ALRMBSSR, RTC_ALRMBSSR_MASKSS, Mask << RTC_POSITION_ALMB_MASKSS);
|
||||
MODIFY_REG(RTCx->ALRMBSSR, RTC_ALRMBSSR_MASKSS, Mask << RTC_ALRMBSSR_MASKSS_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2456,7 +2427,7 @@ __STATIC_INLINE void LL_RTC_ALMB_SetSubSecondMask(RTC_TypeDef *RTCx, uint32_t Ma
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_ALMB_GetSubSecondMask(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(RTCx->ALRMBSSR, RTC_ALRMBSSR_MASKSS) >> RTC_POSITION_ALMB_MASKSS);
|
||||
return (uint32_t)(READ_BIT(RTCx->ALRMBSSR, RTC_ALRMBSSR_MASKSS) >> RTC_ALRMBSSR_MASKSS_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2567,7 +2538,7 @@ __STATIC_INLINE uint32_t LL_RTC_TS_GetTimeFormat(RTC_TypeDef *RTCx)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_TS_GetHour(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_HT | RTC_TSTR_HU) >> RTC_POSITION_TS_HU);
|
||||
return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_HT | RTC_TSTR_HU) >> RTC_TSTR_HU_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2580,7 +2551,7 @@ __STATIC_INLINE uint32_t LL_RTC_TS_GetHour(RTC_TypeDef *RTCx)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_TS_GetMinute(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_MNT | RTC_TSTR_MNU) >> RTC_POSITION_TS_MNU);
|
||||
return (uint32_t)(READ_BIT(RTCx->TSTR, RTC_TSTR_MNT | RTC_TSTR_MNU) >> RTC_TSTR_MNU_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2630,7 +2601,7 @@ __STATIC_INLINE uint32_t LL_RTC_TS_GetTime(RTC_TypeDef *RTCx)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_TS_GetWeekDay(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_WDU) >> RTC_POSITION_TS_WDU);
|
||||
return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_WDU) >> RTC_TSDR_WDU_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2655,7 +2626,7 @@ __STATIC_INLINE uint32_t LL_RTC_TS_GetWeekDay(RTC_TypeDef *RTCx)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_RTC_TS_GetMonth(RTC_TypeDef *RTCx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_MT | RTC_TSDR_MU) >> RTC_POSITION_TS_MU);
|
||||
return (uint32_t)(READ_BIT(RTCx->TSDR, RTC_TSDR_MT | RTC_TSDR_MU) >> RTC_TSDR_MU_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_spi.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of SPI LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -141,7 +139,6 @@ typedef struct
|
|||
#define LL_SPI_SR_RXNE SPI_SR_RXNE /*!< Rx buffer not empty flag */
|
||||
#define LL_SPI_SR_TXE SPI_SR_TXE /*!< Tx buffer empty flag */
|
||||
#define LL_SPI_SR_BSY SPI_SR_BSY /*!< Busy flag */
|
||||
#define LL_SPI_SR_UDR SPI_SR_UDR /*!< Underrun flag */
|
||||
#define LL_SPI_SR_CRCERR SPI_SR_CRCERR /*!< CRC error flag */
|
||||
#define LL_SPI_SR_MODF SPI_SR_MODF /*!< Mode fault flag */
|
||||
#define LL_SPI_SR_OVR SPI_SR_OVR /*!< Overrun flag */
|
||||
|
@ -1283,7 +1280,7 @@ __STATIC_INLINE uint32_t LL_SPI_IsEnabledDMAReq_TX(SPI_TypeDef *SPIx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_SPI_SetDMAParity_RX(SPI_TypeDef *SPIx, uint32_t Parity)
|
||||
{
|
||||
MODIFY_REG(SPIx->CR2, SPI_CR2_LDMARX, (Parity << POSITION_VAL(SPI_CR2_LDMARX)));
|
||||
MODIFY_REG(SPIx->CR2, SPI_CR2_LDMARX, (Parity << SPI_CR2_LDMARX_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1296,7 +1293,7 @@ __STATIC_INLINE void LL_SPI_SetDMAParity_RX(SPI_TypeDef *SPIx, uint32_t Parity)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetDMAParity_RX(SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR2, SPI_CR2_LDMARX) >> POSITION_VAL(SPI_CR2_LDMARX));
|
||||
return (uint32_t)(READ_BIT(SPIx->CR2, SPI_CR2_LDMARX) >> SPI_CR2_LDMARX_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1310,7 +1307,7 @@ __STATIC_INLINE uint32_t LL_SPI_GetDMAParity_RX(SPI_TypeDef *SPIx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_SPI_SetDMAParity_TX(SPI_TypeDef *SPIx, uint32_t Parity)
|
||||
{
|
||||
MODIFY_REG(SPIx->CR2, SPI_CR2_LDMATX, (Parity << POSITION_VAL(SPI_CR2_LDMATX)));
|
||||
MODIFY_REG(SPIx->CR2, SPI_CR2_LDMATX, (Parity << SPI_CR2_LDMATX_Pos));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1323,7 +1320,7 @@ __STATIC_INLINE void LL_SPI_SetDMAParity_TX(SPI_TypeDef *SPIx, uint32_t Parity)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_SPI_GetDMAParity_TX(SPI_TypeDef *SPIx)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(SPIx->CR2, SPI_CR2_LDMATX) >> POSITION_VAL(SPI_CR2_LDMATX));
|
||||
return (uint32_t)(READ_BIT(SPIx->CR2, SPI_CR2_LDMATX) >> SPI_CR2_LDMATX_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1490,7 +1487,7 @@ typedef struct
|
|||
#define LL_I2S_SR_RXNE LL_SPI_SR_RXNE /*!< Rx buffer not empty flag */
|
||||
#define LL_I2S_SR_TXE LL_SPI_SR_TXE /*!< Tx buffer empty flag */
|
||||
#define LL_I2S_SR_BSY LL_SPI_SR_BSY /*!< Busy flag */
|
||||
#define LL_I2S_SR_UDR LL_SPI_SR_UDR /*!< Underrun flag */
|
||||
#define LL_I2S_SR_UDR SPI_SR_UDR /*!< Underrun flag */
|
||||
#define LL_I2S_SR_OVR LL_SPI_SR_OVR /*!< Overrun flag */
|
||||
#define LL_I2S_SR_FRE LL_SPI_SR_FRE /*!< TI mode frame format error flag */
|
||||
/**
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_system.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of SYSTEM LL module.
|
||||
@verbatim
|
||||
==============================================================================
|
||||
|
@ -76,12 +74,9 @@ extern "C" {
|
|||
* @{
|
||||
*/
|
||||
|
||||
/* Defines used for position in the register */
|
||||
#define DBGMCU_REVID_POSITION (uint32_t)POSITION_VAL(DBGMCU_IDCODE_REV_ID)
|
||||
|
||||
/* Offset used to access to SYSCFG_CFGR1 and SYSCFG_CFGR3 registers */
|
||||
#define SYSCFG_OFFSET_CFGR1 (uint32_t)0x00000000U
|
||||
#define SYSCFG_OFFSET_CFGR3 (uint32_t)0x00000050U
|
||||
#define SYSCFG_OFFSET_CFGR1 0x00000000U
|
||||
#define SYSCFG_OFFSET_CFGR3 0x00000050U
|
||||
|
||||
/* Mask used for TIM breaks functions */
|
||||
#if defined(SYSCFG_CFGR2_PVD_LOCK) && defined(SYSCFG_CFGR2_SRAM_PARITY_LOCK)
|
||||
|
@ -405,7 +400,7 @@ extern "C" {
|
|||
/** @defgroup SYSTEM_LL_EC_TRACE DBGMCU TRACE Pin Assignment
|
||||
* @{
|
||||
*/
|
||||
#define LL_DBGMCU_TRACE_NONE (uint32_t)0x00000000U /*!< TRACE pins not assigned (default state) */
|
||||
#define LL_DBGMCU_TRACE_NONE 0x00000000U /*!< TRACE pins not assigned (default state) */
|
||||
#define LL_DBGMCU_TRACE_ASYNCH DBGMCU_CR_TRACE_IOEN /*!< TRACE pin assignment for Asynchronous Mode */
|
||||
#define LL_DBGMCU_TRACE_SYNCH_SIZE1 (DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE_0) /*!< TRACE pin assignment for Synchronous Mode with a TRACEDATA size of 1 */
|
||||
#define LL_DBGMCU_TRACE_SYNCH_SIZE2 (DBGMCU_CR_TRACE_IOEN | DBGMCU_CR_TRACE_MODE_1) /*!< TRACE pin assignment for Synchronous Mode with a TRACEDATA size of 2 */
|
||||
|
@ -488,7 +483,7 @@ extern "C" {
|
|||
/** @defgroup SYSTEM_LL_EC_LATENCY FLASH LATENCY
|
||||
* @{
|
||||
*/
|
||||
#define LL_FLASH_LATENCY_0 ((uint32_t)0x00000000U) /*!< FLASH Zero Latency cycle */
|
||||
#define LL_FLASH_LATENCY_0 0x00000000U /*!< FLASH Zero Latency cycle */
|
||||
#define LL_FLASH_LATENCY_1 FLASH_ACR_LATENCY_0 /*!< FLASH One Latency cycle */
|
||||
#define LL_FLASH_LATENCY_2 FLASH_ACR_LATENCY_1 /*!< FLASH Two Latency cycles */
|
||||
/**
|
||||
|
@ -1375,7 +1370,7 @@ __STATIC_INLINE uint32_t LL_DBGMCU_GetDeviceID(void)
|
|||
*/
|
||||
__STATIC_INLINE uint32_t LL_DBGMCU_GetRevisionID(void)
|
||||
{
|
||||
return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_REV_ID) >> DBGMCU_REVID_POSITION);
|
||||
return (uint32_t)(READ_BIT(DBGMCU->IDCODE, DBGMCU_IDCODE_REV_ID) >> DBGMCU_IDCODE_REV_ID_Pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_tim.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of TIM LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -136,22 +134,22 @@ static const uint8_t SHIFT_TAB_OISx[] =
|
|||
*/
|
||||
|
||||
|
||||
#define TIMx_OR_RMP_SHIFT (16U)
|
||||
#define TIMx_OR_RMP_MASK (0x0000FFFFU)
|
||||
#define TIMx_OR_RMP_SHIFT 16U
|
||||
#define TIMx_OR_RMP_MASK 0x0000FFFFU
|
||||
#if defined(TIM1)
|
||||
#define TIM1_OR_RMP_MASK ((uint32_t)(TIM1_OR_ETR_RMP << TIMx_OR_RMP_SHIFT))
|
||||
#define TIM1_OR_RMP_MASK (TIM1_OR_ETR_RMP << TIMx_OR_RMP_SHIFT)
|
||||
#endif /* TIM1 */
|
||||
#if defined (TIM8)
|
||||
#define TIM8_OR_RMP_MASK ((uint32_t)(TIM8_OR_ETR_RMP << TIMx_OR_RMP_SHIFT))
|
||||
#define TIM8_OR_RMP_MASK (TIM8_OR_ETR_RMP << TIMx_OR_RMP_SHIFT)
|
||||
#endif /* TIM8 */
|
||||
#if defined(TIM14)
|
||||
#define TIM14_OR_RMP_MASK ((uint32_t)(TIM14_OR_TI1_RMP << TIMx_OR_RMP_SHIFT))
|
||||
#define TIM14_OR_RMP_MASK (TIM14_OR_TI1_RMP << TIMx_OR_RMP_SHIFT)
|
||||
#endif /* TIM14 */
|
||||
#if defined(TIM16)
|
||||
#define TIM16_OR_RMP_MASK ((uint32_t)(TIM16_OR_TI1_RMP << TIMx_OR_RMP_SHIFT))
|
||||
#define TIM16_OR_RMP_MASK (TIM16_OR_TI1_RMP << TIMx_OR_RMP_SHIFT)
|
||||
#endif /* TIM16 */
|
||||
#if defined(TIM20)
|
||||
#define TIM20_OR_RMP_MASK ((uint32_t)(TIM20_OR_ETR_RMP << TIMx_OR_RMP_SHIFT))
|
||||
#define TIM20_OR_RMP_MASK (TIM20_OR_ETR_RMP << TIMx_OR_RMP_SHIFT)
|
||||
#endif /* TIM20 */
|
||||
|
||||
/* Mask used to set the TDG[x:0] of the DTG bits of the TIMx_BDTR register */
|
||||
|
@ -171,7 +169,6 @@ static const uint8_t SHIFT_TAB_OISx[] =
|
|||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/* Private macros ------------------------------------------------------------*/
|
||||
/** @defgroup TIM_LL_Private_Macros TIM Private Macros
|
||||
* @{
|
||||
|
@ -556,7 +553,7 @@ typedef struct
|
|||
/** @defgroup TIM_LL_EC_BREAK_ENABLE Break Enable
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_BREAK_DISABLE ((uint32_t)0x00000000U) /*!< Break function disabled */
|
||||
#define LL_TIM_BREAK_DISABLE 0x00000000U /*!< Break function disabled */
|
||||
#define LL_TIM_BREAK_ENABLE TIM_BDTR_BKE /*!< Break function enabled */
|
||||
/**
|
||||
* @}
|
||||
|
@ -566,7 +563,7 @@ typedef struct
|
|||
/** @defgroup TIM_LL_EC_BREAK2_ENABLE Break2 Enable
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_BREAK2_DISABLE ((uint32_t)0x00000000U) /*!< Break2 function disabled */
|
||||
#define LL_TIM_BREAK2_DISABLE 0x00000000U /*!< Break2 function disabled */
|
||||
#define LL_TIM_BREAK2_ENABLE TIM_BDTR_BK2E /*!< Break2 function enabled */
|
||||
/**
|
||||
* @}
|
||||
|
@ -576,7 +573,7 @@ typedef struct
|
|||
/** @defgroup TIM_LL_EC_AUTOMATICOUTPUT_ENABLE Automatic output enable
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_AUTOMATICOUTPUT_DISABLE ((uint32_t)0x00000000U) /*!< MOE can be set only by software */
|
||||
#define LL_TIM_AUTOMATICOUTPUT_DISABLE 0x00000000U /*!< MOE can be set only by software */
|
||||
#define LL_TIM_AUTOMATICOUTPUT_ENABLE TIM_BDTR_AOE /*!< MOE can be set by software or automatically at the next update event */
|
||||
/**
|
||||
* @}
|
||||
|
@ -721,7 +718,7 @@ typedef struct
|
|||
#define LL_TIM_OCMODE_ACTIVE TIM_CCMR1_OC1M_0 /*!<OCyREF is forced high on compare match*/
|
||||
#define LL_TIM_OCMODE_INACTIVE TIM_CCMR1_OC1M_1 /*!<OCyREF is forced low on compare match*/
|
||||
#define LL_TIM_OCMODE_TOGGLE (TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0) /*!<OCyREF toggles on compare match*/
|
||||
#define LL_TIM_OCMODE_FORCED_INACTIVE (TIM_CCMR1_OC1M_2) /*!<OCyREF is forced low*/
|
||||
#define LL_TIM_OCMODE_FORCED_INACTIVE TIM_CCMR1_OC1M_2 /*!<OCyREF is forced low*/
|
||||
#define LL_TIM_OCMODE_FORCED_ACTIVE (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_0) /*!<OCyREF is forced high*/
|
||||
#define LL_TIM_OCMODE_PWM1 (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1) /*!<In upcounting, channel y is active as long as TIMx_CNT<TIMx_CCRy else inactive. In downcounting, channel y is inactive as long as TIMx_CNT>TIMx_CCRy else active.*/
|
||||
#define LL_TIM_OCMODE_PWM2 (TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0) /*!<In upcounting, channel y is inactive as long as TIMx_CNT<TIMx_CCRy else active. In downcounting, channel y is active as long as TIMx_CNT>TIMx_CCRy else inactive*/
|
||||
|
@ -775,9 +772,9 @@ typedef struct
|
|||
/** @defgroup TIM_LL_EC_ACTIVEINPUT Active Input Selection
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_ACTIVEINPUT_DIRECTTI TIM_CCMR1_CC1S_0 << 16U /*!< ICx is mapped on TIx */
|
||||
#define LL_TIM_ACTIVEINPUT_INDIRECTTI TIM_CCMR1_CC1S_1 << 16U /*!< ICx is mapped on TIy */
|
||||
#define LL_TIM_ACTIVEINPUT_TRC TIM_CCMR1_CC1S << 16U /*!< ICx is mapped on TRC */
|
||||
#define LL_TIM_ACTIVEINPUT_DIRECTTI (TIM_CCMR1_CC1S_0 << 16U) /*!< ICx is mapped on TIx */
|
||||
#define LL_TIM_ACTIVEINPUT_INDIRECTTI (TIM_CCMR1_CC1S_1 << 16U) /*!< ICx is mapped on TIy */
|
||||
#define LL_TIM_ACTIVEINPUT_TRC (TIM_CCMR1_CC1S << 16U) /*!< ICx is mapped on TRC */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -786,9 +783,9 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#define LL_TIM_ICPSC_DIV1 0x00000000U /*!< No prescaler, capture is done each time an edge is detected on the capture input */
|
||||
#define LL_TIM_ICPSC_DIV2 TIM_CCMR1_IC1PSC_0 << 16U /*!< Capture is done once every 2 events */
|
||||
#define LL_TIM_ICPSC_DIV4 TIM_CCMR1_IC1PSC_1 << 16U /*!< Capture is done once every 4 events */
|
||||
#define LL_TIM_ICPSC_DIV8 TIM_CCMR1_IC1PSC << 16U /*!< Capture is done once every 8 events */
|
||||
#define LL_TIM_ICPSC_DIV2 (TIM_CCMR1_IC1PSC_0 << 16U) /*!< Capture is done once every 2 events */
|
||||
#define LL_TIM_ICPSC_DIV4 (TIM_CCMR1_IC1PSC_1 << 16U) /*!< Capture is done once every 4 events */
|
||||
#define LL_TIM_ICPSC_DIV8 (TIM_CCMR1_IC1PSC << 16U) /*!< Capture is done once every 8 events */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -796,22 +793,22 @@ typedef struct
|
|||
/** @defgroup TIM_LL_EC_IC_FILTER Input Configuration Filter
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_IC_FILTER_FDIV1 0x00000000U /*!< No filter, sampling is done at fDTS */
|
||||
#define LL_TIM_IC_FILTER_FDIV1_N2 TIM_CCMR1_IC1F_0 << 16U /*!< fSAMPLING=fCK_INT, N=2 */
|
||||
#define LL_TIM_IC_FILTER_FDIV1_N4 TIM_CCMR1_IC1F_1 << 16U /*!< fSAMPLING=fCK_INT, N=4 */
|
||||
#define LL_TIM_IC_FILTER_FDIV1_N8 (TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U /*!< fSAMPLING=fCK_INT, N=8 */
|
||||
#define LL_TIM_IC_FILTER_FDIV2_N6 TIM_CCMR1_IC1F_2 << 16U /*!< fSAMPLING=fDTS/2, N=6 */
|
||||
#define LL_TIM_IC_FILTER_FDIV2_N8 (TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_0) << 16U /*!< fSAMPLING=fDTS/2, N=8 */
|
||||
#define LL_TIM_IC_FILTER_FDIV4_N6 (TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1) << 16U /*!< fSAMPLING=fDTS/4, N=6 */
|
||||
#define LL_TIM_IC_FILTER_FDIV4_N8 (TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U /*!< fSAMPLING=fDTS/4, N=8 */
|
||||
#define LL_TIM_IC_FILTER_FDIV8_N6 TIM_CCMR1_IC1F_3 << 16U /*!< fSAMPLING=fDTS/8, N=6 */
|
||||
#define LL_TIM_IC_FILTER_FDIV8_N8 (TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_0) << 16U /*!< fSAMPLING=fDTS/8, N=8 */
|
||||
#define LL_TIM_IC_FILTER_FDIV16_N5 (TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_1) << 16U /*!< fSAMPLING=fDTS/16, N=5 */
|
||||
#define LL_TIM_IC_FILTER_FDIV16_N6 (TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U /*!< fSAMPLING=fDTS/16, N=6 */
|
||||
#define LL_TIM_IC_FILTER_FDIV16_N8 (TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2) << 16U /*!< fSAMPLING=fDTS/16, N=8 */
|
||||
#define LL_TIM_IC_FILTER_FDIV32_N5 (TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_0) << 16U /*!< fSAMPLING=fDTS/32, N=5 */
|
||||
#define LL_TIM_IC_FILTER_FDIV32_N6 (TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1) << 16U /*!< fSAMPLING=fDTS/32, N=6 */
|
||||
#define LL_TIM_IC_FILTER_FDIV32_N8 TIM_CCMR1_IC1F << 16U /*!< fSAMPLING=fDTS/32, N=8 */
|
||||
#define LL_TIM_IC_FILTER_FDIV1 0x00000000U /*!< No filter, sampling is done at fDTS */
|
||||
#define LL_TIM_IC_FILTER_FDIV1_N2 (TIM_CCMR1_IC1F_0 << 16U) /*!< fSAMPLING=fCK_INT, N=2 */
|
||||
#define LL_TIM_IC_FILTER_FDIV1_N4 (TIM_CCMR1_IC1F_1 << 16U) /*!< fSAMPLING=fCK_INT, N=4 */
|
||||
#define LL_TIM_IC_FILTER_FDIV1_N8 ((TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U) /*!< fSAMPLING=fCK_INT, N=8 */
|
||||
#define LL_TIM_IC_FILTER_FDIV2_N6 (TIM_CCMR1_IC1F_2 << 16U) /*!< fSAMPLING=fDTS/2, N=6 */
|
||||
#define LL_TIM_IC_FILTER_FDIV2_N8 ((TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_0) << 16U) /*!< fSAMPLING=fDTS/2, N=8 */
|
||||
#define LL_TIM_IC_FILTER_FDIV4_N6 ((TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1) << 16U) /*!< fSAMPLING=fDTS/4, N=6 */
|
||||
#define LL_TIM_IC_FILTER_FDIV4_N8 ((TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U) /*!< fSAMPLING=fDTS/4, N=8 */
|
||||
#define LL_TIM_IC_FILTER_FDIV8_N6 (TIM_CCMR1_IC1F_3 << 16U) /*!< fSAMPLING=fDTS/8, N=6 */
|
||||
#define LL_TIM_IC_FILTER_FDIV8_N8 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_0) << 16U) /*!< fSAMPLING=fDTS/8, N=8 */
|
||||
#define LL_TIM_IC_FILTER_FDIV16_N5 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_1) << 16U) /*!< fSAMPLING=fDTS/16, N=5 */
|
||||
#define LL_TIM_IC_FILTER_FDIV16_N6 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_1 | TIM_CCMR1_IC1F_0) << 16U) /*!< fSAMPLING=fDTS/16, N=6 */
|
||||
#define LL_TIM_IC_FILTER_FDIV16_N8 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2) << 16U) /*!< fSAMPLING=fDTS/16, N=8 */
|
||||
#define LL_TIM_IC_FILTER_FDIV32_N5 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_0) << 16U) /*!< fSAMPLING=fDTS/32, N=5 */
|
||||
#define LL_TIM_IC_FILTER_FDIV32_N6 ((TIM_CCMR1_IC1F_3 | TIM_CCMR1_IC1F_2 | TIM_CCMR1_IC1F_1) << 16U) /*!< fSAMPLING=fDTS/32, N=6 */
|
||||
#define LL_TIM_IC_FILTER_FDIV32_N8 (TIM_CCMR1_IC1F << 16U) /*!< fSAMPLING=fDTS/32, N=8 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -830,8 +827,8 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#define LL_TIM_CLOCKSOURCE_INTERNAL 0x00000000U /*!< The timer is clocked by the internal clock provided from the RCC */
|
||||
#define LL_TIM_CLOCKSOURCE_EXT_MODE1 (TIM_SMCR_SMS_2 | TIM_SMCR_SMS_1 | TIM_SMCR_SMS_0 ) /*!< Counter counts at each rising or falling edge on a selected inpu t*/
|
||||
#define LL_TIM_CLOCKSOURCE_EXT_MODE2 TIM_SMCR_ECE /*!< Counter counts at each rising or falling edge on the external trigger input ETR */
|
||||
#define LL_TIM_CLOCKSOURCE_EXT_MODE1 (TIM_SMCR_SMS_2 | TIM_SMCR_SMS_1 | TIM_SMCR_SMS_0) /*!< Counter counts at each rising or falling edge on a selected inpu t*/
|
||||
#define LL_TIM_CLOCKSOURCE_EXT_MODE2 TIM_SMCR_ECE /*!< Counter counts at each rising or falling edge on the external trigger input ETR */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -944,15 +941,15 @@ typedef struct
|
|||
#define LL_TIM_ETR_FILTER_FDIV1_N8 (TIM_SMCR_ETF_1 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fCK_INT, N=8 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV2_N6 TIM_SMCR_ETF_2 /*!< fSAMPLING=fDTS/2, N=6 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV2_N8 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fDTS/2, N=8 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV4_N6 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1 ) /*!< fSAMPLING=fDTS/4, N=6 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV4_N6 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1) /*!< fSAMPLING=fDTS/4, N=6 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV4_N8 (TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fDTS/4, N=8 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV8_N6 TIM_SMCR_ETF_3 /*!< fSAMPLING=fDTS/8, N=8 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV8_N8 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fDTS/16, N=5 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV16_N5 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_1 ) /*!< fSAMPLING=fDTS/16, N=6 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV16_N5 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_1) /*!< fSAMPLING=fDTS/16, N=6 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV16_N6 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_1 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fDTS/16, N=8 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV16_N8 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2 ) /*!< fSAMPLING=fDTS/16, N=5 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV32_N5 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fDTS/32, N=5 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV32_N6 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1) /*!< fSAMPLING=fDTS/32, N=6 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV16_N8 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2) /*!< fSAMPLING=fDTS/16, N=5 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV32_N5 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2 | TIM_SMCR_ETF_0) /*!< fSAMPLING=fDTS/32, N=5 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV32_N6 (TIM_SMCR_ETF_3 | TIM_SMCR_ETF_2 | TIM_SMCR_ETF_1) /*!< fSAMPLING=fDTS/32, N=6 */
|
||||
#define LL_TIM_ETR_FILTER_FDIV32_N8 TIM_SMCR_ETF /*!< fSAMPLING=fDTS/32, N=8 */
|
||||
/**
|
||||
* @}
|
||||
|
@ -1008,7 +1005,7 @@ typedef struct
|
|||
/** @defgroup TIM_LL_EC_BREAK2_FILTER BREAK2 FILTER
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_BREAK2_FILTER_FDIV1 0x00000000U /*!< No filter, BRK acts asynchronously */
|
||||
#define LL_TIM_BREAK2_FILTER_FDIV1 0x00000000U /*!< No filter, BRK acts asynchronously */
|
||||
#define LL_TIM_BREAK2_FILTER_FDIV1_N2 0x00100000U /*!< fSAMPLING=fCK_INT, N=2 */
|
||||
#define LL_TIM_BREAK2_FILTER_FDIV1_N4 0x00200000U /*!< fSAMPLING=fCK_INT, N=4 */
|
||||
#define LL_TIM_BREAK2_FILTER_FDIV1_N8 0x00300000U /*!< fSAMPLING=fCK_INT, N=8 */
|
||||
|
@ -1106,33 +1103,33 @@ typedef struct
|
|||
|
||||
#if defined(TIM1)
|
||||
/** @defgroup TIM_LL_EC_TIM1_ETR_ADC1_RMP TIM1 External Trigger ADC1 Remap
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM1_ETR_ADC1_RMP_NC (0x00000000U | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is not connected to ADC1 analog watchdog x */
|
||||
#define LL_TIM_TIM1_ETR_ADC1_RMP_AWD1 (TIM1_OR_ETR_RMP_0 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC1 analog watchdog 1 */
|
||||
#define LL_TIM_TIM1_ETR_ADC1_RMP_AWD2 (TIM1_OR_ETR_RMP_1 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC1 analog watchdog 2 */
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM1_ETR_ADC1_RMP_NC TIM1_OR_RMP_MASK /*!< TIM1_ETR is not connected to ADC1 analog watchdog x */
|
||||
#define LL_TIM_TIM1_ETR_ADC1_RMP_AWD1 (TIM1_OR_ETR_RMP_0 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC1 analog watchdog 1 */
|
||||
#define LL_TIM_TIM1_ETR_ADC1_RMP_AWD2 (TIM1_OR_ETR_RMP_1 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC1 analog watchdog 2 */
|
||||
#define LL_TIM_TIM1_ETR_ADC1_RMP_AWD3 (TIM1_OR_ETR_RMP_0 | TIM1_OR_ETR_RMP_1| TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC1 analog watchdog 3 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#if defined(ADC4)
|
||||
/** @defgroup TIM_LL_EC_TIM1_ETR_ADC3_RMP TIM1 External Trigger ADC4 Remap
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM1_ETR_ADC4_RMP_NC (0x00000000U | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is not connected to ADC4 analog watchdog x*/
|
||||
#define LL_TIM_TIM1_ETR_ADC4_RMP_AWD1 (TIM1_OR_ETR_RMP_2 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC4 analog watchdog 1 */
|
||||
#define LL_TIM_TIM1_ETR_ADC4_RMP_AWD2 (TIM1_OR_ETR_RMP_3 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC4 analog watchdog 2 */
|
||||
/** @defgroup TIM_LL_EC_TIM1_ETR_ADC4_RMP TIM1 External Trigger ADC4 Remap
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM1_ETR_ADC4_RMP_NC TIM1_OR_RMP_MASK /*!< TIM1_ETR is not connected to ADC4 analog watchdog x*/
|
||||
#define LL_TIM_TIM1_ETR_ADC4_RMP_AWD1 (TIM1_OR_ETR_RMP_2 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC4 analog watchdog 1 */
|
||||
#define LL_TIM_TIM1_ETR_ADC4_RMP_AWD2 (TIM1_OR_ETR_RMP_3 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC4 analog watchdog 2 */
|
||||
#define LL_TIM_TIM1_ETR_ADC4_RMP_AWD3 (TIM1_OR_ETR_RMP_3 | TIM1_OR_ETR_RMP_2 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC4 analog watchdog 3 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#else
|
||||
/** @defgroup TIM_LL_EC_TIM1_ETR_ADC2_RMP TIM1 External Trigger ADC3 Remap
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM1_ETR_ADC2_RMP_NC (0x00000000U | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is not connected to ADC2 analog watchdog x*/
|
||||
#define LL_TIM_TIM1_ETR_ADC2_RMP_AWD1 (TIM1_OR_ETR_RMP_2 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC2 analog watchdog 1 */
|
||||
#define LL_TIM_TIM1_ETR_ADC2_RMP_AWD2 (TIM1_OR_ETR_RMP_3 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC2 analog watchdog 2 */
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM1_ETR_ADC2_RMP_NC TIM1_OR_RMP_MASK /*!< TIM1_ETR is not connected to ADC2 analog watchdog x*/
|
||||
#define LL_TIM_TIM1_ETR_ADC2_RMP_AWD1 (TIM1_OR_ETR_RMP_2 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC2 analog watchdog 1 */
|
||||
#define LL_TIM_TIM1_ETR_ADC2_RMP_AWD2 (TIM1_OR_ETR_RMP_3 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC2 analog watchdog 2 */
|
||||
#define LL_TIM_TIM1_ETR_ADC2_RMP_AWD3 (TIM1_OR_ETR_RMP_3 | TIM1_OR_ETR_RMP_2 | TIM1_OR_RMP_MASK) /*!< TIM1_ETR is connected to ADC2 analog watchdog 3 */
|
||||
/**
|
||||
* @}
|
||||
|
@ -1141,22 +1138,22 @@ typedef struct
|
|||
#endif /* TIM1 */
|
||||
#if defined(TIM8)
|
||||
/** @defgroup TIM_LL_EC_TIM8_ETR_ADC2_RMP TIM8 External Trigger ADC2 Remap
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM8_ETR_ADC2_RMP_NC (0x00000000U | TIM8_OR_RMP_MASK) /*!< TIM8_ETR is not connected to ADC2 analog watchdog x */
|
||||
#define LL_TIM_TIM8_ETR_ADC2_RMP_AWD1 (TIM8_OR_ETR_RMP_0 | TIM8_OR_RMP_MASK) /*!< TIM8_ETR is connected to ADC2 analog watchdog */
|
||||
#define LL_TIM_TIM8_ETR_ADC2_RMP_AWD2 (TIM8_OR_ETR_RMP_1 | TIM8_OR_RMP_MASK) /*!< TIM8_ETR is connected to ADC2 analog watchdog 2 */
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM8_ETR_ADC2_RMP_NC TIM8_OR_RMP_MASK /*!< TIM8_ETR is not connected to ADC2 analog watchdog x */
|
||||
#define LL_TIM_TIM8_ETR_ADC2_RMP_AWD1 (TIM8_OR_ETR_RMP_0 | TIM8_OR_RMP_MASK) /*!< TIM8_ETR is connected to ADC2 analog watchdog */
|
||||
#define LL_TIM_TIM8_ETR_ADC2_RMP_AWD2 (TIM8_OR_ETR_RMP_1 | TIM8_OR_RMP_MASK) /*!< TIM8_ETR is connected to ADC2 analog watchdog 2 */
|
||||
#define LL_TIM_TIM8_ETR_ADC2_RMP_AWD3 (TIM8_OR_ETR_RMP_0 | TIM8_OR_ETR_RMP_1 | TIM8_OR_RMP_MASK) /*!< TIM8_ETR is connected to ADC2 analog watchdog 3 */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup TIM_LL_EC_TIM8_ETR_ADC3_RMP TIM8 External Trigger ADC3 Remap
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM8_ETR_ADC3_RMP_NC (0x00000000U | TIM8_OR_RMP_MASK) /*!< TIM8_ETR is not connected to ADC3 analog watchdog x */
|
||||
#define LL_TIM_TIM8_ETR_ADC3_RMP_AWD1 (TIM8_OR_ETR_RMP_2 | TIM8_OR_RMP_MASK) /*!< TIM8_ETR is connected to ADC3 analog watchdog 1 */
|
||||
#define LL_TIM_TIM8_ETR_ADC3_RMP_AWD2 (TIM8_OR_ETR_RMP_3 | TIM8_OR_RMP_MASK) /*!< TIM8_ETR is connected to ADC3 analog watchdog 2 */
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM8_ETR_ADC3_RMP_NC TIM8_OR_RMP_MASK /*!< TIM8_ETR is not connected to ADC3 analog watchdog x */
|
||||
#define LL_TIM_TIM8_ETR_ADC3_RMP_AWD1 (TIM8_OR_ETR_RMP_2 | TIM8_OR_RMP_MASK) /*!< TIM8_ETR is connected to ADC3 analog watchdog 1 */
|
||||
#define LL_TIM_TIM8_ETR_ADC3_RMP_AWD2 (TIM8_OR_ETR_RMP_3 | TIM8_OR_RMP_MASK) /*!< TIM8_ETR is connected to ADC3 analog watchdog 2 */
|
||||
#define LL_TIM_TIM8_ETR_ADC3_RMP_AWD3 (TIM8_OR_ETR_RMP_2 | TIM8_OR_ETR_RMP_3 | TIM8_OR_RMP_MASK) /*!< TIM8_ETR is connected to ADC3 analog watchdog 3 */
|
||||
/**
|
||||
* @}
|
||||
|
@ -1164,21 +1161,21 @@ typedef struct
|
|||
#endif /* TIM8 */
|
||||
#if defined(TIM16)
|
||||
/** @defgroup TIM_LL_EC_TIM16_TI1_RMP TIM16 External Input Ch1 Remap
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM16_TI1_RMP_GPIO 0x00000000U /*!< TIM16 input capture 1 is connected to GPIO */
|
||||
#define LL_TIM_TIM16_TI1_RMP_RTC (TIM16_OR_TI1_RMP_0 | TIM16_OR_RMP_MASK) /*!< TIM16 input capture 1 is connected to RTC wakeup interrupt */
|
||||
#define LL_TIM_TIM16_TI1_RMP_HSE_32 (TIM16_OR_TI1_RMP_1 | TIM16_OR_RMP_MASK) /*!< TIM16 input capture 1 is connected to HSE/32 clock */
|
||||
#define LL_TIM_TIM16_TI1_RMP_MCO (TIM16_OR_TI1_RMP_1 | TIM16_OR_TI1_RMP_0 | TIM16_OR_RMP_MASK) /*!< TIM16 input capture 1 is connected to MCO */
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM16_TI1_RMP_GPIO 0x00000000U /*!< TIM16 input capture 1 is connected to GPIO */
|
||||
#define LL_TIM_TIM16_TI1_RMP_RTC (TIM16_OR_TI1_RMP_0 | TIM16_OR_RMP_MASK) /*!< TIM16 input capture 1 is connected to RTC wakeup interrupt */
|
||||
#define LL_TIM_TIM16_TI1_RMP_HSE_32 (TIM16_OR_TI1_RMP_1 | TIM16_OR_RMP_MASK) /*!< TIM16 input capture 1 is connected to HSE/32 clock */
|
||||
#define LL_TIM_TIM16_TI1_RMP_MCO (TIM16_OR_TI1_RMP_1 | TIM16_OR_TI1_RMP_0 | TIM16_OR_RMP_MASK) /*!< TIM16 input capture 1 is connected to MCO */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#endif /* TIM16 */
|
||||
#if defined(TIM20)
|
||||
/** @defgroup TIM_LL_EC_TIM20_ETR_ADC3_RMP TIM20 External Trigger ADC3 Remap
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM20_ETR_ADC3_RMP_NC (0x00000000U | TIM20_OR_RMP_MASK) /*!< TIM20_ETR is not connected to ADC3 analog watchdog x */
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM20_ETR_ADC3_RMP_NC TIM20_OR_RMP_MASK /*!< TIM20_ETR is not connected to ADC3 analog watchdog x */
|
||||
#define LL_TIM_TIM20_ETR_ADC3_RMP_AWD1 (TIM20_OR_ETR_RMP_0 | TIM20_OR_RMP_MASK) /*!< TIM20_ETR is connected to ADC3 analog watchdog */
|
||||
#define LL_TIM_TIM20_ETR_ADC3_RMP_AWD2 (TIM20_OR_ETR_RMP_1 | TIM20_OR_RMP_MASK) /*!< TIM20_ETR is connected to ADC3 analog watchdog 2 */
|
||||
#define LL_TIM_TIM20_ETR_ADC3_RMP_AWD3 (TIM20_OR_ETR_RMP_0 | TIM20_OR_ETR_RMP_1 | TIM20_OR_RMP_MASK) /*!< TIM20_ETR is connected to ADC3 analog watchdog 3 */
|
||||
|
@ -1187,9 +1184,9 @@ typedef struct
|
|||
*/
|
||||
|
||||
/** @defgroup TIM_LL_EC_TIM20_ETR_ADC4_RMP TIM20 External Trigger ADC4 Remap
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM20_ETR_ADC4_RMP_NC (0x00000000U | TIM20_OR_RMP_MASK) /*!< TIM20_ETR is not connected to ADC4 analog watchdog x */
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM20_ETR_ADC4_RMP_NC TIM20_OR_RMP_MASK /*!< TIM20_ETR is not connected to ADC4 analog watchdog x */
|
||||
#define LL_TIM_TIM20_ETR_ADC4_RMP_AWD1 (TIM20_OR_ETR_RMP_2 | TIM20_OR_RMP_MASK) /*!< TIM20_ETR is connected to ADC4 analog watchdog 1 */
|
||||
#define LL_TIM_TIM20_ETR_ADC4_RMP_AWD2 (TIM20_OR_ETR_RMP_3 | TIM20_OR_RMP_MASK) /*!< TIM20_ETR is connected to ADC4 analog watchdog 2 */
|
||||
#define LL_TIM_TIM20_ETR_ADC4_RMP_AWD3 (TIM20_OR_ETR_RMP_2 | TIM20_OR_ETR_RMP_3 | TIM20_OR_RMP_MASK) /*!< TIM20_ETR is connected to ADC4 analog watchdog 3 */
|
||||
|
@ -1199,12 +1196,12 @@ typedef struct
|
|||
#endif /* TIM20 */
|
||||
#if defined(TIM14)
|
||||
/** @defgroup TIM_LL_EC_TIM14_TI1_RMP TIM14 Timer Input1 Remap
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM14_TI1_RMP_GPIO (0x00000000U | TIM14_OR_RMP_MASK) /*!< TIM14_TI1 is connected to GPIO */
|
||||
#define LL_TIM_TIM14_TI1_RMP_RTC_CLK (TIM14_OR_TI1_RMP_0 | TIM14_OR_RMP_MASK) /*!< TIM14_TI1 is connected to RTC Clock */
|
||||
#define LL_TIM_TIM14_TI1_RMP_HSE (TIM14_OR_TI1_RMP_1 | TIM14_OR_RMP_MASK) /*!< TIM14_TI1 is connected to HSE/32 */
|
||||
#define LL_TIM_TIM14_TI1_RMP_MCO (TIM14_OR_TI1_RMP_0 | TIM14_OR_TI1_RMP_1 | TIM14_OR_RMP_MASK) /*!< TIM14_TI1 is connected to MCO */
|
||||
* @{
|
||||
*/
|
||||
#define LL_TIM_TIM14_TI1_RMP_GPIO TIM14_OR_RMP_MASK /*!< TIM14_TI1 is connected to GPIO */
|
||||
#define LL_TIM_TIM14_TI1_RMP_RTC_CLK (TIM14_OR_TI1_RMP_0 | TIM14_OR_RMP_MASK) /*!< TIM14_TI1 is connected to RTC Clock */
|
||||
#define LL_TIM_TIM14_TI1_RMP_HSE (TIM14_OR_TI1_RMP_1 | TIM14_OR_RMP_MASK) /*!< TIM14_TI1 is connected to HSE/32 */
|
||||
#define LL_TIM_TIM14_TI1_RMP_MCO (TIM14_OR_TI1_RMP_0 | TIM14_OR_TI1_RMP_1 | TIM14_OR_RMP_MASK) /*!< TIM14_TI1 is connected to MCO */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -1215,7 +1212,7 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#define LL_TIM_OCREF_CLR_INT_OCREF_CLR 0x00000000U /*!< OCREF_CLR_INT is connected to the OCREF_CLR input */
|
||||
#define LL_TIM_OCREF_CLR_INT_ETR TIM_SMCR_OCCS /*!< OCREF_CLR_INT is connected to ETRF */
|
||||
#define LL_TIM_OCREF_CLR_INT_ETR TIM_SMCR_OCCS /*!< OCREF_CLR_INT is connected to ETRF */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -1342,7 +1339,7 @@ typedef struct
|
|||
* @retval Input capture prescaler ratio (1, 2, 4 or 8)
|
||||
*/
|
||||
#define __LL_TIM_GET_ICPSC_RATIO(__ICPSC__) \
|
||||
((uint32_t)((uint32_t)0x01U << (((__ICPSC__) >> 16U) >> TIM_CCMR1_IC1PSC_Pos)))
|
||||
((uint32_t)(0x01U << (((__ICPSC__) >> 16U) >> TIM_CCMR1_IC1PSC_Pos)))
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1403,7 +1400,7 @@ __STATIC_INLINE uint32_t LL_TIM_IsEnabledCounter(TIM_TypeDef *TIMx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_EnableUpdateEvent(TIM_TypeDef *TIMx)
|
||||
{
|
||||
SET_BIT(TIMx->CR1, TIM_CR1_UDIS);
|
||||
CLEAR_BIT(TIMx->CR1, TIM_CR1_UDIS);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1414,7 +1411,7 @@ __STATIC_INLINE void LL_TIM_EnableUpdateEvent(TIM_TypeDef *TIMx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_DisableUpdateEvent(TIM_TypeDef *TIMx)
|
||||
{
|
||||
CLEAR_BIT(TIMx->CR1, TIM_CR1_UDIS);
|
||||
SET_BIT(TIMx->CR1, TIM_CR1_UDIS);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3520,7 +3517,13 @@ __STATIC_INLINE void LL_TIM_ConfigETR(TIM_TypeDef *TIMx, uint32_t ETRPolarity, u
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_EnableBRK(TIM_TypeDef *TIMx)
|
||||
{
|
||||
__IO uint32_t tmpreg;
|
||||
|
||||
SET_BIT(TIMx->BDTR, TIM_BDTR_BKE);
|
||||
|
||||
/* Note: Any write operation to this bit takes a delay of 1 APB clock cycle to become effective. */
|
||||
tmpreg = READ_REG(TIMx->BDTR);
|
||||
(void)(tmpreg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3533,7 +3536,13 @@ __STATIC_INLINE void LL_TIM_EnableBRK(TIM_TypeDef *TIMx)
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_DisableBRK(TIM_TypeDef *TIMx)
|
||||
{
|
||||
__IO uint32_t tmpreg;
|
||||
|
||||
CLEAR_BIT(TIMx->BDTR, TIM_BDTR_BKE);
|
||||
|
||||
/* Note: Any write operation to this bit takes a delay of 1 APB clock cycle to become effective. */
|
||||
tmpreg = READ_REG(TIMx->BDTR);
|
||||
(void)(tmpreg);
|
||||
}
|
||||
|
||||
#if defined(TIM_BDTR_BKF)
|
||||
|
@ -3585,7 +3594,13 @@ __STATIC_INLINE void LL_TIM_ConfigBRK(TIM_TypeDef *TIMx, uint32_t BreakPolarity,
|
|||
*/
|
||||
__STATIC_INLINE void LL_TIM_ConfigBRK(TIM_TypeDef *TIMx, uint32_t BreakPolarity)
|
||||
{
|
||||
__IO uint32_t tmpreg;
|
||||
|
||||
MODIFY_REG(TIMx->BDTR, TIM_BDTR_BKP, BreakPolarity);
|
||||
|
||||
/* Note: Any write operation to this bit takes a delay of 1 APB clock cycle to become effective. */
|
||||
tmpreg = READ_REG(TIMx->BDTR);
|
||||
(void)(tmpreg);
|
||||
}
|
||||
|
||||
#endif /* TIM_BDTR_BKF */
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_usart.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of USART LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -240,7 +238,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_DIRECTION Communication Direction
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_DIRECTION_NONE (uint32_t)0x00000000U /*!< Transmitter and Receiver are disabled */
|
||||
#define LL_USART_DIRECTION_NONE 0x00000000U /*!< Transmitter and Receiver are disabled */
|
||||
#define LL_USART_DIRECTION_RX USART_CR1_RE /*!< Transmitter is disabled and Receiver is enabled */
|
||||
#define LL_USART_DIRECTION_TX USART_CR1_TE /*!< Transmitter is enabled and Receiver is disabled */
|
||||
#define LL_USART_DIRECTION_TX_RX (USART_CR1_TE |USART_CR1_RE) /*!< Transmitter and Receiver are enabled */
|
||||
|
@ -251,7 +249,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_PARITY Parity Control
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_PARITY_NONE (uint32_t)0x00000000U /*!< Parity control disabled */
|
||||
#define LL_USART_PARITY_NONE 0x00000000U /*!< Parity control disabled */
|
||||
#define LL_USART_PARITY_EVEN USART_CR1_PCE /*!< Parity control enabled and Even Parity is selected */
|
||||
#define LL_USART_PARITY_ODD (USART_CR1_PCE | USART_CR1_PS) /*!< Parity control enabled and Odd Parity is selected */
|
||||
/**
|
||||
|
@ -261,7 +259,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_WAKEUP Wakeup
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_WAKEUP_IDLELINE (uint32_t)0x00000000U /*!< USART wake up from Mute mode on Idle Line */
|
||||
#define LL_USART_WAKEUP_IDLELINE 0x00000000U /*!< USART wake up from Mute mode on Idle Line */
|
||||
#define LL_USART_WAKEUP_ADDRESSMARK USART_CR1_WAKE /*!< USART wake up from Mute mode on Address Mark */
|
||||
/**
|
||||
* @}
|
||||
|
@ -272,10 +270,10 @@ typedef struct
|
|||
*/
|
||||
#if defined(USART_7BITS_SUPPORT)
|
||||
#define LL_USART_DATAWIDTH_7B USART_CR1_M1 /*!< 7 bits word length : Start bit, 7 data bits, n stop bits */
|
||||
#define LL_USART_DATAWIDTH_8B (uint32_t)0x00000000U /*!< 8 bits word length : Start bit, 8 data bits, n stop bits */
|
||||
#define LL_USART_DATAWIDTH_8B 0x00000000U /*!< 8 bits word length : Start bit, 8 data bits, n stop bits */
|
||||
#define LL_USART_DATAWIDTH_9B USART_CR1_M0 /*!< 9 bits word length : Start bit, 9 data bits, n stop bits */
|
||||
#else
|
||||
#define LL_USART_DATAWIDTH_8B (uint32_t)0x00000000U /*!< 8 bits word length : Start bit, 8 data bits, n stop bits */
|
||||
#define LL_USART_DATAWIDTH_8B 0x00000000U /*!< 8 bits word length : Start bit, 8 data bits, n stop bits */
|
||||
#define LL_USART_DATAWIDTH_9B USART_CR1_M /*!< 9 bits word length : Start bit, 9 data bits, n stop bits */
|
||||
#endif
|
||||
/**
|
||||
|
@ -285,7 +283,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_OVERSAMPLING Oversampling
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_OVERSAMPLING_16 (uint32_t)0x00000000U /*!< Oversampling by 16 */
|
||||
#define LL_USART_OVERSAMPLING_16 0x00000000U /*!< Oversampling by 16 */
|
||||
#define LL_USART_OVERSAMPLING_8 USART_CR1_OVER8 /*!< Oversampling by 8 */
|
||||
/**
|
||||
* @}
|
||||
|
@ -296,7 +294,7 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
|
||||
#define LL_USART_CLOCK_DISABLE (uint32_t)0x00000000U /*!< Clock signal not provided */
|
||||
#define LL_USART_CLOCK_DISABLE 0x00000000U /*!< Clock signal not provided */
|
||||
#define LL_USART_CLOCK_ENABLE USART_CR2_CLKEN /*!< Clock signal provided */
|
||||
/**
|
||||
* @}
|
||||
|
@ -306,7 +304,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_LASTCLKPULSE Last Clock Pulse
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_LASTCLKPULSE_NO_OUTPUT (uint32_t)0x00000000U /*!< The clock pulse of the last data bit is not output to the SCLK pin */
|
||||
#define LL_USART_LASTCLKPULSE_NO_OUTPUT 0x00000000U /*!< The clock pulse of the last data bit is not output to the SCLK pin */
|
||||
#define LL_USART_LASTCLKPULSE_OUTPUT USART_CR2_LBCL /*!< The clock pulse of the last data bit is output to the SCLK pin */
|
||||
/**
|
||||
* @}
|
||||
|
@ -315,7 +313,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_PHASE Clock Phase
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_PHASE_1EDGE (uint32_t)0x00000000U /*!< The first clock transition is the first data capture edge */
|
||||
#define LL_USART_PHASE_1EDGE 0x00000000U /*!< The first clock transition is the first data capture edge */
|
||||
#define LL_USART_PHASE_2EDGE USART_CR2_CPHA /*!< The second clock transition is the first data capture edge */
|
||||
/**
|
||||
* @}
|
||||
|
@ -324,7 +322,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_POLARITY Clock Polarity
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_POLARITY_LOW (uint32_t)0x00000000U /*!< Steady low value on SCLK pin outside transmission window*/
|
||||
#define LL_USART_POLARITY_LOW 0x00000000U /*!< Steady low value on SCLK pin outside transmission window*/
|
||||
#define LL_USART_POLARITY_HIGH USART_CR2_CPOL /*!< Steady high value on SCLK pin outside transmission window */
|
||||
/**
|
||||
* @}
|
||||
|
@ -334,7 +332,7 @@ typedef struct
|
|||
* @{
|
||||
*/
|
||||
#define LL_USART_STOPBITS_0_5 USART_CR2_STOP_0 /*!< 0.5 stop bit */
|
||||
#define LL_USART_STOPBITS_1 (uint32_t)0x00000000U /*!< 1 stop bit */
|
||||
#define LL_USART_STOPBITS_1 0x00000000U /*!< 1 stop bit */
|
||||
#define LL_USART_STOPBITS_1_5 (USART_CR2_STOP_0 | USART_CR2_STOP_1) /*!< 1.5 stop bits */
|
||||
#define LL_USART_STOPBITS_2 USART_CR2_STOP_1 /*!< 2 stop bits */
|
||||
/**
|
||||
|
@ -344,7 +342,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_TXRX TX RX Pins Swap
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_TXRX_STANDARD (uint32_t)0x00000000U /*!< TX/RX pins are used as defined in standard pinout */
|
||||
#define LL_USART_TXRX_STANDARD 0x00000000U /*!< TX/RX pins are used as defined in standard pinout */
|
||||
#define LL_USART_TXRX_SWAPPED (USART_CR2_SWAP) /*!< TX and RX pins functions are swapped. */
|
||||
/**
|
||||
* @}
|
||||
|
@ -353,7 +351,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_RXPIN_LEVEL RX Pin Active Level Inversion
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_RXPIN_LEVEL_STANDARD (uint32_t)0x00000000U /*!< RX pin signal works using the standard logic levels */
|
||||
#define LL_USART_RXPIN_LEVEL_STANDARD 0x00000000U /*!< RX pin signal works using the standard logic levels */
|
||||
#define LL_USART_RXPIN_LEVEL_INVERTED (USART_CR2_RXINV) /*!< RX pin signal values are inverted. */
|
||||
/**
|
||||
* @}
|
||||
|
@ -362,7 +360,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_TXPIN_LEVEL TX Pin Active Level Inversion
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_TXPIN_LEVEL_STANDARD (uint32_t)0x00000000U /*!< TX pin signal works using the standard logic levels */
|
||||
#define LL_USART_TXPIN_LEVEL_STANDARD 0x00000000U /*!< TX pin signal works using the standard logic levels */
|
||||
#define LL_USART_TXPIN_LEVEL_INVERTED (USART_CR2_TXINV) /*!< TX pin signal values are inverted. */
|
||||
/**
|
||||
* @}
|
||||
|
@ -371,7 +369,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_BINARY_LOGIC Binary Data Inversion
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_BINARY_LOGIC_POSITIVE (uint32_t)0x00000000U /*!< Logical data from the data register are send/received in positive/direct logic. (1=H, 0=L) */
|
||||
#define LL_USART_BINARY_LOGIC_POSITIVE 0x00000000U /*!< Logical data from the data register are send/received in positive/direct logic. (1=H, 0=L) */
|
||||
#define LL_USART_BINARY_LOGIC_NEGATIVE USART_CR2_DATAINV /*!< Logical data from the data register are send/received in negative/inverse logic. (1=L, 0=H). The parity bit is also inverted. */
|
||||
/**
|
||||
* @}
|
||||
|
@ -380,7 +378,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_BITORDER Bit Order
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_BITORDER_LSBFIRST (uint32_t)0x00000000U /*!< data is transmitted/received with data bit 0 first, following the start bit */
|
||||
#define LL_USART_BITORDER_LSBFIRST 0x00000000U /*!< data is transmitted/received with data bit 0 first, following the start bit */
|
||||
#define LL_USART_BITORDER_MSBFIRST USART_CR2_MSBFIRST /*!< data is transmitted/received with the MSB first, following the start bit */
|
||||
/**
|
||||
* @}
|
||||
|
@ -389,7 +387,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_AUTOBAUD_DETECT_ON Autobaud Detection
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_AUTOBAUD_DETECT_ON_STARTBIT (uint32_t)0x00000000U /*!< Measurement of the start bit is used to detect the baud rate */
|
||||
#define LL_USART_AUTOBAUD_DETECT_ON_STARTBIT 0x00000000U /*!< Measurement of the start bit is used to detect the baud rate */
|
||||
#define LL_USART_AUTOBAUD_DETECT_ON_FALLINGEDGE USART_CR2_ABRMODE_0 /*!< Falling edge to falling edge measurement. Received frame must start with a single bit = 1 -> Frame = Start10xxxxxx */
|
||||
#define LL_USART_AUTOBAUD_DETECT_ON_7F_FRAME USART_CR2_ABRMODE_1 /*!< 0x7F frame detection */
|
||||
#define LL_USART_AUTOBAUD_DETECT_ON_55_FRAME (USART_CR2_ABRMODE_1 | USART_CR2_ABRMODE_0) /*!< 0x55 frame detection */
|
||||
|
@ -400,7 +398,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_ADDRESS_DETECT Address Length Detection
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_ADDRESS_DETECT_4B (uint32_t)0x00000000U /*!< 4-bit address detection method selected */
|
||||
#define LL_USART_ADDRESS_DETECT_4B 0x00000000U /*!< 4-bit address detection method selected */
|
||||
#define LL_USART_ADDRESS_DETECT_7B USART_CR2_ADDM7 /*!< 7-bit address detection (in 8-bit data mode) method selected */
|
||||
/**
|
||||
* @}
|
||||
|
@ -409,7 +407,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_HWCONTROL Hardware Control
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_HWCONTROL_NONE (uint32_t)0x00000000U /*!< CTS and RTS hardware flow control disabled */
|
||||
#define LL_USART_HWCONTROL_NONE 0x00000000U /*!< CTS and RTS hardware flow control disabled */
|
||||
#define LL_USART_HWCONTROL_RTS USART_CR3_RTSE /*!< RTS output enabled, data is only requested when there is space in the receive buffer */
|
||||
#define LL_USART_HWCONTROL_CTS USART_CR3_CTSE /*!< CTS mode enabled, data is only transmitted when the nCTS input is asserted (tied to 0) */
|
||||
#define LL_USART_HWCONTROL_RTS_CTS (USART_CR3_RTSE | USART_CR3_CTSE) /*!< CTS and RTS hardware flow control enabled */
|
||||
|
@ -420,7 +418,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_WAKEUP_ON Wakeup Activation
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_WAKEUP_ON_ADDRESS (uint32_t)0x00000000U /*!< Wake up active on address match */
|
||||
#define LL_USART_WAKEUP_ON_ADDRESS 0x00000000U /*!< Wake up active on address match */
|
||||
#define LL_USART_WAKEUP_ON_STARTBIT USART_CR3_WUS_1 /*!< Wake up active on Start bit detection */
|
||||
#define LL_USART_WAKEUP_ON_RXNE (USART_CR3_WUS_0 | USART_CR3_WUS_1) /*!< Wake up active on RXNE */
|
||||
/**
|
||||
|
@ -430,7 +428,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_IRDA_POWER IrDA Power
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_IRDA_POWER_NORMAL (uint32_t)0x00000000U /*!< IrDA normal power mode */
|
||||
#define LL_USART_IRDA_POWER_NORMAL 0x00000000U /*!< IrDA normal power mode */
|
||||
#define LL_USART_IRDA_POWER_LOW USART_CR3_IRLP /*!< IrDA low power mode */
|
||||
/**
|
||||
* @}
|
||||
|
@ -439,7 +437,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_LINBREAK_DETECT LIN Break Detection Length
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_LINBREAK_DETECT_10B (uint32_t)0x00000000U /*!< 10-bit break detection method selected */
|
||||
#define LL_USART_LINBREAK_DETECT_10B 0x00000000U /*!< 10-bit break detection method selected */
|
||||
#define LL_USART_LINBREAK_DETECT_11B USART_CR2_LBDL /*!< 11-bit break detection method selected */
|
||||
/**
|
||||
* @}
|
||||
|
@ -448,7 +446,7 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_DE_POLARITY Driver Enable Polarity
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_DE_POLARITY_HIGH (uint32_t)0x00000000U /*!< DE signal is active high */
|
||||
#define LL_USART_DE_POLARITY_HIGH 0x00000000U /*!< DE signal is active high */
|
||||
#define LL_USART_DE_POLARITY_LOW USART_CR3_DEP /*!< DE signal is active low */
|
||||
/**
|
||||
* @}
|
||||
|
@ -457,8 +455,8 @@ typedef struct
|
|||
/** @defgroup USART_LL_EC_DMA_REG_DATA DMA Register Data
|
||||
* @{
|
||||
*/
|
||||
#define LL_USART_DMA_REG_DATA_TRANSMIT (uint32_t)0U /*!< Get address of data register used for transmission */
|
||||
#define LL_USART_DMA_REG_DATA_RECEIVE (uint32_t)1U /*!< Get address of data register used for reception */
|
||||
#define LL_USART_DMA_REG_DATA_TRANSMIT 0x00000000U /*!< Get address of data register used for transmission */
|
||||
#define LL_USART_DMA_REG_DATA_RECEIVE 0x00000001U /*!< Get address of data register used for reception */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
@ -1575,6 +1573,7 @@ __STATIC_INLINE uint32_t LL_USART_GetWKUPType(USART_TypeDef *USARTx)
|
|||
* according to used Peripheral Clock, Oversampling mode, and expected Baud Rate values
|
||||
* @note Peripheral clock and Baud rate values provided as function parameters should be valid
|
||||
* (Baud rate value != 0)
|
||||
* @note In case of oversampling by 16 and 8, BRR content must be greater than or equal to 16d.
|
||||
* @rmtoll BRR BRR LL_USART_SetBaudRate
|
||||
* @param USARTx USART Instance
|
||||
* @param PeriphClk Peripheral Clock
|
||||
|
@ -1607,6 +1606,7 @@ __STATIC_INLINE void LL_USART_SetBaudRate(USART_TypeDef *USARTx, uint32_t Periph
|
|||
* @brief Return current Baud Rate value, according to USARTDIV present in BRR register
|
||||
* (full BRR content), and to used Peripheral Clock and Oversampling mode values
|
||||
* @note In case of non-initialized or invalid value stored in BRR register, value 0 will be returned.
|
||||
* @note In case of oversampling by 16 and 8, BRR content must be greater than or equal to 16d.
|
||||
* @rmtoll BRR BRR LL_USART_GetBaudRate
|
||||
* @param USARTx USART Instance
|
||||
* @param PeriphClk Peripheral Clock
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_utils.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of UTILS LL module.
|
||||
@verbatim
|
||||
==============================================================================
|
||||
|
@ -176,7 +174,6 @@ typedef struct
|
|||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_ll_wwdg.h
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Header file of WWDG LL module.
|
||||
******************************************************************************
|
||||
* @attention
|
||||
|
@ -82,7 +80,7 @@ extern "C" {
|
|||
/** @defgroup WWDG_LL_EC_PRESCALER PRESCALER
|
||||
* @{
|
||||
*/
|
||||
#define LL_WWDG_PRESCALER_1 (uint32_t)0x00000000U /*!< WWDG counter clock = (PCLK1/4096)/1 */
|
||||
#define LL_WWDG_PRESCALER_1 0x00000000U /*!< WWDG counter clock = (PCLK1/4096)/1 */
|
||||
#define LL_WWDG_PRESCALER_2 WWDG_CFR_WDGTB_0 /*!< WWDG counter clock = (PCLK1/4096)/2 */
|
||||
#define LL_WWDG_PRESCALER_4 WWDG_CFR_WDGTB_1 /*!< WWDG counter clock = (PCLK1/4096)/4 */
|
||||
#define LL_WWDG_PRESCALER_8 (WWDG_CFR_WDGTB_0 | WWDG_CFR_WDGTB_1) /*!< WWDG counter clock = (PCLK1/4096)/8 */
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief HAL module driver.
|
||||
* This is the common part of the HAL initialization
|
||||
*
|
||||
|
@ -70,10 +68,10 @@
|
|||
* @{
|
||||
*/
|
||||
/**
|
||||
* @brief STM32F3xx HAL Driver version number V1.4.0
|
||||
* @brief STM32F3xx HAL Driver version number V1.5.0
|
||||
*/
|
||||
#define __STM32F3xx_HAL_VERSION_MAIN (0x01U) /*!< [31:24] main version */
|
||||
#define __STM32F3xx_HAL_VERSION_SUB1 (0x04U) /*!< [23:16] sub1 version */
|
||||
#define __STM32F3xx_HAL_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
|
||||
#define __STM32F3xx_HAL_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
|
||||
#define __STM32F3xx_HAL_VERSION_RC (0x00U) /*!< [7:0] release candidate */
|
||||
#define __STM32F3xx_HAL_VERSION ((__STM32F3xx_HAL_VERSION_MAIN << 24U)\
|
||||
|
@ -231,7 +229,7 @@ __weak void HAL_MspDeInit(void)
|
|||
* than the peripheral interrupt. Otherwise the caller ISR process will be blocked.
|
||||
* The function is declared as __Weak to be overwritten in case of other
|
||||
* implementation in user file.
|
||||
* @param TickPriority: Tick interrupt priority.
|
||||
* @param TickPriority Tick interrupt priority.
|
||||
* @retval HAL status
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
|
||||
|
@ -306,13 +304,21 @@ __weak uint32_t HAL_GetTick(void)
|
|||
* is incremented.
|
||||
* The function is declared as __Weak to be overwritten in case of other
|
||||
* implementations in user file.
|
||||
* @param Delay: specifies the delay time length, in milliseconds.
|
||||
* @param Delay specifies the delay time length, in milliseconds.
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_Delay(__IO uint32_t Delay)
|
||||
{
|
||||
uint32_t tickstart = HAL_GetTick();
|
||||
while((HAL_GetTick() - tickstart) < Delay)
|
||||
uint32_t wait = Delay;
|
||||
|
||||
/* Add a period to guarantee minimum wait */
|
||||
if (wait < HAL_MAX_DELAY)
|
||||
{
|
||||
wait++;
|
||||
}
|
||||
|
||||
while((HAL_GetTick() - tickstart) < wait)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -379,6 +385,33 @@ uint32_t HAL_GetDEVID(void)
|
|||
return((DBGMCU->IDCODE) & IDCODE_DEVID_MASK);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns first word of the unique device identifier (UID based on 96 bits)
|
||||
* @retval Device identifier
|
||||
*/
|
||||
uint32_t HAL_GetUIDw0(void)
|
||||
{
|
||||
return(READ_REG(*((uint32_t *)UID_BASE)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns second word of the unique device identifier (UID based on 96 bits)
|
||||
* @retval Device identifier
|
||||
*/
|
||||
uint32_t HAL_GetUIDw1(void)
|
||||
{
|
||||
return(READ_REG(*((uint32_t *)(UID_BASE + 4U))));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns third word of the unique device identifier (UID based on 96 bits)
|
||||
* @retval Device identifier
|
||||
*/
|
||||
uint32_t HAL_GetUIDw2(void)
|
||||
{
|
||||
return(READ_REG(*((uint32_t *)(UID_BASE + 8U))));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Enable the Debug Module during SLEEP mode
|
||||
* @retval None
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_adc.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief This file provides firmware functions to manage the following
|
||||
* functionalities of the Analog to Digital Convertor (ADC)
|
||||
* peripheral:
|
||||
|
@ -416,7 +414,7 @@
|
|||
* bypassed without error reporting: it can be the intended behaviour in
|
||||
* case of update of a parameter of ADC_InitTypeDef on the fly,
|
||||
* without disabling the other ADCs sharing the same common group.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc)
|
||||
|
@ -447,7 +445,7 @@ __weak HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc)
|
|||
* let commented below.
|
||||
* If needed, the example code can be copied and uncommented into
|
||||
* function HAL_ADC_MspDeInit().
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef* hadc)
|
||||
|
@ -464,7 +462,7 @@ __weak HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief Initializes the ADC MSP.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc)
|
||||
|
@ -479,7 +477,7 @@ __weak void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief DeInitializes the ADC MSP.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc)
|
||||
|
@ -525,7 +523,7 @@ __weak void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc)
|
|||
* function must be called for ADC slave first, then ADC master.
|
||||
* For ADC slave, ADC is enabled only (conversion is not started).
|
||||
* For ADC master, ADC is enabled and multimode conversion is started.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc)
|
||||
|
@ -548,7 +546,7 @@ __weak HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc)
|
|||
* For ADC master, converson is stopped and ADC is disabled.
|
||||
* For ADC slave, ADC is disabled only (conversion stop of ADC master
|
||||
* has already stopped conversion of ADC slave).
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_ADC_Stop(ADC_HandleTypeDef* hadc)
|
||||
|
@ -565,8 +563,8 @@ __weak HAL_StatusTypeDef HAL_ADC_Stop(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief Wait for regular group conversion to be completed.
|
||||
* @param hadc: ADC handle
|
||||
* @param Timeout: Timeout value in millisecond.
|
||||
* @param hadc ADC handle
|
||||
* @param Timeout Timeout value in millisecond.
|
||||
* @retval HAL status
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout)
|
||||
|
@ -584,15 +582,15 @@ __weak HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef* hadc, uint
|
|||
|
||||
/**
|
||||
* @brief Poll for conversion event.
|
||||
* @param hadc: ADC handle
|
||||
* @param EventType: the ADC event type.
|
||||
* @param hadc ADC handle
|
||||
* @param EventType the ADC event type.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg ADC_AWD_EVENT: ADC Analog watchdog 1 event (main analog watchdog, present on all STM32 devices)
|
||||
* @arg ADC_AWD2_EVENT: ADC Analog watchdog 2 event (additional analog watchdog, present only on STM32F3 devices)
|
||||
* @arg ADC_AWD3_EVENT: ADC Analog watchdog 3 event (additional analog watchdog, present only on STM32F3 devices)
|
||||
* @arg ADC_OVR_EVENT: ADC Overrun event
|
||||
* @arg ADC_JQOVF_EVENT: ADC Injected context queue overflow event
|
||||
* @param Timeout: Timeout value in millisecond.
|
||||
* @param Timeout Timeout value in millisecond.
|
||||
* @retval HAL status
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_ADC_PollForEvent(ADC_HandleTypeDef* hadc, uint32_t EventType, uint32_t Timeout)
|
||||
|
@ -621,7 +619,7 @@ __weak HAL_StatusTypeDef HAL_ADC_PollForEvent(ADC_HandleTypeDef* hadc, uint32_t
|
|||
* function must be called for ADC slave first, then ADC master.
|
||||
* For ADC slave, ADC is enabled only (conversion is not started).
|
||||
* For ADC master, ADC is enabled and multimode conversion is started.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_ADC_Start_IT(ADC_HandleTypeDef* hadc)
|
||||
|
@ -648,7 +646,7 @@ __weak HAL_StatusTypeDef HAL_ADC_Start_IT(ADC_HandleTypeDef* hadc)
|
|||
* For ADC master, conversion is stopped and ADC is disabled.
|
||||
* For ADC slave, ADC is disabled only (conversion stop of ADC master
|
||||
* has already stopped conversion of ADC slave).
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_ADC_Stop_IT(ADC_HandleTypeDef* hadc)
|
||||
|
@ -674,9 +672,9 @@ __weak HAL_StatusTypeDef HAL_ADC_Stop_IT(ADC_HandleTypeDef* hadc)
|
|||
* @note: Case of multimode enabled (for devices with several ADCs): This
|
||||
* function is for single-ADC mode only. For multimode, use the
|
||||
* dedicated MultimodeStart function.
|
||||
* @param hadc: ADC handle
|
||||
* @param pData: The destination Buffer address.
|
||||
* @param Length: The length of data to be transferred from ADC peripheral to memory.
|
||||
* @param hadc ADC handle
|
||||
* @param pData The destination Buffer address.
|
||||
* @param Length The length of data to be transferred from ADC peripheral to memory.
|
||||
* @retval None
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, uint32_t Length)
|
||||
|
@ -703,7 +701,7 @@ __weak HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef* hadc, uint32_t* pD
|
|||
* @note: Case of multimode enabled (for devices with several ADCs): This
|
||||
* function is for single-ADC mode only. For multimode, use the
|
||||
* dedicated MultimodeStop function.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef* hadc)
|
||||
|
@ -724,7 +722,7 @@ __weak HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef* hadc)
|
|||
* regular group) flag.
|
||||
* Additionally, this functions clears EOS (end of sequence of
|
||||
* regular group) flag, in case of the end of the sequence is reached.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval Converted value
|
||||
*/
|
||||
__weak uint32_t HAL_ADC_GetValue(ADC_HandleTypeDef* hadc)
|
||||
|
@ -738,7 +736,7 @@ __weak uint32_t HAL_ADC_GetValue(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief Handles ADC interrupt request.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADC_IRQHandler(ADC_HandleTypeDef* hadc)
|
||||
|
@ -752,7 +750,7 @@ __weak void HAL_ADC_IRQHandler(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief Conversion complete callback in non blocking mode
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
|
||||
|
@ -767,7 +765,7 @@ __weak void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief Conversion DMA half-transfer callback in non blocking mode
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef* hadc)
|
||||
|
@ -782,7 +780,7 @@ __weak void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief Analog watchdog callback in non blocking mode.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef* hadc)
|
||||
|
@ -798,7 +796,7 @@ __weak void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef* hadc)
|
|||
/**
|
||||
* @brief ADC error callback in non blocking mode
|
||||
* (ADC conversion with interruption or transfer by DMA)
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADC_ErrorCallback(ADC_HandleTypeDef *hadc)
|
||||
|
@ -849,8 +847,8 @@ __weak void HAL_ADC_ErrorCallback(ADC_HandleTypeDef *hadc)
|
|||
* The setting of these parameters is conditioned to ADC state.
|
||||
* For parameters constraints, see comments of structure
|
||||
* "ADC_ChannelConfTypeDef".
|
||||
* @param hadc: ADC handle
|
||||
* @param sConfig: Structure of ADC channel for regular group.
|
||||
* @param hadc ADC handle
|
||||
* @param sConfig Structure of ADC channel for regular group.
|
||||
* @retval HAL status
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_ChannelConfTypeDef* sConfig)
|
||||
|
@ -876,8 +874,8 @@ __weak HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_Chan
|
|||
* The setting of these parameters is conditioned to ADC state.
|
||||
* For parameters constraints, see comments of structure
|
||||
* "ADC_AnalogWDGConfTypeDef".
|
||||
* @param hadc: ADC handle
|
||||
* @param AnalogWDGConfig: Structure of ADC analog watchdog configuration
|
||||
* @param hadc ADC handle
|
||||
* @param AnalogWDGConfig Structure of ADC analog watchdog configuration
|
||||
* @retval HAL status
|
||||
*/
|
||||
__weak HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef* hadc, ADC_AnalogWDGConfTypeDef* AnalogWDGConfig)
|
||||
|
@ -921,7 +919,7 @@ __weak HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef* hadc, ADC_An
|
|||
* For example:
|
||||
* " if (HAL_IS_BIT_SET(HAL_ADC_GetState(hadc1), HAL_ADC_STATE_REG_BUSY)) "
|
||||
* " if (HAL_IS_BIT_SET(HAL_ADC_GetState(hadc1), HAL_ADC_STATE_AWD1) ) "
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL state
|
||||
*/
|
||||
uint32_t HAL_ADC_GetState(ADC_HandleTypeDef* hadc)
|
||||
|
@ -935,7 +933,7 @@ uint32_t HAL_ADC_GetState(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief Return the ADC error code
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval ADC Error Code
|
||||
*/
|
||||
uint32_t HAL_ADC_GetError(ADC_HandleTypeDef *hadc)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_adc_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief This file provides firmware functions to manage the following
|
||||
* functionalities of the Analog to Digital Convertor (ADC)
|
||||
* peripheral:
|
||||
|
@ -246,7 +244,7 @@ static void ADC_DMAError(DMA_HandleTypeDef *hdma);
|
|||
* bypassed without error reporting: it can be the intended behaviour in
|
||||
* case of update of a parameter of ADC_InitTypeDef on the fly,
|
||||
* without disabling the other ADCs sharing the same common group.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc)
|
||||
|
@ -567,7 +565,7 @@ HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc)
|
|||
* @note This function configures the ADC within 2 scopes: scope of entire
|
||||
* ADC and scope of regular group. For parameters details, see comments
|
||||
* of structure "ADC_InitTypeDef".
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc)
|
||||
|
@ -785,7 +783,7 @@ HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc)
|
|||
* let commented below.
|
||||
* If needed, the example code can be copied and uncommented into
|
||||
* function HAL_ADC_MspDeInit().
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef* hadc)
|
||||
|
@ -1010,7 +1008,7 @@ HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef* hadc)
|
|||
#if defined(STM32F373xC) || defined(STM32F378xx)
|
||||
/**
|
||||
* @brief Deinitialize the ADC peripheral registers to its default reset values.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef* hadc)
|
||||
|
@ -1200,7 +1198,7 @@ HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef* hadc)
|
|||
* @note Case of multimode enabled (for devices with several ADCs):
|
||||
* if ADC is slave, ADC is enabled only (conversion is not started).
|
||||
* if ADC is master, ADC is enabled and multimode conversion is started.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc)
|
||||
|
@ -1314,7 +1312,7 @@ HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc)
|
|||
/**
|
||||
* @brief Enables ADC, starts conversion of regular group.
|
||||
* Interruptions enabled in this function: None.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc)
|
||||
|
@ -1406,7 +1404,7 @@ HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc)
|
|||
* To stop ADC conversion only on ADC group regular
|
||||
* while letting ADC group injected conversions running,
|
||||
* use function @ref HAL_ADCEx_RegularStop().
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Stop(ADC_HandleTypeDef* hadc)
|
||||
|
@ -1456,7 +1454,7 @@ HAL_StatusTypeDef HAL_ADC_Stop(ADC_HandleTypeDef* hadc)
|
|||
* @note ADC peripheral disable is forcing interruption of potential
|
||||
* conversion on injected group. If injected group is under use, it
|
||||
* should be preliminarily stopped using HAL_ADCEx_InjectedStop function.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Stop(ADC_HandleTypeDef* hadc)
|
||||
|
@ -1508,8 +1506,8 @@ HAL_StatusTypeDef HAL_ADC_Stop(ADC_HandleTypeDef* hadc)
|
|||
* performed on each conversion. Nevertheless, polling can still
|
||||
* be performed on the complete sequence (ADC init
|
||||
* parameter "EOCSelection" set to ADC_EOC_SEQ_CONV).
|
||||
* @param hadc: ADC handle
|
||||
* @param Timeout: Timeout value in millisecond.
|
||||
* @param hadc ADC handle
|
||||
* @param Timeout Timeout value in millisecond.
|
||||
* @note Depending on init parameter "EOCSelection", flags EOS or EOC is
|
||||
* checked and cleared depending on autodelay status (bit AUTDLY).
|
||||
* @retval HAL status
|
||||
|
@ -1674,8 +1672,8 @@ HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef* hadc, uint32_t Ti
|
|||
* (several ranks selected): polling cannot be done on each
|
||||
* conversion inside the sequence. In this case, polling is replaced by
|
||||
* wait for maximum conversion time.
|
||||
* @param hadc: ADC handle
|
||||
* @param Timeout: Timeout value in millisecond.
|
||||
* @param hadc ADC handle
|
||||
* @param Timeout Timeout value in millisecond.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout)
|
||||
|
@ -1806,15 +1804,15 @@ HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef* hadc, uint32_t Ti
|
|||
defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx)
|
||||
/**
|
||||
* @brief Poll for conversion event.
|
||||
* @param hadc: ADC handle
|
||||
* @param EventType: the ADC event type.
|
||||
* @param hadc ADC handle
|
||||
* @param EventType the ADC event type.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg ADC_AWD1_EVENT: ADC Analog watchdog 1 event (main analog watchdog, present on all STM32 devices)
|
||||
* @arg ADC_AWD2_EVENT: ADC Analog watchdog 2 event (additional analog watchdog, not present on all STM32 families)
|
||||
* @arg ADC_AWD3_EVENT: ADC Analog watchdog 3 event (additional analog watchdog, not present on all STM32 families)
|
||||
* @arg ADC_OVR_EVENT: ADC Overrun event
|
||||
* @arg ADC_JQOVF_EVENT: ADC Injected context queue overflow event
|
||||
* @param Timeout: Timeout value in millisecond.
|
||||
* @param Timeout Timeout value in millisecond.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_PollForEvent(ADC_HandleTypeDef* hadc, uint32_t EventType, uint32_t Timeout)
|
||||
|
@ -1928,11 +1926,11 @@ HAL_StatusTypeDef HAL_ADC_PollForEvent(ADC_HandleTypeDef* hadc, uint32_t EventTy
|
|||
#if defined(STM32F373xC) || defined(STM32F378xx)
|
||||
/**
|
||||
* @brief Poll for conversion event.
|
||||
* @param hadc: ADC handle
|
||||
* @param EventType: the ADC event type.
|
||||
* @param hadc ADC handle
|
||||
* @param EventType the ADC event type.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg ADC_AWD_EVENT: ADC Analog watchdog event.
|
||||
* @param Timeout: Timeout value in millisecond.
|
||||
* @param Timeout Timeout value in millisecond.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_PollForEvent(ADC_HandleTypeDef* hadc, uint32_t EventType, uint32_t Timeout)
|
||||
|
@ -1992,7 +1990,7 @@ HAL_StatusTypeDef HAL_ADC_PollForEvent(ADC_HandleTypeDef* hadc, uint32_t EventTy
|
|||
* function must be called for ADC slave first, then ADC master.
|
||||
* For ADC slave, ADC is enabled only (conversion is not started).
|
||||
* For ADC master, ADC is enabled and multimode conversion is started.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Start_IT(ADC_HandleTypeDef* hadc)
|
||||
|
@ -2132,7 +2130,7 @@ HAL_StatusTypeDef HAL_ADC_Start_IT(ADC_HandleTypeDef* hadc)
|
|||
* Interruptions enabled in this function:
|
||||
* - EOC (end of conversion of regular group)
|
||||
* Each of these interruptions has its dedicated callback function.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Start_IT(ADC_HandleTypeDef* hadc)
|
||||
|
@ -2229,7 +2227,7 @@ HAL_StatusTypeDef HAL_ADC_Start_IT(ADC_HandleTypeDef* hadc)
|
|||
* To stop ADC conversion only on ADC group regular
|
||||
* while letting ADC group injected conversions running,
|
||||
* use function @ref HAL_ADCEx_RegularStop_IT().
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Stop_IT(ADC_HandleTypeDef* hadc)
|
||||
|
@ -2281,7 +2279,7 @@ HAL_StatusTypeDef HAL_ADC_Stop_IT(ADC_HandleTypeDef* hadc)
|
|||
* @brief Stop ADC conversion of regular group (and injected group in
|
||||
* case of auto_injection mode), disable interrution of
|
||||
* end-of-conversion, disable ADC peripheral.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Stop_IT(ADC_HandleTypeDef* hadc)
|
||||
|
@ -2333,9 +2331,9 @@ HAL_StatusTypeDef HAL_ADC_Stop_IT(ADC_HandleTypeDef* hadc)
|
|||
* @note Case of multimode enabled (for devices with several ADCs): This
|
||||
* function is for single-ADC mode only. For multimode, use the
|
||||
* dedicated MultimodeStart function.
|
||||
* @param hadc: ADC handle
|
||||
* @param pData: The destination Buffer address.
|
||||
* @param Length: The length of data to be transferred from ADC peripheral to memory.
|
||||
* @param hadc ADC handle
|
||||
* @param pData The destination Buffer address.
|
||||
* @param Length The length of data to be transferred from ADC peripheral to memory.
|
||||
* @retval None
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, uint32_t Length)
|
||||
|
@ -2486,9 +2484,9 @@ HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, ui
|
|||
* Each of these interruptions has its dedicated callback function.
|
||||
* @note For devices with several ADCs: This function is for single-ADC mode
|
||||
* only. For multimode, use the dedicated MultimodeStart function.
|
||||
* @param hadc: ADC handle
|
||||
* @param pData: The destination Buffer address.
|
||||
* @param Length: The length of data to be transferred from ADC peripheral to memory.
|
||||
* @param hadc ADC handle
|
||||
* @param pData The destination Buffer address.
|
||||
* @param Length The length of data to be transferred from ADC peripheral to memory.
|
||||
* @retval None
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, uint32_t Length)
|
||||
|
@ -2606,7 +2604,7 @@ HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, ui
|
|||
* @note Case of multimode enabled (for devices with several ADCs): This
|
||||
* function is for single-ADC mode only. For multimode, use the
|
||||
* dedicated MultimodeStop function.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef* hadc)
|
||||
|
@ -2686,7 +2684,7 @@ HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef* hadc)
|
|||
* should be preliminarily stopped using HAL_ADCEx_InjectedStop function.
|
||||
* @note For devices with several ADCs: This function is for single-ADC mode
|
||||
* only. For multimode, use the dedicated MultimodeStop function.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef* hadc)
|
||||
|
@ -2756,7 +2754,7 @@ HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef* hadc)
|
|||
* in programming model IT: @ref HAL_ADC_IRQHandler(), in programming
|
||||
* model polling: @ref HAL_ADC_PollForConversion()
|
||||
* or @ref __HAL_ADC_CLEAR_FLAG(&hadc, ADC_FLAG_EOS).
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval ADC group regular conversion data
|
||||
*/
|
||||
uint32_t HAL_ADC_GetValue(ADC_HandleTypeDef* hadc)
|
||||
|
@ -2792,7 +2790,7 @@ uint32_t HAL_ADC_GetValue(ADC_HandleTypeDef* hadc)
|
|||
* in programming model IT: @ref HAL_ADC_IRQHandler(), in programming
|
||||
* model polling: @ref HAL_ADC_PollForConversion()
|
||||
* or @ref __HAL_ADC_CLEAR_FLAG(&hadc, ADC_FLAG_EOS).
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval ADC group regular conversion data
|
||||
*/
|
||||
uint32_t HAL_ADC_GetValue(ADC_HandleTypeDef* hadc)
|
||||
|
@ -2814,7 +2812,7 @@ uint32_t HAL_ADC_GetValue(ADC_HandleTypeDef* hadc)
|
|||
defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx)
|
||||
/**
|
||||
* @brief Handles ADC interrupt request.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_ADC_IRQHandler(ADC_HandleTypeDef* hadc)
|
||||
|
@ -3114,7 +3112,7 @@ void HAL_ADC_IRQHandler(ADC_HandleTypeDef* hadc)
|
|||
#if defined(STM32F373xC) || defined(STM32F378xx)
|
||||
/**
|
||||
* @brief Handles ADC interrupt request
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_ADC_IRQHandler(ADC_HandleTypeDef* hadc)
|
||||
|
@ -3237,8 +3235,8 @@ void HAL_ADC_IRQHandler(ADC_HandleTypeDef* hadc)
|
|||
* @brief Perform an ADC automatic self-calibration
|
||||
* Calibration prerequisite: ADC must be disabled (execute this
|
||||
* function before HAL_ADC_Start() or after HAL_ADC_Stop() ).
|
||||
* @param hadc: ADC handle
|
||||
* @param SingleDiff: Selection of single-ended or differential input
|
||||
* @param hadc ADC handle
|
||||
* @param SingleDiff Selection of single-ended or differential input
|
||||
* This parameter can be one of the following values:
|
||||
* @arg ADC_SINGLE_ENDED: Channel in mode input single ended
|
||||
* @arg ADC_DIFFERENTIAL_ENDED: Channel in mode input differential ended
|
||||
|
@ -3301,11 +3299,6 @@ HAL_StatusTypeDef HAL_ADCEx_Calibration_Start(ADC_HandleTypeDef* hadc, uint32_t
|
|||
HAL_ADC_STATE_BUSY_INTERNAL,
|
||||
HAL_ADC_STATE_READY);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Update ADC state machine to error */
|
||||
tmp_hal_status = HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Process unlocked */
|
||||
__HAL_UNLOCK(hadc);
|
||||
|
@ -3325,7 +3318,7 @@ HAL_StatusTypeDef HAL_ADCEx_Calibration_Start(ADC_HandleTypeDef* hadc, uint32_t
|
|||
* function before HAL_ADC_Start() or after HAL_ADC_Stop() ).
|
||||
* During calibration process, ADC is enabled. ADC is let enabled at
|
||||
* the completion of this function.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_Calibration_Start(ADC_HandleTypeDef* hadc)
|
||||
|
@ -3431,8 +3424,8 @@ HAL_StatusTypeDef HAL_ADCEx_Calibration_Start(ADC_HandleTypeDef* hadc)
|
|||
defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx)
|
||||
/**
|
||||
* @brief Get the calibration factor from automatic conversion result
|
||||
* @param hadc: ADC handle
|
||||
* @param SingleDiff: Selection of single-ended or differential input
|
||||
* @param hadc ADC handle
|
||||
* @param SingleDiff Selection of single-ended or differential input
|
||||
* This parameter can be one of the following values:
|
||||
* @arg ADC_SINGLE_ENDED: Channel in mode input single ended
|
||||
* @arg ADC_DIFFERENTIAL_ENDED: Channel in mode input differential ended
|
||||
|
@ -3465,12 +3458,12 @@ uint32_t HAL_ADCEx_Calibration_GetValue(ADC_HandleTypeDef* hadc, uint32_t Single
|
|||
defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx)
|
||||
/**
|
||||
* @brief Set the calibration factor to overwrite automatic conversion result. ADC must be enabled and no conversion on going.
|
||||
* @param hadc: ADC handle
|
||||
* @param SingleDiff: Selection of single-ended or differential input
|
||||
* @param hadc ADC handle
|
||||
* @param SingleDiff Selection of single-ended or differential input
|
||||
* This parameter can be one of the following values:
|
||||
* @arg ADC_SINGLE_ENDED: Channel in mode input single ended
|
||||
* @arg ADC_DIFFERENTIAL_ENDED: Channel in mode input differential ended
|
||||
* @param CalibrationFactor: Calibration factor (coded on 7 bits maximum)
|
||||
* @param CalibrationFactor Calibration factor (coded on 7 bits maximum)
|
||||
* @retval HAL state
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_Calibration_SetValue(ADC_HandleTypeDef* hadc, uint32_t SingleDiff, uint32_t CalibrationFactor)
|
||||
|
@ -3535,7 +3528,7 @@ HAL_StatusTypeDef HAL_ADCEx_Calibration_SetValue(ADC_HandleTypeDef* hadc, uint32
|
|||
* function must be called for ADC slave first, then ADC master.
|
||||
* For ADC slave, ADC is enabled only (conversion is not started).
|
||||
* For ADC master, ADC is enabled and multimode conversion is started.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_InjectedStart(ADC_HandleTypeDef* hadc)
|
||||
|
@ -3632,7 +3625,7 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedStart(ADC_HandleTypeDef* hadc)
|
|||
/**
|
||||
* @brief Enables ADC, starts conversion of injected group.
|
||||
* Interruptions enabled in this function: None.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_InjectedStart(ADC_HandleTypeDef* hadc)
|
||||
|
@ -3723,7 +3716,7 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedStart(ADC_HandleTypeDef* hadc)
|
|||
* For ADC slave, ADC is disabled only (conversion stop of ADC master
|
||||
* has already stopped conversion of ADC slave).
|
||||
* @note In case of auto-injection mode, HAL_ADC_Stop must be used.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_InjectedStop(ADC_HandleTypeDef* hadc)
|
||||
|
@ -3808,7 +3801,7 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedStop(ADC_HandleTypeDef* hadc)
|
|||
* regular group, function HAL_ADC_Stop must be used to stop both
|
||||
* injected and regular groups, and disable the ADC.
|
||||
* @note In case of auto-injection mode, HAL_ADC_Stop must be used.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_InjectedStop(ADC_HandleTypeDef* hadc)
|
||||
|
@ -3865,8 +3858,8 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedStop(ADC_HandleTypeDef* hadc)
|
|||
defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx)
|
||||
/**
|
||||
* @brief Wait for injected group conversion to be completed.
|
||||
* @param hadc: ADC handle
|
||||
* @param Timeout: Timeout value in millisecond.
|
||||
* @param hadc ADC handle
|
||||
* @param Timeout Timeout value in millisecond.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_InjectedPollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout)
|
||||
|
@ -3964,8 +3957,8 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedPollForConversion(ADC_HandleTypeDef* hadc, u
|
|||
#if defined(STM32F373xC) || defined(STM32F378xx)
|
||||
/**
|
||||
* @brief Wait for injected group conversion to be completed.
|
||||
* @param hadc: ADC handle
|
||||
* @param Timeout: Timeout value in millisecond.
|
||||
* @param hadc ADC handle
|
||||
* @param Timeout Timeout value in millisecond.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_InjectedPollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout)
|
||||
|
@ -4093,7 +4086,7 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedPollForConversion(ADC_HandleTypeDef* hadc, u
|
|||
* function must be called for ADC slave first, then ADC master.
|
||||
* For ADC slave, ADC is enabled only (conversion is not started).
|
||||
* For ADC master, ADC is enabled and multimode conversion is started.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_InjectedStart_IT(ADC_HandleTypeDef* hadc)
|
||||
|
@ -4213,7 +4206,7 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedStart_IT(ADC_HandleTypeDef* hadc)
|
|||
* Interruptions enabled in this function:
|
||||
* - JEOC (end of conversion of injected group)
|
||||
* Each of these interruptions has its dedicated callback function.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_InjectedStart_IT(ADC_HandleTypeDef* hadc)
|
||||
|
@ -4313,7 +4306,7 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedStart_IT(ADC_HandleTypeDef* hadc)
|
|||
* For ADC slave, ADC is disabled only (conversion stop of ADC master
|
||||
* has already stopped conversion of ADC slave).
|
||||
* @note In case of auto-injection mode, HAL_ADC_Stop must be used.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_InjectedStop_IT(ADC_HandleTypeDef* hadc)
|
||||
|
@ -4401,7 +4394,7 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedStop_IT(ADC_HandleTypeDef* hadc)
|
|||
* @note If ADC must be disabled and if conversion is on going on
|
||||
* regular group, function HAL_ADC_Stop must be used to stop both
|
||||
* injected and regular groups, and disable the ADC.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_InjectedStop_IT(ADC_HandleTypeDef* hadc)
|
||||
|
@ -4471,9 +4464,9 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedStop_IT(ADC_HandleTypeDef* hadc)
|
|||
* Each of these interruptions has its dedicated callback function.
|
||||
* @note ADC slave must be preliminarily enabled using single-mode
|
||||
* HAL_ADC_Start() function.
|
||||
* @param hadc: ADC handle of ADC master (handle of ADC slave must not be used)
|
||||
* @param pData: The destination Buffer address.
|
||||
* @param Length: The length of data to be transferred from ADC peripheral to memory.
|
||||
* @param hadc ADC handle of ADC master (handle of ADC slave must not be used)
|
||||
* @param pData The destination Buffer address.
|
||||
* @param Length The length of data to be transferred from ADC peripheral to memory.
|
||||
* @retval None
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_MultiModeStart_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, uint32_t Length)
|
||||
|
@ -4613,7 +4606,7 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeStart_DMA(ADC_HandleTypeDef* hadc, uint32_t
|
|||
* @note In case of DMA configured in circular mode, function
|
||||
* HAL_ADC_Stop_DMA must be called after this function with handle of
|
||||
* ADC slave, to properly disable the DMA channel of ADC slave.
|
||||
* @param hadc: ADC handle of ADC master (handle of ADC slave must not be used)
|
||||
* @param hadc ADC handle of ADC master (handle of ADC slave must not be used)
|
||||
* @retval None
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_MultiModeStop_DMA(ADC_HandleTypeDef* hadc)
|
||||
|
@ -4733,7 +4726,7 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeStop_DMA(ADC_HandleTypeDef* hadc)
|
|||
* @note Reading register CDR does not clear flag ADC flag EOC
|
||||
* (ADC group regular end of unitary conversion),
|
||||
* as it is the case for independent mode data register.
|
||||
* @param hadc: ADC handle of ADC master (handle of ADC slave must not be used)
|
||||
* @param hadc ADC handle of ADC master (handle of ADC slave must not be used)
|
||||
* @retval The converted data value.
|
||||
*/
|
||||
uint32_t HAL_ADCEx_MultiModeGetValue(ADC_HandleTypeDef* hadc)
|
||||
|
@ -4778,8 +4771,8 @@ uint32_t HAL_ADCEx_MultiModeGetValue(ADC_HandleTypeDef* hadc)
|
|||
* in programming model IT: @ref HAL_ADC_IRQHandler(), in programming
|
||||
* model polling: @ref HAL_ADCEx_InjectedPollForConversion()
|
||||
* or @ref __HAL_ADC_CLEAR_FLAG(&hadc, ADC_FLAG_JEOS).
|
||||
* @param hadc: ADC handle
|
||||
* @param InjectedRank: the converted ADC injected rank.
|
||||
* @param hadc ADC handle
|
||||
* @param InjectedRank the converted ADC injected rank.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg ADC_INJECTED_RANK_1: Injected Channel1 selected
|
||||
* @arg ADC_INJECTED_RANK_2: Injected Channel2 selected
|
||||
|
@ -4844,8 +4837,8 @@ uint32_t HAL_ADCEx_InjectedGetValue(ADC_HandleTypeDef* hadc, uint32_t InjectedRa
|
|||
* in programming model IT: @ref HAL_ADC_IRQHandler(), in programming
|
||||
* model polling: @ref HAL_ADCEx_InjectedPollForConversion()
|
||||
* or @ref __HAL_ADC_CLEAR_FLAG(&hadc, ADC_FLAG_JEOS).
|
||||
* @param hadc: ADC handle
|
||||
* @param InjectedRank: the converted ADC injected rank.
|
||||
* @param hadc ADC handle
|
||||
* @param InjectedRank the converted ADC injected rank.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg ADC_INJECTED_RANK_1: Injected Channel1 selected
|
||||
* @arg ADC_INJECTED_RANK_2: Injected Channel2 selected
|
||||
|
@ -4898,7 +4891,7 @@ uint32_t HAL_ADCEx_InjectedGetValue(ADC_HandleTypeDef* hadc, uint32_t InjectedRa
|
|||
* use function @ref HAL_ADC_Stop().
|
||||
* @note In case of auto-injection mode, this function also stop conversion
|
||||
* on ADC group injected.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_RegularStop(ADC_HandleTypeDef* hadc)
|
||||
|
@ -4972,7 +4965,7 @@ HAL_StatusTypeDef HAL_ADCEx_RegularStop(ADC_HandleTypeDef* hadc)
|
|||
* use function @ref HAL_ADC_Stop().
|
||||
* @note In case of auto-injection mode, this function also stop conversion
|
||||
* on ADC group injected.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_RegularStop_IT(ADC_HandleTypeDef* hadc)
|
||||
|
@ -5052,7 +5045,7 @@ HAL_StatusTypeDef HAL_ADCEx_RegularStop_IT(ADC_HandleTypeDef* hadc)
|
|||
* @note Case of multimode enabled (for devices with several ADCs): This
|
||||
* function is for single-ADC mode only. For multimode, use the
|
||||
* dedicated MultimodeStop function.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_RegularStop_DMA(ADC_HandleTypeDef* hadc)
|
||||
|
@ -5164,7 +5157,7 @@ HAL_StatusTypeDef HAL_ADCEx_RegularStop_DMA(ADC_HandleTypeDef* hadc)
|
|||
* @note In case of DMA configured in circular mode, function
|
||||
* HAL_ADC_Stop_DMA must be called after this function with handle of
|
||||
* ADC slave, to properly disable the DMA channel of ADC slave.
|
||||
* @param hadc: ADC handle of ADC master (handle of ADC slave must not be used)
|
||||
* @param hadc ADC handle of ADC master (handle of ADC slave must not be used)
|
||||
* @retval None
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_RegularMultiModeStop_DMA(ADC_HandleTypeDef* hadc)
|
||||
|
@ -5309,7 +5302,7 @@ HAL_StatusTypeDef HAL_ADCEx_RegularMultiModeStop_DMA(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief Injected conversion complete callback in non blocking mode
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef* hadc)
|
||||
|
@ -5332,7 +5325,7 @@ __weak void HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef* hadc)
|
|||
(parameter "QueueInjectedContext" in injected channel configuration)
|
||||
and if a new injected context is set when queue is full (maximum 2
|
||||
contexts).
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADCEx_InjectedQueueOverflowCallback(ADC_HandleTypeDef* hadc)
|
||||
|
@ -5348,7 +5341,7 @@ __weak void HAL_ADCEx_InjectedQueueOverflowCallback(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief Analog watchdog 2 callback in non blocking mode.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADCEx_LevelOutOfWindow2Callback(ADC_HandleTypeDef* hadc)
|
||||
|
@ -5363,7 +5356,7 @@ __weak void HAL_ADCEx_LevelOutOfWindow2Callback(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief Analog watchdog 3 callback in non blocking mode.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_ADCEx_LevelOutOfWindow3Callback(ADC_HandleTypeDef* hadc)
|
||||
|
@ -5425,8 +5418,8 @@ __weak void HAL_ADCEx_LevelOutOfWindow3Callback(ADC_HandleTypeDef* hadc)
|
|||
* The setting of these parameters is conditioned to ADC state.
|
||||
* For parameters constraints, see comments of structure
|
||||
* "ADC_ChannelConfTypeDef".
|
||||
* @param hadc: ADC handle
|
||||
* @param sConfig: Structure ADC channel for regular group.
|
||||
* @param hadc ADC handle
|
||||
* @param sConfig Structure ADC channel for regular group.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_ChannelConfTypeDef* sConfig)
|
||||
|
@ -5759,8 +5752,8 @@ HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_ChannelConf
|
|||
* The setting of these parameters is conditioned to ADC state.
|
||||
* For parameters constraints, see comments of structure
|
||||
* "ADC_ChannelConfTypeDef".
|
||||
* @param hadc: ADC handle
|
||||
* @param sConfig: Structure of ADC channel for regular group.
|
||||
* @param hadc ADC handle
|
||||
* @param sConfig Structure of ADC channel for regular group.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_ChannelConfTypeDef* sConfig)
|
||||
|
@ -5890,8 +5883,8 @@ HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_ChannelConf
|
|||
* HAL_ADCEx_InjectedConfigChannel() must be called once for each channel and
|
||||
* for each context (3 channels x 2 contexts = 6 calls). Conversion can
|
||||
* start once the 1st context is set. The 2nd context can be set on the fly.
|
||||
* @param hadc: ADC handle
|
||||
* @param sConfigInjected: Structure of ADC injected group and ADC channel for
|
||||
* @param hadc ADC handle
|
||||
* @param sConfigInjected Structure of ADC injected group and ADC channel for
|
||||
* injected group.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -6396,8 +6389,8 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef* hadc, ADC_I
|
|||
* Vbat/VrefInt/TempSensor.
|
||||
* These internal paths can be be disabled using function
|
||||
* HAL_ADC_DeInit().
|
||||
* @param hadc: ADC handle
|
||||
* @param sConfigInjected: Structure of ADC injected group and ADC channel for
|
||||
* @param hadc ADC handle
|
||||
* @param sConfigInjected Structure of ADC injected group and ADC channel for
|
||||
* injected group.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -6643,8 +6636,8 @@ HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef* hadc, ADC_I
|
|||
* The setting of these parameters is conditioned to ADC state.
|
||||
* For parameters constraints, see comments of structure
|
||||
* "ADC_AnalogWDGConfTypeDef".
|
||||
* @param hadc: ADC handle
|
||||
* @param AnalogWDGConfig: Structure of ADC analog watchdog configuration
|
||||
* @param hadc ADC handle
|
||||
* @param AnalogWDGConfig Structure of ADC analog watchdog configuration
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef* hadc, ADC_AnalogWDGConfTypeDef* AnalogWDGConfig)
|
||||
|
@ -6848,8 +6841,8 @@ HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef* hadc, ADC_AnalogWDG
|
|||
* Considering that registers write delay may happen due to
|
||||
* bus activity, this might cause an uncertainty on the
|
||||
* effective timing of the new programmed threshold values.
|
||||
* @param hadc: ADC handle
|
||||
* @param AnalogWDGConfig: Structure of ADC analog watchdog configuration
|
||||
* @param hadc ADC handle
|
||||
* @param AnalogWDGConfig Structure of ADC analog watchdog configuration
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef* hadc, ADC_AnalogWDGConfTypeDef* AnalogWDGConfig)
|
||||
|
@ -6928,8 +6921,8 @@ HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef* hadc, ADC_AnalogWDG
|
|||
* "ADC_MultiModeTypeDef".
|
||||
* @note To change back configuration from multimode to single mode, ADC must
|
||||
* be reset (using function HAL_ADC_Init() ).
|
||||
* @param hadc: ADC handle
|
||||
* @param multimode : Structure of ADC multimode configuration
|
||||
* @param hadc ADC handle
|
||||
* @param multimode Structure of ADC multimode configuration
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_MultiModeTypeDef* multimode)
|
||||
|
@ -6947,12 +6940,16 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_
|
|||
assert_param(IS_ADC_SAMPLING_DELAY(multimode->TwoSamplingDelay));
|
||||
}
|
||||
|
||||
/* Process locked */
|
||||
__HAL_LOCK(hadc);
|
||||
|
||||
|
||||
/* Set handle of the other ADC sharing the same common register */
|
||||
ADC_COMMON_ADC_OTHER(hadc, &tmphadcSharingSameCommonRegister);
|
||||
if (tmphadcSharingSameCommonRegister.Instance == NULL)
|
||||
{
|
||||
/* Return function status */
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/* Process locked */
|
||||
__HAL_LOCK(hadc);
|
||||
|
||||
/* Parameters update conditioned to ADC state: */
|
||||
/* Parameters that can be updated when ADC is disabled or enabled without */
|
||||
|
@ -7055,7 +7052,7 @@ HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_
|
|||
*/
|
||||
/**
|
||||
* @brief DMA transfer complete callback.
|
||||
* @param hdma: pointer to DMA handle.
|
||||
* @param hdma pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
static void ADC_DMAConvCplt(DMA_HandleTypeDef *hdma)
|
||||
|
@ -7098,7 +7095,7 @@ static void ADC_DMAConvCplt(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief DMA half transfer complete callback.
|
||||
* @param hdma: pointer to DMA handle.
|
||||
* @param hdma pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
static void ADC_DMAHalfConvCplt(DMA_HandleTypeDef *hdma)
|
||||
|
@ -7112,7 +7109,7 @@ static void ADC_DMAHalfConvCplt(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief DMA error callback
|
||||
* @param hdma: pointer to DMA handle.
|
||||
* @param hdma pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
static void ADC_DMAError(DMA_HandleTypeDef *hdma)
|
||||
|
@ -7138,7 +7135,7 @@ static void ADC_DMAError(DMA_HandleTypeDef *hdma)
|
|||
* @brief Enable the selected ADC.
|
||||
* @note Prerequisite condition to use this function: ADC must be disabled
|
||||
* and voltage regulator must be enabled (done into HAL_ADC_Init()).
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
static HAL_StatusTypeDef ADC_Enable(ADC_HandleTypeDef* hadc)
|
||||
|
@ -7192,7 +7189,7 @@ static HAL_StatusTypeDef ADC_Enable(ADC_HandleTypeDef* hadc)
|
|||
* @brief Disable the selected ADC.
|
||||
* @note Prerequisite condition to use this function: ADC conversions must be
|
||||
* stopped.
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
static HAL_StatusTypeDef ADC_Disable(ADC_HandleTypeDef* hadc)
|
||||
|
@ -7246,8 +7243,8 @@ static HAL_StatusTypeDef ADC_Disable(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief Stop ADC conversion.
|
||||
* @param hadc: ADC handle
|
||||
* @param ConversionGroup: ADC group regular and/or injected.
|
||||
* @param hadc ADC handle
|
||||
* @param ConversionGroup ADC group regular and/or injected.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg ADC_REGULAR_GROUP: ADC regular conversion type.
|
||||
* @arg ADC_INJECTED_GROUP: ADC injected conversion type.
|
||||
|
@ -7372,7 +7369,7 @@ static HAL_StatusTypeDef ADC_ConversionStop(ADC_HandleTypeDef* hadc, uint32_t Co
|
|||
* @brief Enable the selected ADC.
|
||||
* @note Prerequisite condition to use this function: ADC must be disabled
|
||||
* and voltage regulator must be enabled (done into HAL_ADC_Init()).
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
static HAL_StatusTypeDef ADC_Enable(ADC_HandleTypeDef* hadc)
|
||||
|
@ -7425,7 +7422,7 @@ static HAL_StatusTypeDef ADC_Enable(ADC_HandleTypeDef* hadc)
|
|||
|
||||
/**
|
||||
* @brief Stop ADC conversion and disable the selected ADC
|
||||
* @param hadc: ADC handle
|
||||
* @param hadc ADC handle
|
||||
* @retval HAL status.
|
||||
*/
|
||||
static HAL_StatusTypeDef ADC_ConversionStop_Disable(ADC_HandleTypeDef* hadc)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_cec.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief CEC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the High Definition Multimedia Interface
|
||||
|
@ -142,7 +140,7 @@
|
|||
/**
|
||||
* @brief Initializes the CEC mode according to the specified
|
||||
* parameters in the CEC_InitTypeDef and creates the associated handle .
|
||||
* @param hcec: CEC handle
|
||||
* @param hcec CEC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_CEC_Init(CEC_HandleTypeDef *hcec)
|
||||
|
@ -212,7 +210,7 @@ HAL_StatusTypeDef HAL_CEC_Init(CEC_HandleTypeDef *hcec)
|
|||
|
||||
/**
|
||||
* @brief DeInitializes the CEC peripheral
|
||||
* @param hcec: CEC handle
|
||||
* @param hcec CEC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_CEC_DeInit(CEC_HandleTypeDef *hcec)
|
||||
|
@ -265,8 +263,8 @@ HAL_StatusTypeDef HAL_CEC_DeInit(CEC_HandleTypeDef *hcec)
|
|||
|
||||
/**
|
||||
* @brief Initializes the Own Address of the CEC device
|
||||
* @param hcec: CEC handle
|
||||
* @param CEC_OwnAddress: The CEC own address.
|
||||
* @param hcec CEC handle
|
||||
* @param CEC_OwnAddress The CEC own address.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_CEC_SetDeviceAddress(CEC_HandleTypeDef *hcec, uint16_t CEC_OwnAddress)
|
||||
|
@ -312,7 +310,7 @@ HAL_StatusTypeDef HAL_CEC_SetDeviceAddress(CEC_HandleTypeDef *hcec, uint16_t CEC
|
|||
|
||||
/**
|
||||
* @brief CEC MSP Init
|
||||
* @param hcec: CEC handle
|
||||
* @param hcec CEC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_CEC_MspInit(CEC_HandleTypeDef *hcec)
|
||||
|
@ -326,7 +324,7 @@ HAL_StatusTypeDef HAL_CEC_SetDeviceAddress(CEC_HandleTypeDef *hcec, uint16_t CEC
|
|||
|
||||
/**
|
||||
* @brief CEC MSP DeInit
|
||||
* @param hcec: CEC handle
|
||||
* @param hcec CEC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_CEC_MspDeInit(CEC_HandleTypeDef *hcec)
|
||||
|
@ -378,11 +376,11 @@ HAL_StatusTypeDef HAL_CEC_SetDeviceAddress(CEC_HandleTypeDef *hcec, uint16_t CEC
|
|||
|
||||
/**
|
||||
* @brief Send data in interrupt mode
|
||||
* @param hcec: CEC handle
|
||||
* @param InitiatorAddress: Initiator address
|
||||
* @param DestinationAddress: destination logical address
|
||||
* @param pData: pointer to input byte data buffer
|
||||
* @param Size: amount of data to be sent in bytes (without counting the header).
|
||||
* @param hcec CEC handle
|
||||
* @param InitiatorAddress Initiator address
|
||||
* @param DestinationAddress destination logical address
|
||||
* @param pData pointer to input byte data buffer
|
||||
* @param Size amount of data to be sent in bytes (without counting the header).
|
||||
* 0 means only the header is sent (ping operation).
|
||||
* Maximum TX size is 15 bytes (1 opcode and up to 14 operands).
|
||||
* @retval HAL status
|
||||
|
@ -423,7 +421,7 @@ HAL_StatusTypeDef HAL_CEC_Transmit_IT(CEC_HandleTypeDef *hcec, uint8_t Initiator
|
|||
hcec->Instance->TXDR = ((uint8_t)(InitiatorAddress << CEC_INITIATOR_LSB_POS) |(uint8_t) DestinationAddress);
|
||||
/* Set TX Start of Message (TXSOM) bit */
|
||||
__HAL_CEC_FIRST_BYTE_TX_SET(hcec);
|
||||
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hcec);
|
||||
|
||||
|
@ -438,7 +436,7 @@ HAL_StatusTypeDef HAL_CEC_Transmit_IT(CEC_HandleTypeDef *hcec, uint8_t Initiator
|
|||
|
||||
/**
|
||||
* @brief Get size of the received frame.
|
||||
* @param hcec: CEC handle
|
||||
* @param hcec CEC handle
|
||||
* @retval Frame size
|
||||
*/
|
||||
uint32_t HAL_CEC_GetLastReceivedFrameSize(CEC_HandleTypeDef *hcec)
|
||||
|
@ -448,8 +446,8 @@ uint32_t HAL_CEC_GetLastReceivedFrameSize(CEC_HandleTypeDef *hcec)
|
|||
|
||||
/**
|
||||
* @brief Change Rx Buffer.
|
||||
* @param hcec: CEC handle
|
||||
* @param Rxbuffer: Rx Buffer
|
||||
* @param hcec CEC handle
|
||||
* @param Rxbuffer Rx Buffer
|
||||
* @note This function can be called only inside the HAL_CEC_RxCpltCallback()
|
||||
* @retval Frame size
|
||||
*/
|
||||
|
@ -460,7 +458,7 @@ void HAL_CEC_ChangeRxBuffer(CEC_HandleTypeDef *hcec, uint8_t* Rxbuffer)
|
|||
|
||||
/**
|
||||
* @brief This function handles CEC interrupt requests.
|
||||
* @param hcec: CEC handle
|
||||
* @param hcec CEC handle
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_CEC_IRQHandler(CEC_HandleTypeDef *hcec)
|
||||
|
@ -516,7 +514,7 @@ void HAL_CEC_IRQHandler(CEC_HandleTypeDef *hcec)
|
|||
hcec->Instance->TXDR = *hcec->pTxBuffPtr++;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
hcec->Instance->TXDR = *hcec->pTxBuffPtr++;
|
||||
hcec->TxXferCount--;
|
||||
}
|
||||
|
@ -526,7 +524,7 @@ void HAL_CEC_IRQHandler(CEC_HandleTypeDef *hcec)
|
|||
|
||||
/* CEC TX end interrupt ------------------------------------------------*/
|
||||
if((reg & CEC_FLAG_TXEND) != RESET)
|
||||
{
|
||||
{
|
||||
__HAL_CEC_CLEAR_FLAG(hcec, CEC_FLAG_TXEND);
|
||||
|
||||
/* Tx process is ended, restore hcec->gState to Ready */
|
||||
|
@ -547,15 +545,15 @@ void HAL_CEC_IRQHandler(CEC_HandleTypeDef *hcec)
|
|||
|
||||
if((reg & (CEC_ISR_RXOVR|CEC_ISR_BRE|CEC_ISR_SBPE|CEC_ISR_LBPE|CEC_ISR_RXACKE)) != RESET)
|
||||
{
|
||||
hcec->Init.RxBuffer-=hcec->RxXferSize;
|
||||
hcec->Init.RxBuffer-=hcec->RxXferSize;
|
||||
hcec->RxXferSize = 0U;
|
||||
hcec->RxState = HAL_CEC_STATE_READY;
|
||||
}
|
||||
else if (((reg & (CEC_ISR_TXUDR|CEC_ISR_TXERR|CEC_ISR_TXACKE)) != RESET) && ((reg & CEC_ISR_ARBLST) == RESET))
|
||||
{
|
||||
{
|
||||
/* Set the CEC state ready to be able to start again the process */
|
||||
hcec->gState = HAL_CEC_STATE_READY;
|
||||
}
|
||||
}
|
||||
|
||||
/* Error Call Back */
|
||||
HAL_CEC_ErrorCallback(hcec);
|
||||
|
@ -565,7 +563,7 @@ void HAL_CEC_IRQHandler(CEC_HandleTypeDef *hcec)
|
|||
|
||||
/**
|
||||
* @brief Tx Transfer completed callback
|
||||
* @param hcec: CEC handle
|
||||
* @param hcec CEC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_CEC_TxCpltCallback(CEC_HandleTypeDef *hcec)
|
||||
|
@ -579,8 +577,8 @@ void HAL_CEC_IRQHandler(CEC_HandleTypeDef *hcec)
|
|||
|
||||
/**
|
||||
* @brief Rx Transfer completed callback
|
||||
* @param hcec: CEC handle
|
||||
* @param RxFrameSize: Size of frame
|
||||
* @param hcec CEC handle
|
||||
* @param RxFrameSize Size of frame
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_CEC_RxCpltCallback(CEC_HandleTypeDef *hcec, uint32_t RxFrameSize)
|
||||
|
@ -595,7 +593,7 @@ __weak void HAL_CEC_RxCpltCallback(CEC_HandleTypeDef *hcec, uint32_t RxFrameSize
|
|||
|
||||
/**
|
||||
* @brief CEC error callbacks
|
||||
* @param hcec: CEC handle
|
||||
* @param hcec CEC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_CEC_ErrorCallback(CEC_HandleTypeDef *hcec)
|
||||
|
@ -626,7 +624,7 @@ __weak void HAL_CEC_RxCpltCallback(CEC_HandleTypeDef *hcec, uint32_t RxFrameSize
|
|||
*/
|
||||
/**
|
||||
* @brief return the CEC state
|
||||
* @param hcec: pointer to a CEC_HandleTypeDef structure that contains
|
||||
* @param hcec pointer to a CEC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified CEC module.
|
||||
* @retval HAL state
|
||||
*/
|
||||
|
@ -641,7 +639,7 @@ HAL_CEC_StateTypeDef HAL_CEC_GetState(CEC_HandleTypeDef *hcec)
|
|||
|
||||
/**
|
||||
* @brief Return the CEC error code
|
||||
* @param hcec : pointer to a CEC_HandleTypeDef structure that contains
|
||||
* @param hcec pointer to a CEC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified CEC.
|
||||
* @retval CEC Error Code
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_comp.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief COMP HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the COMP peripheral:
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_cortex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief CORTEX HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the CORTEX:
|
||||
|
@ -168,7 +166,7 @@
|
|||
/**
|
||||
* @brief Sets the priority grouping field (pre-emption priority and subpriority)
|
||||
* using the required unlock sequence.
|
||||
* @param PriorityGroup: The priority grouping bits length.
|
||||
* @param PriorityGroup The priority grouping bits length.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg NVIC_PRIORITYGROUP_0: 0 bits for pre-emption priority
|
||||
* 4 bits for subpriority
|
||||
|
@ -195,13 +193,13 @@ void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
|
|||
|
||||
/**
|
||||
* @brief Sets the priority of an interrupt.
|
||||
* @param IRQn: External interrupt number
|
||||
* @param IRQn External interrupt number
|
||||
* This parameter can be an enumerator of IRQn_Type enumeration
|
||||
* (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32f3xxxx.h))
|
||||
* @param PreemptPriority: The pre-emption priority for the IRQn channel.
|
||||
* @param PreemptPriority The pre-emption priority for the IRQn channel.
|
||||
* This parameter can be a value between 0 and 15 as described in the table CORTEX_NVIC_Priority_Table
|
||||
* A lower priority value indicates a higher priority
|
||||
* @param SubPriority: the subpriority level for the IRQ channel.
|
||||
* @param SubPriority the subpriority level for the IRQ channel.
|
||||
* This parameter can be a value between 0 and 15 as described in the table CORTEX_NVIC_Priority_Table
|
||||
* A lower priority value indicates a higher priority.
|
||||
* @retval None
|
||||
|
@ -266,7 +264,7 @@ void HAL_NVIC_SystemReset(void)
|
|||
/**
|
||||
* @brief Initializes the System Timer and its interrupt, and starts the System Tick Timer.
|
||||
* Counter is in free running mode to generate periodic interrupts.
|
||||
* @param TicksNumb: Specifies the ticks Number of ticks between two interrupts.
|
||||
* @param TicksNumb Specifies the ticks Number of ticks between two interrupts.
|
||||
* @retval status: - 0 Function succeeded.
|
||||
* - 1 Function failed.
|
||||
*/
|
||||
|
@ -295,7 +293,7 @@ uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb)
|
|||
*/
|
||||
|
||||
#if (__MPU_PRESENT == 1U)
|
||||
|
||||
|
||||
/**
|
||||
* @brief Disables the MPU also clears the HFNMIENA bit (ARM recommendation)
|
||||
* @retval None
|
||||
|
@ -311,7 +309,7 @@ void HAL_MPU_Disable(void)
|
|||
|
||||
/**
|
||||
* @brief Enables the MPU
|
||||
* @param MPU_Control: Specifies the control mode of the MPU during hard fault,
|
||||
* @param MPU_Control Specifies the control mode of the MPU during hard fault,
|
||||
* NMI, FAULTMASK and privileged access to the default memory
|
||||
* This parameter can be one of the following values:
|
||||
* @arg MPU_HFNMI_PRIVDEF_NONE
|
||||
|
@ -328,10 +326,10 @@ void HAL_MPU_Enable(uint32_t MPU_Control)
|
|||
/* Enable fault exceptions */
|
||||
SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Initializes and configures the Region and the memory to be protected.
|
||||
* @param MPU_Init: Pointer to a MPU_Region_InitTypeDef structure that contains
|
||||
* @param MPU_Init Pointer to a MPU_Region_InitTypeDef structure that contains
|
||||
* the initialization and configuration information.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -387,7 +385,7 @@ uint32_t HAL_NVIC_GetPriorityGrouping(void)
|
|||
|
||||
/**
|
||||
* @brief Gets the priority of an interrupt.
|
||||
* @param IRQn: External interrupt number
|
||||
* @param IRQn External interrupt number
|
||||
* This parameter can be an enumerator of IRQn_Type enumeration
|
||||
* (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32f3xxxx.h))
|
||||
* @param PriorityGroup: the priority grouping bits length.
|
||||
|
@ -402,8 +400,8 @@ uint32_t HAL_NVIC_GetPriorityGrouping(void)
|
|||
* 1 bits for subpriority
|
||||
* @arg NVIC_PRIORITYGROUP_4: 4 bits for pre-emption priority
|
||||
* 0 bits for subpriority
|
||||
* @param pPreemptPriority: Pointer on the Preemptive priority value (starting from 0).
|
||||
* @param pSubPriority: Pointer on the Subpriority value (starting from 0).
|
||||
* @param pPreemptPriority Pointer on the Preemptive priority value (starting from 0).
|
||||
* @param pSubPriority Pointer on the Subpriority value (starting from 0).
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority)
|
||||
|
@ -471,7 +469,7 @@ uint32_t HAL_NVIC_GetActive(IRQn_Type IRQn)
|
|||
|
||||
/**
|
||||
* @brief Configures the SysTick clock source.
|
||||
* @param CLKSource: specifies the SysTick clock source.
|
||||
* @param CLKSource specifies the SysTick clock source.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg SYSTICK_CLKSOURCE_HCLK_DIV8: AHB clock divided by 8 selected as SysTick clock source.
|
||||
* @arg SYSTICK_CLKSOURCE_HCLK: AHB clock selected as SysTick clock source.
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_crc.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief CRC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Cyclic Redundancy Check (CRC) peripheral:
|
||||
|
@ -115,7 +113,7 @@ static uint32_t CRC_Handle_16(CRC_HandleTypeDef *hcrc, uint16_t pBuffer[], uint3
|
|||
/**
|
||||
* @brief Initialize the CRC according to the specified
|
||||
* parameters in the CRC_InitTypeDef and initialize the associated handle.
|
||||
* @param hcrc: CRC handle
|
||||
* @param hcrc CRC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_CRC_Init(CRC_HandleTypeDef *hcrc)
|
||||
|
@ -192,7 +190,7 @@ HAL_StatusTypeDef HAL_CRC_Init(CRC_HandleTypeDef *hcrc)
|
|||
|
||||
/**
|
||||
* @brief DeInitialize the CRC peripheral.
|
||||
* @param hcrc: CRC handle
|
||||
* @param hcrc CRC handle
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_CRC_DeInit(CRC_HandleTypeDef *hcrc)
|
||||
|
@ -236,7 +234,7 @@ HAL_StatusTypeDef HAL_CRC_DeInit(CRC_HandleTypeDef *hcrc)
|
|||
|
||||
/**
|
||||
* @brief Initializes the CRC MSP.
|
||||
* @param hcrc: CRC handle
|
||||
* @param hcrc CRC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_CRC_MspInit(CRC_HandleTypeDef *hcrc)
|
||||
|
@ -251,7 +249,7 @@ __weak void HAL_CRC_MspInit(CRC_HandleTypeDef *hcrc)
|
|||
|
||||
/**
|
||||
* @brief DeInitialize the CRC MSP.
|
||||
* @param hcrc: CRC handle
|
||||
* @param hcrc CRC handle
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_CRC_MspDeInit(CRC_HandleTypeDef *hcrc)
|
||||
|
@ -291,10 +289,10 @@ __weak void HAL_CRC_MspDeInit(CRC_HandleTypeDef *hcrc)
|
|||
/**
|
||||
* @brief Compute the 7, 8, 16 or 32-bit CRC value of an 8, 16 or 32-bit data buffer
|
||||
* starting with the previously computed CRC as initialization value.
|
||||
* @param hcrc: CRC handle
|
||||
* @param pBuffer: pointer to the input data buffer, exact input data format is
|
||||
* @param hcrc CRC handle
|
||||
* @param pBuffer pointer to the input data buffer, exact input data format is
|
||||
* provided by hcrc->InputDataFormat.
|
||||
* @param BufferLength: input data buffer length (number of bytes if pBuffer
|
||||
* @param BufferLength input data buffer length (number of bytes if pBuffer
|
||||
* type is * uint8_t, number of half-words if pBuffer type is * uint16_t,
|
||||
* number of words if pBuffer type is * uint32_t).
|
||||
* @note By default, the API expects a uint32_t pointer as input buffer parameter.
|
||||
|
@ -351,10 +349,10 @@ uint32_t HAL_CRC_Accumulate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_
|
|||
/**
|
||||
* @brief Compute the 7, 8, 16 or 32-bit CRC value of an 8, 16 or 32-bit data buffer
|
||||
* starting with hcrc->Instance->INIT as initialization value.
|
||||
* @param hcrc: CRC handle
|
||||
* @param pBuffer: pointer to the input data buffer, exact input data format is
|
||||
* @param hcrc CRC handle
|
||||
* @param pBuffer pointer to the input data buffer, exact input data format is
|
||||
* provided by hcrc->InputDataFormat.
|
||||
* @param BufferLength: input data buffer length (number of bytes if pBuffer
|
||||
* @param BufferLength input data buffer length (number of bytes if pBuffer
|
||||
* type is * uint8_t, number of half-words if pBuffer type is * uint16_t,
|
||||
* number of words if pBuffer type is * uint32_t).
|
||||
* @note By default, the API expects a uint32_t pointer as input buffer parameter.
|
||||
|
@ -433,7 +431,7 @@ uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t
|
|||
|
||||
/**
|
||||
* @brief Return the CRC handle state.
|
||||
* @param hcrc: CRC handle
|
||||
* @param hcrc CRC handle
|
||||
* @retval HAL state
|
||||
*/
|
||||
HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc)
|
||||
|
@ -457,9 +455,9 @@ HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc)
|
|||
/**
|
||||
* @brief Enter 8-bit input data to the CRC calculator.
|
||||
* Specific data handling to optimize processing time.
|
||||
* @param hcrc: CRC handle
|
||||
* @param pBuffer: pointer to the input data buffer
|
||||
* @param BufferLength: input data buffer length
|
||||
* @param hcrc CRC handle
|
||||
* @param pBuffer pointer to the input data buffer
|
||||
* @param BufferLength input data buffer length
|
||||
* @retval uint32_t CRC (returned value LSBs for CRC shorter than 32 bits)
|
||||
*/
|
||||
static uint32_t CRC_Handle_8(CRC_HandleTypeDef *hcrc, uint8_t pBuffer[], uint32_t BufferLength)
|
||||
|
@ -500,9 +498,9 @@ static uint32_t CRC_Handle_8(CRC_HandleTypeDef *hcrc, uint8_t pBuffer[], uint32_
|
|||
/**
|
||||
* @brief Enter 16-bit input data to the CRC calculator.
|
||||
* Specific data handling to optimize processing time.
|
||||
* @param hcrc: CRC handle
|
||||
* @param pBuffer: pointer to the input data buffer
|
||||
* @param BufferLength: input data buffer length
|
||||
* @param hcrc CRC handle
|
||||
* @param pBuffer pointer to the input data buffer
|
||||
* @param BufferLength input data buffer length
|
||||
* @retval uint32_t CRC (returned value LSBs for CRC shorter than 32 bits)
|
||||
*/
|
||||
static uint32_t CRC_Handle_16(CRC_HandleTypeDef *hcrc, uint16_t pBuffer[], uint32_t BufferLength)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_crc_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Extended CRC HAL module driver.
|
||||
* This file provides firmware functions to manage the extended
|
||||
* functionalities of the CRC peripheral.
|
||||
|
@ -91,12 +89,12 @@
|
|||
|
||||
/**
|
||||
* @brief Initialize the CRC polynomial if different from default one.
|
||||
* @param hcrc: CRC handle
|
||||
* @param Pol: CRC generating polynomial (7, 8, 16 or 32-bit long).
|
||||
* @param hcrc CRC handle
|
||||
* @param Pol CRC generating polynomial (7, 8, 16 or 32-bit long).
|
||||
* This parameter is written in normal representation, e.g.
|
||||
* @arg for a polynomial of degree 7, X^7 + X^6 + X^5 + X^2 + 1 is written 0x65
|
||||
* @arg for a polynomial of degree 16, X^16 + X^12 + X^5 + 1 is written 0x1021
|
||||
* @param PolyLength: CRC polynomial length.
|
||||
* @param PolyLength CRC polynomial length.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg CRC_POLYLENGTH_7B: 7-bit long CRC (generating polynomial of degree 7)
|
||||
* @arg CRC_POLYLENGTH_8B: 8-bit long CRC (generating polynomial of degree 8)
|
||||
|
@ -159,8 +157,8 @@ HAL_StatusTypeDef HAL_CRCEx_Polynomial_Set(CRC_HandleTypeDef *hcrc, uint32_t Pol
|
|||
|
||||
/**
|
||||
* @brief Set the Reverse Input data mode.
|
||||
* @param hcrc: CRC handle
|
||||
* @param InputReverseMode: Input Data inversion mode.
|
||||
* @param hcrc CRC handle
|
||||
* @param InputReverseMode Input Data inversion mode.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg CRC_INPUTDATA_NOINVERSION: no change in bit order (default value)
|
||||
* @arg CRC_INPUTDATA_INVERSION_BYTE: Byte-wise bit reversal
|
||||
|
@ -187,8 +185,8 @@ HAL_StatusTypeDef HAL_CRCEx_Input_Data_Reverse(CRC_HandleTypeDef *hcrc, uint32_t
|
|||
|
||||
/**
|
||||
* @brief Set the Reverse Output data mode.
|
||||
* @param hcrc: CRC handle
|
||||
* @param OutputReverseMode: Output Data inversion mode.
|
||||
* @param hcrc CRC handle
|
||||
* @param OutputReverseMode Output Data inversion mode.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg CRC_OUTPUTDATA_INVERSION_DISABLE: no CRC inversion (default value)
|
||||
* @arg CRC_OUTPUTDATA_INVERSION_ENABLE: bit-level inversion (e.g. for a 8-bit CRC: 0xB5 becomes 0xAD)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_dac.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief DAC HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Digital to Analog Converter (DAC) peripheral:
|
||||
|
@ -274,7 +272,7 @@
|
|||
/**
|
||||
* @brief Initialize the DAC peripheral according to the specified parameters
|
||||
* in the DAC_InitStruct and initialize the associated handle.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval HAL status
|
||||
*/
|
||||
|
@ -312,7 +310,7 @@ HAL_StatusTypeDef HAL_DAC_Init(DAC_HandleTypeDef* hdac)
|
|||
|
||||
/**
|
||||
* @brief Deinitialize the DAC peripheral registers to their default reset values.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval HAL status
|
||||
*/
|
||||
|
@ -348,7 +346,7 @@ HAL_StatusTypeDef HAL_DAC_DeInit(DAC_HandleTypeDef* hdac)
|
|||
|
||||
/**
|
||||
* @brief Initialize the DAC MSP.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -364,7 +362,7 @@ __weak void HAL_DAC_MspInit(DAC_HandleTypeDef* hdac)
|
|||
|
||||
/**
|
||||
* @brief DeInitialize the DAC MSP.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -403,9 +401,9 @@ __weak void HAL_DAC_MspDeInit(DAC_HandleTypeDef* hdac)
|
|||
|
||||
/**
|
||||
* @brief Enables DAC and starts conversion of channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @arg DAC_CHANNEL_2: DAC1 Channel2 selected
|
||||
|
@ -427,9 +425,9 @@ __weak HAL_StatusTypeDef HAL_DAC_Start(DAC_HandleTypeDef* hdac, uint32_t Channel
|
|||
|
||||
/**
|
||||
* @brief Disables DAC and stop conversion of channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @arg DAC_CHANNEL_2: DAC1 Channel2 selected
|
||||
|
@ -453,9 +451,9 @@ HAL_StatusTypeDef HAL_DAC_Stop(DAC_HandleTypeDef* hdac, uint32_t Channel)
|
|||
|
||||
/**
|
||||
* @brief Disables DAC and stop conversion of channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @arg DAC_CHANNEL_2: DAC1 Channel2 selected
|
||||
|
@ -520,9 +518,9 @@ HAL_StatusTypeDef HAL_DAC_Stop_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel)
|
|||
|
||||
/**
|
||||
* @brief Returns the last data output value of the selected DAC channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @arg DAC_CHANNEL_2: DAC1 Channel2 selected
|
||||
|
@ -544,7 +542,7 @@ __weak uint32_t HAL_DAC_GetValue(DAC_HandleTypeDef* hdac, uint32_t Channel)
|
|||
|
||||
/**
|
||||
* @brief Returns the last data output value of the selected DAC channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval The selected DAC channel data output value.
|
||||
*/
|
||||
|
@ -584,10 +582,10 @@ __weak uint32_t HAL_DACEx_DualGetValue(DAC_HandleTypeDef* hdac)
|
|||
|
||||
/**
|
||||
* @brief Configures the selected DAC channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param sConfig: DAC configuration structure.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param sConfig DAC configuration structure.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @arg DAC_CHANNEL_2: DAC1 Channel2 selected
|
||||
|
@ -659,7 +657,7 @@ __weak HAL_StatusTypeDef HAL_DACEx_DualSetValue(DAC_HandleTypeDef* hdac, uint32_
|
|||
|
||||
/**
|
||||
* @brief return the DAC handle state
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval HAL state
|
||||
*/
|
||||
|
@ -671,7 +669,7 @@ HAL_DAC_StateTypeDef HAL_DAC_GetState(DAC_HandleTypeDef* hdac)
|
|||
|
||||
/**
|
||||
* @brief Return the DAC error code
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval DAC Error Code
|
||||
*/
|
||||
|
@ -690,7 +688,7 @@ uint32_t HAL_DAC_GetError(DAC_HandleTypeDef *hdac)
|
|||
|
||||
/**
|
||||
* @brief Conversion complete callback in non blocking mode for Channel1
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -706,7 +704,7 @@ __weak void HAL_DAC_ConvCpltCallbackCh1(DAC_HandleTypeDef* hdac)
|
|||
|
||||
/**
|
||||
* @brief Conversion half DMA transfer callback in non blocking mode for Channel1
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -722,7 +720,7 @@ __weak void HAL_DAC_ConvHalfCpltCallbackCh1(DAC_HandleTypeDef* hdac)
|
|||
|
||||
/**
|
||||
* @brief Error DAC callback for Channel1.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -739,7 +737,7 @@ __weak void HAL_DAC_ErrorCallbackCh1(DAC_HandleTypeDef *hdac)
|
|||
|
||||
/**
|
||||
* @brief DMA underrun DAC callback for Channel1.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval None
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_dac_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief DACEx HAL module driver.
|
||||
* This file provides firmware functions to manage the extended
|
||||
* functionalities of the DAC peripheral.
|
||||
|
@ -116,15 +114,15 @@ static void DAC_DMAHalfConvCpltCh2(DMA_HandleTypeDef *hdma);
|
|||
|
||||
/**
|
||||
* @brief Set the specified data holding register value for DAC channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param Alignment: Specifies the data alignment for DAC channel.
|
||||
* @param Channel The selected DAC channel.
|
||||
* @param Alignment Specifies the data alignment for DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_ALIGN_8B_R: 8bit right data alignment selected
|
||||
* @arg DAC_ALIGN_12B_L: 12bit left data alignment selected
|
||||
* @arg DAC_ALIGN_12B_R: 12bit right data alignment selected
|
||||
* @param Data: Data to be loaded in the selected data holding register.
|
||||
* @param Data Data to be loaded in the selected data holding register.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_DAC_SetValue(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t Alignment, uint32_t Data)
|
||||
|
@ -172,9 +170,9 @@ HAL_StatusTypeDef HAL_DAC_SetValue(DAC_HandleTypeDef* hdac, uint32_t Channel, ui
|
|||
/* DAC channel 2 is present in DAC 1U */
|
||||
/**
|
||||
* @brief Set the specified data holding register value for dual DAC channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Alignment: Specifies the data alignment for dual channel DAC.
|
||||
* @param Alignment Specifies the data alignment for dual channel DAC.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_ALIGN_8B_R: 8bit right data alignment selected
|
||||
* @arg DAC_ALIGN_12B_L: 12bit left data alignment selected
|
||||
|
@ -249,9 +247,9 @@ HAL_StatusTypeDef HAL_DACEx_DualSetValue(DAC_HandleTypeDef* hdac, uint32_t Align
|
|||
/* DAC 1 has 2 channels 1U & 2U - DAC 2 has one channel 1U */
|
||||
/**
|
||||
* @brief Enables DAC and starts conversion of channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 or DAC2 Channel1 selected
|
||||
* @arg DAC_CHANNEL_2: DAC1 Channel2 selected
|
||||
|
@ -310,9 +308,9 @@ HAL_StatusTypeDef HAL_DAC_Start(DAC_HandleTypeDef* hdac, uint32_t Channel)
|
|||
/* DAC 1 has 1 channels 1U */
|
||||
/**
|
||||
* @brief Enables DAC and starts conversion of channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @retval HAL status
|
||||
|
@ -360,15 +358,15 @@ HAL_StatusTypeDef HAL_DAC_Start(DAC_HandleTypeDef* hdac, uint32_t Channel)
|
|||
/* DAC 1 has 2 channels 1U & 2U */
|
||||
/**
|
||||
* @brief Enables DAC and starts conversion of channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @arg DAC_CHANNEL_2: DAC1 Channel2 selected
|
||||
* @param pData: The destination peripheral Buffer address.
|
||||
* @param Length: The length of data to be transferred from memory to DAC peripheral
|
||||
* @param Alignment: Specifies the data alignment for DAC channel.
|
||||
* @param pData The destination peripheral Buffer address.
|
||||
* @param Length The length of data to be transferred from memory to DAC peripheral
|
||||
* @param Alignment Specifies the data alignment for DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_ALIGN_8B_R: 8bit right data alignment selected
|
||||
* @arg DAC_ALIGN_12B_L: 12bit left data alignment selected
|
||||
|
@ -494,14 +492,14 @@ HAL_StatusTypeDef HAL_DAC_Start_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel, u
|
|||
/* DAC 1 has 1 channel (channel 1U) */
|
||||
/**
|
||||
* @brief Enables DAC and starts conversion of channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @param pData: The destination peripheral Buffer address.
|
||||
* @param Length: The length of data to be transferred from memory to DAC peripheral
|
||||
* @param Alignment: Specifies the data alignment for DAC channel.
|
||||
* @param pData The destination peripheral Buffer address.
|
||||
* @param Length The length of data to be transferred from memory to DAC peripheral
|
||||
* @param Alignment Specifies the data alignment for DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_ALIGN_8B_R: 8bit right data alignment selected
|
||||
* @arg DAC_ALIGN_12B_L: 12bit left data alignment selected
|
||||
|
@ -581,9 +579,9 @@ HAL_StatusTypeDef HAL_DAC_Start_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel, u
|
|||
/* DAC 1 has 2 channels 1U & 2U */
|
||||
/**
|
||||
* @brief Returns the last data output value of the selected DAC channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @arg DAC_CHANNEL_2: DAC1 Channel2 selected
|
||||
|
@ -615,9 +613,9 @@ uint32_t HAL_DAC_GetValue(DAC_HandleTypeDef* hdac, uint32_t Channel)
|
|||
/* DAC 1 has 1 channel (channel 1U) */
|
||||
/**
|
||||
* @brief Returns the last data output value of the selected DAC channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param channel: The selected DAC channel.
|
||||
* @param channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @retval The selected DAC channel data output value.
|
||||
|
@ -636,7 +634,7 @@ uint32_t HAL_DAC_GetValue(DAC_HandleTypeDef* hdac, uint32_t Channel)
|
|||
|
||||
/**
|
||||
* @brief Return the last data output value of the selected DAC channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval The selected DAC channel data output value.
|
||||
*/
|
||||
|
@ -670,7 +668,7 @@ uint32_t HAL_DACEx_DualGetValue(DAC_HandleTypeDef* hdac)
|
|||
* @brief Handles DAC interrupt request
|
||||
* This function uses the interruption of DMA
|
||||
* underrun.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -733,7 +731,7 @@ void HAL_DAC_IRQHandler(struct __DAC_HandleTypeDef* hdac)
|
|||
* @brief Handles DAC interrupt request
|
||||
* This function uses the interruption of DMA
|
||||
* underrun.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -767,10 +765,10 @@ void HAL_DAC_IRQHandler(struct __DAC_HandleTypeDef* hdac)
|
|||
|
||||
/**
|
||||
* @brief Configures the selected DAC channel.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param sConfig: DAC configuration structure.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param sConfig DAC configuration structure.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @arg DAC_CHANNEL_2: DAC1 Channel2 selected
|
||||
|
@ -854,13 +852,13 @@ HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef* hdac, DAC_ChannelConf
|
|||
|
||||
/**
|
||||
* @brief Enables or disables the selected DAC channel wave generation.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @arg DAC_CHANNEL_2: DAC1 Channel2 selected
|
||||
* @param Amplitude: Select max triangle amplitude.
|
||||
* @param Amplitude Select max triangle amplitude.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_TRIANGLEAMPLITUDE_1: Select max triangle amplitude of 1
|
||||
* @arg DAC_TRIANGLEAMPLITUDE_3: Select max triangle amplitude of 3
|
||||
|
@ -904,13 +902,13 @@ HAL_StatusTypeDef HAL_DACEx_TriangleWaveGenerate(DAC_HandleTypeDef* hdac, uint32
|
|||
|
||||
/**
|
||||
* @brief Enables or disables the selected DAC channel wave generation.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @param Channel: The selected DAC channel.
|
||||
* @param Channel The selected DAC channel.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_CHANNEL_1: DAC1 Channel1 selected
|
||||
* @arg DAC_CHANNEL_2: DAC1 Channel2 selected
|
||||
* @param Amplitude: Unmask DAC channel LFSR for noise wave generation.
|
||||
* @param Amplitude Unmask DAC channel LFSR for noise wave generation.
|
||||
* This parameter can be one of the following values:
|
||||
* @arg DAC_LFSRUNMASK_BIT0: Unmask DAC channel LFSR bit0 for noise wave generation
|
||||
* @arg DAC_LFSRUNMASK_BITS1_0: Unmask DAC channel LFSR bit[1:0] for noise wave generation
|
||||
|
@ -958,7 +956,7 @@ HAL_StatusTypeDef HAL_DACEx_NoiseWaveGenerate(DAC_HandleTypeDef* hdac, uint32_t
|
|||
/* DAC channel 2 is available on top of DAC channel 1U */
|
||||
/**
|
||||
* @brief Conversion complete callback in non blocking mode for Channel2
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -974,7 +972,7 @@ __weak void HAL_DACEx_ConvCpltCallbackCh2(DAC_HandleTypeDef* hdac)
|
|||
|
||||
/**
|
||||
* @brief Conversion half DMA transfer callback in non blocking mode for Channel2
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -990,7 +988,7 @@ __weak void HAL_DACEx_ConvHalfCpltCallbackCh2(DAC_HandleTypeDef* hdac)
|
|||
|
||||
/**
|
||||
* @brief Error DAC callback for Channel2.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -1006,7 +1004,7 @@ __weak void HAL_DACEx_ErrorCallbackCh2(DAC_HandleTypeDef *hdac)
|
|||
|
||||
/**
|
||||
* @brief DMA underrun DAC callback for channel2.
|
||||
* @param hdac: pointer to a DAC_HandleTypeDef structure that contains
|
||||
* @param hdac pointer to a DAC_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DAC.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -1041,7 +1039,7 @@ __weak void HAL_DACEx_DMAUnderrunCallbackCh2(DAC_HandleTypeDef *hdac)
|
|||
|
||||
/**
|
||||
* @brief DMA conversion complete callback.
|
||||
* @param hdma: pointer to DMA handle.
|
||||
* @param hdma pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
static void DAC_DMAConvCpltCh1(DMA_HandleTypeDef *hdma)
|
||||
|
@ -1055,7 +1053,7 @@ static void DAC_DMAConvCpltCh1(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief DMA half transfer complete callback.
|
||||
* @param hdma: pointer to DMA handle.
|
||||
* @param hdma pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
static void DAC_DMAHalfConvCpltCh1(DMA_HandleTypeDef *hdma)
|
||||
|
@ -1067,7 +1065,7 @@ static void DAC_DMAHalfConvCpltCh1(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief DMA error callback
|
||||
* @param hdma: pointer to DMA handle.
|
||||
* @param hdma pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
static void DAC_DMAErrorCh1(DMA_HandleTypeDef *hdma)
|
||||
|
@ -1089,7 +1087,7 @@ static void DAC_DMAErrorCh1(DMA_HandleTypeDef *hdma)
|
|||
/* DAC channel 2 is available on top of DAC channel 1U */
|
||||
/**
|
||||
* @brief DMA conversion complete callback.
|
||||
* @param hdma: pointer to DMA handle.
|
||||
* @param hdma pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
static void DAC_DMAConvCpltCh2(DMA_HandleTypeDef *hdma)
|
||||
|
@ -1103,7 +1101,7 @@ static void DAC_DMAConvCpltCh2(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief DMA half transfer complete callback.
|
||||
* @param hdma: pointer to DMA handle.
|
||||
* @param hdma pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
static void DAC_DMAHalfConvCpltCh2(DMA_HandleTypeDef *hdma)
|
||||
|
@ -1115,7 +1113,7 @@ static void DAC_DMAHalfConvCpltCh2(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief DMA error callback
|
||||
* @param hdma: pointer to DMA handle.
|
||||
* @param hdma pointer to DMA handle.
|
||||
* @retval None
|
||||
*/
|
||||
static void DAC_DMAErrorCh2(DMA_HandleTypeDef *hdma)
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_dma.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief DMA HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
@ -148,7 +146,7 @@ static void DMA_CalcBaseAndBitshift(DMA_HandleTypeDef *hdma);
|
|||
/**
|
||||
* @brief Initialize the DMA according to the specified
|
||||
* parameters in the DMA_InitTypeDef and initialize the associated handle.
|
||||
* @param hdma: Pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma Pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Channel.
|
||||
* @retval HAL status
|
||||
*/
|
||||
|
@ -216,7 +214,7 @@ HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief DeInitialize the DMA peripheral
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Channel.
|
||||
* @retval HAL status
|
||||
*/
|
||||
|
@ -291,9 +289,9 @@ HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma)
|
|||
* @brief Start the DMA Transfer.
|
||||
* @param hdma : pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Channel.
|
||||
* @param SrcAddress: The source memory Buffer address
|
||||
* @param DstAddress: The destination memory Buffer address
|
||||
* @param DataLength: The length of data to be transferred from source to destination
|
||||
* @param SrcAddress The source memory Buffer address
|
||||
* @param DstAddress The destination memory Buffer address
|
||||
* @param DataLength The length of data to be transferred from source to destination
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_DMA_Start(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
|
||||
|
@ -310,15 +308,15 @@ HAL_StatusTypeDef HAL_DMA_Start(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, ui
|
|||
{
|
||||
/* Change DMA peripheral state */
|
||||
hdma->State = HAL_DMA_STATE_BUSY;
|
||||
|
||||
|
||||
hdma->ErrorCode = HAL_DMA_ERROR_NONE;
|
||||
|
||||
|
||||
/* Disable the peripheral */
|
||||
hdma->Instance->CCR &= ~DMA_CCR_EN;
|
||||
|
||||
|
||||
/* Configure the source, destination address and the data length */
|
||||
DMA_SetConfig(hdma, SrcAddress, DstAddress, DataLength);
|
||||
|
||||
|
||||
/* Enable the Peripheral */
|
||||
hdma->Instance->CCR |= DMA_CCR_EN;
|
||||
}
|
||||
|
@ -326,7 +324,7 @@ HAL_StatusTypeDef HAL_DMA_Start(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, ui
|
|||
{
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hdma);
|
||||
|
||||
|
||||
/* Remain BUSY */
|
||||
status = HAL_BUSY;
|
||||
}
|
||||
|
@ -336,11 +334,11 @@ HAL_StatusTypeDef HAL_DMA_Start(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, ui
|
|||
|
||||
/**
|
||||
* @brief Start the DMA Transfer with interrupt enabled.
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Channel.
|
||||
* @param SrcAddress: The source memory Buffer address
|
||||
* @param DstAddress: The destination memory Buffer address
|
||||
* @param DataLength: The length of data to be transferred from source to destination
|
||||
* @param SrcAddress The source memory Buffer address
|
||||
* @param DstAddress The destination memory Buffer address
|
||||
* @param DataLength The length of data to be transferred from source to destination
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
|
||||
|
@ -357,15 +355,15 @@ HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress,
|
|||
{
|
||||
/* Change DMA peripheral state */
|
||||
hdma->State = HAL_DMA_STATE_BUSY;
|
||||
|
||||
|
||||
hdma->ErrorCode = HAL_DMA_ERROR_NONE;
|
||||
|
||||
|
||||
/* Disable the peripheral */
|
||||
hdma->Instance->CCR &= ~DMA_CCR_EN;
|
||||
|
||||
|
||||
/* Configure the source, destination address and the data length */
|
||||
DMA_SetConfig(hdma, SrcAddress, DstAddress, DataLength);
|
||||
|
||||
|
||||
/* Enable the transfer complete, & transfer error interrupts */
|
||||
/* Half transfer interrupt is optional: enable it only if associated callback is available */
|
||||
if(NULL != hdma->XferHalfCpltCallback )
|
||||
|
@ -377,7 +375,7 @@ HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress,
|
|||
hdma->Instance->CCR |= (DMA_IT_TC | DMA_IT_TE);
|
||||
hdma->Instance->CCR &= ~DMA_IT_HT;
|
||||
}
|
||||
|
||||
|
||||
/* Enable the Peripheral */
|
||||
hdma->Instance->CCR |= DMA_CCR_EN;
|
||||
}
|
||||
|
@ -403,19 +401,19 @@ HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma)
|
|||
{
|
||||
/* Disable DMA IT */
|
||||
hdma->Instance->CCR &= ~(DMA_IT_TC | DMA_IT_HT | DMA_IT_TE);
|
||||
|
||||
|
||||
/* Disable the channel */
|
||||
hdma->Instance->CCR &= ~DMA_CCR_EN;
|
||||
|
||||
|
||||
/* Clear all flags */
|
||||
hdma->DmaBaseAddress->IFCR = (DMA_FLAG_GL1 << hdma->ChannelIndex);
|
||||
|
||||
|
||||
/* Change the DMA state*/
|
||||
hdma->State = HAL_DMA_STATE_READY;
|
||||
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hdma);
|
||||
|
||||
|
||||
return HAL_OK;
|
||||
}
|
||||
|
||||
|
@ -465,10 +463,10 @@ HAL_StatusTypeDef HAL_DMA_Abort_IT(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief Polling for transfer complete.
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Channel.
|
||||
* @param CompleteLevel: Specifies the DMA level complete.
|
||||
* @param Timeout: Timeout duration.
|
||||
* @param CompleteLevel Specifies the DMA level complete.
|
||||
* @param Timeout Timeout duration.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, uint32_t CompleteLevel, uint32_t Timeout)
|
||||
|
@ -568,7 +566,7 @@ HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, uint32_t Comp
|
|||
|
||||
/**
|
||||
* @brief Handle DMA interrupt request.
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Channel.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -586,13 +584,13 @@ void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma)
|
|||
/* Disable the half transfer interrupt */
|
||||
hdma->Instance->CCR &= ~DMA_IT_HT;
|
||||
}
|
||||
|
||||
|
||||
/* Clear the half transfer complete flag */
|
||||
hdma->DmaBaseAddress->IFCR = DMA_FLAG_HT1 << hdma->ChannelIndex;
|
||||
|
||||
|
||||
/* DMA peripheral state is not updated in Half Transfer */
|
||||
/* State is updated only in Transfer Complete case */
|
||||
|
||||
|
||||
if(hdma->XferHalfCpltCallback != NULL)
|
||||
{
|
||||
/* Half transfer callback */
|
||||
|
@ -608,17 +606,17 @@ void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma)
|
|||
/* Disable the transfer complete & transfer error interrupts */
|
||||
/* if the DMA mode is not CIRCULAR */
|
||||
hdma->Instance->CCR &= ~(DMA_IT_TC | DMA_IT_TE);
|
||||
|
||||
|
||||
/* Change the DMA state */
|
||||
hdma->State = HAL_DMA_STATE_READY;
|
||||
}
|
||||
|
||||
|
||||
/* Clear the transfer complete flag */
|
||||
hdma->DmaBaseAddress->IFCR = DMA_FLAG_TC1 << hdma->ChannelIndex;
|
||||
|
||||
|
||||
/* Process Unlocked */
|
||||
__HAL_UNLOCK(hdma);
|
||||
|
||||
|
||||
if(hdma->XferCpltCallback != NULL)
|
||||
{
|
||||
/* Transfer complete callback */
|
||||
|
@ -656,11 +654,11 @@ void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief Register callbacks
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Stream.
|
||||
* @param CallbackID: User Callback identifer
|
||||
* @param CallbackID User Callback identifer
|
||||
* a HAL_DMA_CallbackIDTypeDef ENUM as parameter.
|
||||
* @param pCallback: pointer to private callback function which has pointer to
|
||||
* @param pCallback pointer to private callback function which has pointer to
|
||||
* a DMA_HandleTypeDef structure as parameter.
|
||||
* @retval HAL status
|
||||
*/
|
||||
|
@ -709,9 +707,9 @@ HAL_StatusTypeDef HAL_DMA_RegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_Call
|
|||
|
||||
/**
|
||||
* @brief UnRegister callbacks
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Stream.
|
||||
* @param CallbackID: User Callback identifer
|
||||
* @param CallbackID User Callback identifer
|
||||
* a HAL_DMA_CallbackIDTypeDef ENUM as parameter.
|
||||
* @retval HAL status
|
||||
*/
|
||||
|
@ -787,7 +785,7 @@ HAL_StatusTypeDef HAL_DMA_UnRegisterCallback(DMA_HandleTypeDef *hdma, HAL_DMA_Ca
|
|||
|
||||
/**
|
||||
* @brief Returns the DMA state.
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Channel.
|
||||
* @retval HAL state
|
||||
*/
|
||||
|
@ -798,7 +796,7 @@ HAL_DMA_StateTypeDef HAL_DMA_GetState(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief Return the DMA error code
|
||||
* @param hdma : pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Channel.
|
||||
* @retval DMA Error Code
|
||||
*/
|
||||
|
@ -821,11 +819,11 @@ uint32_t HAL_DMA_GetError(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief Set the DMA Transfer parameters.
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Channel.
|
||||
* @param SrcAddress: The source memory Buffer address
|
||||
* @param DstAddress: The destination memory Buffer address
|
||||
* @param DataLength: The length of data to be transferred from source to destination
|
||||
* @param SrcAddress The source memory Buffer address
|
||||
* @param DstAddress The destination memory Buffer address
|
||||
* @param DataLength The length of data to be transferred from source to destination
|
||||
* @retval HAL status
|
||||
*/
|
||||
static void DMA_SetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
|
||||
|
@ -858,7 +856,7 @@ static void DMA_SetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t
|
|||
|
||||
/**
|
||||
* @brief Set the DMA base address and channel index depending on DMA instance
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA Stream.
|
||||
* @retval None
|
||||
*/
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_flash.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief FLASH HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the internal FLASH memory:
|
||||
|
@ -437,7 +435,7 @@ void HAL_FLASH_IRQHandler(void)
|
|||
|
||||
/**
|
||||
* @brief FLASH end of operation interrupt callback
|
||||
* @param ReturnValue: The value saved in this parameter depends on the ongoing procedure
|
||||
* @param ReturnValue The value saved in this parameter depends on the ongoing procedure
|
||||
* - Mass Erase: No return value expected
|
||||
* - Pages Erase: Address of the page which has been erased
|
||||
* (if 0xFFFFFFFF, it means that all the selected pages have been erased)
|
||||
|
@ -456,7 +454,7 @@ __weak void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue)
|
|||
|
||||
/**
|
||||
* @brief FLASH operation error interrupt callback
|
||||
* @param ReturnValue: The value saved in this parameter depends on the ongoing procedure
|
||||
* @param ReturnValue The value saved in this parameter depends on the ongoing procedure
|
||||
* - Mass Erase: No return value expected
|
||||
* - Pages Erase: Address of the page which returned an error
|
||||
* - Program: Address which was selected for data program
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_flash_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief Extended FLASH HAL module driver.
|
||||
*
|
||||
* This file provides firmware functions to manage the following
|
||||
|
@ -912,7 +910,6 @@ static uint32_t FLASH_OB_GetWRP(void)
|
|||
*/
|
||||
static uint32_t FLASH_OB_GetRDP(void)
|
||||
{
|
||||
uint32_t readstatus = OB_RDP_LEVEL_0;
|
||||
uint32_t tmp_reg = 0U;
|
||||
|
||||
/* Read RDP level bits */
|
||||
|
@ -930,7 +927,7 @@ static uint32_t FLASH_OB_GetRDP(void)
|
|||
if (tmp_reg == FLASH_OBR_LEVEL1_PROT)
|
||||
#endif /* FLASH_OBR_LEVEL1_PROT */
|
||||
{
|
||||
readstatus = OB_RDP_LEVEL_1;
|
||||
return OB_RDP_LEVEL_1;
|
||||
}
|
||||
#if defined(FLASH_OBR_RDPRT)
|
||||
else if (tmp_reg == FLASH_OBR_RDPRT_2)
|
||||
|
@ -938,14 +935,12 @@ static uint32_t FLASH_OB_GetRDP(void)
|
|||
else if (tmp_reg == FLASH_OBR_LEVEL2_PROT)
|
||||
#endif
|
||||
{
|
||||
readstatus = OB_RDP_LEVEL_2;
|
||||
return OB_RDP_LEVEL_2;
|
||||
}
|
||||
else
|
||||
{
|
||||
readstatus = OB_RDP_LEVEL_0;
|
||||
return OB_RDP_LEVEL_0;
|
||||
}
|
||||
|
||||
return readstatus;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_gpio.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief GPIO HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the General Purpose Input/Output (GPIO) peripheral:
|
||||
|
@ -182,8 +180,8 @@
|
|||
|
||||
/**
|
||||
* @brief Initialize the GPIOx peripheral according to the specified parameters in the GPIO_Init.
|
||||
* @param GPIOx: where x can be (A..F) to select the GPIO peripheral for STM32F3 family devices
|
||||
* @param GPIO_Init: pointer to a GPIO_InitTypeDef structure that contains
|
||||
* @param GPIOx where x can be (A..F) to select the GPIO peripheral for STM32F3 family devices
|
||||
* @param GPIO_Init pointer to a GPIO_InitTypeDef structure that contains
|
||||
* the configuration information for the specified GPIO peripheral.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -307,8 +305,8 @@ void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
|
|||
|
||||
/**
|
||||
* @brief De-initialize the GPIOx peripheral registers to their default reset values.
|
||||
* @param GPIOx: where x can be (A..F) to select the GPIO peripheral for STM32F30X device or STM32F37X device
|
||||
* @param GPIO_Pin: specifies the port bit to be written.
|
||||
* @param GPIOx where x can be (A..F) to select the GPIO peripheral for STM32F30X device or STM32F37X device
|
||||
* @param GPIO_Pin specifies the port bit to be written.
|
||||
* This parameter can be one of GPIO_PIN_x where x can be (0..15).
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -389,8 +387,8 @@ void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin)
|
|||
|
||||
/**
|
||||
* @brief Read the specified input port pin.
|
||||
* @param GPIOx: where x can be (A..F) to select the GPIO peripheral for STM32F3 family
|
||||
* @param GPIO_Pin: specifies the port bit to read.
|
||||
* @param GPIOx where x can be (A..F) to select the GPIO peripheral for STM32F3 family
|
||||
* @param GPIO_Pin specifies the port bit to read.
|
||||
* This parameter can be GPIO_PIN_x where x can be (0..15).
|
||||
* @retval The input port pin value.
|
||||
*/
|
||||
|
@ -419,10 +417,10 @@ GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
|
|||
* accesses. In this way, there is no risk of an IRQ occurring between
|
||||
* the read and the modify access.
|
||||
*
|
||||
* @param GPIOx: where x can be (A..F) to select the GPIO peripheral for STM32F3 family
|
||||
* @param GPIO_Pin: specifies the port bit to be written.
|
||||
* @param GPIOx where x can be (A..F) to select the GPIO peripheral for STM32F3 family
|
||||
* @param GPIO_Pin specifies the port bit to be written.
|
||||
* This parameter can be one of GPIO_PIN_x where x can be (0..15).
|
||||
* @param PinState: specifies the value to be written to the selected bit.
|
||||
* @param PinState specifies the value to be written to the selected bit.
|
||||
* This parameter can be one of the GPIO_PinState enum values:
|
||||
* @arg GPIO_PIN_RESET: to clear the port pin
|
||||
* @arg GPIO_PIN_SET: to set the port pin
|
||||
|
@ -446,8 +444,8 @@ void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState Pin
|
|||
|
||||
/**
|
||||
* @brief Toggle the specified GPIO pin.
|
||||
* @param GPIOx: where x can be (A..F) to select the GPIO peripheral for STM32F3 family
|
||||
* @param GPIO_Pin: specifies the pin to be toggled.
|
||||
* @param GPIOx where x can be (A..F) to select the GPIO peripheral for STM32F3 family
|
||||
* @param GPIO_Pin specifies the pin to be toggled.
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_GPIO_TogglePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
|
||||
|
@ -464,8 +462,8 @@ void HAL_GPIO_TogglePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
|
|||
* GPIOx_PUPDR, GPIOx_AFRL and GPIOx_AFRH.
|
||||
* @note The configuration of the locked GPIO pins can no longer be modified
|
||||
* until the next reset.
|
||||
* @param GPIOx: where x can be (A..F) to select the GPIO peripheral for STM32F3 family
|
||||
* @param GPIO_Pin: specifies the port bits to be locked.
|
||||
* @param GPIOx where x can be (A..F) to select the GPIO peripheral for STM32F3 family
|
||||
* @param GPIO_Pin specifies the port bits to be locked.
|
||||
* This parameter can be any combination of GPIO_Pin_x where x can be (0..15).
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -500,7 +498,7 @@ HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
|
|||
|
||||
/**
|
||||
* @brief Handle EXTI interrupt request.
|
||||
* @param GPIO_Pin: Specifies the port pin connected to corresponding EXTI line.
|
||||
* @param GPIO_Pin Specifies the port pin connected to corresponding EXTI line.
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin)
|
||||
|
@ -515,7 +513,7 @@ void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin)
|
|||
|
||||
/**
|
||||
* @brief EXTI line detection callback.
|
||||
* @param GPIO_Pin: Specifies the port pin connected to corresponding EXTI line.
|
||||
* @param GPIO_Pin Specifies the port pin connected to corresponding EXTI line.
|
||||
* @retval None
|
||||
*/
|
||||
__weak void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_i2c_ex.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief I2C Extended HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of I2C Extended peripheral:
|
||||
|
@ -116,7 +114,7 @@ HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t
|
|||
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
|
||||
assert_param(IS_I2C_ANALOG_FILTER(AnalogFilter));
|
||||
|
||||
if(hi2c->State == HAL_I2C_STATE_READY)
|
||||
if (hi2c->State == HAL_I2C_STATE_READY)
|
||||
{
|
||||
/* Process Locked */
|
||||
__HAL_LOCK(hi2c);
|
||||
|
@ -162,7 +160,7 @@ HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_
|
|||
assert_param(IS_I2C_ALL_INSTANCE(hi2c->Instance));
|
||||
assert_param(IS_I2C_DIGITAL_FILTER(DigitalFilter));
|
||||
|
||||
if(hi2c->State == HAL_I2C_STATE_READY)
|
||||
if (hi2c->State == HAL_I2C_STATE_READY)
|
||||
{
|
||||
/* Process Locked */
|
||||
__HAL_LOCK(hi2c);
|
||||
|
@ -205,12 +203,12 @@ HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_
|
|||
* the configuration information for the specified I2Cx peripheral.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_I2CEx_EnableWakeUp (I2C_HandleTypeDef *hi2c)
|
||||
HAL_StatusTypeDef HAL_I2CEx_EnableWakeUp(I2C_HandleTypeDef *hi2c)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_I2C_WAKEUP_FROMSTOP_INSTANCE(hi2c->Instance));
|
||||
|
||||
if(hi2c->State == HAL_I2C_STATE_READY)
|
||||
if (hi2c->State == HAL_I2C_STATE_READY)
|
||||
{
|
||||
/* Process Locked */
|
||||
__HAL_LOCK(hi2c);
|
||||
|
@ -244,12 +242,12 @@ HAL_StatusTypeDef HAL_I2CEx_EnableWakeUp (I2C_HandleTypeDef *hi2c)
|
|||
* the configuration information for the specified I2Cx peripheral.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_I2CEx_DisableWakeUp (I2C_HandleTypeDef *hi2c)
|
||||
HAL_StatusTypeDef HAL_I2CEx_DisableWakeUp(I2C_HandleTypeDef *hi2c)
|
||||
{
|
||||
/* Check the parameters */
|
||||
assert_param(IS_I2C_WAKEUP_FROMSTOP_INSTANCE(hi2c->Instance));
|
||||
|
||||
if(hi2c->State == HAL_I2C_STATE_READY)
|
||||
if (hi2c->State == HAL_I2C_STATE_READY)
|
||||
{
|
||||
/* Process Locked */
|
||||
__HAL_LOCK(hi2c);
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
******************************************************************************
|
||||
* @file stm32f3xx_hal_i2s.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.4.0
|
||||
* @date 16-December-2016
|
||||
* @brief I2S HAL module driver.
|
||||
* This file provides firmware functions to manage the following
|
||||
* functionalities of the Integrated Interchip Sound (I2S) peripheral:
|
||||
|
@ -343,13 +341,13 @@ HAL_StatusTypeDef HAL_I2S_DeInit(I2S_HandleTypeDef *hi2s)
|
|||
* @brief Transmit an amount of data in blocking mode
|
||||
* @param hi2s: pointer to a I2S_HandleTypeDef structure that contains
|
||||
* the configuration information for I2S module
|
||||
* @param pData: a 16-bit pointer to data buffer.
|
||||
* @param Size: number of data sample to be sent:
|
||||
* @param pData a 16-bit pointer to data buffer.
|
||||
* @param Size number of data sample to be sent:
|
||||
* @note When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S
|
||||
* configuration phase, the Size parameter means the number of 16-bit data length
|
||||
* in the transaction and when a 24-bit data frame or a 32-bit data frame is selected
|
||||
* the Size parameter means the number of 16-bit data length.
|
||||
* @param Timeout: Timeout duration
|
||||
* @param Timeout Timeout duration
|
||||
* @note The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization
|
||||
* between Master and Slave(example: audio streaming).
|
||||
* @retval HAL status
|
||||
|
@ -434,13 +432,13 @@ HAL_StatusTypeDef HAL_I2S_Transmit(I2S_HandleTypeDef *hi2s, uint16_t *pData, uin
|
|||
* @brief Receive an amount of data in blocking mode
|
||||
* @param hi2s: pointer to a I2S_HandleTypeDef structure that contains
|
||||
* the configuration information for I2S module
|
||||
* @param pData: a 16-bit pointer to data buffer.
|
||||
* @param Size: number of data sample to be sent:
|
||||
* @param pData a 16-bit pointer to data buffer.
|
||||
* @param Size number of data sample to be sent:
|
||||
* @note When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S
|
||||
* configuration phase, the Size parameter means the number of 16-bit data length
|
||||
* in the transaction and when a 24-bit data frame or a 32-bit data frame is selected
|
||||
* the Size parameter means the number of 16-bit data length.
|
||||
* @param Timeout: Timeout duration
|
||||
* @param Timeout Timeout duration
|
||||
* @note The I2S is kept enabled at the end of transaction to avoid the clock de-synchronization
|
||||
* between Master and Slave(example: audio streaming).
|
||||
* @note In I2S Master Receiver mode, just after enabling the peripheral the clock will be generate
|
||||
|
@ -537,8 +535,8 @@ HAL_StatusTypeDef HAL_I2S_Receive(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint
|
|||
* @brief Transmit an amount of data in non-blocking mode with Interrupt
|
||||
* @param hi2s: pointer to a I2S_HandleTypeDef structure that contains
|
||||
* the configuration information for I2S module
|
||||
* @param pData: a 16-bit pointer to data buffer.
|
||||
* @param Size: number of data sample to be sent:
|
||||
* @param pData a 16-bit pointer to data buffer.
|
||||
* @param Size number of data sample to be sent:
|
||||
* @note When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S
|
||||
* configuration phase, the Size parameter means the number of 16-bit data length
|
||||
* in the transaction and when a 24-bit data frame or a 32-bit data frame is selected
|
||||
|
@ -600,8 +598,8 @@ HAL_StatusTypeDef HAL_I2S_Transmit_IT(I2S_HandleTypeDef *hi2s, uint16_t *pData,
|
|||
* @brief Receive an amount of data in non-blocking mode with Interrupt
|
||||
* @param hi2s: pointer to a I2S_HandleTypeDef structure that contains
|
||||
* the configuration information for I2S module
|
||||
* @param pData: a 16-bit pointer to the Receive data buffer.
|
||||
* @param Size: number of data sample to be sent:
|
||||
* @param pData a 16-bit pointer to the Receive data buffer.
|
||||
* @param Size number of data sample to be sent:
|
||||
* @note When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S
|
||||
* configuration phase, the Size parameter means the number of 16-bit data length
|
||||
* in the transaction and when a 24-bit data frame or a 32-bit data frame is selected
|
||||
|
@ -664,8 +662,8 @@ HAL_StatusTypeDef HAL_I2S_Receive_IT(I2S_HandleTypeDef *hi2s, uint16_t *pData, u
|
|||
* @brief Transmit an amount of data in non-blocking mode with DMA
|
||||
* @param hi2s: pointer to a I2S_HandleTypeDef structure that contains
|
||||
* the configuration information for I2S module
|
||||
* @param pData: a 16-bit pointer to the Transmit data buffer.
|
||||
* @param Size: number of data sample to be sent:
|
||||
* @param pData a 16-bit pointer to the Transmit data buffer.
|
||||
* @param Size number of data sample to be sent:
|
||||
* @note When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S
|
||||
* configuration phase, the Size parameter means the number of 16-bit data length
|
||||
* in the transaction and when a 24-bit data frame or a 32-bit data frame is selected
|
||||
|
@ -742,8 +740,8 @@ HAL_StatusTypeDef HAL_I2S_Transmit_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pData,
|
|||
* @brief Receive an amount of data in non-blocking mode with DMA
|
||||
* @param hi2s: pointer to a I2S_HandleTypeDef structure that contains
|
||||
* the configuration information for I2S module
|
||||
* @param pData: a 16-bit pointer to the Receive data buffer.
|
||||
* @param Size: number of data sample to be sent:
|
||||
* @param pData a 16-bit pointer to the Receive data buffer.
|
||||
* @param Size number of data sample to be sent:
|
||||
* @note When a 16-bit data frame or a 16-bit data frame extended is selected during the I2S
|
||||
* configuration phase, the Size parameter means the number of 16-bit data length
|
||||
* in the transaction and when a 24-bit data frame or a 32-bit data frame is selected
|
||||
|
@ -1133,7 +1131,7 @@ uint32_t HAL_I2S_GetError(I2S_HandleTypeDef *hi2s)
|
|||
*/
|
||||
/**
|
||||
* @brief DMA I2S transmit process complete callback
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA module.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -1154,7 +1152,7 @@ static void I2S_DMATxCplt(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief DMA I2S transmit process half complete callback
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA module.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -1167,7 +1165,7 @@ static void I2S_DMATxHalfCplt(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief DMA I2S receive process complete callback
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA module.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -1187,7 +1185,7 @@ static void I2S_DMARxCplt(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief DMA I2S receive process half complete callback
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA module.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -1200,7 +1198,7 @@ static void I2S_DMARxHalfCplt(DMA_HandleTypeDef *hdma)
|
|||
|
||||
/**
|
||||
* @brief DMA I2S communication error callback
|
||||
* @param hdma: pointer to a DMA_HandleTypeDef structure that contains
|
||||
* @param hdma pointer to a DMA_HandleTypeDef structure that contains
|
||||
* the configuration information for the specified DMA module.
|
||||
* @retval None
|
||||
*/
|
||||
|
@ -1267,9 +1265,9 @@ static void I2S_Receive_IT(I2S_HandleTypeDef *hi2s)
|
|||
* @brief This function handles I2S Communication Timeout.
|
||||
* @param hi2s: pointer to a I2S_HandleTypeDef structure that contains
|
||||
* the configuration information for I2S module
|
||||
* @param Flag: Flag checked
|
||||
* @param State: Value of the flag expected
|
||||
* @param Timeout: Duration of the timeout
|
||||
* @param Flag Flag checked
|
||||
* @param State Value of the flag expected
|
||||
* @param Timeout Duration of the timeout
|
||||
* @retval HAL status
|
||||
*/
|
||||
static HAL_StatusTypeDef I2S_WaitFlagStateUntilTimeout(I2S_HandleTypeDef *hi2s, uint32_t Flag, uint32_t State, uint32_t Timeout)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue