diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/Legacy/stm32_hal_legacy.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/Legacy/stm32_hal_legacy.h
new file mode 100644
index 0000000..57e74f1
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/Legacy/stm32_hal_legacy.h
@@ -0,0 +1,2403 @@
+/**

+  ******************************************************************************

+  * @file    stm32_hal_legacy.h

+  * @author  MCD Application Team

+  * @version V1.0.0RC1

+  * @date    24-March-2015

+  * @brief   This file contains aliases definition for the STM32Cube HAL constants 

+  *          macros and functions maintained for legacy purpose.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32_HAL_LEGACY

+#define __STM32_HAL_LEGACY

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+/* Exported types ------------------------------------------------------------*/

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup HAL_AES_Aliased_Defines HAL CRYP Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define AES_FLAG_RDERR                  CRYP_FLAG_RDERR

+#define AES_FLAG_WRERR                  CRYP_FLAG_WRERR

+#define AES_CLEARFLAG_CCF               CRYP_CLEARFLAG_CCF

+#define AES_CLEARFLAG_RDERR             CRYP_CLEARFLAG_RDERR

+#define AES_CLEARFLAG_WRERR             CRYP_CLEARFLAG_WRERR

+

+/**

+  * @}

+  */

+  

+/** @defgroup HAL_ADC_Aliased_Defines HAL ADC Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define ADC_RESOLUTION12b               ADC_RESOLUTION_12B

+#define ADC_RESOLUTION10b               ADC_RESOLUTION_10B

+#define ADC_RESOLUTION8b                ADC_RESOLUTION_8B

+#define ADC_RESOLUTION6b                ADC_RESOLUTION_6B

+#define OVR_DATA_OVERWRITTEN            ADC_OVR_DATA_OVERWRITTEN

+#define OVR_DATA_PRESERVED              ADC_OVR_DATA_PRESERVED

+#define EOC_SINGLE_CONV                 ADC_EOC_SINGLE_CONV

+#define EOC_SEQ_CONV                    ADC_EOC_SEQ_CONV

+#define EOC_SINGLE_SEQ_CONV             ADC_EOC_SINGLE_SEQ_CONV

+#define REGULAR_GROUP                   ADC_REGULAR_GROUP

+#define INJECTED_GROUP                  ADC_INJECTED_GROUP

+#define REGULAR_INJECTED_GROUP          ADC_REGULAR_INJECTED_GROUP

+#define AWD_EVENT                       ADC_AWD_EVENT

+#define AWD1_EVENT                      ADC_AWD1_EVENT

+#define AWD2_EVENT                      ADC_AWD2_EVENT

+#define AWD3_EVENT                      ADC_AWD3_EVENT

+#define OVR_EVENT                       ADC_OVR_EVENT

+#define JQOVF_EVENT                     ADC_JQOVF_EVENT

+#define ALL_CHANNELS                    ADC_ALL_CHANNELS

+#define REGULAR_CHANNELS                ADC_REGULAR_CHANNELS

+#define INJECTED_CHANNELS               ADC_INJECTED_CHANNELS

+#define SYSCFG_FLAG_SENSOR_ADC          ADC_FLAG_SENSOR

+#define SYSCFG_FLAG_VREF_ADC            ADC_FLAG_VREFINT

+#define ADC_CLOCKPRESCALER_PCLK_DIV1    ADC_CLOCK_SYNC_PCLK_DIV1

+#define ADC_EXTERNALTRIG0_T6_TRGO       ADC_EXTERNALTRIGCONV_T6_TRGO 

+#define ADC_EXTERNALTRIG1_T21_CC2       ADC_EXTERNALTRIGCONV_T21_CC2 

+#define ADC_EXTERNALTRIG2_T2_TRGO       ADC_EXTERNALTRIGCONV_T2_TRGO 

+#define ADC_EXTERNALTRIG3_T2_CC4        ADC_EXTERNALTRIGCONV_T2_CC4  

+#define ADC_EXTERNALTRIG4_T22_TRGO      ADC_EXTERNALTRIGCONV_T22_TRGO

+#define ADC_EXTERNALTRIG7_EXT_IT11      ADC_EXTERNALTRIGCONV_EXT_IT11

+#define ADC_CLOCK_ASYNC                 ADC_CLOCK_ASYNC_DIV1

+#define ADC_EXTERNALTRIG_EDGE_NONE      ADC_EXTERNALTRIGCONVEDGE_NONE

+#define ADC_EXTERNALTRIG_EDGE_RISING    ADC_EXTERNALTRIGCONVEDGE_RISING

+#define ADC_EXTERNALTRIG_EDGE_FALLING   ADC_EXTERNALTRIGCONVEDGE_FALLING

+#define ADC_EXTERNALTRIG_EDGE_RISINGFALLING ADC_EXTERNALTRIGCONVEDGE_RISINGFALLING 

+/**

+  * @}

+  */

+  

+/** @defgroup HAL_CEC_Aliased_Defines HAL CEC Aliased Defines maintained for legacy purpose

+  * @{

+  */ 

+  

+#define __HAL_CEC_GET_IT __HAL_CEC_GET_FLAG 

+

+/**

+  * @}

+  */   

+   

+/** @defgroup HAL_COMP_Aliased_Defines HAL COMP Aliased Defines maintained for legacy purpose

+  * @{

+  */

+  

+#define COMP_WINDOWMODE_DISABLED    COMP_WINDOWMODE_DISABLE

+#define COMP_WINDOWMODE_ENABLED     COMP_WINDOWMODE_ENABLE

+#define COMP_EXTI_LINE_COMP1_EVENT  COMP_EXTI_LINE_COMP1

+#define COMP_EXTI_LINE_COMP2_EVENT  COMP_EXTI_LINE_COMP2

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_CRC_Aliased_Defines HAL CRC Aliased Defines maintained for legacy purpose

+  * @{

+  */

+  

+#define CRC_OUTPUTDATA_INVERSION_DISABLED    CRC_OUTPUTDATA_INVERSION_DISABLE

+#define CRC_OUTPUTDATA_INVERSION_ENABLED     CRC_OUTPUTDATA_INVERSION_ENABLE

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_DAC_Aliased_Defines HAL DAC Aliased Defines maintained for legacy purpose

+  * @{

+  */

+

+#define DAC1_CHANNEL_1                                  DAC_CHANNEL_1

+#define DAC1_CHANNEL_2                                  DAC_CHANNEL_2

+#define DAC2_CHANNEL_1                                  DAC_CHANNEL_1

+#define DAC_WAVE_NONE                                   ((uint32_t)0x00000000)

+#define DAC_WAVE_NOISE                                  ((uint32_t)DAC_CR_WAVE1_0)

+#define DAC_WAVE_TRIANGLE                               ((uint32_t)DAC_CR_WAVE1_1)                           

+#define DAC_WAVEGENERATION_NONE                         DAC_WAVE_NONE

+#define DAC_WAVEGENERATION_NOISE                        DAC_WAVE_NOISE

+#define DAC_WAVEGENERATION_TRIANGLE                     DAC_WAVE_TRIANGLE

+

+/**

+  * @}

+  */

+

+

+/** @defgroup HAL_FLASH_Aliased_Defines HAL FLASH Aliased Defines maintained for legacy purpose

+  * @{

+  */

+  

+#define TYPEPROGRAM_BYTE              FLASH_TYPEPROGRAM_BYTE

+#define TYPEPROGRAM_HALFWORD          FLASH_TYPEPROGRAM_HALFWORD

+#define TYPEPROGRAM_WORD              FLASH_TYPEPROGRAM_WORD

+#define TYPEPROGRAM_DOUBLEWORD        FLASH_TYPEPROGRAM_DOUBLEWORD

+#define TYPEERASE_SECTORS             FLASH_TYPEERASE_SECTORS

+#define TYPEERASE_PAGES               FLASH_TYPEERASE_PAGES

+#define TYPEERASE_PAGEERASE           FLASH_TYPEERASE_PAGES

+#define TYPEERASE_MASSERASE           FLASH_TYPEERASE_MASSERASE

+#define WRPSTATE_DISABLE              OB_WRPSTATE_DISABLE

+#define WRPSTATE_ENABLE               OB_WRPSTATE_ENABLE

+#define HAL_FLASH_TIMEOUT_VALUE       FLASH_TIMEOUT_VALUE

+#define OBEX_PCROP                    OPTIONBYTE_PCROP

+#define OBEX_BOOTCONFIG               OPTIONBYTE_BOOTCONFIG

+#define PCROPSTATE_DISABLE            OB_PCROP_STATE_DISABLE

+#define PCROPSTATE_ENABLE             OB_PCROP_STATE_ENABLE

+#define TYPEERASEDATA_BYTE            FLASH_TYPEERASEDATA_BYTE

+#define TYPEERASEDATA_HALFWORD        FLASH_TYPEERASEDATA_HALFWORD

+#define TYPEERASEDATA_WORD            FLASH_TYPEERASEDATA_WORD

+#define TYPEPROGRAMDATA_BYTE          FLASH_TYPEPROGRAMDATA_BYTE

+#define TYPEPROGRAMDATA_HALFWORD      FLASH_TYPEPROGRAMDATA_HALFWORD

+#define TYPEPROGRAMDATA_WORD          FLASH_TYPEPROGRAMDATA_WORD

+#define TYPEPROGRAMDATA_FASTBYTE      FLASH_TYPEPROGRAMDATA_FASTBYTE

+#define TYPEPROGRAMDATA_FASTHALFWORD  FLASH_TYPEPROGRAMDATA_FASTHALFWORD

+#define TYPEPROGRAMDATA_FASTWORD      FLASH_TYPEPROGRAMDATA_FASTWORD

+#define PAGESIZE                      FLASH_PAGE_SIZE

+#define TYPEPROGRAM_FASTBYTE          FLASH_TYPEPROGRAM_BYTE

+#define TYPEPROGRAM_FASTHALFWORD      FLASH_TYPEPROGRAM_HALFWORD

+#define TYPEPROGRAM_FASTWORD          FLASH_TYPEPROGRAM_WORD

+#define VOLTAGE_RANGE_1               FLASH_VOLTAGE_RANGE_1

+#define VOLTAGE_RANGE_2               FLASH_VOLTAGE_RANGE_2

+#define VOLTAGE_RANGE_3               FLASH_VOLTAGE_RANGE_3

+#define VOLTAGE_RANGE_4               FLASH_VOLTAGE_RANGE_4

+#define TYPEPROGRAM_FAST              FLASH_TYPEPROGRAM_FAST

+#define TYPEPROGRAM_FAST_AND_LAST     FLASH_TYPEPROGRAM_FAST_AND_LAST

+#define WRPAREA_BANK1_AREAA           OB_WRPAREA_BANK1_AREAA

+#define WRPAREA_BANK1_AREAB           OB_WRPAREA_BANK1_AREAB

+#define WRPAREA_BANK2_AREAA           OB_WRPAREA_BANK2_AREAA

+#define WRPAREA_BANK2_AREAB           OB_WRPAREA_BANK2_AREAB

+#define IWDG_STDBY_FREEZE             OB_IWDG_STDBY_FREEZE

+#define IWDG_STDBY_ACTIVE             OB_IWDG_STDBY_RUN

+#define IWDG_STOP_FREEZE              OB_IWDG_STOP_FREEZE

+#define IWDG_STOP_ACTIVE              OB_IWDG_STOP_RUN

+#define IS_NBSECTORS                  IS_FLASH_NBSECTORS

+#define FLASH_ERROR_NONE              HAL_FLASH_ERROR_NONE

+#define FLASH_ERROR_RD                HAL_FLASH_ERROR_RD

+#define FLASH_ERROR_PG                HAL_FLASH_ERROR_PROG

+#define FLASH_ERROR_PGP               HAL_FLASH_ERROR_PGS

+#define FLASH_ERROR_WRP               HAL_FLASH_ERROR_WRP

+#define FLASH_ERROR_OPTV              HAL_FLASH_ERROR_OPTV

+#define FLASH_ERROR_OPTVUSR           HAL_FLASH_ERROR_OPTVUSR

+#define FLASH_ERROR_PROG              HAL_FLASH_ERROR_PROG

+#define FLASH_ERROR_OP                HAL_FLASH_ERROR_OPERATION

+#define FLASH_ERROR_PGA               HAL_FLASH_ERROR_PGA

+#define FLASH_ERROR_SIZE              HAL_FLASH_ERROR_SIZE

+#define FLASH_ERROR_SIZ               HAL_FLASH_ERROR_SIZE

+#define FLASH_ERROR_PGS               HAL_FLASH_ERROR_PGS

+#define FLASH_ERROR_MIS               HAL_FLASH_ERROR_MIS

+#define FLASH_ERROR_FAST              HAL_FLASH_ERROR_FAST

+#define FLASH_ERROR_FWWERR            HAL_FLASH_ERROR_FWWERR

+#define FLASH_ERROR_NOTZERO           HAL_FLASH_ERROR_NOTZERO

+#define FLASH_ERROR_OPERATION         HAL_FLASH_ERROR_OPERATION

+#define FLASH_ERROR_ERS               HAL_FLASH_ERROR_ERS

+

+/**

+  * @}

+  */

+  

+/** @defgroup HAL_SYSCFG_Aliased_Defines HAL SYSCFG Aliased Defines maintained for legacy purpose

+  * @{

+  */

+  

+#define SYSCFG_FASTMODEPLUS_I2C_PB6    I2C_FASTMODEPLUS_PB6

+#define SYSCFG_FASTMODEPLUS_I2C_PB7    I2C_FASTMODEPLUS_PB7

+#define SYSCFG_FASTMODEPLUS_I2C_PB8    I2C_FASTMODEPLUS_PB8

+#define SYSCFG_FASTMODEPLUS_I2C_PB9    I2C_FASTMODEPLUS_PB9

+#define SYSCFG_FASTMODEPLUS_I2C1       I2C_FASTMODEPLUS_I2C1

+#define SYSCFG_FASTMODEPLUS_I2C2       I2C_FASTMODEPLUS_I2C2

+#define SYSCFG_FASTMODEPLUS_I2C3       I2C_FASTMODEPLUS_I2C3

+

+/**

+  * @}

+  */

+  

+

+/** @defgroup LL_FMC_Aliased_Defines LL FMC Aliased Defines maintained for compatibility purpose

+  * @{

+  */

+#if defined(STM32L4) || defined(STM32F7)

+#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

+#define FMC_NAND_PCC_MEM_BUS_WIDTH_16           FMC_NAND_MEM_BUS_WIDTH_16

+#else

+#define FMC_NAND_WAIT_FEATURE_DISABLE           FMC_NAND_PCC_WAIT_FEATURE_DISABLE

+#define FMC_NAND_WAIT_FEATURE_ENABLE            FMC_NAND_PCC_WAIT_FEATURE_ENABLE

+#define FMC_NAND_MEM_BUS_WIDTH_8                FMC_NAND_PCC_MEM_BUS_WIDTH_8

+#define FMC_NAND_MEM_BUS_WIDTH_16               FMC_NAND_PCC_MEM_BUS_WIDTH_16

+#endif

+/**

+  * @}

+  */

+

+/** @defgroup LL_FSMC_Aliased_Defines LL FSMC Aliased Defines maintained for legacy purpose

+  * @{

+  */

+  

+#define FSMC_NORSRAM_TYPEDEF                      FSMC_NORSRAM_TypeDef

+#define FSMC_NORSRAM_EXTENDED_TYPEDEF             FSMC_NORSRAM_EXTENDED_TypeDef

+/**

+  * @}

+  */

+

+/** @defgroup HAL_GPIO_Aliased_Macros HAL GPIO Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define GET_GPIO_SOURCE                           GPIO_GET_INDEX

+#define GET_GPIO_INDEX                            GPIO_GET_INDEX

+

+#if defined(STM32F4)

+#define GPIO_AF12_SDMMC                           GPIO_AF12_SDIO

+#endif

+

+#if defined(STM32F7)

+#define GPIO_AF12_SDIO                            GPIO_AF12_SDMMC

+#endif

+

+/**

+  * @}

+  */

+

+

+/** @defgroup HAL_I2C_Aliased_Defines HAL I2C Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define I2C_DUALADDRESS_DISABLED                I2C_DUALADDRESS_DISABLE

+#define I2C_DUALADDRESS_ENABLED                 I2C_DUALADDRESS_ENABLE

+#define I2C_GENERALCALL_DISABLED                I2C_GENERALCALL_DISABLE

+#define I2C_GENERALCALL_ENABLED                 I2C_GENERALCALL_ENABLE

+#define I2C_NOSTRETCH_DISABLED                  I2C_NOSTRETCH_DISABLE

+#define I2C_NOSTRETCH_ENABLED                   I2C_NOSTRETCH_ENABLE

+#define I2C_ANALOGFILTER_ENABLED                I2C_ANALOGFILTER_ENABLE

+#define I2C_ANALOGFILTER_DISABLED               I2C_ANALOGFILTER_DISABLE

+/**

+  * @}

+  */

+

+/** @defgroup HAL_IRDA_Aliased_Defines HAL IRDA Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define IRDA_ONE_BIT_SAMPLE_DISABLED            IRDA_ONE_BIT_SAMPLE_DISABLE

+#define IRDA_ONE_BIT_SAMPLE_ENABLED             IRDA_ONE_BIT_SAMPLE_ENABLE

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_IWDG_Aliased_Defines HAL IWDG Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define KR_KEY_RELOAD                   IWDG_KEY_RELOAD

+#define KR_KEY_ENABLE                   IWDG_KEY_ENABLE

+#define KR_KEY_EWA                      IWDG_KEY_WRITE_ACCESS_ENABLE

+#define KR_KEY_DWA                      IWDG_KEY_WRITE_ACCESS_DISABLE

+/**

+  * @}

+  */

+

+/** @defgroup HAL_LPTIM_Aliased_Defines HAL LPTIM Aliased Defines maintained for legacy purpose

+  * @{

+  */

+

+#define LPTIM_CLOCKSAMPLETIME_DIRECTTRANSISTION LPTIM_CLOCKSAMPLETIME_DIRECTTRANSITION

+#define LPTIM_CLOCKSAMPLETIME_2TRANSISTIONS     LPTIM_CLOCKSAMPLETIME_2TRANSITIONS

+#define LPTIM_CLOCKSAMPLETIME_4TRANSISTIONS     LPTIM_CLOCKSAMPLETIME_4TRANSITIONS

+#define LPTIM_CLOCKSAMPLETIME_8TRANSISTIONS     LPTIM_CLOCKSAMPLETIME_8TRANSITIONS

+

+#define LPTIM_CLOCKPOLARITY_RISINGEDGE          LPTIM_CLOCKPOLARITY_RISING

+#define LPTIM_CLOCKPOLARITY_FALLINGEDGE         LPTIM_CLOCKPOLARITY_FALLING

+#define LPTIM_CLOCKPOLARITY_BOTHEDGES           LPTIM_CLOCKPOLARITY_RISING_FALLING

+

+#define LPTIM_TRIGSAMPLETIME_2TRANSITION        LPTIM_TRIGSAMPLETIME_2TRANSISTIONS

+#define LPTIM_TRIGSAMPLETIME_4TRANSITION        LPTIM_TRIGSAMPLETIME_4TRANSISTIONS

+#define LPTIM_TRIGSAMPLETIME_8TRANSITION        LPTIM_TRIGSAMPLETIME_8TRANSISTIONS

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_NAND_Aliased_Defines HAL NAND Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define NAND_AddressTypedef             NAND_AddressTypeDef

+

+#define __ARRAY_ADDRESS                 ARRAY_ADDRESS

+#define __ADDR_1st_CYCLE                ADDR_1ST_CYCLE

+#define __ADDR_2nd_CYCLE                ADDR_2ND_CYCLE

+#define __ADDR_3rd_CYCLE                ADDR_3RD_CYCLE

+#define __ADDR_4th_CYCLE                ADDR_4TH_CYCLE

+/**

+  * @}

+  */

+   

+/** @defgroup HAL_NOR_Aliased_Defines HAL NOR Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define NOR_StatusTypedef              HAL_NOR_StatusTypeDef

+#define NOR_SUCCESS                    HAL_NOR_STATUS_SUCCESS

+#define NOR_ONGOING                    HAL_NOR_STATUS_ONGOING

+#define NOR_ERROR                      HAL_NOR_STATUS_ERROR

+#define NOR_TIMEOUT                    HAL_NOR_STATUS_TIMEOUT

+

+#define __NOR_WRITE                    NOR_WRITE

+#define __NOR_ADDR_SHIFT               NOR_ADDR_SHIFT

+/**

+  * @}

+  */

+

+/** @defgroup HAL_OPAMP_Aliased_Defines HAL OPAMP Aliased Defines maintained for legacy purpose

+  * @{

+  */

+

+#define OPAMP_NONINVERTINGINPUT_VP0           OPAMP_NONINVERTINGINPUT_IO0

+#define OPAMP_NONINVERTINGINPUT_VP1           OPAMP_NONINVERTINGINPUT_IO1

+#define OPAMP_NONINVERTINGINPUT_VP2           OPAMP_NONINVERTINGINPUT_IO2

+#define OPAMP_NONINVERTINGINPUT_VP3           OPAMP_NONINVERTINGINPUT_IO3

+                                              

+#define OPAMP_SEC_NONINVERTINGINPUT_VP0       OPAMP_SEC_NONINVERTINGINPUT_IO0

+#define OPAMP_SEC_NONINVERTINGINPUT_VP1       OPAMP_SEC_NONINVERTINGINPUT_IO1

+#define OPAMP_SEC_NONINVERTINGINPUT_VP2       OPAMP_SEC_NONINVERTINGINPUT_IO2

+#define OPAMP_SEC_NONINVERTINGINPUT_VP3       OPAMP_SEC_NONINVERTINGINPUT_IO3   

+

+#define OPAMP_INVERTINGINPUT_VM0              OPAMP_INVERTINGINPUT_IO0

+#define OPAMP_INVERTINGINPUT_VM1              OPAMP_INVERTINGINPUT_IO1

+

+#define IOPAMP_INVERTINGINPUT_VM0             OPAMP_INVERTINGINPUT_IO0

+#define IOPAMP_INVERTINGINPUT_VM1             OPAMP_INVERTINGINPUT_IO1

+

+#define OPAMP_SEC_INVERTINGINPUT_VM0          OPAMP_SEC_INVERTINGINPUT_IO0

+#define OPAMP_SEC_INVERTINGINPUT_VM1          OPAMP_SEC_INVERTINGINPUT_IO1    

+

+#define OPAMP_INVERTINGINPUT_VINM             OPAMP_SEC_INVERTINGINPUT_IO1

+                                                                      

+#define OPAMP_PGACONNECT_NO                   OPAMP_PGA_CONNECT_INVERTINGINPUT_NO             

+#define OPAMP_PGACONNECT_VM0                  OPAMP_PGA_CONNECT_INVERTINGINPUT_IO0            

+#define OPAMP_PGACONNECT_VM1                  OPAMP_PGA_CONNECT_INVERTINGINPUT_IO1          

+                                                        

+/**

+  * @}

+  */

+

+/** @defgroup HAL_I2S_Aliased_Defines HAL I2S Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define I2S_STANDARD_PHILLIPS      I2S_STANDARD_PHILIPS

+/**

+  * @}

+  */

+

+/** @defgroup HAL_PCCARD_Aliased_Defines HAL PCCARD Aliased Defines maintained for legacy purpose

+  * @{

+  */

+

+/* Compact Flash-ATA registers description */

+#define CF_DATA                       ATA_DATA                

+#define CF_SECTOR_COUNT               ATA_SECTOR_COUNT        

+#define CF_SECTOR_NUMBER              ATA_SECTOR_NUMBER       

+#define CF_CYLINDER_LOW               ATA_CYLINDER_LOW        

+#define CF_CYLINDER_HIGH              ATA_CYLINDER_HIGH       

+#define CF_CARD_HEAD                  ATA_CARD_HEAD           

+#define CF_STATUS_CMD                 ATA_STATUS_CMD          

+#define CF_STATUS_CMD_ALTERNATE       ATA_STATUS_CMD_ALTERNATE

+#define CF_COMMON_DATA_AREA           ATA_COMMON_DATA_AREA    

+

+/* Compact Flash-ATA commands */

+#define CF_READ_SECTOR_CMD            ATA_READ_SECTOR_CMD 

+#define CF_WRITE_SECTOR_CMD           ATA_WRITE_SECTOR_CMD

+#define CF_ERASE_SECTOR_CMD           ATA_ERASE_SECTOR_CMD

+#define CF_IDENTIFY_CMD               ATA_IDENTIFY_CMD

+

+#define PCCARD_StatusTypedef          HAL_PCCARD_StatusTypeDef

+#define PCCARD_SUCCESS                HAL_PCCARD_STATUS_SUCCESS

+#define PCCARD_ONGOING                HAL_PCCARD_STATUS_ONGOING

+#define PCCARD_ERROR                  HAL_PCCARD_STATUS_ERROR

+#define PCCARD_TIMEOUT                HAL_PCCARD_STATUS_TIMEOUT

+/**

+  * @}

+  */

+  

+/** @defgroup HAL_RTC_Aliased_Defines HAL RTC Aliased Defines maintained for legacy purpose

+  * @{

+  */

+  

+#define FORMAT_BIN                  RTC_FORMAT_BIN

+#define FORMAT_BCD                  RTC_FORMAT_BCD

+

+#define RTC_ALARMSUBSECONDMASK_None     RTC_ALARMSUBSECONDMASK_NONE

+#define RTC_TAMPERERASEBACKUP_ENABLED   RTC_TAMPER_ERASE_BACKUP_ENABLE

+#define RTC_TAMPERERASEBACKUP_DISABLED  RTC_TAMPER_ERASE_BACKUP_DISABLE

+#define RTC_TAMPERMASK_FLAG_DISABLED    RTC_TAMPERMASK_FLAG_DISABLE

+#define RTC_TAMPERMASK_FLAG_ENABLED     RTC_TAMPERMASK_FLAG_ENABLE

+

+#define RTC_MASKTAMPERFLAG_DISABLED    RTC_TAMPERMASK_FLAG_DISABLE 

+#define RTC_MASKTAMPERFLAG_ENABLED      RTC_TAMPERMASK_FLAG_ENABLE 

+#define RTC_TAMPERERASEBACKUP_ENABLED  RTC_TAMPER_ERASE_BACKUP_ENABLE

+#define RTC_TAMPERERASEBACKUP_DISABLED   RTC_TAMPER_ERASE_BACKUP_DISABLE 

+#define RTC_MASKTAMPERFLAG_DISABLED   RTC_TAMPERMASK_FLAG_DISABLE 

+#define RTC_MASKTAMPERFLAG_ENABLED      RTC_TAMPERMASK_FLAG_ENABLE

+#define RTC_TAMPER1_2_INTERRUPT          RTC_ALL_TAMPER_INTERRUPT 

+#define RTC_TAMPER1_2_3_INTERRUPT     RTC_ALL_TAMPER_INTERRUPT 

+

+/**

+  * @}

+  */

+

+  

+/** @defgroup HAL_SMARTCARD_Aliased_Defines HAL SMARTCARD Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define SMARTCARD_NACK_ENABLED                  SMARTCARD_NACK_ENABLE

+#define SMARTCARD_NACK_DISABLED                 SMARTCARD_NACK_DISABLE

+

+#define SMARTCARD_ONEBIT_SAMPLING_DISABLED      SMARTCARD_ONE_BIT_SAMPLE_DISABLE

+#define SMARTCARD_ONEBIT_SAMPLING_ENABLED       SMARTCARD_ONE_BIT_SAMPLE_ENABLE

+#define SMARTCARD_ONEBIT_SAMPLING_DISABLE       SMARTCARD_ONE_BIT_SAMPLE_DISABLE

+#define SMARTCARD_ONEBIT_SAMPLING_ENABLE        SMARTCARD_ONE_BIT_SAMPLE_ENABLE

+

+#define SMARTCARD_TIMEOUT_DISABLED              SMARTCARD_TIMEOUT_DISABLE

+#define SMARTCARD_TIMEOUT_ENABLED               SMARTCARD_TIMEOUT_ENABLE

+

+#define SMARTCARD_LASTBIT_DISABLED              SMARTCARD_LASTBIT_DISABLE

+#define SMARTCARD_LASTBIT_ENABLED               SMARTCARD_LASTBIT_ENABLE

+/**

+  * @}

+  */

+

+  

+  /** @defgroup HAL_SMBUS_Aliased_Defines HAL SMBUS Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define SMBUS_DUALADDRESS_DISABLED      SMBUS_DUALADDRESS_DISABLE

+#define SMBUS_DUALADDRESS_ENABLED       SMBUS_DUALADDRESS_ENABLE

+#define SMBUS_GENERALCALL_DISABLED      SMBUS_GENERALCALL_DISABLE

+#define SMBUS_GENERALCALL_ENABLED       SMBUS_GENERALCALL_ENABLE

+#define SMBUS_NOSTRETCH_DISABLED        SMBUS_NOSTRETCH_DISABLE

+#define SMBUS_NOSTRETCH_ENABLED         SMBUS_NOSTRETCH_ENABLE

+#define SMBUS_ANALOGFILTER_ENABLED      SMBUS_ANALOGFILTER_ENABLE

+#define SMBUS_ANALOGFILTER_DISABLED     SMBUS_ANALOGFILTER_DISABLE

+#define HAL_SMBUS_STATE_SLAVE_LISTEN    HAL_SMBUS_STATE_LISTEN

+/**

+  * @}

+  */

+  

+  /** @defgroup HAL_SPI_Aliased_Defines HAL SPI Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define SPI_TIMODE_DISABLED             SPI_TIMODE_DISABLE

+#define SPI_TIMODE_ENABLED              SPI_TIMODE_ENABLE

+

+#define SPI_CRCCALCULATION_DISABLED     SPI_CRCCALCULATION_DISABLE

+#define SPI_CRCCALCULATION_ENABLED      SPI_CRCCALCULATION_ENABLE

+

+#define SPI_NSS_PULSE_DISABLED          SPI_NSS_PULSE_DISABLE

+#define SPI_NSS_PULSE_ENABLED           SPI_NSS_PULSE_ENABLE

+

+/**

+  * @}

+  */

+  

+/** @defgroup HAL_TIM_Aliased_Defines HAL TIM Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define CCER_CCxE_MASK                   TIM_CCER_CCxE_MASK

+#define CCER_CCxNE_MASK                  TIM_CCER_CCxNE_MASK

+  

+#define TIM_DMABase_CR1                  TIM_DMABASE_CR1

+#define TIM_DMABase_CR2                  TIM_DMABASE_CR2

+#define TIM_DMABase_SMCR                 TIM_DMABASE_SMCR

+#define TIM_DMABase_DIER                 TIM_DMABASE_DIER

+#define TIM_DMABase_SR                   TIM_DMABASE_SR

+#define TIM_DMABase_EGR                  TIM_DMABASE_EGR

+#define TIM_DMABase_CCMR1                TIM_DMABASE_CCMR1

+#define TIM_DMABase_CCMR2                TIM_DMABASE_CCMR2

+#define TIM_DMABase_CCER                 TIM_DMABASE_CCER

+#define TIM_DMABase_CNT                  TIM_DMABASE_CNT

+#define TIM_DMABase_PSC                  TIM_DMABASE_PSC

+#define TIM_DMABase_ARR                  TIM_DMABASE_ARR

+#define TIM_DMABase_RCR                  TIM_DMABASE_RCR

+#define TIM_DMABase_CCR1                 TIM_DMABASE_CCR1

+#define TIM_DMABase_CCR2                 TIM_DMABASE_CCR2

+#define TIM_DMABase_CCR3                 TIM_DMABASE_CCR3

+#define TIM_DMABase_CCR4                 TIM_DMABASE_CCR4

+#define TIM_DMABase_BDTR                 TIM_DMABASE_BDTR

+#define TIM_DMABase_DCR                  TIM_DMABASE_DCR

+#define TIM_DMABase_DMAR                 TIM_DMABASE_DMAR

+#define TIM_DMABase_OR1                  TIM_DMABASE_OR1

+#define TIM_DMABase_CCMR3                TIM_DMABASE_CCMR3

+#define TIM_DMABase_CCR5                 TIM_DMABASE_CCR5

+#define TIM_DMABase_CCR6                 TIM_DMABASE_CCR6

+#define TIM_DMABase_OR2                  TIM_DMABASE_OR2

+#define TIM_DMABase_OR3                  TIM_DMABASE_OR3

+#define TIM_DMABase_OR                   TIM_DMABASE_OR

+

+#define TIM_EventSource_Update           TIM_EVENTSOURCE_UPDATE

+#define TIM_EventSource_CC1              TIM_EVENTSOURCE_CC1

+#define TIM_EventSource_CC2              TIM_EVENTSOURCE_CC2

+#define TIM_EventSource_CC3              TIM_EVENTSOURCE_CC3

+#define TIM_EventSource_CC4              TIM_EVENTSOURCE_CC4

+#define TIM_EventSource_COM              TIM_EVENTSOURCE_COM

+#define TIM_EventSource_Trigger          TIM_EVENTSOURCE_TRIGGER

+#define TIM_EventSource_Break            TIM_EVENTSOURCE_BREAK

+#define TIM_EventSource_Break2           TIM_EVENTSOURCE_BREAK2

+

+#define TIM_DMABurstLength_1Transfer     TIM_DMABURSTLENGTH_1TRANSFER

+#define TIM_DMABurstLength_2Transfers    TIM_DMABURSTLENGTH_2TRANSFERS

+#define TIM_DMABurstLength_3Transfers    TIM_DMABURSTLENGTH_3TRANSFERS

+#define TIM_DMABurstLength_4Transfers    TIM_DMABURSTLENGTH_4TRANSFERS

+#define TIM_DMABurstLength_5Transfers    TIM_DMABURSTLENGTH_5TRANSFERS

+#define TIM_DMABurstLength_6Transfers    TIM_DMABURSTLENGTH_6TRANSFERS

+#define TIM_DMABurstLength_7Transfers    TIM_DMABURSTLENGTH_7TRANSFERS

+#define TIM_DMABurstLength_8Transfers    TIM_DMABURSTLENGTH_8TRANSFERS

+#define TIM_DMABurstLength_9Transfers    TIM_DMABURSTLENGTH_9TRANSFERS

+#define TIM_DMABurstLength_10Transfers   TIM_DMABURSTLENGTH_10TRANSFERS

+#define TIM_DMABurstLength_11Transfers   TIM_DMABURSTLENGTH_11TRANSFERS

+#define TIM_DMABurstLength_12Transfers   TIM_DMABURSTLENGTH_12TRANSFERS

+#define TIM_DMABurstLength_13Transfers   TIM_DMABURSTLENGTH_13TRANSFERS

+#define TIM_DMABurstLength_14Transfers   TIM_DMABURSTLENGTH_14TRANSFERS

+#define TIM_DMABurstLength_15Transfers   TIM_DMABURSTLENGTH_15TRANSFERS

+#define TIM_DMABurstLength_16Transfers   TIM_DMABURSTLENGTH_16TRANSFERS

+#define TIM_DMABurstLength_17Transfers   TIM_DMABURSTLENGTH_17TRANSFERS

+#define TIM_DMABurstLength_18Transfers   TIM_DMABURSTLENGTH_18TRANSFERS

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_TSC_Aliased_Defines HAL TSC Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define TSC_SYNC_POL_FALL        TSC_SYNC_POLARITY_FALLING

+#define TSC_SYNC_POL_RISE_HIGH   TSC_SYNC_POLARITY_RISING

+/**

+  * @}

+  */

+

+/** @defgroup HAL_UART_Aliased_Defines HAL UART Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define UART_ONEBIT_SAMPLING_DISABLED   UART_ONE_BIT_SAMPLE_DISABLE

+#define UART_ONEBIT_SAMPLING_ENABLED    UART_ONE_BIT_SAMPLE_ENABLE

+#define UART_ONE_BIT_SAMPLE_DISABLED    UART_ONE_BIT_SAMPLE_DISABLE

+#define UART_ONE_BIT_SAMPLE_ENABLED     UART_ONE_BIT_SAMPLE_ENABLE

+

+#define __HAL_UART_ONEBIT_ENABLE        __HAL_UART_ONE_BIT_SAMPLE_ENABLE

+#define __HAL_UART_ONEBIT_DISABLE       __HAL_UART_ONE_BIT_SAMPLE_DISABLE

+

+#define __DIV_SAMPLING16                UART_DIV_SAMPLING16

+#define __DIVMANT_SAMPLING16            UART_DIVMANT_SAMPLING16

+#define __DIVFRAQ_SAMPLING16            UART_DIVFRAQ_SAMPLING16

+#define __UART_BRR_SAMPLING16           UART_BRR_SAMPLING16

+

+#define __DIV_SAMPLING8                 UART_DIV_SAMPLING8

+#define __DIVMANT_SAMPLING8             UART_DIVMANT_SAMPLING8

+#define __DIVFRAQ_SAMPLING8             UART_DIVFRAQ_SAMPLING8

+#define __UART_BRR_SAMPLING8            UART_BRR_SAMPLING8

+

+#define UART_WAKEUPMETHODE_IDLELINE     UART_WAKEUPMETHOD_IDLELINE

+#define UART_WAKEUPMETHODE_ADDRESSMARK  UART_WAKEUPMETHOD_ADDRESSMARK

+

+/**

+  * @}

+  */

+

+  

+/** @defgroup HAL_USART_Aliased_Defines HAL USART Aliased Defines maintained for legacy purpose

+  * @{

+  */

+

+#define USART_CLOCK_DISABLED            USART_CLOCK_DISABLE

+#define USART_CLOCK_ENABLED             USART_CLOCK_ENABLE

+

+#define USARTNACK_ENABLED               USART_NACK_ENABLE

+#define USARTNACK_DISABLED              USART_NACK_DISABLE

+/**

+  * @}

+  */

+

+/** @defgroup HAL_WWDG_Aliased_Defines HAL WWDG Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define CFR_BASE                    WWDG_CFR_BASE

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_CAN_Aliased_Defines HAL CAN Aliased Defines maintained for legacy purpose

+  * @{

+  */

+#define CAN_FilterFIFO0             CAN_FILTER_FIFO0

+#define CAN_FilterFIFO1             CAN_FILTER_FIFO1

+#define CAN_IT_RQCP0                CAN_IT_TME

+#define CAN_IT_RQCP1                CAN_IT_TME

+#define CAN_IT_RQCP2                CAN_IT_TME

+#define INAK_TIMEOUT                CAN_TIMEOUT_VALUE

+#define SLAK_TIMEOUT                CAN_TIMEOUT_VALUE

+#define CAN_TXSTATUS_FAILED         ((uint8_t)0x00)

+#define CAN_TXSTATUS_OK             ((uint8_t)0x01)

+#define CAN_TXSTATUS_PENDING        ((uint8_t)0x02)

+

+/**

+  * @}

+  */

+  

+/** @defgroup HAL_ETH_Aliased_Defines HAL ETH Aliased Defines maintained for legacy purpose

+  * @{

+  */

+

+#define VLAN_TAG                ETH_VLAN_TAG

+#define MIN_ETH_PAYLOAD         ETH_MIN_ETH_PAYLOAD

+#define MAX_ETH_PAYLOAD         ETH_MAX_ETH_PAYLOAD

+#define JUMBO_FRAME_PAYLOAD     ETH_JUMBO_FRAME_PAYLOAD

+#define MACMIIAR_CR_MASK        ETH_MACMIIAR_CR_MASK

+#define MACCR_CLEAR_MASK        ETH_MACCR_CLEAR_MASK

+#define MACFCR_CLEAR_MASK       ETH_MACFCR_CLEAR_MASK

+#define DMAOMR_CLEAR_MASK       ETH_DMAOMR_CLEAR_MASK

+

+#define ETH_MMCCR              ((uint32_t)0x00000100)  

+#define ETH_MMCRIR             ((uint32_t)0x00000104)  

+#define ETH_MMCTIR             ((uint32_t)0x00000108)  

+#define ETH_MMCRIMR            ((uint32_t)0x0000010C)  

+#define ETH_MMCTIMR            ((uint32_t)0x00000110)  

+#define ETH_MMCTGFSCCR         ((uint32_t)0x0000014C)  

+#define ETH_MMCTGFMSCCR        ((uint32_t)0x00000150)  

+#define ETH_MMCTGFCR           ((uint32_t)0x00000168)  

+#define ETH_MMCRFCECR          ((uint32_t)0x00000194)  

+#define ETH_MMCRFAECR          ((uint32_t)0x00000198)  

+#define ETH_MMCRGUFCR          ((uint32_t)0x000001C4) 

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_PPP_Aliased_Defines HAL PPP Aliased Defines maintained for legacy purpose

+  * @{

+  */

+  

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+

+/** @defgroup HAL_CRYP_Aliased_Functions HAL CRYP Aliased Functions maintained for legacy purpose

+  * @{

+  */

+#define HAL_CRYP_ComputationCpltCallback     HAL_CRYPEx_ComputationCpltCallback

+/**

+  * @}

+  */  

+

+/** @defgroup HAL_HASH_Aliased_Functions HAL HASH Aliased Functions maintained for legacy purpose

+  * @{

+  */ 

+  

+#define HAL_HMAC_MD5_Finish          HAL_HASH_MD5_Finish

+#define HAL_HMAC_SHA1_Finish         HAL_HASH_SHA1_Finish

+#define HAL_HMAC_SHA224_Finish       HAL_HASH_SHA224_Finish

+#define HAL_HMAC_SHA256_Finish       HAL_HASH_SHA256_Finish

+

+/*HASH Algorithm Selection*/

+

+#define HASH_AlgoSelection_SHA1      HASH_ALGOSELECTION_SHA1 

+#define HASH_AlgoSelection_SHA224    HASH_ALGOSELECTION_SHA224

+#define HASH_AlgoSelection_SHA256    HASH_ALGOSELECTION_SHA256

+#define HASH_AlgoSelection_MD5       HASH_ALGOSELECTION_MD5

+

+#define HASH_AlgoMode_HASH         HASH_ALGOMODE_HASH 

+#define HASH_AlgoMode_HMAC         HASH_ALGOMODE_HMAC

+

+#define HASH_HMACKeyType_ShortKey  HASH_HMAC_KEYTYPE_SHORTKEY

+#define HASH_HMACKeyType_LongKey   HASH_HMAC_KEYTYPE_LONGKEY

+/**

+  * @}

+  */

+  

+/** @defgroup HAL_Aliased_Functions HAL Generic Aliased Functions maintained for legacy purpose

+  * @{

+  */

+#define HAL_EnableDBGSleepMode HAL_DBGMCU_EnableDBGSleepMode

+#define HAL_DisableDBGSleepMode HAL_DBGMCU_DisableDBGSleepMode

+#define HAL_EnableDBGStopMode HAL_DBGMCU_EnableDBGStopMode

+#define HAL_DisableDBGStopMode HAL_DBGMCU_DisableDBGStopMode

+#define HAL_EnableDBGStandbyMode HAL_DBGMCU_EnableDBGStandbyMode

+#define HAL_DisableDBGStandbyMode HAL_DBGMCU_DisableDBGStandbyMode

+#define HAL_DBG_LowPowerConfig(Periph, cmd) (((cmd)==ENABLE)? HAL_DBGMCU_DBG_EnableLowPowerConfig(Periph) : HAL_DBGMCU_DBG_DisableLowPowerConfig(Periph))

+#define HAL_VREFINT_OutputSelect  HAL_SYSCFG_VREFINT_OutputSelect

+#define HAL_Lock_Cmd(cmd) (((cmd)==ENABLE) ? HAL_SYSCFG_Enable_Lock_VREFINT() : HAL_SYSCFG_Disable_Lock_VREFINT())

+#define HAL_VREFINT_Cmd(cmd) (((cmd)==ENABLE)? HAL_SYSCFG_EnableVREFINT() : HAL_SYSCFG_DisableVREFINT())

+#define HAL_ADC_EnableBuffer_Cmd(cmd)  (((cmd)==ENABLE) ? HAL_ADCEx_EnableVREFINT() : HAL_ADCEx_DisableVREFINT())

+#define HAL_ADC_EnableBufferSensor_Cmd(cmd) (((cmd)==ENABLE) ?  HAL_ADCEx_EnableVREFINTTempSensor() : HAL_ADCEx_DisableVREFINTTempSensor())

+/**

+  * @}

+  */

+

+/** @defgroup HAL_FLASH_Aliased_Functions HAL FLASH Aliased Functions maintained for legacy purpose

+  * @{

+  */

+#define FLASH_HalfPageProgram      HAL_FLASHEx_HalfPageProgram

+#define FLASH_EnableRunPowerDown   HAL_FLASHEx_EnableRunPowerDown

+#define FLASH_DisableRunPowerDown  HAL_FLASHEx_DisableRunPowerDown

+#define HAL_DATA_EEPROMEx_Unlock   HAL_FLASHEx_DATAEEPROM_Unlock

+#define HAL_DATA_EEPROMEx_Lock     HAL_FLASHEx_DATAEEPROM_Lock

+#define HAL_DATA_EEPROMEx_Erase    HAL_FLASHEx_DATAEEPROM_Erase

+#define HAL_DATA_EEPROMEx_Program  HAL_FLASHEx_DATAEEPROM_Program

+

+ /**

+  * @}

+  */

+

+/** @defgroup HAL_I2C_Aliased_Functions HAL I2C Aliased Functions maintained for legacy purpose

+  * @{

+  */

+#define HAL_I2CEx_AnalogFilter_Config      HAL_I2CEx_ConfigAnalogFilter

+#define HAL_I2CEx_DigitalFilter_Config     HAL_I2CEx_ConfigDigitalFilter

+

+#define HAL_I2CFastModePlusConfig(SYSCFG_I2CFastModePlus, cmd) (((cmd)==ENABLE)? HAL_I2CEx_EnableFastModePlus(SYSCFG_I2CFastModePlus): HAL_I2CEx_DisableFastModePlus(SYSCFG_I2CFastModePlus))

+ /**

+  * @}

+  */

+

+/** @defgroup HAL_PWR_Aliased HAL PWR Aliased maintained for legacy purpose

+  * @{

+  */

+#define HAL_PWR_PVDConfig                             HAL_PWR_ConfigPVD

+#define HAL_PWR_DisableBkUpReg                        HAL_PWREx_DisableBkUpReg

+#define HAL_PWR_DisableFlashPowerDown                 HAL_PWREx_DisableFlashPowerDown

+#define HAL_PWR_DisableVddio2Monitor                  HAL_PWREx_DisableVddio2Monitor

+#define HAL_PWR_EnableBkUpReg                         HAL_PWREx_EnableBkUpReg

+#define HAL_PWR_EnableFlashPowerDown                  HAL_PWREx_EnableFlashPowerDown

+#define HAL_PWR_EnableVddio2Monitor                   HAL_PWREx_EnableVddio2Monitor

+#define HAL_PWR_PVD_PVM_IRQHandler                    HAL_PWREx_PVD_PVM_IRQHandler

+#define HAL_PWR_PVDLevelConfig                        HAL_PWR_ConfigPVD

+#define HAL_PWR_Vddio2Monitor_IRQHandler              HAL_PWREx_Vddio2Monitor_IRQHandler

+#define HAL_PWR_Vddio2MonitorCallback                 HAL_PWREx_Vddio2MonitorCallback

+#define HAL_PWREx_ActivateOverDrive                   HAL_PWREx_EnableOverDrive

+#define HAL_PWREx_DeactivateOverDrive                 HAL_PWREx_DisableOverDrive

+#define HAL_PWREx_DisableSDADCAnalog                  HAL_PWREx_DisableSDADC

+#define HAL_PWREx_EnableSDADCAnalog                   HAL_PWREx_EnableSDADC

+#define HAL_PWREx_PVMConfig                           HAL_PWREx_ConfigPVM

+

+#define PWR_MODE_NORMAL                               PWR_PVD_MODE_NORMAL

+#define PWR_MODE_IT_RISING                            PWR_PVD_MODE_IT_RISING

+#define PWR_MODE_IT_FALLING                           PWR_PVD_MODE_IT_FALLING

+#define PWR_MODE_IT_RISING_FALLING                    PWR_PVD_MODE_IT_RISING_FALLING

+#define PWR_MODE_EVENT_RISING                         PWR_PVD_MODE_EVENT_RISING

+#define PWR_MODE_EVENT_FALLING                        PWR_PVD_MODE_EVENT_FALLING

+#define PWR_MODE_EVENT_RISING_FALLING                 PWR_PVD_MODE_EVENT_RISING_FALLING

+

+#define CR_OFFSET_BB                                  PWR_CR_OFFSET_BB

+#define CSR_OFFSET_BB                                 PWR_CSR_OFFSET_BB

+

+#define DBP_BitNumber                                 DBP_BIT_NUMBER

+#define PVDE_BitNumber                                PVDE_BIT_NUMBER

+#define PMODE_BitNumber                               PMODE_BIT_NUMBER

+#define EWUP_BitNumber                                EWUP_BIT_NUMBER

+#define FPDS_BitNumber                                FPDS_BIT_NUMBER

+#define ODEN_BitNumber                                ODEN_BIT_NUMBER

+#define ODSWEN_BitNumber                              ODSWEN_BIT_NUMBER

+#define MRLVDS_BitNumber                              MRLVDS_BIT_NUMBER

+#define LPLVDS_BitNumber                              LPLVDS_BIT_NUMBER

+#define BRE_BitNumber                                 BRE_BIT_NUMBER

+

+#define PWR_MODE_EVT                                  PWR_PVD_MODE_NORMAL

+ 

+ /**

+  * @}

+  */  

+  

+/** @defgroup HAL_SMBUS_Aliased_Functions HAL SMBUS Aliased Functions maintained for legacy purpose

+  * @{

+  */

+#define HAL_SMBUS_Slave_Listen_IT          HAL_SMBUS_EnableListen_IT

+#define HAL_SMBUS_SlaveAddrCallback        HAL_SMBUS_AddrCallback         

+#define HAL_SMBUS_SlaveListenCpltCallback  HAL_SMBUS_ListenCpltCallback   

+/**

+  * @}

+  */

+

+/** @defgroup HAL_SPI_Aliased_Functions HAL SPI Aliased Functions maintained for legacy purpose

+  * @{

+  */

+#define HAL_SPI_FlushRxFifo                HAL_SPIEx_FlushRxFifo

+/**

+  * @}

+  */  

+

+/** @defgroup HAL_TIM_Aliased_Functions HAL TIM Aliased Functions maintained for legacy purpose

+  * @{

+  */

+#define HAL_TIM_DMADelayPulseCplt                       TIM_DMADelayPulseCplt

+#define HAL_TIM_DMAError                                TIM_DMAError

+#define HAL_TIM_DMACaptureCplt                          TIM_DMACaptureCplt

+#define HAL_TIMEx_DMACommutationCplt                    TIMEx_DMACommutationCplt

+/**

+  * @}

+  */

+   

+/** @defgroup HAL_UART_Aliased_Functions HAL UART Aliased Functions maintained for legacy purpose

+  * @{

+  */ 

+#define HAL_UART_WakeupCallback HAL_UARTEx_WakeupCallback

+/**

+  * @}

+  */

+   

+  

+   /** @defgroup HAL_PPP_Aliased_Functions HAL PPP Aliased Functions maintained for legacy purpose

+  * @{

+  */

+  

+/**

+  * @}

+  */

+

+/* Exported macros ------------------------------------------------------------*/

+

+/** @defgroup HAL_AES_Aliased_Macros HAL CRYP Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define AES_IT_CC                      CRYP_IT_CC

+#define AES_IT_ERR                     CRYP_IT_ERR

+#define AES_FLAG_CCF                   CRYP_FLAG_CCF

+/**

+  * @}

+  */  

+  

+/** @defgroup HAL_Aliased_Macros HAL Generic Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define __HAL_GET_BOOT_MODE                   __HAL_SYSCFG_GET_BOOT_MODE

+#define __HAL_REMAPMEMORY_FLASH               __HAL_SYSCFG_REMAPMEMORY_FLASH

+#define __HAL_REMAPMEMORY_SYSTEMFLASH         __HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH

+#define __HAL_REMAPMEMORY_SRAM                __HAL_SYSCFG_REMAPMEMORY_SRAM

+#define __HAL_REMAPMEMORY_FMC                 __HAL_SYSCFG_REMAPMEMORY_FMC

+#define __HAL_REMAPMEMORY_FMC_SDRAM           __HAL_SYSCFG_REMAPMEMORY_FMC_SDRAM 

+#define __HAL_REMAPMEMORY_FSMC                __HAL_SYSCFG_REMAPMEMORY_FSMC

+#define __HAL_REMAPMEMORY_QUADSPI             __HAL_SYSCFG_REMAPMEMORY_QUADSPI

+#define __HAL_FMC_BANK                        __HAL_SYSCFG_FMC_BANK

+#define __HAL_GET_FLAG                        __HAL_SYSCFG_GET_FLAG

+#define __HAL_CLEAR_FLAG                      __HAL_SYSCFG_CLEAR_FLAG

+#define __HAL_VREFINT_OUT_ENABLE              __HAL_SYSCFG_VREFINT_OUT_ENABLE

+#define __HAL_VREFINT_OUT_DISABLE             __HAL_SYSCFG_VREFINT_OUT_DISABLE

+

+#define SYSCFG_FLAG_VREF_READY                SYSCFG_FLAG_VREFINT_READY

+#define SYSCFG_FLAG_RC48                      RCC_FLAG_HSI48

+#define IS_SYSCFG_FASTMODEPLUS_CONFIG         IS_I2C_FASTMODEPLUS

+#define UFB_MODE_BitNumber                    UFB_MODE_BIT_NUMBER

+#define CMP_PD_BitNumber                      CMP_PD_BIT_NUMBER

+

+/**

+  * @}

+  */

+

+   

+/** @defgroup HAL_ADC_Aliased_Macros HAL ADC Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define __ADC_ENABLE                                     __HAL_ADC_ENABLE

+#define __ADC_DISABLE                                    __HAL_ADC_DISABLE

+#define __HAL_ADC_ENABLING_CONDITIONS                    ADC_ENABLING_CONDITIONS

+#define __HAL_ADC_DISABLING_CONDITIONS                   ADC_DISABLING_CONDITIONS

+#define __HAL_ADC_IS_ENABLED                             ADC_IS_ENABLE

+#define __ADC_IS_ENABLED                                 ADC_IS_ENABLE

+#define __HAL_ADC_IS_SOFTWARE_START_REGULAR              ADC_IS_SOFTWARE_START_REGULAR

+#define __HAL_ADC_IS_SOFTWARE_START_INJECTED             ADC_IS_SOFTWARE_START_INJECTED

+#define __HAL_ADC_IS_CONVERSION_ONGOING_REGULAR_INJECTED ADC_IS_CONVERSION_ONGOING_REGULAR_INJECTED

+#define __HAL_ADC_IS_CONVERSION_ONGOING_REGULAR          ADC_IS_CONVERSION_ONGOING_REGULAR

+#define __HAL_ADC_IS_CONVERSION_ONGOING_INJECTED         ADC_IS_CONVERSION_ONGOING_INJECTED

+#define __HAL_ADC_IS_CONVERSION_ONGOING                  ADC_IS_CONVERSION_ONGOING

+#define __HAL_ADC_CLEAR_ERRORCODE                        ADC_CLEAR_ERRORCODE

+

+#define __HAL_ADC_GET_RESOLUTION                         ADC_GET_RESOLUTION

+#define __HAL_ADC_JSQR_RK                                ADC_JSQR_RK

+#define __HAL_ADC_CFGR_AWD1CH                            ADC_CFGR_AWD1CH_SHIFT

+#define __HAL_ADC_CFGR_AWD23CR                           ADC_CFGR_AWD23CR

+#define __HAL_ADC_CFGR_INJECT_AUTO_CONVERSION            ADC_CFGR_INJECT_AUTO_CONVERSION

+#define __HAL_ADC_CFGR_INJECT_CONTEXT_QUEUE              ADC_CFGR_INJECT_CONTEXT_QUEUE

+#define __HAL_ADC_CFGR_INJECT_DISCCONTINUOUS             ADC_CFGR_INJECT_DISCCONTINUOUS

+#define __HAL_ADC_CFGR_REG_DISCCONTINUOUS                ADC_CFGR_REG_DISCCONTINUOUS

+#define __HAL_ADC_CFGR_DISCONTINUOUS_NUM                 ADC_CFGR_DISCONTINUOUS_NUM

+#define __HAL_ADC_CFGR_AUTOWAIT                          ADC_CFGR_AUTOWAIT

+#define __HAL_ADC_CFGR_CONTINUOUS                        ADC_CFGR_CONTINUOUS

+#define __HAL_ADC_CFGR_OVERRUN                           ADC_CFGR_OVERRUN

+#define __HAL_ADC_CFGR_DMACONTREQ                        ADC_CFGR_DMACONTREQ

+#define __HAL_ADC_CFGR_EXTSEL                            ADC_CFGR_EXTSEL_SET

+#define __HAL_ADC_JSQR_JEXTSEL                           ADC_JSQR_JEXTSEL_SET

+#define __HAL_ADC_OFR_CHANNEL                            ADC_OFR_CHANNEL

+#define __HAL_ADC_DIFSEL_CHANNEL                         ADC_DIFSEL_CHANNEL

+#define __HAL_ADC_CALFACT_DIFF_SET                       ADC_CALFACT_DIFF_SET

+#define __HAL_ADC_CALFACT_DIFF_GET                       ADC_CALFACT_DIFF_GET

+#define __HAL_ADC_TRX_HIGHTHRESHOLD                      ADC_TRX_HIGHTHRESHOLD

+

+#define __HAL_ADC_OFFSET_SHIFT_RESOLUTION                ADC_OFFSET_SHIFT_RESOLUTION

+#define __HAL_ADC_AWD1THRESHOLD_SHIFT_RESOLUTION         ADC_AWD1THRESHOLD_SHIFT_RESOLUTION

+#define __HAL_ADC_AWD23THRESHOLD_SHIFT_RESOLUTION        ADC_AWD23THRESHOLD_SHIFT_RESOLUTION

+#define __HAL_ADC_COMMON_REGISTER                        ADC_COMMON_REGISTER

+#define __HAL_ADC_COMMON_CCR_MULTI                       ADC_COMMON_CCR_MULTI

+#define __HAL_ADC_MULTIMODE_IS_ENABLED                   ADC_MULTIMODE_IS_ENABLE

+#define __ADC_MULTIMODE_IS_ENABLED                       ADC_MULTIMODE_IS_ENABLE

+#define __HAL_ADC_NONMULTIMODE_OR_MULTIMODEMASTER        ADC_NONMULTIMODE_OR_MULTIMODEMASTER

+#define __HAL_ADC_COMMON_ADC_OTHER                       ADC_COMMON_ADC_OTHER

+#define __HAL_ADC_MULTI_SLAVE                            ADC_MULTI_SLAVE

+

+#define __HAL_ADC_SQR1_L                                 ADC_SQR1_L_SHIFT

+#define __HAL_ADC_JSQR_JL                                ADC_JSQR_JL_SHIFT

+#define __HAL_ADC_JSQR_RK_JL                             ADC_JSQR_RK_JL

+#define __HAL_ADC_CR1_DISCONTINUOUS_NUM                  ADC_CR1_DISCONTINUOUS_NUM

+#define __HAL_ADC_CR1_SCAN                               ADC_CR1_SCAN_SET

+#define __HAL_ADC_CONVCYCLES_MAX_RANGE                   ADC_CONVCYCLES_MAX_RANGE

+#define __HAL_ADC_CLOCK_PRESCALER_RANGE                  ADC_CLOCK_PRESCALER_RANGE

+#define __HAL_ADC_GET_CLOCK_PRESCALER                    ADC_GET_CLOCK_PRESCALER

+

+#define __HAL_ADC_SQR1                                   ADC_SQR1

+#define __HAL_ADC_SMPR1                                  ADC_SMPR1

+#define __HAL_ADC_SMPR2                                  ADC_SMPR2

+#define __HAL_ADC_SQR3_RK                                ADC_SQR3_RK

+#define __HAL_ADC_SQR2_RK                                ADC_SQR2_RK

+#define __HAL_ADC_SQR1_RK                                ADC_SQR1_RK

+#define __HAL_ADC_CR2_CONTINUOUS                         ADC_CR2_CONTINUOUS

+#define __HAL_ADC_CR1_DISCONTINUOUS                      ADC_CR1_DISCONTINUOUS

+#define __HAL_ADC_CR1_SCANCONV                           ADC_CR1_SCANCONV

+#define __HAL_ADC_CR2_EOCSelection                       ADC_CR2_EOCSelection

+#define __HAL_ADC_CR2_DMAContReq                         ADC_CR2_DMAContReq

+#define __HAL_ADC_GET_RESOLUTION                         ADC_GET_RESOLUTION

+#define __HAL_ADC_JSQR                                   ADC_JSQR

+

+#define __HAL_ADC_CHSELR_CHANNEL                         ADC_CHSELR_CHANNEL

+#define __HAL_ADC_CFGR1_REG_DISCCONTINUOUS               ADC_CFGR1_REG_DISCCONTINUOUS

+#define __HAL_ADC_CFGR1_AUTOOFF                          ADC_CFGR1_AUTOOFF

+#define __HAL_ADC_CFGR1_AUTOWAIT                         ADC_CFGR1_AUTOWAIT

+#define __HAL_ADC_CFGR1_CONTINUOUS                       ADC_CFGR1_CONTINUOUS

+#define __HAL_ADC_CFGR1_OVERRUN                          ADC_CFGR1_OVERRUN

+#define __HAL_ADC_CFGR1_SCANDIR                          ADC_CFGR1_SCANDIR

+#define __HAL_ADC_CFGR1_DMACONTREQ                       ADC_CFGR1_DMACONTREQ

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_DAC_Aliased_Macros HAL DAC Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define __HAL_DHR12R1_ALIGNEMENT                        DAC_DHR12R1_ALIGNMENT

+#define __HAL_DHR12R2_ALIGNEMENT                        DAC_DHR12R2_ALIGNMENT

+#define __HAL_DHR12RD_ALIGNEMENT                        DAC_DHR12RD_ALIGNMENT

+#define IS_DAC_GENERATE_WAVE                            IS_DAC_WAVE

+

+/**

+  * @}

+  */

+   

+/** @defgroup HAL_DBGMCU_Aliased_Macros HAL DBGMCU Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define __HAL_FREEZE_TIM1_DBGMCU __HAL_DBGMCU_FREEZE_TIM1

+#define __HAL_UNFREEZE_TIM1_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM1

+#define __HAL_FREEZE_TIM2_DBGMCU __HAL_DBGMCU_FREEZE_TIM2

+#define __HAL_UNFREEZE_TIM2_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM2

+#define __HAL_FREEZE_TIM3_DBGMCU __HAL_DBGMCU_FREEZE_TIM3

+#define __HAL_UNFREEZE_TIM3_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM3

+#define __HAL_FREEZE_TIM4_DBGMCU __HAL_DBGMCU_FREEZE_TIM4

+#define __HAL_UNFREEZE_TIM4_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM4

+#define __HAL_FREEZE_TIM5_DBGMCU __HAL_DBGMCU_FREEZE_TIM5

+#define __HAL_UNFREEZE_TIM5_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM5

+#define __HAL_FREEZE_TIM6_DBGMCU __HAL_DBGMCU_FREEZE_TIM6

+#define __HAL_UNFREEZE_TIM6_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM6

+#define __HAL_FREEZE_TIM7_DBGMCU __HAL_DBGMCU_FREEZE_TIM7

+#define __HAL_UNFREEZE_TIM7_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM7

+#define __HAL_FREEZE_TIM8_DBGMCU __HAL_DBGMCU_FREEZE_TIM8

+#define __HAL_UNFREEZE_TIM8_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM8

+

+#define __HAL_FREEZE_TIM9_DBGMCU __HAL_DBGMCU_FREEZE_TIM9

+#define __HAL_UNFREEZE_TIM9_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM9

+#define __HAL_FREEZE_TIM10_DBGMCU __HAL_DBGMCU_FREEZE_TIM10

+#define __HAL_UNFREEZE_TIM10_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM10

+#define __HAL_FREEZE_TIM11_DBGMCU __HAL_DBGMCU_FREEZE_TIM11

+#define __HAL_UNFREEZE_TIM11_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM11

+#define __HAL_FREEZE_TIM12_DBGMCU __HAL_DBGMCU_FREEZE_TIM12

+#define __HAL_UNFREEZE_TIM12_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM12

+#define __HAL_FREEZE_TIM13_DBGMCU __HAL_DBGMCU_FREEZE_TIM13

+#define __HAL_UNFREEZE_TIM13_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM13

+#define __HAL_FREEZE_TIM14_DBGMCU __HAL_DBGMCU_FREEZE_TIM14

+#define __HAL_UNFREEZE_TIM14_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM14

+#define __HAL_FREEZE_CAN2_DBGMCU __HAL_DBGMCU_FREEZE_CAN2

+#define __HAL_UNFREEZE_CAN2_DBGMCU __HAL_DBGMCU_UNFREEZE_CAN2

+

+

+#define __HAL_FREEZE_TIM15_DBGMCU __HAL_DBGMCU_FREEZE_TIM15

+#define __HAL_UNFREEZE_TIM15_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM15

+#define __HAL_FREEZE_TIM16_DBGMCU __HAL_DBGMCU_FREEZE_TIM16

+#define __HAL_UNFREEZE_TIM16_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM16

+#define __HAL_FREEZE_TIM17_DBGMCU __HAL_DBGMCU_FREEZE_TIM17

+#define __HAL_UNFREEZE_TIM17_DBGMCU __HAL_DBGMCU_UNFREEZE_TIM17

+#define __HAL_FREEZE_RTC_DBGMCU __HAL_DBGMCU_FREEZE_RTC

+#define __HAL_UNFREEZE_RTC_DBGMCU __HAL_DBGMCU_UNFREEZE_RTC

+#define __HAL_FREEZE_WWDG_DBGMCU __HAL_DBGMCU_FREEZE_WWDG

+#define __HAL_UNFREEZE_WWDG_DBGMCU __HAL_DBGMCU_UNFREEZE_WWDG

+#define __HAL_FREEZE_IWDG_DBGMCU __HAL_DBGMCU_FREEZE_IWDG

+#define __HAL_UNFREEZE_IWDG_DBGMCU __HAL_DBGMCU_UNFREEZE_IWDG

+#define __HAL_FREEZE_I2C1_TIMEOUT_DBGMCU __HAL_DBGMCU_FREEZE_I2C1_TIMEOUT

+#define __HAL_UNFREEZE_I2C1_TIMEOUT_DBGMCU __HAL_DBGMCU_UNFREEZE_I2C1_TIMEOUT

+#define __HAL_FREEZE_I2C2_TIMEOUT_DBGMCU __HAL_DBGMCU_FREEZE_I2C2_TIMEOUT

+#define __HAL_UNFREEZE_I2C2_TIMEOUT_DBGMCU __HAL_DBGMCU_UNFREEZE_I2C2_TIMEOUT

+#define __HAL_FREEZE_I2C3_TIMEOUT_DBGMCU __HAL_DBGMCU_FREEZE_I2C3_TIMEOUT

+#define __HAL_UNFREEZE_I2C3_TIMEOUT_DBGMCU __HAL_DBGMCU_UNFREEZE_I2C3_TIMEOUT

+#define __HAL_FREEZE_CAN1_DBGMCU __HAL_DBGMCU_FREEZE_CAN1

+#define __HAL_UNFREEZE_CAN1_DBGMCU __HAL_DBGMCU_UNFREEZE_CAN1

+#define __HAL_FREEZE_LPTIM1_DBGMCU __HAL_DBGMCU_FREEZE_LPTIM1

+#define __HAL_UNFREEZE_LPTIM1_DBGMCU __HAL_DBGMCU_UNFREEZE_LPTIM1

+#define __HAL_FREEZE_LPTIM2_DBGMCU __HAL_DBGMCU_FREEZE_LPTIM2

+#define __HAL_UNFREEZE_LPTIM2_DBGMCU __HAL_DBGMCU_UNFREEZE_LPTIM2

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_COMP_Aliased_Macros HAL COMP Aliased Macros maintained for legacy purpose

+  * @{

+  */

+

+#define __HAL_COMP_EXTI_RISING_IT_ENABLE(__EXTILINE__)   (((__EXTILINE__)  == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_RISING_EDGE() : \

+                                                          __HAL_COMP_COMP2_EXTI_ENABLE_RISING_EDGE())

+#define __HAL_COMP_EXTI_RISING_IT_DISABLE(__EXTILINE__)  (((__EXTILINE__)  == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_RISING_EDGE() : \

+                                                          __HAL_COMP_COMP2_EXTI_DISABLE_RISING_EDGE())

+#define __HAL_COMP_EXTI_FALLING_IT_ENABLE(__EXTILINE__)  (((__EXTILINE__)  == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_FALLING_EDGE() : \

+                                                          __HAL_COMP_COMP2_EXTI_ENABLE_FALLING_EDGE())

+#define __HAL_COMP_EXTI_FALLING_IT_DISABLE(__EXTILINE__)   (((__EXTILINE__)  == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_FALLING_EDGE() : \

+                                                          __HAL_COMP_COMP2_EXTI_DISABLE_FALLING_EDGE())

+#define __HAL_COMP_EXTI_ENABLE_IT(__EXTILINE__)   (((__EXTILINE__)  == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_ENABLE_IT() : \

+                                                          __HAL_COMP_COMP2_EXTI_ENABLE_IT())

+#define __HAL_COMP_EXTI_DISABLE_IT(__EXTILINE__)   (((__EXTILINE__)  == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_DISABLE_IT() : \

+                                                          __HAL_COMP_COMP2_EXTI_DISABLE_IT())

+#define __HAL_COMP_EXTI_GET_FLAG(__FLAG__)   (((__FLAG__)  == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_GET_FLAG() : \

+                                                          __HAL_COMP_COMP2_EXTI_GET_FLAG())

+#define __HAL_COMP_EXTI_CLEAR_FLAG(__FLAG__)   (((__FLAG__)  == COMP_EXTI_LINE_COMP1) ? __HAL_COMP_COMP1_EXTI_CLEAR_FLAG() : \

+                                                          __HAL_COMP_COMP2_EXTI_CLEAR_FLAG())

+#define __HAL_COMP_GET_EXTI_LINE  COMP_GET_EXTI_LINE

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_DAC_Aliased_Macros HAL DAC Aliased Macros maintained for legacy purpose

+  * @{

+  */

+

+#define IS_DAC_WAVE(WAVE) (((WAVE) == DAC_WAVE_NONE) || \

+                          ((WAVE) == DAC_WAVE_NOISE)|| \

+                          ((WAVE) == DAC_WAVE_TRIANGLE))

+  

+/**

+  * @}

+  */

+

+/** @defgroup HAL_FLASH_Aliased_Macros HAL FLASH Aliased Macros maintained for legacy purpose

+  * @{

+  */

+

+#define IS_WRPAREA          IS_OB_WRPAREA

+#define IS_TYPEPROGRAM      IS_FLASH_TYPEPROGRAM

+#define IS_TYPEPROGRAMFLASH IS_FLASH_TYPEPROGRAM

+#define IS_TYPEERASE        IS_FLASH_TYPEERASE

+

+/**

+  * @}

+  */

+  

+/** @defgroup HAL_I2C_Aliased_Macros HAL I2C Aliased Macros maintained for legacy purpose

+  * @{

+  */

+  

+#define __HAL_I2C_RESET_CR2             I2C_RESET_CR2

+#define __HAL_I2C_GENERATE_START        I2C_GENERATE_START

+#define __HAL_I2C_FREQ_RANGE            I2C_FREQ_RANGE

+#define __HAL_I2C_RISE_TIME             I2C_RISE_TIME

+#define __HAL_I2C_SPEED_STANDARD        I2C_SPEED_STANDARD

+#define __HAL_I2C_SPEED_FAST            I2C_SPEED_FAST

+#define __HAL_I2C_SPEED                 I2C_SPEED

+#define __HAL_I2C_7BIT_ADD_WRITE        I2C_7BIT_ADD_WRITE

+#define __HAL_I2C_7BIT_ADD_READ         I2C_7BIT_ADD_READ

+#define __HAL_I2C_10BIT_ADDRESS         I2C_10BIT_ADDRESS

+#define __HAL_I2C_10BIT_HEADER_WRITE    I2C_10BIT_HEADER_WRITE

+#define __HAL_I2C_10BIT_HEADER_READ     I2C_10BIT_HEADER_READ

+#define __HAL_I2C_MEM_ADD_MSB           I2C_MEM_ADD_MSB

+#define __HAL_I2C_MEM_ADD_LSB           I2C_MEM_ADD_LSB

+#define __HAL_I2C_FREQRANGE             I2C_FREQRANGE

+/**

+  * @}

+  */

+  

+/** @defgroup HAL_I2S_Aliased_Macros HAL I2S Aliased Macros maintained for legacy purpose

+  * @{

+  */

+  

+#define IS_I2S_INSTANCE                 IS_I2S_ALL_INSTANCE

+#define IS_I2S_INSTANCE_EXT             IS_I2S_ALL_INSTANCE_EXT

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_IRDA_Aliased_Macros HAL IRDA Aliased Macros maintained for legacy purpose

+  * @{

+  */

+  

+#define __IRDA_DISABLE                  __HAL_IRDA_DISABLE

+#define __IRDA_ENABLE                   __HAL_IRDA_ENABLE

+

+#define __HAL_IRDA_GETCLOCKSOURCE       IRDA_GETCLOCKSOURCE

+#define __HAL_IRDA_MASK_COMPUTATION     IRDA_MASK_COMPUTATION

+#define __IRDA_GETCLOCKSOURCE           IRDA_GETCLOCKSOURCE

+#define __IRDA_MASK_COMPUTATION         IRDA_MASK_COMPUTATION

+

+#define IS_IRDA_ONEBIT_SAMPLE           IS_IRDA_ONE_BIT_SAMPLE                  

+

+

+/**

+  * @}

+  */

+

+

+/** @defgroup HAL_IWDG_Aliased_Macros HAL IWDG Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define __HAL_IWDG_ENABLE_WRITE_ACCESS  IWDG_ENABLE_WRITE_ACCESS

+#define __HAL_IWDG_DISABLE_WRITE_ACCESS IWDG_DISABLE_WRITE_ACCESS

+/**

+  * @}

+  */

+

+

+/** @defgroup HAL_LPTIM_Aliased_Macros HAL LPTIM Aliased Macros maintained for legacy purpose

+  * @{

+  */

+

+#define __HAL_LPTIM_ENABLE_INTERRUPT    __HAL_LPTIM_ENABLE_IT

+#define __HAL_LPTIM_DISABLE_INTERRUPT   __HAL_LPTIM_DISABLE_IT

+#define __HAL_LPTIM_GET_ITSTATUS        __HAL_LPTIM_GET_IT_SOURCE

+

+/**

+  * @}

+  */

+  

+  

+/** @defgroup HAL_OPAMP_Aliased_Macros HAL OPAMP Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define __OPAMP_CSR_OPAXPD                OPAMP_CSR_OPAXPD

+#define __OPAMP_CSR_S3SELX                OPAMP_CSR_S3SELX

+#define __OPAMP_CSR_S4SELX                OPAMP_CSR_S4SELX

+#define __OPAMP_CSR_S5SELX                OPAMP_CSR_S5SELX

+#define __OPAMP_CSR_S6SELX                OPAMP_CSR_S6SELX

+#define __OPAMP_CSR_OPAXCAL_L             OPAMP_CSR_OPAXCAL_L

+#define __OPAMP_CSR_OPAXCAL_H             OPAMP_CSR_OPAXCAL_H

+#define __OPAMP_CSR_OPAXLPM               OPAMP_CSR_OPAXLPM

+#define __OPAMP_CSR_ALL_SWITCHES          OPAMP_CSR_ALL_SWITCHES

+#define __OPAMP_CSR_ANAWSELX              OPAMP_CSR_ANAWSELX

+#define __OPAMP_CSR_OPAXCALOUT            OPAMP_CSR_OPAXCALOUT

+#define __OPAMP_OFFSET_TRIM_BITSPOSITION  OPAMP_OFFSET_TRIM_BITSPOSITION

+#define __OPAMP_OFFSET_TRIM_SET           OPAMP_OFFSET_TRIM_SET

+

+/**

+  * @}

+  */

+

+

+/** @defgroup HAL_PWR_Aliased_Macros HAL PWR Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define __HAL_PVD_EVENT_DISABLE                                  __HAL_PWR_PVD_EXTI_DISABLE_EVENT

+#define __HAL_PVD_EVENT_ENABLE                                   __HAL_PWR_PVD_EXTI_ENABLE_EVENT

+#define __HAL_PVD_EXTI_FALLINGTRIGGER_DISABLE                    __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE

+#define __HAL_PVD_EXTI_FALLINGTRIGGER_ENABLE                     __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE

+#define __HAL_PVD_EXTI_RISINGTRIGGER_DISABLE                     __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE

+#define __HAL_PVD_EXTI_RISINGTRIGGER_ENABLE                      __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE

+#define __HAL_PVM_EVENT_DISABLE                                  __HAL_PWR_PVM_EVENT_DISABLE

+#define __HAL_PVM_EVENT_ENABLE                                   __HAL_PWR_PVM_EVENT_ENABLE

+#define __HAL_PVM_EXTI_FALLINGTRIGGER_DISABLE                    __HAL_PWR_PVM_EXTI_FALLINGTRIGGER_DISABLE

+#define __HAL_PVM_EXTI_FALLINGTRIGGER_ENABLE                     __HAL_PWR_PVM_EXTI_FALLINGTRIGGER_ENABLE

+#define __HAL_PVM_EXTI_RISINGTRIGGER_DISABLE                     __HAL_PWR_PVM_EXTI_RISINGTRIGGER_DISABLE

+#define __HAL_PVM_EXTI_RISINGTRIGGER_ENABLE                      __HAL_PWR_PVM_EXTI_RISINGTRIGGER_ENABLE

+#define __HAL_PWR_INTERNALWAKEUP_DISABLE                         HAL_PWREx_DisableInternalWakeUpLine

+#define __HAL_PWR_INTERNALWAKEUP_ENABLE                          HAL_PWREx_EnableInternalWakeUpLine

+#define __HAL_PWR_PULL_UP_DOWN_CONFIG_DISABLE                    HAL_PWREx_DisablePullUpPullDownConfig

+#define __HAL_PWR_PULL_UP_DOWN_CONFIG_ENABLE                     HAL_PWREx_EnablePullUpPullDownConfig

+#define __HAL_PWR_PVD_EXTI_CLEAR_EGDE_TRIGGER()                  __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE();__HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE()

+#define __HAL_PWR_PVD_EXTI_EVENT_DISABLE                         __HAL_PWR_PVD_EXTI_DISABLE_EVENT

+#define __HAL_PWR_PVD_EXTI_EVENT_ENABLE                          __HAL_PWR_PVD_EXTI_ENABLE_EVENT

+#define __HAL_PWR_PVD_EXTI_FALLINGTRIGGER_DISABLE                __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE

+#define __HAL_PWR_PVD_EXTI_FALLINGTRIGGER_ENABLE                 __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE

+#define __HAL_PWR_PVD_EXTI_RISINGTRIGGER_DISABLE                 __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE

+#define __HAL_PWR_PVD_EXTI_RISINGTRIGGER_ENABLE                  __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE

+#define __HAL_PWR_PVD_EXTI_SET_FALLING_EGDE_TRIGGER              __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE

+#define __HAL_PWR_PVD_EXTI_SET_RISING_EDGE_TRIGGER               __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE

+#define __HAL_PWR_PVM_DISABLE()                                  HAL_PWREx_DisablePVM1();HAL_PWREx_DisablePVM2();HAL_PWREx_DisablePVM3();HAL_PWREx_DisablePVM4()

+#define __HAL_PWR_PVM_ENABLE()                                   HAL_PWREx_EnablePVM1();HAL_PWREx_EnablePVM2();HAL_PWREx_EnablePVM3();HAL_PWREx_EnablePVM4()

+#define __HAL_PWR_SRAM2CONTENT_PRESERVE_DISABLE                  HAL_PWREx_DisableSRAM2ContentRetention

+#define __HAL_PWR_SRAM2CONTENT_PRESERVE_ENABLE                   HAL_PWREx_EnableSRAM2ContentRetention

+#define __HAL_PWR_VDDIO2_DISABLE                                 HAL_PWREx_DisableVddIO2

+#define __HAL_PWR_VDDIO2_ENABLE                                  HAL_PWREx_EnableVddIO2

+#define __HAL_PWR_VDDIO2_EXTI_CLEAR_EGDE_TRIGGER                 __HAL_PWR_VDDIO2_EXTI_DISABLE_FALLING_EDGE

+#define __HAL_PWR_VDDIO2_EXTI_SET_FALLING_EGDE_TRIGGER           __HAL_PWR_VDDIO2_EXTI_ENABLE_FALLING_EDGE

+#define __HAL_PWR_VDDUSB_DISABLE                                 HAL_PWREx_DisableVddUSB

+#define __HAL_PWR_VDDUSB_ENABLE                                  HAL_PWREx_EnableVddUSB

+

+#if defined (STM32F4)

+#define __HAL_PVD_EXTI_ENABLE_IT(PWR_EXTI_LINE_PVD)         __HAL_PWR_PVD_EXTI_ENABLE_IT()

+#define __HAL_PVD_EXTI_DISABLE_IT(PWR_EXTI_LINE_PVD)        __HAL_PWR_PVD_EXTI_DISABLE_IT()

+#define __HAL_PVD_EXTI_GET_FLAG(PWR_EXTI_LINE_PVD)          __HAL_PWR_PVD_EXTI_GET_FLAG()   

+#define __HAL_PVD_EXTI_CLEAR_FLAG(PWR_EXTI_LINE_PVD)        __HAL_PWR_PVD_EXTI_CLEAR_FLAG()

+#define __HAL_PVD_EXTI_GENERATE_SWIT(PWR_EXTI_LINE_PVD)     __HAL_PWR_PVD_EXTI_GENERATE_SWIT()

+#else

+#define __HAL_PVD_EXTI_CLEAR_FLAG                                __HAL_PWR_PVD_EXTI_CLEAR_FLAG

+#define __HAL_PVD_EXTI_DISABLE_IT                                __HAL_PWR_PVD_EXTI_DISABLE_IT

+#define __HAL_PVD_EXTI_ENABLE_IT                                 __HAL_PWR_PVD_EXTI_ENABLE_IT

+#define __HAL_PVD_EXTI_GENERATE_SWIT                             __HAL_PWR_PVD_EXTI_GENERATE_SWIT

+#define __HAL_PVD_EXTI_GET_FLAG                                  __HAL_PWR_PVD_EXTI_GET_FLAG 

+#endif /* STM32F4 */

+/**   

+  * @}

+  */  

+  

+  

+/** @defgroup HAL_RCC_Aliased HAL RCC Aliased maintained for legacy purpose

+  * @{

+  */

+  

+#define RCC_StopWakeUpClock_MSI     RCC_STOP_WAKEUPCLOCK_MSI

+#define RCC_StopWakeUpClock_HSI     RCC_STOP_WAKEUPCLOCK_HSI

+

+#define HAL_RCC_CCSCallback HAL_RCC_CSSCallback

+#define HAL_RC48_EnableBuffer_Cmd(cmd) (((cmd)==ENABLE) ? HAL_RCCEx_EnableHSI48_VREFINT() : HAL_RCCEx_DisableHSI48_VREFINT())

+

+#define __ADC_CLK_DISABLE __HAL_RCC_ADC_CLK_DISABLE

+#define __ADC_CLK_ENABLE __HAL_RCC_ADC_CLK_ENABLE

+#define __ADC_CLK_SLEEP_DISABLE __HAL_RCC_ADC_CLK_SLEEP_DISABLE

+#define __ADC_CLK_SLEEP_ENABLE __HAL_RCC_ADC_CLK_SLEEP_ENABLE

+#define __ADC_FORCE_RESET __HAL_RCC_ADC_FORCE_RESET

+#define __ADC_RELEASE_RESET __HAL_RCC_ADC_RELEASE_RESET

+#define __ADC1_CLK_DISABLE        __HAL_RCC_ADC1_CLK_DISABLE

+#define __ADC1_CLK_ENABLE         __HAL_RCC_ADC1_CLK_ENABLE

+#define __ADC1_FORCE_RESET        __HAL_RCC_ADC1_FORCE_RESET

+#define __ADC1_RELEASE_RESET      __HAL_RCC_ADC1_RELEASE_RESET

+#define __ADC1_CLK_SLEEP_ENABLE   __HAL_RCC_ADC1_CLK_SLEEP_ENABLE  

+#define __ADC1_CLK_SLEEP_DISABLE  __HAL_RCC_ADC1_CLK_SLEEP_DISABLE  

+#define __ADC2_CLK_DISABLE __HAL_RCC_ADC2_CLK_DISABLE

+#define __ADC2_CLK_ENABLE __HAL_RCC_ADC2_CLK_ENABLE

+#define __ADC2_FORCE_RESET __HAL_RCC_ADC2_FORCE_RESET

+#define __ADC2_RELEASE_RESET __HAL_RCC_ADC2_RELEASE_RESET

+#define __ADC3_CLK_DISABLE __HAL_RCC_ADC3_CLK_DISABLE

+#define __ADC3_CLK_ENABLE __HAL_RCC_ADC3_CLK_ENABLE

+#define __ADC3_FORCE_RESET __HAL_RCC_ADC3_FORCE_RESET

+#define __ADC3_RELEASE_RESET __HAL_RCC_ADC3_RELEASE_RESET

+#define __AES_CLK_DISABLE __HAL_RCC_AES_CLK_DISABLE

+#define __AES_CLK_ENABLE __HAL_RCC_AES_CLK_ENABLE

+#define __AES_CLK_SLEEP_DISABLE __HAL_RCC_AES_CLK_SLEEP_DISABLE

+#define __AES_CLK_SLEEP_ENABLE __HAL_RCC_AES_CLK_SLEEP_ENABLE

+#define __AES_FORCE_RESET __HAL_RCC_AES_FORCE_RESET

+#define __AES_RELEASE_RESET __HAL_RCC_AES_RELEASE_RESET

+#define __CRYP_CLK_SLEEP_ENABLE      __HAL_RCC_CRYP_CLK_SLEEP_ENABLE

+#define __CRYP_CLK_SLEEP_DISABLE  __HAL_RCC_CRYP_CLK_SLEEP_DISABLE

+#define __CRYP_CLK_ENABLE  __HAL_RCC_CRYP_CLK_ENABLE

+#define __CRYP_CLK_DISABLE  __HAL_RCC_CRYP_CLK_DISABLE

+#define __CRYP_FORCE_RESET  __HAL_RCC_CRYP_FORCE_RESET

+#define __CRYP_RELEASE_RESET  __HAL_RCC_CRYP_RELEASE_RESET

+#define __AFIO_CLK_DISABLE __HAL_RCC_AFIO_CLK_DISABLE

+#define __AFIO_CLK_ENABLE __HAL_RCC_AFIO_CLK_ENABLE

+#define __AFIO_FORCE_RESET __HAL_RCC_AFIO_FORCE_RESET

+#define __AFIO_RELEASE_RESET __HAL_RCC_AFIO_RELEASE_RESET

+#define __AHB_FORCE_RESET __HAL_RCC_AHB_FORCE_RESET

+#define __AHB_RELEASE_RESET __HAL_RCC_AHB_RELEASE_RESET

+#define __AHB1_FORCE_RESET __HAL_RCC_AHB1_FORCE_RESET

+#define __AHB1_RELEASE_RESET __HAL_RCC_AHB1_RELEASE_RESET

+#define __AHB2_FORCE_RESET __HAL_RCC_AHB2_FORCE_RESET

+#define __AHB2_RELEASE_RESET __HAL_RCC_AHB2_RELEASE_RESET

+#define __AHB3_FORCE_RESET __HAL_RCC_AHB3_FORCE_RESET

+#define __AHB3_RELEASE_RESET __HAL_RCC_AHB3_RELEASE_RESET

+#define __APB1_FORCE_RESET __HAL_RCC_APB1_FORCE_RESET

+#define __APB1_RELEASE_RESET __HAL_RCC_APB1_RELEASE_RESET

+#define __APB2_FORCE_RESET __HAL_RCC_APB2_FORCE_RESET

+#define __APB2_RELEASE_RESET __HAL_RCC_APB2_RELEASE_RESET

+#define __BKP_CLK_DISABLE __HAL_RCC_BKP_CLK_DISABLE

+#define __BKP_CLK_ENABLE __HAL_RCC_BKP_CLK_ENABLE

+#define __BKP_FORCE_RESET __HAL_RCC_BKP_FORCE_RESET

+#define __BKP_RELEASE_RESET __HAL_RCC_BKP_RELEASE_RESET

+#define __CAN1_CLK_DISABLE __HAL_RCC_CAN1_CLK_DISABLE

+#define __CAN1_CLK_ENABLE __HAL_RCC_CAN1_CLK_ENABLE

+#define __CAN1_CLK_SLEEP_DISABLE __HAL_RCC_CAN1_CLK_SLEEP_DISABLE

+#define __CAN1_CLK_SLEEP_ENABLE __HAL_RCC_CAN1_CLK_SLEEP_ENABLE

+#define __CAN1_FORCE_RESET __HAL_RCC_CAN1_FORCE_RESET

+#define __CAN1_RELEASE_RESET __HAL_RCC_CAN1_RELEASE_RESET

+#define __CAN_CLK_DISABLE         __HAL_RCC_CAN1_CLK_DISABLE

+#define __CAN_CLK_ENABLE          __HAL_RCC_CAN1_CLK_ENABLE

+#define __CAN_FORCE_RESET         __HAL_RCC_CAN1_FORCE_RESET

+#define __CAN_RELEASE_RESET       __HAL_RCC_CAN1_RELEASE_RESET

+#define __CAN2_CLK_DISABLE __HAL_RCC_CAN2_CLK_DISABLE

+#define __CAN2_CLK_ENABLE __HAL_RCC_CAN2_CLK_ENABLE

+#define __CAN2_FORCE_RESET __HAL_RCC_CAN2_FORCE_RESET

+#define __CAN2_RELEASE_RESET __HAL_RCC_CAN2_RELEASE_RESET

+#define __CEC_CLK_DISABLE __HAL_RCC_CEC_CLK_DISABLE

+#define __CEC_CLK_ENABLE __HAL_RCC_CEC_CLK_ENABLE

+#define __COMP_CLK_DISABLE        __HAL_RCC_COMP_CLK_DISABLE

+#define __COMP_CLK_ENABLE         __HAL_RCC_COMP_CLK_ENABLE

+#define __COMP_FORCE_RESET        __HAL_RCC_COMP_FORCE_RESET

+#define __COMP_RELEASE_RESET      __HAL_RCC_COMP_RELEASE_RESET

+#define __COMP_CLK_SLEEP_ENABLE   __HAL_RCC_COMP_CLK_SLEEP_ENABLE

+#define __COMP_CLK_SLEEP_DISABLE  __HAL_RCC_COMP_CLK_SLEEP_DISABLE

+#define __CEC_FORCE_RESET __HAL_RCC_CEC_FORCE_RESET

+#define __CEC_RELEASE_RESET __HAL_RCC_CEC_RELEASE_RESET

+#define __CRC_CLK_DISABLE __HAL_RCC_CRC_CLK_DISABLE

+#define __CRC_CLK_ENABLE __HAL_RCC_CRC_CLK_ENABLE

+#define __CRC_CLK_SLEEP_DISABLE __HAL_RCC_CRC_CLK_SLEEP_DISABLE

+#define __CRC_CLK_SLEEP_ENABLE __HAL_RCC_CRC_CLK_SLEEP_ENABLE

+#define __CRC_FORCE_RESET __HAL_RCC_CRC_FORCE_RESET

+#define __CRC_RELEASE_RESET __HAL_RCC_CRC_RELEASE_RESET

+#define __DAC_CLK_DISABLE __HAL_RCC_DAC_CLK_DISABLE

+#define __DAC_CLK_ENABLE __HAL_RCC_DAC_CLK_ENABLE

+#define __DAC_FORCE_RESET __HAL_RCC_DAC_FORCE_RESET

+#define __DAC_RELEASE_RESET __HAL_RCC_DAC_RELEASE_RESET

+#define __DAC1_CLK_DISABLE __HAL_RCC_DAC1_CLK_DISABLE

+#define __DAC1_CLK_ENABLE __HAL_RCC_DAC1_CLK_ENABLE

+#define __DAC1_CLK_SLEEP_DISABLE __HAL_RCC_DAC1_CLK_SLEEP_DISABLE

+#define __DAC1_CLK_SLEEP_ENABLE __HAL_RCC_DAC1_CLK_SLEEP_ENABLE

+#define __DAC1_FORCE_RESET __HAL_RCC_DAC1_FORCE_RESET

+#define __DAC1_RELEASE_RESET __HAL_RCC_DAC1_RELEASE_RESET

+#define __DBGMCU_CLK_ENABLE     __HAL_RCC_DBGMCU_CLK_ENABLE

+#define __DBGMCU_CLK_DISABLE     __HAL_RCC_DBGMCU_CLK_DISABLE

+#define __DBGMCU_FORCE_RESET    __HAL_RCC_DBGMCU_FORCE_RESET

+#define __DBGMCU_RELEASE_RESET  __HAL_RCC_DBGMCU_RELEASE_RESET

+#define __DFSDM_CLK_DISABLE __HAL_RCC_DFSDM_CLK_DISABLE

+#define __DFSDM_CLK_ENABLE __HAL_RCC_DFSDM_CLK_ENABLE

+#define __DFSDM_CLK_SLEEP_DISABLE __HAL_RCC_DFSDM_CLK_SLEEP_DISABLE

+#define __DFSDM_CLK_SLEEP_ENABLE __HAL_RCC_DFSDM_CLK_SLEEP_ENABLE

+#define __DFSDM_FORCE_RESET __HAL_RCC_DFSDM_FORCE_RESET

+#define __DFSDM_RELEASE_RESET __HAL_RCC_DFSDM_RELEASE_RESET

+#define __DMA1_CLK_DISABLE __HAL_RCC_DMA1_CLK_DISABLE

+#define __DMA1_CLK_ENABLE __HAL_RCC_DMA1_CLK_ENABLE

+#define __DMA1_CLK_SLEEP_DISABLE __HAL_RCC_DMA1_CLK_SLEEP_DISABLE

+#define __DMA1_CLK_SLEEP_ENABLE __HAL_RCC_DMA1_CLK_SLEEP_ENABLE

+#define __DMA1_FORCE_RESET __HAL_RCC_DMA1_FORCE_RESET

+#define __DMA1_RELEASE_RESET __HAL_RCC_DMA1_RELEASE_RESET

+#define __DMA2_CLK_DISABLE __HAL_RCC_DMA2_CLK_DISABLE

+#define __DMA2_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE

+#define __DMA2_CLK_SLEEP_DISABLE __HAL_RCC_DMA2_CLK_SLEEP_DISABLE

+#define __DMA2_CLK_SLEEP_ENABLE __HAL_RCC_DMA2_CLK_SLEEP_ENABLE

+#define __DMA2_FORCE_RESET __HAL_RCC_DMA2_FORCE_RESET

+#define __DMA2_RELEASE_RESET __HAL_RCC_DMA2_RELEASE_RESET

+#define __ETHMAC_CLK_DISABLE __HAL_RCC_ETHMAC_CLK_DISABLE

+#define __ETHMAC_CLK_ENABLE __HAL_RCC_ETHMAC_CLK_ENABLE

+#define __ETHMAC_FORCE_RESET __HAL_RCC_ETHMAC_FORCE_RESET

+#define __ETHMAC_RELEASE_RESET __HAL_RCC_ETHMAC_RELEASE_RESET

+#define __ETHMACRX_CLK_DISABLE __HAL_RCC_ETHMACRX_CLK_DISABLE

+#define __ETHMACRX_CLK_ENABLE __HAL_RCC_ETHMACRX_CLK_ENABLE

+#define __ETHMACTX_CLK_DISABLE __HAL_RCC_ETHMACTX_CLK_DISABLE

+#define __ETHMACTX_CLK_ENABLE __HAL_RCC_ETHMACTX_CLK_ENABLE

+#define __FIREWALL_CLK_DISABLE __HAL_RCC_FIREWALL_CLK_DISABLE

+#define __FIREWALL_CLK_ENABLE __HAL_RCC_FIREWALL_CLK_ENABLE

+#define __FLASH_CLK_DISABLE __HAL_RCC_FLASH_CLK_DISABLE

+#define __FLASH_CLK_ENABLE __HAL_RCC_FLASH_CLK_ENABLE

+#define __FLASH_CLK_SLEEP_DISABLE __HAL_RCC_FLASH_CLK_SLEEP_DISABLE

+#define __FLASH_CLK_SLEEP_ENABLE __HAL_RCC_FLASH_CLK_SLEEP_ENABLE

+#define __FLASH_FORCE_RESET __HAL_RCC_FLASH_FORCE_RESET

+#define __FLASH_RELEASE_RESET __HAL_RCC_FLASH_RELEASE_RESET

+#define __FLITF_CLK_DISABLE       __HAL_RCC_FLITF_CLK_DISABLE

+#define __FLITF_CLK_ENABLE        __HAL_RCC_FLITF_CLK_ENABLE

+#define __FLITF_FORCE_RESET       __HAL_RCC_FLITF_FORCE_RESET

+#define __FLITF_RELEASE_RESET     __HAL_RCC_FLITF_RELEASE_RESET

+#define __FLITF_CLK_SLEEP_ENABLE  __HAL_RCC_FLITF_CLK_SLEEP_ENABLE

+#define __FLITF_CLK_SLEEP_DISABLE __HAL_RCC_FLITF_CLK_SLEEP_DISABLE

+#define __FMC_CLK_DISABLE __HAL_RCC_FMC_CLK_DISABLE

+#define __FMC_CLK_ENABLE __HAL_RCC_FMC_CLK_ENABLE

+#define __FMC_CLK_SLEEP_DISABLE __HAL_RCC_FMC_CLK_SLEEP_DISABLE

+#define __FMC_CLK_SLEEP_ENABLE __HAL_RCC_FMC_CLK_SLEEP_ENABLE

+#define __FMC_FORCE_RESET __HAL_RCC_FMC_FORCE_RESET

+#define __FMC_RELEASE_RESET __HAL_RCC_FMC_RELEASE_RESET

+#define __FSMC_CLK_DISABLE __HAL_RCC_FSMC_CLK_DISABLE

+#define __FSMC_CLK_ENABLE __HAL_RCC_FSMC_CLK_ENABLE

+#define __GPIOA_CLK_DISABLE __HAL_RCC_GPIOA_CLK_DISABLE

+#define __GPIOA_CLK_ENABLE __HAL_RCC_GPIOA_CLK_ENABLE

+#define __GPIOA_CLK_SLEEP_DISABLE __HAL_RCC_GPIOA_CLK_SLEEP_DISABLE

+#define __GPIOA_CLK_SLEEP_ENABLE __HAL_RCC_GPIOA_CLK_SLEEP_ENABLE

+#define __GPIOA_FORCE_RESET __HAL_RCC_GPIOA_FORCE_RESET

+#define __GPIOA_RELEASE_RESET __HAL_RCC_GPIOA_RELEASE_RESET

+#define __GPIOB_CLK_DISABLE __HAL_RCC_GPIOB_CLK_DISABLE

+#define __GPIOB_CLK_ENABLE __HAL_RCC_GPIOB_CLK_ENABLE

+#define __GPIOB_CLK_SLEEP_DISABLE __HAL_RCC_GPIOB_CLK_SLEEP_DISABLE

+#define __GPIOB_CLK_SLEEP_ENABLE __HAL_RCC_GPIOB_CLK_SLEEP_ENABLE

+#define __GPIOB_FORCE_RESET __HAL_RCC_GPIOB_FORCE_RESET

+#define __GPIOB_RELEASE_RESET __HAL_RCC_GPIOB_RELEASE_RESET

+#define __GPIOC_CLK_DISABLE __HAL_RCC_GPIOC_CLK_DISABLE

+#define __GPIOC_CLK_ENABLE __HAL_RCC_GPIOC_CLK_ENABLE

+#define __GPIOC_CLK_SLEEP_DISABLE __HAL_RCC_GPIOC_CLK_SLEEP_DISABLE

+#define __GPIOC_CLK_SLEEP_ENABLE __HAL_RCC_GPIOC_CLK_SLEEP_ENABLE

+#define __GPIOC_FORCE_RESET __HAL_RCC_GPIOC_FORCE_RESET

+#define __GPIOC_RELEASE_RESET __HAL_RCC_GPIOC_RELEASE_RESET

+#define __GPIOD_CLK_DISABLE __HAL_RCC_GPIOD_CLK_DISABLE

+#define __GPIOD_CLK_ENABLE __HAL_RCC_GPIOD_CLK_ENABLE

+#define __GPIOD_CLK_SLEEP_DISABLE __HAL_RCC_GPIOD_CLK_SLEEP_DISABLE

+#define __GPIOD_CLK_SLEEP_ENABLE __HAL_RCC_GPIOD_CLK_SLEEP_ENABLE

+#define __GPIOD_FORCE_RESET __HAL_RCC_GPIOD_FORCE_RESET

+#define __GPIOD_RELEASE_RESET __HAL_RCC_GPIOD_RELEASE_RESET

+#define __GPIOE_CLK_DISABLE __HAL_RCC_GPIOE_CLK_DISABLE

+#define __GPIOE_CLK_ENABLE __HAL_RCC_GPIOE_CLK_ENABLE

+#define __GPIOE_CLK_SLEEP_DISABLE __HAL_RCC_GPIOE_CLK_SLEEP_DISABLE

+#define __GPIOE_CLK_SLEEP_ENABLE __HAL_RCC_GPIOE_CLK_SLEEP_ENABLE

+#define __GPIOE_FORCE_RESET __HAL_RCC_GPIOE_FORCE_RESET

+#define __GPIOE_RELEASE_RESET __HAL_RCC_GPIOE_RELEASE_RESET

+#define __GPIOF_CLK_DISABLE __HAL_RCC_GPIOF_CLK_DISABLE

+#define __GPIOF_CLK_ENABLE __HAL_RCC_GPIOF_CLK_ENABLE

+#define __GPIOF_CLK_SLEEP_DISABLE __HAL_RCC_GPIOF_CLK_SLEEP_DISABLE

+#define __GPIOF_CLK_SLEEP_ENABLE __HAL_RCC_GPIOF_CLK_SLEEP_ENABLE

+#define __GPIOF_FORCE_RESET __HAL_RCC_GPIOF_FORCE_RESET

+#define __GPIOF_RELEASE_RESET __HAL_RCC_GPIOF_RELEASE_RESET

+#define __GPIOG_CLK_DISABLE __HAL_RCC_GPIOG_CLK_DISABLE

+#define __GPIOG_CLK_ENABLE __HAL_RCC_GPIOG_CLK_ENABLE

+#define __GPIOG_CLK_SLEEP_DISABLE __HAL_RCC_GPIOG_CLK_SLEEP_DISABLE

+#define __GPIOG_CLK_SLEEP_ENABLE __HAL_RCC_GPIOG_CLK_SLEEP_ENABLE

+#define __GPIOG_FORCE_RESET __HAL_RCC_GPIOG_FORCE_RESET

+#define __GPIOG_RELEASE_RESET __HAL_RCC_GPIOG_RELEASE_RESET

+#define __GPIOH_CLK_DISABLE __HAL_RCC_GPIOH_CLK_DISABLE

+#define __GPIOH_CLK_ENABLE __HAL_RCC_GPIOH_CLK_ENABLE

+#define __GPIOH_CLK_SLEEP_DISABLE __HAL_RCC_GPIOH_CLK_SLEEP_DISABLE

+#define __GPIOH_CLK_SLEEP_ENABLE __HAL_RCC_GPIOH_CLK_SLEEP_ENABLE

+#define __GPIOH_FORCE_RESET __HAL_RCC_GPIOH_FORCE_RESET

+#define __GPIOH_RELEASE_RESET __HAL_RCC_GPIOH_RELEASE_RESET

+#define __I2C1_CLK_DISABLE __HAL_RCC_I2C1_CLK_DISABLE

+#define __I2C1_CLK_ENABLE __HAL_RCC_I2C1_CLK_ENABLE

+#define __I2C1_CLK_SLEEP_DISABLE __HAL_RCC_I2C1_CLK_SLEEP_DISABLE

+#define __I2C1_CLK_SLEEP_ENABLE __HAL_RCC_I2C1_CLK_SLEEP_ENABLE

+#define __I2C1_FORCE_RESET __HAL_RCC_I2C1_FORCE_RESET

+#define __I2C1_RELEASE_RESET __HAL_RCC_I2C1_RELEASE_RESET

+#define __I2C2_CLK_DISABLE __HAL_RCC_I2C2_CLK_DISABLE

+#define __I2C2_CLK_ENABLE __HAL_RCC_I2C2_CLK_ENABLE

+#define __I2C2_CLK_SLEEP_DISABLE __HAL_RCC_I2C2_CLK_SLEEP_DISABLE

+#define __I2C2_CLK_SLEEP_ENABLE __HAL_RCC_I2C2_CLK_SLEEP_ENABLE

+#define __I2C2_FORCE_RESET __HAL_RCC_I2C2_FORCE_RESET

+#define __I2C2_RELEASE_RESET __HAL_RCC_I2C2_RELEASE_RESET

+#define __I2C3_CLK_DISABLE __HAL_RCC_I2C3_CLK_DISABLE

+#define __I2C3_CLK_ENABLE __HAL_RCC_I2C3_CLK_ENABLE

+#define __I2C3_CLK_SLEEP_DISABLE __HAL_RCC_I2C3_CLK_SLEEP_DISABLE

+#define __I2C3_CLK_SLEEP_ENABLE __HAL_RCC_I2C3_CLK_SLEEP_ENABLE

+#define __I2C3_FORCE_RESET __HAL_RCC_I2C3_FORCE_RESET

+#define __I2C3_RELEASE_RESET __HAL_RCC_I2C3_RELEASE_RESET

+#define __LCD_CLK_DISABLE __HAL_RCC_LCD_CLK_DISABLE

+#define __LCD_CLK_ENABLE __HAL_RCC_LCD_CLK_ENABLE

+#define __LCD_CLK_SLEEP_DISABLE __HAL_RCC_LCD_CLK_SLEEP_DISABLE

+#define __LCD_CLK_SLEEP_ENABLE __HAL_RCC_LCD_CLK_SLEEP_ENABLE

+#define __LCD_FORCE_RESET __HAL_RCC_LCD_FORCE_RESET

+#define __LCD_RELEASE_RESET __HAL_RCC_LCD_RELEASE_RESET

+#define __LPTIM1_CLK_DISABLE __HAL_RCC_LPTIM1_CLK_DISABLE

+#define __LPTIM1_CLK_ENABLE __HAL_RCC_LPTIM1_CLK_ENABLE

+#define __LPTIM1_CLK_SLEEP_DISABLE __HAL_RCC_LPTIM1_CLK_SLEEP_DISABLE

+#define __LPTIM1_CLK_SLEEP_ENABLE __HAL_RCC_LPTIM1_CLK_SLEEP_ENABLE

+#define __LPTIM1_FORCE_RESET __HAL_RCC_LPTIM1_FORCE_RESET

+#define __LPTIM1_RELEASE_RESET __HAL_RCC_LPTIM1_RELEASE_RESET

+#define __LPTIM2_CLK_DISABLE __HAL_RCC_LPTIM2_CLK_DISABLE

+#define __LPTIM2_CLK_ENABLE __HAL_RCC_LPTIM2_CLK_ENABLE

+#define __LPTIM2_CLK_SLEEP_DISABLE __HAL_RCC_LPTIM2_CLK_SLEEP_DISABLE

+#define __LPTIM2_CLK_SLEEP_ENABLE __HAL_RCC_LPTIM2_CLK_SLEEP_ENABLE

+#define __LPTIM2_FORCE_RESET __HAL_RCC_LPTIM2_FORCE_RESET

+#define __LPTIM2_RELEASE_RESET __HAL_RCC_LPTIM2_RELEASE_RESET

+#define __LPUART1_CLK_DISABLE __HAL_RCC_LPUART1_CLK_DISABLE

+#define __LPUART1_CLK_ENABLE __HAL_RCC_LPUART1_CLK_ENABLE

+#define __LPUART1_CLK_SLEEP_DISABLE __HAL_RCC_LPUART1_CLK_SLEEP_DISABLE

+#define __LPUART1_CLK_SLEEP_ENABLE __HAL_RCC_LPUART1_CLK_SLEEP_ENABLE

+#define __LPUART1_FORCE_RESET __HAL_RCC_LPUART1_FORCE_RESET

+#define __LPUART1_RELEASE_RESET __HAL_RCC_LPUART1_RELEASE_RESET

+#define __OPAMP_CLK_DISABLE __HAL_RCC_OPAMP_CLK_DISABLE

+#define __OPAMP_CLK_ENABLE __HAL_RCC_OPAMP_CLK_ENABLE

+#define __OPAMP_CLK_SLEEP_DISABLE __HAL_RCC_OPAMP_CLK_SLEEP_DISABLE

+#define __OPAMP_CLK_SLEEP_ENABLE __HAL_RCC_OPAMP_CLK_SLEEP_ENABLE

+#define __OPAMP_FORCE_RESET __HAL_RCC_OPAMP_FORCE_RESET

+#define __OPAMP_RELEASE_RESET __HAL_RCC_OPAMP_RELEASE_RESET

+#define __OTGFS_CLK_DISABLE __HAL_RCC_OTGFS_CLK_DISABLE

+#define __OTGFS_CLK_ENABLE __HAL_RCC_OTGFS_CLK_ENABLE

+#define __OTGFS_CLK_SLEEP_DISABLE __HAL_RCC_OTGFS_CLK_SLEEP_DISABLE

+#define __OTGFS_CLK_SLEEP_ENABLE __HAL_RCC_OTGFS_CLK_SLEEP_ENABLE

+#define __OTGFS_FORCE_RESET __HAL_RCC_OTGFS_FORCE_RESET

+#define __OTGFS_RELEASE_RESET __HAL_RCC_OTGFS_RELEASE_RESET

+#define __PWR_CLK_DISABLE __HAL_RCC_PWR_CLK_DISABLE

+#define __PWR_CLK_ENABLE __HAL_RCC_PWR_CLK_ENABLE

+#define __PWR_CLK_SLEEP_DISABLE __HAL_RCC_PWR_CLK_SLEEP_DISABLE

+#define __PWR_CLK_SLEEP_ENABLE __HAL_RCC_PWR_CLK_SLEEP_ENABLE

+#define __PWR_FORCE_RESET __HAL_RCC_PWR_FORCE_RESET

+#define __PWR_RELEASE_RESET __HAL_RCC_PWR_RELEASE_RESET

+#define __QSPI_CLK_DISABLE __HAL_RCC_QSPI_CLK_DISABLE

+#define __QSPI_CLK_ENABLE __HAL_RCC_QSPI_CLK_ENABLE

+#define __QSPI_CLK_SLEEP_DISABLE __HAL_RCC_QSPI_CLK_SLEEP_DISABLE

+#define __QSPI_CLK_SLEEP_ENABLE __HAL_RCC_QSPI_CLK_SLEEP_ENABLE

+#define __QSPI_FORCE_RESET __HAL_RCC_QSPI_FORCE_RESET

+#define __QSPI_RELEASE_RESET __HAL_RCC_QSPI_RELEASE_RESET

+#define __RNG_CLK_DISABLE __HAL_RCC_RNG_CLK_DISABLE

+#define __RNG_CLK_ENABLE __HAL_RCC_RNG_CLK_ENABLE

+#define __RNG_CLK_SLEEP_DISABLE __HAL_RCC_RNG_CLK_SLEEP_DISABLE

+#define __RNG_CLK_SLEEP_ENABLE __HAL_RCC_RNG_CLK_SLEEP_ENABLE

+#define __RNG_FORCE_RESET __HAL_RCC_RNG_FORCE_RESET

+#define __RNG_RELEASE_RESET __HAL_RCC_RNG_RELEASE_RESET

+#define __SAI1_CLK_DISABLE __HAL_RCC_SAI1_CLK_DISABLE

+#define __SAI1_CLK_ENABLE __HAL_RCC_SAI1_CLK_ENABLE

+#define __SAI1_CLK_SLEEP_DISABLE __HAL_RCC_SAI1_CLK_SLEEP_DISABLE

+#define __SAI1_CLK_SLEEP_ENABLE __HAL_RCC_SAI1_CLK_SLEEP_ENABLE

+#define __SAI1_FORCE_RESET __HAL_RCC_SAI1_FORCE_RESET

+#define __SAI1_RELEASE_RESET __HAL_RCC_SAI1_RELEASE_RESET

+#define __SAI2_CLK_DISABLE __HAL_RCC_SAI2_CLK_DISABLE

+#define __SAI2_CLK_ENABLE __HAL_RCC_SAI2_CLK_ENABLE

+#define __SAI2_CLK_SLEEP_DISABLE __HAL_RCC_SAI2_CLK_SLEEP_DISABLE

+#define __SAI2_CLK_SLEEP_ENABLE __HAL_RCC_SAI2_CLK_SLEEP_ENABLE

+#define __SAI2_FORCE_RESET __HAL_RCC_SAI2_FORCE_RESET

+#define __SAI2_RELEASE_RESET __HAL_RCC_SAI2_RELEASE_RESET

+#define __SDIO_CLK_DISABLE __HAL_RCC_SDIO_CLK_DISABLE

+#define __SDIO_CLK_ENABLE __HAL_RCC_SDIO_CLK_ENABLE

+#define __SDMMC_CLK_DISABLE __HAL_RCC_SDMMC_CLK_DISABLE

+#define __SDMMC_CLK_ENABLE __HAL_RCC_SDMMC_CLK_ENABLE

+#define __SDMMC_CLK_SLEEP_DISABLE __HAL_RCC_SDMMC_CLK_SLEEP_DISABLE

+#define __SDMMC_CLK_SLEEP_ENABLE __HAL_RCC_SDMMC_CLK_SLEEP_ENABLE

+#define __SDMMC_FORCE_RESET __HAL_RCC_SDMMC_FORCE_RESET

+#define __SDMMC_RELEASE_RESET __HAL_RCC_SDMMC_RELEASE_RESET

+#define __SPI1_CLK_DISABLE __HAL_RCC_SPI1_CLK_DISABLE

+#define __SPI1_CLK_ENABLE __HAL_RCC_SPI1_CLK_ENABLE

+#define __SPI1_CLK_SLEEP_DISABLE __HAL_RCC_SPI1_CLK_SLEEP_DISABLE

+#define __SPI1_CLK_SLEEP_ENABLE __HAL_RCC_SPI1_CLK_SLEEP_ENABLE

+#define __SPI1_FORCE_RESET __HAL_RCC_SPI1_FORCE_RESET

+#define __SPI1_RELEASE_RESET __HAL_RCC_SPI1_RELEASE_RESET

+#define __SPI2_CLK_DISABLE __HAL_RCC_SPI2_CLK_DISABLE

+#define __SPI2_CLK_ENABLE __HAL_RCC_SPI2_CLK_ENABLE

+#define __SPI2_CLK_SLEEP_DISABLE __HAL_RCC_SPI2_CLK_SLEEP_DISABLE

+#define __SPI2_CLK_SLEEP_ENABLE __HAL_RCC_SPI2_CLK_SLEEP_ENABLE

+#define __SPI2_FORCE_RESET __HAL_RCC_SPI2_FORCE_RESET

+#define __SPI2_RELEASE_RESET __HAL_RCC_SPI2_RELEASE_RESET

+#define __SPI3_CLK_DISABLE __HAL_RCC_SPI3_CLK_DISABLE

+#define __SPI3_CLK_ENABLE __HAL_RCC_SPI3_CLK_ENABLE

+#define __SPI3_CLK_SLEEP_DISABLE __HAL_RCC_SPI3_CLK_SLEEP_DISABLE

+#define __SPI3_CLK_SLEEP_ENABLE __HAL_RCC_SPI3_CLK_SLEEP_ENABLE

+#define __SPI3_FORCE_RESET __HAL_RCC_SPI3_FORCE_RESET

+#define __SPI3_RELEASE_RESET __HAL_RCC_SPI3_RELEASE_RESET

+#define __SRAM_CLK_DISABLE __HAL_RCC_SRAM_CLK_DISABLE

+#define __SRAM_CLK_ENABLE __HAL_RCC_SRAM_CLK_ENABLE

+#define __SRAM1_CLK_SLEEP_DISABLE __HAL_RCC_SRAM1_CLK_SLEEP_DISABLE

+#define __SRAM1_CLK_SLEEP_ENABLE __HAL_RCC_SRAM1_CLK_SLEEP_ENABLE

+#define __SRAM2_CLK_SLEEP_DISABLE __HAL_RCC_SRAM2_CLK_SLEEP_DISABLE

+#define __SRAM2_CLK_SLEEP_ENABLE __HAL_RCC_SRAM2_CLK_SLEEP_ENABLE

+#define __SWPMI1_CLK_DISABLE __HAL_RCC_SWPMI1_CLK_DISABLE

+#define __SWPMI1_CLK_ENABLE __HAL_RCC_SWPMI1_CLK_ENABLE

+#define __SWPMI1_CLK_SLEEP_DISABLE __HAL_RCC_SWPMI1_CLK_SLEEP_DISABLE

+#define __SWPMI1_CLK_SLEEP_ENABLE __HAL_RCC_SWPMI1_CLK_SLEEP_ENABLE

+#define __SWPMI1_FORCE_RESET __HAL_RCC_SWPMI1_FORCE_RESET

+#define __SWPMI1_RELEASE_RESET __HAL_RCC_SWPMI1_RELEASE_RESET

+#define __SYSCFG_CLK_DISABLE __HAL_RCC_SYSCFG_CLK_DISABLE

+#define __SYSCFG_CLK_ENABLE __HAL_RCC_SYSCFG_CLK_ENABLE

+#define __SYSCFG_CLK_SLEEP_DISABLE __HAL_RCC_SYSCFG_CLK_SLEEP_DISABLE

+#define __SYSCFG_CLK_SLEEP_ENABLE __HAL_RCC_SYSCFG_CLK_SLEEP_ENABLE

+#define __SYSCFG_FORCE_RESET __HAL_RCC_SYSCFG_FORCE_RESET

+#define __SYSCFG_RELEASE_RESET __HAL_RCC_SYSCFG_RELEASE_RESET

+#define __TIM1_CLK_DISABLE __HAL_RCC_TIM1_CLK_DISABLE

+#define __TIM1_CLK_ENABLE __HAL_RCC_TIM1_CLK_ENABLE

+#define __TIM1_CLK_SLEEP_DISABLE __HAL_RCC_TIM1_CLK_SLEEP_DISABLE

+#define __TIM1_CLK_SLEEP_ENABLE __HAL_RCC_TIM1_CLK_SLEEP_ENABLE

+#define __TIM1_FORCE_RESET __HAL_RCC_TIM1_FORCE_RESET

+#define __TIM1_RELEASE_RESET __HAL_RCC_TIM1_RELEASE_RESET

+#define __TIM10_CLK_DISABLE __HAL_RCC_TIM10_CLK_DISABLE

+#define __TIM10_CLK_ENABLE __HAL_RCC_TIM10_CLK_ENABLE

+#define __TIM10_FORCE_RESET __HAL_RCC_TIM10_FORCE_RESET

+#define __TIM10_RELEASE_RESET __HAL_RCC_TIM10_RELEASE_RESET

+#define __TIM11_CLK_DISABLE __HAL_RCC_TIM11_CLK_DISABLE

+#define __TIM11_CLK_ENABLE __HAL_RCC_TIM11_CLK_ENABLE

+#define __TIM11_FORCE_RESET __HAL_RCC_TIM11_FORCE_RESET

+#define __TIM11_RELEASE_RESET __HAL_RCC_TIM11_RELEASE_RESET

+#define __TIM12_CLK_DISABLE __HAL_RCC_TIM12_CLK_DISABLE

+#define __TIM12_CLK_ENABLE __HAL_RCC_TIM12_CLK_ENABLE

+#define __TIM12_FORCE_RESET __HAL_RCC_TIM12_FORCE_RESET

+#define __TIM12_RELEASE_RESET __HAL_RCC_TIM12_RELEASE_RESET

+#define __TIM13_CLK_DISABLE __HAL_RCC_TIM13_CLK_DISABLE

+#define __TIM13_CLK_ENABLE __HAL_RCC_TIM13_CLK_ENABLE

+#define __TIM13_FORCE_RESET __HAL_RCC_TIM13_FORCE_RESET

+#define __TIM13_RELEASE_RESET __HAL_RCC_TIM13_RELEASE_RESET

+#define __TIM14_CLK_DISABLE __HAL_RCC_TIM14_CLK_DISABLE

+#define __TIM14_CLK_ENABLE __HAL_RCC_TIM14_CLK_ENABLE

+#define __TIM14_FORCE_RESET __HAL_RCC_TIM14_FORCE_RESET

+#define __TIM14_RELEASE_RESET __HAL_RCC_TIM14_RELEASE_RESET

+#define __TIM15_CLK_DISABLE __HAL_RCC_TIM15_CLK_DISABLE

+#define __TIM15_CLK_ENABLE __HAL_RCC_TIM15_CLK_ENABLE

+#define __TIM15_CLK_SLEEP_DISABLE __HAL_RCC_TIM15_CLK_SLEEP_DISABLE

+#define __TIM15_CLK_SLEEP_ENABLE __HAL_RCC_TIM15_CLK_SLEEP_ENABLE

+#define __TIM15_FORCE_RESET __HAL_RCC_TIM15_FORCE_RESET

+#define __TIM15_RELEASE_RESET __HAL_RCC_TIM15_RELEASE_RESET

+#define __TIM16_CLK_DISABLE __HAL_RCC_TIM16_CLK_DISABLE

+#define __TIM16_CLK_ENABLE __HAL_RCC_TIM16_CLK_ENABLE

+#define __TIM16_CLK_SLEEP_DISABLE __HAL_RCC_TIM16_CLK_SLEEP_DISABLE

+#define __TIM16_CLK_SLEEP_ENABLE __HAL_RCC_TIM16_CLK_SLEEP_ENABLE

+#define __TIM16_FORCE_RESET __HAL_RCC_TIM16_FORCE_RESET

+#define __TIM16_RELEASE_RESET __HAL_RCC_TIM16_RELEASE_RESET

+#define __TIM17_CLK_DISABLE __HAL_RCC_TIM17_CLK_DISABLE

+#define __TIM17_CLK_ENABLE __HAL_RCC_TIM17_CLK_ENABLE

+#define __TIM17_CLK_SLEEP_DISABLE __HAL_RCC_TIM17_CLK_SLEEP_DISABLE

+#define __TIM17_CLK_SLEEP_ENABLE __HAL_RCC_TIM17_CLK_SLEEP_ENABLE

+#define __TIM17_FORCE_RESET __HAL_RCC_TIM17_FORCE_RESET

+#define __TIM17_RELEASE_RESET __HAL_RCC_TIM17_RELEASE_RESET

+#define __TIM2_CLK_DISABLE __HAL_RCC_TIM2_CLK_DISABLE

+#define __TIM2_CLK_ENABLE __HAL_RCC_TIM2_CLK_ENABLE

+#define __TIM2_CLK_SLEEP_DISABLE __HAL_RCC_TIM2_CLK_SLEEP_DISABLE

+#define __TIM2_CLK_SLEEP_ENABLE __HAL_RCC_TIM2_CLK_SLEEP_ENABLE

+#define __TIM2_FORCE_RESET __HAL_RCC_TIM2_FORCE_RESET

+#define __TIM2_RELEASE_RESET __HAL_RCC_TIM2_RELEASE_RESET

+#define __TIM3_CLK_DISABLE __HAL_RCC_TIM3_CLK_DISABLE

+#define __TIM3_CLK_ENABLE __HAL_RCC_TIM3_CLK_ENABLE

+#define __TIM3_CLK_SLEEP_DISABLE __HAL_RCC_TIM3_CLK_SLEEP_DISABLE

+#define __TIM3_CLK_SLEEP_ENABLE __HAL_RCC_TIM3_CLK_SLEEP_ENABLE

+#define __TIM3_FORCE_RESET __HAL_RCC_TIM3_FORCE_RESET

+#define __TIM3_RELEASE_RESET __HAL_RCC_TIM3_RELEASE_RESET

+#define __TIM4_CLK_DISABLE __HAL_RCC_TIM4_CLK_DISABLE

+#define __TIM4_CLK_ENABLE __HAL_RCC_TIM4_CLK_ENABLE

+#define __TIM4_CLK_SLEEP_DISABLE __HAL_RCC_TIM4_CLK_SLEEP_DISABLE

+#define __TIM4_CLK_SLEEP_ENABLE __HAL_RCC_TIM4_CLK_SLEEP_ENABLE

+#define __TIM4_FORCE_RESET __HAL_RCC_TIM4_FORCE_RESET

+#define __TIM4_RELEASE_RESET __HAL_RCC_TIM4_RELEASE_RESET

+#define __TIM5_CLK_DISABLE __HAL_RCC_TIM5_CLK_DISABLE

+#define __TIM5_CLK_ENABLE __HAL_RCC_TIM5_CLK_ENABLE

+#define __TIM5_CLK_SLEEP_DISABLE __HAL_RCC_TIM5_CLK_SLEEP_DISABLE

+#define __TIM5_CLK_SLEEP_ENABLE __HAL_RCC_TIM5_CLK_SLEEP_ENABLE

+#define __TIM5_FORCE_RESET __HAL_RCC_TIM5_FORCE_RESET

+#define __TIM5_RELEASE_RESET __HAL_RCC_TIM5_RELEASE_RESET

+#define __TIM6_CLK_DISABLE __HAL_RCC_TIM6_CLK_DISABLE

+#define __TIM6_CLK_ENABLE __HAL_RCC_TIM6_CLK_ENABLE

+#define __TIM6_CLK_SLEEP_DISABLE __HAL_RCC_TIM6_CLK_SLEEP_DISABLE

+#define __TIM6_CLK_SLEEP_ENABLE __HAL_RCC_TIM6_CLK_SLEEP_ENABLE

+#define __TIM6_FORCE_RESET __HAL_RCC_TIM6_FORCE_RESET

+#define __TIM6_RELEASE_RESET __HAL_RCC_TIM6_RELEASE_RESET

+#define __TIM7_CLK_DISABLE __HAL_RCC_TIM7_CLK_DISABLE

+#define __TIM7_CLK_ENABLE __HAL_RCC_TIM7_CLK_ENABLE

+#define __TIM7_CLK_SLEEP_DISABLE __HAL_RCC_TIM7_CLK_SLEEP_DISABLE

+#define __TIM7_CLK_SLEEP_ENABLE __HAL_RCC_TIM7_CLK_SLEEP_ENABLE

+#define __TIM7_FORCE_RESET __HAL_RCC_TIM7_FORCE_RESET

+#define __TIM7_RELEASE_RESET __HAL_RCC_TIM7_RELEASE_RESET

+#define __TIM8_CLK_DISABLE __HAL_RCC_TIM8_CLK_DISABLE

+#define __TIM8_CLK_ENABLE __HAL_RCC_TIM8_CLK_ENABLE

+#define __TIM8_CLK_SLEEP_DISABLE __HAL_RCC_TIM8_CLK_SLEEP_DISABLE

+#define __TIM8_CLK_SLEEP_ENABLE __HAL_RCC_TIM8_CLK_SLEEP_ENABLE

+#define __TIM8_FORCE_RESET __HAL_RCC_TIM8_FORCE_RESET

+#define __TIM8_RELEASE_RESET __HAL_RCC_TIM8_RELEASE_RESET

+#define __TIM9_CLK_DISABLE __HAL_RCC_TIM9_CLK_DISABLE

+#define __TIM9_CLK_ENABLE __HAL_RCC_TIM9_CLK_ENABLE

+#define __TIM9_FORCE_RESET __HAL_RCC_TIM9_FORCE_RESET

+#define __TIM9_RELEASE_RESET __HAL_RCC_TIM9_RELEASE_RESET

+#define __TSC_CLK_DISABLE __HAL_RCC_TSC_CLK_DISABLE

+#define __TSC_CLK_ENABLE __HAL_RCC_TSC_CLK_ENABLE

+#define __TSC_CLK_SLEEP_DISABLE __HAL_RCC_TSC_CLK_SLEEP_DISABLE

+#define __TSC_CLK_SLEEP_ENABLE __HAL_RCC_TSC_CLK_SLEEP_ENABLE

+#define __TSC_FORCE_RESET __HAL_RCC_TSC_FORCE_RESET

+#define __TSC_RELEASE_RESET __HAL_RCC_TSC_RELEASE_RESET

+#define __UART4_CLK_DISABLE __HAL_RCC_UART4_CLK_DISABLE

+#define __UART4_CLK_ENABLE __HAL_RCC_UART4_CLK_ENABLE

+#define __UART4_CLK_SLEEP_DISABLE __HAL_RCC_UART4_CLK_SLEEP_DISABLE

+#define __UART4_CLK_SLEEP_ENABLE __HAL_RCC_UART4_CLK_SLEEP_ENABLE

+#define __UART4_FORCE_RESET __HAL_RCC_UART4_FORCE_RESET

+#define __UART4_RELEASE_RESET __HAL_RCC_UART4_RELEASE_RESET

+#define __UART5_CLK_DISABLE __HAL_RCC_UART5_CLK_DISABLE

+#define __UART5_CLK_ENABLE __HAL_RCC_UART5_CLK_ENABLE

+#define __UART5_CLK_SLEEP_DISABLE __HAL_RCC_UART5_CLK_SLEEP_DISABLE

+#define __UART5_CLK_SLEEP_ENABLE __HAL_RCC_UART5_CLK_SLEEP_ENABLE

+#define __UART5_FORCE_RESET __HAL_RCC_UART5_FORCE_RESET

+#define __UART5_RELEASE_RESET __HAL_RCC_UART5_RELEASE_RESET

+#define __USART1_CLK_DISABLE __HAL_RCC_USART1_CLK_DISABLE

+#define __USART1_CLK_ENABLE __HAL_RCC_USART1_CLK_ENABLE

+#define __USART1_CLK_SLEEP_DISABLE __HAL_RCC_USART1_CLK_SLEEP_DISABLE

+#define __USART1_CLK_SLEEP_ENABLE __HAL_RCC_USART1_CLK_SLEEP_ENABLE

+#define __USART1_FORCE_RESET __HAL_RCC_USART1_FORCE_RESET

+#define __USART1_RELEASE_RESET __HAL_RCC_USART1_RELEASE_RESET

+#define __USART2_CLK_DISABLE __HAL_RCC_USART2_CLK_DISABLE

+#define __USART2_CLK_ENABLE __HAL_RCC_USART2_CLK_ENABLE

+#define __USART2_CLK_SLEEP_DISABLE __HAL_RCC_USART2_CLK_SLEEP_DISABLE

+#define __USART2_CLK_SLEEP_ENABLE __HAL_RCC_USART2_CLK_SLEEP_ENABLE

+#define __USART2_FORCE_RESET __HAL_RCC_USART2_FORCE_RESET

+#define __USART2_RELEASE_RESET __HAL_RCC_USART2_RELEASE_RESET

+#define __USART3_CLK_DISABLE __HAL_RCC_USART3_CLK_DISABLE

+#define __USART3_CLK_ENABLE __HAL_RCC_USART3_CLK_ENABLE

+#define __USART3_CLK_SLEEP_DISABLE __HAL_RCC_USART3_CLK_SLEEP_DISABLE

+#define __USART3_CLK_SLEEP_ENABLE __HAL_RCC_USART3_CLK_SLEEP_ENABLE

+#define __USART3_FORCE_RESET __HAL_RCC_USART3_FORCE_RESET

+#define __USART3_RELEASE_RESET __HAL_RCC_USART3_RELEASE_RESET

+#define __USART4_CLK_DISABLE        __HAL_RCC_USART4_CLK_DISABLE

+#define __USART4_CLK_ENABLE         __HAL_RCC_USART4_CLK_ENABLE

+#define __USART4_CLK_SLEEP_ENABLE   __HAL_RCC_USART4_CLK_SLEEP_ENABLE

+#define __USART4_CLK_SLEEP_DISABLE  __HAL_RCC_USART4_CLK_SLEEP_DISABLE 

+#define __USART4_FORCE_RESET        __HAL_RCC_USART4_FORCE_RESET

+#define __USART4_RELEASE_RESET      __HAL_RCC_USART4_RELEASE_RESET

+#define __USART5_CLK_DISABLE        __HAL_RCC_USART5_CLK_DISABLE

+#define __USART5_CLK_ENABLE         __HAL_RCC_USART5_CLK_ENABLE

+#define __USART5_CLK_SLEEP_ENABLE   __HAL_RCC_USART5_CLK_SLEEP_ENABLE

+#define __USART5_CLK_SLEEP_DISABLE  __HAL_RCC_USART5_CLK_SLEEP_DISABLE 

+#define __USART5_FORCE_RESET        __HAL_RCC_USART5_FORCE_RESET

+#define __USART5_RELEASE_RESET      __HAL_RCC_USART5_RELEASE_RESET

+#define __USART7_CLK_DISABLE        __HAL_RCC_USART7_CLK_DISABLE

+#define __USART7_CLK_ENABLE         __HAL_RCC_USART7_CLK_ENABLE

+#define __USART7_FORCE_RESET        __HAL_RCC_USART7_FORCE_RESET

+#define __USART7_RELEASE_RESET      __HAL_RCC_USART7_RELEASE_RESET

+#define __USART8_CLK_DISABLE        __HAL_RCC_USART8_CLK_DISABLE

+#define __USART8_CLK_ENABLE         __HAL_RCC_USART8_CLK_ENABLE

+#define __USART8_FORCE_RESET        __HAL_RCC_USART8_FORCE_RESET

+#define __USART8_RELEASE_RESET      __HAL_RCC_USART8_RELEASE_RESET

+#define __USB_CLK_DISABLE         __HAL_RCC_USB_CLK_DISABLE

+#define __USB_CLK_ENABLE          __HAL_RCC_USB_CLK_ENABLE

+#define __USB_FORCE_RESET         __HAL_RCC_USB_FORCE_RESET

+#define __USB_CLK_SLEEP_ENABLE    __HAL_RCC_USB_CLK_SLEEP_ENABLE

+#define __USB_CLK_SLEEP_DISABLE   __HAL_RCC_USB_CLK_SLEEP_DISABLE

+#define __USB_OTG_FS_CLK_DISABLE __HAL_RCC_USB_OTG_FS_CLK_DISABLE

+#define __USB_OTG_FS_CLK_ENABLE __HAL_RCC_USB_OTG_FS_CLK_ENABLE

+#define __USB_RELEASE_RESET __HAL_RCC_USB_RELEASE_RESET

+#define __WWDG_CLK_DISABLE __HAL_RCC_WWDG_CLK_DISABLE

+#define __WWDG_CLK_ENABLE __HAL_RCC_WWDG_CLK_ENABLE

+#define __WWDG_CLK_SLEEP_DISABLE __HAL_RCC_WWDG_CLK_SLEEP_DISABLE

+#define __WWDG_CLK_SLEEP_ENABLE __HAL_RCC_WWDG_CLK_SLEEP_ENABLE

+#define __WWDG_FORCE_RESET __HAL_RCC_WWDG_FORCE_RESET

+#define __WWDG_RELEASE_RESET __HAL_RCC_WWDG_RELEASE_RESET

+#define __TIM21_CLK_ENABLE   __HAL_RCC_TIM21_CLK_ENABLE

+#define __TIM21_CLK_DISABLE   __HAL_RCC_TIM21_CLK_DISABLE

+#define __TIM21_FORCE_RESET   __HAL_RCC_TIM21_FORCE_RESET

+#define __TIM21_RELEASE_RESET  __HAL_RCC_TIM21_RELEASE_RESET

+#define __TIM21_CLK_SLEEP_ENABLE   __HAL_RCC_TIM21_CLK_SLEEP_ENABLE

+#define __TIM21_CLK_SLEEP_DISABLE   __HAL_RCC_TIM21_CLK_SLEEP_DISABLE

+#define __TIM22_CLK_ENABLE   __HAL_RCC_TIM22_CLK_ENABLE

+#define __TIM22_CLK_DISABLE   __HAL_RCC_TIM22_CLK_DISABLE

+#define __TIM22_FORCE_RESET   __HAL_RCC_TIM22_FORCE_RESET

+#define __TIM22_RELEASE_RESET  __HAL_RCC_TIM22_RELEASE_RESET

+#define __TIM22_CLK_SLEEP_ENABLE   __HAL_RCC_TIM22_CLK_SLEEP_ENABLE

+#define __TIM22_CLK_SLEEP_DISABLE   __HAL_RCC_TIM22_CLK_SLEEP_DISABLE

+#define __CRS_CLK_DISABLE __HAL_RCC_CRS_CLK_DISABLE

+#define __CRS_CLK_ENABLE __HAL_RCC_CRS_CLK_ENABLE

+#define __CRS_CLK_SLEEP_DISABLE __HAL_RCC_CRS_CLK_SLEEP_DISABLE

+#define __CRS_CLK_SLEEP_ENABLE __HAL_RCC_CRS_CLK_SLEEP_ENABLE

+#define __CRS_FORCE_RESET __HAL_RCC_CRS_FORCE_RESET

+#define __CRS_RELEASE_RESET __HAL_RCC_CRS_RELEASE_RESET

+#define __RCC_BACKUPRESET_FORCE __HAL_RCC_BACKUPRESET_FORCE

+#define __RCC_BACKUPRESET_RELEASE __HAL_RCC_BACKUPRESET_RELEASE

+

+#define __USB_OTG_FS_FORCE_RESET  __HAL_RCC_USB_OTG_FS_FORCE_RESET

+#define __USB_OTG_FS_RELEASE_RESET  __HAL_RCC_USB_OTG_FS_RELEASE_RESET

+#define __USB_OTG_FS_CLK_SLEEP_ENABLE  __HAL_RCC_USB_OTG_FS_CLK_SLEEP_ENABLE

+#define __USB_OTG_FS_CLK_SLEEP_DISABLE  __HAL_RCC_USB_OTG_FS_CLK_SLEEP_DISABLE

+#define __USB_OTG_HS_CLK_DISABLE  __HAL_RCC_USB_OTG_HS_CLK_DISABLE

+#define __USB_OTG_HS_CLK_ENABLE          __HAL_RCC_USB_OTG_HS_CLK_ENABLE

+#define __USB_OTG_HS_ULPI_CLK_ENABLE  __HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE

+#define __USB_OTG_HS_ULPI_CLK_DISABLE  __HAL_RCC_USB_OTG_HS_ULPI_CLK_DISABLE  

+#define __TIM9_CLK_SLEEP_ENABLE          __HAL_RCC_TIM9_CLK_SLEEP_ENABLE

+#define __TIM9_CLK_SLEEP_DISABLE  __HAL_RCC_TIM9_CLK_SLEEP_DISABLE  

+#define __TIM10_CLK_SLEEP_ENABLE  __HAL_RCC_TIM10_CLK_SLEEP_ENABLE

+#define __TIM10_CLK_SLEEP_DISABLE  __HAL_RCC_TIM10_CLK_SLEEP_DISABLE  

+#define __TIM11_CLK_SLEEP_ENABLE  __HAL_RCC_TIM11_CLK_SLEEP_ENABLE

+#define __TIM11_CLK_SLEEP_DISABLE  __HAL_RCC_TIM11_CLK_SLEEP_DISABLE  

+#define __ETHMACPTP_CLK_SLEEP_ENABLE  __HAL_RCC_ETHMACPTP_CLK_SLEEP_ENABLE

+#define __ETHMACPTP_CLK_SLEEP_DISABLE  __HAL_RCC_ETHMACPTP_CLK_SLEEP_DISABLE

+#define __ETHMACPTP_CLK_ENABLE          __HAL_RCC_ETHMACPTP_CLK_ENABLE

+#define __ETHMACPTP_CLK_DISABLE          __HAL_RCC_ETHMACPTP_CLK_DISABLE  

+#define __HASH_CLK_ENABLE          __HAL_RCC_HASH_CLK_ENABLE

+#define __HASH_FORCE_RESET          __HAL_RCC_HASH_FORCE_RESET

+#define __HASH_RELEASE_RESET          __HAL_RCC_HASH_RELEASE_RESET

+#define __HASH_CLK_SLEEP_ENABLE          __HAL_RCC_HASH_CLK_SLEEP_ENABLE

+#define __HASH_CLK_SLEEP_DISABLE  __HAL_RCC_HASH_CLK_SLEEP_DISABLE

+#define __HASH_CLK_DISABLE            __HAL_RCC_HASH_CLK_DISABLE  

+#define __SPI5_CLK_ENABLE          __HAL_RCC_SPI5_CLK_ENABLE

+#define __SPI5_CLK_DISABLE              __HAL_RCC_SPI5_CLK_DISABLE

+#define __SPI5_FORCE_RESET          __HAL_RCC_SPI5_FORCE_RESET

+#define __SPI5_RELEASE_RESET          __HAL_RCC_SPI5_RELEASE_RESET

+#define __SPI5_CLK_SLEEP_ENABLE          __HAL_RCC_SPI5_CLK_SLEEP_ENABLE

+#define __SPI5_CLK_SLEEP_DISABLE  __HAL_RCC_SPI5_CLK_SLEEP_DISABLE  

+#define __SPI6_CLK_ENABLE          __HAL_RCC_SPI6_CLK_ENABLE

+#define __SPI6_CLK_DISABLE          __HAL_RCC_SPI6_CLK_DISABLE

+#define __SPI6_FORCE_RESET          __HAL_RCC_SPI6_FORCE_RESET

+#define __SPI6_RELEASE_RESET         __HAL_RCC_SPI6_RELEASE_RESET

+#define __SPI6_CLK_SLEEP_ENABLE          __HAL_RCC_SPI6_CLK_SLEEP_ENABLE

+#define __SPI6_CLK_SLEEP_DISABLE  __HAL_RCC_SPI6_CLK_SLEEP_DISABLE  

+#define __LTDC_CLK_ENABLE          __HAL_RCC_LTDC_CLK_ENABLE

+#define __LTDC_CLK_DISABLE          __HAL_RCC_LTDC_CLK_DISABLE

+#define __LTDC_FORCE_RESET          __HAL_RCC_LTDC_FORCE_RESET

+#define __LTDC_RELEASE_RESET          __HAL_RCC_LTDC_RELEASE_RESET

+#define __LTDC_CLK_SLEEP_ENABLE          __HAL_RCC_LTDC_CLK_SLEEP_ENABLE  

+#define __ETHMAC_CLK_SLEEP_ENABLE  __HAL_RCC_ETHMAC_CLK_SLEEP_ENABLE

+#define __ETHMAC_CLK_SLEEP_DISABLE  __HAL_RCC_ETHMAC_CLK_SLEEP_DISABLE  

+#define __ETHMACTX_CLK_SLEEP_ENABLE  __HAL_RCC_ETHMACTX_CLK_SLEEP_ENABLE

+#define __ETHMACTX_CLK_SLEEP_DISABLE  __HAL_RCC_ETHMACTX_CLK_SLEEP_DISABLE  

+#define __ETHMACRX_CLK_SLEEP_ENABLE  __HAL_RCC_ETHMACRX_CLK_SLEEP_ENABLE

+#define __ETHMACRX_CLK_SLEEP_DISABLE  __HAL_RCC_ETHMACRX_CLK_SLEEP_DISABLE  

+#define __TIM12_CLK_SLEEP_ENABLE  __HAL_RCC_TIM12_CLK_SLEEP_ENABLE

+#define __TIM12_CLK_SLEEP_DISABLE  __HAL_RCC_TIM12_CLK_SLEEP_DISABLE  

+#define __TIM13_CLK_SLEEP_ENABLE  __HAL_RCC_TIM13_CLK_SLEEP_ENABLE

+#define __TIM13_CLK_SLEEP_DISABLE  __HAL_RCC_TIM13_CLK_SLEEP_DISABLE  

+#define __TIM14_CLK_SLEEP_ENABLE  __HAL_RCC_TIM14_CLK_SLEEP_ENABLE

+#define __TIM14_CLK_SLEEP_DISABLE  __HAL_RCC_TIM14_CLK_SLEEP_DISABLE  

+#define __BKPSRAM_CLK_ENABLE          __HAL_RCC_BKPSRAM_CLK_ENABLE

+#define __BKPSRAM_CLK_DISABLE          __HAL_RCC_BKPSRAM_CLK_DISABLE

+#define __BKPSRAM_CLK_SLEEP_ENABLE  __HAL_RCC_BKPSRAM_CLK_SLEEP_ENABLE

+#define __BKPSRAM_CLK_SLEEP_DISABLE  __HAL_RCC_BKPSRAM_CLK_SLEEP_DISABLE  

+#define __CCMDATARAMEN_CLK_ENABLE  __HAL_RCC_CCMDATARAMEN_CLK_ENABLE

+#define __CCMDATARAMEN_CLK_DISABLE  __HAL_RCC_CCMDATARAMEN_CLK_DISABLE  

+#define __USART6_CLK_ENABLE          __HAL_RCC_USART6_CLK_ENABLE

+#define __USART6_CLK_DISABLE          __HAL_RCC_USART6_CLK_DISABLE

+#define __USART6_FORCE_RESET        __HAL_RCC_USART6_FORCE_RESET

+#define __USART6_RELEASE_RESET        __HAL_RCC_USART6_RELEASE_RESET

+#define __USART6_CLK_SLEEP_ENABLE  __HAL_RCC_USART6_CLK_SLEEP_ENABLE

+#define __USART6_CLK_SLEEP_DISABLE  __HAL_RCC_USART6_CLK_SLEEP_DISABLE  

+#define __SPI4_CLK_ENABLE          __HAL_RCC_SPI4_CLK_ENABLE

+#define __SPI4_CLK_DISABLE          __HAL_RCC_SPI4_CLK_DISABLE

+#define __SPI4_FORCE_RESET          __HAL_RCC_SPI4_FORCE_RESET

+#define __SPI4_RELEASE_RESET        __HAL_RCC_SPI4_RELEASE_RESET

+#define __SPI4_CLK_SLEEP_ENABLE   __HAL_RCC_SPI4_CLK_SLEEP_ENABLE

+#define __SPI4_CLK_SLEEP_DISABLE  __HAL_RCC_SPI4_CLK_SLEEP_DISABLE  

+#define __GPIOI_CLK_ENABLE          __HAL_RCC_GPIOI_CLK_ENABLE

+#define __GPIOI_CLK_DISABLE          __HAL_RCC_GPIOI_CLK_DISABLE

+#define __GPIOI_FORCE_RESET          __HAL_RCC_GPIOI_FORCE_RESET

+#define __GPIOI_RELEASE_RESET          __HAL_RCC_GPIOI_RELEASE_RESET

+#define __GPIOI_CLK_SLEEP_ENABLE  __HAL_RCC_GPIOI_CLK_SLEEP_ENABLE

+#define __GPIOI_CLK_SLEEP_DISABLE  __HAL_RCC_GPIOI_CLK_SLEEP_DISABLE  

+#define __GPIOJ_CLK_ENABLE          __HAL_RCC_GPIOJ_CLK_ENABLE

+#define __GPIOJ_CLK_DISABLE          __HAL_RCC_GPIOJ_CLK_DISABLE

+#define __GPIOJ_FORCE_RESET         __HAL_RCC_GPIOJ_FORCE_RESET

+#define __GPIOJ_RELEASE_RESET          __HAL_RCC_GPIOJ_RELEASE_RESET

+#define __GPIOJ_CLK_SLEEP_ENABLE  __HAL_RCC_GPIOJ_CLK_SLEEP_ENABLE

+#define __GPIOJ_CLK_SLEEP_DISABLE  __HAL_RCC_GPIOJ_CLK_SLEEP_DISABLE  

+#define __GPIOK_CLK_ENABLE          __HAL_RCC_GPIOK_CLK_ENABLE

+#define __GPIOK_CLK_DISABLE          __HAL_RCC_GPIOK_CLK_DISABLE

+#define __GPIOK_RELEASE_RESET          __HAL_RCC_GPIOK_RELEASE_RESET

+#define __GPIOK_CLK_SLEEP_ENABLE  __HAL_RCC_GPIOK_CLK_SLEEP_ENABLE

+#define __GPIOK_CLK_SLEEP_DISABLE  __HAL_RCC_GPIOK_CLK_SLEEP_DISABLE  

+#define __ETH_CLK_ENABLE          __HAL_RCC_ETH_CLK_ENABLE

+#define __ETH_CLK_DISABLE          __HAL_RCC_ETH_CLK_DISABLE  

+#define __DCMI_CLK_ENABLE          __HAL_RCC_DCMI_CLK_ENABLE

+#define __DCMI_CLK_DISABLE          __HAL_RCC_DCMI_CLK_DISABLE

+#define __DCMI_FORCE_RESET          __HAL_RCC_DCMI_FORCE_RESET

+#define __DCMI_RELEASE_RESET          __HAL_RCC_DCMI_RELEASE_RESET

+#define __DCMI_CLK_SLEEP_ENABLE   __HAL_RCC_DCMI_CLK_SLEEP_ENABLE

+#define __DCMI_CLK_SLEEP_DISABLE  __HAL_RCC_DCMI_CLK_SLEEP_DISABLE  

+#define __UART7_CLK_ENABLE          __HAL_RCC_UART7_CLK_ENABLE

+#define __UART7_CLK_DISABLE          __HAL_RCC_UART7_CLK_DISABLE

+#define __UART7_RELEASE_RESET       __HAL_RCC_UART7_RELEASE_RESET

+#define __UART7_FORCE_RESET       __HAL_RCC_UART7_FORCE_RESET

+#define __UART7_CLK_SLEEP_ENABLE  __HAL_RCC_UART7_CLK_SLEEP_ENABLE

+#define __UART7_CLK_SLEEP_DISABLE  __HAL_RCC_UART7_CLK_SLEEP_DISABLE  

+#define __UART8_CLK_ENABLE          __HAL_RCC_UART8_CLK_ENABLE

+#define __UART8_CLK_DISABLE          __HAL_RCC_UART8_CLK_DISABLE

+#define __UART8_FORCE_RESET          __HAL_RCC_UART8_FORCE_RESET

+#define __UART8_RELEASE_RESET          __HAL_RCC_UART8_RELEASE_RESET

+#define __UART8_CLK_SLEEP_ENABLE  __HAL_RCC_UART8_CLK_SLEEP_ENABLE

+#define __UART8_CLK_SLEEP_DISABLE  __HAL_RCC_UART8_CLK_SLEEP_DISABLE  

+#define __OTGHS_CLK_SLEEP_ENABLE  __HAL_RCC_USB_OTG_HS_CLK_SLEEP_ENABLE

+#define __OTGHS_CLK_SLEEP_DISABLE  __HAL_RCC_USB_OTG_HS_CLK_SLEEP_DISABLE

+#define __OTGHS_FORCE_RESET          __HAL_RCC_USB_OTG_HS_FORCE_RESET

+#define __OTGHS_RELEASE_RESET          __HAL_RCC_USB_OTG_HS_RELEASE_RESET  

+#define __OTGHSULPI_CLK_SLEEP_ENABLE  __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_ENABLE

+#define __OTGHSULPI_CLK_SLEEP_DISABLE  __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_DISABLE

+#define __HAL_RCC_OTGHS_CLK_SLEEP_ENABLE  __HAL_RCC_USB_OTG_HS_CLK_SLEEP_ENABLE

+#define __HAL_RCC_OTGHS_CLK_SLEEP_DISABLE  __HAL_RCC_USB_OTG_HS_CLK_SLEEP_DISABLE

+#define __HAL_RCC_OTGHS_FORCE_RESET          __HAL_RCC_USB_OTG_HS_FORCE_RESET

+#define __HAL_RCC_OTGHS_RELEASE_RESET          __HAL_RCC_USB_OTG_HS_RELEASE_RESET  

+#define __HAL_RCC_OTGHSULPI_CLK_SLEEP_ENABLE  __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_ENABLE

+#define __HAL_RCC_OTGHSULPI_CLK_SLEEP_DISABLE  __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_DISABLE    

+#define __CRYP_FORCE_RESET          __HAL_RCC_CRYP_FORCE_RESET  

+#define __SRAM3_CLK_SLEEP_ENABLE  __HAL_RCC_SRAM3_CLK_SLEEP_ENABLE  

+#define __CAN2_CLK_SLEEP_ENABLE          __HAL_RCC_CAN2_CLK_SLEEP_ENABLE

+#define __CAN2_CLK_SLEEP_DISABLE  __HAL_RCC_CAN2_CLK_SLEEP_DISABLE  

+#define __DAC_CLK_SLEEP_ENABLE          __HAL_RCC_DAC_CLK_SLEEP_ENABLE

+#define __DAC_CLK_SLEEP_DISABLE   __HAL_RCC_DAC_CLK_SLEEP_DISABLE  

+#define __ADC2_CLK_SLEEP_ENABLE   __HAL_RCC_ADC2_CLK_SLEEP_ENABLE

+#define __ADC2_CLK_SLEEP_DISABLE  __HAL_RCC_ADC2_CLK_SLEEP_DISABLE  

+#define __ADC3_CLK_SLEEP_ENABLE          __HAL_RCC_ADC3_CLK_SLEEP_ENABLE

+#define __ADC3_CLK_SLEEP_DISABLE  __HAL_RCC_ADC3_CLK_SLEEP_DISABLE  

+#define __FSMC_FORCE_RESET          __HAL_RCC_FSMC_FORCE_RESET

+#define __FSMC_RELEASE_RESET          __HAL_RCC_FSMC_RELEASE_RESET

+#define __FSMC_CLK_SLEEP_ENABLE          __HAL_RCC_FSMC_CLK_SLEEP_ENABLE

+#define __FSMC_CLK_SLEEP_DISABLE  __HAL_RCC_FSMC_CLK_SLEEP_DISABLE  

+#define __SDIO_FORCE_RESET          __HAL_RCC_SDIO_FORCE_RESET

+#define __SDIO_RELEASE_RESET          __HAL_RCC_SDIO_RELEASE_RESET

+#define __SDIO_CLK_SLEEP_DISABLE  __HAL_RCC_SDIO_CLK_SLEEP_DISABLE

+#define __SDIO_CLK_SLEEP_ENABLE          __HAL_RCC_SDIO_CLK_SLEEP_ENABLE  

+#define __DMA2D_CLK_ENABLE          __HAL_RCC_DMA2D_CLK_ENABLE

+#define __DMA2D_CLK_DISABLE          __HAL_RCC_DMA2D_CLK_DISABLE

+#define __DMA2D_FORCE_RESET          __HAL_RCC_DMA2D_FORCE_RESET

+#define __DMA2D_RELEASE_RESET          __HAL_RCC_DMA2D_RELEASE_RESET

+#define __DMA2D_CLK_SLEEP_ENABLE  __HAL_RCC_DMA2D_CLK_SLEEP_ENABLE

+#define __DMA2D_CLK_SLEEP_DISABLE  __HAL_RCC_DMA2D_CLK_SLEEP_DISABLE

+

+/* alias define maintained for legacy */

+#define __HAL_RCC_OTGFS_FORCE_RESET    __HAL_RCC_USB_OTG_FS_FORCE_RESET

+#define __HAL_RCC_OTGFS_RELEASE_RESET  __HAL_RCC_USB_OTG_FS_RELEASE_RESET

+

+#if defined(STM32F4)

+#define __HAL_RCC_SDMMC1_CLK_ENABLE        __HAL_RCC_SDIO_CLK_ENABLE

+#define __HAL_RCC_SDMMC1_FORCE_RESET       __HAL_RCC_SDIO_FORCE_RESET

+#define __HAL_RCC_SDMMC1_RELEASE_RESET     __HAL_RCC_SDIO_RELEASE_RESET

+#define __HAL_RCC_SDMMC1_CLK_SLEEP_ENABLE  __HAL_RCC_SDIO_CLK_SLEEP_ENABLE

+#define __HAL_RCC_SDMMC1_CLK_SLEEP_DISABLE __HAL_RCC_SDIO_CLK_SLEEP_DISABLE

+#define __HAL_RCC_SDMMC1_CLK_ENABLE        __HAL_RCC_SDIO_CLK_ENABLE

+#define __HAL_RCC_SDMMC1_CLK_DISABLE       __HAL_RCC_SDIO_CLK_DISABLE

+#define RCC_PERIPHCLK_SDMMC1               RCC_PERIPHCLK_SDIO

+#define __HAL_RCC_SDMMC1_CONFIG            __HAL_RCC_SDIO_CONFIG

+#define __HAL_RCC_GET_SDMMC1_SOURCE        __HAL_RCC_GET_SDIO_SOURCE

+#endif

+

+#if defined(STM32F7)

+#define __HAL_RCC_SDIO_CLK_ENABLE        __HAL_RCC_SDMMC1_CLK_ENABLE

+#define __HAL_RCC_SDIO_FORCE_RESET       __HAL_RCC_SDMMC1_FORCE_RESET

+#define __HAL_RCC_SDIO_RELEASE_RESET     __HAL_RCC_SDMMC1_RELEASE_RESET

+#define __HAL_RCC_SDIO_CLK_SLEEP_ENABLE  __HAL_RCC_SDMMC1_CLK_SLEEP_ENABLE

+#define __HAL_RCC_SDIO_CLK_SLEEP_DISABLE __HAL_RCC_SDMMC1_CLK_SLEEP_DISABLE

+#define __HAL_RCC_SDIO_CLK_ENABLE        __HAL_RCC_SDMMC1_CLK_ENABLE

+#define __HAL_RCC_SDIO_CLK_DISABLE       __HAL_RCC_SDMMC1_CLK_DISABLE

+#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	

+#endif

+

+#define __HAL_RCC_I2SCLK            __HAL_RCC_I2S_CONFIG

+#define __HAL_RCC_I2SCLK_CONFIG     __HAL_RCC_I2S_CONFIG

+

+#define __RCC_PLLSRC           RCC_GET_PLL_OSCSOURCE

+

+#define IS_RCC_MSIRANGE        IS_RCC_MSI_CLOCK_RANGE

+#define IS_RCC_RTCCLK_SOURCE   IS_RCC_RTCCLKSOURCE

+#define IS_RCC_SYSCLK_DIV      IS_RCC_HCLK

+#define IS_RCC_HCLK_DIV        IS_RCC_PCLK

+

+#define IS_RCC_MCOSOURCE       IS_RCC_MCO1SOURCE

+#define RCC_MCO_NODIV          RCC_MCODIV_1

+#define RCC_RTCCLKSOURCE_NONE  RCC_RTCCLKSOURCE_NO_CLK

+

+#define HSION_BitNumber        RCC_HSION_BIT_NUMBER

+#define CSSON_BitNumber        RCC_CSSON_BIT_NUMBER

+#define PLLON_BitNumber        RCC_PLLON_BIT_NUMBER

+#define PLLI2SON_BitNumber     RCC_PLLI2SON_BIT_NUMBER

+#define I2SSRC_BitNumber       RCC_I2SSRC_BIT_NUMBER

+#define RTCEN_BitNumber        RCC_RTCEN_BIT_NUMBER

+#define BDRST_BitNumber        RCC_BDRST_BIT_NUMBER

+#define LSION_BitNumber        RCC_LSION_BIT_NUMBER

+#define PLLSAION_BitNumber     RCC_PLLSAION_BIT_NUMBER

+#define TIMPRE_BitNumber       RCC_TIMPRE_BIT_NUMBER

+

+#define CR_BYTE2_ADDRESS       RCC_CR_BYTE2_ADDRESS

+#define CIR_BYTE1_ADDRESS      RCC_CIR_BYTE1_ADDRESS

+#define CIR_BYTE2_ADDRESS      RCC_CIR_BYTE2_ADDRESS

+#define BDCR_BYTE0_ADDRESS     RCC_BDCR_BYTE0_ADDRESS

+#define DBP_TIMEOUT_VALUE      RCC_DBP_TIMEOUT_VALUE

+#define LSE_TIMEOUT_VALUE      RCC_LSE_TIMEOUT_VALUE

+

+#define CR_HSION_BB            RCC_CR_HSION_BB

+#define CR_CSSON_BB            RCC_CR_CSSON_BB

+#define CR_PLLON_BB            RCC_CR_PLLON_BB

+#define CR_PLLI2SON_BB         RCC_CR_PLLI2SON_BB

+#define CR_MSION_BB            RCC_CR_MSION_BB

+#define CSR_LSION_BB           RCC_CSR_LSION_BB

+#define CSR_LSEON_BB           RCC_CSR_LSEON_BB

+#define CSR_LSEBYP_BB          RCC_CSR_LSEBYP_BB

+#define CSR_RTCEN_BB           RCC_CSR_RTCEN_BB

+#define CSR_RTCRST_BB          RCC_CSR_RTCRST_BB

+#define CFGR_I2SSRC_BB         RCC_CFGR_I2SSRC_BB

+#define BDCR_RTCEN_BB          RCC_BDCR_RTCEN_BB

+#define BDCR_BDRST_BB          RCC_BDCR_BDRST_BB

+#define CR_PLLSAION_BB         RCC_CR_PLLSAION_BB

+#define DCKCFGR_TIMPRE_BB      RCC_DCKCFGR_TIMPRE_BB

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_RNG_Aliased_Macros HAL RNG Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define  HAL_RNG_ReadyCallback(__HANDLE__)  HAL_RNG_ReadyDataCallback((__HANDLE__), uint32_t random32bit)                                       

+

+/**

+  * @}

+  */

+  

+/** @defgroup HAL_RTC_Aliased_Macros HAL RTC Aliased Macros maintained for legacy purpose

+  * @{

+  */

+  

+#define __HAL_RTC_CLEAR_FLAG                      __HAL_RTC_EXTI_CLEAR_FLAG

+#define __HAL_RTC_DISABLE_IT                      __HAL_RTC_EXTI_DISABLE_IT

+#define __HAL_RTC_ENABLE_IT                       __HAL_RTC_EXTI_ENABLE_IT

+

+#if defined (STM32F1)

+#define __HAL_RTC_EXTI_CLEAR_FLAG(RTC_EXTI_LINE_ALARM_EVENT)  __HAL_RTC_ALARM_EXTI_CLEAR_FLAG()

+

+#define __HAL_RTC_EXTI_ENABLE_IT(RTC_EXTI_LINE_ALARM_EVENT)   __HAL_RTC_ALARM_EXTI_ENABLE_IT()

+

+#define __HAL_RTC_EXTI_DISABLE_IT(RTC_EXTI_LINE_ALARM_EVENT)  __HAL_RTC_ALARM_EXTI_DISABLE_IT()

+

+#define __HAL_RTC_EXTI_GET_FLAG(RTC_EXTI_LINE_ALARM_EVENT)    __HAL_RTC_ALARM_EXTI_GET_FLAG()

+

+#define __HAL_RTC_EXTI_GENERATE_SWIT(RTC_EXTI_LINE_ALARM_EVENT)   __HAL_RTC_ALARM_EXTI_GENERATE_SWIT()

+#else

+#define __HAL_RTC_EXTI_CLEAR_FLAG(__EXTI_LINE__)  (((__EXTI_LINE__) == RTC_EXTI_LINE_ALARM_EVENT) ? __HAL_RTC_ALARM_EXTI_CLEAR_FLAG() : \

+                                                   (((__EXTI_LINE__) == RTC_EXTI_LINE_WAKEUPTIMER_EVENT) ? __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG() : \

+                                                      __HAL_RTC_TAMPER_TIMESTAMP_EXTI_CLEAR_FLAG()))

+#define __HAL_RTC_EXTI_ENABLE_IT(__EXTI_LINE__)   (((__EXTI_LINE__)  == RTC_EXTI_LINE_ALARM_EVENT) ? __HAL_RTC_ALARM_EXTI_ENABLE_IT() : \

+                                                  (((__EXTI_LINE__) == RTC_EXTI_LINE_WAKEUPTIMER_EVENT) ? __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_IT() : \

+                                                      __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_IT()))

+#define __HAL_RTC_EXTI_DISABLE_IT(__EXTI_LINE__)  (((__EXTI_LINE__) == RTC_EXTI_LINE_ALARM_EVENT) ? __HAL_RTC_ALARM_EXTI_DISABLE_IT() : \

+                                                  (((__EXTI_LINE__) == RTC_EXTI_LINE_WAKEUPTIMER_EVENT) ? __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_IT() : \

+                                                      __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_IT()))

+#define __HAL_RTC_EXTI_GET_FLAG(__EXTI_LINE__)    (((__EXTI_LINE__) == RTC_EXTI_LINE_ALARM_EVENT) ? __HAL_RTC_ALARM_EXTI_GET_FLAG() : \

+                                                  (((__EXTI_LINE__) == RTC_EXTI_LINE_WAKEUPTIMER_EVENT) ? __HAL_RTC_WAKEUPTIMER_EXTI_GET_FLAG() : \

+                                                      __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GET_FLAG()))

+#define __HAL_RTC_EXTI_GENERATE_SWIT(__EXTI_LINE__)   (((__EXTI_LINE__) == RTC_EXTI_LINE_ALARM_EVENT) ? __HAL_RTC_ALARM_EXTI_GENERATE_SWIT() : \

+                                                      (((__EXTI_LINE__) == RTC_EXTI_LINE_WAKEUPTIMER_EVENT) ? __HAL_RTC_WAKEUPTIMER_EXTI_GENERATE_SWIT() :  \

+                                                          __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GENERATE_SWIT()))

+#endif   /* STM32F1 */

+

+#define IS_ALARM                                  IS_RTC_ALARM

+#define IS_ALARM_MASK                             IS_RTC_ALARM_MASK

+#define IS_TAMPER                                 IS_RTC_TAMPER

+#define IS_TAMPER_ERASE_MODE                      IS_RTC_TAMPER_ERASE_MODE

+#define IS_TAMPER_FILTER                          IS_RTC_TAMPER_FILTER 

+#define IS_TAMPER_INTERRUPT                       IS_RTC_TAMPER_INTERRUPT

+#define IS_TAMPER_MASKFLAG_STATE                  IS_RTC_TAMPER_MASKFLAG_STATE

+#define IS_TAMPER_PRECHARGE_DURATION              IS_RTC_TAMPER_PRECHARGE_DURATION

+#define IS_TAMPER_PULLUP_STATE                    IS_RTC_TAMPER_PULLUP_STATE

+#define IS_TAMPER_SAMPLING_FREQ                   IS_RTC_TAMPER_SAMPLING_FREQ

+#define IS_TAMPER_TIMESTAMPONTAMPER_DETECTION     IS_RTC_TAMPER_TIMESTAMPONTAMPER_DETECTION

+#define IS_TAMPER_TRIGGER                         IS_RTC_TAMPER_TRIGGER

+#define IS_WAKEUP_CLOCK                           IS_RTC_WAKEUP_CLOCK

+#define IS_WAKEUP_COUNTER                         IS_RTC_WAKEUP_COUNTER

+

+#define __RTC_WRITEPROTECTION_ENABLE  __HAL_RTC_WRITEPROTECTION_ENABLE

+#define __RTC_WRITEPROTECTION_DISABLE  __HAL_RTC_WRITEPROTECTION_DISABLE

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_SD_Aliased_Macros HAL SD Aliased Macros maintained for legacy purpose

+  * @{

+  */

+

+#define SD_OCR_CID_CSD_OVERWRIETE   SD_OCR_CID_CSD_OVERWRITE

+#define SD_CMD_SD_APP_STAUS         SD_CMD_SD_APP_STATUS

+

+#if defined(STM32F4)

+#define  SD_SDMMC_FUNCTION_BUSY     SD_SDIO_FUNCTION_BUSY     

+#define  SD_SDMMC_FUNCTION_FAILED   SD_SDIO_FUNCTION_FAILED   

+#define  SD_SDMMC_UNKNOWN_FUNCTION  SD_SDIO_UNKNOWN_FUNCTION  

+#define  SD_CMD_SDMMC_SEN_OP_COND   SD_CMD_SDIO_SEN_OP_COND   

+#define  SD_CMD_SDMMC_RW_DIRECT     SD_CMD_SDIO_RW_DIRECT     

+#define  SD_CMD_SDMMC_RW_EXTENDED   SD_CMD_SDIO_RW_EXTENDED   

+#define  __HAL_SD_SDMMC_ENABLE      __HAL_SD_SDIO_ENABLE      

+#define  __HAL_SD_SDMMC_DISABLE     __HAL_SD_SDIO_DISABLE     

+#define  __HAL_SD_SDMMC_DMA_ENABLE  __HAL_SD_SDIO_DMA_ENABLE  

+#define  __HAL_SD_SDMMC_DMA_DISABLE __HAL_SD_SDIO_DMA_DISABL  

+#define  __HAL_SD_SDMMC_ENABLE_IT   __HAL_SD_SDIO_ENABLE_IT   

+#define  __HAL_SD_SDMMC_DISABLE_IT  __HAL_SD_SDIO_DISABLE_IT  

+#define  __HAL_SD_SDMMC_GET_FLAG    __HAL_SD_SDIO_GET_FLAG    

+#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  SD_SDMMC_SEND_IF_COND      SD_SDIO_SEND_IF_COND	   

+#endif

+

+#if defined(STM32F7)

+#define  SD_SDIO_FUNCTION_BUSY     SD_SDMMC_FUNCTION_BUSY    

+#define  SD_SDIO_FUNCTION_FAILED   SD_SDMMC_FUNCTION_FAILED  

+#define  SD_SDIO_UNKNOWN_FUNCTION  SD_SDMMC_UNKNOWN_FUNCTION

+#define  SD_CMD_SDIO_SEN_OP_COND   SD_CMD_SDMMC_SEN_OP_COND

+#define  SD_CMD_SDIO_RW_DIRECT     SD_CMD_SDMMC_RW_DIRECT

+#define  SD_CMD_SDIO_RW_EXTENDED   SD_CMD_SDMMC_RW_EXTENDED

+#define  __HAL_SD_SDIO_ENABLE      __HAL_SD_SDMMC_ENABLE

+#define  __HAL_SD_SDIO_DISABLE     __HAL_SD_SDMMC_DISABLE

+#define  __HAL_SD_SDIO_DMA_ENABLE  __HAL_SD_SDMMC_DMA_ENABLE

+#define  __HAL_SD_SDIO_DMA_DISABL  __HAL_SD_SDMMC_DMA_DISABLE

+#define  __HAL_SD_SDIO_ENABLE_IT   __HAL_SD_SDMMC_ENABLE_IT

+#define  __HAL_SD_SDIO_DISABLE_IT  __HAL_SD_SDMMC_DISABLE_IT

+#define  __HAL_SD_SDIO_GET_FLAG    __HAL_SD_SDMMC_GET_FLAG

+#define  __HAL_SD_SDIO_CLEAR_FLAG  __HAL_SD_SDMMC_CLEAR_FLAG

+#define  __HAL_SD_SDIO_GET_IT      __HAL_SD_SDMMC_GET_IT

+#define  __HAL_SD_SDIO_CLEAR_IT    __HAL_SD_SDMMC_CLEAR_IT

+#define  SDIO_STATIC_FLAGS	      SDMMC_STATIC_FLAGS

+#define  SDIO_CMD0TIMEOUT	      SDMMC_CMD0TIMEOUT

+#define  SD_SDIO_SEND_IF_COND	  SD_SDMMC_SEND_IF_COND

+#endif

+/**

+  * @}

+  */

+

+/** @defgroup HAL_SMARTCARD_Aliased_Macros HAL SMARTCARD Aliased Macros maintained for legacy purpose

+  * @{

+  */

+

+#define __SMARTCARD_ENABLE_IT           __HAL_SMARTCARD_ENABLE_IT

+#define __SMARTCARD_DISABLE_IT          __HAL_SMARTCARD_DISABLE_IT

+#define __SMARTCARD_ENABLE              __HAL_SMARTCARD_ENABLE

+#define __SMARTCARD_DISABLE             __HAL_SMARTCARD_DISABLE

+#define __SMARTCARD_DMA_REQUEST_ENABLE  __HAL_SMARTCARD_DMA_REQUEST_ENABLE

+#define __SMARTCARD_DMA_REQUEST_DISABLE __HAL_SMARTCARD_DMA_REQUEST_DISABLE

+

+#define __HAL_SMARTCARD_GETCLOCKSOURCE  SMARTCARD_GETCLOCKSOURCE

+#define __SMARTCARD_GETCLOCKSOURCE      SMARTCARD_GETCLOCKSOURCE

+

+#define IS_SMARTCARD_ONEBIT_SAMPLING    IS_SMARTCARD_ONE_BIT_SAMPLE                  

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_SMBUS_Aliased_Macros HAL SMBUS Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define __HAL_SMBUS_RESET_CR1           SMBUS_RESET_CR1

+#define __HAL_SMBUS_RESET_CR2           SMBUS_RESET_CR2

+#define __HAL_SMBUS_GENERATE_START      SMBUS_GENERATE_START

+#define __HAL_SMBUS_GET_ADDR_MATCH      SMBUS_GET_ADDR_MATCH

+#define __HAL_SMBUS_GET_DIR             SMBUS_GET_DIR

+#define __HAL_SMBUS_GET_STOP_MODE       SMBUS_GET_STOP_MODE

+#define __HAL_SMBUS_GET_PEC_MODE        SMBUS_GET_PEC_MODE

+#define __HAL_SMBUS_GET_ALERT_ENABLED   SMBUS_GET_ALERT_ENABLED

+/**

+  * @}

+  */

+

+/** @defgroup HAL_SPI_Aliased_Macros HAL SPI Aliased Macros maintained for legacy purpose

+  * @{

+  */

+

+#define __HAL_SPI_1LINE_TX              SPI_1LINE_TX

+#define __HAL_SPI_1LINE_RX              SPI_1LINE_RX

+#define __HAL_SPI_RESET_CRC             SPI_RESET_CRC

+

+/**

+  * @}

+  */

+  

+/** @defgroup HAL_UART_Aliased_Macros HAL UART Aliased Macros maintained for legacy purpose

+  * @{

+  */

+

+#define __HAL_UART_GETCLOCKSOURCE       UART_GETCLOCKSOURCE

+#define __HAL_UART_MASK_COMPUTATION     UART_MASK_COMPUTATION

+#define __UART_GETCLOCKSOURCE           UART_GETCLOCKSOURCE

+#define __UART_MASK_COMPUTATION         UART_MASK_COMPUTATION

+

+#define IS_UART_WAKEUPMETHODE           IS_UART_WAKEUPMETHOD

+

+#define IS_UART_ONEBIT_SAMPLE           IS_UART_ONE_BIT_SAMPLE                  

+#define IS_UART_ONEBIT_SAMPLING         IS_UART_ONE_BIT_SAMPLE                  

+

+/**

+  * @}

+  */

+

+

+/** @defgroup HAL_USART_Aliased_Macros HAL USART Aliased Macros maintained for legacy purpose

+  * @{

+  */

+

+#define __USART_ENABLE_IT               __HAL_USART_ENABLE_IT

+#define __USART_DISABLE_IT              __HAL_USART_DISABLE_IT

+#define __USART_ENABLE                  __HAL_USART_ENABLE

+#define __USART_DISABLE                 __HAL_USART_DISABLE

+

+#define __HAL_USART_GETCLOCKSOURCE      USART_GETCLOCKSOURCE

+#define __USART_GETCLOCKSOURCE          USART_GETCLOCKSOURCE

+

+/**

+  * @}

+  */

+

+/** @defgroup HAL_USB_Aliased_Macros HAL USB Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define USB_EXTI_LINE_WAKEUP                               USB_WAKEUP_EXTI_LINE

+

+#define USB_FS_EXTI_TRIGGER_RISING_EDGE                    USB_OTG_FS_WAKEUP_EXTI_RISING_EDGE

+#define USB_FS_EXTI_TRIGGER_FALLING_EDGE                   USB_OTG_FS_WAKEUP_EXTI_FALLING_EDGE

+#define USB_FS_EXTI_TRIGGER_BOTH_EDGE                      USB_OTG_FS_WAKEUP_EXTI_RISING_FALLING_EDGE

+#define USB_FS_EXTI_LINE_WAKEUP                            USB_OTG_FS_WAKEUP_EXTI_LINE

+

+#define USB_HS_EXTI_TRIGGER_RISING_EDGE                    USB_OTG_HS_WAKEUP_EXTI_RISING_EDGE

+#define USB_HS_EXTI_TRIGGER_FALLING_EDGE                   USB_OTG_HS_WAKEUP_EXTI_FALLING_EDGE

+#define USB_HS_EXTI_TRIGGER_BOTH_EDGE                      USB_OTG_HS_WAKEUP_EXTI_RISING_FALLING_EDGE

+#define USB_HS_EXTI_LINE_WAKEUP                            USB_OTG_HS_WAKEUP_EXTI_LINE

+

+#define __HAL_USB_EXTI_ENABLE_IT                           __HAL_USB_WAKEUP_EXTI_ENABLE_IT

+#define __HAL_USB_EXTI_DISABLE_IT                          __HAL_USB_WAKEUP_EXTI_DISABLE_IT

+#define __HAL_USB_EXTI_GET_FLAG                            __HAL_USB_WAKEUP_EXTI_GET_FLAG

+#define __HAL_USB_EXTI_CLEAR_FLAG                          __HAL_USB_WAKEUP_EXTI_CLEAR_FLAG

+#define __HAL_USB_EXTI_SET_RISING_EDGE_TRIGGER             __HAL_USB_WAKEUP_EXTI_ENABLE_RISING_EDGE

+#define __HAL_USB_EXTI_SET_FALLING_EDGE_TRIGGER            __HAL_USB_WAKEUP_EXTI_ENABLE_FALLING_EDGE

+#define __HAL_USB_EXTI_SET_FALLINGRISING_TRIGGER           __HAL_USB_WAKEUP_EXTI_ENABLE_RISING_FALLING_EDGE

+

+#define __HAL_USB_FS_EXTI_ENABLE_IT                        __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_IT

+#define __HAL_USB_FS_EXTI_DISABLE_IT                       __HAL_USB_OTG_FS_WAKEUP_EXTI_DISABLE_IT

+#define __HAL_USB_FS_EXTI_GET_FLAG                         __HAL_USB_OTG_FS_WAKEUP_EXTI_GET_FLAG

+#define __HAL_USB_FS_EXTI_CLEAR_FLAG                       __HAL_USB_OTG_FS_WAKEUP_EXTI_CLEAR_FLAG

+#define __HAL_USB_FS_EXTI_SET_RISING_EGDE_TRIGGER          __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_RISING_EDGE

+#define __HAL_USB_FS_EXTI_SET_FALLING_EGDE_TRIGGER         __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_FALLING_EDGE

+#define __HAL_USB_FS_EXTI_SET_FALLINGRISING_TRIGGER        __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_RISING_FALLING_EDGE

+#define __HAL_USB_FS_EXTI_GENERATE_SWIT                    __HAL_USB_OTG_FS_WAKEUP_EXTI_GENERATE_SWIT

+

+#define __HAL_USB_HS_EXTI_ENABLE_IT                        __HAL_USB_OTG_HS_WAKEUP_EXTI_ENABLE_IT

+#define __HAL_USB_HS_EXTI_DISABLE_IT                       __HAL_USB_OTG_HS_WAKEUP_EXTI_DISABLE_IT

+#define __HAL_USB_HS_EXTI_GET_FLAG                         __HAL_USB_OTG_HS_WAKEUP_EXTI_GET_FLAG

+#define __HAL_USB_HS_EXTI_CLEAR_FLAG                       __HAL_USB_OTG_HS_WAKEUP_EXTI_CLEAR_FLAG

+#define __HAL_USB_HS_EXTI_SET_RISING_EGDE_TRIGGER          __HAL_USB_OTG_HS_WAKEUP_EXTI_ENABLE_RISING_EDGE

+#define __HAL_USB_HS_EXTI_SET_FALLING_EGDE_TRIGGER         __HAL_USB_OTG_HS_WAKEUP_EXTI_ENABLE_FALLING_EDGE

+#define __HAL_USB_HS_EXTI_SET_FALLINGRISING_TRIGGER        __HAL_USB_OTG_HS_WAKEUP_EXTI_ENABLE_RISING_FALLING_EDGE

+#define __HAL_USB_HS_EXTI_GENERATE_SWIT                    __HAL_USB_OTG_HS_WAKEUP_EXTI_GENERATE_SWIT

+

+#define HAL_PCD_ActiveRemoteWakeup                         HAL_PCD_ActivateRemoteWakeup

+#define HAL_PCD_DeActiveRemoteWakeup                       HAL_PCD_DeActivateRemoteWakeup

+

+#define HAL_PCD_SetTxFiFo                                  HAL_PCDEx_SetTxFiFo

+#define HAL_PCD_SetRxFiFo                                  HAL_PCDEx_SetRxFiFo

+/**

+  * @}

+  */

+

+/** @defgroup HAL_TIM_Aliased_Macros HAL TIM Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define __HAL_TIM_SetICPrescalerValue   TIM_SET_ICPRESCALERVALUE

+#define __HAL_TIM_ResetICPrescalerValue TIM_RESET_ICPRESCALERVALUE

+

+#define TIM_GET_ITSTATUS                __HAL_TIM_GET_IT_SOURCE

+#define TIM_GET_CLEAR_IT                __HAL_TIM_CLEAR_IT

+

+#define __HAL_TIM_GET_ITSTATUS          __HAL_TIM_GET_IT_SOURCE

+

+#define __HAL_TIM_DIRECTION_STATUS      __HAL_TIM_IS_TIM_COUNTING_DOWN

+#define __HAL_TIM_PRESCALER             __HAL_TIM_SET_PRESCALER

+#define __HAL_TIM_SetCounter            __HAL_TIM_SET_COUNTER

+#define __HAL_TIM_GetCounter            __HAL_TIM_GET_COUNTER

+#define __HAL_TIM_SetAutoreload         __HAL_TIM_SET_AUTORELOAD

+#define __HAL_TIM_GetAutoreload         __HAL_TIM_GET_AUTORELOAD

+#define __HAL_TIM_SetClockDivision      __HAL_TIM_SET_CLOCKDIVISION

+#define __HAL_TIM_GetClockDivision      __HAL_TIM_GET_CLOCKDIVISION

+#define __HAL_TIM_SetICPrescaler        __HAL_TIM_SET_ICPRESCALER

+#define __HAL_TIM_GetICPrescaler        __HAL_TIM_GET_ICPRESCALER

+#define __HAL_TIM_SetCompare            __HAL_TIM_SET_COMPARE

+#define __HAL_TIM_GetCompare            __HAL_TIM_GET_COMPARE

+

+#define TIM_TS_ITR0                        ((uint32_t)0x0000)

+#define TIM_TS_ITR1                        ((uint32_t)0x0010)

+#define TIM_TS_ITR2                        ((uint32_t)0x0020)

+#define TIM_TS_ITR3                        ((uint32_t)0x0030)

+#define IS_TIM_INTERNAL_TRIGGER_SELECTION(SELECTION) (((SELECTION) == TIM_TS_ITR0) || \

+                                                      ((SELECTION) == TIM_TS_ITR1) || \

+                                                      ((SELECTION) == TIM_TS_ITR2) || \

+                                                      ((SELECTION) == TIM_TS_ITR3))

+

+#define TIM_CHANNEL_1                      ((uint32_t)0x0000)

+#define TIM_CHANNEL_2                      ((uint32_t)0x0004)

+#define IS_TIM_PWMI_CHANNELS(CHANNEL) (((CHANNEL) == TIM_CHANNEL_1) || \

+                                       ((CHANNEL) == TIM_CHANNEL_2))

+

+#define TIM_OUTPUTNSTATE_DISABLE            ((uint32_t)0x0000)

+#define TIM_OUTPUTNSTATE_ENABLE             (TIM_CCER_CC1NE)

+

+#define IS_TIM_OUTPUTN_STATE(STATE) (((STATE) == TIM_OUTPUTNSTATE_DISABLE) || \

+                                     ((STATE) == TIM_OUTPUTNSTATE_ENABLE))

+

+#define TIM_OUTPUTSTATE_DISABLE            ((uint32_t)0x0000)

+#define TIM_OUTPUTSTATE_ENABLE             (TIM_CCER_CC1E)

+

+#define IS_TIM_OUTPUT_STATE(STATE) (((STATE) == TIM_OUTPUTSTATE_DISABLE) || \

+                                    ((STATE) == TIM_OUTPUTSTATE_ENABLE))  

+/**

+  * @}

+  */

+

+/** @defgroup HAL_ETH_Aliased_Macros HAL ETH Aliased Macros maintained for legacy purpose

+  * @{

+  */

+  

+#define __HAL_ETH_EXTI_ENABLE_IT                   __HAL_ETH_WAKEUP_EXTI_ENABLE_IT

+#define __HAL_ETH_EXTI_DISABLE_IT                  __HAL_ETH_WAKEUP_EXTI_DISABLE_IT

+#define __HAL_ETH_EXTI_GET_FLAG                    __HAL_ETH_WAKEUP_EXTI_GET_FLAG

+#define __HAL_ETH_EXTI_CLEAR_FLAG                  __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG

+#define __HAL_ETH_EXTI_SET_RISING_EGDE_TRIGGER     __HAL_ETH_WAKEUP_EXTI_ENABLE_RISING_EDGE_TRIGGER

+#define __HAL_ETH_EXTI_SET_FALLING_EGDE_TRIGGER    __HAL_ETH_WAKEUP_EXTI_ENABLE_FALLING_EDGE_TRIGGER

+#define __HAL_ETH_EXTI_SET_FALLINGRISING_TRIGGER   __HAL_ETH_WAKEUP_EXTI_ENABLE_FALLINGRISING_TRIGGER

+

+#define ETH_PROMISCIOUSMODE_ENABLE   ETH_PROMISCUOUS_MODE_ENABLE 

+#define ETH_PROMISCIOUSMODE_DISABLE  ETH_PROMISCUOUS_MODE_DISABLE

+#define IS_ETH_PROMISCIOUS_MODE      IS_ETH_PROMISCUOUS_MODE

+/**

+  * @}

+  */

+

+/** @defgroup HAL_LTDC_Aliased_Macros HAL LTDC Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define __HAL_LTDC_LAYER LTDC_LAYER

+/**

+  * @}

+  */

+

+/** @defgroup HAL_SAI_Aliased_Macros HAL SAI Aliased Macros maintained for legacy purpose

+  * @{

+  */

+#define SAI_OUTPUTDRIVE_DISABLED          SAI_OUTPUTDRIVE_DISABLE

+#define SAI_OUTPUTDRIVE_ENABLED           SAI_OUTPUTDRIVE_ENABLE

+#define SAI_MASTERDIVIDER_ENABLED         SAI_MASTERDIVIDER_ENABLE

+#define SAI_MASTERDIVIDER_DISABLED        SAI_MASTERDIVIDER_DISABLE

+#define SAI_STREOMODE                     SAI_STEREOMODE

+#define SAI_FIFOStatus_Empty              SAI_FIFOSTATUS_EMPTY              

+#define SAI_FIFOStatus_Less1QuarterFull   SAI_FIFOSTATUS_LESS1QUARTERFULL    

+#define SAI_FIFOStatus_1QuarterFull       SAI_FIFOSTATUS_1QUARTERFULL       

+#define SAI_FIFOStatus_HalfFull           SAI_FIFOSTATUS_HALFFULL           

+#define SAI_FIFOStatus_3QuartersFull      SAI_FIFOSTATUS_3QUARTERFULL       

+#define SAI_FIFOStatus_Full               SAI_FIFOSTATUS_FULL               

+#define IS_SAI_BLOCK_MONO_STREO_MODE     IS_SAI_BLOCK_MONO_STEREO_MODE

+

+/**

+  * @}

+  */

+

+

+/** @defgroup HAL_PPP_Aliased_Macros HAL PPP Aliased Macros maintained for legacy purpose

+  * @{

+  */

+  

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* ___STM32_HAL_LEGACY */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal.h
new file mode 100644
index 0000000..8f41bfa
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal.h
@@ -0,0 +1,171 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   This file contains all the functions prototypes for the HAL 

+  *          module driver.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_H

+#define __STM32F7xx_HAL_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_conf.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup HAL

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+/* Exported constants --------------------------------------------------------*/

+/* Exported macro ------------------------------------------------------------*/

+

+/** @brief  Freeze/Unfreeze Peripherals in Debug mode 

+  */

+#define __HAL_DBGMCU_FREEZE_TIM2()           (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM2_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM3()           (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM3_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM4()           (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM4_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM5()           (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM5_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM6()           (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM6_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM7()           (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM7_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM12()          (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM12_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM13()          (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM13_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM14()          (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM14_STOP))

+#define __HAL_DBGMCU_FREEZE_LPTIM1()         (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_LPTIM1_STOP))

+#define __HAL_DBGMCU_FREEZE_RTC()            (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_RTC_STOP))

+#define __HAL_DBGMCU_FREEZE_WWDG()           (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_WWDG_STOP))

+#define __HAL_DBGMCU_FREEZE_IWDG()           (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_IWDG_STOP))

+#define __HAL_DBGMCU_FREEZE_I2C1_TIMEOUT()   (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))

+#define __HAL_DBGMCU_FREEZE_I2C2_TIMEOUT()   (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT))

+#define __HAL_DBGMCU_FREEZE_I2C3_TIMEOUT()   (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT))

+#define __HAL_DBGMCU_FREEZE_I2C4_TIMEOUT()   (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C4_SMBUS_TIMEOUT))

+#define __HAL_DBGMCU_FREEZE_CAN1()           (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN1_STOP))

+#define __HAL_DBGMCU_FREEZE_CAN2()           (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN2_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM1()           (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM1_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM8()           (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM8_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM9()           (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM9_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM10()          (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM10_STOP))

+#define __HAL_DBGMCU_FREEZE_TIM11()          (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM11_STOP))

+

+#define __HAL_DBGMCU_UNFREEZE_TIM2()           (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM2_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM3()           (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM3_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM4()           (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM4_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM5()           (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM5_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM6()           (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM6_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM7()           (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM7_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM12()          (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM12_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM13()          (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM13_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM14()          (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM14_STOP))

+#define __HAL_DBGMCU_UNFREEZE_LPTIM1()         (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_LPTIM1_STOP))

+#define __HAL_DBGMCU_UNFREEZE_RTC()            (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_RTC_STOP))

+#define __HAL_DBGMCU_UNFREEZE_WWDG()           (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_WWDG_STOP))

+#define __HAL_DBGMCU_UNFREEZE_IWDG()           (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_IWDG_STOP))

+#define __HAL_DBGMCU_UNFREEZE_I2C1_TIMEOUT()   (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))

+#define __HAL_DBGMCU_UNFREEZE_I2C2_TIMEOUT()   (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT))

+#define __HAL_DBGMCU_UNFREEZE_I2C3_TIMEOUT()   (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT))

+#define __HAL_DBGMCU_UNFREEZE_I2C4_TIMEOUT()   (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C4_SMBUS_TIMEOUT))

+#define __HAL_DBGMCU_UNFREEZE_CAN1()           (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN1_STOP))

+#define __HAL_DBGMCU_UNFREEZE_CAN2()           (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN2_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM1()           (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM1_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM8()           (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM8_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM9()           (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM9_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM10()          (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM10_STOP))

+#define __HAL_DBGMCU_UNFREEZE_TIM11()          (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM11_STOP))

+

+

+/** @brief  FMC (NOR/RAM) mapped at 0x60000000 and SDRAM mapped at 0xC0000000

+  */

+#define __HAL_SYSCFG_REMAPMEMORY_FMC()          (SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_SWP_FMC))

+                                       

+

+/** @brief  FMC/SDRAM  mapped at 0x60000000 (NOR/RAM) mapped at 0xC0000000

+  */

+#define __HAL_SYSCFG_REMAPMEMORY_FMC_SDRAM() do {SYSCFG->MEMRMP &= ~(SYSCFG_MEMRMP_SWP_FMC);\

+                                          SYSCFG->MEMRMP |= (SYSCFG_MEMRMP_SWP_FMC_0);\

+                                         }while(0);

+

+

+/* Exported functions --------------------------------------------------------*/

+

+/* Initialization and de-initialization functions  ******************************/

+HAL_StatusTypeDef HAL_Init(void);

+HAL_StatusTypeDef HAL_DeInit(void);

+void HAL_MspInit(void);

+void HAL_MspDeInit(void);

+HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);

+

+/* Peripheral Control functions  ************************************************/

+void HAL_IncTick(void);

+void HAL_Delay(__IO uint32_t Delay);

+uint32_t HAL_GetTick(void);

+void HAL_SuspendTick(void);

+void HAL_ResumeTick(void);

+uint32_t HAL_GetHalVersion(void);

+uint32_t HAL_GetREVID(void);

+uint32_t HAL_GetDEVID(void);

+void HAL_DBGMCU_EnableDBGSleepMode(void);

+void HAL_DBGMCU_DisableDBGSleepMode(void);

+void HAL_DBGMCU_EnableDBGStopMode(void);

+void HAL_DBGMCU_DisableDBGStopMode(void);

+void HAL_DBGMCU_EnableDBGStandbyMode(void);

+void HAL_DBGMCU_DisableDBGStandbyMode(void);

+void HAL_EnableCompensationCell(void);

+void HAL_DisableCompensationCell(void);

+void HAL_EnableFMCMemorySwapping(void);

+void HAL_DisableFMCMemorySwapping(void);

+

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_adc.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_adc.h
new file mode 100644
index 0000000..3d1a4ff
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_adc.h
@@ -0,0 +1,765 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_adc.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of ADC HAL extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_ADC_H

+#define __STM32F7xx_ADC_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup ADC

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup ADC_Exported_Types ADC Exported Types

+  * @{

+  */

+   

+/** 

+  * @brief  HAL State structures definition  

+  */ 

+typedef enum

+{

+  HAL_ADC_STATE_RESET                   = 0x00,    /*!< ADC not yet initialized or disabled */

+  HAL_ADC_STATE_READY                   = 0x01,    /*!< ADC peripheral ready for use */

+  HAL_ADC_STATE_BUSY                    = 0x02,    /*!< An internal process is ongoing */ 

+  HAL_ADC_STATE_BUSY_REG                = 0x12,    /*!< Regular conversion is ongoing */

+  HAL_ADC_STATE_BUSY_INJ                = 0x22,    /*!< Injected conversion is ongoing */

+  HAL_ADC_STATE_BUSY_INJ_REG            = 0x32,    /*!< Injected and regular conversion are ongoing */

+  HAL_ADC_STATE_TIMEOUT                 = 0x03,    /*!< Timeout state */

+  HAL_ADC_STATE_ERROR                   = 0x04,    /*!< ADC state error */

+  HAL_ADC_STATE_EOC                     = 0x05,    /*!< Conversion is completed */

+  HAL_ADC_STATE_EOC_REG                 = 0x15,    /*!< Regular conversion is completed */

+  HAL_ADC_STATE_EOC_INJ                 = 0x25,    /*!< Injected conversion is completed */

+  HAL_ADC_STATE_EOC_INJ_REG             = 0x35,    /*!< Injected and regular conversion are completed */

+  HAL_ADC_STATE_AWD                     = 0x06    /*!< ADC state analog watchdog */

+

+}HAL_ADC_StateTypeDef;

+

+/** 

+  * @brief   ADC Init structure definition  

+  */ 

+typedef struct

+{

+  uint32_t ClockPrescaler;        /*!< Select the frequency of the clock to the ADC. The clock is common for 

+                                       all the ADCs.

+                                       This parameter can be a value of @ref ADC_ClockPrescaler */

+  uint32_t Resolution;            /*!< Configures the ADC resolution dual mode. 

+                                       This parameter can be a value of @ref ADC_Resolution */

+  uint32_t DataAlign;             /*!< Specifies whether the ADC data  alignment is left or right.  

+                                       This parameter can be a value of @ref ADC_data_align */

+  uint32_t ScanConvMode;          /*!< Specifies whether the conversion is performed in Scan (multi channels) or 

+                                       Single (one channel) mode.

+                                       This parameter can be set to ENABLE or DISABLE */ 

+  uint32_t EOCSelection;          /*!< Specifies whether the EOC flag is set 

+                                       at the end of single channel conversion or at the end of all conversions.

+                                       This parameter can be a value of @ref ADC_EOCSelection */

+  uint32_t ContinuousConvMode;    /*!< Specifies whether the conversion is performed in Continuous or Single mode.

+                                       This parameter can be set to ENABLE or DISABLE. */

+  uint32_t DMAContinuousRequests; /*!< Specifies whether the DMA requests is performed in Continuous or in Single mode.

+                                       This parameter can be set to ENABLE or DISABLE. */ 

+  uint32_t NbrOfConversion;       /*!< Specifies the number of ADC conversions that will be done using the sequencer for

+                                       regular channel group.

+                                       This parameter must be a number between Min_Data = 1 and Max_Data = 16. */

+  uint32_t DiscontinuousConvMode; /*!< Specifies whether the conversion is performed in Discontinuous or not 

+                                       for regular channels.

+                                       This parameter can be set to ENABLE or DISABLE. */

+  uint32_t NbrOfDiscConversion;   /*!< Specifies the number of ADC discontinuous conversions that will be done 

+                                       using the sequencer for regular channel group.

+                                       This parameter must be a number between Min_Data = 1 and Max_Data = 8. */

+  uint32_t ExternalTrigConv;      /*!< Selects the external event used to trigger the conversion start of regular group.

+                                       If set to ADC_SOFTWARE_START, external triggers are disabled.

+                                       This parameter can be a value of @ref ADC_External_trigger_Source_Regular

+                                       Note: This parameter can be modified only if there is no conversion is ongoing. */

+  uint32_t ExternalTrigConvEdge;  /*!< Selects the external trigger edge of regular group.

+                                       If trigger is set to ADC_SOFTWARE_START, this parameter is discarded.

+                                       This parameter can be a value of @ref ADC_External_trigger_edge_Regular

+                                       Note: This parameter can be modified only if there is no conversion is ongoing. */

+}ADC_InitTypeDef;

+

+/** 

+  * @brief  ADC handle Structure definition

+  */ 

+typedef struct

+{

+  ADC_TypeDef                   *Instance;                   /*!< Register base address */

+

+  ADC_InitTypeDef               Init;                        /*!< ADC required parameters */

+

+  __IO uint32_t                 NbrOfCurrentConversionRank;  /*!< ADC number of current conversion rank */

+

+  DMA_HandleTypeDef             *DMA_Handle;                 /*!< Pointer DMA Handler */

+

+  HAL_LockTypeDef               Lock;                        /*!< ADC locking object */

+

+  __IO HAL_ADC_StateTypeDef     State;                       /*!< ADC communication state */

+

+  __IO uint32_t                 ErrorCode;                   /*!< ADC Error code */

+}ADC_HandleTypeDef;

+

+/** 

+  * @brief   ADC Configuration regular Channel structure definition

+  */ 

+typedef struct 

+{

+  uint32_t Channel;        /*!< The ADC channel to configure. 

+                                This parameter can be a value of @ref ADC_channels */

+  uint32_t Rank;           /*!< The rank in the regular group sequencer. 

+                                This parameter must be a number between Min_Data = 1 and Max_Data = 16 */

+  uint32_t SamplingTime;   /*!< The sample time value to be set for the selected channel.

+                                This parameter can be a value of @ref ADC_sampling_times */

+  uint32_t Offset;         /*!< Reserved for future use, can be set to 0 */

+}ADC_ChannelConfTypeDef;

+

+/** 

+  * @brief   ADC Configuration multi-mode structure definition  

+  */ 

+typedef struct

+{

+  uint32_t WatchdogMode;      /*!< Configures the ADC analog watchdog mode.

+                                   This parameter can be a value of @ref ADC_analog_watchdog_selection */

+  uint32_t HighThreshold;     /*!< Configures the ADC analog watchdog High threshold value.

+                                   This parameter must be a 12-bit value. */     

+  uint32_t LowThreshold;      /*!< Configures the ADC analog watchdog High threshold value.

+                                   This parameter must be a 12-bit value. */

+  uint32_t Channel;           /*!< Configures ADC channel for the analog watchdog. 

+                                   This parameter has an effect only if watchdog mode is configured on single channel 

+                                   This parameter can be a value of @ref ADC_channels */      

+  uint32_t ITMode;            /*!< Specifies whether the analog watchdog is configured

+                                   is interrupt mode or in polling mode.

+                                   This parameter can be set to ENABLE or DISABLE */

+  uint32_t WatchdogNumber;    /*!< Reserved for future use, can be set to 0 */

+}ADC_AnalogWDGConfTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup ADC_Exported_Constants ADC Exported Constants

+  * @{

+  */

+

+

+/** @defgroup ADC_Error_Code ADC Error Code

+  * @{

+  */ 

+

+#define HAL_ADC_ERROR_NONE        ((uint32_t)0x00)   /*!< No error             */

+#define HAL_ADC_ERROR_OVR         ((uint32_t)0x01)   /*!< OVR error            */

+#define HAL_ADC_ERROR_DMA         ((uint32_t)0x02)   /*!< DMA transfer error   */

+/**

+  * @}

+  */  

+

+

+/** @defgroup ADC_ClockPrescaler ADC Clock Prescaler

+  * @{

+  */ 

+#define ADC_CLOCK_SYNC_PCLK_DIV2    ((uint32_t)0x00000000)

+#define ADC_CLOCK_SYNC_PCLK_DIV4    ((uint32_t)ADC_CCR_ADCPRE_0)

+#define ADC_CLOCK_SYNC_PCLK_DIV6    ((uint32_t)ADC_CCR_ADCPRE_1)

+#define ADC_CLOCK_SYNC_PCLK_DIV8    ((uint32_t)ADC_CCR_ADCPRE)

+/**

+  * @}

+  */ 

+

+/** @defgroup ADC_delay_between_2_sampling_phases ADC Delay Between 2 Sampling Phases

+  * @{

+  */ 

+#define ADC_TWOSAMPLINGDELAY_5CYCLES    ((uint32_t)0x00000000)

+#define ADC_TWOSAMPLINGDELAY_6CYCLES    ((uint32_t)ADC_CCR_DELAY_0)

+#define ADC_TWOSAMPLINGDELAY_7CYCLES    ((uint32_t)ADC_CCR_DELAY_1)

+#define ADC_TWOSAMPLINGDELAY_8CYCLES    ((uint32_t)(ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0))

+#define ADC_TWOSAMPLINGDELAY_9CYCLES    ((uint32_t)ADC_CCR_DELAY_2)

+#define ADC_TWOSAMPLINGDELAY_10CYCLES   ((uint32_t)(ADC_CCR_DELAY_2 | ADC_CCR_DELAY_0))

+#define ADC_TWOSAMPLINGDELAY_11CYCLES   ((uint32_t)(ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1))

+#define ADC_TWOSAMPLINGDELAY_12CYCLES   ((uint32_t)(ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0))

+#define ADC_TWOSAMPLINGDELAY_13CYCLES   ((uint32_t)ADC_CCR_DELAY_3)

+#define ADC_TWOSAMPLINGDELAY_14CYCLES   ((uint32_t)(ADC_CCR_DELAY_3 | ADC_CCR_DELAY_0))

+#define ADC_TWOSAMPLINGDELAY_15CYCLES   ((uint32_t)(ADC_CCR_DELAY_3 | ADC_CCR_DELAY_1))

+#define ADC_TWOSAMPLINGDELAY_16CYCLES   ((uint32_t)(ADC_CCR_DELAY_3 | ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0))

+#define ADC_TWOSAMPLINGDELAY_17CYCLES   ((uint32_t)(ADC_CCR_DELAY_3 | ADC_CCR_DELAY_2))

+#define ADC_TWOSAMPLINGDELAY_18CYCLES   ((uint32_t)(ADC_CCR_DELAY_3 | ADC_CCR_DELAY_2 | ADC_CCR_DELAY_0))

+#define ADC_TWOSAMPLINGDELAY_19CYCLES   ((uint32_t)(ADC_CCR_DELAY_3 | ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1))

+#define ADC_TWOSAMPLINGDELAY_20CYCLES   ((uint32_t)ADC_CCR_DELAY)

+/**

+  * @}

+  */ 

+

+/** @defgroup ADC_Resolution ADC Resolution

+  * @{

+  */ 

+#define ADC_RESOLUTION_12B  ((uint32_t)0x00000000)

+#define ADC_RESOLUTION_10B  ((uint32_t)ADC_CR1_RES_0)

+#define ADC_RESOLUTION_8B   ((uint32_t)ADC_CR1_RES_1)

+#define ADC_RESOLUTION_6B   ((uint32_t)ADC_CR1_RES)

+/**

+  * @}

+  */ 

+

+/** @defgroup ADC_External_trigger_edge_Regular ADC External Trigger Edge Regular

+  * @{

+  */ 

+#define ADC_EXTERNALTRIGCONVEDGE_NONE           ((uint32_t)0x00000000)

+#define ADC_EXTERNALTRIGCONVEDGE_RISING         ((uint32_t)ADC_CR2_EXTEN_0)

+#define ADC_EXTERNALTRIGCONVEDGE_FALLING        ((uint32_t)ADC_CR2_EXTEN_1)

+#define ADC_EXTERNALTRIGCONVEDGE_RISINGFALLING  ((uint32_t)ADC_CR2_EXTEN)

+/**

+  * @}

+  */ 

+

+/** @defgroup ADC_External_trigger_Source_Regular ADC External Trigger Source Regular

+  * @{

+  */

+/* Note: Parameter ADC_SOFTWARE_START is a software parameter used for        */

+/*       compatibility with other STM32 devices.                              */

+#define ADC_EXTERNALTRIGCONV_T1_CC1    ((uint32_t)0x00000000)

+#define ADC_EXTERNALTRIGCONV_T1_CC2    ((uint32_t)ADC_CR2_EXTSEL_0)

+#define ADC_EXTERNALTRIGCONV_T1_CC3    ((uint32_t)ADC_CR2_EXTSEL_1)

+#define ADC_EXTERNALTRIGCONV_T2_CC2    ((uint32_t)(ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))

+#define ADC_EXTERNALTRIGCONV_T5_TRGO   ((uint32_t)ADC_CR2_EXTSEL_2)

+#define ADC_EXTERNALTRIGCONV_T4_CC4    ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0))

+#define ADC_EXTERNALTRIGCONV_T3_CC4    ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1))

+#define ADC_EXTERNALTRIGCONV_T8_TRGO   ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))

+#define ADC_EXTERNALTRIGCONV_T8_TRGO2  ((uint32_t)ADC_CR2_EXTSEL_3)

+#define ADC_EXTERNALTRIGCONV_T1_TRGO   ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_0))

+#define ADC_EXTERNALTRIGCONV_T1_TRGO2  ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_1))

+#define ADC_EXTERNALTRIGCONV_T2_TRGO   ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))

+#define ADC_EXTERNALTRIGCONV_T4_TRGO   ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_2))

+#define ADC_EXTERNALTRIGCONV_T6_TRGO   ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0))

+

+#define ADC_EXTERNALTRIGCONV_EXT_IT11  ((uint32_t)ADC_CR2_EXTSEL)

+#define ADC_SOFTWARE_START             ((uint32_t)ADC_CR2_EXTSEL + 1)

+/**

+  * @}

+  */ 

+

+/** @defgroup ADC_data_align ADC Data Align 

+  * @{

+  */ 

+#define ADC_DATAALIGN_RIGHT      ((uint32_t)0x00000000)

+#define ADC_DATAALIGN_LEFT       ((uint32_t)ADC_CR2_ALIGN)

+/**

+  * @}

+  */ 

+

+/** @defgroup ADC_channels ADC Common Channels

+  * @{

+  */ 

+#define ADC_CHANNEL_0           ((uint32_t)0x00000000)

+#define ADC_CHANNEL_1           ((uint32_t)ADC_CR1_AWDCH_0)

+#define ADC_CHANNEL_2           ((uint32_t)ADC_CR1_AWDCH_1)

+#define ADC_CHANNEL_3           ((uint32_t)(ADC_CR1_AWDCH_1 | ADC_CR1_AWDCH_0))

+#define ADC_CHANNEL_4           ((uint32_t)ADC_CR1_AWDCH_2)

+#define ADC_CHANNEL_5           ((uint32_t)(ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_0))

+#define ADC_CHANNEL_6           ((uint32_t)(ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_1))

+#define ADC_CHANNEL_7           ((uint32_t)(ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_1 | ADC_CR1_AWDCH_0))

+#define ADC_CHANNEL_8           ((uint32_t)ADC_CR1_AWDCH_3)

+#define ADC_CHANNEL_9           ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_0))

+#define ADC_CHANNEL_10          ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_1))

+#define ADC_CHANNEL_11          ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_1 | ADC_CR1_AWDCH_0))

+#define ADC_CHANNEL_12          ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_2))

+#define ADC_CHANNEL_13          ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_0))

+#define ADC_CHANNEL_14          ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_1))

+#define ADC_CHANNEL_15          ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_1 | ADC_CR1_AWDCH_0))

+#define ADC_CHANNEL_16          ((uint32_t)ADC_CR1_AWDCH_4)

+#define ADC_CHANNEL_17          ((uint32_t)(ADC_CR1_AWDCH_4 | ADC_CR1_AWDCH_0))

+#define ADC_CHANNEL_18          ((uint32_t)(ADC_CR1_AWDCH_4 | ADC_CR1_AWDCH_1))

+

+#define ADC_CHANNEL_VREFINT     ((uint32_t)ADC_CHANNEL_17)

+#define ADC_CHANNEL_VBAT        ((uint32_t)ADC_CHANNEL_18)

+/**

+  * @}

+  */ 

+

+/** @defgroup ADC_sampling_times ADC Sampling Times

+  * @{

+  */ 

+#define ADC_SAMPLETIME_3CYCLES    ((uint32_t)0x00000000)

+#define ADC_SAMPLETIME_15CYCLES   ((uint32_t)ADC_SMPR1_SMP10_0)

+#define ADC_SAMPLETIME_28CYCLES   ((uint32_t)ADC_SMPR1_SMP10_1)

+#define ADC_SAMPLETIME_56CYCLES   ((uint32_t)(ADC_SMPR1_SMP10_1 | ADC_SMPR1_SMP10_0))

+#define ADC_SAMPLETIME_84CYCLES   ((uint32_t)ADC_SMPR1_SMP10_2)

+#define ADC_SAMPLETIME_112CYCLES  ((uint32_t)(ADC_SMPR1_SMP10_2 | ADC_SMPR1_SMP10_0))

+#define ADC_SAMPLETIME_144CYCLES  ((uint32_t)(ADC_SMPR1_SMP10_2 | ADC_SMPR1_SMP10_1))

+#define ADC_SAMPLETIME_480CYCLES  ((uint32_t)ADC_SMPR1_SMP10)

+/**

+  * @}

+  */ 

+

+  /** @defgroup ADC_EOCSelection ADC EOC Selection

+  * @{

+  */ 

+#define ADC_EOC_SEQ_CONV              ((uint32_t)0x00000000)

+#define ADC_EOC_SINGLE_CONV           ((uint32_t)0x00000001)

+#define ADC_EOC_SINGLE_SEQ_CONV       ((uint32_t)0x00000002)  /*!< reserved for future use */

+/**

+  * @}

+  */ 

+

+/** @defgroup ADC_Event_type ADC Event Type

+  * @{

+  */ 

+#define ADC_AWD_EVENT             ((uint32_t)ADC_FLAG_AWD)

+#define ADC_OVR_EVENT             ((uint32_t)ADC_FLAG_OVR)

+/**

+  * @}

+  */

+

+/** @defgroup ADC_analog_watchdog_selection ADC Analog Watchdog Selection

+  * @{

+  */ 

+#define ADC_ANALOGWATCHDOG_SINGLE_REG         ((uint32_t)(ADC_CR1_AWDSGL | ADC_CR1_AWDEN))

+#define ADC_ANALOGWATCHDOG_SINGLE_INJEC       ((uint32_t)(ADC_CR1_AWDSGL | ADC_CR1_JAWDEN))

+#define ADC_ANALOGWATCHDOG_SINGLE_REGINJEC    ((uint32_t)(ADC_CR1_AWDSGL | ADC_CR1_AWDEN | ADC_CR1_JAWDEN))

+#define ADC_ANALOGWATCHDOG_ALL_REG            ((uint32_t)ADC_CR1_AWDEN)

+#define ADC_ANALOGWATCHDOG_ALL_INJEC          ((uint32_t)ADC_CR1_JAWDEN)

+#define ADC_ANALOGWATCHDOG_ALL_REGINJEC       ((uint32_t)(ADC_CR1_AWDEN | ADC_CR1_JAWDEN))

+#define ADC_ANALOGWATCHDOG_NONE               ((uint32_t)0x00000000)

+/**

+  * @}

+  */ 

+    

+/** @defgroup ADC_interrupts_definition ADC Interrupts Definition

+  * @{

+  */ 

+#define ADC_IT_EOC      ((uint32_t)ADC_CR1_EOCIE)  

+#define ADC_IT_AWD      ((uint32_t)ADC_CR1_AWDIE) 

+#define ADC_IT_JEOC     ((uint32_t)ADC_CR1_JEOCIE)

+#define ADC_IT_OVR      ((uint32_t)ADC_CR1_OVRIE) 

+/**

+  * @}

+  */ 

+    

+/** @defgroup ADC_flags_definition ADC Flags Definition

+  * @{

+  */ 

+#define ADC_FLAG_AWD    ((uint32_t)ADC_SR_AWD)

+#define ADC_FLAG_EOC    ((uint32_t)ADC_SR_EOC)

+#define ADC_FLAG_JEOC   ((uint32_t)ADC_SR_JEOC)

+#define ADC_FLAG_JSTRT  ((uint32_t)ADC_SR_JSTRT)

+#define ADC_FLAG_STRT   ((uint32_t)ADC_SR_STRT)

+#define ADC_FLAG_OVR    ((uint32_t)ADC_SR_OVR)

+/**

+  * @}

+  */ 

+

+/** @defgroup ADC_channels_type ADC Channels Type

+  * @{

+  */ 

+#define ADC_ALL_CHANNELS      ((uint32_t)0x00000001)

+#define ADC_REGULAR_CHANNELS  ((uint32_t)0x00000002) /*!< reserved for future use */

+#define ADC_INJECTED_CHANNELS ((uint32_t)0x00000003) /*!< reserved for future use */

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup ADC_Exported_Macros ADC Exported Macros

+  * @{

+  */

+	

+/** @brief Reset ADC handle state

+  * @param  __HANDLE__: ADC handle

+  * @retval None

+  */

+#define __HAL_ADC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_ADC_STATE_RESET)

+

+/**

+  * @brief  Enable the ADC peripheral.

+  * @param  __HANDLE__: ADC handle

+  * @retval None

+  */

+#define __HAL_ADC_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR2 |=  ADC_CR2_ADON)

+

+/**

+  * @brief  Disable the ADC peripheral.

+  * @param  __HANDLE__: ADC handle

+  * @retval None

+  */

+#define __HAL_ADC_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR2 &=  ~ADC_CR2_ADON)

+

+/**

+  * @brief  Enable the ADC end of conversion interrupt.

+  * @param  __HANDLE__: specifies the ADC Handle.

+  * @param  __INTERRUPT__: ADC Interrupt.

+  * @retval None

+  */

+#define __HAL_ADC_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR1) |= (__INTERRUPT__))

+

+/**

+  * @brief  Disable the ADC end of conversion interrupt.

+  * @param  __HANDLE__: specifies the ADC Handle.

+  * @param  __INTERRUPT__: ADC interrupt.

+  * @retval None

+  */

+#define __HAL_ADC_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR1) &= ~(__INTERRUPT__))

+

+/** @brief  Check if the specified ADC interrupt source is enabled or disabled.

+  * @param  __HANDLE__: specifies the ADC Handle.

+  * @param  __INTERRUPT__: specifies the ADC interrupt source to check.

+  * @retval The new state of __IT__ (TRUE or FALSE).

+  */

+#define __HAL_ADC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)  (((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__))

+

+/**

+  * @brief  Clear the ADC's pending flags.

+  * @param  __HANDLE__: specifies the ADC Handle.

+  * @param  __FLAG__: ADC flag.

+  * @retval None

+  */

+#define __HAL_ADC_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR) = ~(__FLAG__))

+

+/**

+  * @brief  Get the selected ADC's flag status.

+  * @param  __HANDLE__: specifies the ADC Handle.

+  * @param  __FLAG__: ADC flag.

+  * @retval None

+  */

+#define __HAL_ADC_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

+

+/**

+  * @}

+  */

+

+/* Include ADC HAL Extension module */

+#include "stm32f7xx_hal_adc_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup ADC_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup ADC_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization/de-initialization functions ***********************************/

+HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc);

+HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef *hadc);

+void       HAL_ADC_MspInit(ADC_HandleTypeDef* hadc);

+void       HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc);

+/**

+  * @}

+  */

+

+/** @addtogroup ADC_Exported_Functions_Group2

+  * @{

+  */

+/* I/O operation functions ******************************************************/

+HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc);

+HAL_StatusTypeDef HAL_ADC_Stop(ADC_HandleTypeDef* hadc);

+HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout);

+

+HAL_StatusTypeDef HAL_ADC_PollForEvent(ADC_HandleTypeDef* hadc, uint32_t EventType, uint32_t Timeout);

+

+HAL_StatusTypeDef HAL_ADC_Start_IT(ADC_HandleTypeDef* hadc);

+HAL_StatusTypeDef HAL_ADC_Stop_IT(ADC_HandleTypeDef* hadc);

+

+void              HAL_ADC_IRQHandler(ADC_HandleTypeDef* hadc);

+

+HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, uint32_t Length);

+HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef* hadc);

+

+uint32_t          HAL_ADC_GetValue(ADC_HandleTypeDef* hadc);

+

+void       HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc);

+void       HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef* hadc);

+void       HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef* hadc);

+void       HAL_ADC_ErrorCallback(ADC_HandleTypeDef *hadc);

+/**

+  * @}

+  */

+

+/** @addtogroup ADC_Exported_Functions_Group3

+  * @{

+  */

+/* Peripheral Control functions *************************************************/

+HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_ChannelConfTypeDef* sConfig);

+HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef* hadc, ADC_AnalogWDGConfTypeDef* AnalogWDGConfig);

+/**

+  * @}

+  */

+

+/** @addtogroup ADC_Exported_Functions_Group4

+  * @{

+  */

+/* Peripheral State functions ***************************************************/

+HAL_ADC_StateTypeDef HAL_ADC_GetState(ADC_HandleTypeDef* hadc);

+uint32_t             HAL_ADC_GetError(ADC_HandleTypeDef *hadc);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup ADC_Private_Constants ADC Private Constants

+  * @{

+  */

+/* Delay for ADC stabilization time.                                        */

+/* Maximum delay is 1us (refer to device datasheet, parameter tSTAB).       */

+/* Unit: us                                                                 */

+#define ADC_STAB_DELAY_US               ((uint32_t) 3)

+/* Delay for temperature sensor stabilization time.                         */

+/* Maximum delay is 10us (refer to device datasheet, parameter tSTART).     */

+/* Unit: us                                                                 */

+#define ADC_TEMPSENSOR_DELAY_US         ((uint32_t) 10)

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup ADC_Private_Macros ADC Private Macros

+  * @{

+  */

+#define IS_ADC_CLOCKPRESCALER(__ADC_CLOCK__)     (((__ADC_CLOCK__) == ADC_CLOCK_SYNC_PCLK_DIV2) || \

+                                                  ((__ADC_CLOCK__) == ADC_CLOCK_SYNC_PCLK_DIV4) || \

+                                                  ((__ADC_CLOCK__) == ADC_CLOCK_SYNC_PCLK_DIV6) || \

+                                                  ((__ADC_CLOCK__) == ADC_CLOCK_SYNC_PCLK_DIV8))

+#define IS_ADC_SAMPLING_DELAY(__DELAY__) (((__DELAY__) == ADC_TWOSAMPLINGDELAY_5CYCLES)  || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_6CYCLES)  || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_7CYCLES)  || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_8CYCLES)  || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_9CYCLES)  || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_10CYCLES) || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_11CYCLES) || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_12CYCLES) || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_13CYCLES) || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_14CYCLES) || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_15CYCLES) || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_16CYCLES) || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_17CYCLES) || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_18CYCLES) || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_19CYCLES) || \

+                                          ((__DELAY__) == ADC_TWOSAMPLINGDELAY_20CYCLES))

+#define IS_ADC_RESOLUTION(__RESOLUTION__) (((__RESOLUTION__) == ADC_RESOLUTION_12B) || \

+                                           ((__RESOLUTION__) == ADC_RESOLUTION_10B) || \

+                                           ((__RESOLUTION__) == ADC_RESOLUTION_8B)  || \

+                                           ((__RESOLUTION__) == ADC_RESOLUTION_6B))			

+#define IS_ADC_EXT_TRIG_EDGE(__EDGE__) (((__EDGE__) == ADC_EXTERNALTRIGCONVEDGE_NONE)    || \

+                                        ((__EDGE__) == ADC_EXTERNALTRIGCONVEDGE_RISING)  || \

+                                        ((__EDGE__) == ADC_EXTERNALTRIGCONVEDGE_FALLING) || \

+                                        ((__EDGE__) == ADC_EXTERNALTRIGCONVEDGE_RISINGFALLING))

+#define IS_ADC_EXT_TRIG(__REGTRIG__) (((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T1_CC1)   || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T1_CC2)   || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T1_CC3)   || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T2_CC2)   || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T5_TRGO)  || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T4_CC4)   || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T3_CC4) || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T8_TRGO)  || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T8_TRGO2) || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T1_TRGO)  || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T1_TRGO2) || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T2_TRGO)  || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T4_TRGO)  || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_T6_TRGO)  || \

+                                      ((__REGTRIG__) == ADC_EXTERNALTRIGCONV_EXT_IT11) || \

+																			((__REGTRIG__) == ADC_SOFTWARE_START))

+#define IS_ADC_DATA_ALIGN(__ALIGN__) (((__ALIGN__) == ADC_DATAALIGN_RIGHT) || \

+                                      ((__ALIGN__) == ADC_DATAALIGN_LEFT))		

+                                      									

+#define IS_ADC_SAMPLE_TIME(__TIME__) (((__TIME__) == ADC_SAMPLETIME_3CYCLES)   || \

+                                      ((__TIME__) == ADC_SAMPLETIME_15CYCLES)  || \

+                                      ((__TIME__) == ADC_SAMPLETIME_28CYCLES)  || \

+                                      ((__TIME__) == ADC_SAMPLETIME_56CYCLES)  || \

+                                      ((__TIME__) == ADC_SAMPLETIME_84CYCLES)  || \

+                                      ((__TIME__) == ADC_SAMPLETIME_112CYCLES) || \

+                                      ((__TIME__) == ADC_SAMPLETIME_144CYCLES) || \

+                                      ((__TIME__) == ADC_SAMPLETIME_480CYCLES))	

+#define IS_ADC_EOCSelection(__EOCSelection__) (((__EOCSelection__) == ADC_EOC_SINGLE_CONV)   || \

+                                               ((__EOCSelection__) == ADC_EOC_SEQ_CONV)  || \

+                                               ((__EOCSelection__) == ADC_EOC_SINGLE_SEQ_CONV))	

+#define IS_ADC_EVENT_TYPE(__EVENT__) (((__EVENT__) == ADC_AWD_EVENT) || \

+                                      ((__EVENT__) == ADC_OVR_EVENT))		

+#define IS_ADC_ANALOG_WATCHDOG(__WATCHDOG__) (((__WATCHDOG__) == ADC_ANALOGWATCHDOG_SINGLE_REG)        || \

+                                              ((__WATCHDOG__) == ADC_ANALOGWATCHDOG_SINGLE_INJEC)      || \

+                                              ((__WATCHDOG__) == ADC_ANALOGWATCHDOG_SINGLE_REGINJEC)   || \

+                                              ((__WATCHDOG__) == ADC_ANALOGWATCHDOG_ALL_REG)           || \

+                                              ((__WATCHDOG__) == ADC_ANALOGWATCHDOG_ALL_INJEC)         || \

+                                              ((__WATCHDOG__) == ADC_ANALOGWATCHDOG_ALL_REGINJEC)      || \

+                                              ((__WATCHDOG__) == ADC_ANALOGWATCHDOG_NONE))

+#define IS_ADC_CHANNELS_TYPE(CHANNEL_TYPE) (((CHANNEL_TYPE) == ADC_ALL_CHANNELS) || \

+                                            ((CHANNEL_TYPE) == ADC_REGULAR_CHANNELS) || \

+                                            ((CHANNEL_TYPE) == ADC_INJECTED_CHANNELS))

+#define IS_ADC_THRESHOLD(__THRESHOLD__) ((__THRESHOLD__) <= ((uint32_t)0xFFF))

+#define IS_ADC_REGULAR_LENGTH(__LENGTH__) (((__LENGTH__) >= ((uint32_t)1)) && ((__LENGTH__) <= ((uint32_t)16)))

+#define IS_ADC_REGULAR_RANK(__RANK__) (((__RANK__) >= ((uint32_t)1)) && ((__RANK__) <= ((uint32_t)16)))

+#define IS_ADC_REGULAR_DISC_NUMBER(__NUMBER__) (((__NUMBER__) >= ((uint32_t)1)) && ((__NUMBER__) <= ((uint32_t)8)))

+#define IS_ADC_RANGE(__RESOLUTION__, __ADC_VALUE__)                                     \

+   ((((__RESOLUTION__) == ADC_RESOLUTION_12B) && ((__ADC_VALUE__) <= ((uint32_t)0x0FFF))) || \

+    (((__RESOLUTION__) == ADC_RESOLUTION_10B) && ((__ADC_VALUE__) <= ((uint32_t)0x03FF))) || \

+    (((__RESOLUTION__) == ADC_RESOLUTION_8B)  && ((__ADC_VALUE__) <= ((uint32_t)0x00FF))) || \

+    (((__RESOLUTION__) == ADC_RESOLUTION_6B)  && ((__ADC_VALUE__) <= ((uint32_t)0x003F))))

+

+/**

+  * @brief  Set ADC Regular channel sequence length.

+  * @param  _NbrOfConversion_: Regular channel sequence length. 

+  * @retval None

+  */

+#define ADC_SQR1(_NbrOfConversion_) (((_NbrOfConversion_) - (uint8_t)1) << 20)

+

+/**

+  * @brief  Set the ADC's sample time for channel numbers between 10 and 18.

+  * @param  _SAMPLETIME_: Sample time parameter.

+  * @param  _CHANNELNB_: Channel number.  

+  * @retval None

+  */

+#define ADC_SMPR1(_SAMPLETIME_, _CHANNELNB_) ((_SAMPLETIME_) << (3 * (((uint32_t)((uint16_t)(_CHANNELNB_))) - 10)))

+

+/**

+  * @brief  Set the ADC's sample time for channel numbers between 0 and 9.

+  * @param  _SAMPLETIME_: Sample time parameter.

+  * @param  _CHANNELNB_: Channel number.  

+  * @retval None

+  */

+#define ADC_SMPR2(_SAMPLETIME_, _CHANNELNB_) ((_SAMPLETIME_) << (3 * ((uint32_t)((uint16_t)(_CHANNELNB_)))))

+

+/**

+  * @brief  Set the selected regular channel rank for rank between 1 and 6.

+  * @param  _CHANNELNB_: Channel number.

+  * @param  _RANKNB_: Rank number.    

+  * @retval None

+  */

+#define ADC_SQR3_RK(_CHANNELNB_, _RANKNB_) (((uint32_t)((uint16_t)(_CHANNELNB_))) << (5 * ((_RANKNB_) - 1)))

+

+/**

+  * @brief  Set the selected regular channel rank for rank between 7 and 12.

+  * @param  _CHANNELNB_: Channel number.

+  * @param  _RANKNB_: Rank number.    

+  * @retval None

+  */

+#define ADC_SQR2_RK(_CHANNELNB_, _RANKNB_) (((uint32_t)((uint16_t)(_CHANNELNB_))) << (5 * ((_RANKNB_) - 7)))

+

+/**

+  * @brief  Set the selected regular channel rank for rank between 13 and 16.

+  * @param  _CHANNELNB_: Channel number.

+  * @param  _RANKNB_: Rank number.    

+  * @retval None

+  */

+#define ADC_SQR1_RK(_CHANNELNB_, _RANKNB_) (((uint32_t)((uint16_t)(_CHANNELNB_))) << (5 * ((_RANKNB_) - 13)))

+

+/**

+  * @brief  Enable ADC continuous conversion mode.

+  * @param  _CONTINUOUS_MODE_: Continuous mode.

+  * @retval None

+  */

+#define ADC_CR2_CONTINUOUS(_CONTINUOUS_MODE_) ((_CONTINUOUS_MODE_) << 1)

+

+/**

+  * @brief  Configures the number of discontinuous conversions for the regular group channels.

+  * @param  _NBR_DISCONTINUOUSCONV_: Number of discontinuous conversions.

+  * @retval None

+  */

+#define ADC_CR1_DISCONTINUOUS(_NBR_DISCONTINUOUSCONV_) (((_NBR_DISCONTINUOUSCONV_) - 1) << POSITION_VAL(ADC_CR1_DISCNUM))

+

+/**

+  * @brief  Enable ADC scan mode.

+  * @param  _SCANCONV_MODE_: Scan conversion mode.

+  * @retval None

+  */

+#define ADC_CR1_SCANCONV(_SCANCONV_MODE_) ((_SCANCONV_MODE_) << 8)

+

+/**

+  * @brief  Enable the ADC end of conversion selection.

+  * @param  _EOCSelection_MODE_: End of conversion selection mode.

+  * @retval None

+  */

+#define ADC_CR2_EOCSelection(_EOCSelection_MODE_) ((_EOCSelection_MODE_) << 10)

+

+/**

+  * @brief  Enable the ADC DMA continuous request.

+  * @param  _DMAContReq_MODE_: DMA continuous request mode.

+  * @retval None

+  */

+#define ADC_CR2_DMAContReq(_DMAContReq_MODE_) ((_DMAContReq_MODE_) << 9)

+

+/**

+  * @brief Return resolution bits in CR1 register.

+  * @param __HANDLE__: ADC handle

+  * @retval None

+  */

+#define ADC_GET_RESOLUTION(__HANDLE__) (((__HANDLE__)->Instance->CR1) & ADC_CR1_RES)

+																

+/**

+  * @}

+  */

+	

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup ADC_Private_Functions ADC Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+	

+/**

+  * @}

+  */

+	

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /*__STM32F7xx_ADC_H */

+

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_adc_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_adc_ex.h
new file mode 100644
index 0000000..8a84913
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_adc_ex.h
@@ -0,0 +1,329 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_adc.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of ADC HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_ADC_EX_H

+#define __STM32F7xx_ADC_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup ADCEx

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup ADCEx_Exported_Types ADC Exported Types

+  * @{

+  */

+   

+/** 

+  * @brief   ADC Configuration injected Channel structure definition

+  */ 

+typedef struct 

+{

+  uint32_t InjectedChannel;                /*!< Configure the ADC injected channel.

+                                                This parameter can be a value of @ref ADC_channels */ 

+  uint32_t InjectedRank;                   /*!< The rank in the injected group sequencer

+                                                This parameter must be a number between Min_Data = 1 and Max_Data = 4. */ 

+  uint32_t InjectedSamplingTime;           /*!< The sample time value to be set for the selected channel.

+                                                This parameter can be a value of @ref ADC_sampling_times */

+  uint32_t InjectedOffset;                 /*!< Defines the offset to be subtracted from the raw converted data when convert injected channels.

+                                                This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */

+  uint32_t InjectedNbrOfConversion;        /*!< Specifies the number of ADC conversions that will be done using the sequencer for

+                                                injected channel group.

+                                                This parameter must be a number between Min_Data = 1 and Max_Data = 4. */

+  uint32_t AutoInjectedConv;               /*!< Enables or disables the selected ADC automatic injected group 

+                                                conversion after regular one */

+  uint32_t InjectedDiscontinuousConvMode;  /*!< Specifies whether the conversion is performed in Discontinuous mode or not for injected channels.

+                                                This parameter can be set to ENABLE or DISABLE. */

+  uint32_t ExternalTrigInjecConvEdge;      /*!< Select the external trigger edge and enable the trigger of an injected channels. 

+                                                This parameter can be a value of @ref ADCEx_External_trigger_edge_Injected */

+  uint32_t ExternalTrigInjecConv;          /*!< Select the external event used to trigger the start of conversion of a injected channels.

+                                                This parameter can be a value of @ref ADCEx_External_trigger_Source_Injected */

+}ADC_InjectionConfTypeDef;

+

+/** 

+  * @brief   ADC Configuration multi-mode structure definition  

+  */ 

+typedef struct

+{

+  uint32_t Mode;              /*!< Configures the ADC to operate in independent or multi mode. 

+                                   This parameter can be a value of @ref ADCEx_Common_mode */

+  uint32_t DMAAccessMode;     /*!< Configures the Direct memory access mode for multi ADC mode.

+                                   This parameter can be a value of @ref ADCEx_Direct_memory_access_mode_for_multi_mode */

+  uint32_t TwoSamplingDelay;  /*!< Configures the Delay between 2 sampling phases.

+                                   This parameter can be a value of @ref ADC_delay_between_2_sampling_phases */

+}ADC_MultiModeTypeDef;

+

+/**

+  * @}

+  */ 

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup ADCEx_Exported_Constants ADC Exported Constants

+  * @{

+  */

+

+/** @defgroup ADCEx_Common_mode ADC Common Mode

+  * @{

+  */

+#define ADC_MODE_INDEPENDENT                  ((uint32_t)0x00000000)      

+#define ADC_DUALMODE_REGSIMULT_INJECSIMULT    ((uint32_t)ADC_CCR_MULTI_0)

+#define ADC_DUALMODE_REGSIMULT_ALTERTRIG      ((uint32_t)ADC_CCR_MULTI_1)

+#define ADC_DUALMODE_INJECSIMULT              ((uint32_t)(ADC_CCR_MULTI_2 | ADC_CCR_MULTI_0))

+#define ADC_DUALMODE_REGSIMULT                ((uint32_t)(ADC_CCR_MULTI_2 | ADC_CCR_MULTI_1))

+#define ADC_DUALMODE_INTERL                   ((uint32_t)(ADC_CCR_MULTI_2 | ADC_CCR_MULTI_1 | ADC_CCR_MULTI_0))

+#define ADC_DUALMODE_ALTERTRIG                ((uint32_t)(ADC_CCR_MULTI_3 | ADC_CCR_MULTI_0))

+#define ADC_TRIPLEMODE_REGSIMULT_INJECSIMULT  ((uint32_t)(ADC_CCR_MULTI_4 | ADC_CCR_MULTI_0))

+#define ADC_TRIPLEMODE_REGSIMULT_AlterTrig    ((uint32_t)(ADC_CCR_MULTI_4 | ADC_CCR_MULTI_1))

+#define ADC_TRIPLEMODE_INJECSIMULT            ((uint32_t)(ADC_CCR_MULTI_4 | ADC_CCR_MULTI_2 | ADC_CCR_MULTI_0))

+#define ADC_TRIPLEMODE_REGSIMULT              ((uint32_t)(ADC_CCR_MULTI_4 | ADC_CCR_MULTI_2 | ADC_CCR_MULTI_1))

+#define ADC_TRIPLEMODE_INTERL                 ((uint32_t)(ADC_CCR_MULTI_4 | ADC_CCR_MULTI_2 | ADC_CCR_MULTI_1 | ADC_CCR_MULTI_0))

+#define ADC_TRIPLEMODE_ALTERTRIG              ((uint32_t)(ADC_CCR_MULTI_4 | ADC_CCR_MULTI_3 | ADC_CCR_MULTI_0))

+/**

+  * @}

+  */ 

+

+/** @defgroup ADCEx_Direct_memory_access_mode_for_multi_mode ADC Direct Memory Access Mode For Multi Mode

+  * @{

+  */ 

+#define ADC_DMAACCESSMODE_DISABLED  ((uint32_t)0x00000000)     /*!< DMA mode disabled */

+#define ADC_DMAACCESSMODE_1         ((uint32_t)ADC_CCR_DMA_0)  /*!< DMA mode 1 enabled (2 / 3 half-words one by one - 1 then 2 then 3)*/

+#define ADC_DMAACCESSMODE_2         ((uint32_t)ADC_CCR_DMA_1)  /*!< DMA mode 2 enabled (2 / 3 half-words by pairs - 2&1 then 1&3 then 3&2)*/

+#define ADC_DMAACCESSMODE_3         ((uint32_t)ADC_CCR_DMA)    /*!< DMA mode 3 enabled (2 / 3 bytes by pairs - 2&1 then 1&3 then 3&2) */

+/**

+  * @}

+  */ 

+

+/** @defgroup ADCEx_External_trigger_edge_Injected ADC External Trigger Edge Injected

+  * @{

+  */

+#define ADC_EXTERNALTRIGINJECCONVEDGE_NONE           ((uint32_t)0x00000000)

+#define ADC_EXTERNALTRIGINJECCONVEDGE_RISING         ((uint32_t)ADC_CR2_JEXTEN_0)

+#define ADC_EXTERNALTRIGINJECCONVEDGE_FALLING        ((uint32_t)ADC_CR2_JEXTEN_1)

+#define ADC_EXTERNALTRIGINJECCONVEDGE_RISINGFALLING  ((uint32_t)ADC_CR2_JEXTEN)

+/**

+  * @}

+  */ 

+

+/** @defgroup ADCEx_External_trigger_Source_Injected ADC External Trigger Source Injected

+  * @{

+  */

+#define ADC_EXTERNALTRIGINJECCONV_T1_TRGO         ((uint32_t)0x00000000)

+#define ADC_EXTERNALTRIGINJECCONV_T1_CC4          ((uint32_t)ADC_CR2_JEXTSEL_0)

+#define ADC_EXTERNALTRIGINJECCONV_T2_TRGO         ((uint32_t)ADC_CR2_JEXTSEL_1)

+#define ADC_EXTERNALTRIGINJECCONV_T2_CC1          ((uint32_t)(ADC_CR2_JEXTSEL_1 | ADC_CR2_JEXTSEL_0))

+#define ADC_EXTERNALTRIGINJECCONV_T3_CC4          ((uint32_t)ADC_CR2_JEXTSEL_2)

+#define ADC_EXTERNALTRIGINJECCONV_T4_TRGO         ((uint32_t)(ADC_CR2_JEXTSEL_2 | ADC_CR2_JEXTSEL_0))

+

+#define ADC_EXTERNALTRIGINJECCONV_T8_CC4          ((uint32_t)(ADC_CR2_JEXTSEL_2 | ADC_CR2_JEXTSEL_1 | ADC_CR2_JEXTSEL_0))

+#define ADC_EXTERNALTRIGINJECCONV_T1_TRGO2        ((uint32_t)ADC_CR2_JEXTSEL_3)

+#define ADC_EXTERNALTRIGINJECCONV_T8_TRGO         ((uint32_t)(ADC_CR2_JEXTSEL_3 | ADC_CR2_JEXTSEL_0))

+#define ADC_EXTERNALTRIGINJECCONV_T8_TRGO2        ((uint32_t)(ADC_CR2_JEXTSEL_3 | ADC_CR2_JEXTSEL_1))

+#define ADC_EXTERNALTRIGINJECCONV_T3_CC3          ((uint32_t)(ADC_CR2_JEXTSEL_3 | ADC_CR2_JEXTSEL_1 | ADC_CR2_JEXTSEL_0))

+#define ADC_EXTERNALTRIGINJECCONV_T5_TRGO         ((uint32_t)(ADC_CR2_JEXTSEL_3 | ADC_CR2_JEXTSEL_2))

+#define ADC_EXTERNALTRIGINJECCONV_T3_CC1          ((uint32_t)(ADC_CR2_JEXTSEL_3 | ADC_CR2_JEXTSEL_2 | ADC_CR2_JEXTSEL_0))

+#define ADC_EXTERNALTRIGINJECCONV_T6_TRGO         ((uint32_t)(ADC_CR2_JEXTSEL_3 | ADC_CR2_JEXTSEL_2 | ADC_CR2_JEXTSEL_1))

+/**

+  * @}

+  */ 

+

+/** @defgroup ADCEx_injected_channel_selection ADC Injected Channel Selection

+  * @{

+  */ 

+#define ADC_INJECTED_RANK_1    ((uint32_t)0x00000001)

+#define ADC_INJECTED_RANK_2    ((uint32_t)0x00000002)

+#define ADC_INJECTED_RANK_3    ((uint32_t)0x00000003)

+#define ADC_INJECTED_RANK_4    ((uint32_t)0x00000004)

+/**

+  * @}

+  */ 

+

+/** @defgroup ADCEx_channels  ADC Specific Channels

+  * @{

+  */

+#define ADC_CHANNEL_TEMPSENSOR  ((uint32_t)ADC_CHANNEL_16)    

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */ 

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup ADC_Exported_Macros ADC Exported Macros

+  * @{

+  */

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup ADCEx_Exported_Functions

+  * @{

+  */

+	

+/** @addtogroup ADCEx_Exported_Functions_Group1

+  * @{

+  */

+

+/* I/O operation functions ******************************************************/

+HAL_StatusTypeDef HAL_ADCEx_InjectedStart(ADC_HandleTypeDef* hadc);

+HAL_StatusTypeDef HAL_ADCEx_InjectedStop(ADC_HandleTypeDef* hadc);

+HAL_StatusTypeDef HAL_ADCEx_InjectedPollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout);

+HAL_StatusTypeDef HAL_ADCEx_InjectedStart_IT(ADC_HandleTypeDef* hadc);

+HAL_StatusTypeDef HAL_ADCEx_InjectedStop_IT(ADC_HandleTypeDef* hadc);

+uint32_t          HAL_ADCEx_InjectedGetValue(ADC_HandleTypeDef* hadc, uint32_t InjectedRank);

+HAL_StatusTypeDef HAL_ADCEx_MultiModeStart_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, uint32_t Length);

+HAL_StatusTypeDef HAL_ADCEx_MultiModeStop_DMA(ADC_HandleTypeDef* hadc);

+uint32_t          HAL_ADCEx_MultiModeGetValue(ADC_HandleTypeDef* hadc);

+void       HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef* hadc);

+

+/* Peripheral Control functions *************************************************/

+HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel(ADC_HandleTypeDef* hadc,ADC_InjectionConfTypeDef* sConfigInjected);

+HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel(ADC_HandleTypeDef* hadc, ADC_MultiModeTypeDef* multimode);

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup ADCEx_Private_Constants ADC Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */

+	

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup ADCEx_Private_Macros ADC Private Macros

+  * @{

+  */

+#define IS_ADC_CHANNEL(CHANNEL) (((CHANNEL) <= ADC_CHANNEL_18)  || \

+                                 ((CHANNEL) == ADC_CHANNEL_TEMPSENSOR))

+                                     

+#define IS_ADC_MODE(__MODE__) (((__MODE__) == ADC_MODE_INDEPENDENT)                 || \

+                               ((__MODE__) == ADC_DUALMODE_REGSIMULT_INJECSIMULT)   || \

+                               ((__MODE__) == ADC_DUALMODE_REGSIMULT_ALTERTRIG)     || \

+                               ((__MODE__) == ADC_DUALMODE_INJECSIMULT)             || \

+                               ((__MODE__) == ADC_DUALMODE_REGSIMULT)               || \

+                               ((__MODE__) == ADC_DUALMODE_INTERL)                  || \

+                               ((__MODE__) == ADC_DUALMODE_ALTERTRIG)               || \

+                               ((__MODE__) == ADC_TRIPLEMODE_REGSIMULT_INJECSIMULT) || \

+                               ((__MODE__) == ADC_TRIPLEMODE_REGSIMULT_AlterTrig)   || \

+                               ((__MODE__) == ADC_TRIPLEMODE_INJECSIMULT)           || \

+                               ((__MODE__) == ADC_TRIPLEMODE_REGSIMULT)             || \

+                               ((__MODE__) == ADC_TRIPLEMODE_INTERL)                || \

+                               ((__MODE__) == ADC_TRIPLEMODE_ALTERTRIG))

+#define IS_ADC_DMA_ACCESS_MODE(__MODE__) (((__MODE__) == ADC_DMAACCESSMODE_DISABLED) || \

+                                          ((__MODE__) == ADC_DMAACCESSMODE_1)        || \

+                                          ((__MODE__) == ADC_DMAACCESSMODE_2)        || \

+                                          ((__MODE__) == ADC_DMAACCESSMODE_3))

+#define IS_ADC_EXT_INJEC_TRIG_EDGE(__EDGE__) (((__EDGE__) == ADC_EXTERNALTRIGINJECCONVEDGE_NONE)    || \

+                                              ((__EDGE__) == ADC_EXTERNALTRIGINJECCONVEDGE_RISING)  || \

+                                              ((__EDGE__) == ADC_EXTERNALTRIGINJECCONVEDGE_FALLING) || \

+                                              ((__EDGE__) == ADC_EXTERNALTRIGINJECCONVEDGE_RISINGFALLING))

+#define IS_ADC_EXT_INJEC_TRIG(__INJTRIG__) (((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T1_TRGO)  || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T1_CC4)   || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T2_TRGO)  || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T2_CC1)   || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T3_CC4)   || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T4_TRGO)  || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T8_CC4)   || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T1_TRGO2) || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T8_TRGO)  || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T8_TRGO2) || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T3_CC3)   || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T5_TRGO)  || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T3_CC1)   || \

+                                            ((__INJTRIG__) == ADC_EXTERNALTRIGINJECCONV_T6_TRGO))

+#define IS_ADC_INJECTED_LENGTH(__LENGTH__) (((__LENGTH__) >= ((uint32_t)1)) && ((__LENGTH__) <= ((uint32_t)4)))

+#define IS_ADC_INJECTED_RANK(__RANK__) (((__RANK__) >= ((uint32_t)1)) && ((__RANK__) <= ((uint32_t)4)))

+

+/**

+  * @brief  Set the selected injected Channel rank.

+  * @param  _CHANNELNB_: Channel number.

+  * @param  _RANKNB_: Rank number. 

+  * @param  _JSQR_JL_: Sequence length.     

+  * @retval None

+  */

+#define   ADC_JSQR(_CHANNELNB_, _RANKNB_,_JSQR_JL_) (((uint32_t)((uint16_t)(_CHANNELNB_))) << (5 * (uint8_t)(((_RANKNB_) + 3) - (_JSQR_JL_))))

+/**

+  * @}

+  */

+	

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup ADCEx_Private_Functions ADC Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+	

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /*__STM32F7xx_ADC_EX_H */

+

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_can.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_can.h
new file mode 100644
index 0000000..3059966
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_can.h
@@ -0,0 +1,769 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_can.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of CAN HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_CAN_H

+#define __STM32F7xx_HAL_CAN_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup CAN

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup CAN_Exported_Types CAN Exported Types

+  * @{

+  */

+

+/**

+  * @brief  HAL State structures definition

+  */

+typedef enum

+{

+  HAL_CAN_STATE_RESET             = 0x00,  /*!< CAN not yet initialized or disabled */

+  HAL_CAN_STATE_READY             = 0x01,  /*!< CAN initialized and ready for use   */

+  HAL_CAN_STATE_BUSY              = 0x02,  /*!< CAN process is ongoing              */

+  HAL_CAN_STATE_BUSY_TX           = 0x12,  /*!< CAN process is ongoing              */

+  HAL_CAN_STATE_BUSY_RX           = 0x22,  /*!< CAN process is ongoing              */

+  HAL_CAN_STATE_BUSY_TX_RX        = 0x32,  /*!< CAN process is ongoing              */

+  HAL_CAN_STATE_TIMEOUT           = 0x03,  /*!< Timeout state                       */

+  HAL_CAN_STATE_ERROR             = 0x04   /*!< CAN error state                     */

+

+}HAL_CAN_StateTypeDef;

+

+/**

+  * @brief  CAN init structure definition

+  */

+typedef struct

+{

+  uint32_t Prescaler;  /*!< Specifies the length of a time quantum.

+                            This parameter must be a number between Min_Data = 1 and Max_Data = 1024 */

+

+  uint32_t Mode;       /*!< Specifies the CAN operating mode.

+                            This parameter can be a value of @ref CAN_operating_mode */

+

+  uint32_t SJW;        /*!< Specifies the maximum number of time quanta

+                            the CAN hardware is allowed to lengthen or

+                            shorten a bit to perform resynchronization.

+                            This parameter can be a value of @ref CAN_synchronisation_jump_width */

+

+  uint32_t BS1;        /*!< Specifies the number of time quanta in Bit Segment 1.

+                            This parameter can be a value of @ref CAN_time_quantum_in_bit_segment_1 */

+

+  uint32_t BS2;        /*!< Specifies the number of time quanta in Bit Segment 2.

+                            This parameter can be a value of @ref CAN_time_quantum_in_bit_segment_2 */

+

+  uint32_t TTCM;       /*!< Enable or disable the time triggered communication mode.

+                            This parameter can be set to ENABLE or DISABLE. */

+

+  uint32_t ABOM;       /*!< Enable or disable the automatic bus-off management.

+                            This parameter can be set to ENABLE or DISABLE */

+

+  uint32_t AWUM;       /*!< Enable or disable the automatic wake-up mode.

+                            This parameter can be set to ENABLE or DISABLE */

+

+  uint32_t NART;       /*!< Enable or disable the non-automatic retransmission mode.

+                            This parameter can be set to ENABLE or DISABLE */

+

+  uint32_t RFLM;       /*!< Enable or disable the receive FIFO Locked mode.

+                            This parameter can be set to ENABLE or DISABLE */

+

+  uint32_t TXFP;       /*!< Enable or disable the transmit FIFO priority.

+                            This parameter can be set to ENABLE or DISABLE */

+}CAN_InitTypeDef;

+

+/**

+  * @brief  CAN filter configuration structure definition

+  */

+typedef struct

+{

+  uint32_t FilterIdHigh;          /*!< Specifies the filter identification number (MSBs for a 32-bit

+                                       configuration, first one for a 16-bit configuration).

+                                       This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */

+

+  uint32_t FilterIdLow;           /*!< Specifies the filter identification number (LSBs for a 32-bit

+                                       configuration, second one for a 16-bit configuration).

+                                       This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */

+

+  uint32_t FilterMaskIdHigh;      /*!< Specifies the filter mask number or identification number,

+                                       according to the mode (MSBs for a 32-bit configuration,

+                                       first one for a 16-bit configuration).

+                                       This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */

+

+  uint32_t FilterMaskIdLow;       /*!< Specifies the filter mask number or identification number,

+                                       according to the mode (LSBs for a 32-bit configuration,

+                                       second one for a 16-bit configuration).

+                                       This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */

+

+  uint32_t FilterFIFOAssignment;  /*!< Specifies the FIFO (0 or 1) which will be assigned to the filter.

+                                       This parameter can be a value of @ref CAN_filter_FIFO */

+

+  uint32_t FilterNumber;          /*!< Specifies the filter which will be initialized.

+                                       This parameter must be a number between Min_Data = 0 and Max_Data = 27 */

+

+  uint32_t FilterMode;            /*!< Specifies the filter mode to be initialized.

+                                       This parameter can be a value of @ref CAN_filter_mode */

+

+  uint32_t FilterScale;           /*!< Specifies the filter scale.

+                                       This parameter can be a value of @ref CAN_filter_scale */

+

+  uint32_t FilterActivation;      /*!< Enable or disable the filter.

+                                       This parameter can be set to ENABLE or DISABLE. */

+

+  uint32_t BankNumber;            /*!< Select the start slave bank filter.

+                                       This parameter must be a number between Min_Data = 0 and Max_Data = 28 */

+

+}CAN_FilterConfTypeDef;

+

+/**

+  * @brief  CAN Tx message structure definition

+  */

+typedef struct

+{

+  uint32_t StdId;    /*!< Specifies the standard identifier.

+                          This parameter must be a number between Min_Data = 0 and Max_Data = 0x7FF */

+

+  uint32_t ExtId;    /*!< Specifies the extended identifier.

+                          This parameter must be a number between Min_Data = 0 and Max_Data = 0x1FFFFFFF */

+

+  uint32_t IDE;      /*!< Specifies the type of identifier for the message that will be transmitted.

+                          This parameter can be a value of @ref CAN_Identifier_Type */

+

+  uint32_t RTR;      /*!< Specifies the type of frame for the message that will be transmitted.

+                          This parameter can be a value of @ref CAN_remote_transmission_request */

+

+  uint32_t DLC;      /*!< Specifies the length of the frame that will be transmitted.

+                          This parameter must be a number between Min_Data = 0 and Max_Data = 8 */

+

+  uint8_t Data[8];  /*!< Contains the data to be transmitted.

+                          This parameter must be a number between Min_Data = 0 and Max_Data = 0xFF */

+

+}CanTxMsgTypeDef;

+

+/**

+  * @brief  CAN Rx message structure definition

+  */

+typedef struct

+{

+  uint32_t StdId;       /*!< Specifies the standard identifier.

+                             This parameter must be a number between Min_Data = 0 and Max_Data = 0x7FF */

+

+  uint32_t ExtId;       /*!< Specifies the extended identifier.

+                             This parameter must be a number between Min_Data = 0 and Max_Data = 0x1FFFFFFF */

+

+  uint32_t IDE;         /*!< Specifies the type of identifier for the message that will be received.

+                             This parameter can be a value of @ref CAN_Identifier_Type */

+

+  uint32_t RTR;         /*!< Specifies the type of frame for the received message.

+                             This parameter can be a value of @ref CAN_remote_transmission_request */

+

+  uint32_t DLC;         /*!< Specifies the length of the frame that will be received.

+                             This parameter must be a number between Min_Data = 0 and Max_Data = 8 */

+

+  uint8_t Data[8];      /*!< Contains the data to be received.

+                             This parameter must be a number between Min_Data = 0 and Max_Data = 0xFF */

+

+  uint32_t FMI;         /*!< Specifies the index of the filter the message stored in the mailbox passes through.

+                             This parameter must be a number between Min_Data = 0 and Max_Data = 0xFF */

+

+  uint32_t FIFONumber;  /*!< Specifies the receive FIFO number.

+                             This parameter can be CAN_FIFO0 or CAN_FIFO1 */

+

+}CanRxMsgTypeDef;

+

+/**

+  * @brief  CAN handle Structure definition

+  */

+typedef struct

+{

+  CAN_TypeDef                 *Instance;  /*!< Register base address          */

+

+  CAN_InitTypeDef             Init;       /*!< CAN required parameters        */

+

+  CanTxMsgTypeDef*            pTxMsg;     /*!< Pointer to transmit structure  */

+

+  CanRxMsgTypeDef*            pRxMsg;     /*!< Pointer to reception structure */

+

+  __IO HAL_CAN_StateTypeDef   State;      /*!< CAN communication state        */

+

+  HAL_LockTypeDef             Lock;       /*!< CAN locking object             */

+

+  __IO uint32_t               ErrorCode;  /*!< CAN Error code                 */

+

+}CAN_HandleTypeDef;

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup CAN_Exported_Constants CAN Exported Constants

+  * @{

+  */

+

+/** @defgroup HAL_CAN_Error_Code HAL CAN Error Code

+  * @{

+  */

+#define   HAL_CAN_ERROR_NONE      0x00    /*!< No error             */

+#define   HAL_CAN_ERROR_EWG       0x01    /*!< EWG error            */

+#define   HAL_CAN_ERROR_EPV       0x02    /*!< EPV error            */

+#define   HAL_CAN_ERROR_BOF       0x04    /*!< BOF error            */

+#define   HAL_CAN_ERROR_STF       0x08    /*!< Stuff error          */

+#define   HAL_CAN_ERROR_FOR       0x10    /*!< Form error           */

+#define   HAL_CAN_ERROR_ACK       0x20    /*!< Acknowledgment error */

+#define   HAL_CAN_ERROR_BR        0x40    /*!< Bit recessive        */

+#define   HAL_CAN_ERROR_BD        0x80    /*!< LEC dominant         */

+#define   HAL_CAN_ERROR_CRC       0x100   /*!< LEC transfer error   */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_InitStatus CAN InitStatus

+  * @{

+  */

+#define CAN_INITSTATUS_FAILED       ((uint8_t)0x00)  /*!< CAN initialization failed */

+#define CAN_INITSTATUS_SUCCESS      ((uint8_t)0x01)  /*!< CAN initialization OK */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_operating_mode CAN Operating Mode

+  * @{

+  */

+#define CAN_MODE_NORMAL             ((uint32_t)0x00000000)                     /*!< 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 */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_synchronisation_jump_width CAN Synchronisation Jump Width

+  * @{

+  */

+#define CAN_SJW_1TQ                 ((uint32_t)0x00000000)     /*!< 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 */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_time_quantum_in_bit_segment_1 CAN Time Quantum in bit segment 1

+  * @{

+  */

+#define CAN_BS1_1TQ                 ((uint32_t)0x00000000)                                       /*!< 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  */

+#define CAN_BS1_5TQ                 ((uint32_t)CAN_BTR_TS1_2)                                    /*!< 5 time quantum  */

+#define CAN_BS1_6TQ                 ((uint32_t)(CAN_BTR_TS1_2 | CAN_BTR_TS1_0))                  /*!< 6 time quantum  */

+#define CAN_BS1_7TQ                 ((uint32_t)(CAN_BTR_TS1_2 | CAN_BTR_TS1_1))                  /*!< 7 time quantum  */

+#define CAN_BS1_8TQ                 ((uint32_t)(CAN_BTR_TS1_2 | CAN_BTR_TS1_1 | CAN_BTR_TS1_0))  /*!< 8 time quantum  */

+#define CAN_BS1_9TQ                 ((uint32_t)CAN_BTR_TS1_3)                                    /*!< 9 time quantum  */

+#define CAN_BS1_10TQ                ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_0))                  /*!< 10 time quantum */

+#define CAN_BS1_11TQ                ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_1))                  /*!< 11 time quantum */

+#define CAN_BS1_12TQ                ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_1 | CAN_BTR_TS1_0))  /*!< 12 time quantum */

+#define CAN_BS1_13TQ                ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_2))                  /*!< 13 time quantum */

+#define CAN_BS1_14TQ                ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_2 | CAN_BTR_TS1_0))  /*!< 14 time quantum */

+#define CAN_BS1_15TQ                ((uint32_t)(CAN_BTR_TS1_3 | CAN_BTR_TS1_2 | CAN_BTR_TS1_1))  /*!< 15 time quantum */

+#define CAN_BS1_16TQ                ((uint32_t)CAN_BTR_TS1) /*!< 16 time quantum */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_time_quantum_in_bit_segment_2 CAN Time Quantum in bit segment 2

+  * @{

+  */

+#define CAN_BS2_1TQ                 ((uint32_t)0x00000000)                       /*!< 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 */

+#define CAN_BS2_5TQ                 ((uint32_t)CAN_BTR_TS2_2)                    /*!< 5 time quantum */

+#define CAN_BS2_6TQ                 ((uint32_t)(CAN_BTR_TS2_2 | CAN_BTR_TS2_0))  /*!< 6 time quantum */

+#define CAN_BS2_7TQ                 ((uint32_t)(CAN_BTR_TS2_2 | CAN_BTR_TS2_1))  /*!< 7 time quantum */

+#define CAN_BS2_8TQ                 ((uint32_t)CAN_BTR_TS2)                      /*!< 8 time quantum */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_filter_mode  CAN Filter Mode

+  * @{

+  */

+#define CAN_FILTERMODE_IDMASK       ((uint8_t)0x00)  /*!< Identifier mask mode */

+#define CAN_FILTERMODE_IDLIST       ((uint8_t)0x01)  /*!< Identifier list mode */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_filter_scale CAN Filter Scale

+  * @{

+  */

+#define CAN_FILTERSCALE_16BIT       ((uint8_t)0x00)  /*!< Two 16-bit filters */

+#define CAN_FILTERSCALE_32BIT       ((uint8_t)0x01)  /*!< One 32-bit filter  */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_filter_FIFO CAN Filter FIFO

+  * @{

+  */

+#define CAN_FILTER_FIFO0             ((uint8_t)0x00)  /*!< Filter FIFO 0 assignment for filter x */

+#define CAN_FILTER_FIFO1             ((uint8_t)0x01)  /*!< Filter FIFO 1 assignment for filter x */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_Identifier_Type CAN Identifier Type

+  * @{

+  */

+#define CAN_ID_STD             ((uint32_t)0x00000000)  /*!< Standard Id */

+#define CAN_ID_EXT             ((uint32_t)0x00000004)  /*!< Extended Id */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_remote_transmission_request CAN Remote Transmission Request

+  * @{

+  */

+#define CAN_RTR_DATA                ((uint32_t)0x00000000)  /*!< Data frame */

+#define CAN_RTR_REMOTE              ((uint32_t)0x00000002)  /*!< Remote frame */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_receive_FIFO_number_constants CAN Receive FIFO Number Constants

+  * @{

+  */

+#define CAN_FIFO0                   ((uint8_t)0x00)  /*!< CAN FIFO 0 used to receive */

+#define CAN_FIFO1                   ((uint8_t)0x01)  /*!< CAN FIFO 1 used to receive */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_flags CAN Flags

+  * @{

+  */

+/* If the flag is 0x3XXXXXXX, it means that it can be used with CAN_GetFlagStatus()

+   and CAN_ClearFlag() functions. */

+/* If the flag is 0x1XXXXXXX, it means that it can only be used with

+   CAN_GetFlagStatus() function.  */

+

+/* Transmit Flags */

+#define CAN_FLAG_RQCP0             ((uint32_t)0x00000500)  /*!< Request MailBox0 flag         */

+#define CAN_FLAG_RQCP1             ((uint32_t)0x00000508)  /*!< Request MailBox1 flag         */

+#define CAN_FLAG_RQCP2             ((uint32_t)0x00000510)  /*!< Request MailBox2 flag         */

+#define CAN_FLAG_TXOK0             ((uint32_t)0x00000501)  /*!< Transmission OK MailBox0 flag */

+#define CAN_FLAG_TXOK1             ((uint32_t)0x00000509)  /*!< Transmission OK MailBox1 flag */

+#define CAN_FLAG_TXOK2             ((uint32_t)0x00000511)  /*!< Transmission OK MailBox2 flag */

+#define CAN_FLAG_TME0              ((uint32_t)0x0000051A)  /*!< Transmit mailbox 0 empty flag */

+#define CAN_FLAG_TME1              ((uint32_t)0x0000051B)  /*!< Transmit mailbox 0 empty flag */

+#define CAN_FLAG_TME2              ((uint32_t)0x0000051C)  /*!< Transmit mailbox 0 empty flag */

+

+/* Receive Flags */

+#define CAN_FLAG_FF0               ((uint32_t)0x00000203)  /*!< FIFO 0 Full flag    */

+#define CAN_FLAG_FOV0              ((uint32_t)0x00000204)  /*!< FIFO 0 Overrun flag */

+

+#define CAN_FLAG_FF1               ((uint32_t)0x00000403)  /*!< FIFO 1 Full flag    */

+#define CAN_FLAG_FOV1              ((uint32_t)0x00000404)  /*!< FIFO 1 Overrun flag */

+

+/* Operating Mode Flags */

+#define CAN_FLAG_WKU               ((uint32_t)0x00000103)  /*!< Wake up flag           */

+#define CAN_FLAG_SLAK              ((uint32_t)0x00000101)  /*!< Sleep acknowledge flag */

+#define CAN_FLAG_SLAKI             ((uint32_t)0x00000104)  /*!< Sleep acknowledge flag */

+/* @note When SLAK interrupt is disabled (SLKIE=0), no polling on SLAKI is possible.

+         In this case the SLAK bit can be polled.*/

+

+/* Error Flags */

+#define CAN_FLAG_EWG               ((uint32_t)0x00000300)  /*!< Error warning flag   */

+#define CAN_FLAG_EPV               ((uint32_t)0x00000301)  /*!< Error passive flag   */

+#define CAN_FLAG_BOF               ((uint32_t)0x00000302)  /*!< Bus-Off flag         */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_Interrupts CAN Interrupts

+  * @{

+  */

+#define CAN_IT_TME                  ((uint32_t)CAN_IER_TMEIE)   /*!< Transmit mailbox empty interrupt */

+

+/* Receive Interrupts */

+#define CAN_IT_FMP0                 ((uint32_t)CAN_IER_FMPIE0)  /*!< FIFO 0 message pending interrupt */

+#define CAN_IT_FF0                  ((uint32_t)CAN_IER_FFIE0)   /*!< FIFO 0 full interrupt            */

+#define CAN_IT_FOV0                 ((uint32_t)CAN_IER_FOVIE0)  /*!< FIFO 0 overrun interrupt         */

+#define CAN_IT_FMP1                 ((uint32_t)CAN_IER_FMPIE1)  /*!< FIFO 1 message pending interrupt */

+#define CAN_IT_FF1                  ((uint32_t)CAN_IER_FFIE1)   /*!< FIFO 1 full interrupt            */

+#define CAN_IT_FOV1                 ((uint32_t)CAN_IER_FOVIE1)  /*!< FIFO 1 overrun interrupt         */

+

+/* Operating Mode Interrupts */

+#define CAN_IT_WKU                  ((uint32_t)CAN_IER_WKUIE)  /*!< Wake-up interrupt           */

+#define CAN_IT_SLK                  ((uint32_t)CAN_IER_SLKIE)  /*!< Sleep acknowledge interrupt */

+

+/* Error Interrupts */

+#define CAN_IT_EWG                  ((uint32_t)CAN_IER_EWGIE) /*!< Error warning interrupt   */

+#define CAN_IT_EPV                  ((uint32_t)CAN_IER_EPVIE) /*!< Error passive interrupt   */

+#define CAN_IT_BOF                  ((uint32_t)CAN_IER_BOFIE) /*!< Bus-off interrupt         */

+#define CAN_IT_LEC                  ((uint32_t)CAN_IER_LECIE) /*!< Last error code interrupt */

+#define CAN_IT_ERR                  ((uint32_t)CAN_IER_ERRIE) /*!< Error Interrupt           */

+/**

+  * @}

+  */

+

+/** @defgroup CAN_Mailboxes_Definition CAN Mailboxes Definition

+  * @{

+  */

+#define CAN_TXMAILBOX_0   ((uint8_t)0x00)

+#define CAN_TXMAILBOX_1   ((uint8_t)0x01)

+#define CAN_TXMAILBOX_2   ((uint8_t)0x02)

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup CAN_Exported_Macros CAN Exported Macros

+  * @{

+  */

+

+/** @brief Reset CAN handle state

+  * @param  __HANDLE__: specifies the 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

+  * @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

+  * @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.

+  * @retval The number of pending message.

+  */

+#define __HAL_CAN_MSG_PENDING(__HANDLE__, __FIFONUMBER__) (((__FIFONUMBER__) == CAN_FIFO0)? \

+((uint8_t)((__HANDLE__)->Instance->RF0R&(uint32_t)0x03)) : ((uint8_t)((__HANDLE__)->Instance->RF1R&(uint32_t)0x03)))

+

+/** @brief  Check whether the specified CAN flag is set or not.

+  * @param  __HANDLE__: 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

+  *            @arg CAN_TSR_RQCP2: Request MailBox2 Flag

+  *            @arg CAN_FLAG_TXOK0: Transmission OK MailBox0 Flag

+  *            @arg CAN_FLAG_TXOK1: Transmission OK MailBox1 Flag

+  *            @arg CAN_FLAG_TXOK2: Transmission OK MailBox2 Flag

+  *            @arg CAN_FLAG_TME0: Transmit mailbox 0 empty Flag

+  *            @arg CAN_FLAG_TME1: Transmit mailbox 1 empty Flag

+  *            @arg CAN_FLAG_TME2: Transmit mailbox 2 empty Flag

+  *            @arg CAN_FLAG_FMP0: FIFO 0 Message Pending Flag

+  *            @arg CAN_FLAG_FF0: FIFO 0 Full Flag

+  *            @arg CAN_FLAG_FOV0: FIFO 0 Overrun Flag

+  *            @arg CAN_FLAG_FMP1: FIFO 1 Message Pending Flag

+  *            @arg CAN_FLAG_FF1: FIFO 1 Full Flag

+  *            @arg CAN_FLAG_FOV1: FIFO 1 Overrun Flag

+  *            @arg CAN_FLAG_WKU: Wake up Flag

+  *            @arg CAN_FLAG_SLAK: Sleep acknowledge Flag

+  *            @arg CAN_FLAG_SLAKI: Sleep acknowledge Flag

+  *            @arg CAN_FLAG_EWG: Error Warning Flag

+  *            @arg CAN_FLAG_EPV: Error Passive Flag

+  *            @arg CAN_FLAG_BOF: Bus-Off Flag

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define __HAL_CAN_GET_FLAG(__HANDLE__, __FLAG__) \

+((((__FLAG__) >> 8) == 5)? ((((__HANDLE__)->Instance->TSR) & (1 << ((__FLAG__) & CAN_FLAG_MASK))) == (1 << ((__FLAG__) & CAN_FLAG_MASK))): \

+ (((__FLAG__) >> 8) == 2)? ((((__HANDLE__)->Instance->RF0R) & (1 << ((__FLAG__) & CAN_FLAG_MASK))) == (1 << ((__FLAG__) & CAN_FLAG_MASK))): \

+ (((__FLAG__) >> 8) == 4)? ((((__HANDLE__)->Instance->RF1R) & (1 << ((__FLAG__) & CAN_FLAG_MASK))) == (1 << ((__FLAG__) & CAN_FLAG_MASK))): \

+ (((__FLAG__) >> 8) == 1)? ((((__HANDLE__)->Instance->MSR) & (1 << ((__FLAG__) & CAN_FLAG_MASK))) == (1 << ((__FLAG__) & CAN_FLAG_MASK))): \

+ ((((__HANDLE__)->Instance->ESR) & (1 << ((__FLAG__) & CAN_FLAG_MASK))) == (1 << ((__FLAG__) & CAN_FLAG_MASK))))

+

+/** @brief  Clear the specified CAN pending flag.

+  * @param  __HANDLE__: 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

+  *            @arg CAN_TSR_RQCP2: Request MailBox2 Flag

+  *            @arg CAN_FLAG_TXOK0: Transmission OK MailBox0 Flag

+  *            @arg CAN_FLAG_TXOK1: Transmission OK MailBox1 Flag

+  *            @arg CAN_FLAG_TXOK2: Transmission OK MailBox2 Flag

+  *            @arg CAN_FLAG_TME0: Transmit mailbox 0 empty Flag

+  *            @arg CAN_FLAG_TME1: Transmit mailbox 1 empty Flag

+  *            @arg CAN_FLAG_TME2: Transmit mailbox 2 empty Flag

+  *            @arg CAN_FLAG_FMP0: FIFO 0 Message Pending Flag

+  *            @arg CAN_FLAG_FF0: FIFO 0 Full Flag

+  *            @arg CAN_FLAG_FOV0: FIFO 0 Overrun Flag

+  *            @arg CAN_FLAG_FMP1: FIFO 1 Message Pending Flag

+  *            @arg CAN_FLAG_FF1: FIFO 1 Full Flag

+  *            @arg CAN_FLAG_FOV1: FIFO 1 Overrun Flag

+  *            @arg CAN_FLAG_WKU: Wake up Flag

+  *            @arg CAN_FLAG_SLAK: Sleep acknowledge Flag

+  *            @arg CAN_FLAG_SLAKI: Sleep acknowledge Flag

+  *            @arg CAN_FLAG_EWG: Error Warning Flag

+  *            @arg CAN_FLAG_EPV: Error Passive Flag

+  *            @arg CAN_FLAG_BOF: Bus-Off Flag

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define __HAL_CAN_CLEAR_FLAG(__HANDLE__, __FLAG__) \

+((((__FLAG__) >> 8) == 5)? (((__HANDLE__)->Instance->TSR) = ~((uint32_t)1 << ((__FLAG__) & CAN_FLAG_MASK))): \

+ (((__FLAG__) >> 8) == 2)? (((__HANDLE__)->Instance->RF0R) = ~((uint32_t)1 << ((__FLAG__) & CAN_FLAG_MASK))): \

+ (((__FLAG__) >> 8) == 4)? (((__HANDLE__)->Instance->RF1R) = ~((uint32_t)1 << ((__FLAG__) & CAN_FLAG_MASK))): \

+ (((__FLAG__) >> 8) == 1)? (((__HANDLE__)->Instance->MSR) = ~((uint32_t)1 << ((__FLAG__) & CAN_FLAG_MASK))): \

+ (((__HANDLE__)->Instance->ESR) = ~((uint32_t)1 << ((__FLAG__) & CAN_FLAG_MASK))))

+

+/** @brief  Check if the specified CAN interrupt source is enabled or disabled.

+  * @param  __HANDLE__: 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 enable

+  *             @arg CAN_IT_FMP1: FIFO1 message pending interrupt enable

+  * @retval The new state of __IT__ (TRUE or FALSE).

+  */

+#define __HAL_CAN_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->IER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

+

+/**

+  * @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.

+  * @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)))

+

+/**

+  * @brief  Release the specified receive FIFO.

+  * @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)? \

+((__HANDLE__)->Instance->RF0R |= CAN_RF0R_RFOM0) : ((__HANDLE__)->Instance->RF1R |= CAN_RF1R_RFOM1))

+

+/**

+  * @brief  Cancel a transmit request.

+  * @param  __HANDLE__: CAN Handle

+  * @param  __TRANSMITMAILBOX__: the number of the mailbox that is used for transmission.

+  * @retval None

+  */

+#define __HAL_CAN_CANCEL_TRANSMIT(__HANDLE__, __TRANSMITMAILBOX__)\

+(((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_0)? ((__HANDLE__)->Instance->TSR |= CAN_TSR_ABRQ0) :\

+ ((__TRANSMITMAILBOX__) == CAN_TXMAILBOX_1)? ((__HANDLE__)->Instance->TSR |= CAN_TSR_ABRQ1) :\

+ ((__HANDLE__)->Instance->TSR |= CAN_TSR_ABRQ2))

+

+/**

+  * @brief  Enable or disable the DBG Freeze for CAN.

+  * @param  __HANDLE__: 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).

+  * @retval None

+  */

+#define __HAL_CAN_DBG_FREEZE(__HANDLE__, __NEWSTATE__) (((__NEWSTATE__) == ENABLE)? \

+((__HANDLE__)->Instance->MCR |= CAN_MCR_DBF) : ((__HANDLE__)->Instance->MCR &= ~CAN_MCR_DBF))

+

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup CAN_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup CAN_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization/de-initialization functions ***********************************/

+HAL_StatusTypeDef HAL_CAN_Init(CAN_HandleTypeDef* hcan);

+HAL_StatusTypeDef HAL_CAN_ConfigFilter(CAN_HandleTypeDef* hcan, CAN_FilterConfTypeDef* sFilterConfig);

+HAL_StatusTypeDef HAL_CAN_DeInit(CAN_HandleTypeDef* hcan);

+void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan);

+void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan);

+/**

+  * @}

+  */

+

+/** @addtogroup CAN_Exported_Functions_Group2

+  * @{

+  */

+/* I/O operation functions ******************************************************/

+HAL_StatusTypeDef HAL_CAN_Transmit(CAN_HandleTypeDef *hcan, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CAN_Transmit_IT(CAN_HandleTypeDef *hcan);

+HAL_StatusTypeDef HAL_CAN_Receive(CAN_HandleTypeDef *hcan, uint8_t FIFONumber, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CAN_Receive_IT(CAN_HandleTypeDef *hcan, uint8_t FIFONumber);

+HAL_StatusTypeDef HAL_CAN_Sleep(CAN_HandleTypeDef *hcan);

+HAL_StatusTypeDef HAL_CAN_WakeUp(CAN_HandleTypeDef *hcan);

+void HAL_CAN_IRQHandler(CAN_HandleTypeDef* hcan);

+void HAL_CAN_TxCpltCallback(CAN_HandleTypeDef* hcan);

+void HAL_CAN_RxCpltCallback(CAN_HandleTypeDef* hcan);

+void HAL_CAN_ErrorCallback(CAN_HandleTypeDef *hcan);

+/**

+  * @}

+  */

+

+/** @addtogroup CAN_Exported_Functions_Group3

+  * @{

+  */

+/* Peripheral State functions ***************************************************/

+uint32_t HAL_CAN_GetError(CAN_HandleTypeDef *hcan);

+HAL_CAN_StateTypeDef HAL_CAN_GetState(CAN_HandleTypeDef* hcan);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private types -------------------------------------------------------------*/

+/** @defgroup CAN_Private_Types CAN Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup CAN_Private_Variables CAN Private Variables

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup CAN_Private_Constants CAN Private Constants

+  * @{

+  */

+#define CAN_TXSTATUS_NOMAILBOX      ((uint8_t)0x04)  /*!< CAN cell did not provide CAN_TxStatus_NoMailBox */

+#define CAN_FLAG_MASK  ((uint32_t)0x000000FF)

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup CAN_Private_Macros CAN Private Macros

+  * @{

+  */

+#define IS_CAN_MODE(MODE) (((MODE) == CAN_MODE_NORMAL) || \

+                           ((MODE) == CAN_MODE_LOOPBACK)|| \

+                           ((MODE) == CAN_MODE_SILENT) || \

+                           ((MODE) == CAN_MODE_SILENT_LOOPBACK))

+#define IS_CAN_SJW(SJW) (((SJW) == CAN_SJW_1TQ) || ((SJW) == CAN_SJW_2TQ)|| \

+                         ((SJW) == CAN_SJW_3TQ) || ((SJW) == CAN_SJW_4TQ))

+#define IS_CAN_BS1(BS1) ((BS1) <= CAN_BS1_16TQ)

+#define IS_CAN_BS2(BS2) ((BS2) <= CAN_BS2_8TQ)

+#define IS_CAN_PRESCALER(PRESCALER) (((PRESCALER) >= 1) && ((PRESCALER) <= 1024))

+#define IS_CAN_FILTER_NUMBER(NUMBER) ((NUMBER) <= 27)

+#define IS_CAN_FILTER_MODE(MODE) (((MODE) == CAN_FILTERMODE_IDMASK) || \

+                                  ((MODE) == CAN_FILTERMODE_IDLIST))

+#define IS_CAN_FILTER_SCALE(SCALE) (((SCALE) == CAN_FILTERSCALE_16BIT) || \

+                                    ((SCALE) == CAN_FILTERSCALE_32BIT))

+#define IS_CAN_FILTER_FIFO(FIFO) (((FIFO) == CAN_FILTER_FIFO0) || \

+                                  ((FIFO) == CAN_FILTER_FIFO1))

+#define IS_CAN_BANKNUMBER(BANKNUMBER) ((BANKNUMBER) <= 28)

+

+#define IS_CAN_TRANSMITMAILBOX(TRANSMITMAILBOX) ((TRANSMITMAILBOX) <= ((uint8_t)0x02))

+#define IS_CAN_STDID(STDID)   ((STDID) <= ((uint32_t)0x7FF))

+#define IS_CAN_EXTID(EXTID)   ((EXTID) <= ((uint32_t)0x1FFFFFFF))

+#define IS_CAN_DLC(DLC)       ((DLC) <= ((uint8_t)0x08))

+

+#define IS_CAN_IDTYPE(IDTYPE)  (((IDTYPE) == CAN_ID_STD) || \

+                                ((IDTYPE) == CAN_ID_EXT))

+#define IS_CAN_RTR(RTR) (((RTR) == CAN_RTR_DATA) || ((RTR) == CAN_RTR_REMOTE))

+#define IS_CAN_FIFO(FIFO) (((FIFO) == CAN_FIFO0) || ((FIFO) == CAN_FIFO1))

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup CAN_Private_Functions CAN Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_CAN_H */

+

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_cec.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_cec.h
new file mode 100644
index 0000000..e953fbc
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_cec.h
@@ -0,0 +1,679 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_cec.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of CEC HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************  

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_CEC_H

+#define __STM32F7xx_HAL_CEC_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup CEC

+  * @{

+  */

+  

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup CEC_Exported_Types CEC Exported Types

+  * @{

+  */

+  

+/** 

+  * @brief CEC Init Structure definition  

+  */ 

+typedef struct

+{

+  uint32_t SignalFreeTime;               /*!< Set SFT field, specifies the Signal Free Time.

+                                              It can be one of @ref CEC_Signal_Free_Time 

+                                              and belongs to the set {0,...,7} where  

+                                              0x0 is the default configuration 

+                                              else means 0.5 + (SignalFreeTime - 1) nominal data bit periods */

+

+  uint32_t Tolerance;                    /*!< Set RXTOL bit, specifies the tolerance accepted on the received waveforms,

+                                              it can be a value of @ref CEC_Tolerance : it is either CEC_STANDARD_TOLERANCE 

+                                              or CEC_EXTENDED_TOLERANCE */

+

+  uint32_t BRERxStop;                    /*!< Set BRESTP bit @ref CEC_BRERxStop : specifies whether or not a Bit Rising Error stops the reception. 

+                                              CEC_NO_RX_STOP_ON_BRE: reception is not stopped. 

+                                              CEC_RX_STOP_ON_BRE:    reception is stopped. */

+

+  uint32_t BREErrorBitGen;               /*!< Set BREGEN bit @ref CEC_BREErrorBitGen : specifies whether or not an Error-Bit is generated on the

+                                              CEC line upon Bit Rising Error detection.

+                                              CEC_BRE_ERRORBIT_NO_GENERATION: no error-bit generation.

+                                              CEC_BRE_ERRORBIT_GENERATION:    error-bit generation if BRESTP is set. */

+                                              

+  uint32_t LBPEErrorBitGen;              /*!< Set LBPEGEN bit @ref CEC_LBPEErrorBitGen : specifies whether or not an Error-Bit is generated on the

+                                              CEC line upon Long Bit Period Error detection.

+                                              CEC_LBPE_ERRORBIT_NO_GENERATION:  no error-bit generation. 

+                                              CEC_LBPE_ERRORBIT_GENERATION:     error-bit generation. */  

+                                              

+  uint32_t BroadcastMsgNoErrorBitGen;    /*!< Set BRDNOGEN bit @ref CEC_BroadCastMsgErrorBitGen : allows to avoid an Error-Bit generation on the CEC line

+                                              upon an error detected on a broadcast message. 

+                                              

+                                              It supersedes BREGEN and LBPEGEN bits for a broadcast message error handling. It can take two values:

+                                              

+                                              1) CEC_BROADCASTERROR_ERRORBIT_GENERATION.

+                                                 a) BRE detection: error-bit generation on the CEC line if BRESTP=CEC_RX_STOP_ON_BRE 

+                                                    and BREGEN=CEC_BRE_ERRORBIT_NO_GENERATION.

+                                                 b) LBPE detection: error-bit generation on the CEC line 

+                                                    if LBPGEN=CEC_LBPE_ERRORBIT_NO_GENERATION.

+                                                    

+                                              2) CEC_BROADCASTERROR_NO_ERRORBIT_GENERATION.

+                                                 no error-bit generation in case neither a) nor b) are satisfied. Additionally,

+                                                 there is no error-bit generation in case of Short Bit Period Error detection in 

+                                                 a broadcast message while LSTN bit is set. */

+ 

+  uint32_t SignalFreeTimeOption;         /*!< Set SFTOP bit @ref CEC_SFT_Option : specifies when SFT timer starts.

+                                              CEC_SFT_START_ON_TXSOM SFT:    timer starts when TXSOM is set by software.

+                                              CEC_SFT_START_ON_TX_RX_END:  SFT timer starts automatically at the end of message transmission/reception. */

+

+  uint32_t OwnAddress;                   /*!< Set OAR field, specifies CEC device address within a 15-bit long field */

+  

+  uint32_t ListenMode;                   /*!< Set LSTN bit @ref CEC_Listening_Mode : specifies device listening mode. It can take two values:

+  

+                                              CEC_REDUCED_LISTENING_MODE: CEC peripheral receives only message addressed to its 

+                                                own address (OAR). Messages addressed to different destination are ignored. 

+                                                Broadcast messages are always received.

+                                                

+                                              CEC_FULL_LISTENING_MODE: CEC peripheral receives messages addressed to its own 

+                                                address (OAR) with positive acknowledge. Messages addressed to different destination 

+                                                are received, but without interfering with the CEC bus: no acknowledge sent.  */

+

+  uint8_t  InitiatorAddress;             /* Initiator address (source logical address, sent in each header) */

+

+}CEC_InitTypeDef;

+

+/** 

+  * @brief HAL CEC State structures definition  

+  */ 

+typedef enum

+{

+  HAL_CEC_STATE_RESET             = 0x00,    /*!< Peripheral Reset state                              */

+  HAL_CEC_STATE_READY             = 0x01,    /*!< Peripheral Initialized and ready for use            */

+  HAL_CEC_STATE_BUSY              = 0x02,    /*!< an internal process is ongoing                      */

+  HAL_CEC_STATE_BUSY_TX           = 0x03,    /*!< Data Transmission process is ongoing                */

+  HAL_CEC_STATE_BUSY_RX           = 0x04,    /*!< Data Reception process is ongoing                   */

+  HAL_CEC_STATE_STANDBY_RX        = 0x05,    /*!< IP ready to receive, doesn't prevent IP to transmit */

+  HAL_CEC_STATE_TIMEOUT           = 0x06,    /*!< Timeout state                                       */

+  HAL_CEC_STATE_ERROR             = 0x07     /*!< State Error                                         */

+}HAL_CEC_StateTypeDef;

+

+/** 

+  * @brief  CEC handle Structure definition  

+  */  

+typedef struct

+{

+  CEC_TypeDef             *Instance;      /* CEC registers base address */

+  

+  CEC_InitTypeDef         Init;           /* CEC communication parameters */

+  

+  uint8_t                 *pTxBuffPtr;    /* Pointer to CEC Tx transfer Buffer */

+  

+  uint16_t                TxXferCount;    /* CEC Tx Transfer Counter */

+  

+  uint8_t                 *pRxBuffPtr;    /* Pointer to CEC Rx transfer Buffer */

+  

+  uint16_t                RxXferSize;     /* CEC Rx Transfer size, 0: header received only */

+  

+  uint32_t                ErrorCode;      /* For errors handling purposes, copy of ISR register 

+                                            in case error is reported */

+  

+  HAL_LockTypeDef         Lock;           /* Locking object */

+  

+  HAL_CEC_StateTypeDef    State;          /* CEC communication state */

+    

+}CEC_HandleTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup CEC_Exported_Constants CEC Exported Constants

+  * @{

+  */

+

+/** @defgroup CEC_Error_Code CEC Error Code

+  * @{

+  */ 

+#define HAL_CEC_ERROR_NONE    (uint32_t) 0x0         /*!< no error                      */

+#define HAL_CEC_ERROR_RXOVR   CEC_ISR_RXOVR          /*!< CEC Rx-Overrun                */

+#define HAL_CEC_ERROR_BRE     CEC_ISR_BRE            /*!< CEC Rx Bit Rising Error       */

+#define HAL_CEC_ERROR_SBPE    CEC_ISR_SBPE           /*!< CEC Rx Short Bit period Error */

+#define HAL_CEC_ERROR_LBPE    CEC_ISR_LBPE           /*!< CEC Rx Long Bit period Error  */

+#define HAL_CEC_ERROR_RXACKE  CEC_ISR_RXACKE         /*!< CEC Rx Missing Acknowledge    */

+#define HAL_CEC_ERROR_ARBLST  CEC_ISR_ARBLST         /*!< CEC Arbitration Lost          */

+#define HAL_CEC_ERROR_TXUDR   CEC_ISR_TXUDR          /*!< CEC Tx-Buffer Underrun        */

+#define HAL_CEC_ERROR_TXERR   CEC_ISR_TXERR          /*!< CEC Tx-Error                  */

+#define HAL_CEC_ERROR_TXACKE  CEC_ISR_TXACKE         /*!< CEC Tx Missing Acknowledge    */

+/**

+  * @}

+  */

+       

+/** @defgroup CEC_Signal_Free_Time  CEC Signal Free Time setting parameter

+  * @{

+  */

+#define CEC_DEFAULT_SFT                    ((uint32_t)0x00000000)

+#define CEC_0_5_BITPERIOD_SFT              ((uint32_t)0x00000001)

+#define CEC_1_5_BITPERIOD_SFT              ((uint32_t)0x00000002)

+#define CEC_2_5_BITPERIOD_SFT              ((uint32_t)0x00000003)

+#define CEC_3_5_BITPERIOD_SFT              ((uint32_t)0x00000004)

+#define CEC_4_5_BITPERIOD_SFT              ((uint32_t)0x00000005)

+#define CEC_5_5_BITPERIOD_SFT              ((uint32_t)0x00000006)

+#define CEC_6_5_BITPERIOD_SFT              ((uint32_t)0x00000007)

+/**

+  * @}

+  */

+

+/** @defgroup CEC_Tolerance CEC Receiver Tolerance

+  * @{

+  */

+#define CEC_STANDARD_TOLERANCE             ((uint32_t)0x00000000)

+#define CEC_EXTENDED_TOLERANCE             ((uint32_t)CEC_CFGR_RXTOL)

+/**

+  * @}

+  */ 

+

+/** @defgroup CEC_BRERxStop CEC Reception Stop on Error

+  * @{

+  */

+#define CEC_NO_RX_STOP_ON_BRE             ((uint32_t)0x00000000)

+#define CEC_RX_STOP_ON_BRE                ((uint32_t)CEC_CFGR_BRESTP)

+/**

+  * @}

+  */            

+             

+/** @defgroup CEC_BREErrorBitGen  CEC Error Bit Generation if Bit Rise Error reported

+  * @{

+  */ 

+#define CEC_BRE_ERRORBIT_NO_GENERATION     ((uint32_t)0x00000000)

+#define CEC_BRE_ERRORBIT_GENERATION        ((uint32_t)CEC_CFGR_BREGEN)

+/**

+  * @}

+  */ 

+                        

+/** @defgroup CEC_LBPEErrorBitGen  CEC Error Bit Generation if Long Bit Period Error reported

+  * @{

+  */ 

+#define CEC_LBPE_ERRORBIT_NO_GENERATION     ((uint32_t)0x00000000)

+#define CEC_LBPE_ERRORBIT_GENERATION        ((uint32_t)CEC_CFGR_LBPEGEN)

+/**

+  * @}

+  */    

+

+/** @defgroup CEC_BroadCastMsgErrorBitGen  CEC Error Bit Generation on Broadcast message

+  * @{

+  */ 

+#define CEC_BROADCASTERROR_ERRORBIT_GENERATION     ((uint32_t)0x00000000)

+#define CEC_BROADCASTERROR_NO_ERRORBIT_GENERATION  ((uint32_t)CEC_CFGR_BRDNOGEN)

+/**

+  * @}

+  */

+  

+/** @defgroup CEC_SFT_Option     CEC Signal Free Time start option

+  * @{

+  */ 

+#define CEC_SFT_START_ON_TXSOM           ((uint32_t)0x00000000)

+#define CEC_SFT_START_ON_TX_RX_END       ((uint32_t)CEC_CFGR_SFTOPT)

+/**

+  * @}

+  */

+  

+/** @defgroup CEC_Listening_Mode    CEC Listening mode option

+  * @{

+  */ 

+#define CEC_REDUCED_LISTENING_MODE          ((uint32_t)0x00000000)

+#define CEC_FULL_LISTENING_MODE             ((uint32_t)CEC_CFGR_LSTN)

+/**

+  * @}

+  */

+  

+/** @defgroup CEC_OAR_Position   CEC Device Own Address position in CEC CFGR register     

+  * @{

+  */

+#define CEC_CFGR_OAR_LSB_POS            ((uint32_t) 16)

+/**

+  * @}

+  */

+  

+/** @defgroup CEC_Initiator_Position   CEC Initiator logical address position in message header     

+  * @{

+  */

+#define CEC_INITIATOR_LSB_POS           ((uint32_t) 4)

+/**

+  * @}

+  */

+  

+/** @defgroup CEC_Interrupts_Definitions  CEC Interrupts definition

+  * @{

+  */

+#define CEC_IT_TXACKE                   CEC_IER_TXACKEIE

+#define CEC_IT_TXERR                    CEC_IER_TXERRIE

+#define CEC_IT_TXUDR                    CEC_IER_TXUDRIE

+#define CEC_IT_TXEND                    CEC_IER_TXENDIE

+#define CEC_IT_TXBR                     CEC_IER_TXBRIE

+#define CEC_IT_ARBLST                   CEC_IER_ARBLSTIE

+#define CEC_IT_RXACKE                   CEC_IER_RXACKEIE

+#define CEC_IT_LBPE                     CEC_IER_LBPEIE

+#define CEC_IT_SBPE                     CEC_IER_SBPEIE

+#define CEC_IT_BRE                      CEC_IER_BREIE

+#define CEC_IT_RXOVR                    CEC_IER_RXOVRIE

+#define CEC_IT_RXEND                    CEC_IER_RXENDIE

+#define CEC_IT_RXBR                     CEC_IER_RXBRIE

+/**

+  * @}

+  */

+

+/** @defgroup CEC_Flags_Definitions  CEC Flags definition

+  * @{

+  */

+#define CEC_FLAG_TXACKE                 CEC_ISR_TXACKE

+#define CEC_FLAG_TXERR                  CEC_ISR_TXERR

+#define CEC_FLAG_TXUDR                  CEC_ISR_TXUDR

+#define CEC_FLAG_TXEND                  CEC_ISR_TXEND

+#define CEC_FLAG_TXBR                   CEC_ISR_TXBR

+#define CEC_FLAG_ARBLST                 CEC_ISR_ARBLST

+#define CEC_FLAG_RXACKE                 CEC_ISR_RXACKE

+#define CEC_FLAG_LBPE                   CEC_ISR_LBPE

+#define CEC_FLAG_SBPE                   CEC_ISR_SBPE

+#define CEC_FLAG_BRE                    CEC_ISR_BRE

+#define CEC_FLAG_RXOVR                  CEC_ISR_RXOVR

+#define CEC_FLAG_RXEND                  CEC_ISR_RXEND

+#define CEC_FLAG_RXBR                   CEC_ISR_RXBR

+/**

+  * @}

+  */

+  

+/** @defgroup CEC_ALL_ERROR CEC all RX or TX errors flags 

+  * @{

+  */

+#define CEC_ISR_ALL_ERROR              ((uint32_t)CEC_ISR_RXOVR|CEC_ISR_BRE|CEC_ISR_SBPE|CEC_ISR_LBPE|CEC_ISR_RXACKE|\

+                                                  CEC_ISR_ARBLST|CEC_ISR_TXUDR|CEC_ISR_TXERR|CEC_ISR_TXACKE)

+/**

+  * @}

+  */

+

+/** @defgroup CEC_IER_ALL_RX CEC all RX errors interrupts enabling flag 

+  * @{

+  */

+#define CEC_IER_RX_ALL_ERR              ((uint32_t)CEC_IER_RXACKEIE|CEC_IER_LBPEIE|CEC_IER_SBPEIE|CEC_IER_BREIE|CEC_IER_RXOVRIE)

+/**

+  * @}

+  */

+  

+/** @defgroup CEC_IER_ALL_TX CEC all TX errors interrupts enabling flag 

+  * @{

+  */

+#define CEC_IER_TX_ALL_ERR              ((uint32_t)CEC_IER_TXACKEIE|CEC_IER_TXERRIE|CEC_IER_TXUDRIE|CEC_IER_ARBLSTIE)

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */  

+  

+/* Exported macros -----------------------------------------------------------*/

+/** @defgroup CEC_Exported_Macros CEC Exported Macros

+  * @{

+  */

+

+/** @brief  Reset CEC handle state

+  * @param  __HANDLE__: CEC handle.

+  * @retval None

+  */

+#define __HAL_CEC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CEC_STATE_RESET)

+

+/** @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.

+  *            @arg CEC_FLAG_TXACKE: Tx Missing acknowledge Error

+  *            @arg CEC_FLAG_TXERR: Tx Error.

+  *            @arg CEC_FLAG_TXUDR: Tx-Buffer Underrun.

+  *            @arg CEC_FLAG_TXEND: End of transmission (successful transmission of the last byte).

+  *            @arg CEC_FLAG_TXBR: Tx-Byte Request.

+  *            @arg CEC_FLAG_ARBLST: Arbitration Lost

+  *            @arg CEC_FLAG_RXACKE: Rx-Missing Acknowledge 

+  *            @arg CEC_FLAG_LBPE: Rx Long period Error

+  *            @arg CEC_FLAG_SBPE: Rx Short period Error

+  *            @arg CEC_FLAG_BRE: Rx Bit Rising Error

+  *            @arg CEC_FLAG_RXOVR: Rx Overrun.

+  *            @arg CEC_FLAG_RXEND: End Of Reception.

+  *            @arg CEC_FLAG_RXBR: Rx-Byte Received.      

+  * @retval ITStatus

+  */

+#define __HAL_CEC_GET_FLAG(__HANDLE__, __FLAG__)        ((__HANDLE__)->Instance->ISR & (__FLAG__)) 

+

+/** @brief  Clears the interrupt or status flag when raised (write at 1)

+  * @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.

+  *            @arg CEC_FLAG_TXUDR: Tx-Buffer Underrun.

+  *            @arg CEC_FLAG_TXEND: End of transmission (successful transmission of the last byte).

+  *            @arg CEC_FLAG_TXBR: Tx-Byte Request.

+  *            @arg CEC_FLAG_ARBLST: Arbitration Lost

+  *            @arg CEC_FLAG_RXACKE: Rx-Missing Acknowledge 

+  *            @arg CEC_FLAG_LBPE: Rx Long period Error

+  *            @arg CEC_FLAG_SBPE: Rx Short period Error

+  *            @arg CEC_FLAG_BRE: Rx Bit Rising Error

+  *            @arg CEC_FLAG_RXOVR: Rx Overrun.

+  *            @arg CEC_FLAG_RXEND: End Of Reception.

+  *            @arg CEC_FLAG_RXBR: Rx-Byte Received. 

+  * @retval none  

+  */

+#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.

+  *          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 

+  *            @arg CEC_IT_TXUDR: Tx-Buffer Underrun IT Enable 

+  *            @arg CEC_IT_TXEND: End of transmission IT Enable 

+  *            @arg CEC_IT_TXBR: Tx-Byte Request IT Enable 

+  *            @arg CEC_IT_ARBLST: Arbitration Lost IT Enable 

+  *            @arg CEC_IT_RXACKE: Rx-Missing Acknowledge IT Enable 

+  *            @arg CEC_IT_LBPE: Rx Long period Error IT Enable 

+  *            @arg CEC_IT_SBPE: Rx Short period Error IT Enable 

+  *            @arg CEC_IT_BRE: Rx Bit Rising Error IT Enable 

+  *            @arg CEC_IT_RXOVR: Rx Overrun IT Enable 

+  *            @arg CEC_IT_RXEND: End Of Reception IT Enable 

+  *            @arg CEC_IT_RXBR: Rx-Byte Received IT Enable                          

+  * @retval none

+  */

+#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.

+  *          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 

+  *            @arg CEC_IT_TXUDR: Tx-Buffer Underrun IT Enable 

+  *            @arg CEC_IT_TXEND: End of transmission IT Enable 

+  *            @arg CEC_IT_TXBR: Tx-Byte Request IT Enable 

+  *            @arg CEC_IT_ARBLST: Arbitration Lost IT Enable 

+  *            @arg CEC_IT_RXACKE: Rx-Missing Acknowledge IT Enable 

+  *            @arg CEC_IT_LBPE: Rx Long period Error IT Enable 

+  *            @arg CEC_IT_SBPE: Rx Short period Error IT Enable 

+  *            @arg CEC_IT_BRE: Rx Bit Rising Error IT Enable 

+  *            @arg CEC_IT_RXOVR: Rx Overrun IT Enable 

+  *            @arg CEC_IT_RXEND: End Of Reception IT Enable 

+  *            @arg CEC_IT_RXBR: Rx-Byte Received IT Enable                   

+  * @retval none

+  */   

+#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.

+  *          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 

+  *            @arg CEC_IT_TXUDR: Tx-Buffer Underrun IT Enable 

+  *            @arg CEC_IT_TXEND: End of transmission IT Enable 

+  *            @arg CEC_IT_TXBR: Tx-Byte Request IT Enable 

+  *            @arg CEC_IT_ARBLST: Arbitration Lost IT Enable 

+  *            @arg CEC_IT_RXACKE: Rx-Missing Acknowledge IT Enable 

+  *            @arg CEC_IT_LBPE: Rx Long period Error IT Enable 

+  *            @arg CEC_IT_SBPE: Rx Short period Error IT Enable 

+  *            @arg CEC_IT_BRE: Rx Bit Rising Error IT Enable 

+  *            @arg CEC_IT_RXOVR: Rx Overrun IT Enable 

+  *            @arg CEC_IT_RXEND: End Of Reception IT Enable 

+  *            @arg CEC_IT_RXBR: Rx-Byte Received IT Enable                  

+  * @retval FlagStatus  

+  */

+#define __HAL_CEC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER & (__INTERRUPT__))

+

+/** @brief  Enables the CEC device

+  * @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.               

+  * @retval none 

+  */

+#define __HAL_CEC_DISABLE(__HANDLE__)                  ((__HANDLE__)->Instance->CR &=  ~CEC_CR_CECEN)

+

+/** @brief  Set Transmission Start flag

+  * @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.               

+  * @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.               

+  * @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.               

+  * @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.               

+  * @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)                   

+  * @retval none 

+  */

+#define __HAL_CEC_SET_OAR(__HANDLE__,__ADDRESS__)   SET_BIT((__HANDLE__)->Instance->CFGR, (__ADDRESS__)<< CEC_CFGR_OAR_LSB_POS)

+

+/**

+  * @}

+  */                       

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup CEC_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup CEC_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization and de-initialization functions  ****************************/

+HAL_StatusTypeDef HAL_CEC_Init(CEC_HandleTypeDef *hcec);

+HAL_StatusTypeDef HAL_CEC_DeInit(CEC_HandleTypeDef *hcec);

+void HAL_CEC_MspInit(CEC_HandleTypeDef *hcec);

+void HAL_CEC_MspDeInit(CEC_HandleTypeDef *hcec);

+/**

+  * @}

+  */

+

+/** @addtogroup CEC_Exported_Functions_Group2

+  * @{

+  */

+/* I/O operation functions  ***************************************************/

+HAL_StatusTypeDef HAL_CEC_Transmit(CEC_HandleTypeDef *hcec, uint8_t DestinationAddress, uint8_t *pData, uint32_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CEC_Receive(CEC_HandleTypeDef *hcec, uint8_t *pData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CEC_Transmit_IT(CEC_HandleTypeDef *hcec, uint8_t DestinationAddress, uint8_t *pData, uint32_t Size);

+HAL_StatusTypeDef HAL_CEC_Receive_IT(CEC_HandleTypeDef *hcec, uint8_t *pData);

+uint32_t HAL_CEC_GetReceivedFrameSize(CEC_HandleTypeDef *hcec);

+void HAL_CEC_IRQHandler(CEC_HandleTypeDef *hcec);

+void HAL_CEC_TxCpltCallback(CEC_HandleTypeDef *hcec);

+void HAL_CEC_RxCpltCallback(CEC_HandleTypeDef *hcec);

+void HAL_CEC_ErrorCallback(CEC_HandleTypeDef *hcec);

+/**

+  * @}

+  */

+

+/** @addtogroup CEC_Exported_Functions_Group3

+  * @{

+  */

+/* Peripheral State functions  ************************************************/

+HAL_CEC_StateTypeDef HAL_CEC_GetState(CEC_HandleTypeDef *hcec);

+uint32_t HAL_CEC_GetError(CEC_HandleTypeDef *hcec);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+  

+/* Private types -------------------------------------------------------------*/

+/** @defgroup CEC_Private_Types CEC Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup CEC_Private_Variables CEC Private Variables

+  * @{

+  */

+  

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup CEC_Private_Constants CEC Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup CEC_Private_Macros CEC Private Macros

+  * @{

+  */

+  

+#define IS_CEC_SIGNALFREETIME(__SFT__)     ((__SFT__) <= CEC_CFGR_SFT)  

+

+#define IS_CEC_TOLERANCE(__RXTOL__)        (((__RXTOL__) == CEC_STANDARD_TOLERANCE) || \

+                                            ((__RXTOL__) == CEC_EXTENDED_TOLERANCE))

+                                            

+#define IS_CEC_BRERXSTOP(__BRERXSTOP__)   (((__BRERXSTOP__) == CEC_NO_RX_STOP_ON_BRE) || \

+                                           ((__BRERXSTOP__) == CEC_RX_STOP_ON_BRE))

+                                           

+#define IS_CEC_BREERRORBITGEN(__ERRORBITGEN__) (((__ERRORBITGEN__) == CEC_BRE_ERRORBIT_NO_GENERATION) || \

+                                                ((__ERRORBITGEN__) == CEC_BRE_ERRORBIT_GENERATION))

+

+#define IS_CEC_LBPEERRORBITGEN(__ERRORBITGEN__) (((__ERRORBITGEN__) == CEC_LBPE_ERRORBIT_NO_GENERATION) || \

+                                                 ((__ERRORBITGEN__) == CEC_LBPE_ERRORBIT_GENERATION))

+                                                 

+#define IS_CEC_BROADCASTERROR_NO_ERRORBIT_GENERATION(__ERRORBITGEN__) (((__ERRORBITGEN__) == CEC_BROADCASTERROR_ERRORBIT_GENERATION) || \

+                                                                       ((__ERRORBITGEN__) == CEC_BROADCASTERROR_NO_ERRORBIT_GENERATION))

+                                                                       

+#define IS_CEC_SFTOP(__SFTOP__)          (((__SFTOP__) == CEC_SFT_START_ON_TXSOM) || \

+                                          ((__SFTOP__) == CEC_SFT_START_ON_TX_RX_END))

+                                          

+#define IS_CEC_LISTENING_MODE(__MODE__)     (((__MODE__) == CEC_REDUCED_LISTENING_MODE) || \

+                                             ((__MODE__) == CEC_FULL_LISTENING_MODE))

+                                             

+/** @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.               

+  * @retval Test result (TRUE or FALSE).

+  */

+#define IS_CEC_OAR_ADDRESS(__ADDRESS__) ((__ADDRESS__) <= 0x07FFF)  

+

+/** @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.               

+  * @retval Test result (TRUE or FALSE).

+  */

+#define IS_CEC_ADDRESS(__ADDRESS__) ((__ADDRESS__) <= 0xF)    

+

+/** @brief Check CEC message size.

+  *       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.               

+  * @retval Test result (TRUE or FALSE).

+  */

+#define IS_CEC_MSGSIZE(__SIZE__) ((__SIZE__) <= 0xF)  

+                                                

+/**

+  * @}

+  */ 

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup CEC_Private_Functions CEC Private Functions

+  * @{

+  */

+  

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_CEC_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_conf_template.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_conf_template.h
new file mode 100644
index 0000000..7103e78
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_conf_template.h
@@ -0,0 +1,421 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_conf_template.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   HAL configuration template file. 

+  *          This file should be copied to the application folder and renamed

+  *          to stm32f7xx_hal_conf.h.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_CONF_H

+#define __STM32F7xx_HAL_CONF_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Exported types ------------------------------------------------------------*/

+/* Exported constants --------------------------------------------------------*/

+

+/* ########################## Module Selection ############################## */

+/**

+  * @brief This is the list of modules to be used in the HAL driver 

+  */

+#define HAL_MODULE_ENABLED  

+#define HAL_ADC_MODULE_ENABLED  

+#define HAL_CAN_MODULE_ENABLED

+#define HAL_CEC_MODULE_ENABLED  

+#define HAL_CRC_MODULE_ENABLED  

+#define HAL_CRYP_MODULE_ENABLED  

+#define HAL_DAC_MODULE_ENABLED  

+#define HAL_DCMI_MODULE_ENABLED 

+#define HAL_DMA_MODULE_ENABLED

+#define HAL_DMA2D_MODULE_ENABLED 

+#define HAL_ETH_MODULE_ENABLED 

+#define HAL_FLASH_MODULE_ENABLED 

+#define HAL_NAND_MODULE_ENABLED

+#define HAL_NOR_MODULE_ENABLED

+#define HAL_SRAM_MODULE_ENABLED

+#define HAL_SDRAM_MODULE_ENABLED

+#define HAL_HASH_MODULE_ENABLED  

+#define HAL_GPIO_MODULE_ENABLED

+#define HAL_I2C_MODULE_ENABLED

+#define HAL_I2S_MODULE_ENABLED   

+#define HAL_IWDG_MODULE_ENABLED 

+#define HAL_LPTIM_MODULE_ENABLED

+#define HAL_LTDC_MODULE_ENABLED 

+#define HAL_PWR_MODULE_ENABLED

+#define HAL_QSPI_MODULE_ENABLED   

+#define HAL_RCC_MODULE_ENABLED 

+#define HAL_RNG_MODULE_ENABLED   

+#define HAL_RTC_MODULE_ENABLED

+#define HAL_SAI_MODULE_ENABLED   

+#define HAL_SD_MODULE_ENABLED  

+#define HAL_SPDIFRX_MODULE_ENABLED

+#define HAL_SPI_MODULE_ENABLED   

+#define HAL_TIM_MODULE_ENABLED   

+#define HAL_UART_MODULE_ENABLED 

+#define HAL_USART_MODULE_ENABLED 

+#define HAL_IRDA_MODULE_ENABLED 

+#define HAL_SMARTCARD_MODULE_ENABLED 

+#define HAL_WWDG_MODULE_ENABLED  

+#define HAL_CORTEX_MODULE_ENABLED

+#define HAL_PCD_MODULE_ENABLED

+#define HAL_HCD_MODULE_ENABLED

+

+

+/* ########################## HSE/HSI Values adaptation ##################### */

+/**

+  * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.

+  *        This value is used by the RCC HAL module to compute the system frequency

+  *        (when HSE is used as system clock source, directly or through the PLL).  

+  */

+#if !defined  (HSE_VALUE) 

+  #define HSE_VALUE    ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */

+#endif /* HSE_VALUE */

+

+#if !defined  (HSE_STARTUP_TIMEOUT)

+  #define HSE_STARTUP_TIMEOUT    ((uint32_t)5000)   /*!< Time out for HSE start up, in ms */

+#endif /* HSE_STARTUP_TIMEOUT */

+

+/**

+  * @brief Internal High Speed oscillator (HSI) value.

+  *        This value is used by the RCC HAL module to compute the system frequency

+  *        (when HSI is used as system clock source, directly or through the PLL). 

+  */

+#if !defined  (HSI_VALUE)

+  #define HSI_VALUE    ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/

+#endif /* HSI_VALUE */

+

+/**

+  * @brief Internal Low Speed oscillator (LSI) value.

+  */

+#if !defined  (LSI_VALUE) 

+ #define LSI_VALUE  ((uint32_t)32000)       /*!< LSI Typical Value in Hz*/

+#endif /* LSI_VALUE */                      /*!< Value of the Internal Low Speed oscillator in Hz

+                                             The real value may vary depending on the variations

+                                             in voltage and temperature.  */

+/**

+  * @brief External Low Speed oscillator (LSE) value.

+  */

+#if !defined  (LSE_VALUE)

+ #define LSE_VALUE  ((uint32_t)32768)    /*!< Value of the External Low Speed oscillator in Hz */

+#endif /* LSE_VALUE */

+

+/**

+  * @brief External clock source for I2S peripheral

+  *        This value is used by the I2S HAL module to compute the I2S clock source 

+  *        frequency, this source is inserted directly through I2S_CKIN pad. 

+  */

+#if !defined  (EXTERNAL_CLOCK_VALUE)

+  #define EXTERNAL_CLOCK_VALUE    ((uint32_t)12288000) /*!< Value of the Internal oscillator in Hz*/

+#endif /* EXTERNAL_CLOCK_VALUE */

+

+/* Tip: To avoid modifying this file each time you need to use different HSE,

+   ===  you can define the HSE value in your toolchain compiler preprocessor. */

+

+/* ########################### System Configuration ######################### */

+/**

+  * @brief This is the HAL system configuration section

+  */     

+#define  VDD_VALUE                    ((uint32_t)3300) /*!< Value of VDD in mv */

+#define  TICK_INT_PRIORITY            ((uint32_t)0x0F) /*!< tick interrupt priority */

+#define  USE_RTOS                     0

+#define  PREFETCH_ENABLE              1

+#define  ART_ACCLERATOR_ENABLE        1 /* To enable instruction cache and prefetch */

+

+/* ########################## Assert Selection ############################## */

+/**

+  * @brief Uncomment the line below to expanse the "assert_param" macro in the 

+  *        HAL drivers code

+  */

+/* #define USE_FULL_ASSERT    1 */

+

+/* ################## Ethernet peripheral configuration ##################### */

+

+/* Section 1 : Ethernet peripheral configuration */

+

+/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */

+#define MAC_ADDR0   2

+#define MAC_ADDR1   0

+#define MAC_ADDR2   0

+#define MAC_ADDR3   0

+#define MAC_ADDR4   0

+#define MAC_ADDR5   0

+

+/* Definition of the Ethernet driver buffers size and count */   

+#define ETH_RX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for receive               */

+#define ETH_TX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for transmit              */

+#define ETH_RXBUFNB                    ((uint32_t)4)       /* 4 Rx buffers of size ETH_RX_BUF_SIZE  */

+#define ETH_TXBUFNB                    ((uint32_t)4)       /* 4 Tx buffers of size ETH_TX_BUF_SIZE  */

+

+/* Section 2: PHY configuration section */

+

+/* DP83848 PHY Address*/ 

+#define DP83848_PHY_ADDRESS             0x01

+/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ 

+#define PHY_RESET_DELAY                 ((uint32_t)0x000000FF)

+/* PHY Configuration delay */

+#define PHY_CONFIG_DELAY                ((uint32_t)0x00000FFF)

+

+#define PHY_READ_TO                     ((uint32_t)0x0000FFFF)

+#define PHY_WRITE_TO                    ((uint32_t)0x0000FFFF)

+

+/* Section 3: Common PHY Registers */

+

+#define PHY_BCR                         ((uint16_t)0x00)    /*!< Transceiver Basic Control Register   */

+#define PHY_BSR                         ((uint16_t)0x01)    /*!< Transceiver Basic Status Register    */

+ 

+#define PHY_RESET                       ((uint16_t)0x8000)  /*!< PHY Reset */

+#define PHY_LOOPBACK                    ((uint16_t)0x4000)  /*!< Select loop-back mode */

+#define PHY_FULLDUPLEX_100M             ((uint16_t)0x2100)  /*!< Set the full-duplex mode at 100 Mb/s */

+#define PHY_HALFDUPLEX_100M             ((uint16_t)0x2000)  /*!< Set the half-duplex mode at 100 Mb/s */

+#define PHY_FULLDUPLEX_10M              ((uint16_t)0x0100)  /*!< Set the full-duplex mode at 10 Mb/s  */

+#define PHY_HALFDUPLEX_10M              ((uint16_t)0x0000)  /*!< Set the half-duplex mode at 10 Mb/s  */

+#define PHY_AUTONEGOTIATION             ((uint16_t)0x1000)  /*!< Enable auto-negotiation function     */

+#define PHY_RESTART_AUTONEGOTIATION     ((uint16_t)0x0200)  /*!< Restart auto-negotiation function    */

+#define PHY_POWERDOWN                   ((uint16_t)0x0800)  /*!< Select the power down mode           */

+#define PHY_ISOLATE                     ((uint16_t)0x0400)  /*!< Isolate PHY from MII                 */

+

+#define PHY_AUTONEGO_COMPLETE           ((uint16_t)0x0020)  /*!< Auto-Negotiation process completed   */

+#define PHY_LINKED_STATUS               ((uint16_t)0x0004)  /*!< Valid link established               */

+#define PHY_JABBER_DETECTION            ((uint16_t)0x0002)  /*!< Jabber condition detected            */

+  

+/* Section 4: Extended PHY Registers */

+

+#define PHY_SR                          ((uint16_t)0x10)    /*!< PHY status register Offset                      */

+#define PHY_MICR                        ((uint16_t)0x11)    /*!< MII Interrupt Control Register                  */

+#define PHY_MISR                        ((uint16_t)0x12)    /*!< MII Interrupt Status and Misc. Control Register */

+ 

+#define PHY_LINK_STATUS                 ((uint16_t)0x0001)  /*!< PHY Link mask                                   */

+#define PHY_SPEED_STATUS                ((uint16_t)0x0002)  /*!< PHY Speed mask                                  */

+#define PHY_DUPLEX_STATUS               ((uint16_t)0x0004)  /*!< PHY Duplex mask                                 */

+

+#define PHY_MICR_INT_EN                 ((uint16_t)0x0002)  /*!< PHY Enable interrupts                           */

+#define PHY_MICR_INT_OE                 ((uint16_t)0x0001)  /*!< PHY Enable output interrupt events              */

+

+#define PHY_MISR_LINK_INT_EN            ((uint16_t)0x0020)  /*!< Enable Interrupt on change of link status       */

+#define PHY_LINK_INTERRUPT              ((uint16_t)0x2000)  /*!< PHY link status interrupt mask                  */

+

+/* Includes ------------------------------------------------------------------*/

+/**

+  * @brief Include module's header file 

+  */

+

+#ifdef HAL_RCC_MODULE_ENABLED

+  #include "stm32f7xx_hal_rcc.h"

+#endif /* HAL_RCC_MODULE_ENABLED */

+

+#ifdef HAL_GPIO_MODULE_ENABLED

+  #include "stm32f7xx_hal_gpio.h"

+#endif /* HAL_GPIO_MODULE_ENABLED */

+

+#ifdef HAL_DMA_MODULE_ENABLED

+  #include "stm32f7xx_hal_dma.h"

+#endif /* HAL_DMA_MODULE_ENABLED */

+   

+#ifdef HAL_CORTEX_MODULE_ENABLED

+  #include "stm32f7xx_hal_cortex.h"

+#endif /* HAL_CORTEX_MODULE_ENABLED */

+

+#ifdef HAL_ADC_MODULE_ENABLED

+  #include "stm32f7xx_hal_adc.h"

+#endif /* HAL_ADC_MODULE_ENABLED */

+

+#ifdef HAL_CAN_MODULE_ENABLED

+  #include "stm32f7xx_hal_can.h"

+#endif /* HAL_CAN_MODULE_ENABLED */

+

+#ifdef HAL_CEC_MODULE_ENABLED

+  #include "stm32f7xx_hal_cec.h"

+#endif /* HAL_CEC_MODULE_ENABLED */

+

+#ifdef HAL_CRC_MODULE_ENABLED

+  #include "stm32f7xx_hal_crc.h"

+#endif /* HAL_CRC_MODULE_ENABLED */

+

+#ifdef HAL_CRYP_MODULE_ENABLED

+  #include "stm32f7xx_hal_cryp.h" 

+#endif /* HAL_CRYP_MODULE_ENABLED */

+

+#ifdef HAL_DMA2D_MODULE_ENABLED

+  #include "stm32f7xx_hal_dma2d.h"

+#endif /* HAL_DMA2D_MODULE_ENABLED */

+

+#ifdef HAL_DAC_MODULE_ENABLED

+  #include "stm32f7xx_hal_dac.h"

+#endif /* HAL_DAC_MODULE_ENABLED */

+

+#ifdef HAL_DCMI_MODULE_ENABLED

+  #include "stm32f7xx_hal_dcmi.h"

+#endif /* HAL_DCMI_MODULE_ENABLED */

+

+#ifdef HAL_ETH_MODULE_ENABLED

+  #include "stm32f7xx_hal_eth.h"

+#endif /* HAL_ETH_MODULE_ENABLED */

+

+#ifdef HAL_FLASH_MODULE_ENABLED

+  #include "stm32f7xx_hal_flash.h"

+#endif /* HAL_FLASH_MODULE_ENABLED */

+ 

+#ifdef HAL_SRAM_MODULE_ENABLED

+  #include "stm32f7xx_hal_sram.h"

+#endif /* HAL_SRAM_MODULE_ENABLED */

+

+#ifdef HAL_NOR_MODULE_ENABLED

+  #include "stm32f7xx_hal_nor.h"

+#endif /* HAL_NOR_MODULE_ENABLED */

+

+#ifdef HAL_NAND_MODULE_ENABLED

+  #include "stm32f7xx_hal_nand.h"

+#endif /* HAL_NAND_MODULE_ENABLED */

+

+#ifdef HAL_SDRAM_MODULE_ENABLED

+  #include "stm32f7xx_hal_sdram.h"

+#endif /* HAL_SDRAM_MODULE_ENABLED */      

+

+#ifdef HAL_HASH_MODULE_ENABLED

+ #include "stm32f7xx_hal_hash.h"

+#endif /* HAL_HASH_MODULE_ENABLED */

+

+#ifdef HAL_I2C_MODULE_ENABLED

+ #include "stm32f7xx_hal_i2c.h"

+#endif /* HAL_I2C_MODULE_ENABLED */

+

+#ifdef HAL_I2S_MODULE_ENABLED

+ #include "stm32f7xx_hal_i2s.h"

+#endif /* HAL_I2S_MODULE_ENABLED */

+

+#ifdef HAL_IWDG_MODULE_ENABLED

+ #include "stm32f7xx_hal_iwdg.h"

+#endif /* HAL_IWDG_MODULE_ENABLED */

+

+#ifdef HAL_LPTIM_MODULE_ENABLED

+ #include "stm32f7xx_hal_lptim.h"

+#endif /* HAL_LPTIM_MODULE_ENABLED */

+

+#ifdef HAL_LTDC_MODULE_ENABLED

+ #include "stm32f7xx_hal_ltdc.h"

+#endif /* HAL_LTDC_MODULE_ENABLED */

+

+#ifdef HAL_PWR_MODULE_ENABLED

+ #include "stm32f7xx_hal_pwr.h"

+#endif /* HAL_PWR_MODULE_ENABLED */

+

+#ifdef HAL_QSPI_MODULE_ENABLED

+ #include "stm32f7xx_hal_qspi.h"

+#endif /* HAL_QSPI_MODULE_ENABLED */

+

+#ifdef HAL_RNG_MODULE_ENABLED

+ #include "stm32f7xx_hal_rng.h"

+#endif /* HAL_RNG_MODULE_ENABLED */

+

+#ifdef HAL_RTC_MODULE_ENABLED

+ #include "stm32f7xx_hal_rtc.h"

+#endif /* HAL_RTC_MODULE_ENABLED */

+

+#ifdef HAL_SAI_MODULE_ENABLED

+ #include "stm32f7xx_hal_sai.h"

+#endif /* HAL_SAI_MODULE_ENABLED */

+

+#ifdef HAL_SD_MODULE_ENABLED

+ #include "stm32f7xx_hal_sd.h"

+#endif /* HAL_SD_MODULE_ENABLED */

+

+#ifdef HAL_SPDIFRX_MODULE_ENABLED

+ #include "stm32f7xx_hal_spdifrx.h"

+#endif /* HAL_SPDIFRX_MODULE_ENABLED */

+

+#ifdef HAL_SPI_MODULE_ENABLED

+ #include "stm32f7xx_hal_spi.h"

+#endif /* HAL_SPI_MODULE_ENABLED */

+

+#ifdef HAL_TIM_MODULE_ENABLED

+ #include "stm32f7xx_hal_tim.h"

+#endif /* HAL_TIM_MODULE_ENABLED */

+

+#ifdef HAL_UART_MODULE_ENABLED

+ #include "stm32f7xx_hal_uart.h"

+#endif /* HAL_UART_MODULE_ENABLED */

+

+#ifdef HAL_USART_MODULE_ENABLED

+ #include "stm32f7xx_hal_usart.h"

+#endif /* HAL_USART_MODULE_ENABLED */

+

+#ifdef HAL_IRDA_MODULE_ENABLED

+ #include "stm32f7xx_hal_irda.h"

+#endif /* HAL_IRDA_MODULE_ENABLED */

+

+#ifdef HAL_SMARTCARD_MODULE_ENABLED

+ #include "stm32f7xx_hal_smartcard.h"

+#endif /* HAL_SMARTCARD_MODULE_ENABLED */

+

+#ifdef HAL_WWDG_MODULE_ENABLED

+ #include "stm32f7xx_hal_wwdg.h"

+#endif /* HAL_WWDG_MODULE_ENABLED */

+

+#ifdef HAL_PCD_MODULE_ENABLED

+ #include "stm32f7xx_hal_pcd.h"

+#endif /* HAL_PCD_MODULE_ENABLED */

+

+#ifdef HAL_HCD_MODULE_ENABLED

+ #include "stm32f7xx_hal_hcd.h"

+#endif /* HAL_HCD_MODULE_ENABLED */

+   

+/* Exported macro ------------------------------------------------------------*/

+#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

+  *         which reports the name of the source file and the source

+  *         line number of the call that failed. 

+  *         If expr is true, it returns no value.

+  * @retval None

+  */

+  #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))

+/* Exported functions ------------------------------------------------------- */

+  void assert_failed(uint8_t* file, uint32_t line);

+#else

+  #define assert_param(expr) ((void)0)

+#endif /* USE_FULL_ASSERT */

+

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_CONF_H */

+ 

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_cortex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_cortex.h
new file mode 100644
index 0000000..d3aa239
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_cortex.h
@@ -0,0 +1,490 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_cortex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of CORTEX HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_CORTEX_H

+#define __STM32F7xx_HAL_CORTEX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup CORTEX

+  * @{

+  */ 

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup CORTEX_Exported_Types Cortex Exported Types

+  * @{

+  */

+

+#if (__MPU_PRESENT == 1)

+/** @defgroup CORTEX_MPU_Region_Initialization_Structure_definition MPU Region Initialization Structure Definition

+  * @brief  MPU Region initialization structure 

+  * @{

+  */

+typedef struct

+{

+  uint8_t                Enable;                /*!< Specifies the status of the region. 

+                                                     This parameter can be a value of @ref CORTEX_MPU_Region_Enable                 */

+  uint8_t                Number;                /*!< Specifies the number of the region to protect. 

+                                                     This parameter can be a value of @ref CORTEX_MPU_Region_Number                 */

+  uint32_t               BaseAddress;           /*!< Specifies the base address of the region to protect.                           */

+  uint8_t                Size;                  /*!< Specifies the size of the region to protect. 

+                                                     This parameter can be a value of @ref CORTEX_MPU_Region_Size                   */

+  uint8_t                SubRegionDisable;      /*!< Specifies the number of the subregion protection to disable. 

+                                                     This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF    */         

+  uint8_t                TypeExtField;          /*!< Specifies the TEX field level.

+                                                     This parameter can be a value of @ref CORTEX_MPU_TEX_Levels                    */                 

+  uint8_t                AccessPermission;      /*!< Specifies the region access permission type. 

+                                                     This parameter can be a value of @ref CORTEX_MPU_Region_Permission_Attributes  */

+  uint8_t                DisableExec;           /*!< Specifies the instruction access status. 

+                                                     This parameter can be a value of @ref CORTEX_MPU_Instruction_Access            */

+  uint8_t                IsShareable;           /*!< Specifies the shareability status of the protected region. 

+                                                     This parameter can be a value of @ref CORTEX_MPU_Access_Shareable              */

+  uint8_t                IsCacheable;           /*!< Specifies the cacheable status of the region protected. 

+                                                     This parameter can be a value of @ref CORTEX_MPU_Access_Cacheable              */

+  uint8_t                IsBufferable;          /*!< Specifies the bufferable status of the protected region. 

+                                                     This parameter can be a value of @ref CORTEX_MPU_Access_Bufferable             */

+}MPU_Region_InitTypeDef;

+/**

+  * @}

+  */

+#endif /* __MPU_PRESENT */

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup CORTEX_Exported_Constants CORTEX Exported Constants

+  * @{

+  */

+

+/** @defgroup CORTEX_Preemption_Priority_Group CORTEX Preemption Priority Group

+  * @{

+  */

+#define NVIC_PRIORITYGROUP_0         ((uint32_t)0x00000007) /*!< 0 bits for pre-emption priority

+                                                                 4 bits for subpriority */

+#define NVIC_PRIORITYGROUP_1         ((uint32_t)0x00000006) /*!< 1 bits for pre-emption priority

+                                                                 3 bits for subpriority */

+#define NVIC_PRIORITYGROUP_2         ((uint32_t)0x00000005) /*!< 2 bits for pre-emption priority

+                                                                 2 bits for subpriority */

+#define NVIC_PRIORITYGROUP_3         ((uint32_t)0x00000004) /*!< 3 bits for pre-emption priority

+                                                                 1 bits for subpriority */

+#define NVIC_PRIORITYGROUP_4         ((uint32_t)0x00000003) /*!< 4 bits for pre-emption priority

+                                                                 0 bits for subpriority */

+/**

+  * @}

+  */

+

+/** @defgroup CORTEX_SysTick_clock_source CORTEX _SysTick clock source 

+  * @{

+  */

+#define SYSTICK_CLKSOURCE_HCLK_DIV8    ((uint32_t)0x00000000)

+#define SYSTICK_CLKSOURCE_HCLK         ((uint32_t)0x00000004)

+

+/**

+  * @}

+  */

+

+#if (__MPU_PRESENT == 1)

+/** @defgroup CORTEX_MPU_HFNMI_PRIVDEF_Control MPU HFNMI and PRIVILEGED Access control

+  * @{

+  */

+#define  MPU_HFNMI_PRIVDEF_NONE      ((uint32_t)0x00000000)  

+#define  MPU_HARDFAULT_NMI           ((uint32_t)0x00000002)

+#define  MPU_PRIVILEGED_DEFAULT      ((uint32_t)0x00000004)

+#define  MPU_HFNMI_PRIVDEF           ((uint32_t)0x00000006)

+/**

+  * @}

+  */

+

+/** @defgroup CORTEX_MPU_Region_Enable CORTEX MPU Region Enable

+  * @{

+  */

+#define  MPU_REGION_ENABLE     ((uint8_t)0x01)

+#define  MPU_REGION_DISABLE    ((uint8_t)0x00)

+/**

+  * @}

+  */

+

+/** @defgroup CORTEX_MPU_Instruction_Access CORTEX MPU Instruction Access

+  * @{

+  */

+#define  MPU_INSTRUCTION_ACCESS_ENABLE      ((uint8_t)0x00)

+#define  MPU_INSTRUCTION_ACCESS_DISABLE     ((uint8_t)0x01)

+/**

+  * @}

+  */

+

+/** @defgroup CORTEX_MPU_Access_Shareable CORTEX MPU Instruction Access Shareable

+  * @{

+  */

+#define  MPU_ACCESS_SHAREABLE        ((uint8_t)0x01)

+#define  MPU_ACCESS_NOT_SHAREABLE    ((uint8_t)0x00)

+/**

+  * @}

+  */

+

+/** @defgroup CORTEX_MPU_Access_Cacheable CORTEX MPU Instruction Access Cacheable

+  * @{

+  */

+#define  MPU_ACCESS_CACHEABLE         ((uint8_t)0x01)

+#define  MPU_ACCESS_NOT_CACHEABLE     ((uint8_t)0x00)

+/**

+  * @}

+  */

+

+/** @defgroup CORTEX_MPU_Access_Bufferable CORTEX MPU Instruction Access Bufferable

+  * @{

+  */

+#define  MPU_ACCESS_BUFFERABLE         ((uint8_t)0x01)

+#define  MPU_ACCESS_NOT_BUFFERABLE     ((uint8_t)0x00)

+/**

+  * @}

+  */

+

+/** @defgroup CORTEX_MPU_TEX_Levels MPU TEX Levels

+  * @{

+  */

+#define  MPU_TEX_LEVEL0    ((uint8_t)0x00)

+#define  MPU_TEX_LEVEL1    ((uint8_t)0x01)

+#define  MPU_TEX_LEVEL2    ((uint8_t)0x02)

+/**

+  * @}

+  */

+

+/** @defgroup CORTEX_MPU_Region_Size CORTEX MPU Region Size

+  * @{

+  */

+#define   MPU_REGION_SIZE_32B      ((uint8_t)0x04)

+#define   MPU_REGION_SIZE_64B      ((uint8_t)0x05)

+#define   MPU_REGION_SIZE_128B     ((uint8_t)0x06) 

+#define   MPU_REGION_SIZE_256B     ((uint8_t)0x07) 

+#define   MPU_REGION_SIZE_512B     ((uint8_t)0x08) 

+#define   MPU_REGION_SIZE_1KB      ((uint8_t)0x09)  

+#define   MPU_REGION_SIZE_2KB      ((uint8_t)0x0A)

+#define   MPU_REGION_SIZE_4KB      ((uint8_t)0x0B) 

+#define   MPU_REGION_SIZE_8KB      ((uint8_t)0x0C) 

+#define   MPU_REGION_SIZE_16KB     ((uint8_t)0x0D) 

+#define   MPU_REGION_SIZE_32KB     ((uint8_t)0x0E) 

+#define   MPU_REGION_SIZE_64KB     ((uint8_t)0x0F) 

+#define   MPU_REGION_SIZE_128KB    ((uint8_t)0x10)

+#define   MPU_REGION_SIZE_256KB    ((uint8_t)0x11)

+#define   MPU_REGION_SIZE_512KB    ((uint8_t)0x12)

+#define   MPU_REGION_SIZE_1MB      ((uint8_t)0x13) 

+#define   MPU_REGION_SIZE_2MB      ((uint8_t)0x14) 

+#define   MPU_REGION_SIZE_4MB      ((uint8_t)0x15) 

+#define   MPU_REGION_SIZE_8MB      ((uint8_t)0x16) 

+#define   MPU_REGION_SIZE_16MB     ((uint8_t)0x17)

+#define   MPU_REGION_SIZE_32MB     ((uint8_t)0x18)

+#define   MPU_REGION_SIZE_64MB     ((uint8_t)0x19)

+#define   MPU_REGION_SIZE_128MB    ((uint8_t)0x1A)

+#define   MPU_REGION_SIZE_256MB    ((uint8_t)0x1B)

+#define   MPU_REGION_SIZE_512MB    ((uint8_t)0x1C)

+#define   MPU_REGION_SIZE_1GB      ((uint8_t)0x1D) 

+#define   MPU_REGION_SIZE_2GB      ((uint8_t)0x1E) 

+#define   MPU_REGION_SIZE_4GB      ((uint8_t)0x1F)

+/**                                

+  * @}

+  */

+   

+/** @defgroup CORTEX_MPU_Region_Permission_Attributes CORTEX MPU Region Permission Attributes 

+  * @{

+  */

+#define  MPU_REGION_NO_ACCESS      ((uint8_t)0x00)  

+#define  MPU_REGION_PRIV_RW        ((uint8_t)0x01) 

+#define  MPU_REGION_PRIV_RW_URO    ((uint8_t)0x02)  

+#define  MPU_REGION_FULL_ACCESS    ((uint8_t)0x03)  

+#define  MPU_REGION_PRIV_RO        ((uint8_t)0x05) 

+#define  MPU_REGION_PRIV_RO_URO    ((uint8_t)0x06)

+/**

+  * @}

+  */

+

+/** @defgroup CORTEX_MPU_Region_Number CORTEX MPU Region Number

+  * @{

+  */

+#define  MPU_REGION_NUMBER0    ((uint8_t)0x00)  

+#define  MPU_REGION_NUMBER1    ((uint8_t)0x01) 

+#define  MPU_REGION_NUMBER2    ((uint8_t)0x02)  

+#define  MPU_REGION_NUMBER3    ((uint8_t)0x03)  

+#define  MPU_REGION_NUMBER4    ((uint8_t)0x04) 

+#define  MPU_REGION_NUMBER5    ((uint8_t)0x05)

+#define  MPU_REGION_NUMBER6    ((uint8_t)0x06)

+#define  MPU_REGION_NUMBER7    ((uint8_t)0x07)

+/**

+  * @}

+  */

+#endif /* __MPU_PRESENT */

+

+/**

+  * @}

+  */

+

+

+/* Exported Macros -----------------------------------------------------------*/

+/** @defgroup CORTEX_Exported_Macros CORTEX Exported Macros

+  * @{

+  */

+

+/** @brief Configures the SysTick clock source.

+  * @param __CLKSRC__: 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.

+  * @retval None

+  */

+#define __HAL_CORTEX_SYSTICKCLK_CONFIG(__CLKSRC__)                             \

+                            do {                                               \

+                                 if ((__CLKSRC__) == SYSTICK_CLKSOURCE_HCLK)   \

+                                  {                                            \

+                                    SysTick->CTRL |= SYSTICK_CLKSOURCE_HCLK;   \

+                                  }                                            \

+                                 else                                          \

+                                    SysTick->CTRL &= ~SYSTICK_CLKSOURCE_HCLK;  \

+                                } while(0)

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup CORTEX_Exported_Functions

+  * @{

+  */

+  

+/** @addtogroup CORTEX_Exported_Functions_Group1

+ * @{

+ */

+/* Initialization and de-initialization functions *****************************/

+void HAL_NVIC_SetPriorityGrouping(uint32_t PriorityGroup);

+void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority);

+void HAL_NVIC_EnableIRQ(IRQn_Type IRQn);

+void HAL_NVIC_DisableIRQ(IRQn_Type IRQn);

+void HAL_NVIC_SystemReset(void);

+uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb);

+/**

+  * @}

+  */

+

+/** @addtogroup CORTEX_Exported_Functions_Group2

+ * @{

+ */

+/* Peripheral Control functions ***********************************************/

+#if (__MPU_PRESENT == 1)

+void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init);

+#endif /* __MPU_PRESENT */

+uint32_t HAL_NVIC_GetPriorityGrouping(void);

+void HAL_NVIC_GetPriority(IRQn_Type IRQn, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority);

+uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn);

+void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn);

+void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn);

+uint32_t HAL_NVIC_GetActive(IRQn_Type IRQn);

+void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource);

+void HAL_SYSTICK_IRQHandler(void);

+void HAL_SYSTICK_Callback(void);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private types -------------------------------------------------------------*/ 

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup CORTEX_Private_Macros CORTEX Private Macros

+  * @{

+  */

+#define IS_NVIC_PRIORITY_GROUP(GROUP) (((GROUP) == NVIC_PRIORITYGROUP_0) || \

+                                       ((GROUP) == NVIC_PRIORITYGROUP_1) || \

+                                       ((GROUP) == NVIC_PRIORITYGROUP_2) || \

+                                       ((GROUP) == NVIC_PRIORITYGROUP_3) || \

+                                       ((GROUP) == NVIC_PRIORITYGROUP_4))

+

+#define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY)  ((PRIORITY) < 0x10)

+

+#define IS_NVIC_SUB_PRIORITY(PRIORITY)         ((PRIORITY) < 0x10)

+

+#define IS_NVIC_DEVICE_IRQ(IRQ)                ((IRQ) >= 0x00)

+

+#define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SYSTICK_CLKSOURCE_HCLK) || \

+                                       ((SOURCE) == SYSTICK_CLKSOURCE_HCLK_DIV8))

+

+#if (__MPU_PRESENT == 1)

+#define IS_MPU_REGION_ENABLE(STATE) (((STATE) == MPU_REGION_ENABLE) || \

+                                     ((STATE) == MPU_REGION_DISABLE))

+

+#define IS_MPU_INSTRUCTION_ACCESS(STATE) (((STATE) == MPU_INSTRUCTION_ACCESS_ENABLE) || \

+                                          ((STATE) == MPU_INSTRUCTION_ACCESS_DISABLE))

+

+#define IS_MPU_ACCESS_SHAREABLE(STATE)   (((STATE) == MPU_ACCESS_SHAREABLE) || \

+                                          ((STATE) == MPU_ACCESS_NOT_SHAREABLE))

+

+#define IS_MPU_ACCESS_CACHEABLE(STATE)   (((STATE) == MPU_ACCESS_CACHEABLE) || \

+                                          ((STATE) == MPU_ACCESS_NOT_CACHEABLE))

+

+#define IS_MPU_ACCESS_BUFFERABLE(STATE)   (((STATE) == MPU_ACCESS_BUFFERABLE) || \

+                                          ((STATE) == MPU_ACCESS_NOT_BUFFERABLE))

+

+#define IS_MPU_TEX_LEVEL(TYPE) (((TYPE) == MPU_TEX_LEVEL0)  || \

+                                ((TYPE) == MPU_TEX_LEVEL1)  || \

+                                ((TYPE) == MPU_TEX_LEVEL2))

+

+#define IS_MPU_REGION_PERMISSION_ATTRIBUTE(TYPE) (((TYPE) == MPU_REGION_NO_ACCESS)   || \

+                                                  ((TYPE) == MPU_REGION_PRIV_RW)     || \

+                                                  ((TYPE) == MPU_REGION_PRIV_RW_URO) || \

+                                                  ((TYPE) == MPU_REGION_FULL_ACCESS) || \

+                                                  ((TYPE) == MPU_REGION_PRIV_RO)     || \

+                                                  ((TYPE) == MPU_REGION_PRIV_RO_URO))

+

+#define IS_MPU_REGION_NUMBER(NUMBER)    (((NUMBER) == MPU_REGION_NUMBER0) || \

+                                         ((NUMBER) == MPU_REGION_NUMBER1) || \

+                                         ((NUMBER) == MPU_REGION_NUMBER2) || \

+                                         ((NUMBER) == MPU_REGION_NUMBER3) || \

+                                         ((NUMBER) == MPU_REGION_NUMBER4) || \

+                                         ((NUMBER) == MPU_REGION_NUMBER5) || \

+                                         ((NUMBER) == MPU_REGION_NUMBER6) || \

+                                         ((NUMBER) == MPU_REGION_NUMBER7))

+

+#define IS_MPU_REGION_SIZE(SIZE)    (((SIZE) == MPU_REGION_SIZE_32B)   || \

+                                     ((SIZE) == MPU_REGION_SIZE_64B)   || \

+                                     ((SIZE) == MPU_REGION_SIZE_128B)  || \

+                                     ((SIZE) == MPU_REGION_SIZE_256B)  || \

+                                     ((SIZE) == MPU_REGION_SIZE_512B)  || \

+                                     ((SIZE) == MPU_REGION_SIZE_1KB)   || \

+                                     ((SIZE) == MPU_REGION_SIZE_2KB)   || \

+                                     ((SIZE) == MPU_REGION_SIZE_4KB)   || \

+                                     ((SIZE) == MPU_REGION_SIZE_8KB)   || \

+                                     ((SIZE) == MPU_REGION_SIZE_16KB)  || \

+                                     ((SIZE) == MPU_REGION_SIZE_32KB)  || \

+                                     ((SIZE) == MPU_REGION_SIZE_64KB)  || \

+                                     ((SIZE) == MPU_REGION_SIZE_128KB) || \

+                                     ((SIZE) == MPU_REGION_SIZE_256KB) || \

+                                     ((SIZE) == MPU_REGION_SIZE_512KB) || \

+                                     ((SIZE) == MPU_REGION_SIZE_1MB)   || \

+                                     ((SIZE) == MPU_REGION_SIZE_2MB)   || \

+                                     ((SIZE) == MPU_REGION_SIZE_4MB)   || \

+                                     ((SIZE) == MPU_REGION_SIZE_8MB)   || \

+                                     ((SIZE) == MPU_REGION_SIZE_16MB)  || \

+                                     ((SIZE) == MPU_REGION_SIZE_32MB)  || \

+                                     ((SIZE) == MPU_REGION_SIZE_64MB)  || \

+                                     ((SIZE) == MPU_REGION_SIZE_128MB) || \

+                                     ((SIZE) == MPU_REGION_SIZE_256MB) || \

+                                     ((SIZE) == MPU_REGION_SIZE_512MB) || \

+                                     ((SIZE) == MPU_REGION_SIZE_1GB)   || \

+                                     ((SIZE) == MPU_REGION_SIZE_2GB)   || \

+                                     ((SIZE) == MPU_REGION_SIZE_4GB))

+

+#define IS_MPU_SUB_REGION_DISABLE(SUBREGION)  ((SUBREGION) < (uint16_t)0x00FF)

+#endif /* __MPU_PRESENT */

+

+/**                                                                          

+  * @}                                                                  

+  */                                                                            

+                                                                                   

+/* Private functions ---------------------------------------------------------*/   

+/** @defgroup CORTEX_Private_Functions CORTEX Private Functions

+  * @brief    CORTEX private  functions 

+  * @{

+  */

+

+#if (__MPU_PRESENT == 1)

+/**

+  * @brief  Disables the MPU

+  * @retval None

+  */

+__STATIC_INLINE void HAL_MPU_Disable(void)

+{

+  /* Disable fault exceptions */

+  SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;

+  

+  /* Disable the MPU */

+  MPU->CTRL  &= ~MPU_CTRL_ENABLE_Msk;

+}

+

+/**

+  * @brief  Enables the MPU

+  * @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

+  *            @arg MPU_HARDFAULT_NMI

+  *            @arg MPU_PRIVILEGED_DEFAULT

+  *            @arg MPU_HFNMI_PRIVDEF

+  * @retval None

+  */

+__STATIC_INLINE void HAL_MPU_Enable(uint32_t MPU_Control)

+{

+  /* Enable the MPU */

+  MPU->CTRL   = MPU_Control | MPU_CTRL_ENABLE_Msk;

+  

+  /* Enable fault exceptions */

+  SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;

+}

+#endif /* __MPU_PRESENT */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_CORTEX_H */

+ 

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_crc.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_crc.h
new file mode 100644
index 0000000..c7d4ac6
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_crc.h
@@ -0,0 +1,423 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_crc.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of CRC HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_CRC_H

+#define __STM32F7xx_HAL_CRC_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @defgroup CRC CRC

+  * @brief CRC HAL module driver

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup CRC_Exported_Types CRC Exported Types

+  * @{

+  */

+

+/** @defgroup CRC_Exported_Types_Group1 CRC State Structure definition 

+  * @{

+  */

+typedef enum

+{

+  HAL_CRC_STATE_RESET     = 0x00,  /*!< CRC not yet initialized or disabled */

+  HAL_CRC_STATE_READY     = 0x01,  /*!< CRC initialized and ready for use   */

+  HAL_CRC_STATE_BUSY      = 0x02,  /*!< CRC internal process is ongoing     */

+  HAL_CRC_STATE_TIMEOUT   = 0x03,  /*!< CRC timeout state                   */

+  HAL_CRC_STATE_ERROR     = 0x04   /*!< CRC error state                     */

+}HAL_CRC_StateTypeDef;

+/** 

+  * @}

+  */

+

+/** @defgroup CRC_Exported_Types_Group2 CRC Init Structure definition  

+  * @{

+  */

+typedef struct

+{

+  uint8_t DefaultPolynomialUse;       /*!< This parameter is a value of @ref CRC_Default_Polynomial and indicates if default polynomial is used.  

+                                            If set to DEFAULT_POLYNOMIAL_ENABLE, resort to default 

+                                            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. 

+                                            In that case, there is no need to set GeneratingPolynomial field.

+                                            If otherwise set to DEFAULT_POLYNOMIAL_DISABLE, GeneratingPolynomial and CRCLength fields must be set */

+

+  uint8_t DefaultInitValueUse;        /*!< This parameter is a value of @ref CRC_Default_InitValue_Use and indicates if default init value is used. 

+                                           If set to DEFAULT_INIT_VALUE_ENABLE, resort to default

+                                           0xFFFFFFFF value. In that case, there is no need to set InitValue field.   

+                                           If otherwise set to DEFAULT_INIT_VALUE_DISABLE,  InitValue field must be set */

+

+  uint32_t GeneratingPolynomial;      /*!< Set CRC generating polynomial. 7, 8, 16 or 32-bit long value for a polynomial degree

+                                           respectively equal to 7, 8, 16 or 32. This field is written in normal representation, 

+                                           e.g., for a polynomial of degree 7, X^7 + X^6 + X^5 + X^2 + 1 is written 0x65.

+                                           No need to specify it if DefaultPolynomialUse is set to DEFAULT_POLYNOMIAL_ENABLE   */                                                

+

+  uint32_t CRCLength;                 /*!< This parameter is a value of @ref CRC_Polynomial_Sizes and indicates CRC length.

+                                           Value can be either one of

+                                           CRC_POLYLENGTH_32B                  (32-bit CRC)

+                                           CRC_POLYLENGTH_16B                  (16-bit CRC)

+                                           CRC_POLYLENGTH_8B                   (8-bit CRC)

+                                           CRC_POLYLENGTH_7B                   (7-bit CRC) */

+                                              

+  uint32_t InitValue;                 /*!< Init value to initiate CRC computation. No need to specify it if DefaultInitValueUse 

+                                           is set to DEFAULT_INIT_VALUE_ENABLE   */                                                

+  

+  uint32_t InputDataInversionMode;    /*!< This parameter is a value of @ref CRCEx_Input_Data_Inversion and specifies input data inversion mode. 

+                                           Can be either one of the following values 

+                                           CRC_INPUTDATA_INVERSION_NONE      no input data inversion

+                                           CRC_INPUTDATA_INVERSION_BYTE      byte-wise inversion, 0x1A2B3C4D becomes 0x58D43CB2

+                                           CRC_INPUTDATA_INVERSION_HALFWORD  halfword-wise inversion, 0x1A2B3C4D becomes 0xD458B23C

+                                           CRC_INPUTDATA_INVERSION_WORD      word-wise inversion, 0x1A2B3C4D becomes 0xB23CD458 */  

+                                              

+  uint32_t OutputDataInversionMode;   /*!< This parameter is a value of @ref CRCEx_Output_Data_Inversion and specifies output data (i.e. CRC) inversion mode.

+                                            Can be either 

+                                            CRC_OUTPUTDATA_INVERSION_DISABLE   no CRC inversion, or

+                                            CRC_OUTPUTDATA_INVERSION_ENABLE    CRC 0x11223344 is converted into 0x22CC4488 */

+}CRC_InitTypeDef;

+/** 

+  * @}

+  */

+  

+/** @defgroup CRC_Exported_Types_Group3 CRC Handle Structure definition   

+  * @{

+  */

+typedef struct

+{

+  CRC_TypeDef                 *Instance;   /*!< Register base address        */ 

+  

+  CRC_InitTypeDef             Init;        /*!< CRC configuration parameters */

+  

+  HAL_LockTypeDef             Lock;        /*!< CRC Locking object           */

+    

+  __IO HAL_CRC_StateTypeDef   State;       /*!< CRC communication state      */

+  

+  uint32_t InputDataFormat;                /*!< This parameter is a value of @ref CRC_Input_Buffer_Format and specifies input data format. 

+                                            Can be either 

+                                            CRC_INPUTDATA_FORMAT_BYTES       input data is a stream of bytes (8-bit data)

+                                            CRC_INPUTDATA_FORMAT_HALFWORDS   input data is a stream of half-words (16-bit data)

+                                            CRC_INPUTDATA_FORMAT_WORDS       input data is a stream of words (32-bits data)                                                                                        

+                                           Note that constant CRC_INPUT_FORMAT_UNDEFINED is defined but an initialization error

+                                           must occur if InputBufferFormat is not one of the three values listed above  */ 

+}CRC_HandleTypeDef;

+/** 

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup CRC_Exported_Constants   CRC exported constants

+  * @{

+  */

+  

+/** @defgroup CRC_Default_Polynomial_Value    Default CRC generating polynomial

+  * @{

+  */

+#define DEFAULT_CRC32_POLY      0x04C11DB7

+

+/**

+  * @}

+  */

+

+/** @defgroup CRC_Default_InitValue    Default CRC computation initialization value

+  * @{

+  */

+#define DEFAULT_CRC_INITVALUE   0xFFFFFFFF

+

+/**

+  * @}

+  */

+

+/** @defgroup CRC_Default_Polynomial    Indicates whether or not default polynomial is used

+  * @{

+  */

+#define DEFAULT_POLYNOMIAL_ENABLE       ((uint8_t)0x00)

+#define DEFAULT_POLYNOMIAL_DISABLE      ((uint8_t)0x01)

+

+

+/**

+  * @}

+  */

+ 

+/** @defgroup CRC_Default_InitValue_Use    Indicates whether or not default init value is used

+  * @{

+  */                                      

+#define DEFAULT_INIT_VALUE_ENABLE      ((uint8_t)0x00)

+#define DEFAULT_INIT_VALUE_DISABLE     ((uint8_t)0x01)

+

+/**

+  * @}

+  */

+

+/** @defgroup CRC_Polynomial_Sizes Polynomial sizes to configure the IP

+  * @{

+  */

+#define CRC_POLYLENGTH_32B                  ((uint32_t)0x00000000)

+#define CRC_POLYLENGTH_16B                  ((uint32_t)CRC_CR_POLYSIZE_0)

+#define CRC_POLYLENGTH_8B                   ((uint32_t)CRC_CR_POLYSIZE_1)

+#define CRC_POLYLENGTH_7B                   ((uint32_t)CRC_CR_POLYSIZE)

+/**

+  * @}

+  */

+

+/** @defgroup CRC_Polynomial_Size_Definitions CRC polynomial possible sizes actual definitions

+  * @{

+  */

+#define HAL_CRC_LENGTH_32B     32

+#define HAL_CRC_LENGTH_16B     16

+#define HAL_CRC_LENGTH_8B       8

+#define HAL_CRC_LENGTH_7B       7

+

+/**

+  * @}

+  */  

+

+/** @defgroup CRC_Input_Buffer_Format CRC input buffer format

+  * @{

+  */

+/* WARNING: CRC_INPUT_FORMAT_UNDEFINED is created for reference purposes but

+ * an error is triggered in HAL_CRC_Init() if InputDataFormat field is set 

+ * to CRC_INPUT_FORMAT_UNDEFINED: the format MUST be defined by the user for 

+ * the CRC APIs to provide a correct result */   

+#define CRC_INPUTDATA_FORMAT_UNDEFINED             ((uint32_t)0x00000000)

+#define CRC_INPUTDATA_FORMAT_BYTES                 ((uint32_t)0x00000001)

+#define CRC_INPUTDATA_FORMAT_HALFWORDS             ((uint32_t)0x00000002)

+#define CRC_INPUTDATA_FORMAT_WORDS                 ((uint32_t)0x00000003)

+/** 

+  * @}

+  */   

+

+/** 

+  * @}

+  */ 

+/* Exported macros -----------------------------------------------------------*/

+

+/** @defgroup CRC_Exported_Macros CRC exported macros

+  * @{

+  */

+

+/** @brief Reset CRC handle state

+  * @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

+  * @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  

+  * @retval None.

+  */

+#define __HAL_CRC_INITIALCRCVALUE_CONFIG(__HANDLE__, __INIT__) ((__HANDLE__)->Instance->INIT = (__INIT__))    

+

+/**

+  * @brief Stores 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

+  * @retval None

+  */

+#define __HAL_CRC_SET_IDR(__HANDLE__, __VALUE__) (MODIFY_REG((__HANDLE__)->Instance->IDR, CRC_IDR_IDR, (__VALUE__)))

+

+/**

+  * @brief Returns the 8-bit data stored in the Independent Data(ID) register.

+  * @param __HANDLE__: CRC handle

+  * @retval 8-bit value of the ID register 

+  */

+#define __HAL_CRC_GET_IDR(__HANDLE__) (((__HANDLE__)->Instance->IDR) & CRC_IDR_IDR)

+/**

+  * @}

+  */

+

+

+/* Include CRC HAL Extension module */

+#include "stm32f7xx_hal_crc_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+/** @defgroup CRC_Exported_Functions CRC Exported Functions

+  * @{

+  */

+

+/** @defgroup CRC_Exported_Functions_Group1 Initialization/de-initialization functions

+  * @{

+  */

+/* Initialization and de-initialization functions  ****************************/

+HAL_StatusTypeDef HAL_CRC_Init(CRC_HandleTypeDef *hcrc);

+HAL_StatusTypeDef HAL_CRC_DeInit (CRC_HandleTypeDef *hcrc);

+void HAL_CRC_MspInit(CRC_HandleTypeDef *hcrc);

+void HAL_CRC_MspDeInit(CRC_HandleTypeDef *hcrc);

+/**

+  * @}

+  */

+

+/* Aliases for inter STM32 series compatibility */

+#define HAL_CRC_Input_Data_Reverse   HAL_CRCEx_Input_Data_Reverse

+#define HAL_CRC_Output_Data_Reverse  HAL_CRCEx_Output_Data_Reverse

+

+/** @defgroup CRC_Exported_Functions_Group2 Peripheral Control functions

+  * @{

+  */

+/* Peripheral Control functions ***********************************************/

+uint32_t HAL_CRC_Accumulate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength);

+uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength);

+/**

+  * @}

+  */

+

+/** @defgroup CRC_Exported_Functions_Group3 Peripheral State functions

+  * @{

+  */

+/* Peripheral State and Error functions ***************************************/

+HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+

+/* Private types -------------------------------------------------------------*/

+/** @defgroup CRC_Private_Types CRC Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private defines -----------------------------------------------------------*/

+/** @defgroup CRC_Private_Defines CRC Private Defines

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup CRC_Private_Variables CRC Private Variables

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup CRC_Private_Constants CRC Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup CRC_Private_Macros CRC Private Macros

+  * @{

+  */

+#define IS_DEFAULT_POLYNOMIAL(__DEFAULT__) (((__DEFAULT__) == DEFAULT_POLYNOMIAL_ENABLE) || \

+                                            ((__DEFAULT__) == DEFAULT_POLYNOMIAL_DISABLE))

+#define IS_DEFAULT_INIT_VALUE(__VALUE__)  (((__VALUE__) == DEFAULT_INIT_VALUE_ENABLE) || \

+                                           ((__VALUE__) == DEFAULT_INIT_VALUE_DISABLE))

+#define IS_CRC_POL_LENGTH(__LENGTH__)     (((__LENGTH__) == CRC_POLYLENGTH_32B) || \

+                                           ((__LENGTH__) == CRC_POLYLENGTH_16B) || \

+                                           ((__LENGTH__) == CRC_POLYLENGTH_8B)  || \

+                                           ((__LENGTH__) == CRC_POLYLENGTH_7B))

+#define IS_CRC_INPUTDATA_FORMAT(__FORMAT__)       (((__FORMAT__) == CRC_INPUTDATA_FORMAT_BYTES) || \

+                                                   ((__FORMAT__) == CRC_INPUTDATA_FORMAT_HALFWORDS) || \

+                                                   ((__FORMAT__) == CRC_INPUTDATA_FORMAT_WORDS))

+

+

+/**

+  * @}

+  */

+

+/* Private functions prototypes ----------------------------------------------*/

+/** @defgroup CRC_Private_Functions_Prototypes CRC Private Functions Prototypes

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup CRC_Private_Functions CRC Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_CRC_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_crc_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_crc_ex.h
new file mode 100644
index 0000000..6e3878f
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_crc_ex.h
@@ -0,0 +1,168 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_crc_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of CRC HAL extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_CRC_EX_H

+#define __STM32F7xx_HAL_CRC_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @defgroup CRCEx CRCEx

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup CRCEx_Exported_Constants CRC Extended exported constants

+ * @{

+ */

+

+/** @defgroup CRCEx_Input_Data_Inversion CRC Extended input data inversion modes

+  * @{

+  */

+#define CRC_INPUTDATA_INVERSION_NONE              ((uint32_t)0x00000000)

+#define CRC_INPUTDATA_INVERSION_BYTE              ((uint32_t)CRC_CR_REV_IN_0)

+#define CRC_INPUTDATA_INVERSION_HALFWORD          ((uint32_t)CRC_CR_REV_IN_1)

+#define CRC_INPUTDATA_INVERSION_WORD              ((uint32_t)CRC_CR_REV_IN)

+

+#define IS_CRC_INPUTDATA_INVERSION_MODE(__MODE__)     (((__MODE__) == CRC_INPUTDATA_INVERSION_NONE) || \

+                                                       ((__MODE__) == CRC_INPUTDATA_INVERSION_BYTE) || \

+                                                       ((__MODE__) == CRC_INPUTDATA_INVERSION_HALFWORD) || \

+                                                       ((__MODE__) == CRC_INPUTDATA_INVERSION_WORD))

+/**

+  * @}

+  */

+

+/** @defgroup CRCEx_Output_Data_Inversion CRC Extended output data inversion modes

+  * @{

+  */

+#define CRC_OUTPUTDATA_INVERSION_DISABLE         ((uint32_t)0x00000000)

+#define CRC_OUTPUTDATA_INVERSION_ENABLE          ((uint32_t)CRC_CR_REV_OUT)

+

+#define IS_CRC_OUTPUTDATA_INVERSION_MODE(__MODE__)    (((__MODE__) == CRC_OUTPUTDATA_INVERSION_DISABLE) || \

+                                                       ((__MODE__) == CRC_OUTPUTDATA_INVERSION_ENABLE))

+/**                                               

+  * @}

+  */

+

+

+/**

+ * @}

+ */

+/* Exported macro ------------------------------------------------------------*/

+

+/** @defgroup CRCEx_Exported_Macros CRC Extended exported macros

+  * @{

+  */

+    

+/**

+  * @brief  Set CRC output reversal

+  * @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

+  * @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  

+  * @retval None.

+  */

+#define __HAL_CRC_POLYNOMIAL_CONFIG(__HANDLE__, __POLYNOMIAL__) ((__HANDLE__)->Instance->POL = (__POLYNOMIAL__))

+

+/**

+  * @}

+  */

+

+

+/** @defgroup CRCEx_Exported_Functions CRC Extended Exported Functions

+  * @{

+  */

+

+/** @defgroup CRCEx_Exported_Functions_Group1 Extended CRC features functions

+  * @{

+  */

+/* Exported functions --------------------------------------------------------*/

+/* Initialization and de-initialization functions  ****************************/

+HAL_StatusTypeDef HAL_CRCEx_Polynomial_Set(CRC_HandleTypeDef *hcrc, uint32_t Pol, uint32_t PolyLength);

+HAL_StatusTypeDef HAL_CRCEx_Input_Data_Reverse(CRC_HandleTypeDef *hcrc, uint32_t InputReverseMode);

+HAL_StatusTypeDef HAL_CRCEx_Output_Data_Reverse(CRC_HandleTypeDef *hcrc, uint32_t OutputReverseMode);

+

+/* Peripheral Control functions ***********************************************/

+/* Peripheral State and Error functions ***************************************/

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_CRC_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_cryp.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_cryp.h
new file mode 100644
index 0000000..5935cee
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_cryp.h
@@ -0,0 +1,536 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_cryp.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of CRYP HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_CRYP_H

+#define __STM32F7xx_HAL_CRYP_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+#if defined(STM32F756xx)

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup CRYP

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+

+/** @defgroup CRYP_Exported_Types CRYP Exported Types

+  * @{

+  */

+

+/** @defgroup CRYP_Exported_Types_Group1 CRYP Configuration Structure definition

+  * @{

+  */

+

+typedef struct

+{

+  uint32_t DataType;    /*!< 32-bit data, 16-bit data, 8-bit data or 1-bit string.

+                             This parameter can be a value of @ref CRYP CRYP_Data_Type */

+

+  uint32_t KeySize;     /*!< Used only in AES mode only : 128, 192 or 256 bit key length. 

+                             This parameter can be a value of @ref CRYP CRYP_Key_Size */

+

+  uint8_t* pKey;        /*!< The key used for encryption/decryption */

+

+  uint8_t* pInitVect;   /*!< The initialization vector used also as initialization

+                             counter in CTR mode */

+

+  uint8_t IVSize;       /*!< The size of initialization vector. 

+                             This parameter (called nonce size in CCM) is used only 

+                             in AES-128/192/256 encryption/decryption CCM mode */

+

+  uint8_t TagSize;      /*!< The size of returned authentication TAG. 

+                             This parameter is used only in AES-128/192/256 

+                             encryption/decryption CCM mode */

+

+  uint8_t* Header;      /*!< The header used in GCM and CCM modes */

+

+  uint32_t HeaderSize;  /*!< The size of header buffer in bytes */

+

+  uint8_t* pScratch;    /*!< Scratch buffer used to append the header. It's size must be equal to header size + 21 bytes.

+                             This parameter is used only in AES-128/192/256 encryption/decryption CCM mode */

+}CRYP_InitTypeDef;

+

+/** 

+  * @}

+  */

+

+/** @defgroup CRYP_Exported_Types_Group2 CRYP State structures definition

+  * @{

+  */

+    

+

+typedef enum

+{

+  HAL_CRYP_STATE_RESET             = 0x00,  /*!< CRYP not yet initialized or disabled  */

+  HAL_CRYP_STATE_READY             = 0x01,  /*!< CRYP initialized and ready for use    */

+  HAL_CRYP_STATE_BUSY              = 0x02,  /*!< CRYP internal processing is ongoing   */

+  HAL_CRYP_STATE_TIMEOUT           = 0x03,  /*!< CRYP timeout state                    */

+  HAL_CRYP_STATE_ERROR             = 0x04   /*!< CRYP error state                      */

+}HAL_CRYP_STATETypeDef;

+

+/** 

+  * @}

+  */

+  

+/** @defgroup CRYP_Exported_Types_Group3 CRYP phase structures definition

+  * @{

+  */

+    

+

+typedef enum

+{

+  HAL_CRYP_PHASE_READY             = 0x01,    /*!< CRYP peripheral is ready for initialization. */

+  HAL_CRYP_PHASE_PROCESS           = 0x02,    /*!< CRYP peripheral is in processing phase */

+  HAL_CRYP_PHASE_FINAL             = 0x03     /*!< CRYP peripheral is in final phase

+                                                   This is relevant only with CCM and GCM modes */

+}HAL_PhaseTypeDef;

+

+/** 

+  * @}

+  */

+  

+/** @defgroup CRYP_Exported_Types_Group4 CRYP handle Structure definition

+  * @{

+  */

+  

+typedef struct

+{

+      CRYP_TypeDef             *Instance;        /*!< CRYP registers base address */

+

+      CRYP_InitTypeDef         Init;             /*!< CRYP required parameters */

+

+      uint8_t                  *pCrypInBuffPtr;  /*!< Pointer to CRYP processing (encryption, decryption,...) buffer */

+

+      uint8_t                  *pCrypOutBuffPtr; /*!< Pointer to CRYP processing (encryption, decryption,...) buffer */

+

+      __IO uint16_t            CrypInCount;      /*!< Counter of inputed data */

+

+      __IO uint16_t            CrypOutCount;     /*!< Counter of output data */

+

+      HAL_StatusTypeDef        Status;           /*!< CRYP peripheral status */

+

+      HAL_PhaseTypeDef         Phase;            /*!< CRYP peripheral phase */

+

+      DMA_HandleTypeDef        *hdmain;          /*!< CRYP In DMA handle parameters */

+

+      DMA_HandleTypeDef        *hdmaout;         /*!< CRYP Out DMA handle parameters */

+

+      HAL_LockTypeDef          Lock;             /*!< CRYP locking object */

+

+   __IO  HAL_CRYP_STATETypeDef State;            /*!< CRYP peripheral state */

+}CRYP_HandleTypeDef;

+

+/** 

+  * @}

+  */

+

+/** 

+  * @}

+  */

+    

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup CRYP_Exported_Constants CRYP Exported Constants

+  * @{

+  */

+

+/** @defgroup CRYP_Exported_Constants_Group1 CRYP CRYP_Key_Size

+  * @{

+  */

+#define CRYP_KEYSIZE_128B         ((uint32_t)0x00000000)

+#define CRYP_KEYSIZE_192B         CRYP_CR_KEYSIZE_0

+#define CRYP_KEYSIZE_256B         CRYP_CR_KEYSIZE_1

+/**                                

+  * @}

+  */

+

+/** @defgroup CRYP_Exported_Constants_Group2 CRYP CRYP_Data_Type

+  * @{

+  */

+#define CRYP_DATATYPE_32B         ((uint32_t)0x00000000)

+#define CRYP_DATATYPE_16B         CRYP_CR_DATATYPE_0

+#define CRYP_DATATYPE_8B          CRYP_CR_DATATYPE_1

+#define CRYP_DATATYPE_1B          CRYP_CR_DATATYPE

+/**                                

+  * @}

+  */

+

+/** @defgroup CRYP_Exported_Constants_Group3 CRYP CRYP_AlgoModeDirection

+  * @{

+  */

+#define CRYP_CR_ALGOMODE_DIRECTION         ((uint32_t)0x0008003C)

+#define CRYP_CR_ALGOMODE_TDES_ECB_ENCRYPT  ((uint32_t)0x00000000)

+#define CRYP_CR_ALGOMODE_TDES_ECB_DECRYPT  ((uint32_t)0x00000004)

+#define CRYP_CR_ALGOMODE_TDES_CBC_ENCRYPT  ((uint32_t)0x00000008)

+#define CRYP_CR_ALGOMODE_TDES_CBC_DECRYPT  ((uint32_t)0x0000000C)

+#define CRYP_CR_ALGOMODE_DES_ECB_ENCRYPT   ((uint32_t)0x00000010)

+#define CRYP_CR_ALGOMODE_DES_ECB_DECRYPT   ((uint32_t)0x00000014)

+#define CRYP_CR_ALGOMODE_DES_CBC_ENCRYPT   ((uint32_t)0x00000018)

+#define CRYP_CR_ALGOMODE_DES_CBC_DECRYPT   ((uint32_t)0x0000001C)

+#define CRYP_CR_ALGOMODE_AES_ECB_ENCRYPT   ((uint32_t)0x00000020)

+#define CRYP_CR_ALGOMODE_AES_ECB_DECRYPT   ((uint32_t)0x00000024)

+#define CRYP_CR_ALGOMODE_AES_CBC_ENCRYPT   ((uint32_t)0x00000028)

+#define CRYP_CR_ALGOMODE_AES_CBC_DECRYPT   ((uint32_t)0x0000002C)

+#define CRYP_CR_ALGOMODE_AES_CTR_ENCRYPT   ((uint32_t)0x00000030)

+#define CRYP_CR_ALGOMODE_AES_CTR_DECRYPT   ((uint32_t)0x00000034)

+/**

+  * @}

+  */

+  

+/** @defgroup CRYP_Exported_Constants_Group4 CRYP CRYP_Interrupt

+  * @{

+  */

+#define CRYP_IT_INI               ((uint32_t)CRYP_IMSCR_INIM)   /*!< Input FIFO Interrupt */

+#define CRYP_IT_OUTI              ((uint32_t)CRYP_IMSCR_OUTIM)  /*!< Output FIFO Interrupt */

+/**

+  * @}

+  */

+

+/** @defgroup CRYP_Exported_Constants_Group5 CRYP CRYP_Flags

+  * @{

+  */

+#define CRYP_FLAG_BUSY   ((uint32_t)0x00000010)  /*!< The CRYP core is currently 

+                                                     processing a block of data 

+                                                     or a key preparation (for 

+                                                     AES decryption). */

+#define CRYP_FLAG_IFEM   ((uint32_t)0x00000001)  /*!< Input FIFO is empty */

+#define CRYP_FLAG_IFNF   ((uint32_t)0x00000002)  /*!< Input FIFO is not Full */

+#define CRYP_FLAG_OFNE   ((uint32_t)0x00000004)  /*!< Output FIFO is not empty */

+#define CRYP_FLAG_OFFU   ((uint32_t)0x00000008)  /*!< Output FIFO is Full */

+#define CRYP_FLAG_OUTRIS ((uint32_t)0x01000002)  /*!< Output FIFO service raw 

+                                                      interrupt status */

+#define CRYP_FLAG_INRIS  ((uint32_t)0x01000001)  /*!< Input FIFO service raw 

+                                                      interrupt status */

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup CRYP_Exported_Macros CRYP Exported Macros

+  * @{

+  */

+  

+/** @brief Reset CRYP handle state

+  * @param  __HANDLE__: specifies the CRYP handle.

+  * @retval None

+  */

+#define __HAL_CRYP_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CRYP_STATE_RESET)

+

+/**

+  * @brief  Enable/Disable the CRYP peripheral.

+  * @param  __HANDLE__: specifies the CRYP handle.

+  * @retval None

+  */

+#define __HAL_CRYP_ENABLE(__HANDLE__)  ((__HANDLE__)->Instance->CR |=  CRYP_CR_CRYPEN)

+#define __HAL_CRYP_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &=  ~CRYP_CR_CRYPEN)

+

+/**

+  * @brief  Flush the data FIFO.

+  * @param  __HANDLE__: specifies the CRYP handle.

+  * @retval None

+  */

+#define __HAL_CRYP_FIFO_FLUSH(__HANDLE__) ((__HANDLE__)->Instance->CR |=  CRYP_CR_FFLUSH)

+

+/**

+  * @brief  Set the algorithm mode: AES-ECB, AES-CBC, AES-CTR, DES-ECB, DES-CBC.

+  * @param  __HANDLE__: specifies the CRYP handle.

+  * @param  MODE: The algorithm mode.

+  * @retval None

+  */

+#define __HAL_CRYP_SET_MODE(__HANDLE__, MODE)  ((__HANDLE__)->Instance->CR |= (uint32_t)(MODE))

+

+/** @brief  Check whether the specified CRYP flag is set or not.

+  * @param  __HANDLE__: specifies the CRYP handle.

+  * @param  __FLAG__: specifies the flag to check.

+  *         This parameter can be one of the following values:

+  *            @arg CRYP_FLAG_BUSY: The CRYP core is currently processing a block of data 

+  *                                 or a key preparation (for AES decryption). 

+  *            @arg CRYP_FLAG_IFEM: Input FIFO is empty

+  *            @arg CRYP_FLAG_IFNF: Input FIFO is not full

+  *            @arg CRYP_FLAG_INRIS: Input FIFO service raw interrupt is pending

+  *            @arg CRYP_FLAG_OFNE: Output FIFO is not empty

+  *            @arg CRYP_FLAG_OFFU: Output FIFO is full

+  *            @arg CRYP_FLAG_OUTRIS: Input FIFO service raw interrupt is pending

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+

+#define __HAL_CRYP_GET_FLAG(__HANDLE__, __FLAG__) ((((uint8_t)((__FLAG__) >> 24)) == 0x01)?((((__HANDLE__)->Instance->RISR) & ((__FLAG__) & CRYP_FLAG_MASK)) == ((__FLAG__) & CRYP_FLAG_MASK)): \

+                                                 ((((__HANDLE__)->Instance->RISR) & ((__FLAG__) & CRYP_FLAG_MASK)) == ((__FLAG__) & CRYP_FLAG_MASK)))

+

+/** @brief  Check whether the specified CRYP interrupt is set or not.

+  * @param  __HANDLE__: specifies the CRYP handle.

+  * @param  __INTERRUPT__: specifies the interrupt to check.

+  *         This parameter can be one of the following values:

+  *            @arg CRYP_IT_INRIS: Input FIFO service raw interrupt is pending

+  *            @arg CRYP_IT_OUTRIS: Output FIFO service raw interrupt is pending

+  * @retval The new state of __INTERRUPT__ (TRUE or FALSE).

+  */

+#define __HAL_CRYP_GET_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->MISR & (__INTERRUPT__)) == (__INTERRUPT__))

+

+/**

+  * @brief  Enable the CRYP interrupt.

+  * @param  __HANDLE__: specifies the CRYP handle.

+  * @param  __INTERRUPT__: CRYP Interrupt.

+  * @retval None

+  */

+#define __HAL_CRYP_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->IMSCR) |= (__INTERRUPT__))

+

+/**

+  * @brief  Disable the CRYP interrupt.

+  * @param  __HANDLE__: specifies the CRYP handle.

+  * @param  __INTERRUPT__: CRYP interrupt.

+  * @retval None

+  */

+#define __HAL_CRYP_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->IMSCR) &= ~(__INTERRUPT__))

+

+/**

+  * @}

+  */ 

+  

+/* Include CRYP HAL Extension module */

+#include "stm32f7xx_hal_cryp_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+/** @defgroup CRYP_Exported_Functions CRYP Exported Functions

+  * @{

+  */

+

+/** @addtogroup CRYP_Exported_Functions_Group1

+  * @{

+  */    

+HAL_StatusTypeDef HAL_CRYP_Init(CRYP_HandleTypeDef *hcryp);

+HAL_StatusTypeDef HAL_CRYP_DeInit(CRYP_HandleTypeDef *hcryp);

+void HAL_CRYP_MspInit(CRYP_HandleTypeDef *hcryp);

+void HAL_CRYP_MspDeInit(CRYP_HandleTypeDef *hcryp);

+/**

+  * @}

+  */ 

+

+/** @addtogroup CRYP_Exported_Functions_Group2

+  * @{

+  */  

+/* AES encryption/decryption using polling  ***********************************/

+HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout);

+

+/* AES encryption/decryption using interrupt  *********************************/

+HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+

+/* AES encryption/decryption using DMA  ***************************************/

+HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+/**

+  * @}

+  */ 

+

+/** @addtogroup CRYP_Exported_Functions_Group3

+  * @{

+  */  

+/* DES encryption/decryption using polling  ***********************************/

+HAL_StatusTypeDef HAL_CRYP_DESECB_Encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYP_DESCBC_Encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYP_DESECB_Decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYP_DESCBC_Decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);

+

+/* DES encryption/decryption using interrupt  *********************************/

+HAL_StatusTypeDef HAL_CRYP_DESECB_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_DESECB_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+HAL_StatusTypeDef HAL_CRYP_DESCBC_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_DESCBC_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+

+/* DES encryption/decryption using DMA  ***************************************/

+HAL_StatusTypeDef HAL_CRYP_DESECB_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_DESECB_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+HAL_StatusTypeDef HAL_CRYP_DESCBC_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_DESCBC_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+/**

+  * @}

+  */ 

+

+/** @addtogroup CRYP_Exported_Functions_Group4

+  * @{

+  */  

+/* TDES encryption/decryption using polling  **********************************/

+HAL_StatusTypeDef HAL_CRYP_TDESECB_Encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYP_TDESCBC_Encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYP_TDESECB_Decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYP_TDESCBC_Decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout);

+

+/* TDES encryption/decryption using interrupt  ********************************/

+HAL_StatusTypeDef HAL_CRYP_TDESECB_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_TDESECB_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+HAL_StatusTypeDef HAL_CRYP_TDESCBC_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_TDESCBC_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+

+/* TDES encryption/decryption using DMA  **************************************/

+HAL_StatusTypeDef HAL_CRYP_TDESECB_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_TDESECB_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+HAL_StatusTypeDef HAL_CRYP_TDESCBC_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYP_TDESCBC_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+/**

+  * @}

+  */ 

+

+/** @addtogroup CRYP_Exported_Functions_Group5

+  * @{

+  */  

+void HAL_CRYP_InCpltCallback(CRYP_HandleTypeDef *hcryp);

+void HAL_CRYP_OutCpltCallback(CRYP_HandleTypeDef *hcryp);

+void HAL_CRYP_ErrorCallback(CRYP_HandleTypeDef *hcryp);

+/**

+  * @}

+  */ 

+

+/** @addtogroup CRYP_Exported_Functions_Group6

+  * @{

+  */  

+void HAL_CRYP_IRQHandler(CRYP_HandleTypeDef *hcryp);

+/**

+  * @}

+  */ 

+

+/** @addtogroup CRYP_Exported_Functions_Group7

+  * @{

+  */  

+HAL_CRYP_STATETypeDef HAL_CRYP_GetState(CRYP_HandleTypeDef *hcryp);

+/**

+  * @}

+  */ 

+  

+/**

+  * @}

+  */

+

+/* Private types -------------------------------------------------------------*/

+/** @defgroup CRYP_Private_Types CRYP Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup CRYP_Private_Variables CRYP Private Variables

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup CRYP_Private_Constants CRYP Private Constants

+  * @{

+  */

+#define CRYP_FLAG_MASK  ((uint32_t)0x0000001F)

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup CRYP_Private_Macros CRYP Private Macros

+  * @{

+  */

+

+#define IS_CRYP_KEYSIZE(__KEYSIZE__)  (((__KEYSIZE__) == CRYP_KEYSIZE_128B)  || \

+                                       ((__KEYSIZE__) == CRYP_KEYSIZE_192B)  || \

+                                       ((__KEYSIZE__) == CRYP_KEYSIZE_256B))

+

+

+#define IS_CRYP_DATATYPE(__DATATYPE__) (((__DATATYPE__) == CRYP_DATATYPE_32B) || \

+                                        ((__DATATYPE__) == CRYP_DATATYPE_16B) || \

+                                        ((__DATATYPE__) == CRYP_DATATYPE_8B)  || \

+                                        ((__DATATYPE__) == CRYP_DATATYPE_1B))  

+

+

+ /**

+  * @}

+  */ 

+  

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup CRYP_Private_Functions CRYP Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+     

+/**

+  * @}

+  */ 

+

+#endif /* STM32F756xx */

+

+/**

+  * @}

+  */ 

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_CRYP_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_cryp_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_cryp_ex.h
new file mode 100644
index 0000000..fb7c261
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_cryp_ex.h
@@ -0,0 +1,221 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_cryp_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of CRYP HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_CRYP_EX_H

+#define __STM32F7xx_HAL_CRYP_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+#if defined(STM32F756xx)

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup CRYPEx

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/ 

+/* Exported constants --------------------------------------------------------*/

+   

+/** @defgroup CRYPEx_Exported_Constants   CRYPEx Exported Constants

+  * @{

+  */

+

+/** @defgroup CRYPEx_Exported_Constants_Group1 CRYP AlgoModeDirection

+  * @{

+  */ 

+#define CRYP_CR_ALGOMODE_AES_GCM_ENCRYPT   ((uint32_t)0x00080000)

+#define CRYP_CR_ALGOMODE_AES_GCM_DECRYPT   ((uint32_t)0x00080004)

+#define CRYP_CR_ALGOMODE_AES_CCM_ENCRYPT   ((uint32_t)0x00080008)

+#define CRYP_CR_ALGOMODE_AES_CCM_DECRYPT   ((uint32_t)0x0008000C)

+/**

+  * @}

+  */

+

+/** @defgroup CRYPEx_Exported_Constants_Group3 CRYP PhaseConfig

+  * @brief    The phases are relevant only to AES-GCM and AES-CCM

+  * @{

+  */ 

+#define CRYP_PHASE_INIT           ((uint32_t)0x00000000)

+#define CRYP_PHASE_HEADER         CRYP_CR_GCM_CCMPH_0

+#define CRYP_PHASE_PAYLOAD        CRYP_CR_GCM_CCMPH_1

+#define CRYP_PHASE_FINAL          CRYP_CR_GCM_CCMPH

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup CRYPEx_Exported_Macros CRYP Exported Macros

+  * @{

+  */

+  

+/**

+  * @brief  Set the phase: Init, header, payload, final. 

+  *         This is relevant only for GCM and CCM modes.

+  * @param  __HANDLE__: specifies the CRYP handle.

+  * @param  __PHASE__: The phase.

+  * @retval None

+  */

+#define __HAL_CRYP_SET_PHASE(__HANDLE__, __PHASE__)  do{(__HANDLE__)->Instance->CR &= (uint32_t)(~CRYP_CR_GCM_CCMPH);\

+                                                        (__HANDLE__)->Instance->CR |= (uint32_t)(__PHASE__);\

+                                                       }while(0)

+

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @defgroup CRYPEx_Exported_Functions CRYPEx Exported Functions

+  * @{

+  */

+

+/** @addtogroup CRYPEx_Exported_Functions_Group1

+  * @{

+  */  

+    

+/* AES encryption/decryption using polling  ***********************************/

+HAL_StatusTypeDef HAL_CRYPEx_AESGCM_Encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYPEx_AESGCM_Decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYPEx_AESGCM_Finish(CRYP_HandleTypeDef *hcryp, uint32_t Size, uint8_t *AuthTag, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYPEx_AESCCM_Encrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYPEx_AESCCM_Decrypt(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout);

+HAL_StatusTypeDef HAL_CRYPEx_AESCCM_Finish(CRYP_HandleTypeDef *hcryp, uint8_t *AuthTag, uint32_t Timeout);

+

+/* AES encryption/decryption using interrupt  *********************************/

+HAL_StatusTypeDef HAL_CRYPEx_AESGCM_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYPEx_AESGCM_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+HAL_StatusTypeDef HAL_CRYPEx_AESCCM_Encrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYPEx_AESCCM_Decrypt_IT(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+

+/* AES encryption/decryption using DMA  ***************************************/

+HAL_StatusTypeDef HAL_CRYPEx_AESGCM_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYPEx_AESGCM_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+HAL_StatusTypeDef HAL_CRYPEx_AESCCM_Encrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData);

+HAL_StatusTypeDef HAL_CRYPEx_AESCCM_Decrypt_DMA(CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData);

+

+/**

+  * @}

+  */ 

+  

+/** @addtogroup CRYPEx_Exported_Functions_Group2

+  * @{

+  */  

+    

+void HAL_CRYPEx_GCMCCM_IRQHandler(CRYP_HandleTypeDef *hcryp);

+

+/**

+  * @}

+  */ 

+ 

+ /**

+  * @}

+  */ 

+ 

+

+ /* Private types -------------------------------------------------------------*/

+/** @defgroup CRYPEx_Private_Types CRYPEx Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup CRYPEx_Private_Variables CRYPEx Private Variables

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup CRYPEx_Private_Constants CRYPEx Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup CRYPEx_Private_Macros CRYPEx Private Macros

+  * @{

+  */

+

+ /**

+  * @}

+  */ 

+  

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup CRYPEx_Private_Functions CRYPEx Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+   

+/**

+  * @}

+  */ 

+

+#endif /* STM32F756xx */

+

+/**

+  * @}

+  */ 

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_CRYP_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dac.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dac.h
new file mode 100644
index 0000000..106abc1
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dac.h
@@ -0,0 +1,408 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_dac.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of DAC HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_DAC_H

+#define __STM32F7xx_HAL_DAC_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup DAC

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup DAC_Exported_Types DAC Exported Types

+  * @{

+  */

+

+/** 

+  * @brief HAL State structures definition

+  */

+typedef enum

+{

+  HAL_DAC_STATE_RESET             = 0x00,  /*!< DAC not yet initialized or disabled  */

+  HAL_DAC_STATE_READY             = 0x01,  /*!< DAC initialized and ready for use    */

+  HAL_DAC_STATE_BUSY              = 0x02,  /*!< DAC internal processing is ongoing   */

+  HAL_DAC_STATE_TIMEOUT           = 0x03,  /*!< DAC timeout state                    */

+  HAL_DAC_STATE_ERROR             = 0x04   /*!< DAC error state                      */

+}HAL_DAC_StateTypeDef;

+ 

+/** 

+  * @brief DAC handle Structure definition

+  */

+typedef struct

+{

+  DAC_TypeDef                 *Instance;     /*!< Register base address             */

+

+  __IO HAL_DAC_StateTypeDef   State;         /*!< DAC communication state           */

+

+  HAL_LockTypeDef             Lock;          /*!< DAC locking object                */

+

+  DMA_HandleTypeDef           *DMA_Handle1;  /*!< Pointer DMA handler for channel 1 */

+

+  DMA_HandleTypeDef           *DMA_Handle2;  /*!< Pointer DMA handler for channel 2 */

+

+  __IO uint32_t               ErrorCode;     /*!< DAC Error code                    */

+

+}DAC_HandleTypeDef;

+

+/** 

+  * @brief DAC Configuration regular Channel structure definition

+  */

+typedef struct

+{

+  uint32_t DAC_Trigger;       /*!< Specifies the external trigger for the selected DAC channel.

+                                   This parameter can be a value of @ref DAC_trigger_selection */

+

+  uint32_t DAC_OutputBuffer;  /*!< Specifies whether the DAC channel output buffer is enabled or disabled.

+                                   This parameter can be a value of @ref DAC_output_buffer */

+}DAC_ChannelConfTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup DAC_Exported_Constants DAC Exported Constants

+  * @{

+  */

+

+/** @defgroup DAC_Error_Code DAC Error Code

+  * @{

+  */

+#define  HAL_DAC_ERROR_NONE              0x00    /*!< No error                          */

+#define  HAL_DAC_ERROR_DMAUNDERRUNCH1    0x01    /*!< DAC channel1 DAM underrun error   */

+#define  HAL_DAC_ERROR_DMAUNDERRUNCH2    0x02    /*!< DAC channel2 DAM underrun error   */

+#define  HAL_DAC_ERROR_DMA               0x04    /*!< DMA error                         */

+/**

+  * @}

+  */

+

+/** @defgroup DAC_trigger_selection DAC Trigger Selection

+  * @{

+  */

+

+#define DAC_TRIGGER_NONE                   ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC1_DHRxxxx register 

+                                                                       has been loaded, and not by external trigger */

+#define DAC_TRIGGER_T2_TRGO                ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */

+#define DAC_TRIGGER_T4_TRGO                ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM4 TRGO selected as external conversion trigger for DAC channel */

+#define DAC_TRIGGER_T5_TRGO                ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM5 TRGO selected as external conversion trigger for DAC channel */

+#define DAC_TRIGGER_T6_TRGO                ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */

+#define DAC_TRIGGER_T7_TRGO                ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TEN1)) /*!< TIM7 TRGO selected as external conversion trigger for DAC channel */

+#define DAC_TRIGGER_T8_TRGO                ((uint32_t)(DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM8 TRGO selected as external conversion trigger for DAC channel */                                                                       

+

+#define DAC_TRIGGER_EXT_IT9                ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TSEL1_1 | DAC_CR_TEN1)) /*!< EXTI Line9 event selected as external conversion trigger for DAC channel */

+#define DAC_TRIGGER_SOFTWARE               ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */

+/**

+  * @}

+  */

+

+/** @defgroup DAC_output_buffer  DAC Output Buffer

+  * @{

+  */

+#define DAC_OUTPUTBUFFER_ENABLE            ((uint32_t)0x00000000)

+#define DAC_OUTPUTBUFFER_DISABLE           ((uint32_t)DAC_CR_BOFF1)

+/**

+  * @}

+  */

+

+/** @defgroup DAC_Channel_selection DAC Channel Selection

+  * @{

+  */

+#define DAC_CHANNEL_1                      ((uint32_t)0x00000000)

+#define DAC_CHANNEL_2                      ((uint32_t)0x00000010)

+/**

+  * @}

+  */

+

+/** @defgroup DAC_data_alignment DAC Data Alignment

+  * @{

+  */

+#define DAC_ALIGN_12B_R                    ((uint32_t)0x00000000)

+#define DAC_ALIGN_12B_L                    ((uint32_t)0x00000004)

+#define DAC_ALIGN_8B_R                     ((uint32_t)0x00000008)

+/**

+  * @}

+  */

+

+/** @defgroup DAC_flags_definition DAC Flags Definition

+  * @{

+  */ 

+#define DAC_FLAG_DMAUDR1                   ((uint32_t)DAC_SR_DMAUDR1)

+#define DAC_FLAG_DMAUDR2                   ((uint32_t)DAC_SR_DMAUDR2)

+/**

+  * @}

+  */

+

+/** @defgroup DAC_IT_definition DAC IT Definition

+  * @{

+  */ 

+#define DAC_IT_DMAUDR1                   ((uint32_t)DAC_SR_DMAUDR1)

+#define DAC_IT_DMAUDR2                   ((uint32_t)DAC_SR_DMAUDR2)

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup DAC_Exported_Macros DAC Exported Macros

+  * @{

+  */

+

+/** @brief Reset DAC handle state

+  * @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

+  * @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.

+  * @retval None

+  */

+#define __HAL_DAC_DISABLE(__HANDLE__, __DAC_CHANNEL__) \

+((__HANDLE__)->Instance->CR &=  ~(DAC_CR_EN1 << (__DAC_CHANNEL__)))

+

+

+/** @brief Enable the DAC interrupt

+  * @param  __HANDLE__: specifies the DAC handle

+  * @param  __INTERRUPT__: specifies the DAC interrupt.

+  * @retval None

+  */

+#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.

+  * @retval None

+  */

+#define __HAL_DAC_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR) &= ~(__INTERRUPT__))

+

+/** @brief  Checks if the specified DAC interrupt source is enabled or disabled.

+  * @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

+  * @retval State of interruption (SET or RESET)

+  */

+#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 flag to clear.

+  *         This parameter can be any combination of the following values:

+  *            @arg DAC_FLAG_DMAUDR1: DMA underrun 1 flag

+  *            @arg DAC_FLAG_DMAUDR2: DMA underrun 2 flag

+  * @retval None

+  */

+#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 flag to clear.

+  *         This parameter can be any combination of the following values:

+  *            @arg DAC_FLAG_DMAUDR1: DMA underrun 1 flag

+  *            @arg DAC_FLAG_DMAUDR2: DMA underrun 2 flag

+  * @retval None

+  */

+#define __HAL_DAC_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR) = (__FLAG__))

+/**

+  * @}

+  */

+

+/* Include DAC HAL Extension module */

+#include "stm32f7xx_hal_dac_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup DAC_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup DAC_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization/de-initialization functions *********************************/

+HAL_StatusTypeDef HAL_DAC_Init(DAC_HandleTypeDef* hdac);

+HAL_StatusTypeDef HAL_DAC_DeInit(DAC_HandleTypeDef* hdac);

+void HAL_DAC_MspInit(DAC_HandleTypeDef* hdac);

+void HAL_DAC_MspDeInit(DAC_HandleTypeDef* hdac);

+/**

+  * @}

+  */

+

+/** @addtogroup DAC_Exported_Functions_Group2

+  * @{

+  */

+/* I/O operation functions ****************************************************/

+HAL_StatusTypeDef HAL_DAC_Start(DAC_HandleTypeDef* hdac, uint32_t Channel);

+HAL_StatusTypeDef HAL_DAC_Stop(DAC_HandleTypeDef* hdac, uint32_t Channel);

+HAL_StatusTypeDef HAL_DAC_Start_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t* pData, uint32_t Length, uint32_t Alignment);

+HAL_StatusTypeDef HAL_DAC_Stop_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel);

+uint32_t HAL_DAC_GetValue(DAC_HandleTypeDef* hdac, uint32_t Channel);

+/**

+  * @}

+  */

+

+/** @addtogroup DAC_Exported_Functions_Group3

+  * @{

+  */

+/* Peripheral Control functions ***********************************************/

+HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef* hdac, DAC_ChannelConfTypeDef* sConfig, uint32_t Channel);

+HAL_StatusTypeDef HAL_DAC_SetValue(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t Alignment, uint32_t Data);

+/**

+  * @}

+  */

+

+/** @addtogroup DAC_Exported_Functions_Group4

+  * @{

+  */

+/* Peripheral State functions *************************************************/

+HAL_DAC_StateTypeDef HAL_DAC_GetState(DAC_HandleTypeDef* hdac);

+void HAL_DAC_IRQHandler(DAC_HandleTypeDef* hdac);

+uint32_t HAL_DAC_GetError(DAC_HandleTypeDef *hdac);

+

+void HAL_DAC_ConvCpltCallbackCh1(DAC_HandleTypeDef* hdac);

+void HAL_DAC_ConvHalfCpltCallbackCh1(DAC_HandleTypeDef* hdac);

+void HAL_DAC_ErrorCallbackCh1(DAC_HandleTypeDef *hdac);

+void HAL_DAC_DMAUnderrunCallbackCh1(DAC_HandleTypeDef *hdac);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup DAC_Private_Constants DAC Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup DAC_Private_Macros DAC Private Macros

+  * @{

+  */

+#define IS_DAC_DATA(DATA) ((DATA) <= 0xFFF0)

+#define IS_DAC_ALIGN(ALIGN) (((ALIGN) == DAC_ALIGN_12B_R) || \

+                             ((ALIGN) == DAC_ALIGN_12B_L) || \

+                             ((ALIGN) == DAC_ALIGN_8B_R))

+#define IS_DAC_CHANNEL(CHANNEL) (((CHANNEL) == DAC_CHANNEL_1) || \

+                                 ((CHANNEL) == DAC_CHANNEL_2))

+#define IS_DAC_OUTPUT_BUFFER_STATE(STATE) (((STATE) == DAC_OUTPUTBUFFER_ENABLE) || \

+                                           ((STATE) == DAC_OUTPUTBUFFER_DISABLE))

+

+#define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \

+                                 ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \

+                                 ((TRIGGER) == DAC_TRIGGER_T8_TRGO) || \

+                                 ((TRIGGER) == DAC_TRIGGER_T7_TRGO) || \

+                                 ((TRIGGER) == DAC_TRIGGER_T5_TRGO) || \

+                                 ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \

+                                 ((TRIGGER) == DAC_TRIGGER_T4_TRGO) || \

+                                 ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \

+                                 ((TRIGGER) == DAC_TRIGGER_SOFTWARE))

+

+/** @brief Set DHR12R1 alignment

+  * @param  __ALIGNMENT__: specifies the DAC alignment

+  * @retval None

+  */

+#define DAC_DHR12R1_ALIGNMENT(__ALIGNMENT__) (((uint32_t)0x00000008) + (__ALIGNMENT__))

+

+/** @brief  Set DHR12R2 alignment

+  * @param  __ALIGNMENT__: specifies the DAC alignment

+  * @retval None

+  */

+#define DAC_DHR12R2_ALIGNMENT(__ALIGNMENT__) (((uint32_t)0x00000014) + (__ALIGNMENT__))

+

+/** @brief  Set DHR12RD alignment

+  * @param  __ALIGNMENT__: specifies the DAC alignment

+  * @retval None

+  */

+#define DAC_DHR12RD_ALIGNMENT(__ALIGNMENT__) (((uint32_t)0x00000020) + (__ALIGNMENT__))

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup DAC_Private_Functions DAC Private Functions

+  * @{

+  */

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /*__STM32F7xx_HAL_DAC_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dac_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dac_ex.h
new file mode 100644
index 0000000..e492a64
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dac_ex.h
@@ -0,0 +1,191 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_dac.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of DAC HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_DAC_EX_H

+#define __STM32F7xx_HAL_DAC_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup DACEx

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup DACEx_Exported_Constants DAC Exported Constants

+  * @{

+  */

+   

+/** @defgroup DACEx_lfsrunmask_triangleamplitude DAC LFS Run Mask Triangle Amplitude

+  * @{

+  */

+#define DAC_LFSRUNMASK_BIT0                ((uint32_t)0x00000000) /*!< Unmask DAC channel LFSR bit0 for noise wave generation */

+#define DAC_LFSRUNMASK_BITS1_0             ((uint32_t)DAC_CR_MAMP1_0) /*!< Unmask DAC channel LFSR bit[1:0] for noise wave generation */

+#define DAC_LFSRUNMASK_BITS2_0             ((uint32_t)DAC_CR_MAMP1_1) /*!< Unmask DAC channel LFSR bit[2:0] for noise wave generation */

+#define DAC_LFSRUNMASK_BITS3_0             ((uint32_t)DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0)/*!< Unmask DAC channel LFSR bit[3:0] for noise wave generation */

+#define DAC_LFSRUNMASK_BITS4_0             ((uint32_t)DAC_CR_MAMP1_2) /*!< Unmask DAC channel LFSR bit[4:0] for noise wave generation */

+#define DAC_LFSRUNMASK_BITS5_0             ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_0) /*!< Unmask DAC channel LFSR bit[5:0] for noise wave generation */

+#define DAC_LFSRUNMASK_BITS6_0             ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_1) /*!< Unmask DAC channel LFSR bit[6:0] for noise wave generation */

+#define DAC_LFSRUNMASK_BITS7_0             ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Unmask DAC channel LFSR bit[7:0] for noise wave generation */

+#define DAC_LFSRUNMASK_BITS8_0             ((uint32_t)DAC_CR_MAMP1_3) /*!< Unmask DAC channel LFSR bit[8:0] for noise wave generation */

+#define DAC_LFSRUNMASK_BITS9_0             ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_0) /*!< Unmask DAC channel LFSR bit[9:0] for noise wave generation */

+#define DAC_LFSRUNMASK_BITS10_0            ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_1) /*!< Unmask DAC channel LFSR bit[10:0] for noise wave generation */

+#define DAC_LFSRUNMASK_BITS11_0            ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Unmask DAC channel LFSR bit[11:0] for noise wave generation */

+#define DAC_TRIANGLEAMPLITUDE_1            ((uint32_t)0x00000000) /*!< Select max triangle amplitude of 1 */

+#define DAC_TRIANGLEAMPLITUDE_3            ((uint32_t)DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 3 */

+#define DAC_TRIANGLEAMPLITUDE_7            ((uint32_t)DAC_CR_MAMP1_1) /*!< Select max triangle amplitude of 7 */

+#define DAC_TRIANGLEAMPLITUDE_15           ((uint32_t)DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 15 */

+#define DAC_TRIANGLEAMPLITUDE_31           ((uint32_t)DAC_CR_MAMP1_2) /*!< Select max triangle amplitude of 31 */

+#define DAC_TRIANGLEAMPLITUDE_63           ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 63 */

+#define DAC_TRIANGLEAMPLITUDE_127          ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_1) /*!< Select max triangle amplitude of 127 */

+#define DAC_TRIANGLEAMPLITUDE_255          ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 255 */

+#define DAC_TRIANGLEAMPLITUDE_511          ((uint32_t)DAC_CR_MAMP1_3) /*!< Select max triangle amplitude of 511 */

+#define DAC_TRIANGLEAMPLITUDE_1023         ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 1023 */

+#define DAC_TRIANGLEAMPLITUDE_2047         ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_1) /*!< Select max triangle amplitude of 2047 */

+#define DAC_TRIANGLEAMPLITUDE_4095         ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 4095 */

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+/* Exported macro ------------------------------------------------------------*/

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup DACEx_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup DACEx_Exported_Functions_Group1

+  * @{

+  */

+/* Extension features functions ***********************************************/

+uint32_t HAL_DACEx_DualGetValue(DAC_HandleTypeDef* hdac);

+HAL_StatusTypeDef HAL_DACEx_TriangleWaveGenerate(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t Amplitude);

+HAL_StatusTypeDef HAL_DACEx_NoiseWaveGenerate(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t Amplitude);

+HAL_StatusTypeDef HAL_DACEx_DualSetValue(DAC_HandleTypeDef* hdac, uint32_t Alignment, uint32_t Data1, uint32_t Data2);

+

+void HAL_DACEx_ConvCpltCallbackCh2(DAC_HandleTypeDef* hdac);

+void HAL_DACEx_ConvHalfCpltCallbackCh2(DAC_HandleTypeDef* hdac);

+void HAL_DACEx_ErrorCallbackCh2(DAC_HandleTypeDef* hdac);

+void HAL_DACEx_DMAUnderrunCallbackCh2(DAC_HandleTypeDef* hdac);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup DACEx_Private_Constants DAC Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup DACEx_Private_Macros DAC Private Macros

+  * @{

+  */

+#define IS_DAC_LFSR_UNMASK_TRIANGLE_AMPLITUDE(VALUE) (((VALUE) == DAC_LFSRUNMASK_BIT0) || \

+                                                      ((VALUE) == DAC_LFSRUNMASK_BITS1_0) || \

+                                                      ((VALUE) == DAC_LFSRUNMASK_BITS2_0) || \

+                                                      ((VALUE) == DAC_LFSRUNMASK_BITS3_0) || \

+                                                      ((VALUE) == DAC_LFSRUNMASK_BITS4_0) || \

+                                                      ((VALUE) == DAC_LFSRUNMASK_BITS5_0) || \

+                                                      ((VALUE) == DAC_LFSRUNMASK_BITS6_0) || \

+                                                      ((VALUE) == DAC_LFSRUNMASK_BITS7_0) || \

+                                                      ((VALUE) == DAC_LFSRUNMASK_BITS8_0) || \

+                                                      ((VALUE) == DAC_LFSRUNMASK_BITS9_0) || \

+                                                      ((VALUE) == DAC_LFSRUNMASK_BITS10_0) || \

+                                                      ((VALUE) == DAC_LFSRUNMASK_BITS11_0) || \

+                                                      ((VALUE) == DAC_TRIANGLEAMPLITUDE_1) || \

+                                                      ((VALUE) == DAC_TRIANGLEAMPLITUDE_3) || \

+                                                      ((VALUE) == DAC_TRIANGLEAMPLITUDE_7) || \

+                                                      ((VALUE) == DAC_TRIANGLEAMPLITUDE_15) || \

+                                                      ((VALUE) == DAC_TRIANGLEAMPLITUDE_31) || \

+                                                      ((VALUE) == DAC_TRIANGLEAMPLITUDE_63) || \

+                                                      ((VALUE) == DAC_TRIANGLEAMPLITUDE_127) || \

+                                                      ((VALUE) == DAC_TRIANGLEAMPLITUDE_255) || \

+                                                      ((VALUE) == DAC_TRIANGLEAMPLITUDE_511) || \

+                                                      ((VALUE) == DAC_TRIANGLEAMPLITUDE_1023) || \

+                                                      ((VALUE) == DAC_TRIANGLEAMPLITUDE_2047) || \

+                                                      ((VALUE) == DAC_TRIANGLEAMPLITUDE_4095))

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup DACEx_Private_Functions DAC Private Functions

+  * @{

+  */

+void DAC_DMAConvCpltCh2(DMA_HandleTypeDef *hdma);

+void DAC_DMAErrorCh2(DMA_HandleTypeDef *hdma);

+void DAC_DMAHalfConvCpltCh2(DMA_HandleTypeDef *hdma); 

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /*__STM32F7xx_HAL_DAC_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dcmi.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dcmi.h
new file mode 100644
index 0000000..5e76b85
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dcmi.h
@@ -0,0 +1,497 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_dcmi.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of DCMI HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_DCMI_H

+#define __STM32F7xx_HAL_DCMI_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/* Include DCMI HAL Extended module */

+/* (include on top of file since DCMI structures are defined in extended file) */

+#include "stm32f7xx_hal_dcmi_ex.h"

+	 

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup DCMI DCMI

+  * @brief DCMI HAL module driver

+  * @{

+  */  

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup DCMI_Exported_Types DCMI Exported Types

+  * @{

+  */

+/** 

+  * @brief  HAL DCMI State structures definition

+  */ 

+typedef enum

+{

+  HAL_DCMI_STATE_RESET             = 0x00,  /*!< DCMI not yet initialized or disabled  */

+  HAL_DCMI_STATE_READY             = 0x01,  /*!< DCMI initialized and ready for use    */

+  HAL_DCMI_STATE_BUSY              = 0x02,  /*!< DCMI internal processing is ongoing   */

+  HAL_DCMI_STATE_TIMEOUT           = 0x03,  /*!< DCMI timeout state                    */

+  HAL_DCMI_STATE_ERROR             = 0x04   /*!< DCMI error state                      */

+}HAL_DCMI_StateTypeDef;

+

+/** 

+  * @brief  DCMI handle Structure definition

+  */

+typedef struct

+{

+  DCMI_TypeDef                  *Instance;           /*!< DCMI Register base address   */

+

+  DCMI_InitTypeDef              Init;                /*!< DCMI parameters              */

+

+  HAL_LockTypeDef               Lock;                /*!< DCMI locking object          */

+

+  __IO HAL_DCMI_StateTypeDef    State;               /*!< DCMI state                   */

+

+  __IO uint32_t                 XferCount;           /*!< DMA transfer counter         */

+

+  __IO uint32_t                 XferSize;            /*!< DMA transfer size            */

+

+  uint32_t                      XferTransferNumber;  /*!< DMA transfer number          */

+

+  uint32_t                      pBuffPtr;            /*!< Pointer to DMA output buffer */

+

+  DMA_HandleTypeDef             *DMA_Handle;         /*!< Pointer to the DMA handler   */

+

+  __IO uint32_t                 ErrorCode;           /*!< DCMI Error code              */

+

+}DCMI_HandleTypeDef;

+/**

+  * @}

+  */

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup DCMI_Exported_Constants DCMI Exported Constants

+  * @{

+  */

+

+/** @defgroup DCMI_Error_Code DCMI Error Code

+  * @{

+  */

+#define HAL_DCMI_ERROR_NONE      ((uint32_t)0x00000000)    /*!< No error              */

+#define HAL_DCMI_ERROR_OVF       ((uint32_t)0x00000001)    /*!< Overflow error        */

+#define HAL_DCMI_ERROR_SYNC      ((uint32_t)0x00000002)    /*!< Synchronization error */

+#define HAL_DCMI_ERROR_TIMEOUT   ((uint32_t)0x00000020)    /*!< Timeout error         */

+/**

+  * @}

+  */

+

+/** @defgroup DCMI_Capture_Mode DCMI Capture Mode

+  * @{

+  */ 

+#define DCMI_MODE_CONTINUOUS           ((uint32_t)0x00000000)  /*!< The received data are transferred continuously 

+                                                                    into the destination memory through the DMA             */

+#define DCMI_MODE_SNAPSHOT             ((uint32_t)DCMI_CR_CM)  /*!< Once activated, the interface waits for the start of 

+                                                                    frame and then transfers a single frame through the DMA */

+/**

+  * @}

+  */

+

+/** @defgroup DCMI_Synchronization_Mode DCMI Synchronization Mode

+  * @{

+  */ 

+#define DCMI_SYNCHRO_HARDWARE        ((uint32_t)0x00000000)   /*!< Hardware synchronization data capture (frame/line start/stop)

+                                                                   is synchronized with the HSYNC/VSYNC signals                  */

+#define DCMI_SYNCHRO_EMBEDDED        ((uint32_t)DCMI_CR_ESS)  /*!< Embedded synchronization data capture is synchronized with 

+                                                                   synchronization codes embedded in the data flow               */

+

+/**

+  * @}

+  */

+

+/** @defgroup DCMI_PIXCK_Polarity DCMI PIXCK Polarity

+  * @{

+  */

+#define DCMI_PCKPOLARITY_FALLING    ((uint32_t)0x00000000)      /*!< Pixel clock active on Falling edge */

+#define DCMI_PCKPOLARITY_RISING     ((uint32_t)DCMI_CR_PCKPOL)  /*!< Pixel clock active on Rising edge  */

+

+/**

+  * @}

+  */

+

+/** @defgroup DCMI_VSYNC_Polarity DCMI VSYNC Polarity

+  * @{

+  */

+#define DCMI_VSPOLARITY_LOW     ((uint32_t)0x00000000)     /*!< Vertical synchronization active Low  */

+#define DCMI_VSPOLARITY_HIGH    ((uint32_t)DCMI_CR_VSPOL)  /*!< Vertical synchronization active High */

+

+/**

+  * @}

+  */

+

+/** @defgroup DCMI_HSYNC_Polarity DCMI HSYNC Polarity

+  * @{

+  */ 

+#define DCMI_HSPOLARITY_LOW     ((uint32_t)0x00000000)     /*!< Horizontal synchronization active Low  */

+#define DCMI_HSPOLARITY_HIGH    ((uint32_t)DCMI_CR_HSPOL)  /*!< Horizontal synchronization active High */

+

+/**

+  * @}

+  */

+

+/** @defgroup DCMI_MODE_JPEG DCMI MODE JPEG

+  * @{

+  */

+#define DCMI_JPEG_DISABLE   ((uint32_t)0x00000000)    /*!< Mode JPEG Disabled  */

+#define DCMI_JPEG_ENABLE    ((uint32_t)DCMI_CR_JPEG)  /*!< Mode JPEG Enabled   */

+

+/**

+  * @}

+  */

+

+/** @defgroup DCMI_Capture_Rate DCMI Capture Rate

+  * @{

+  */

+#define DCMI_CR_ALL_FRAME            ((uint32_t)0x00000000)      /*!< All frames are captured        */

+#define DCMI_CR_ALTERNATE_2_FRAME    ((uint32_t)DCMI_CR_FCRC_0)  /*!< Every alternate frame captured */

+#define DCMI_CR_ALTERNATE_4_FRAME    ((uint32_t)DCMI_CR_FCRC_1)  /*!< One frame in 4 frames captured */

+

+/**

+  * @}

+  */

+

+/** @defgroup DCMI_Extended_Data_Mode DCMI Extended Data Mode

+  * @{

+  */

+#define DCMI_EXTEND_DATA_8B     ((uint32_t)0x00000000)                       /*!< Interface captures 8-bit data on every pixel clock  */

+#define DCMI_EXTEND_DATA_10B    ((uint32_t)DCMI_CR_EDM_0)                    /*!< Interface captures 10-bit data on every pixel clock */

+#define DCMI_EXTEND_DATA_12B    ((uint32_t)DCMI_CR_EDM_1)                    /*!< Interface captures 12-bit data on every pixel clock */

+#define DCMI_EXTEND_DATA_14B    ((uint32_t)(DCMI_CR_EDM_0 | DCMI_CR_EDM_1))  /*!< Interface captures 14-bit data on every pixel clock */

+

+/**

+  * @}

+  */

+

+/** @defgroup DCMI_Window_Coordinate DCMI Window Coordinate 

+  * @{

+  */

+#define DCMI_WINDOW_COORDINATE    ((uint32_t)0x3FFF)  /*!< Window coordinate */

+

+/**

+  * @}

+  */

+

+/** @defgroup DCMI_Window_Height DCMI Window Height

+  * @{

+  */ 

+#define DCMI_WINDOW_HEIGHT    ((uint32_t)0x1FFF)  /*!< Window Height */

+

+/**

+  * @}

+  */

+

+/** @defgroup DCMI_interrupt_sources  DCMI interrupt sources

+  * @{

+  */

+#define DCMI_IT_FRAME    ((uint32_t)DCMI_IER_FRAME_IE)

+#define DCMI_IT_OVF      ((uint32_t)DCMI_IER_OVF_IE)

+#define DCMI_IT_ERR      ((uint32_t)DCMI_IER_ERR_IE)

+#define DCMI_IT_VSYNC    ((uint32_t)DCMI_IER_VSYNC_IE)

+#define DCMI_IT_LINE     ((uint32_t)DCMI_IER_LINE_IE)

+/**

+  * @}

+  */

+

+/** @defgroup DCMI_Flags DCMI Flags

+  * @{

+  */

+

+/** 

+  * @brief   DCMI SR register

+  */ 

+#define DCMI_FLAG_HSYNC     ((uint32_t)0x2001)

+#define DCMI_FLAG_VSYNC     ((uint32_t)0x2002)

+#define DCMI_FLAG_FNE       ((uint32_t)0x2004)

+/** 

+  * @brief   DCMI RISR register  

+  */ 

+#define DCMI_FLAG_FRAMERI    ((uint32_t)DCMI_RISR_FRAME_RIS)

+#define DCMI_FLAG_OVFRI      ((uint32_t)DCMI_RISR_OVF_RIS)

+#define DCMI_FLAG_ERRRI      ((uint32_t)DCMI_RISR_ERR_RIS)

+#define DCMI_FLAG_VSYNCRI    ((uint32_t)DCMI_RISR_VSYNC_RIS)

+#define DCMI_FLAG_LINERI     ((uint32_t)DCMI_RISR_LINE_RIS)

+/** 

+  * @brief   DCMI MISR register  

+  */ 

+#define DCMI_FLAG_FRAMEMI    ((uint32_t)0x1001)

+#define DCMI_FLAG_OVFMI      ((uint32_t)0x1002)

+#define DCMI_FLAG_ERRMI      ((uint32_t)0x1004)

+#define DCMI_FLAG_VSYNCMI    ((uint32_t)0x1008)

+#define DCMI_FLAG_LINEMI     ((uint32_t)0x1010)

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+ 

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup DCMI_Exported_Macros DCMI Exported Macros

+  * @{

+  */

+  

+/** @brief Reset DCMI handle state

+  * @param  __HANDLE__: specifies the DCMI handle.

+  * @retval None

+  */

+#define __HAL_DCMI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DCMI_STATE_RESET)

+

+/**

+  * @brief  Enable the DCMI.

+  * @param  __HANDLE__: DCMI handle

+  * @retval None

+  */

+#define __HAL_DCMI_ENABLE(__HANDLE__)    ((__HANDLE__)->Instance->CR |= DCMI_CR_ENABLE)

+

+/**

+  * @brief  Disable the DCMI.

+  * @param  __HANDLE__: DCMI handle

+  * @retval None

+  */

+#define __HAL_DCMI_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR &= ~(DCMI_CR_ENABLE))

+

+/* Interrupt & Flag management */

+/**

+  * @brief  Get the DCMI pending flags.

+  * @param  __HANDLE__: DCMI handle

+  * @param  __FLAG__: Get the specified flag.

+  *         This parameter can be any combination of the following values:

+  *            @arg DCMI_FLAG_FRAMERI: Frame capture complete flag mask

+  *            @arg DCMI_FLAG_OVFRI: Overflow flag mask

+  *            @arg DCMI_FLAG_ERRRI: Synchronization error flag mask

+  *            @arg DCMI_FLAG_VSYNCRI: VSYNC flag mask

+  *            @arg DCMI_FLAG_LINERI: Line flag mask

+  * @retval The state of FLAG.

+  */

+#define __HAL_DCMI_GET_FLAG(__HANDLE__, __FLAG__)\

+((((__FLAG__) & 0x3000) == 0x0)? ((__HANDLE__)->Instance->RISR & (__FLAG__)) :\

+ (((__FLAG__) & 0x2000) == 0x0)? ((__HANDLE__)->Instance->MISR & (__FLAG__)) : ((__HANDLE__)->Instance->SR & (__FLAG__)))

+

+/**

+  * @brief  Clear the DCMI pending flags.

+  * @param  __HANDLE__: DCMI handle

+  * @param  __FLAG__: specifies the flag to clear.

+  *         This parameter can be any combination of the following values:

+  *            @arg DCMI_FLAG_FRAMERI: Frame capture complete flag mask

+  *            @arg DCMI_FLAG_OVFRI: Overflow flag mask

+  *            @arg DCMI_FLAG_ERRRI: Synchronization error flag mask

+  *            @arg DCMI_FLAG_VSYNCRI: VSYNC flag mask

+  *            @arg DCMI_FLAG_LINERI: Line flag mask

+  * @retval None

+  */

+#define __HAL_DCMI_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))

+

+/**

+  * @brief  Enable the specified DCMI interrupts.

+  * @param  __HANDLE__:    DCMI handle

+  * @param  __INTERRUPT__: specifies the DCMI interrupt sources to be enabled. 

+  *         This parameter can be any combination of the following values:

+  *            @arg DCMI_IT_FRAME: Frame capture complete interrupt mask

+  *            @arg DCMI_IT_OVF: Overflow interrupt mask

+  *            @arg DCMI_IT_ERR: Synchronization error interrupt mask

+  *            @arg DCMI_IT_VSYNC: VSYNC interrupt mask

+  *            @arg DCMI_IT_LINE: Line interrupt mask

+  * @retval None

+  */

+#define __HAL_DCMI_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))

+

+/**

+  * @brief  Disable the specified DCMI interrupts.

+  * @param  __HANDLE__: DCMI handle

+  * @param  __INTERRUPT__: specifies the DCMI interrupt sources to be enabled. 

+  *         This parameter can be any combination of the following values:

+  *            @arg DCMI_IT_FRAME: Frame capture complete interrupt mask

+  *            @arg DCMI_IT_OVF: Overflow interrupt mask

+  *            @arg DCMI_IT_ERR: Synchronization error interrupt mask

+  *            @arg DCMI_IT_VSYNC: VSYNC interrupt mask

+  *            @arg DCMI_IT_LINE: Line interrupt mask

+  * @retval None

+  */

+#define __HAL_DCMI_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= ~(__INTERRUPT__))

+

+/**

+  * @brief  Check whether the specified DCMI interrupt has occurred or not.

+  * @param  __HANDLE__: DCMI handle

+  * @param  __INTERRUPT__: specifies the DCMI interrupt source to check.

+  *         This parameter can be one of the following values:

+  *            @arg DCMI_IT_FRAME: Frame capture complete interrupt mask

+  *            @arg DCMI_IT_OVF: Overflow interrupt mask

+  *            @arg DCMI_IT_ERR: Synchronization error interrupt mask

+  *            @arg DCMI_IT_VSYNC: VSYNC interrupt mask

+  *            @arg DCMI_IT_LINE: Line interrupt mask

+  * @retval The state of INTERRUPT.

+  */

+#define __HAL_DCMI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MISR & (__INTERRUPT__))

+

+/**

+  * @}

+  */

+  

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup DCMI_Exported_Functions DCMI Exported Functions

+  * @{

+  */

+

+/** @addtogroup DCMI_Exported_Functions_Group1 Initialization and Configuration functions

+ * @{

+ */

+/* Initialization and de-initialization functions *****************************/

+HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi);

+HAL_StatusTypeDef HAL_DCMI_DeInit(DCMI_HandleTypeDef *hdcmi);

+void       HAL_DCMI_MspInit(DCMI_HandleTypeDef* hdcmi);

+void       HAL_DCMI_MspDeInit(DCMI_HandleTypeDef* hdcmi);

+/**

+  * @}

+  */

+  

+/** @addtogroup DCMI_Exported_Functions_Group2 IO operation functions

+ * @{

+ */

+/* IO operation functions *****************************************************/

+HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mode, uint32_t pData, uint32_t Length);

+HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef* hdcmi);

+void       HAL_DCMI_ErrorCallback(DCMI_HandleTypeDef *hdcmi);

+void       HAL_DCMI_LineEventCallback(DCMI_HandleTypeDef *hdcmi);

+void       HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi);

+void       HAL_DCMI_VsyncEventCallback(DCMI_HandleTypeDef *hdcmi);

+void       HAL_DCMI_IRQHandler(DCMI_HandleTypeDef *hdcmi);

+/**

+  * @}

+  */

+  

+/** @addtogroup DCMI_Exported_Functions_Group3 Peripheral Control functions

+ * @{

+ */

+/* Peripheral Control functions ***********************************************/

+HAL_StatusTypeDef     HAL_DCMI_ConfigCROP(DCMI_HandleTypeDef *hdcmi, uint32_t X0, uint32_t Y0, uint32_t XSize, uint32_t YSize);

+HAL_StatusTypeDef     HAL_DCMI_EnableCROP(DCMI_HandleTypeDef *hdcmi);

+HAL_StatusTypeDef     HAL_DCMI_DisableCROP(DCMI_HandleTypeDef *hdcmi);

+/**

+  * @}

+  */

+  

+/** @addtogroup DCMI_Exported_Functions_Group4 Peripheral State functions

+ * @{

+ */

+/* Peripheral State functions *************************************************/

+HAL_DCMI_StateTypeDef HAL_DCMI_GetState(DCMI_HandleTypeDef *hdcmi);

+uint32_t              HAL_DCMI_GetError(DCMI_HandleTypeDef *hdcmi);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/   

+/* Private macro -------------------------------------------------------------*/

+/** @defgroup DCMI_Private_Macros DCMI Private Macros

+  * @{

+  */

+#define IS_DCMI_CAPTURE_MODE(MODE)(((MODE) == DCMI_MODE_CONTINUOUS) || \

+                                   ((MODE) == DCMI_MODE_SNAPSHOT))

+																			 

+#define IS_DCMI_SYNCHRO(MODE)(((MODE) == DCMI_SYNCHRO_HARDWARE) || \

+                              ((MODE) == DCMI_SYNCHRO_EMBEDDED))

+																	

+#define IS_DCMI_PCKPOLARITY(POLARITY)(((POLARITY) == DCMI_PCKPOLARITY_FALLING) || \

+                                      ((POLARITY) == DCMI_PCKPOLARITY_RISING))

+																					

+#define IS_DCMI_VSPOLARITY(POLARITY)(((POLARITY) == DCMI_VSPOLARITY_LOW) || \

+                                     ((POLARITY) == DCMI_VSPOLARITY_HIGH))

+																				 

+#define IS_DCMI_HSPOLARITY(POLARITY)(((POLARITY) == DCMI_HSPOLARITY_LOW) || \

+                                     ((POLARITY) == DCMI_HSPOLARITY_HIGH))

+																				 

+#define IS_DCMI_MODE_JPEG(JPEG_MODE)(((JPEG_MODE) == DCMI_JPEG_DISABLE) || \

+                                     ((JPEG_MODE) == DCMI_JPEG_ENABLE))

+																				 

+#define IS_DCMI_CAPTURE_RATE(RATE) (((RATE) == DCMI_CR_ALL_FRAME)         || \

+                                    ((RATE) == DCMI_CR_ALTERNATE_2_FRAME) || \

+                                    ((RATE) == DCMI_CR_ALTERNATE_4_FRAME))

+																				

+#define IS_DCMI_EXTENDED_DATA(DATA)(((DATA) == DCMI_EXTEND_DATA_8B)  || \

+                                    ((DATA) == DCMI_EXTEND_DATA_10B) || \

+                                    ((DATA) == DCMI_EXTEND_DATA_12B) || \

+                                    ((DATA) == DCMI_EXTEND_DATA_14B))

+																				

+#define IS_DCMI_WINDOW_COORDINATE(COORDINATE) ((COORDINATE) <= DCMI_WINDOW_COORDINATE)

+

+#define IS_DCMI_WINDOW_HEIGHT(HEIGHT) ((HEIGHT) <= DCMI_WINDOW_HEIGHT)

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @addtogroup DCMI_Private_Functions DCMI Private Functions

+  * @{

+  */

+  

+/**

+  * @}

+  */

+      

+/**

+  * @}

+  */

+/**

+  * @}

+  */ 

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_DCMI_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dcmi_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dcmi_ex.h
new file mode 100644
index 0000000..9ebd243
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dcmi_ex.h
@@ -0,0 +1,213 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_dcmi_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of DCMI Extension HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_DCMI_EX_H

+#define __STM32F7xx_HAL_DCMI_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup DCMIEx DCMIEx

+  * @{

+  */ 

+ 

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup DCMIEx_Exported_Types DCMIEx Exported Types

+  * @{

+  */

+/** 

+  * @brief   DCMIEx Embedded Synchronisation CODE Init structure definition

+  */ 

+typedef struct

+{

+  uint8_t FrameStartCode; /*!< Specifies the code of the frame start delimiter. */

+  uint8_t LineStartCode;  /*!< Specifies the code of the line start delimiter.  */

+  uint8_t LineEndCode;    /*!< Specifies the code of the line end delimiter.    */

+  uint8_t FrameEndCode;   /*!< Specifies the code of the frame end delimiter.   */

+}DCMI_CodesInitTypeDef;

+

+/** 

+  * @brief   DCMI Init structure definition

+  */  

+typedef struct

+{

+  uint32_t  SynchroMode;                /*!< Specifies the Synchronization Mode: Hardware or Embedded.

+                                             This parameter can be a value of @ref DCMI_Synchronization_Mode */

+

+  uint32_t  PCKPolarity;                /*!< Specifies the Pixel clock polarity: Falling or Rising.

+                                             This parameter can be a value of @ref DCMI_PIXCK_Polarity       */

+

+  uint32_t  VSPolarity;                 /*!< Specifies the Vertical synchronization polarity: High or Low.

+                                             This parameter can be a value of @ref DCMI_VSYNC_Polarity       */

+

+  uint32_t  HSPolarity;                 /*!< Specifies the Horizontal synchronization polarity: High or Low.

+                                             This parameter can be a value of @ref DCMI_HSYNC_Polarity       */

+

+  uint32_t  CaptureRate;                /*!< Specifies the frequency of frame capture: All, 1/2 or 1/4.

+                                             This parameter can be a value of @ref DCMI_Capture_Rate         */

+

+  uint32_t  ExtendedDataMode;           /*!< Specifies the data width: 8-bit, 10-bit, 12-bit or 14-bit.

+                                             This parameter can be a value of @ref DCMI_Extended_Data_Mode   */

+

+  DCMI_CodesInitTypeDef SyncroCode;     /*!< Specifies the code of the frame start delimiter.                */

+

+  uint32_t JPEGMode;                    /*!< Enable or Disable the JPEG mode.                                

+                                             This parameter can be a value of @ref DCMI_MODE_JPEG            */

+

+  uint32_t ByteSelectMode;              /*!< Specifies the data to be captured by the interface 

+                                            This parameter can be a value of @ref DCMIEx_Byte_Select_Mode      */

+                                            

+  uint32_t ByteSelectStart;             /*!< Specifies if the data to be captured by the interface is even or odd

+                                            This parameter can be a value of @ref DCMIEx_Byte_Select_Start     */

+

+  uint32_t LineSelectMode;              /*!< Specifies the line of data to be captured by the interface 

+                                            This parameter can be a value of @ref DCMIEx_Line_Select_Mode      */

+                                            

+  uint32_t LineSelectStart;             /*!< Specifies if the line of data to be captured by the interface is even or odd

+                                            This parameter can be a value of @ref DCMIEx_Line_Select_Start     */

+}DCMI_InitTypeDef;

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup DCMIEx_Exported_Constants DCMIEx Exported Constants

+  * @{

+  */

+

+/** @defgroup DCMIEx_Byte_Select_Mode DCMIEx Byte Select Mode

+  * @{

+  */

+#define DCMI_BSM_ALL                 ((uint32_t)0x00000000) /*!< Interface captures all received data */

+#define DCMI_BSM_OTHER               ((uint32_t)DCMI_CR_BSM_0) /*!< Interface captures every other byte from the received data */

+#define DCMI_BSM_ALTERNATE_4         ((uint32_t)DCMI_CR_BSM_1) /*!< Interface captures one byte out of four */

+#define DCMI_BSM_ALTERNATE_2         ((uint32_t)(DCMI_CR_BSM_0 | DCMI_CR_BSM_1)) /*!< Interface captures two bytes out of four */

+

+/**

+  * @}

+  */

+

+/** @defgroup DCMIEx_Byte_Select_Start DCMIEx Byte Select Start

+  * @{

+  */ 

+#define DCMI_OEBS_ODD               ((uint32_t)0x00000000) /*!< Interface captures first data from the frame/line start, second one being dropped */

+#define DCMI_OEBS_EVEN              ((uint32_t)DCMI_CR_OEBS) /*!< Interface captures second data from the frame/line start, first one being dropped */

+

+/**

+  * @}

+  */

+

+/** @defgroup DCMIEx_Line_Select_Mode DCMIEx Line Select Mode

+  * @{

+  */

+#define DCMI_LSM_ALL                 ((uint32_t)0x00000000) /*!< Interface captures all received lines */

+#define DCMI_LSM_ALTERNATE_2         ((uint32_t)DCMI_CR_LSM) /*!< Interface captures one line out of two */

+

+/**

+  * @}

+  */

+

+/** @defgroup DCMIEx_Line_Select_Start DCMIEx Line Select Start

+  * @{

+  */ 

+#define DCMI_OELS_ODD               ((uint32_t)0x00000000) /*!< Interface captures first line from the frame start, second one being dropped */

+#define DCMI_OELS_EVEN              ((uint32_t)DCMI_CR_OELS) /*!< Interface captures second line from the frame start, first one being dropped */

+

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */

+

+/* Exported macro ------------------------------------------------------------*/      

+/* Exported functions --------------------------------------------------------*/

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/   

+/* Private macro -------------------------------------------------------------*/

+/** @defgroup DCMIEx_Private_Macros DCMIEx Private Macros

+  * @{

+  */

+#define IS_DCMI_BYTE_SELECT_MODE(MODE)(((MODE) == DCMI_BSM_ALL) || \

+                                       ((MODE) == DCMI_BSM_OTHER) || \

+                                       ((MODE) == DCMI_BSM_ALTERNATE_4) || \

+                                       ((MODE) == DCMI_BSM_ALTERNATE_2))

+                                                                                                

+#define IS_DCMI_BYTE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OEBS_ODD) || \

+                                            ((POLARITY) == DCMI_OEBS_EVEN))

+                              

+#define IS_DCMI_LINE_SELECT_MODE(MODE)(((MODE) == DCMI_LSM_ALL) || \

+                                       ((MODE) == DCMI_LSM_ALTERNATE_2))

+                                      

+#define IS_DCMI_LINE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OELS_ODD) || \

+                                            ((POLARITY) == DCMI_OELS_EVEN))

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+

+/**

+  * @}

+  */

+    

+/**

+  * @}

+  */ 

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_DCMI_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_def.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_def.h
new file mode 100644
index 0000000..558b81e
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_def.h
@@ -0,0 +1,213 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_def.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   This file contains HAL common defines, enumeration, macros and 

+  *          structures definitions. 

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_DEF

+#define __STM32F7xx_HAL_DEF

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx.h"

+#include "Legacy/stm32_hal_legacy.h"

+#include <stdio.h>

+/* Exported types ------------------------------------------------------------*/

+

+/** 

+  * @brief  HAL Status structures definition  

+  */  

+typedef enum 

+{

+  HAL_OK       = 0x00,

+  HAL_ERROR    = 0x01,

+  HAL_BUSY     = 0x02,

+  HAL_TIMEOUT  = 0x03

+} HAL_StatusTypeDef;

+

+/** 

+  * @brief  HAL Lock structures definition  

+  */

+typedef enum 

+{

+  HAL_UNLOCKED = 0x00,

+  HAL_LOCKED   = 0x01  

+} HAL_LockTypeDef;

+

+/* Exported macro ------------------------------------------------------------*/

+#define HAL_MAX_DELAY      0xFFFFFFFF

+

+#define HAL_IS_BIT_SET(REG, BIT)         (((REG) & (BIT)) != RESET)

+#define HAL_IS_BIT_CLR(REG, BIT)         (((REG) & (BIT)) == RESET)

+

+#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__)               \

+                        do{                                                      \

+                              (__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \

+                              (__DMA_HANDLE__).Parent = (__HANDLE__);             \

+                          } while(0)

+

+#define UNUSED(x) ((void)(x))

+

+/** @brief Reset the Handle's State field.

+  * @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 

+  *            to set to 0 the Handle's "State" field.

+  *            Otherwise, "State" field may have any random value and the first time the function 

+  *            HAL_PPP_Init() is called, the low level hardware initialization will be missed

+  *            (i.e. HAL_PPP_MspInit() will not be executed).

+  *          - When there is a need to reconfigure the low level hardware: instead of calling

+  *            HAL_PPP_DeInit() then HAL_PPP_Init(), user can make a call to this macro then HAL_PPP_Init().

+  *            In this later function, when the Handle's "State" field is set to 0, it will execute the function

+  *            HAL_PPP_MspInit() which will reconfigure the low level hardware.

+  * @retval None

+  */

+#define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0)

+

+#if (USE_RTOS == 1)

+  /* Reserved for future use */

+  #error “USE_RTOS should be 0 in the current HAL release”

+#else

+  #define __HAL_LOCK(__HANDLE__)                                           \

+                                do{                                        \

+                                    if((__HANDLE__)->Lock == HAL_LOCKED)   \

+                                    {                                      \

+                                       return HAL_BUSY;                    \

+                                    }                                      \

+                                    else                                   \

+                                    {                                      \

+                                       (__HANDLE__)->Lock = HAL_LOCKED;    \

+                                    }                                      \

+                                  }while (0)

+

+  #define __HAL_UNLOCK(__HANDLE__)                                          \

+                                  do{                                       \

+                                      (__HANDLE__)->Lock = HAL_UNLOCKED;    \

+                                    }while (0)

+#endif /* USE_RTOS */

+

+#if  defined ( __GNUC__ )

+  #ifndef __weak

+    #define __weak   __attribute__((weak))

+  #endif /* __weak */

+  #ifndef __packed

+    #define __packed __attribute__((__packed__))

+  #endif /* __packed */

+#endif /* __GNUC__ */

+

+

+/* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */

+#if defined   (__GNUC__)        /* GNU Compiler */

+  #ifndef __ALIGN_END

+    #define __ALIGN_END    __attribute__ ((aligned (4)))

+  #endif /* __ALIGN_END */

+  #ifndef __ALIGN_BEGIN  

+    #define __ALIGN_BEGIN

+  #endif /* __ALIGN_BEGIN */

+#else

+  #ifndef __ALIGN_END

+    #define __ALIGN_END

+  #endif /* __ALIGN_END */

+  #ifndef __ALIGN_BEGIN      

+    #if defined   (__CC_ARM)      /* ARM Compiler */

+      #define __ALIGN_BEGIN    __align(4)  

+    #elif defined (__ICCARM__)    /* IAR Compiler */

+      #define __ALIGN_BEGIN 

+    #endif /* __CC_ARM */

+  #endif /* __ALIGN_BEGIN */

+#endif /* __GNUC__ */

+

+

+/** 

+  * @brief  __RAM_FUNC definition

+  */ 

+#if defined ( __CC_ARM   )

+/* ARM Compiler

+   ------------

+   RAM functions are defined using the toolchain options. 

+   Functions that are executed in RAM should reside in a separate source module.

+   Using the 'Options for File' dialog you can simply change the 'Code / Const' 

+   area of a module to a memory space in physical RAM.

+   Available memory areas are declared in the 'Target' tab of the 'Options for Target'

+   dialog. 

+*/

+#define __RAM_FUNC HAL_StatusTypeDef 

+

+#elif defined ( __ICCARM__ )

+/* ICCARM Compiler

+   ---------------

+   RAM functions are defined using a specific toolchain keyword "__ramfunc". 

+*/

+#define __RAM_FUNC __ramfunc HAL_StatusTypeDef

+

+#elif defined   (  __GNUC__  )

+/* GNU Compiler

+   ------------

+  RAM functions are defined using a specific toolchain attribute 

+   "__attribute__((section(".RamFunc")))".

+*/

+#define __RAM_FUNC HAL_StatusTypeDef  __attribute__((section(".RamFunc")))

+

+#endif

+

+/** 

+  * @brief  __NOINLINE definition

+  */ 

+#if defined ( __CC_ARM   ) || defined   (  __GNUC__  )

+/* ARM & GNUCompiler 

+   ---------------- 

+*/

+#define __NOINLINE __attribute__ ( (noinline) )

+

+#elif defined ( __ICCARM__ )

+/* ICCARM Compiler

+   ---------------

+*/

+#define __NOINLINE _Pragma("optimize = no_inline")

+

+#endif

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* ___STM32F7xx_HAL_DEF */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dma.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dma.h
new file mode 100644
index 0000000..6bb64d0
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dma.h
@@ -0,0 +1,772 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_dma.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of DMA HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_DMA_H

+#define __STM32F7xx_HAL_DMA_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup DMA

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+

+/** @defgroup DMA_Exported_Types DMA Exported Types

+  * @brief    DMA Exported Types 

+  * @{

+  */

+   

+/** 

+  * @brief  DMA Configuration Structure definition

+  */

+typedef struct

+{

+  uint32_t Channel;              /*!< Specifies the channel used for the specified stream. 

+                                      This parameter can be a value of @ref DMA_Channel_selection                    */

+

+  uint32_t Direction;            /*!< Specifies if the data will be transferred from memory to peripheral, 

+                                      from memory to memory or from peripheral to memory.

+                                      This parameter can be a value of @ref DMA_Data_transfer_direction              */

+

+  uint32_t PeriphInc;            /*!< Specifies whether the Peripheral address register should be incremented or not.

+                                      This parameter can be a value of @ref DMA_Peripheral_incremented_mode          */

+

+  uint32_t MemInc;               /*!< Specifies whether the memory address register should be incremented or not.

+                                      This parameter can be a value of @ref DMA_Memory_incremented_mode              */

+

+  uint32_t PeriphDataAlignment;  /*!< Specifies the Peripheral data width.

+                                      This parameter can be a value of @ref DMA_Peripheral_data_size                 */

+

+  uint32_t MemDataAlignment;     /*!< Specifies the Memory data width.

+                                      This parameter can be a value of @ref DMA_Memory_data_size                     */

+

+  uint32_t Mode;                 /*!< Specifies the operation mode of the DMAy Streamx.

+                                      This parameter can be a value of @ref DMA_mode

+                                      @note The circular buffer mode cannot be used if the memory-to-memory

+                                            data transfer is configured on the selected Stream                        */

+

+  uint32_t Priority;             /*!< Specifies the software priority for the DMAy Streamx.

+                                      This parameter can be a value of @ref DMA_Priority_level                       */

+

+  uint32_t FIFOMode;             /*!< Specifies if the FIFO mode or Direct mode will be used for the specified stream.

+                                      This parameter can be a value of @ref DMA_FIFO_direct_mode

+                                      @note The Direct mode (FIFO mode disabled) cannot be used if the 

+                                            memory-to-memory data transfer is configured on the selected stream       */

+

+  uint32_t FIFOThreshold;        /*!< Specifies the FIFO threshold level.

+                                      This parameter can be a value of @ref DMA_FIFO_threshold_level                  */

+

+  uint32_t MemBurst;             /*!< Specifies the Burst transfer configuration for the memory transfers. 

+                                      It specifies the amount of data to be transferred in a single non interruptible 

+                                      transaction.

+                                      This parameter can be a value of @ref DMA_Memory_burst 

+                                      @note The burst mode is possible only if the address Increment mode is enabled. */

+

+  uint32_t PeriphBurst;          /*!< Specifies the Burst transfer configuration for the peripheral transfers. 

+                                      It specifies the amount of data to be transferred in a single non interruptible 

+                                      transaction. 

+                                      This parameter can be a value of @ref DMA_Peripheral_burst

+                                      @note The burst mode is possible only if the address Increment mode is enabled. */

+}DMA_InitTypeDef;

+

+/** 

+  * @brief  HAL DMA State structures definition

+  */

+typedef enum

+{

+  HAL_DMA_STATE_RESET             = 0x00,  /*!< DMA not yet initialized or disabled */

+  HAL_DMA_STATE_READY             = 0x01,  /*!< DMA initialized and ready for use   */

+  HAL_DMA_STATE_READY_MEM0        = 0x11,  /*!< DMA Mem0 process success            */

+  HAL_DMA_STATE_READY_MEM1        = 0x21,  /*!< DMA Mem1 process success            */

+  HAL_DMA_STATE_READY_HALF_MEM0   = 0x31,  /*!< DMA Mem0 Half process success       */

+  HAL_DMA_STATE_READY_HALF_MEM1   = 0x41,  /*!< DMA Mem1 Half process success       */

+  HAL_DMA_STATE_BUSY              = 0x02,  /*!< DMA process is ongoing              */

+  HAL_DMA_STATE_BUSY_MEM0         = 0x12,  /*!< DMA Mem0 process is ongoing         */

+  HAL_DMA_STATE_BUSY_MEM1         = 0x22,  /*!< DMA Mem1 process is ongoing         */

+  HAL_DMA_STATE_TIMEOUT           = 0x03,  /*!< DMA timeout state                   */

+  HAL_DMA_STATE_ERROR             = 0x04,  /*!< DMA error state                     */

+}HAL_DMA_StateTypeDef;

+

+/** 

+  * @brief  HAL DMA Error Code structure definition

+  */

+typedef enum

+{

+  HAL_DMA_FULL_TRANSFER      = 0x00,    /*!< Full transfer     */

+  HAL_DMA_HALF_TRANSFER      = 0x01,    /*!< Half Transfer     */

+}HAL_DMA_LevelCompleteTypeDef;

+

+/** 

+  * @brief  DMA handle Structure definition

+  */

+typedef struct __DMA_HandleTypeDef

+{

+  DMA_Stream_TypeDef         *Instance;                                                    /*!< Register base address                  */

+

+  DMA_InitTypeDef            Init;                                                         /*!< DMA communication parameters           */ 

+

+  HAL_LockTypeDef            Lock;                                                         /*!< DMA locking object                     */  

+

+  __IO HAL_DMA_StateTypeDef  State;                                                        /*!< DMA transfer state                     */

+

+  void                       *Parent;                                                      /*!< Parent object state                    */  

+

+  void                       (* XferCpltCallback)( struct __DMA_HandleTypeDef * hdma);     /*!< DMA transfer complete callback         */

+

+  void                       (* XferHalfCpltCallback)( struct __DMA_HandleTypeDef * hdma); /*!< DMA Half transfer complete callback    */

+

+  void                       (* XferM1CpltCallback)( struct __DMA_HandleTypeDef * hdma);   /*!< DMA transfer complete Memory1 callback */

+

+  void                       (* XferErrorCallback)( struct __DMA_HandleTypeDef * hdma);    /*!< DMA transfer error callback            */

+

+ __IO uint32_t              ErrorCode;                                                    /*!< DMA Error code                          */

+}DMA_HandleTypeDef;

+

+/**

+  * @}

+  */

+

+

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup DMA_Exported_Constants DMA Exported Constants

+  * @brief    DMA Exported constants 

+  * @{

+  */

+

+/** @defgroup DMA_Error_Code DMA Error Code

+  * @brief    DMA Error Code 

+  * @{

+  */ 

+#define HAL_DMA_ERROR_NONE      ((uint32_t)0x00000000)    /*!< No error             */

+#define HAL_DMA_ERROR_TE        ((uint32_t)0x00000001)    /*!< Transfer error       */

+#define HAL_DMA_ERROR_FE        ((uint32_t)0x00000002)    /*!< FIFO error           */

+#define HAL_DMA_ERROR_DME       ((uint32_t)0x00000004)    /*!< Direct Mode error    */

+#define HAL_DMA_ERROR_TIMEOUT   ((uint32_t)0x00000020)    /*!< Timeout error        */

+/**

+  * @}

+  */

+

+/** @defgroup DMA_Channel_selection DMA Channel selection

+  * @brief    DMA channel selection 

+  * @{

+  */ 

+#define DMA_CHANNEL_0        ((uint32_t)0x00000000)  /*!< DMA Channel 0 */

+#define DMA_CHANNEL_1        ((uint32_t)0x02000000)  /*!< DMA Channel 1 */

+#define DMA_CHANNEL_2        ((uint32_t)0x04000000)  /*!< DMA Channel 2 */

+#define DMA_CHANNEL_3        ((uint32_t)0x06000000)  /*!< DMA Channel 3 */

+#define DMA_CHANNEL_4        ((uint32_t)0x08000000)  /*!< DMA Channel 4 */

+#define DMA_CHANNEL_5        ((uint32_t)0x0A000000)  /*!< DMA Channel 5 */

+#define DMA_CHANNEL_6        ((uint32_t)0x0C000000)  /*!< DMA Channel 6 */

+#define DMA_CHANNEL_7        ((uint32_t)0x0E000000)  /*!< DMA Channel 7 */

+/**

+  * @}

+  */

+

+/** @defgroup DMA_Data_transfer_direction DMA Data transfer direction

+  * @brief    DMA data transfer direction 

+  * @{

+  */ 

+#define DMA_PERIPH_TO_MEMORY         ((uint32_t)0x00000000)      /*!< Peripheral to memory direction */

+#define DMA_MEMORY_TO_PERIPH         ((uint32_t)DMA_SxCR_DIR_0)  /*!< Memory to peripheral direction */

+#define DMA_MEMORY_TO_MEMORY         ((uint32_t)DMA_SxCR_DIR_1)  /*!< Memory to memory direction     */

+/**

+  * @}

+  */

+        

+/** @defgroup DMA_Peripheral_incremented_mode DMA Peripheral incremented mode

+  * @brief    DMA peripheral incremented mode 

+  * @{

+  */ 

+#define DMA_PINC_ENABLE        ((uint32_t)DMA_SxCR_PINC)  /*!< Peripheral increment mode enable  */

+#define DMA_PINC_DISABLE       ((uint32_t)0x00000000)     /*!< Peripheral increment mode disable */

+/**

+  * @}

+  */ 

+

+/** @defgroup DMA_Memory_incremented_mode DMA Memory incremented mode

+  * @brief    DMA memory incremented mode 

+  * @{

+  */ 

+#define DMA_MINC_ENABLE         ((uint32_t)DMA_SxCR_MINC)  /*!< Memory increment mode enable  */

+#define DMA_MINC_DISABLE        ((uint32_t)0x00000000)     /*!< Memory increment mode disable */

+/**

+  * @}

+  */

+

+

+/** @defgroup DMA_Peripheral_data_size DMA Peripheral data size

+  * @brief    DMA peripheral data size 

+  * @{

+  */ 

+#define DMA_PDATAALIGN_BYTE          ((uint32_t)0x00000000)        /*!< Peripheral data alignment: Byte     */

+#define DMA_PDATAALIGN_HALFWORD      ((uint32_t)DMA_SxCR_PSIZE_0)  /*!< Peripheral data alignment: HalfWord */

+#define DMA_PDATAALIGN_WORD          ((uint32_t)DMA_SxCR_PSIZE_1)  /*!< Peripheral data alignment: Word     */

+/**

+  * @}

+  */ 

+

+

+/** @defgroup DMA_Memory_data_size DMA Memory data size

+  * @brief    DMA memory data size 

+  * @{ 

+  */

+#define DMA_MDATAALIGN_BYTE          ((uint32_t)0x00000000)        /*!< Memory data alignment: Byte     */

+#define DMA_MDATAALIGN_HALFWORD      ((uint32_t)DMA_SxCR_MSIZE_0)  /*!< Memory data alignment: HalfWord */

+#define DMA_MDATAALIGN_WORD          ((uint32_t)DMA_SxCR_MSIZE_1)  /*!< Memory data alignment: Word     */

+/**

+  * @}

+  */

+

+/** @defgroup DMA_mode DMA mode

+  * @brief    DMA mode 

+  * @{

+  */ 

+#define DMA_NORMAL         ((uint32_t)0x00000000)       /*!< Normal mode                  */

+#define DMA_CIRCULAR       ((uint32_t)DMA_SxCR_CIRC)    /*!< Circular mode                */

+#define DMA_PFCTRL         ((uint32_t)DMA_SxCR_PFCTRL)  /*!< Peripheral flow control mode */

+/**

+  * @}

+  */

+

+

+/** @defgroup DMA_Priority_level DMA Priority level

+  * @brief    DMA priority levels 

+  * @{

+  */

+#define DMA_PRIORITY_LOW             ((uint32_t)0x00000000)     /*!< Priority level: Low       */

+#define DMA_PRIORITY_MEDIUM          ((uint32_t)DMA_SxCR_PL_0)  /*!< Priority level: Medium    */

+#define DMA_PRIORITY_HIGH            ((uint32_t)DMA_SxCR_PL_1)  /*!< Priority level: High      */

+#define DMA_PRIORITY_VERY_HIGH       ((uint32_t)DMA_SxCR_PL)    /*!< Priority level: Very High */

+/**

+  * @}

+  */ 

+

+

+/** @defgroup DMA_FIFO_direct_mode DMA FIFO direct mode

+  * @brief    DMA FIFO direct mode

+  * @{

+  */

+#define DMA_FIFOMODE_DISABLE        ((uint32_t)0x00000000)       /*!< FIFO mode disable */

+#define DMA_FIFOMODE_ENABLE         ((uint32_t)DMA_SxFCR_DMDIS)  /*!< FIFO mode enable  */

+/**

+  * @}

+  */ 

+

+/** @defgroup DMA_FIFO_threshold_level DMA FIFO threshold level

+  * @brief    DMA FIFO level 

+  * @{

+  */

+#define DMA_FIFO_THRESHOLD_1QUARTERFULL       ((uint32_t)0x00000000)       /*!< FIFO threshold 1 quart full configuration  */

+#define DMA_FIFO_THRESHOLD_HALFFULL           ((uint32_t)DMA_SxFCR_FTH_0)  /*!< FIFO threshold half full configuration     */

+#define DMA_FIFO_THRESHOLD_3QUARTERSFULL      ((uint32_t)DMA_SxFCR_FTH_1)  /*!< FIFO threshold 3 quarts full configuration */

+#define DMA_FIFO_THRESHOLD_FULL               ((uint32_t)DMA_SxFCR_FTH)    /*!< FIFO threshold full configuration          */

+/**

+  * @}

+  */ 

+

+/** @defgroup DMA_Memory_burst DMA Memory burst

+  * @brief    DMA memory burst 

+  * @{

+  */ 

+#define DMA_MBURST_SINGLE       ((uint32_t)0x00000000)  

+#define DMA_MBURST_INC4         ((uint32_t)DMA_SxCR_MBURST_0)  

+#define DMA_MBURST_INC8         ((uint32_t)DMA_SxCR_MBURST_1)  

+#define DMA_MBURST_INC16        ((uint32_t)DMA_SxCR_MBURST)  

+/**

+  * @}

+  */ 

+

+

+/** @defgroup DMA_Peripheral_burst DMA Peripheral burst

+  * @brief    DMA peripheral burst 

+  * @{

+  */ 

+#define DMA_PBURST_SINGLE       ((uint32_t)0x00000000)  

+#define DMA_PBURST_INC4         ((uint32_t)DMA_SxCR_PBURST_0)  

+#define DMA_PBURST_INC8         ((uint32_t)DMA_SxCR_PBURST_1)  

+#define DMA_PBURST_INC16        ((uint32_t)DMA_SxCR_PBURST)  

+/**

+  * @}

+  */

+

+/** @defgroup DMA_interrupt_enable_definitions DMA interrupt enable definitions

+  * @brief    DMA interrupts definition 

+  * @{

+  */

+#define DMA_IT_TC                         ((uint32_t)DMA_SxCR_TCIE)

+#define DMA_IT_HT                         ((uint32_t)DMA_SxCR_HTIE)

+#define DMA_IT_TE                         ((uint32_t)DMA_SxCR_TEIE)

+#define DMA_IT_DME                        ((uint32_t)DMA_SxCR_DMEIE)

+#define DMA_IT_FE                         ((uint32_t)0x00000080)

+/**

+  * @}

+  */

+

+/** @defgroup DMA_flag_definitions DMA flag definitions

+  * @brief    DMA flag definitions 

+  * @{

+  */ 

+#define DMA_FLAG_FEIF0_4                    ((uint32_t)0x00800001)

+#define DMA_FLAG_DMEIF0_4                   ((uint32_t)0x00800004)

+#define DMA_FLAG_TEIF0_4                    ((uint32_t)0x00000008)

+#define DMA_FLAG_HTIF0_4                    ((uint32_t)0x00000010)

+#define DMA_FLAG_TCIF0_4                    ((uint32_t)0x00000020)

+#define DMA_FLAG_FEIF1_5                    ((uint32_t)0x00000040)

+#define DMA_FLAG_DMEIF1_5                   ((uint32_t)0x00000100)

+#define DMA_FLAG_TEIF1_5                    ((uint32_t)0x00000200)

+#define DMA_FLAG_HTIF1_5                    ((uint32_t)0x00000400)

+#define DMA_FLAG_TCIF1_5                    ((uint32_t)0x00000800)

+#define DMA_FLAG_FEIF2_6                    ((uint32_t)0x00010000)

+#define DMA_FLAG_DMEIF2_6                   ((uint32_t)0x00040000)

+#define DMA_FLAG_TEIF2_6                    ((uint32_t)0x00080000)

+#define DMA_FLAG_HTIF2_6                    ((uint32_t)0x00100000)

+#define DMA_FLAG_TCIF2_6                    ((uint32_t)0x00200000)

+#define DMA_FLAG_FEIF3_7                    ((uint32_t)0x00400000)

+#define DMA_FLAG_DMEIF3_7                   ((uint32_t)0x01000000)

+#define DMA_FLAG_TEIF3_7                    ((uint32_t)0x02000000)

+#define DMA_FLAG_HTIF3_7                    ((uint32_t)0x04000000)

+#define DMA_FLAG_TCIF3_7                    ((uint32_t)0x08000000)

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+ 

+/* Exported macro ------------------------------------------------------------*/

+

+/** @brief Reset DMA handle state

+  * @param  __HANDLE__: specifies the DMA handle.

+  * @retval None

+  */

+#define __HAL_DMA_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DMA_STATE_RESET)

+

+/**

+  * @brief  Return the current DMA Stream FIFO filled level.

+  * @param  __HANDLE__: DMA handle

+  * @retval The FIFO filling state.

+  *           - DMA_FIFOStatus_Less1QuarterFull: when FIFO is less than 1 quarter-full 

+  *                                              and not empty.

+  *           - DMA_FIFOStatus_1QuarterFull: if more than 1 quarter-full.

+  *           - DMA_FIFOStatus_HalfFull: if more than 1 half-full.

+  *           - DMA_FIFOStatus_3QuartersFull: if more than 3 quarters-full.

+  *           - DMA_FIFOStatus_Empty: when FIFO is empty

+  *           - DMA_FIFOStatus_Full: when FIFO is full

+  */

+#define __HAL_DMA_GET_FS(__HANDLE__)      (((__HANDLE__)->Instance->FCR & (DMA_SxFCR_FS)))

+

+/**

+  * @brief  Enable the specified DMA Stream.

+  * @param  __HANDLE__: DMA handle

+  * @retval None

+  */

+#define __HAL_DMA_ENABLE(__HANDLE__)      ((__HANDLE__)->Instance->CR |=  DMA_SxCR_EN)

+

+/**

+  * @brief  Disable the specified DMA Stream.

+  * @param  __HANDLE__: DMA handle

+  * @retval None

+  */

+#define __HAL_DMA_DISABLE(__HANDLE__)     ((__HANDLE__)->Instance->CR &=  ~DMA_SxCR_EN)

+

+/* Interrupt & Flag management */

+

+/**

+  * @brief  Return the current DMA Stream transfer complete flag.

+  * @param  __HANDLE__: DMA handle

+  * @retval The specified transfer complete flag index.

+  */

+#define __HAL_DMA_GET_TC_FLAG_INDEX(__HANDLE__) \

+(((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream0))? DMA_FLAG_TCIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream0))? DMA_FLAG_TCIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream4))? DMA_FLAG_TCIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream4))? DMA_FLAG_TCIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream1))? DMA_FLAG_TCIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream1))? DMA_FLAG_TCIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream5))? DMA_FLAG_TCIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream5))? DMA_FLAG_TCIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream2))? DMA_FLAG_TCIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream2))? DMA_FLAG_TCIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream6))? DMA_FLAG_TCIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream6))? DMA_FLAG_TCIF2_6 :\

+   DMA_FLAG_TCIF3_7)

+

+/**

+  * @brief  Return the current DMA Stream half transfer complete flag.

+  * @param  __HANDLE__: DMA handle

+  * @retval The specified half transfer complete flag index.

+  */      

+#define __HAL_DMA_GET_HT_FLAG_INDEX(__HANDLE__)\

+(((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream0))? DMA_FLAG_HTIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream0))? DMA_FLAG_HTIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream4))? DMA_FLAG_HTIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream4))? DMA_FLAG_HTIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream1))? DMA_FLAG_HTIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream1))? DMA_FLAG_HTIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream5))? DMA_FLAG_HTIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream5))? DMA_FLAG_HTIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream2))? DMA_FLAG_HTIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream2))? DMA_FLAG_HTIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream6))? DMA_FLAG_HTIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream6))? DMA_FLAG_HTIF2_6 :\

+   DMA_FLAG_HTIF3_7)

+

+/**

+  * @brief  Return the current DMA Stream transfer error flag.

+  * @param  __HANDLE__: DMA handle

+  * @retval The specified transfer error flag index.

+  */

+#define __HAL_DMA_GET_TE_FLAG_INDEX(__HANDLE__)\

+(((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream0))? DMA_FLAG_TEIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream0))? DMA_FLAG_TEIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream4))? DMA_FLAG_TEIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream4))? DMA_FLAG_TEIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream1))? DMA_FLAG_TEIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream1))? DMA_FLAG_TEIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream5))? DMA_FLAG_TEIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream5))? DMA_FLAG_TEIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream2))? DMA_FLAG_TEIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream2))? DMA_FLAG_TEIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream6))? DMA_FLAG_TEIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream6))? DMA_FLAG_TEIF2_6 :\

+   DMA_FLAG_TEIF3_7)

+

+/**

+  * @brief  Return the current DMA Stream FIFO error flag.

+  * @param  __HANDLE__: DMA handle

+  * @retval The specified FIFO error flag index.

+  */

+#define __HAL_DMA_GET_FE_FLAG_INDEX(__HANDLE__)\

+(((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream0))? DMA_FLAG_FEIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream0))? DMA_FLAG_FEIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream4))? DMA_FLAG_FEIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream4))? DMA_FLAG_FEIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream1))? DMA_FLAG_FEIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream1))? DMA_FLAG_FEIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream5))? DMA_FLAG_FEIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream5))? DMA_FLAG_FEIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream2))? DMA_FLAG_FEIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream2))? DMA_FLAG_FEIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream6))? DMA_FLAG_FEIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream6))? DMA_FLAG_FEIF2_6 :\

+   DMA_FLAG_FEIF3_7)

+

+/**

+  * @brief  Return the current DMA Stream direct mode error flag.

+  * @param  __HANDLE__: DMA handle

+  * @retval The specified direct mode error flag index.

+  */

+#define __HAL_DMA_GET_DME_FLAG_INDEX(__HANDLE__)\

+(((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream0))? DMA_FLAG_DMEIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream0))? DMA_FLAG_DMEIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream4))? DMA_FLAG_DMEIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream4))? DMA_FLAG_DMEIF0_4 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream1))? DMA_FLAG_DMEIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream1))? DMA_FLAG_DMEIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream5))? DMA_FLAG_DMEIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream5))? DMA_FLAG_DMEIF1_5 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream2))? DMA_FLAG_DMEIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream2))? DMA_FLAG_DMEIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA1_Stream6))? DMA_FLAG_DMEIF2_6 :\

+ ((uint32_t)((__HANDLE__)->Instance) == ((uint32_t)DMA2_Stream6))? DMA_FLAG_DMEIF2_6 :\

+   DMA_FLAG_DMEIF3_7)

+

+/**

+  * @brief  Get the DMA Stream pending flags.

+  * @param  __HANDLE__: DMA handle

+  * @param  __FLAG__: Get the specified flag.

+  *          This parameter can be any combination of the following values:

+  *            @arg DMA_FLAG_TCIFx: Transfer complete flag.

+  *            @arg DMA_FLAG_HTIFx: Half transfer complete flag.

+  *            @arg DMA_FLAG_TEIFx: Transfer error flag.

+  *            @arg DMA_FLAG_DMEIFx: Direct mode error flag.

+  *            @arg DMA_FLAG_FEIFx: FIFO error flag.

+  *         Where x can be 0_4, 1_5, 2_6 or 3_7 to select the DMA Stream flag.   

+  * @retval The state of FLAG (SET or RESET).

+  */

+#define __HAL_DMA_GET_FLAG(__HANDLE__, __FLAG__)\

+(((uint32_t)((__HANDLE__)->Instance) > (uint32_t)DMA2_Stream3)? (DMA2->HISR & (__FLAG__)) :\

+ ((uint32_t)((__HANDLE__)->Instance) > (uint32_t)DMA1_Stream7)? (DMA2->LISR & (__FLAG__)) :\

+ ((uint32_t)((__HANDLE__)->Instance) > (uint32_t)DMA1_Stream3)? (DMA1->HISR & (__FLAG__)) : (DMA1->LISR & (__FLAG__)))

+

+/**

+  * @brief  Clear the DMA Stream pending flags.

+  * @param  __HANDLE__: DMA handle

+  * @param  __FLAG__: specifies the flag to clear.

+  *          This parameter can be any combination of the following values:

+  *            @arg DMA_FLAG_TCIFx: Transfer complete flag.

+  *            @arg DMA_FLAG_HTIFx: Half transfer complete flag.

+  *            @arg DMA_FLAG_TEIFx: Transfer error flag.

+  *            @arg DMA_FLAG_DMEIFx: Direct mode error flag.

+  *            @arg DMA_FLAG_FEIFx: FIFO error flag.

+  *         Where x can be 0_4, 1_5, 2_6 or 3_7 to select the DMA Stream flag.   

+  * @retval None

+  */

+#define __HAL_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__) \

+(((uint32_t)((__HANDLE__)->Instance) > (uint32_t)DMA2_Stream3)? (DMA2->HIFCR = (__FLAG__)) :\

+ ((uint32_t)((__HANDLE__)->Instance) > (uint32_t)DMA1_Stream7)? (DMA2->LIFCR = (__FLAG__)) :\

+ ((uint32_t)((__HANDLE__)->Instance) > (uint32_t)DMA1_Stream3)? (DMA1->HIFCR = (__FLAG__)) : (DMA1->LIFCR = (__FLAG__)))

+

+/**

+  * @brief  Enable the specified DMA Stream interrupts.

+  * @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.

+  *           @arg DMA_IT_TE: Transfer error interrupt mask.

+  *           @arg DMA_IT_FE: FIFO error interrupt mask.

+  *           @arg DMA_IT_DME: Direct mode error interrupt.

+  * @retval None

+  */

+#define __HAL_DMA_ENABLE_IT(__HANDLE__, __INTERRUPT__)   (((__INTERRUPT__) != DMA_IT_FE)? \

+((__HANDLE__)->Instance->CR |= (__INTERRUPT__)) : ((__HANDLE__)->Instance->FCR |= (__INTERRUPT__)))

+

+/**

+  * @brief  Disable the specified DMA Stream interrupts.

+  * @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.

+  *            @arg DMA_IT_TE: Transfer error interrupt mask.

+  *            @arg DMA_IT_FE: FIFO error interrupt mask.

+  *            @arg DMA_IT_DME: Direct mode error interrupt.

+  * @retval None

+  */

+#define __HAL_DMA_DISABLE_IT(__HANDLE__, __INTERRUPT__)  (((__INTERRUPT__) != DMA_IT_FE)? \

+((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__)) : ((__HANDLE__)->Instance->FCR &= ~(__INTERRUPT__)))

+

+/**

+  * @brief  Check whether the specified DMA Stream interrupt is enabled or not.

+  * @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.

+  *            @arg DMA_IT_TE: Transfer error interrupt mask.

+  *            @arg DMA_IT_FE: FIFO error interrupt mask.

+  *            @arg DMA_IT_DME: Direct mode error interrupt.

+  * @retval The state of DMA_IT.

+  */

+#define __HAL_DMA_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)  (((__INTERRUPT__) != DMA_IT_FE)? \

+                                                        ((__HANDLE__)->Instance->CR & (__INTERRUPT__)) : \

+                                                        ((__HANDLE__)->Instance->FCR & (__INTERRUPT__)))

+

+/**

+  * @brief  Writes the number of data units to be transferred on the DMA Stream.

+  * @param  __HANDLE__: DMA handle

+  * @param  __COUNTER__: Number of data units to be transferred (from 0 to 65535) 

+  *          Number of data items depends only on the Peripheral data format.

+  *            

+  * @note   If Peripheral data format is Bytes: number of data units is equal 

+  *         to total number of bytes to be transferred.

+  *           

+  * @note   If Peripheral data format is Half-Word: number of data units is  

+  *         equal to total number of bytes to be transferred / 2.

+  *           

+  * @note   If Peripheral data format is Word: number of data units is equal 

+  *         to total  number of bytes to be transferred / 4.

+  *      

+  * @retval The number of remaining data units in the current DMAy Streamx transfer.

+  */

+#define __HAL_DMA_SET_COUNTER(__HANDLE__, __COUNTER__) ((__HANDLE__)->Instance->NDTR = (uint16_t)(__COUNTER__))

+

+/**

+  * @brief  Returns the number of remaining data units in the current DMAy Streamx transfer.

+  * @param  __HANDLE__: DMA handle

+  *   

+  * @retval The number of remaining data units in the current DMA Stream transfer.

+  */

+#define __HAL_DMA_GET_COUNTER(__HANDLE__) ((__HANDLE__)->Instance->NDTR)

+

+

+/* Include DMA HAL Extension module */

+#include "stm32f7xx_hal_dma_ex.h"   

+

+/* Exported functions --------------------------------------------------------*/

+

+/** @defgroup DMA_Exported_Functions DMA Exported Functions

+  * @brief    DMA Exported functions 

+  * @{

+  */

+

+/** @defgroup DMA_Exported_Functions_Group1 Initialization and de-initialization functions

+  * @brief   Initialization and de-initialization functions 

+  * @{

+  */

+HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma); 

+HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma);

+/**

+  * @}

+  */

+

+/** @defgroup DMA_Exported_Functions_Group2 I/O operation functions

+  * @brief   I/O operation functions  

+  * @{

+  */

+HAL_StatusTypeDef HAL_DMA_Start (DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength);

+HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength);

+HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma);

+HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, uint32_t CompleteLevel, uint32_t Timeout);

+void              HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma);

+/**

+  * @}

+  */ 

+

+/** @defgroup DMA_Exported_Functions_Group3 Peripheral State functions

+  * @brief    Peripheral State functions 

+  * @{

+  */

+HAL_DMA_StateTypeDef HAL_DMA_GetState(DMA_HandleTypeDef *hdma);

+uint32_t             HAL_DMA_GetError(DMA_HandleTypeDef *hdma);

+/**

+  * @}

+  */ 

+/**

+  * @}

+  */ 

+/* Private Constants -------------------------------------------------------------*/

+/** @defgroup DMA_Private_Constants DMA Private Constants

+  * @brief    DMA private defines and constants 

+  * @{

+  */

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup DMA_Private_Macros DMA Private Macros

+  * @brief    DMA private macros 

+  * @{

+  */

+#define IS_DMA_CHANNEL(CHANNEL) (((CHANNEL) == DMA_CHANNEL_0) || \

+                                 ((CHANNEL) == DMA_CHANNEL_1) || \

+                                 ((CHANNEL) == DMA_CHANNEL_2) || \

+                                 ((CHANNEL) == DMA_CHANNEL_3) || \

+                                 ((CHANNEL) == DMA_CHANNEL_4) || \

+                                 ((CHANNEL) == DMA_CHANNEL_5) || \

+                                 ((CHANNEL) == DMA_CHANNEL_6) || \

+                                 ((CHANNEL) == DMA_CHANNEL_7))

+

+#define IS_DMA_DIRECTION(DIRECTION) (((DIRECTION) == DMA_PERIPH_TO_MEMORY ) || \

+                                     ((DIRECTION) == DMA_MEMORY_TO_PERIPH)  || \

+                                     ((DIRECTION) == DMA_MEMORY_TO_MEMORY)) 

+

+#define IS_DMA_BUFFER_SIZE(SIZE) (((SIZE) >= 0x1) && ((SIZE) < 0x10000))

+

+#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))

+

+#define IS_DMA_PERIPHERAL_DATA_SIZE(SIZE) (((SIZE) == DMA_PDATAALIGN_BYTE)     || \

+                                           ((SIZE) == DMA_PDATAALIGN_HALFWORD) || \

+                                           ((SIZE) == DMA_PDATAALIGN_WORD))

+

+#define IS_DMA_MEMORY_DATA_SIZE(SIZE) (((SIZE) == DMA_MDATAALIGN_BYTE)     || \

+                                       ((SIZE) == DMA_MDATAALIGN_HALFWORD) || \

+                                       ((SIZE) == DMA_MDATAALIGN_WORD ))

+

+#define IS_DMA_MODE(MODE) (((MODE) == DMA_NORMAL )  || \

+                           ((MODE) == DMA_CIRCULAR) || \

+                           ((MODE) == DMA_PFCTRL)) 

+

+#define IS_DMA_PRIORITY(PRIORITY) (((PRIORITY) == DMA_PRIORITY_LOW )   || \

+                                   ((PRIORITY) == DMA_PRIORITY_MEDIUM) || \

+                                   ((PRIORITY) == DMA_PRIORITY_HIGH)   || \

+                                   ((PRIORITY) == DMA_PRIORITY_VERY_HIGH)) 

+

+#define IS_DMA_FIFO_MODE_STATE(STATE) (((STATE) == DMA_FIFOMODE_DISABLE ) || \

+                                       ((STATE) == DMA_FIFOMODE_ENABLE))

+

+#define IS_DMA_FIFO_THRESHOLD(THRESHOLD) (((THRESHOLD) == DMA_FIFO_THRESHOLD_1QUARTERFULL ) || \

+                                          ((THRESHOLD) == DMA_FIFO_THRESHOLD_HALFFULL)      || \

+                                          ((THRESHOLD) == DMA_FIFO_THRESHOLD_3QUARTERSFULL) || \

+                                          ((THRESHOLD) == DMA_FIFO_THRESHOLD_FULL))

+

+#define IS_DMA_MEMORY_BURST(BURST) (((BURST) == DMA_MBURST_SINGLE) || \

+                                    ((BURST) == DMA_MBURST_INC4)   || \

+                                    ((BURST) == DMA_MBURST_INC8)   || \

+                                    ((BURST) == DMA_MBURST_INC16))

+

+#define IS_DMA_PERIPHERAL_BURST(BURST) (((BURST) == DMA_PBURST_SINGLE) || \

+                                        ((BURST) == DMA_PBURST_INC4)   || \

+                                        ((BURST) == DMA_PBURST_INC8)   || \

+                                        ((BURST) == DMA_PBURST_INC16))

+/**

+  * @}

+  */ 

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup DMA_Private_Functions DMA Private Functions

+  * @brief    DMA private  functions 

+  * @{

+  */

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_DMA_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dma2d.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dma2d.h
new file mode 100644
index 0000000..6852682
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dma2d.h
@@ -0,0 +1,559 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_dma2d.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of DMA2D HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_DMA2D_H

+#define __STM32F7xx_HAL_DMA2D_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @defgroup DMA2D DMA2D

+  * @brief DMA2D HAL module driver

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup DMA2D_Exported_Types DMA2D Exported Types

+  * @{

+  */

+#define MAX_DMA2D_LAYER  2

+

+/** 

+  * @brief DMA2D color Structure definition

+  */

+typedef struct

+{

+  uint32_t Blue;               /*!< Configures the blue value.

+                                    This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */

+

+  uint32_t Green;              /*!< Configures the green value.

+                                    This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */

+

+  uint32_t Red;                /*!< Configures the red value.

+                                    This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */

+} DMA2D_ColorTypeDef;

+

+/** 

+  * @brief DMA2D CLUT Structure definition

+  */

+typedef struct

+{

+  uint32_t *pCLUT;                  /*!< Configures the DMA2D CLUT memory address.*/

+

+  uint32_t CLUTColorMode;           /*!< configures the DMA2D CLUT color mode.

+                                         This parameter can be one value of @ref DMA2D_CLUT_CM */

+

+  uint32_t Size;                    /*!< configures the DMA2D CLUT size. 

+                                         This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF.*/

+} DMA2D_CLUTCfgTypeDef;

+

+/** 

+  * @brief DMA2D Init structure definition

+  */

+typedef struct

+{

+  uint32_t             Mode;               /*!< configures the DMA2D transfer mode.

+                                                This parameter can be one value of @ref DMA2D_Mode */

+

+  uint32_t             ColorMode;          /*!< configures the color format of the output image.

+                                                This parameter can be one value of @ref DMA2D_Color_Mode */

+

+  uint32_t             OutputOffset;       /*!< Specifies the Offset value. 

+                                                This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x3FFF. */ 

+} DMA2D_InitTypeDef;

+

+/** 

+  * @brief DMA2D Layer structure definition

+  */

+typedef struct

+{

+  uint32_t             InputOffset;       /*!< configures the DMA2D foreground offset.

+                                               This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x3FFF. */

+

+  uint32_t             InputColorMode;    /*!< configures the DMA2D foreground color mode . 

+                                               This parameter can be one value of @ref DMA2D_Input_Color_Mode */

+

+  uint32_t             AlphaMode;         /*!< configures the DMA2D foreground alpha mode. 

+                                               This parameter can be one value of @ref DMA2D_ALPHA_MODE */

+

+  uint32_t             InputAlpha;        /*!< Specifies the DMA2D foreground alpha value and color value in case of A8 or A4 color mode. 

+                                               This parameter must be a number between Min_Data = 0x00000000 and Max_Data = 0xFFFFFFFF 

+                                               in case of A8 or A4 color mode (ARGB). 

+                                               Otherwise, This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF.*/

+

+} DMA2D_LayerCfgTypeDef;

+

+/** 

+  * @brief  HAL DMA2D State structures definition

+  */

+typedef enum

+{

+  HAL_DMA2D_STATE_RESET             = 0x00,    /*!< DMA2D not yet initialized or disabled       */

+  HAL_DMA2D_STATE_READY             = 0x01,    /*!< Peripheral Initialized and ready for use    */

+  HAL_DMA2D_STATE_BUSY              = 0x02,    /*!< an internal process is ongoing              */

+  HAL_DMA2D_STATE_TIMEOUT           = 0x03,    /*!< Timeout state                               */

+  HAL_DMA2D_STATE_ERROR             = 0x04,    /*!< DMA2D state error                           */

+  HAL_DMA2D_STATE_SUSPEND           = 0x05     /*!< DMA2D process is suspended                  */

+}HAL_DMA2D_StateTypeDef;

+

+/** 

+  * @brief  DMA2D handle Structure definition

+  */

+typedef struct __DMA2D_HandleTypeDef

+{

+  DMA2D_TypeDef               *Instance;                                                    /*!< DMA2D Register base address       */

+

+  DMA2D_InitTypeDef           Init;                                                         /*!< DMA2D communication parameters    */ 

+

+  void                        (* XferCpltCallback)(struct __DMA2D_HandleTypeDef * hdma2d);  /*!< DMA2D transfer complete callback  */

+

+  void                        (* XferErrorCallback)(struct __DMA2D_HandleTypeDef * hdma2d); /*!< DMA2D transfer error callback     */

+

+  DMA2D_LayerCfgTypeDef       LayerCfg[MAX_DMA2D_LAYER];                                    /*!< DMA2D Layers parameters           */  

+

+  HAL_LockTypeDef             Lock;                                                         /*!< DMA2D Lock                        */  

+

+  __IO HAL_DMA2D_StateTypeDef State;                                                        /*!< DMA2D transfer state              */

+

+  __IO uint32_t               ErrorCode;                                                    /*!< DMA2D Error code                  */  

+} DMA2D_HandleTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup DMA2D_Exported_Constants DMA2D Exported Constants

+  * @{

+  */

+

+/** @defgroup DMA2D_Error_Code DMA2D Error Code

+  * @{

+  */

+#define HAL_DMA2D_ERROR_NONE      ((uint32_t)0x00000000)    /*!< No error             */

+#define HAL_DMA2D_ERROR_TE        ((uint32_t)0x00000001)    /*!< Transfer error       */

+#define HAL_DMA2D_ERROR_CE        ((uint32_t)0x00000002)    /*!< Configuration error  */

+#define HAL_DMA2D_ERROR_TIMEOUT   ((uint32_t)0x00000020)    /*!< Timeout error        */

+/**

+  * @}

+  */

+

+/** @defgroup DMA2D_Mode DMA2D Mode 

+  * @{

+  */

+#define DMA2D_M2M                            ((uint32_t)0x00000000)             /*!< DMA2D memory to memory transfer mode */

+#define DMA2D_M2M_PFC                        ((uint32_t)0x00010000)             /*!< DMA2D memory to memory with pixel format conversion transfer mode */

+#define DMA2D_M2M_BLEND                      ((uint32_t)0x00020000)             /*!< DMA2D memory to memory with blending transfer mode */

+#define DMA2D_R2M                            ((uint32_t)0x00030000)             /*!< DMA2D register to memory transfer mode */

+/**

+  * @}

+  */

+

+/** @defgroup DMA2D_Color_Mode DMA2D Color Mode 

+  * @{

+  */

+#define DMA2D_ARGB8888                       ((uint32_t)0x00000000)             /*!< ARGB8888 DMA2D color mode */

+#define DMA2D_RGB888                         ((uint32_t)0x00000001)             /*!< RGB888 DMA2D color mode   */

+#define DMA2D_RGB565                         ((uint32_t)0x00000002)             /*!< RGB565 DMA2D color mode   */

+#define DMA2D_ARGB1555                       ((uint32_t)0x00000003)             /*!< ARGB1555 DMA2D color mode */

+#define DMA2D_ARGB4444                       ((uint32_t)0x00000004)             /*!< ARGB4444 DMA2D color mode */

+/**

+  * @}

+  */

+

+/** @defgroup DMA2D_COLOR_VALUE DMA2D COLOR VALUE

+  * @{

+  */

+#define COLOR_VALUE             ((uint32_t)0x000000FF)                          /*!< color value mask */

+/**

+  * @}

+  */    

+

+/** @defgroup DMA2D_SIZE DMA2D SIZE 

+  * @{

+  */

+#define DMA2D_PIXEL          (DMA2D_NLR_PL >> 16)                               /*!< DMA2D pixel per line */

+#define DMA2D_LINE           DMA2D_NLR_NL                                       /*!< DMA2D number of line */

+/**

+  * @}

+  */

+

+/** @defgroup DMA2D_Offset DMA2D Offset 

+  * @{

+  */

+#define DMA2D_OFFSET      DMA2D_FGOR_LO            /*!< Line Offset */

+/**

+  * @}

+  */ 

+

+/** @defgroup DMA2D_Input_Color_Mode DMA2D Input Color Mode

+  * @{

+  */

+#define CM_ARGB8888        ((uint32_t)0x00000000)                               /*!< ARGB8888 color mode */

+#define CM_RGB888          ((uint32_t)0x00000001)                               /*!< RGB888 color mode */

+#define CM_RGB565          ((uint32_t)0x00000002)                               /*!< RGB565 color mode */

+#define CM_ARGB1555        ((uint32_t)0x00000003)                               /*!< ARGB1555 color mode */

+#define CM_ARGB4444        ((uint32_t)0x00000004)                               /*!< ARGB4444 color mode */

+#define CM_L8              ((uint32_t)0x00000005)                               /*!< L8 color mode */

+#define CM_AL44            ((uint32_t)0x00000006)                               /*!< AL44 color mode */

+#define CM_AL88            ((uint32_t)0x00000007)                               /*!< AL88 color mode */

+#define CM_L4              ((uint32_t)0x00000008)                               /*!< L4 color mode */

+#define CM_A8              ((uint32_t)0x00000009)                               /*!< A8 color mode */

+#define CM_A4              ((uint32_t)0x0000000A)                               /*!< A4 color mode */

+/**

+  * @}

+  */

+

+/** @defgroup DMA2D_ALPHA_MODE DMA2D ALPHA MODE

+  * @{

+  */

+#define DMA2D_NO_MODIF_ALPHA       ((uint32_t)0x00000000)  /*!< No modification of the alpha channel value */

+#define DMA2D_REPLACE_ALPHA        ((uint32_t)0x00000001)  /*!< Replace original alpha channel value by programmed alpha value */

+#define DMA2D_COMBINE_ALPHA        ((uint32_t)0x00000002)  /*!< Replace original alpha channel value by programmed alpha value

+                                                                with original alpha channel value                              */

+/**

+  * @}

+  */    

+

+/** @defgroup DMA2D_CLUT_CM DMA2D CLUT CM

+  * @{

+  */

+#define DMA2D_CCM_ARGB8888    ((uint32_t)0x00000000)    /*!< ARGB8888 DMA2D C-LUT color mode */

+#define DMA2D_CCM_RGB888      ((uint32_t)0x00000001)    /*!< RGB888 DMA2D C-LUT color mode   */

+/**

+  * @}

+  */

+

+/** @defgroup DMA2D_Size_Clut DMA2D Size Clut

+  * @{

+  */

+#define DMA2D_CLUT_SIZE    (DMA2D_FGPFCCR_CS >> 8)    /*!< DMA2D C-LUT size */

+/**

+  * @}

+  */

+

+/** @defgroup DMA2D_DeadTime DMA2D DeadTime 

+  * @{

+  */

+#define LINE_WATERMARK            DMA2D_LWR_LW

+/**

+  * @}

+  */

+

+/** @defgroup DMA2D_Interrupts DMA2D Interrupts 

+  * @{

+  */

+#define DMA2D_IT_CE             DMA2D_CR_CEIE    /*!< Configuration Error Interrupt */

+#define DMA2D_IT_CTC            DMA2D_CR_CTCIE   /*!< C-LUT Transfer Complete Interrupt */

+#define DMA2D_IT_CAE            DMA2D_CR_CAEIE   /*!< C-LUT Access Error Interrupt */

+#define DMA2D_IT_TW             DMA2D_CR_TWIE    /*!< Transfer Watermark Interrupt */

+#define DMA2D_IT_TC             DMA2D_CR_TCIE    /*!< Transfer Complete Interrupt */

+#define DMA2D_IT_TE             DMA2D_CR_TEIE    /*!< Transfer Error Interrupt */

+/**

+  * @}

+  */

+

+/** @defgroup DMA2D_Flag DMA2D Flag 

+  * @{

+  */

+#define DMA2D_FLAG_CE          DMA2D_ISR_CEIF     /*!< Configuration Error Interrupt Flag */

+#define DMA2D_FLAG_CTC         DMA2D_ISR_CTCIF    /*!< C-LUT Transfer Complete Interrupt Flag */

+#define DMA2D_FLAG_CAE         DMA2D_ISR_CAEIF    /*!< C-LUT Access Error Interrupt Flag */

+#define DMA2D_FLAG_TW          DMA2D_ISR_TWIF     /*!< Transfer Watermark Interrupt Flag */

+#define DMA2D_FLAG_TC          DMA2D_ISR_TCIF     /*!< Transfer Complete Interrupt Flag */

+#define DMA2D_FLAG_TE          DMA2D_ISR_TEIF     /*!< Transfer Error Interrupt Flag */

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup DMA2D_Exported_Macros DMA2D Exported Macros

+  * @{

+  */

+

+/** @brief Reset DMA2D handle state

+  * @param  __HANDLE__: specifies the DMA2D handle.

+  * @retval None

+  */

+#define __HAL_DMA2D_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DMA2D_STATE_RESET)

+

+/**

+  * @brief  Enable the DMA2D.

+  * @param  __HANDLE__: DMA2D handle

+  * @retval None.

+  */

+#define __HAL_DMA2D_ENABLE(__HANDLE__)        ((__HANDLE__)->Instance->CR |= DMA2D_CR_START)

+

+/**

+  * @brief  Disable the DMA2D.

+  * @param  __HANDLE__: DMA2D handle

+  * @retval None.

+  */

+#define __HAL_DMA2D_DISABLE(__HANDLE__)        ((__HANDLE__)->Instance->CR &= ~DMA2D_CR_START)

+

+/* Interrupt & Flag management */

+/**

+  * @brief  Get the DMA2D pending flags.

+  * @param  __HANDLE__: DMA2D handle

+  * @param  __FLAG__: Get the specified flag.

+  *          This parameter can be any combination of the following values:

+  *            @arg DMA2D_FLAG_CE:  Configuration error flag

+  *            @arg DMA2D_FLAG_CTC: C-LUT transfer complete flag

+  *            @arg DMA2D_FLAG_CAE: C-LUT access error flag

+  *            @arg DMA2D_FLAG_TW:  Transfer Watermark flag

+  *            @arg DMA2D_FLAG_TC:  Transfer complete flag

+  *            @arg DMA2D_FLAG_TE:  Transfer error flag   

+  * @retval The state of FLAG.

+  */

+#define __HAL_DMA2D_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR & (__FLAG__))

+

+/**

+  * @brief  Clears the DMA2D pending flags.

+  * @param  __HANDLE__: DMA2D handle

+  * @param  __FLAG__: specifies the flag to clear.

+  *          This parameter can be any combination of the following values:

+  *            @arg DMA2D_FLAG_CE:  Configuration error flag

+  *            @arg DMA2D_FLAG_CTC: C-LUT transfer complete flag

+  *            @arg DMA2D_FLAG_CAE: C-LUT access error flag

+  *            @arg DMA2D_FLAG_TW:  Transfer Watermark flag

+  *            @arg DMA2D_FLAG_TC:  Transfer complete flag

+  *            @arg DMA2D_FLAG_TE:  Transfer error flag    

+  * @retval None

+  */

+#define __HAL_DMA2D_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->IFCR = (__FLAG__))

+

+/**

+  * @brief  Enables the specified DMA2D interrupts.

+  * @param  __HANDLE__: DMA2D handle

+  * @param __INTERRUPT__: specifies the DMA2D interrupt sources to be enabled. 

+  *          This parameter can be any combination of the following values:

+  *            @arg DMA2D_IT_CE:  Configuration error interrupt mask

+  *            @arg DMA2D_IT_CTC: C-LUT transfer complete interrupt mask

+  *            @arg DMA2D_IT_CAE: C-LUT access error interrupt mask

+  *            @arg DMA2D_IT_TW:  Transfer Watermark interrupt mask

+  *            @arg DMA2D_IT_TC:  Transfer complete interrupt mask

+  *            @arg DMA2D_IT_TE:  Transfer error interrupt mask

+  * @retval None

+  */

+#define __HAL_DMA2D_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))

+

+/**

+  * @brief  Disables the specified DMA2D interrupts.

+  * @param  __HANDLE__: DMA2D handle

+  * @param __INTERRUPT__: specifies the DMA2D interrupt sources to be disabled. 

+  *          This parameter can be any combination of the following values:

+  *            @arg DMA2D_IT_CE:  Configuration error interrupt mask

+  *            @arg DMA2D_IT_CTC: C-LUT transfer complete interrupt mask

+  *            @arg DMA2D_IT_CAE: C-LUT access error interrupt mask

+  *            @arg DMA2D_IT_TW:  Transfer Watermark interrupt mask

+  *            @arg DMA2D_IT_TC:  Transfer complete interrupt mask

+  *            @arg DMA2D_IT_TE:  Transfer error interrupt mask

+  * @retval None

+  */

+#define __HAL_DMA2D_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))

+

+/**

+  * @brief  Checks whether the specified DMA2D interrupt has occurred or not.

+  * @param  __HANDLE__: DMA2D handle

+  * @param  __INTERRUPT__: specifies the DMA2D interrupt source to check.

+  *          This parameter can be one of the following values:

+  *            @arg DMA2D_IT_CE:  Configuration error interrupt mask

+  *            @arg DMA2D_IT_CTC: C-LUT transfer complete interrupt mask

+  *            @arg DMA2D_IT_CAE: C-LUT access error interrupt mask

+  *            @arg DMA2D_IT_TW:  Transfer Watermark interrupt mask

+  *            @arg DMA2D_IT_TC:  Transfer complete interrupt mask

+  *            @arg DMA2D_IT_TE:  Transfer error interrupt mask

+  * @retval The state of INTERRUPT.

+  */

+#define __HAL_DMA2D_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR & (__INTERRUPT__))

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/  

+/** @defgroup DMA2D_Exported_Functions DMA2D Exported Functions

+  * @{

+  */

+/* Initialization and de-initialization functions *******************************/

+HAL_StatusTypeDef HAL_DMA2D_Init(DMA2D_HandleTypeDef *hdma2d); 

+HAL_StatusTypeDef HAL_DMA2D_DeInit (DMA2D_HandleTypeDef *hdma2d);

+void HAL_DMA2D_MspInit(DMA2D_HandleTypeDef* hdma2d);

+void HAL_DMA2D_MspDeInit(DMA2D_HandleTypeDef* hdma2d);

+

+/* IO operation functions *******************************************************/

+HAL_StatusTypeDef HAL_DMA2D_Start(DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height);

+HAL_StatusTypeDef HAL_DMA2D_BlendingStart(DMA2D_HandleTypeDef *hdma2d, uint32_t SrcAddress1, uint32_t SrcAddress2, uint32_t DstAddress, uint32_t Width,  uint32_t Height);

+HAL_StatusTypeDef HAL_DMA2D_Start_IT(DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height);

+HAL_StatusTypeDef HAL_DMA2D_BlendingStart_IT(DMA2D_HandleTypeDef *hdma2d, uint32_t SrcAddress1, uint32_t SrcAddress2, uint32_t DstAddress, uint32_t Width, uint32_t Height);

+HAL_StatusTypeDef HAL_DMA2D_Suspend(DMA2D_HandleTypeDef *hdma2d);

+HAL_StatusTypeDef HAL_DMA2D_Resume(DMA2D_HandleTypeDef *hdma2d);

+HAL_StatusTypeDef HAL_DMA2D_Abort(DMA2D_HandleTypeDef *hdma2d);

+HAL_StatusTypeDef HAL_DMA2D_PollForTransfer(DMA2D_HandleTypeDef *hdma2d, uint32_t Timeout);

+void              HAL_DMA2D_IRQHandler(DMA2D_HandleTypeDef *hdma2d);

+

+/* Peripheral Control functions *************************************************/

+HAL_StatusTypeDef  HAL_DMA2D_ConfigLayer(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);

+HAL_StatusTypeDef  HAL_DMA2D_ConfigCLUT(DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx);

+HAL_StatusTypeDef  HAL_DMA2D_EnableCLUT(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);

+HAL_StatusTypeDef  HAL_DMA2D_DisableCLUT(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);

+HAL_StatusTypeDef  HAL_DMA2D_ProgramLineEvent(DMA2D_HandleTypeDef *hdma2d, uint32_t Line);

+

+/* Peripheral State functions ***************************************************/

+HAL_DMA2D_StateTypeDef HAL_DMA2D_GetState(DMA2D_HandleTypeDef *hdma2d);

+uint32_t               HAL_DMA2D_GetError(DMA2D_HandleTypeDef *hdma2d);

+/**

+  * @}

+  */

+

+/* Private types -------------------------------------------------------------*/

+/** @defgroup DMA2D_Private_Types DMA2D Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private defines -------------------------------------------------------------*/

+/** @defgroup DMA2D_Private_Defines DMA2D Private Defines

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup DMA2D_Private_Variables DMA2D Private Variables

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup DMA2D_Private_Constants DMA2D Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup DMA2D_Private_Macros DMA2D Private Macros

+  * @{

+  */

+#define IS_DMA2D_LAYER(LAYER)                 ((LAYER) <= MAX_DMA2D_LAYER)

+#define IS_DMA2D_MODE(MODE)                   (((MODE) == DMA2D_M2M)       || ((MODE) == DMA2D_M2M_PFC) || \

+                                               ((MODE) == DMA2D_M2M_BLEND) || ((MODE) == DMA2D_R2M))

+#define IS_DMA2D_CMODE(MODE_ARGB)             (((MODE_ARGB) == DMA2D_ARGB8888) || ((MODE_ARGB) == DMA2D_RGB888)   || \

+                                               ((MODE_ARGB) == DMA2D_RGB565)   || ((MODE_ARGB) == DMA2D_ARGB1555) || \

+                                               ((MODE_ARGB) == DMA2D_ARGB4444))

+#define IS_DMA2D_COLOR(COLOR)                 ((COLOR) <= COLOR_VALUE)

+#define IS_DMA2D_LINE(LINE)                   ((LINE) <= DMA2D_LINE)

+#define IS_DMA2D_PIXEL(PIXEL)                 ((PIXEL) <= DMA2D_PIXEL)

+#define IS_DMA2D_OFFSET(OOFFSET)              ((OOFFSET) <= DMA2D_OFFSET)

+#define IS_DMA2D_INPUT_COLOR_MODE(INPUT_CM)   (((INPUT_CM) == CM_ARGB8888) || ((INPUT_CM) == CM_RGB888)   || \

+                                               ((INPUT_CM) == CM_RGB565)   || ((INPUT_CM) == CM_ARGB1555) || \

+                                               ((INPUT_CM) == CM_ARGB4444) || ((INPUT_CM) == CM_L8)       || \

+                                               ((INPUT_CM) == CM_AL44)     || ((INPUT_CM) == CM_AL88)     || \

+                                               ((INPUT_CM) == CM_L4)       || ((INPUT_CM) == CM_A8)       || \

+                                               ((INPUT_CM) == CM_A4))

+#define IS_DMA2D_ALPHA_MODE(AlphaMode)        (((AlphaMode) == DMA2D_NO_MODIF_ALPHA) || \

+                                               ((AlphaMode) == DMA2D_REPLACE_ALPHA)  || \

+                                               ((AlphaMode) == DMA2D_COMBINE_ALPHA))

+#define IS_DMA2D_CLUT_CM(CLUT_CM)             (((CLUT_CM) == DMA2D_CCM_ARGB8888) || ((CLUT_CM) == DMA2D_CCM_RGB888))

+#define IS_DMA2D_CLUT_SIZE(CLUT_SIZE)         ((CLUT_SIZE) <= DMA2D_CLUT_SIZE)

+#define IS_DMA2D_LineWatermark(LineWatermark) ((LineWatermark) <= LINE_WATERMARK)

+#define IS_DMA2D_IT(IT)                       (((IT) == DMA2D_IT_CTC) || ((IT) == DMA2D_IT_CAE) || \

+                                               ((IT) == DMA2D_IT_TW) || ((IT) == DMA2D_IT_TC) || \

+                                               ((IT) == DMA2D_IT_TE) || ((IT) == DMA2D_IT_CE))

+#define IS_DMA2D_GET_FLAG(FLAG)               (((FLAG) == DMA2D_FLAG_CTC) || ((FLAG) == DMA2D_FLAG_CAE) || \

+                                               ((FLAG) == DMA2D_FLAG_TW)   || ((FLAG) == DMA2D_FLAG_TC)  || \

+                                               ((FLAG) == DMA2D_FLAG_TE)   || ((FLAG) == DMA2D_FLAG_CE))

+/**

+  * @}

+  */

+

+/* Private functions prototypes ---------------------------------------------------------*/

+/** @defgroup DMA2D_Private_Functions_Prototypes DMA2D Private Functions Prototypes

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup DMA2D_Private_Functions DMA2D Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_DMA2D_H */

+ 

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dma_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dma_ex.h
new file mode 100644
index 0000000..3c68011
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dma_ex.h
@@ -0,0 +1,123 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_dma_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of DMA HAL extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_DMA_EX_H

+#define __STM32F7xx_HAL_DMA_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup DMAEx

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup DMAEx_Exported_Types DMAEx Exported Types

+  * @brief DMAEx Exported types

+  * @{

+  */

+   

+/** 

+  * @brief  HAL DMA Memory definition  

+  */ 

+typedef enum

+{

+  MEMORY0      = 0x00,    /*!< Memory 0     */

+  MEMORY1      = 0x01,    /*!< Memory 1     */

+

+}HAL_DMA_MemoryTypeDef;

+

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @defgroup DMAEx_Exported_Functions DMAEx Exported Functions

+  * @brief   DMAEx Exported functions

+  * @{

+  */

+

+/** @defgroup DMAEx_Exported_Functions_Group1 Extended features functions

+  * @brief   Extended features functions

+  * @{

+  */

+

+/* IO operation functions *******************************************************/

+HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength);

+HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength);

+HAL_StatusTypeDef HAL_DMAEx_ChangeMemory(DMA_HandleTypeDef *hdma, uint32_t Address, HAL_DMA_MemoryTypeDef memory);

+

+/**

+  * @}

+  */

+/**

+  * @}

+  */

+         

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup DMAEx_Private_Functions DMAEx Private Functions

+  * @brief DMAEx Private functions

+  * @{

+  */

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_DMA_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_eth.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_eth.h
new file mode 100644
index 0000000..bb88e44
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_eth.h
@@ -0,0 +1,2220 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_eth.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of ETH HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_ETH_H

+#define __STM32F7xx_HAL_ETH_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup ETH

+  * @{

+  */ 

+  

+/** @addtogroup ETH_Private_Macros

+  * @{

+  */

+#define IS_ETH_PHY_ADDRESS(ADDRESS) ((ADDRESS) <= 0x20)

+#define IS_ETH_AUTONEGOTIATION(CMD) (((CMD) == ETH_AUTONEGOTIATION_ENABLE) || \

+                                     ((CMD) == ETH_AUTONEGOTIATION_DISABLE))

+#define IS_ETH_SPEED(SPEED) (((SPEED) == ETH_SPEED_10M) || \

+                             ((SPEED) == ETH_SPEED_100M))

+#define IS_ETH_DUPLEX_MODE(MODE)  (((MODE) == ETH_MODE_FULLDUPLEX) || \

+                                  ((MODE) == ETH_MODE_HALFDUPLEX))

+#define IS_ETH_DUPLEX_MODE(MODE)  (((MODE) == ETH_MODE_FULLDUPLEX) || \

+                                  ((MODE) == ETH_MODE_HALFDUPLEX))

+#define IS_ETH_RX_MODE(MODE)    (((MODE) == ETH_RXPOLLING_MODE) || \

+                                 ((MODE) == ETH_RXINTERRUPT_MODE)) 

+#define IS_ETH_RX_MODE(MODE)    (((MODE) == ETH_RXPOLLING_MODE) || \

+                                 ((MODE) == ETH_RXINTERRUPT_MODE))

+#define IS_ETH_RX_MODE(MODE)    (((MODE) == ETH_RXPOLLING_MODE) || \

+                                 ((MODE) == ETH_RXINTERRUPT_MODE))

+#define IS_ETH_CHECKSUM_MODE(MODE)    (((MODE) == ETH_CHECKSUM_BY_HARDWARE) || \

+                                      ((MODE) == ETH_CHECKSUM_BY_SOFTWARE))

+#define IS_ETH_MEDIA_INTERFACE(MODE)         (((MODE) == ETH_MEDIA_INTERFACE_MII) || \

+                                              ((MODE) == ETH_MEDIA_INTERFACE_RMII))

+#define IS_ETH_WATCHDOG(CMD) (((CMD) == ETH_WATCHDOG_ENABLE) || \

+                              ((CMD) == ETH_WATCHDOG_DISABLE))

+#define IS_ETH_JABBER(CMD) (((CMD) == ETH_JABBER_ENABLE) || \

+                            ((CMD) == ETH_JABBER_DISABLE))

+#define IS_ETH_INTER_FRAME_GAP(GAP) (((GAP) == ETH_INTERFRAMEGAP_96BIT) || \

+                                     ((GAP) == ETH_INTERFRAMEGAP_88BIT) || \

+                                     ((GAP) == ETH_INTERFRAMEGAP_80BIT) || \

+                                     ((GAP) == ETH_INTERFRAMEGAP_72BIT) || \

+                                     ((GAP) == ETH_INTERFRAMEGAP_64BIT) || \

+                                     ((GAP) == ETH_INTERFRAMEGAP_56BIT) || \

+                                     ((GAP) == ETH_INTERFRAMEGAP_48BIT) || \

+                                     ((GAP) == ETH_INTERFRAMEGAP_40BIT))

+#define IS_ETH_CARRIER_SENSE(CMD) (((CMD) == ETH_CARRIERSENCE_ENABLE) || \

+                                   ((CMD) == ETH_CARRIERSENCE_DISABLE))

+#define IS_ETH_RECEIVE_OWN(CMD) (((CMD) == ETH_RECEIVEOWN_ENABLE) || \

+                                 ((CMD) == ETH_RECEIVEOWN_DISABLE))

+#define IS_ETH_LOOPBACK_MODE(CMD) (((CMD) == ETH_LOOPBACKMODE_ENABLE) || \

+                                   ((CMD) == ETH_LOOPBACKMODE_DISABLE))

+#define IS_ETH_CHECKSUM_OFFLOAD(CMD) (((CMD) == ETH_CHECKSUMOFFLAOD_ENABLE) || \

+                                      ((CMD) == ETH_CHECKSUMOFFLAOD_DISABLE))

+#define IS_ETH_RETRY_TRANSMISSION(CMD) (((CMD) == ETH_RETRYTRANSMISSION_ENABLE) || \

+                                        ((CMD) == ETH_RETRYTRANSMISSION_DISABLE))

+#define IS_ETH_AUTOMATIC_PADCRC_STRIP(CMD) (((CMD) == ETH_AUTOMATICPADCRCSTRIP_ENABLE) || \

+                                            ((CMD) == ETH_AUTOMATICPADCRCSTRIP_DISABLE))

+#define IS_ETH_BACKOFF_LIMIT(LIMIT) (((LIMIT) == ETH_BACKOFFLIMIT_10) || \

+                                     ((LIMIT) == ETH_BACKOFFLIMIT_8) || \

+                                     ((LIMIT) == ETH_BACKOFFLIMIT_4) || \

+                                     ((LIMIT) == ETH_BACKOFFLIMIT_1))

+#define IS_ETH_DEFERRAL_CHECK(CMD) (((CMD) == ETH_DEFFERRALCHECK_ENABLE) || \

+                                    ((CMD) == ETH_DEFFERRALCHECK_DISABLE))

+#define IS_ETH_RECEIVE_ALL(CMD) (((CMD) == ETH_RECEIVEALL_ENABLE) || \

+                                 ((CMD) == ETH_RECEIVEAll_DISABLE))

+#define IS_ETH_SOURCE_ADDR_FILTER(CMD) (((CMD) == ETH_SOURCEADDRFILTER_NORMAL_ENABLE) || \

+                                        ((CMD) == ETH_SOURCEADDRFILTER_INVERSE_ENABLE) || \

+                                        ((CMD) == ETH_SOURCEADDRFILTER_DISABLE))

+#define IS_ETH_CONTROL_FRAMES(PASS) (((PASS) == ETH_PASSCONTROLFRAMES_BLOCKALL) || \

+                                     ((PASS) == ETH_PASSCONTROLFRAMES_FORWARDALL) || \

+                                     ((PASS) == ETH_PASSCONTROLFRAMES_FORWARDPASSEDADDRFILTER))

+#define IS_ETH_BROADCAST_FRAMES_RECEPTION(CMD) (((CMD) == ETH_BROADCASTFRAMESRECEPTION_ENABLE) || \

+                                                ((CMD) == ETH_BROADCASTFRAMESRECEPTION_DISABLE))

+#define IS_ETH_DESTINATION_ADDR_FILTER(FILTER) (((FILTER) == ETH_DESTINATIONADDRFILTER_NORMAL) || \

+                                                ((FILTER) == ETH_DESTINATIONADDRFILTER_INVERSE))

+#define IS_ETH_PROMISCUOUS_MODE(CMD) (((CMD) == ETH_PROMISCUOUS_MODE_ENABLE) || \

+                                      ((CMD) == ETH_PROMISCUOUS_MODE_DISABLE))

+#define IS_ETH_MULTICAST_FRAMES_FILTER(FILTER) (((FILTER) == ETH_MULTICASTFRAMESFILTER_PERFECTHASHTABLE) || \

+                                                ((FILTER) == ETH_MULTICASTFRAMESFILTER_HASHTABLE) || \

+                                                ((FILTER) == ETH_MULTICASTFRAMESFILTER_PERFECT) || \

+                                                ((FILTER) == ETH_MULTICASTFRAMESFILTER_NONE))

+#define IS_ETH_UNICAST_FRAMES_FILTER(FILTER) (((FILTER) == ETH_UNICASTFRAMESFILTER_PERFECTHASHTABLE) || \

+                                              ((FILTER) == ETH_UNICASTFRAMESFILTER_HASHTABLE) || \

+                                              ((FILTER) == ETH_UNICASTFRAMESFILTER_PERFECT))

+#define IS_ETH_PAUSE_TIME(TIME) ((TIME) <= 0xFFFF)

+#define IS_ETH_ZEROQUANTA_PAUSE(CMD)   (((CMD) == ETH_ZEROQUANTAPAUSE_ENABLE) || \

+                                        ((CMD) == ETH_ZEROQUANTAPAUSE_DISABLE))

+#define IS_ETH_PAUSE_LOW_THRESHOLD(THRESHOLD) (((THRESHOLD) == ETH_PAUSELOWTHRESHOLD_MINUS4) || \

+                                               ((THRESHOLD) == ETH_PAUSELOWTHRESHOLD_MINUS28) || \

+                                               ((THRESHOLD) == ETH_PAUSELOWTHRESHOLD_MINUS144) || \

+                                               ((THRESHOLD) == ETH_PAUSELOWTHRESHOLD_MINUS256))

+#define IS_ETH_UNICAST_PAUSE_FRAME_DETECT(CMD) (((CMD) == ETH_UNICASTPAUSEFRAMEDETECT_ENABLE) || \

+                                                ((CMD) == ETH_UNICASTPAUSEFRAMEDETECT_DISABLE))

+#define IS_ETH_RECEIVE_FLOWCONTROL(CMD) (((CMD) == ETH_RECEIVEFLOWCONTROL_ENABLE) || \

+                                         ((CMD) == ETH_RECEIVEFLOWCONTROL_DISABLE))

+#define IS_ETH_TRANSMIT_FLOWCONTROL(CMD) (((CMD) == ETH_TRANSMITFLOWCONTROL_ENABLE) || \

+                                          ((CMD) == ETH_TRANSMITFLOWCONTROL_DISABLE))

+#define IS_ETH_VLAN_TAG_COMPARISON(COMPARISON) (((COMPARISON) == ETH_VLANTAGCOMPARISON_12BIT) || \

+                                                ((COMPARISON) == ETH_VLANTAGCOMPARISON_16BIT))

+#define IS_ETH_VLAN_TAG_IDENTIFIER(IDENTIFIER) ((IDENTIFIER) <= 0xFFFF)

+#define IS_ETH_MAC_ADDRESS0123(ADDRESS) (((ADDRESS) == ETH_MAC_ADDRESS0) || \

+                                         ((ADDRESS) == ETH_MAC_ADDRESS1) || \

+                                         ((ADDRESS) == ETH_MAC_ADDRESS2) || \

+                                         ((ADDRESS) == ETH_MAC_ADDRESS3))

+#define IS_ETH_MAC_ADDRESS123(ADDRESS) (((ADDRESS) == ETH_MAC_ADDRESS1) || \

+                                        ((ADDRESS) == ETH_MAC_ADDRESS2) || \

+                                        ((ADDRESS) == ETH_MAC_ADDRESS3))

+#define IS_ETH_MAC_ADDRESS_FILTER(FILTER) (((FILTER) == ETH_MAC_ADDRESSFILTER_SA) || \

+                                           ((FILTER) == ETH_MAC_ADDRESSFILTER_DA))

+#define IS_ETH_MAC_ADDRESS_MASK(MASK) (((MASK) == ETH_MAC_ADDRESSMASK_BYTE6) || \

+                                       ((MASK) == ETH_MAC_ADDRESSMASK_BYTE5) || \

+                                       ((MASK) == ETH_MAC_ADDRESSMASK_BYTE4) || \

+                                       ((MASK) == ETH_MAC_ADDRESSMASK_BYTE3) || \

+                                       ((MASK) == ETH_MAC_ADDRESSMASK_BYTE2) || \

+                                       ((MASK) == ETH_MAC_ADDRESSMASK_BYTE1))

+#define IS_ETH_DROP_TCPIP_CHECKSUM_FRAME(CMD) (((CMD) == ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE) || \

+                                               ((CMD) == ETH_DROPTCPIPCHECKSUMERRORFRAME_DISABLE))

+#define IS_ETH_RECEIVE_STORE_FORWARD(CMD) (((CMD) == ETH_RECEIVESTOREFORWARD_ENABLE) || \

+                                           ((CMD) == ETH_RECEIVESTOREFORWARD_DISABLE))

+#define IS_ETH_FLUSH_RECEIVE_FRAME(CMD) (((CMD) == ETH_FLUSHRECEIVEDFRAME_ENABLE) || \

+                                         ((CMD) == ETH_FLUSHRECEIVEDFRAME_DISABLE))

+#define IS_ETH_TRANSMIT_STORE_FORWARD(CMD) (((CMD) == ETH_TRANSMITSTOREFORWARD_ENABLE) || \

+                                            ((CMD) == ETH_TRANSMITSTOREFORWARD_DISABLE))

+#define IS_ETH_TRANSMIT_THRESHOLD_CONTROL(THRESHOLD) (((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_64BYTES) || \

+                                                      ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_128BYTES) || \

+                                                      ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_192BYTES) || \

+                                                      ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_256BYTES) || \

+                                                      ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_40BYTES) || \

+                                                      ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_32BYTES) || \

+                                                      ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_24BYTES) || \

+                                                      ((THRESHOLD) == ETH_TRANSMITTHRESHOLDCONTROL_16BYTES))

+#define IS_ETH_FORWARD_ERROR_FRAMES(CMD) (((CMD) == ETH_FORWARDERRORFRAMES_ENABLE) || \

+                                          ((CMD) == ETH_FORWARDERRORFRAMES_DISABLE))

+#define IS_ETH_FORWARD_UNDERSIZED_GOOD_FRAMES(CMD) (((CMD) == ETH_FORWARDUNDERSIZEDGOODFRAMES_ENABLE) || \

+                                                    ((CMD) == ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE))

+#define IS_ETH_RECEIVE_THRESHOLD_CONTROL(THRESHOLD) (((THRESHOLD) == ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES) || \

+                                                     ((THRESHOLD) == ETH_RECEIVEDTHRESHOLDCONTROL_32BYTES) || \

+                                                     ((THRESHOLD) == ETH_RECEIVEDTHRESHOLDCONTROL_96BYTES) || \

+                                                     ((THRESHOLD) == ETH_RECEIVEDTHRESHOLDCONTROL_128BYTES))

+#define IS_ETH_SECOND_FRAME_OPERATE(CMD) (((CMD) == ETH_SECONDFRAMEOPERARTE_ENABLE) || \

+                                          ((CMD) == ETH_SECONDFRAMEOPERARTE_DISABLE))

+#define IS_ETH_ADDRESS_ALIGNED_BEATS(CMD) (((CMD) == ETH_ADDRESSALIGNEDBEATS_ENABLE) || \

+                                           ((CMD) == ETH_ADDRESSALIGNEDBEATS_DISABLE))

+#define IS_ETH_FIXED_BURST(CMD) (((CMD) == ETH_FIXEDBURST_ENABLE) || \

+                                 ((CMD) == ETH_FIXEDBURST_DISABLE))

+#define IS_ETH_RXDMA_BURST_LENGTH(LENGTH) (((LENGTH) == ETH_RXDMABURSTLENGTH_1BEAT) || \

+                                           ((LENGTH) == ETH_RXDMABURSTLENGTH_2BEAT) || \

+                                           ((LENGTH) == ETH_RXDMABURSTLENGTH_4BEAT) || \

+                                           ((LENGTH) == ETH_RXDMABURSTLENGTH_8BEAT) || \

+                                           ((LENGTH) == ETH_RXDMABURSTLENGTH_16BEAT) || \

+                                           ((LENGTH) == ETH_RXDMABURSTLENGTH_32BEAT) || \

+                                           ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_4BEAT) || \

+                                           ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_8BEAT) || \

+                                           ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_16BEAT) || \

+                                           ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_32BEAT) || \

+                                           ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_64BEAT) || \

+                                           ((LENGTH) == ETH_RXDMABURSTLENGTH_4XPBL_128BEAT))

+#define IS_ETH_TXDMA_BURST_LENGTH(LENGTH) (((LENGTH) == ETH_TXDMABURSTLENGTH_1BEAT) || \

+                                           ((LENGTH) == ETH_TXDMABURSTLENGTH_2BEAT) || \

+                                           ((LENGTH) == ETH_TXDMABURSTLENGTH_4BEAT) || \

+                                           ((LENGTH) == ETH_TXDMABURSTLENGTH_8BEAT) || \

+                                           ((LENGTH) == ETH_TXDMABURSTLENGTH_16BEAT) || \

+                                           ((LENGTH) == ETH_TXDMABURSTLENGTH_32BEAT) || \

+                                           ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_4BEAT) || \

+                                           ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_8BEAT) || \

+                                           ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_16BEAT) || \

+                                           ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_32BEAT) || \

+                                           ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_64BEAT) || \

+                                           ((LENGTH) == ETH_TXDMABURSTLENGTH_4XPBL_128BEAT))

+#define IS_ETH_DMA_DESC_SKIP_LENGTH(LENGTH) ((LENGTH) <= 0x1F)

+#define IS_ETH_DMA_ARBITRATION_ROUNDROBIN_RXTX(RATIO) (((RATIO) == ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1) || \

+                                                       ((RATIO) == ETH_DMAARBITRATION_ROUNDROBIN_RXTX_2_1) || \

+                                                       ((RATIO) == ETH_DMAARBITRATION_ROUNDROBIN_RXTX_3_1) || \

+                                                       ((RATIO) == ETH_DMAARBITRATION_ROUNDROBIN_RXTX_4_1) || \

+                                                       ((RATIO) == ETH_DMAARBITRATION_RXPRIORTX))

+#define IS_ETH_DMATXDESC_GET_FLAG(FLAG) (((FLAG) == ETH_DMATXDESC_OWN) || \

+                                         ((FLAG) == ETH_DMATXDESC_IC) || \

+                                         ((FLAG) == ETH_DMATXDESC_LS) || \

+                                         ((FLAG) == ETH_DMATXDESC_FS) || \

+                                         ((FLAG) == ETH_DMATXDESC_DC) || \

+                                         ((FLAG) == ETH_DMATXDESC_DP) || \

+                                         ((FLAG) == ETH_DMATXDESC_TTSE) || \

+                                         ((FLAG) == ETH_DMATXDESC_TER) || \

+                                         ((FLAG) == ETH_DMATXDESC_TCH) || \

+                                         ((FLAG) == ETH_DMATXDESC_TTSS) || \

+                                         ((FLAG) == ETH_DMATXDESC_IHE) || \

+                                         ((FLAG) == ETH_DMATXDESC_ES) || \

+                                         ((FLAG) == ETH_DMATXDESC_JT) || \

+                                         ((FLAG) == ETH_DMATXDESC_FF) || \

+                                         ((FLAG) == ETH_DMATXDESC_PCE) || \

+                                         ((FLAG) == ETH_DMATXDESC_LCA) || \

+                                         ((FLAG) == ETH_DMATXDESC_NC) || \

+                                         ((FLAG) == ETH_DMATXDESC_LCO) || \

+                                         ((FLAG) == ETH_DMATXDESC_EC) || \

+                                         ((FLAG) == ETH_DMATXDESC_VF) || \

+                                         ((FLAG) == ETH_DMATXDESC_CC) || \

+                                         ((FLAG) == ETH_DMATXDESC_ED) || \

+                                         ((FLAG) == ETH_DMATXDESC_UF) || \

+                                         ((FLAG) == ETH_DMATXDESC_DB))

+#define IS_ETH_DMA_TXDESC_SEGMENT(SEGMENT) (((SEGMENT) == ETH_DMATXDESC_LASTSEGMENTS) || \

+                                            ((SEGMENT) == ETH_DMATXDESC_FIRSTSEGMENT))

+#define IS_ETH_DMA_TXDESC_CHECKSUM(CHECKSUM) (((CHECKSUM) == ETH_DMATXDESC_CHECKSUMBYPASS) || \

+                                              ((CHECKSUM) == ETH_DMATXDESC_CHECKSUMIPV4HEADER) || \

+                                              ((CHECKSUM) == ETH_DMATXDESC_CHECKSUMTCPUDPICMPSEGMENT) || \

+                                              ((CHECKSUM) == ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL))

+#define IS_ETH_DMATXDESC_BUFFER_SIZE(SIZE) ((SIZE) <= 0x1FFF)

+#define IS_ETH_DMARXDESC_GET_FLAG(FLAG) (((FLAG) == ETH_DMARXDESC_OWN) || \

+                                         ((FLAG) == ETH_DMARXDESC_AFM) || \

+                                         ((FLAG) == ETH_DMARXDESC_ES) || \

+                                         ((FLAG) == ETH_DMARXDESC_DE) || \

+                                         ((FLAG) == ETH_DMARXDESC_SAF) || \

+                                         ((FLAG) == ETH_DMARXDESC_LE) || \

+                                         ((FLAG) == ETH_DMARXDESC_OE) || \

+                                         ((FLAG) == ETH_DMARXDESC_VLAN) || \

+                                         ((FLAG) == ETH_DMARXDESC_FS) || \

+                                         ((FLAG) == ETH_DMARXDESC_LS) || \

+                                         ((FLAG) == ETH_DMARXDESC_IPV4HCE) || \

+                                         ((FLAG) == ETH_DMARXDESC_LC) || \

+                                         ((FLAG) == ETH_DMARXDESC_FT) || \

+                                         ((FLAG) == ETH_DMARXDESC_RWT) || \

+                                         ((FLAG) == ETH_DMARXDESC_RE) || \

+                                         ((FLAG) == ETH_DMARXDESC_DBE) || \

+                                         ((FLAG) == ETH_DMARXDESC_CE) || \

+                                         ((FLAG) == ETH_DMARXDESC_MAMPCE))

+#define IS_ETH_DMA_RXDESC_BUFFER(BUFFER) (((BUFFER) == ETH_DMARXDESC_BUFFER1) || \

+                                          ((BUFFER) == ETH_DMARXDESC_BUFFER2))

+#define IS_ETH_PMT_GET_FLAG(FLAG) (((FLAG) == ETH_PMT_FLAG_WUFR) || \

+                                   ((FLAG) == ETH_PMT_FLAG_MPR))

+#define IS_ETH_DMA_FLAG(FLAG) ((((FLAG) & (uint32_t)0xC7FE1800) == 0x00) && ((FLAG) != 0x00)) 

+#define IS_ETH_DMA_GET_FLAG(FLAG) (((FLAG) == ETH_DMA_FLAG_TST) || ((FLAG) == ETH_DMA_FLAG_PMT) || \

+                                   ((FLAG) == ETH_DMA_FLAG_MMC) || ((FLAG) == ETH_DMA_FLAG_DATATRANSFERERROR) || \

+                                   ((FLAG) == ETH_DMA_FLAG_READWRITEERROR) || ((FLAG) == ETH_DMA_FLAG_ACCESSERROR) || \

+                                   ((FLAG) == ETH_DMA_FLAG_NIS) || ((FLAG) == ETH_DMA_FLAG_AIS) || \

+                                   ((FLAG) == ETH_DMA_FLAG_ER) || ((FLAG) == ETH_DMA_FLAG_FBE) || \

+                                   ((FLAG) == ETH_DMA_FLAG_ET) || ((FLAG) == ETH_DMA_FLAG_RWT) || \

+                                   ((FLAG) == ETH_DMA_FLAG_RPS) || ((FLAG) == ETH_DMA_FLAG_RBU) || \

+                                   ((FLAG) == ETH_DMA_FLAG_R) || ((FLAG) == ETH_DMA_FLAG_TU) || \

+                                   ((FLAG) == ETH_DMA_FLAG_RO) || ((FLAG) == ETH_DMA_FLAG_TJT) || \

+                                   ((FLAG) == ETH_DMA_FLAG_TBU) || ((FLAG) == ETH_DMA_FLAG_TPS) || \

+                                   ((FLAG) == ETH_DMA_FLAG_T))

+#define IS_ETH_MAC_IT(IT) ((((IT) & (uint32_t)0xFFFFFDF1) == 0x00) && ((IT) != 0x00))

+#define IS_ETH_MAC_GET_IT(IT) (((IT) == ETH_MAC_IT_TST) || ((IT) == ETH_MAC_IT_MMCT) || \

+                               ((IT) == ETH_MAC_IT_MMCR) || ((IT) == ETH_MAC_IT_MMC) || \

+                               ((IT) == ETH_MAC_IT_PMT))

+#define IS_ETH_MAC_GET_FLAG(FLAG) (((FLAG) == ETH_MAC_FLAG_TST) || ((FLAG) == ETH_MAC_FLAG_MMCT) || \

+                                   ((FLAG) == ETH_MAC_FLAG_MMCR) || ((FLAG) == ETH_MAC_FLAG_MMC) || \

+                                   ((FLAG) == ETH_MAC_FLAG_PMT))

+#define IS_ETH_DMA_IT(IT) ((((IT) & (uint32_t)0xC7FE1800) == 0x00) && ((IT) != 0x00))

+#define IS_ETH_DMA_GET_IT(IT) (((IT) == ETH_DMA_IT_TST) || ((IT) == ETH_DMA_IT_PMT) || \

+                               ((IT) == ETH_DMA_IT_MMC) || ((IT) == ETH_DMA_IT_NIS) || \

+                               ((IT) == ETH_DMA_IT_AIS) || ((IT) == ETH_DMA_IT_ER) || \

+                               ((IT) == ETH_DMA_IT_FBE) || ((IT) == ETH_DMA_IT_ET) || \

+                               ((IT) == ETH_DMA_IT_RWT) || ((IT) == ETH_DMA_IT_RPS) || \

+                               ((IT) == ETH_DMA_IT_RBU) || ((IT) == ETH_DMA_IT_R) || \

+                               ((IT) == ETH_DMA_IT_TU) || ((IT) == ETH_DMA_IT_RO) || \

+                               ((IT) == ETH_DMA_IT_TJT) || ((IT) == ETH_DMA_IT_TBU) || \

+                               ((IT) == ETH_DMA_IT_TPS) || ((IT) == ETH_DMA_IT_T))

+#define IS_ETH_DMA_GET_OVERFLOW(OVERFLOW) (((OVERFLOW) == ETH_DMA_OVERFLOW_RXFIFOCOUNTER) || \

+                                           ((OVERFLOW) == ETH_DMA_OVERFLOW_MISSEDFRAMECOUNTER))

+#define IS_ETH_MMC_IT(IT) (((((IT) & (uint32_t)0xFFDF3FFF) == 0x00) || (((IT) & (uint32_t)0xEFFDFF9F) == 0x00)) && \

+                           ((IT) != 0x00))

+#define IS_ETH_MMC_GET_IT(IT) (((IT) == ETH_MMC_IT_TGF) || ((IT) == ETH_MMC_IT_TGFMSC) || \

+                               ((IT) == ETH_MMC_IT_TGFSC) || ((IT) == ETH_MMC_IT_RGUF) || \

+                               ((IT) == ETH_MMC_IT_RFAE) || ((IT) == ETH_MMC_IT_RFCE))

+#define IS_ETH_ENHANCED_DESCRIPTOR_FORMAT(CMD) (((CMD) == ETH_DMAENHANCEDDESCRIPTOR_ENABLE) || \

+                                                ((CMD) == ETH_DMAENHANCEDDESCRIPTOR_DISABLE))

+

+

+/**

+  * @}

+  */

+

+/** @addtogroup ETH_Private_Defines

+  * @{

+  */

+/* Delay to wait when writing to some Ethernet registers */

+#define ETH_REG_WRITE_DELAY ((uint32_t)0x00000001)

+

+/* ETHERNET Errors */

+#define  ETH_SUCCESS            ((uint32_t)0)

+#define  ETH_ERROR              ((uint32_t)1)

+

+/* ETHERNET DMA Tx descriptors Collision Count Shift */

+#define  ETH_DMATXDESC_COLLISION_COUNTSHIFT         ((uint32_t)3)

+

+/* ETHERNET DMA Tx descriptors Buffer2 Size Shift */

+#define  ETH_DMATXDESC_BUFFER2_SIZESHIFT           ((uint32_t)16)

+

+/* ETHERNET DMA Rx descriptors Frame Length Shift */

+#define  ETH_DMARXDESC_FRAME_LENGTHSHIFT           ((uint32_t)16)

+

+/* ETHERNET DMA Rx descriptors Buffer2 Size Shift */

+#define  ETH_DMARXDESC_BUFFER2_SIZESHIFT           ((uint32_t)16)

+

+/* ETHERNET DMA Rx descriptors Frame length Shift */

+#define  ETH_DMARXDESC_FRAMELENGTHSHIFT            ((uint32_t)16)

+

+/* ETHERNET MAC address offsets */

+#define ETH_MAC_ADDR_HBASE    (uint32_t)(ETH_MAC_BASE + (uint32_t)0x40)  /* ETHERNET MAC address high offset */

+#define ETH_MAC_ADDR_LBASE    (uint32_t)(ETH_MAC_BASE + (uint32_t)0x44)  /* ETHERNET MAC address low offset */

+

+/* ETHERNET MACMIIAR register Mask */

+#define ETH_MACMIIAR_CR_MASK    ((uint32_t)0xFFFFFFE3)

+

+/* ETHERNET MACCR register Mask */

+#define ETH_MACCR_CLEAR_MASK    ((uint32_t)0xFF20810F)  

+

+/* ETHERNET MACFCR register Mask */

+#define ETH_MACFCR_CLEAR_MASK   ((uint32_t)0x0000FF41)

+

+/* ETHERNET DMAOMR register Mask */

+#define ETH_DMAOMR_CLEAR_MASK   ((uint32_t)0xF8DE3F23)

+

+/* ETHERNET Remote Wake-up frame register length */

+#define ETH_WAKEUP_REGISTER_LENGTH      8

+

+/* ETHERNET Missed frames counter Shift */

+#define  ETH_DMA_RX_OVERFLOW_MISSEDFRAMES_COUNTERSHIFT     17

+ /**

+  * @}

+  */

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup ETH_Exported_Types ETH Exported Types

+  * @{

+  */

+

+/** 

+  * @brief  HAL State structures definition  

+  */ 

+typedef enum

+{

+  HAL_ETH_STATE_RESET             = 0x00,    /*!< Peripheral not yet Initialized or disabled         */

+  HAL_ETH_STATE_READY             = 0x01,    /*!< Peripheral Initialized and ready for use           */

+  HAL_ETH_STATE_BUSY              = 0x02,    /*!< an internal process is ongoing                     */

+  HAL_ETH_STATE_BUSY_TX           = 0x12,    /*!< Data Transmission process is ongoing               */

+  HAL_ETH_STATE_BUSY_RX           = 0x22,    /*!< Data Reception process is ongoing                  */

+  HAL_ETH_STATE_BUSY_TX_RX        = 0x32,    /*!< Data Transmission and Reception process is ongoing */

+  HAL_ETH_STATE_BUSY_WR           = 0x42,    /*!< Write process is ongoing                           */

+  HAL_ETH_STATE_BUSY_RD           = 0x82,    /*!< Read process is ongoing                            */

+  HAL_ETH_STATE_TIMEOUT           = 0x03,    /*!< Timeout state                                      */

+  HAL_ETH_STATE_ERROR             = 0x04     /*!< Reception process is ongoing                       */

+}HAL_ETH_StateTypeDef;

+

+/** 

+  * @brief  ETH Init Structure definition  

+  */

+

+typedef struct

+{

+  uint32_t             AutoNegotiation;           /*!< Selects or not the AutoNegotiation mode for the external PHY

+                                                           The AutoNegotiation allows an automatic setting of the Speed (10/100Mbps)

+                                                           and the mode (half/full-duplex).

+                                                           This parameter can be a value of @ref ETH_AutoNegotiation */

+

+  uint32_t             Speed;                     /*!< Sets the Ethernet speed: 10/100 Mbps.

+                                                           This parameter can be a value of @ref ETH_Speed */

+

+  uint32_t             DuplexMode;                /*!< Selects the MAC duplex mode: Half-Duplex or Full-Duplex mode

+                                                           This parameter can be a value of @ref ETH_Duplex_Mode */

+  

+  uint16_t             PhyAddress;                /*!< Ethernet PHY address.

+                                                           This parameter must be a number between Min_Data = 0 and Max_Data = 32 */

+  

+  uint8_t             *MACAddr;                   /*!< MAC Address of used Hardware: must be pointer on an array of 6 bytes */

+  

+  uint32_t             RxMode;                    /*!< Selects the Ethernet Rx mode: Polling mode, Interrupt mode.

+                                                           This parameter can be a value of @ref ETH_Rx_Mode */

+  

+  uint32_t             ChecksumMode;              /*!< Selects if the checksum is check by hardware or by software. 

+                                                         This parameter can be a value of @ref ETH_Checksum_Mode */

+  

+  uint32_t             MediaInterface    ;               /*!< Selects the media-independent interface or the reduced media-independent interface. 

+                                                         This parameter can be a value of @ref ETH_Media_Interface */

+

+} ETH_InitTypeDef;

+

+

+ /** 

+  * @brief  ETH MAC Configuration Structure definition  

+  */

+

+typedef struct

+{

+  uint32_t             Watchdog;                  /*!< Selects or not the Watchdog timer

+                                                           When enabled, the MAC allows no more then 2048 bytes to be received.

+                                                           When disabled, the MAC can receive up to 16384 bytes.

+                                                           This parameter can be a value of @ref ETH_Watchdog */  

+

+  uint32_t             Jabber;                    /*!< Selects or not Jabber timer

+                                                           When enabled, the MAC allows no more then 2048 bytes to be sent.

+                                                           When disabled, the MAC can send up to 16384 bytes.

+                                                           This parameter can be a value of @ref ETH_Jabber */

+

+  uint32_t             InterFrameGap;             /*!< Selects the minimum IFG between frames during transmission.

+                                                           This parameter can be a value of @ref ETH_Inter_Frame_Gap */   

+

+  uint32_t             CarrierSense;              /*!< Selects or not the Carrier Sense.

+                                                           This parameter can be a value of @ref ETH_Carrier_Sense */

+

+  uint32_t             ReceiveOwn;                /*!< Selects or not the ReceiveOwn,

+                                                           ReceiveOwn allows the reception of frames when the TX_EN signal is asserted

+                                                           in Half-Duplex mode.

+                                                           This parameter can be a value of @ref ETH_Receive_Own */  

+

+  uint32_t             LoopbackMode;              /*!< Selects or not the internal MAC MII Loopback mode.

+                                                           This parameter can be a value of @ref ETH_Loop_Back_Mode */  

+

+  uint32_t             ChecksumOffload;           /*!< Selects or not the IPv4 checksum checking for received frame payloads' TCP/UDP/ICMP headers.

+                                                           This parameter can be a value of @ref ETH_Checksum_Offload */    

+

+  uint32_t             RetryTransmission;         /*!< Selects or not the MAC attempt retries transmission, based on the settings of BL,

+                                                           when a collision occurs (Half-Duplex mode).

+                                                           This parameter can be a value of @ref ETH_Retry_Transmission */

+

+  uint32_t             AutomaticPadCRCStrip;      /*!< Selects or not the Automatic MAC Pad/CRC Stripping.

+                                                           This parameter can be a value of @ref ETH_Automatic_Pad_CRC_Strip */ 

+

+  uint32_t             BackOffLimit;              /*!< Selects the BackOff limit value.

+                                                           This parameter can be a value of @ref ETH_Back_Off_Limit */

+

+  uint32_t             DeferralCheck;             /*!< Selects or not the deferral check function (Half-Duplex mode).

+                                                           This parameter can be a value of @ref ETH_Deferral_Check */                                                                                                        

+

+  uint32_t             ReceiveAll;                /*!< Selects or not all frames reception by the MAC (No filtering).

+                                                           This parameter can be a value of @ref ETH_Receive_All */   

+

+  uint32_t             SourceAddrFilter;          /*!< Selects the Source Address Filter mode.                                                           

+                                                           This parameter can be a value of @ref ETH_Source_Addr_Filter */                  

+

+  uint32_t             PassControlFrames;         /*!< Sets the forwarding mode of the control frames (including unicast and multicast PAUSE frames)                                                          

+                                                           This parameter can be a value of @ref ETH_Pass_Control_Frames */ 

+

+  uint32_t             BroadcastFramesReception;  /*!< Selects or not the reception of Broadcast Frames.

+                                                           This parameter can be a value of @ref ETH_Broadcast_Frames_Reception */

+

+  uint32_t             DestinationAddrFilter;     /*!< Sets the destination filter mode for both unicast and multicast frames.

+                                                           This parameter can be a value of @ref ETH_Destination_Addr_Filter */ 

+

+  uint32_t             PromiscuousMode;           /*!< Selects or not the Promiscuous Mode

+                                                           This parameter can be a value of @ref ETH_Promiscuous_Mode */

+

+  uint32_t             MulticastFramesFilter;     /*!< Selects the Multicast Frames filter mode: None/HashTableFilter/PerfectFilter/PerfectHashTableFilter.

+                                                           This parameter can be a value of @ref ETH_Multicast_Frames_Filter */ 

+

+  uint32_t             UnicastFramesFilter;       /*!< Selects the Unicast Frames filter mode: HashTableFilter/PerfectFilter/PerfectHashTableFilter.

+                                                           This parameter can be a value of @ref ETH_Unicast_Frames_Filter */ 

+

+  uint32_t             HashTableHigh;             /*!< This field holds the higher 32 bits of Hash table.

+                                                           This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFFFFF */

+

+  uint32_t             HashTableLow;              /*!< This field holds the lower 32 bits of Hash table.

+                                                           This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFFFFFF  */    

+

+  uint32_t             PauseTime;                 /*!< This field holds the value to be used in the Pause Time field in the transmit control frame. 

+                                                           This parameter must be a number between Min_Data = 0x0 and Max_Data = 0xFFFF */

+

+  uint32_t             ZeroQuantaPause;           /*!< Selects or not the automatic generation of Zero-Quanta Pause Control frames.

+                                                           This parameter can be a value of @ref ETH_Zero_Quanta_Pause */  

+

+  uint32_t             PauseLowThreshold;         /*!< This field configures the threshold of the PAUSE to be checked for

+                                                           automatic retransmission of PAUSE Frame.

+                                                           This parameter can be a value of @ref ETH_Pause_Low_Threshold */

+                                                           

+  uint32_t             UnicastPauseFrameDetect;   /*!< Selects or not the MAC detection of the Pause frames (with MAC Address0

+                                                           unicast address and unique multicast address).

+                                                           This parameter can be a value of @ref ETH_Unicast_Pause_Frame_Detect */  

+

+  uint32_t             ReceiveFlowControl;        /*!< Enables or disables the MAC to decode the received Pause frame and

+                                                           disable its transmitter for a specified time (Pause Time)

+                                                           This parameter can be a value of @ref ETH_Receive_Flow_Control */

+

+  uint32_t             TransmitFlowControl;       /*!< Enables or disables the MAC to transmit Pause frames (Full-Duplex mode)

+                                                           or the MAC back-pressure operation (Half-Duplex mode)

+                                                           This parameter can be a value of @ref ETH_Transmit_Flow_Control */     

+

+  uint32_t             VLANTagComparison;         /*!< Selects the 12-bit VLAN identifier or the complete 16-bit VLAN tag for

+                                                           comparison and filtering.

+                                                           This parameter can be a value of @ref ETH_VLAN_Tag_Comparison */ 

+

+  uint32_t             VLANTagIdentifier;         /*!< Holds the VLAN tag identifier for receive frames */

+

+} ETH_MACInitTypeDef;

+

+

+/** 

+  * @brief  ETH DMA Configuration Structure definition  

+  */

+

+typedef struct

+{

+ uint32_t              DropTCPIPChecksumErrorFrame; /*!< Selects or not the Dropping of TCP/IP Checksum Error Frames.

+                                                             This parameter can be a value of @ref ETH_Drop_TCP_IP_Checksum_Error_Frame */ 

+

+  uint32_t             ReceiveStoreForward;         /*!< Enables or disables the Receive store and forward mode.

+                                                             This parameter can be a value of @ref ETH_Receive_Store_Forward */ 

+

+  uint32_t             FlushReceivedFrame;          /*!< Enables or disables the flushing of received frames.

+                                                             This parameter can be a value of @ref ETH_Flush_Received_Frame */ 

+

+  uint32_t             TransmitStoreForward;        /*!< Enables or disables Transmit store and forward mode.

+                                                             This parameter can be a value of @ref ETH_Transmit_Store_Forward */ 

+

+  uint32_t             TransmitThresholdControl;    /*!< Selects or not the Transmit Threshold Control.

+                                                             This parameter can be a value of @ref ETH_Transmit_Threshold_Control */

+

+  uint32_t             ForwardErrorFrames;          /*!< Selects or not the forward to the DMA of erroneous frames.

+                                                             This parameter can be a value of @ref ETH_Forward_Error_Frames */

+

+  uint32_t             ForwardUndersizedGoodFrames; /*!< Enables or disables the Rx FIFO to forward Undersized frames (frames with no Error

+                                                             and length less than 64 bytes) including pad-bytes and CRC)

+                                                             This parameter can be a value of @ref ETH_Forward_Undersized_Good_Frames */

+

+  uint32_t             ReceiveThresholdControl;     /*!< Selects the threshold level of the Receive FIFO.

+                                                             This parameter can be a value of @ref ETH_Receive_Threshold_Control */

+

+  uint32_t             SecondFrameOperate;          /*!< Selects or not the Operate on second frame mode, which allows the DMA to process a second

+                                                             frame of Transmit data even before obtaining the status for the first frame.

+                                                             This parameter can be a value of @ref ETH_Second_Frame_Operate */

+

+  uint32_t             AddressAlignedBeats;         /*!< Enables or disables the Address Aligned Beats.

+                                                             This parameter can be a value of @ref ETH_Address_Aligned_Beats */

+

+  uint32_t             FixedBurst;                  /*!< Enables or disables the AHB Master interface fixed burst transfers.

+                                                             This parameter can be a value of @ref ETH_Fixed_Burst */

+                       

+  uint32_t             RxDMABurstLength;            /*!< Indicates the maximum number of beats to be transferred in one Rx DMA transaction.

+                                                             This parameter can be a value of @ref ETH_Rx_DMA_Burst_Length */ 

+

+  uint32_t             TxDMABurstLength;            /*!< Indicates the maximum number of beats to be transferred in one Tx DMA transaction.

+                                                             This parameter can be a value of @ref ETH_Tx_DMA_Burst_Length */

+  

+  uint32_t             EnhancedDescriptorFormat;    /*!< Enables the enhanced descriptor format.

+                                                             This parameter can be a value of @ref ETH_DMA_Enhanced_descriptor_format */

+

+  uint32_t             DescriptorSkipLength;        /*!< Specifies the number of word to skip between two unchained descriptors (Ring mode)

+                                                             This parameter must be a number between Min_Data = 0 and Max_Data = 32 */                                                             

+

+  uint32_t             DMAArbitration;              /*!< Selects the DMA Tx/Rx arbitration.

+                                                             This parameter can be a value of @ref ETH_DMA_Arbitration */  

+} ETH_DMAInitTypeDef;

+

+

+/** 

+  * @brief  ETH DMA Descriptors data structure definition

+  */ 

+

+typedef struct  

+{

+  __IO uint32_t   Status;           /*!< Status */

+  

+  uint32_t   ControlBufferSize;     /*!< Control and Buffer1, Buffer2 lengths */

+  

+  uint32_t   Buffer1Addr;           /*!< Buffer1 address pointer */

+  

+  uint32_t   Buffer2NextDescAddr;   /*!< Buffer2 or next descriptor address pointer */

+  

+  /*!< Enhanced ETHERNET DMA PTP Descriptors */

+  uint32_t   ExtendedStatus;        /*!< Extended status for PTP receive descriptor */

+  

+  uint32_t   Reserved1;             /*!< Reserved */

+  

+  uint32_t   TimeStampLow;          /*!< Time Stamp Low value for transmit and receive */

+  

+  uint32_t   TimeStampHigh;         /*!< Time Stamp High value for transmit and receive */

+

+} ETH_DMADescTypeDef;

+

+

+/** 

+  * @brief  Received Frame Informations structure definition

+  */ 

+typedef struct  

+{

+  ETH_DMADescTypeDef *FSRxDesc;          /*!< First Segment Rx Desc */

+  

+  ETH_DMADescTypeDef *LSRxDesc;          /*!< Last Segment Rx Desc */

+  

+  uint32_t  SegCount;                    /*!< Segment count */

+  

+  uint32_t length;                       /*!< Frame length */

+  

+  uint32_t buffer;                       /*!< Frame buffer */

+

+} ETH_DMARxFrameInfos;

+

+

+/** 

+  * @brief  ETH Handle Structure definition  

+  */

+  

+typedef struct

+{

+  ETH_TypeDef                *Instance;     /*!< Register base address       */

+  

+  ETH_InitTypeDef            Init;          /*!< Ethernet Init Configuration */

+  

+  uint32_t                   LinkStatus;    /*!< Ethernet link status        */

+  

+  ETH_DMADescTypeDef         *RxDesc;       /*!< Rx descriptor to Get        */

+  

+  ETH_DMADescTypeDef         *TxDesc;       /*!< Tx descriptor to Set        */

+  

+  ETH_DMARxFrameInfos        RxFrameInfos;  /*!< last Rx frame infos         */

+  

+  __IO HAL_ETH_StateTypeDef  State;         /*!< ETH communication state     */

+  

+  HAL_LockTypeDef            Lock;          /*!< ETH Lock                    */

+

+} ETH_HandleTypeDef;

+

+ /**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup ETH_Exported_Constants ETH Exported Constants

+  * @{

+  */

+

+/** @defgroup ETH_Buffers_setting ETH Buffers setting

+  * @{

+  */ 

+#define ETH_MAX_PACKET_SIZE    ((uint32_t)1524)    /*!< ETH_HEADER + ETH_EXTRA + ETH_VLAN_TAG + ETH_MAX_ETH_PAYLOAD + ETH_CRC */

+#define ETH_HEADER               ((uint32_t)14)    /*!< 6 byte Dest addr, 6 byte Src addr, 2 byte length/type */

+#define ETH_CRC                   ((uint32_t)4)    /*!< Ethernet CRC */

+#define ETH_EXTRA                 ((uint32_t)2)    /*!< Extra bytes in some cases */   

+#define ETH_VLAN_TAG              ((uint32_t)4)    /*!< optional 802.1q VLAN Tag */

+#define ETH_MIN_ETH_PAYLOAD       ((uint32_t)46)    /*!< Minimum Ethernet payload size */

+#define ETH_MAX_ETH_PAYLOAD       ((uint32_t)1500)    /*!< Maximum Ethernet payload size */

+#define ETH_JUMBO_FRAME_PAYLOAD   ((uint32_t)9000)    /*!< Jumbo frame payload size */      

+

+ /* Ethernet driver receive buffers are organized in a chained linked-list, when

+    an ethernet packet is received, the Rx-DMA will transfer the packet from RxFIFO

+    to the driver receive buffers memory.

+

+    Depending on the size of the received ethernet packet and the size of 

+    each ethernet driver receive buffer, the received packet can take one or more

+    ethernet driver receive buffer. 

+

+    In below are defined the size of one ethernet driver receive buffer ETH_RX_BUF_SIZE 

+    and the total count of the driver receive buffers ETH_RXBUFNB.

+

+    The configured value for ETH_RX_BUF_SIZE and ETH_RXBUFNB are only provided as 

+    example, they can be reconfigured in the application layer to fit the application 

+    needs */ 

+

+/* Here we configure each Ethernet driver receive buffer to fit the Max size Ethernet

+   packet */

+#ifndef ETH_RX_BUF_SIZE

+ #define ETH_RX_BUF_SIZE         ETH_MAX_PACKET_SIZE 

+#endif

+

+/* 5 Ethernet driver receive buffers are used (in a chained linked list)*/ 

+#ifndef ETH_RXBUFNB

+ #define ETH_RXBUFNB             ((uint32_t)5     /*  5 Rx buffers of size ETH_RX_BUF_SIZE */

+#endif

+

+

+ /* Ethernet driver transmit buffers are organized in a chained linked-list, when

+    an ethernet packet is transmitted, Tx-DMA will transfer the packet from the 

+    driver transmit buffers memory to the TxFIFO.

+

+    Depending on the size of the Ethernet packet to be transmitted and the size of 

+    each ethernet driver transmit buffer, the packet to be transmitted can take 

+    one or more ethernet driver transmit buffer. 

+

+    In below are defined the size of one ethernet driver transmit buffer ETH_TX_BUF_SIZE 

+    and the total count of the driver transmit buffers ETH_TXBUFNB.

+

+    The configured value for ETH_TX_BUF_SIZE and ETH_TXBUFNB are only provided as 

+    example, they can be reconfigured in the application layer to fit the application 

+    needs */ 

+

+/* Here we configure each Ethernet driver transmit buffer to fit the Max size Ethernet

+   packet */

+#ifndef ETH_TX_BUF_SIZE 

+ #define ETH_TX_BUF_SIZE         ETH_MAX_PACKET_SIZE

+#endif

+

+/* 5 ethernet driver transmit buffers are used (in a chained linked list)*/ 

+#ifndef ETH_TXBUFNB

+ #define ETH_TXBUFNB             ((uint32_t)5      /* 5  Tx buffers of size ETH_TX_BUF_SIZE */

+#endif

+

+ /**

+  * @}

+  */

+

+/** @defgroup ETH_DMA_TX_Descriptor ETH DMA TX Descriptor

+  * @{

+  */

+

+/*

+   DMA Tx Descriptor

+  -----------------------------------------------------------------------------------------------

+  TDES0 | OWN(31) | CTRL[30:26] | Reserved[25:24] | CTRL[23:20] | Reserved[19:17] | Status[16:0] |

+  -----------------------------------------------------------------------------------------------

+  TDES1 | Reserved[31:29] | Buffer2 ByteCount[28:16] | Reserved[15:13] | Buffer1 ByteCount[12:0] |

+  -----------------------------------------------------------------------------------------------

+  TDES2 |                         Buffer1 Address [31:0]                                         |

+  -----------------------------------------------------------------------------------------------

+  TDES3 |                   Buffer2 Address [31:0] / Next Descriptor Address [31:0]              |

+  -----------------------------------------------------------------------------------------------

+*/

+

+/** 

+  * @brief  Bit definition of TDES0 register: DMA Tx descriptor status register

+  */ 

+#define ETH_DMATXDESC_OWN                     ((uint32_t)0x80000000)  /*!< OWN bit: descriptor is owned by DMA engine */

+#define ETH_DMATXDESC_IC                      ((uint32_t)0x40000000)  /*!< Interrupt on Completion */

+#define ETH_DMATXDESC_LS                      ((uint32_t)0x20000000)  /*!< Last Segment */

+#define ETH_DMATXDESC_FS                      ((uint32_t)0x10000000)  /*!< First Segment */

+#define ETH_DMATXDESC_DC                      ((uint32_t)0x08000000)  /*!< Disable CRC */

+#define ETH_DMATXDESC_DP                      ((uint32_t)0x04000000)  /*!< Disable Padding */

+#define ETH_DMATXDESC_TTSE                    ((uint32_t)0x02000000)  /*!< Transmit Time Stamp Enable */

+#define ETH_DMATXDESC_CIC                     ((uint32_t)0x00C00000)  /*!< Checksum Insertion Control: 4 cases */

+#define ETH_DMATXDESC_CIC_BYPASS              ((uint32_t)0x00000000)  /*!< Do Nothing: Checksum Engine is bypassed */ 

+#define ETH_DMATXDESC_CIC_IPV4HEADER          ((uint32_t)0x00400000)  /*!< IPV4 header Checksum Insertion */ 

+#define ETH_DMATXDESC_CIC_TCPUDPICMP_SEGMENT  ((uint32_t)0x00800000)  /*!< TCP/UDP/ICMP Checksum Insertion calculated over segment only */ 

+#define ETH_DMATXDESC_CIC_TCPUDPICMP_FULL     ((uint32_t)0x00C00000)  /*!< TCP/UDP/ICMP Checksum Insertion fully calculated */ 

+#define ETH_DMATXDESC_TER                     ((uint32_t)0x00200000)  /*!< Transmit End of Ring */

+#define ETH_DMATXDESC_TCH                     ((uint32_t)0x00100000)  /*!< Second Address Chained */

+#define ETH_DMATXDESC_TTSS                    ((uint32_t)0x00020000)  /*!< Tx Time Stamp Status */

+#define ETH_DMATXDESC_IHE                     ((uint32_t)0x00010000)  /*!< IP Header Error */

+#define ETH_DMATXDESC_ES                      ((uint32_t)0x00008000)  /*!< Error summary: OR of the following bits: UE || ED || EC || LCO || NC || LCA || FF || JT */

+#define ETH_DMATXDESC_JT                      ((uint32_t)0x00004000)  /*!< Jabber Timeout */

+#define ETH_DMATXDESC_FF                      ((uint32_t)0x00002000)  /*!< Frame Flushed: DMA/MTL flushed the frame due to SW flush */

+#define ETH_DMATXDESC_PCE                     ((uint32_t)0x00001000)  /*!< Payload Checksum Error */

+#define ETH_DMATXDESC_LCA                     ((uint32_t)0x00000800)  /*!< Loss of Carrier: carrier lost during transmission */

+#define ETH_DMATXDESC_NC                      ((uint32_t)0x00000400)  /*!< No Carrier: no carrier signal from the transceiver */

+#define ETH_DMATXDESC_LCO                     ((uint32_t)0x00000200)  /*!< Late Collision: transmission aborted due to collision */

+#define ETH_DMATXDESC_EC                      ((uint32_t)0x00000100)  /*!< Excessive Collision: transmission aborted after 16 collisions */

+#define ETH_DMATXDESC_VF                      ((uint32_t)0x00000080)  /*!< VLAN Frame */

+#define ETH_DMATXDESC_CC                      ((uint32_t)0x00000078)  /*!< Collision Count */

+#define ETH_DMATXDESC_ED                      ((uint32_t)0x00000004)  /*!< Excessive Deferral */

+#define ETH_DMATXDESC_UF                      ((uint32_t)0x00000002)  /*!< Underflow Error: late data arrival from the memory */

+#define ETH_DMATXDESC_DB                      ((uint32_t)0x00000001)  /*!< Deferred Bit */

+

+/** 

+  * @brief  Bit definition of TDES1 register

+  */ 

+#define ETH_DMATXDESC_TBS2  ((uint32_t)0x1FFF0000)  /*!< Transmit Buffer2 Size */

+#define ETH_DMATXDESC_TBS1  ((uint32_t)0x00001FFF)  /*!< Transmit Buffer1 Size */

+

+/** 

+  * @brief  Bit definition of TDES2 register

+  */ 

+#define ETH_DMATXDESC_B1AP  ((uint32_t)0xFFFFFFFF)  /*!< Buffer1 Address Pointer */

+

+/** 

+  * @brief  Bit definition of TDES3 register

+  */ 

+#define ETH_DMATXDESC_B2AP  ((uint32_t)0xFFFFFFFF)  /*!< Buffer2 Address Pointer */

+

+  /*---------------------------------------------------------------------------------------------

+  TDES6 |                         Transmit Time Stamp Low [31:0]                                 |

+  -----------------------------------------------------------------------------------------------

+  TDES7 |                         Transmit Time Stamp High [31:0]                                |

+  ----------------------------------------------------------------------------------------------*/

+

+/* Bit definition of TDES6 register */

+ #define ETH_DMAPTPTXDESC_TTSL  ((uint32_t)0xFFFFFFFF)  /* Transmit Time Stamp Low */

+

+/* Bit definition of TDES7 register */

+ #define ETH_DMAPTPTXDESC_TTSH  ((uint32_t)0xFFFFFFFF)  /* Transmit Time Stamp High */

+

+/**

+  * @}

+  */ 

+/** @defgroup ETH_DMA_RX_Descriptor ETH DMA RX Descriptor

+  * @{

+  */

+

+/*

+  DMA Rx Descriptor

+  --------------------------------------------------------------------------------------------------------------------

+  RDES0 | OWN(31) |                                             Status [30:0]                                          |

+  ---------------------------------------------------------------------------------------------------------------------

+  RDES1 | CTRL(31) | Reserved[30:29] | Buffer2 ByteCount[28:16] | CTRL[15:14] | Reserved(13) | Buffer1 ByteCount[12:0] |

+  ---------------------------------------------------------------------------------------------------------------------

+  RDES2 |                                       Buffer1 Address [31:0]                                                 |

+  ---------------------------------------------------------------------------------------------------------------------

+  RDES3 |                          Buffer2 Address [31:0] / Next Descriptor Address [31:0]                             |

+  ---------------------------------------------------------------------------------------------------------------------

+*/

+

+/** 

+  * @brief  Bit definition of RDES0 register: DMA Rx descriptor status register

+  */ 

+#define ETH_DMARXDESC_OWN         ((uint32_t)0x80000000)  /*!< OWN bit: descriptor is owned by DMA engine  */

+#define ETH_DMARXDESC_AFM         ((uint32_t)0x40000000)  /*!< DA Filter Fail for the rx frame  */

+#define ETH_DMARXDESC_FL          ((uint32_t)0x3FFF0000)  /*!< Receive descriptor frame length  */

+#define ETH_DMARXDESC_ES          ((uint32_t)0x00008000)  /*!< Error summary: OR of the following bits: DE || OE || IPC || LC || RWT || RE || CE */

+#define ETH_DMARXDESC_DE          ((uint32_t)0x00004000)  /*!< Descriptor error: no more descriptors for receive frame  */

+#define ETH_DMARXDESC_SAF         ((uint32_t)0x00002000)  /*!< SA Filter Fail for the received frame */

+#define ETH_DMARXDESC_LE          ((uint32_t)0x00001000)  /*!< Frame size not matching with length field */

+#define ETH_DMARXDESC_OE          ((uint32_t)0x00000800)  /*!< Overflow Error: Frame was damaged due to buffer overflow */

+#define ETH_DMARXDESC_VLAN        ((uint32_t)0x00000400)  /*!< VLAN Tag: received frame is a VLAN frame */

+#define ETH_DMARXDESC_FS          ((uint32_t)0x00000200)  /*!< First descriptor of the frame  */

+#define ETH_DMARXDESC_LS          ((uint32_t)0x00000100)  /*!< Last descriptor of the frame  */ 

+#define ETH_DMARXDESC_IPV4HCE     ((uint32_t)0x00000080)  /*!< IPC Checksum Error: Rx Ipv4 header checksum error   */    

+#define ETH_DMARXDESC_LC          ((uint32_t)0x00000040)  /*!< Late collision occurred during reception   */

+#define ETH_DMARXDESC_FT          ((uint32_t)0x00000020)  /*!< Frame type - Ethernet, otherwise 802.3    */

+#define ETH_DMARXDESC_RWT         ((uint32_t)0x00000010)  /*!< Receive Watchdog Timeout: watchdog timer expired during reception    */

+#define ETH_DMARXDESC_RE          ((uint32_t)0x00000008)  /*!< Receive error: error reported by MII interface  */

+#define ETH_DMARXDESC_DBE         ((uint32_t)0x00000004)  /*!< Dribble bit error: frame contains non int multiple of 8 bits  */

+#define ETH_DMARXDESC_CE          ((uint32_t)0x00000002)  /*!< CRC error */

+#define ETH_DMARXDESC_MAMPCE      ((uint32_t)0x00000001)  /*!< Rx MAC Address/Payload Checksum Error: Rx MAC address matched/ Rx Payload Checksum Error */

+

+/** 

+  * @brief  Bit definition of RDES1 register

+  */ 

+#define ETH_DMARXDESC_DIC   ((uint32_t)0x80000000)  /*!< Disable Interrupt on Completion */

+#define ETH_DMARXDESC_RBS2  ((uint32_t)0x1FFF0000)  /*!< Receive Buffer2 Size */

+#define ETH_DMARXDESC_RER   ((uint32_t)0x00008000)  /*!< Receive End of Ring */

+#define ETH_DMARXDESC_RCH   ((uint32_t)0x00004000)  /*!< Second Address Chained */

+#define ETH_DMARXDESC_RBS1  ((uint32_t)0x00001FFF)  /*!< Receive Buffer1 Size */

+

+/** 

+  * @brief  Bit definition of RDES2 register  

+  */ 

+#define ETH_DMARXDESC_B1AP  ((uint32_t)0xFFFFFFFF)  /*!< Buffer1 Address Pointer */

+

+/** 

+  * @brief  Bit definition of RDES3 register  

+  */ 

+#define ETH_DMARXDESC_B2AP  ((uint32_t)0xFFFFFFFF)  /*!< Buffer2 Address Pointer */

+

+/*---------------------------------------------------------------------------------------------------------------------

+  RDES4 |                   Reserved[31:15]              |             Extended Status [14:0]                          |

+  ---------------------------------------------------------------------------------------------------------------------

+  RDES5 |                                            Reserved[31:0]                                                    |

+  ---------------------------------------------------------------------------------------------------------------------

+  RDES6 |                                       Receive Time Stamp Low [31:0]                                          |

+  ---------------------------------------------------------------------------------------------------------------------

+  RDES7 |                                       Receive Time Stamp High [31:0]                                         |

+  --------------------------------------------------------------------------------------------------------------------*/

+

+/* Bit definition of RDES4 register */

+#define ETH_DMAPTPRXDESC_PTPV     ((uint32_t)0x00002000)  /* PTP Version */

+#define ETH_DMAPTPRXDESC_PTPFT    ((uint32_t)0x00001000)  /* PTP Frame Type */

+#define ETH_DMAPTPRXDESC_PTPMT    ((uint32_t)0x00000F00)  /* PTP Message Type */

+  #define ETH_DMAPTPRXDESC_PTPMT_SYNC                      ((uint32_t)0x00000100)  /* SYNC message (all clock types) */

+  #define ETH_DMAPTPRXDESC_PTPMT_FOLLOWUP                  ((uint32_t)0x00000200)  /* FollowUp message (all clock types) */ 

+  #define ETH_DMAPTPRXDESC_PTPMT_DELAYREQ                  ((uint32_t)0x00000300)  /* DelayReq message (all clock types) */ 

+  #define ETH_DMAPTPRXDESC_PTPMT_DELAYRESP                 ((uint32_t)0x00000400)  /* DelayResp message (all clock types) */ 

+  #define ETH_DMAPTPRXDESC_PTPMT_PDELAYREQ_ANNOUNCE        ((uint32_t)0x00000500)  /* PdelayReq message (peer-to-peer transparent clock) or Announce message (Ordinary or Boundary clock) */ 

+  #define ETH_DMAPTPRXDESC_PTPMT_PDELAYRESP_MANAG          ((uint32_t)0x00000600)  /* PdelayResp message (peer-to-peer transparent clock) or Management message (Ordinary or Boundary clock)  */ 

+  #define ETH_DMAPTPRXDESC_PTPMT_PDELAYRESPFOLLOWUP_SIGNAL ((uint32_t)0x00000700)  /* PdelayRespFollowUp message (peer-to-peer transparent clock) or Signaling message (Ordinary or Boundary clock) */           

+#define ETH_DMAPTPRXDESC_IPV6PR   ((uint32_t)0x00000080)  /* IPv6 Packet Received */

+#define ETH_DMAPTPRXDESC_IPV4PR   ((uint32_t)0x00000040)  /* IPv4 Packet Received */

+#define ETH_DMAPTPRXDESC_IPCB  ((uint32_t)0x00000020)  /* IP Checksum Bypassed */

+#define ETH_DMAPTPRXDESC_IPPE  ((uint32_t)0x00000010)  /* IP Payload Error */

+#define ETH_DMAPTPRXDESC_IPHE  ((uint32_t)0x00000008)  /* IP Header Error */

+#define ETH_DMAPTPRXDESC_IPPT  ((uint32_t)0x00000007)  /* IP Payload Type */

+  #define ETH_DMAPTPRXDESC_IPPT_UDP                 ((uint32_t)0x00000001)  /* UDP payload encapsulated in the IP datagram */

+  #define ETH_DMAPTPRXDESC_IPPT_TCP                 ((uint32_t)0x00000002)  /* TCP payload encapsulated in the IP datagram */ 

+  #define ETH_DMAPTPRXDESC_IPPT_ICMP                ((uint32_t)0x00000003)  /* ICMP payload encapsulated in the IP datagram */

+

+/* Bit definition of RDES6 register */

+#define ETH_DMAPTPRXDESC_RTSL  ((uint32_t)0xFFFFFFFF)  /* Receive Time Stamp Low */

+

+/* Bit definition of RDES7 register */

+#define ETH_DMAPTPRXDESC_RTSH  ((uint32_t)0xFFFFFFFF)  /* Receive Time Stamp High */

+/**

+  * @}

+  */

+ /** @defgroup ETH_AutoNegotiation ETH AutoNegotiation 

+  * @{

+  */ 

+#define ETH_AUTONEGOTIATION_ENABLE     ((uint32_t)0x00000001)

+#define ETH_AUTONEGOTIATION_DISABLE    ((uint32_t)0x00000000)

+

+/**

+  * @}

+  */

+/** @defgroup ETH_Speed ETH Speed 

+  * @{

+  */ 

+#define ETH_SPEED_10M        ((uint32_t)0x00000000)

+#define ETH_SPEED_100M       ((uint32_t)0x00004000)

+

+/**

+  * @}

+  */

+/** @defgroup ETH_Duplex_Mode ETH Duplex Mode

+  * @{

+  */ 

+#define ETH_MODE_FULLDUPLEX       ((uint32_t)0x00000800)

+#define ETH_MODE_HALFDUPLEX       ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+/** @defgroup ETH_Rx_Mode ETH Rx Mode

+  * @{

+  */ 

+#define ETH_RXPOLLING_MODE      ((uint32_t)0x00000000)

+#define ETH_RXINTERRUPT_MODE    ((uint32_t)0x00000001)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Checksum_Mode ETH Checksum Mode

+  * @{

+  */ 

+#define ETH_CHECKSUM_BY_HARDWARE      ((uint32_t)0x00000000)

+#define ETH_CHECKSUM_BY_SOFTWARE      ((uint32_t)0x00000001)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Media_Interface ETH Media Interface

+  * @{

+  */ 

+#define ETH_MEDIA_INTERFACE_MII       ((uint32_t)0x00000000)

+#define ETH_MEDIA_INTERFACE_RMII      ((uint32_t)SYSCFG_PMC_MII_RMII_SEL)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Watchdog ETH Watchdog 

+  * @{

+  */ 

+#define ETH_WATCHDOG_ENABLE       ((uint32_t)0x00000000)

+#define ETH_WATCHDOG_DISABLE      ((uint32_t)0x00800000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Jabber ETH Jabber

+  * @{

+  */ 

+#define ETH_JABBER_ENABLE    ((uint32_t)0x00000000)

+#define ETH_JABBER_DISABLE   ((uint32_t)0x00400000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Inter_Frame_Gap ETH Inter Frame Gap 

+  * @{

+  */ 

+#define ETH_INTERFRAMEGAP_96BIT   ((uint32_t)0x00000000)  /*!< minimum IFG between frames during transmission is 96Bit */

+#define ETH_INTERFRAMEGAP_88BIT   ((uint32_t)0x00020000)  /*!< minimum IFG between frames during transmission is 88Bit */

+#define ETH_INTERFRAMEGAP_80BIT   ((uint32_t)0x00040000)  /*!< minimum IFG between frames during transmission is 80Bit */

+#define ETH_INTERFRAMEGAP_72BIT   ((uint32_t)0x00060000)  /*!< minimum IFG between frames during transmission is 72Bit */

+#define ETH_INTERFRAMEGAP_64BIT   ((uint32_t)0x00080000)  /*!< minimum IFG between frames during transmission is 64Bit */

+#define ETH_INTERFRAMEGAP_56BIT   ((uint32_t)0x000A0000)  /*!< minimum IFG between frames during transmission is 56Bit */

+#define ETH_INTERFRAMEGAP_48BIT   ((uint32_t)0x000C0000)  /*!< minimum IFG between frames during transmission is 48Bit */

+#define ETH_INTERFRAMEGAP_40BIT   ((uint32_t)0x000E0000)  /*!< minimum IFG between frames during transmission is 40Bit */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Carrier_Sense ETH Carrier Sense

+  * @{

+  */ 

+#define ETH_CARRIERSENCE_ENABLE   ((uint32_t)0x00000000)

+#define ETH_CARRIERSENCE_DISABLE  ((uint32_t)0x00010000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Receive_Own ETH Receive Own 

+  * @{

+  */ 

+#define ETH_RECEIVEOWN_ENABLE     ((uint32_t)0x00000000)

+#define ETH_RECEIVEOWN_DISABLE    ((uint32_t)0x00002000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Loop_Back_Mode ETH Loop Back Mode 

+  * @{

+  */ 

+#define ETH_LOOPBACKMODE_ENABLE        ((uint32_t)0x00001000)

+#define ETH_LOOPBACKMODE_DISABLE       ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Checksum_Offload ETH Checksum Offload

+  * @{

+  */ 

+#define ETH_CHECKSUMOFFLAOD_ENABLE     ((uint32_t)0x00000400)

+#define ETH_CHECKSUMOFFLAOD_DISABLE    ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Retry_Transmission ETH Retry Transmission

+  * @{

+  */ 

+#define ETH_RETRYTRANSMISSION_ENABLE   ((uint32_t)0x00000000)

+#define ETH_RETRYTRANSMISSION_DISABLE  ((uint32_t)0x00000200)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Automatic_Pad_CRC_Strip ETH Automatic Pad CRC Strip

+  * @{

+  */ 

+#define ETH_AUTOMATICPADCRCSTRIP_ENABLE     ((uint32_t)0x00000080)

+#define ETH_AUTOMATICPADCRCSTRIP_DISABLE    ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Back_Off_Limit ETH Back Off Limit

+  * @{

+  */ 

+#define ETH_BACKOFFLIMIT_10  ((uint32_t)0x00000000)

+#define ETH_BACKOFFLIMIT_8   ((uint32_t)0x00000020)

+#define ETH_BACKOFFLIMIT_4   ((uint32_t)0x00000040)

+#define ETH_BACKOFFLIMIT_1   ((uint32_t)0x00000060)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Deferral_Check ETH Deferral Check

+  * @{

+  */

+#define ETH_DEFFERRALCHECK_ENABLE       ((uint32_t)0x00000010)

+#define ETH_DEFFERRALCHECK_DISABLE      ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Receive_All ETH Receive All

+  * @{

+  */ 

+#define ETH_RECEIVEALL_ENABLE     ((uint32_t)0x80000000)

+#define ETH_RECEIVEAll_DISABLE    ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Source_Addr_Filter ETH Source Addr Filter

+  * @{

+  */ 

+#define ETH_SOURCEADDRFILTER_NORMAL_ENABLE       ((uint32_t)0x00000200)

+#define ETH_SOURCEADDRFILTER_INVERSE_ENABLE      ((uint32_t)0x00000300)

+#define ETH_SOURCEADDRFILTER_DISABLE             ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Pass_Control_Frames ETH Pass Control Frames

+  * @{

+  */ 

+#define ETH_PASSCONTROLFRAMES_BLOCKALL                ((uint32_t)0x00000040)  /*!< MAC filters all control frames from reaching the application */

+#define ETH_PASSCONTROLFRAMES_FORWARDALL              ((uint32_t)0x00000080)  /*!< MAC forwards all control frames to application even if they fail the Address Filter */

+#define ETH_PASSCONTROLFRAMES_FORWARDPASSEDADDRFILTER ((uint32_t)0x000000C0)  /*!< MAC forwards control frames that pass the Address Filter. */ 

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Broadcast_Frames_Reception ETH Broadcast Frames Reception

+  * @{

+  */ 

+#define ETH_BROADCASTFRAMESRECEPTION_ENABLE     ((uint32_t)0x00000000)

+#define ETH_BROADCASTFRAMESRECEPTION_DISABLE    ((uint32_t)0x00000020)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Destination_Addr_Filter ETH Destination Addr Filter

+  * @{

+  */ 

+#define ETH_DESTINATIONADDRFILTER_NORMAL    ((uint32_t)0x00000000)

+#define ETH_DESTINATIONADDRFILTER_INVERSE   ((uint32_t)0x00000008)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Promiscuous_Mode ETH Promiscuous Mode

+  * @{

+  */ 

+#define ETH_PROMISCUOUS_MODE_ENABLE     ((uint32_t)0x00000001)

+#define ETH_PROMISCUOUS_MODE_DISABLE    ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Multicast_Frames_Filter ETH Multicast Frames Filter

+  * @{

+  */ 

+#define ETH_MULTICASTFRAMESFILTER_PERFECTHASHTABLE    ((uint32_t)0x00000404)

+#define ETH_MULTICASTFRAMESFILTER_HASHTABLE           ((uint32_t)0x00000004)

+#define ETH_MULTICASTFRAMESFILTER_PERFECT             ((uint32_t)0x00000000)

+#define ETH_MULTICASTFRAMESFILTER_NONE                ((uint32_t)0x00000010)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Unicast_Frames_Filter ETH Unicast Frames Filter

+  * @{

+  */ 

+#define ETH_UNICASTFRAMESFILTER_PERFECTHASHTABLE ((uint32_t)0x00000402)

+#define ETH_UNICASTFRAMESFILTER_HASHTABLE        ((uint32_t)0x00000002)

+#define ETH_UNICASTFRAMESFILTER_PERFECT          ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Zero_Quanta_Pause ETH Zero Quanta Pause 

+  * @{

+  */ 

+#define ETH_ZEROQUANTAPAUSE_ENABLE     ((uint32_t)0x00000000)

+#define ETH_ZEROQUANTAPAUSE_DISABLE    ((uint32_t)0x00000080)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Pause_Low_Threshold ETH Pause Low Threshold

+  * @{

+  */ 

+#define ETH_PAUSELOWTHRESHOLD_MINUS4        ((uint32_t)0x00000000)  /*!< Pause time minus 4 slot times */

+#define ETH_PAUSELOWTHRESHOLD_MINUS28       ((uint32_t)0x00000010)  /*!< Pause time minus 28 slot times */

+#define ETH_PAUSELOWTHRESHOLD_MINUS144      ((uint32_t)0x00000020)  /*!< Pause time minus 144 slot times */

+#define ETH_PAUSELOWTHRESHOLD_MINUS256      ((uint32_t)0x00000030)  /*!< Pause time minus 256 slot times */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Unicast_Pause_Frame_Detect ETH Unicast Pause Frame Detect

+  * @{

+  */ 

+#define ETH_UNICASTPAUSEFRAMEDETECT_ENABLE  ((uint32_t)0x00000008)

+#define ETH_UNICASTPAUSEFRAMEDETECT_DISABLE ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Receive_Flow_Control ETH Receive Flow Control

+  * @{

+  */ 

+#define ETH_RECEIVEFLOWCONTROL_ENABLE       ((uint32_t)0x00000004)

+#define ETH_RECEIVEFLOWCONTROL_DISABLE      ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Transmit_Flow_Control ETH Transmit Flow Control

+  * @{

+  */ 

+#define ETH_TRANSMITFLOWCONTROL_ENABLE      ((uint32_t)0x00000002)

+#define ETH_TRANSMITFLOWCONTROL_DISABLE     ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_VLAN_Tag_Comparison ETH VLAN Tag Comparison

+  * @{

+  */ 

+#define ETH_VLANTAGCOMPARISON_12BIT    ((uint32_t)0x00010000)

+#define ETH_VLANTAGCOMPARISON_16BIT    ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_MAC_addresses ETH MAC addresses

+  * @{

+  */ 

+#define ETH_MAC_ADDRESS0     ((uint32_t)0x00000000)

+#define ETH_MAC_ADDRESS1     ((uint32_t)0x00000008)

+#define ETH_MAC_ADDRESS2     ((uint32_t)0x00000010)

+#define ETH_MAC_ADDRESS3     ((uint32_t)0x00000018)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_MAC_addresses_filter_SA_DA ETH MAC addresses filter SA DA 

+  * @{

+  */ 

+#define ETH_MAC_ADDRESSFILTER_SA       ((uint32_t)0x00000000)

+#define ETH_MAC_ADDRESSFILTER_DA       ((uint32_t)0x00000008)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_MAC_addresses_filter_Mask_bytes ETH MAC addresses filter Mask bytes

+  * @{

+  */ 

+#define ETH_MAC_ADDRESSMASK_BYTE6      ((uint32_t)0x20000000)  /*!< Mask MAC Address high reg bits [15:8] */

+#define ETH_MAC_ADDRESSMASK_BYTE5      ((uint32_t)0x10000000)  /*!< Mask MAC Address high reg bits [7:0] */

+#define ETH_MAC_ADDRESSMASK_BYTE4      ((uint32_t)0x08000000)  /*!< Mask MAC Address low reg bits [31:24] */

+#define ETH_MAC_ADDRESSMASK_BYTE3      ((uint32_t)0x04000000)  /*!< Mask MAC Address low reg bits [23:16] */

+#define ETH_MAC_ADDRESSMASK_BYTE2      ((uint32_t)0x02000000)  /*!< Mask MAC Address low reg bits [15:8] */

+#define ETH_MAC_ADDRESSMASK_BYTE1      ((uint32_t)0x01000000)  /*!< Mask MAC Address low reg bits [70] */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_MAC_Debug_flags ETH MAC Debug flags

+  * @{

+  */ 

+#define ETH_MAC_TXFIFO_FULL          ((uint32_t)0x02000000)  /* Tx FIFO full */

+#define ETH_MAC_TXFIFONOT_EMPTY      ((uint32_t)0x01000000)  /* Tx FIFO not empty */

+#define ETH_MAC_TXFIFO_WRITE_ACTIVE  ((uint32_t)0x00400000)  /* Tx FIFO write active */

+#define ETH_MAC_TXFIFO_IDLE     ((uint32_t)0x00000000)  /* Tx FIFO read status: Idle */

+#define ETH_MAC_TXFIFO_READ     ((uint32_t)0x00100000)  /* Tx FIFO read status: Read (transferring data to the MAC transmitter) */

+#define ETH_MAC_TXFIFO_WAITING  ((uint32_t)0x00200000)  /* Tx FIFO read status: Waiting for TxStatus from MAC transmitter */

+#define ETH_MAC_TXFIFO_WRITING  ((uint32_t)0x00300000)  /* Tx FIFO read status: Writing the received TxStatus or flushing the TxFIFO */

+#define ETH_MAC_TRANSMISSION_PAUSE     ((uint32_t)0x00080000)  /* MAC transmitter in pause */

+#define ETH_MAC_TRANSMITFRAMECONTROLLER_IDLE            ((uint32_t)0x00000000)  /* MAC transmit frame controller: Idle */

+#define ETH_MAC_TRANSMITFRAMECONTROLLER_WAITING         ((uint32_t)0x00020000)  /* MAC transmit frame controller: Waiting for Status of previous frame or IFG/backoff period to be over */

+#define ETH_MAC_TRANSMITFRAMECONTROLLER_GENRATING_PCF   ((uint32_t)0x00040000)  /* MAC transmit frame controller: Generating and transmitting a Pause control frame (in full duplex mode) */

+#define ETH_MAC_TRANSMITFRAMECONTROLLER_TRANSFERRING    ((uint32_t)0x00060000)  /* MAC transmit frame controller: Transferring input frame for transmission */

+#define ETH_MAC_MII_TRANSMIT_ACTIVE      ((uint32_t)0x00010000)  /* MAC MII transmit engine active */

+#define ETH_MAC_RXFIFO_EMPTY             ((uint32_t)0x00000000)  /* Rx FIFO fill level: empty */

+#define ETH_MAC_RXFIFO_BELOW_THRESHOLD   ((uint32_t)0x00000100)  /* Rx FIFO fill level: fill-level below flow-control de-activate threshold */

+#define ETH_MAC_RXFIFO_ABOVE_THRESHOLD   ((uint32_t)0x00000200)  /* Rx FIFO fill level: fill-level above flow-control activate threshold */

+#define ETH_MAC_RXFIFO_FULL              ((uint32_t)0x00000300)  /* Rx FIFO fill level: full */

+#define ETH_MAC_READCONTROLLER_IDLE            ((uint32_t)0x00000060)  /* Rx FIFO read controller IDLE state */

+#define ETH_MAC_READCONTROLLER_READING_DATA    ((uint32_t)0x00000060)  /* Rx FIFO read controller Reading frame data */

+#define ETH_MAC_READCONTROLLER_READING_STATUS  ((uint32_t)0x00000060)  /* Rx FIFO read controller Reading frame status (or time-stamp) */

+#define ETH_MAC_READCONTROLLER_ FLUSHING       ((uint32_t)0x00000060)  /* Rx FIFO read controller Flushing the frame data and status */

+#define ETH_MAC_RXFIFO_WRITE_ACTIVE     ((uint32_t)0x00000010)  /* Rx FIFO write controller active */

+#define ETH_MAC_SMALL_FIFO_NOTACTIVE    ((uint32_t)0x00000000)  /* MAC small FIFO read / write controllers not active */

+#define ETH_MAC_SMALL_FIFO_READ_ACTIVE  ((uint32_t)0x00000002)  /* MAC small FIFO read controller active */

+#define ETH_MAC_SMALL_FIFO_WRITE_ACTIVE ((uint32_t)0x00000004)  /* MAC small FIFO write controller active */

+#define ETH_MAC_SMALL_FIFO_RW_ACTIVE    ((uint32_t)0x00000006)  /* MAC small FIFO read / write controllers active */

+#define ETH_MAC_MII_RECEIVE_PROTOCOL_ACTIVE   ((uint32_t)0x00000001)  /* MAC MII receive protocol engine active */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Drop_TCP_IP_Checksum_Error_Frame ETH Drop TCP IP Checksum Error Frame

+  * @{

+  */ 

+#define ETH_DROPTCPIPCHECKSUMERRORFRAME_ENABLE   ((uint32_t)0x00000000)

+#define ETH_DROPTCPIPCHECKSUMERRORFRAME_DISABLE  ((uint32_t)0x04000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Receive_Store_Forward ETH Receive Store Forward

+  * @{

+  */ 

+#define ETH_RECEIVESTOREFORWARD_ENABLE      ((uint32_t)0x02000000)

+#define ETH_RECEIVESTOREFORWARD_DISABLE     ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Flush_Received_Frame ETH Flush Received Frame

+  * @{

+  */ 

+#define ETH_FLUSHRECEIVEDFRAME_ENABLE       ((uint32_t)0x00000000)

+#define ETH_FLUSHRECEIVEDFRAME_DISABLE      ((uint32_t)0x01000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Transmit_Store_Forward ETH Transmit Store Forward

+  * @{

+  */ 

+#define ETH_TRANSMITSTOREFORWARD_ENABLE     ((uint32_t)0x00200000)

+#define ETH_TRANSMITSTOREFORWARD_DISABLE    ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Transmit_Threshold_Control ETH Transmit Threshold Control

+  * @{

+  */ 

+#define ETH_TRANSMITTHRESHOLDCONTROL_64BYTES     ((uint32_t)0x00000000)  /*!< threshold level of the MTL Transmit FIFO is 64 Bytes */

+#define ETH_TRANSMITTHRESHOLDCONTROL_128BYTES    ((uint32_t)0x00004000)  /*!< threshold level of the MTL Transmit FIFO is 128 Bytes */

+#define ETH_TRANSMITTHRESHOLDCONTROL_192BYTES    ((uint32_t)0x00008000)  /*!< threshold level of the MTL Transmit FIFO is 192 Bytes */

+#define ETH_TRANSMITTHRESHOLDCONTROL_256BYTES    ((uint32_t)0x0000C000)  /*!< threshold level of the MTL Transmit FIFO is 256 Bytes */

+#define ETH_TRANSMITTHRESHOLDCONTROL_40BYTES     ((uint32_t)0x00010000)  /*!< threshold level of the MTL Transmit FIFO is 40 Bytes */

+#define ETH_TRANSMITTHRESHOLDCONTROL_32BYTES     ((uint32_t)0x00014000)  /*!< threshold level of the MTL Transmit FIFO is 32 Bytes */

+#define ETH_TRANSMITTHRESHOLDCONTROL_24BYTES     ((uint32_t)0x00018000)  /*!< threshold level of the MTL Transmit FIFO is 24 Bytes */

+#define ETH_TRANSMITTHRESHOLDCONTROL_16BYTES     ((uint32_t)0x0001C000)  /*!< threshold level of the MTL Transmit FIFO is 16 Bytes */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Forward_Error_Frames ETH Forward Error Frames

+  * @{

+  */ 

+#define ETH_FORWARDERRORFRAMES_ENABLE       ((uint32_t)0x00000080)

+#define ETH_FORWARDERRORFRAMES_DISABLE      ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Forward_Undersized_Good_Frames ETH Forward Undersized Good Frames

+  * @{

+  */ 

+#define ETH_FORWARDUNDERSIZEDGOODFRAMES_ENABLE   ((uint32_t)0x00000040)

+#define ETH_FORWARDUNDERSIZEDGOODFRAMES_DISABLE  ((uint32_t)0x00000000)     

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Receive_Threshold_Control ETH Receive Threshold Control

+  * @{

+  */ 

+#define ETH_RECEIVEDTHRESHOLDCONTROL_64BYTES      ((uint32_t)0x00000000)  /*!< threshold level of the MTL Receive FIFO is 64 Bytes */

+#define ETH_RECEIVEDTHRESHOLDCONTROL_32BYTES      ((uint32_t)0x00000008)  /*!< threshold level of the MTL Receive FIFO is 32 Bytes */

+#define ETH_RECEIVEDTHRESHOLDCONTROL_96BYTES      ((uint32_t)0x00000010)  /*!< threshold level of the MTL Receive FIFO is 96 Bytes */

+#define ETH_RECEIVEDTHRESHOLDCONTROL_128BYTES     ((uint32_t)0x00000018)  /*!< threshold level of the MTL Receive FIFO is 128 Bytes */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Second_Frame_Operate ETH Second Frame Operate

+  * @{

+  */ 

+#define ETH_SECONDFRAMEOPERARTE_ENABLE       ((uint32_t)0x00000004)

+#define ETH_SECONDFRAMEOPERARTE_DISABLE      ((uint32_t)0x00000000)  

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Address_Aligned_Beats ETH Address Aligned Beats 

+  * @{

+  */ 

+#define ETH_ADDRESSALIGNEDBEATS_ENABLE      ((uint32_t)0x02000000)

+#define ETH_ADDRESSALIGNEDBEATS_DISABLE     ((uint32_t)0x00000000) 

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Fixed_Burst ETH Fixed Burst

+  * @{

+  */ 

+#define ETH_FIXEDBURST_ENABLE     ((uint32_t)0x00010000)

+#define ETH_FIXEDBURST_DISABLE    ((uint32_t)0x00000000) 

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Rx_DMA_Burst_Length ETH Rx DMA Burst Length

+  * @{

+  */ 

+#define ETH_RXDMABURSTLENGTH_1BEAT          ((uint32_t)0x00020000)  /*!< maximum number of beats to be transferred in one RxDMA transaction is 1 */

+#define ETH_RXDMABURSTLENGTH_2BEAT          ((uint32_t)0x00040000)  /*!< maximum number of beats to be transferred in one RxDMA transaction is 2 */

+#define ETH_RXDMABURSTLENGTH_4BEAT          ((uint32_t)0x00080000)  /*!< maximum number of beats to be transferred in one RxDMA transaction is 4 */

+#define ETH_RXDMABURSTLENGTH_8BEAT          ((uint32_t)0x00100000)  /*!< maximum number of beats to be transferred in one RxDMA transaction is 8 */

+#define ETH_RXDMABURSTLENGTH_16BEAT         ((uint32_t)0x00200000)  /*!< maximum number of beats to be transferred in one RxDMA transaction is 16 */

+#define ETH_RXDMABURSTLENGTH_32BEAT         ((uint32_t)0x00400000)  /*!< maximum number of beats to be transferred in one RxDMA transaction is 32 */                

+#define ETH_RXDMABURSTLENGTH_4XPBL_4BEAT    ((uint32_t)0x01020000)  /*!< maximum number of beats to be transferred in one RxDMA transaction is 4 */

+#define ETH_RXDMABURSTLENGTH_4XPBL_8BEAT    ((uint32_t)0x01040000)  /*!< maximum number of beats to be transferred in one RxDMA transaction is 8 */

+#define ETH_RXDMABURSTLENGTH_4XPBL_16BEAT   ((uint32_t)0x01080000)  /*!< maximum number of beats to be transferred in one RxDMA transaction is 16 */

+#define ETH_RXDMABURSTLENGTH_4XPBL_32BEAT   ((uint32_t)0x01100000)  /*!< maximum number of beats to be transferred in one RxDMA transaction is 32 */

+#define ETH_RXDMABURSTLENGTH_4XPBL_64BEAT   ((uint32_t)0x01200000)  /*!< maximum number of beats to be transferred in one RxDMA transaction is 64 */

+#define ETH_RXDMABURSTLENGTH_4XPBL_128BEAT  ((uint32_t)0x01400000)  /*!< maximum number of beats to be transferred in one RxDMA transaction is 128 */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_Tx_DMA_Burst_Length ETH Tx DMA Burst Length

+  * @{

+  */ 

+#define ETH_TXDMABURSTLENGTH_1BEAT          ((uint32_t)0x00000100)  /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 1 */

+#define ETH_TXDMABURSTLENGTH_2BEAT          ((uint32_t)0x00000200)  /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 2 */

+#define ETH_TXDMABURSTLENGTH_4BEAT          ((uint32_t)0x00000400)  /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 4 */

+#define ETH_TXDMABURSTLENGTH_8BEAT          ((uint32_t)0x00000800)  /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 8 */

+#define ETH_TXDMABURSTLENGTH_16BEAT         ((uint32_t)0x00001000)  /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 16 */

+#define ETH_TXDMABURSTLENGTH_32BEAT         ((uint32_t)0x00002000)  /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 32 */                

+#define ETH_TXDMABURSTLENGTH_4XPBL_4BEAT    ((uint32_t)0x01000100)  /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 4 */

+#define ETH_TXDMABURSTLENGTH_4XPBL_8BEAT    ((uint32_t)0x01000200)  /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 8 */

+#define ETH_TXDMABURSTLENGTH_4XPBL_16BEAT   ((uint32_t)0x01000400)  /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 16 */

+#define ETH_TXDMABURSTLENGTH_4XPBL_32BEAT   ((uint32_t)0x01000800)  /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 32 */

+#define ETH_TXDMABURSTLENGTH_4XPBL_64BEAT   ((uint32_t)0x01001000)  /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 64 */

+#define ETH_TXDMABURSTLENGTH_4XPBL_128BEAT  ((uint32_t)0x01002000)  /*!< maximum number of beats to be transferred in one TxDMA (or both) transaction is 128 */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_DMA_Enhanced_descriptor_format ETH DMA Enhanced descriptor format

+  * @{

+  */  

+#define ETH_DMAENHANCEDDESCRIPTOR_ENABLE              ((uint32_t)0x00000080)

+#define ETH_DMAENHANCEDDESCRIPTOR_DISABLE             ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_DMA_Arbitration ETH DMA Arbitration

+  * @{

+  */ 

+#define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_1_1   ((uint32_t)0x00000000)

+#define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_2_1   ((uint32_t)0x00004000)

+#define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_3_1   ((uint32_t)0x00008000)

+#define ETH_DMAARBITRATION_ROUNDROBIN_RXTX_4_1   ((uint32_t)0x0000C000)

+#define ETH_DMAARBITRATION_RXPRIORTX             ((uint32_t)0x00000002)

+/**

+  * @}

+  */

+

+/** @defgroup ETH_DMA_Tx_descriptor_segment ETH DMA Tx descriptor segment

+  * @{

+  */ 

+#define ETH_DMATXDESC_LASTSEGMENTS      ((uint32_t)0x40000000)  /*!< Last Segment */

+#define ETH_DMATXDESC_FIRSTSEGMENT      ((uint32_t)0x20000000)  /*!< First Segment */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_DMA_Tx_descriptor_Checksum_Insertion_Control ETH DMA Tx descriptor Checksum Insertion Control

+  * @{

+  */ 

+#define ETH_DMATXDESC_CHECKSUMBYPASS             ((uint32_t)0x00000000)   /*!< Checksum engine bypass */

+#define ETH_DMATXDESC_CHECKSUMIPV4HEADER         ((uint32_t)0x00400000)   /*!< IPv4 header checksum insertion  */

+#define ETH_DMATXDESC_CHECKSUMTCPUDPICMPSEGMENT  ((uint32_t)0x00800000)   /*!< TCP/UDP/ICMP checksum insertion. Pseudo header checksum is assumed to be present */

+#define ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL     ((uint32_t)0x00C00000)   /*!< TCP/UDP/ICMP checksum fully in hardware including pseudo header */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_DMA_Rx_descriptor_buffers ETH DMA Rx descriptor buffers 

+  * @{

+  */ 

+#define ETH_DMARXDESC_BUFFER1     ((uint32_t)0x00000000)  /*!< DMA Rx Desc Buffer1 */

+#define ETH_DMARXDESC_BUFFER2     ((uint32_t)0x00000001)  /*!< DMA Rx Desc Buffer2 */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_PMT_Flags ETH PMT Flags

+  * @{

+  */ 

+#define ETH_PMT_FLAG_WUFFRPR      ((uint32_t)0x80000000)  /*!< Wake-Up Frame Filter Register Pointer Reset */

+#define ETH_PMT_FLAG_WUFR         ((uint32_t)0x00000040)  /*!< Wake-Up Frame Received */

+#define ETH_PMT_FLAG_MPR          ((uint32_t)0x00000020)  /*!< Magic Packet Received */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_MMC_Tx_Interrupts ETH MMC Tx Interrupts

+  * @{

+  */ 

+#define ETH_MMC_IT_TGF       ((uint32_t)0x00200000)  /*!< When Tx good frame counter reaches half the maximum value */

+#define ETH_MMC_IT_TGFMSC    ((uint32_t)0x00008000)  /*!< When Tx good multi col counter reaches half the maximum value */

+#define ETH_MMC_IT_TGFSC     ((uint32_t)0x00004000)  /*!< When Tx good single col counter reaches half the maximum value */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_MMC_Rx_Interrupts ETH MMC Rx Interrupts

+  * @{

+  */

+#define ETH_MMC_IT_RGUF      ((uint32_t)0x10020000)  /*!< When Rx good unicast frames counter reaches half the maximum value */

+#define ETH_MMC_IT_RFAE      ((uint32_t)0x10000040)  /*!< When Rx alignment error counter reaches half the maximum value */

+#define ETH_MMC_IT_RFCE      ((uint32_t)0x10000020)  /*!< When Rx crc error counter reaches half the maximum value */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_MAC_Flags ETH MAC Flags

+  * @{

+  */ 

+#define ETH_MAC_FLAG_TST     ((uint32_t)0x00000200)  /*!< Time stamp trigger flag (on MAC) */

+#define ETH_MAC_FLAG_MMCT    ((uint32_t)0x00000040)  /*!< MMC transmit flag  */

+#define ETH_MAC_FLAG_MMCR    ((uint32_t)0x00000020)  /*!< MMC receive flag */

+#define ETH_MAC_FLAG_MMC     ((uint32_t)0x00000010)  /*!< MMC flag (on MAC) */

+#define ETH_MAC_FLAG_PMT     ((uint32_t)0x00000008)  /*!< PMT flag (on MAC) */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_DMA_Flags ETH DMA Flags

+  * @{

+  */ 

+#define ETH_DMA_FLAG_TST               ((uint32_t)0x20000000)  /*!< Time-stamp trigger interrupt (on DMA) */

+#define ETH_DMA_FLAG_PMT               ((uint32_t)0x10000000)  /*!< PMT interrupt (on DMA) */

+#define ETH_DMA_FLAG_MMC               ((uint32_t)0x08000000)  /*!< MMC interrupt (on DMA) */

+#define ETH_DMA_FLAG_DATATRANSFERERROR ((uint32_t)0x00800000)  /*!< Error bits 0-Rx DMA, 1-Tx DMA */

+#define ETH_DMA_FLAG_READWRITEERROR    ((uint32_t)0x01000000)  /*!< Error bits 0-write transfer, 1-read transfer */

+#define ETH_DMA_FLAG_ACCESSERROR       ((uint32_t)0x02000000)  /*!< Error bits 0-data buffer, 1-desc. access */

+#define ETH_DMA_FLAG_NIS               ((uint32_t)0x00010000)  /*!< Normal interrupt summary flag */

+#define ETH_DMA_FLAG_AIS               ((uint32_t)0x00008000)  /*!< Abnormal interrupt summary flag */

+#define ETH_DMA_FLAG_ER                ((uint32_t)0x00004000)  /*!< Early receive flag */

+#define ETH_DMA_FLAG_FBE               ((uint32_t)0x00002000)  /*!< Fatal bus error flag */

+#define ETH_DMA_FLAG_ET                ((uint32_t)0x00000400)  /*!< Early transmit flag */

+#define ETH_DMA_FLAG_RWT               ((uint32_t)0x00000200)  /*!< Receive watchdog timeout flag */

+#define ETH_DMA_FLAG_RPS               ((uint32_t)0x00000100)  /*!< Receive process stopped flag */

+#define ETH_DMA_FLAG_RBU               ((uint32_t)0x00000080)  /*!< Receive buffer unavailable flag */

+#define ETH_DMA_FLAG_R                 ((uint32_t)0x00000040)  /*!< Receive flag */

+#define ETH_DMA_FLAG_TU                ((uint32_t)0x00000020)  /*!< Underflow flag */

+#define ETH_DMA_FLAG_RO                ((uint32_t)0x00000010)  /*!< Overflow flag */

+#define ETH_DMA_FLAG_TJT               ((uint32_t)0x00000008)  /*!< Transmit jabber timeout flag */

+#define ETH_DMA_FLAG_TBU               ((uint32_t)0x00000004)  /*!< Transmit buffer unavailable flag */

+#define ETH_DMA_FLAG_TPS               ((uint32_t)0x00000002)  /*!< Transmit process stopped flag */

+#define ETH_DMA_FLAG_T                 ((uint32_t)0x00000001)  /*!< Transmit flag */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_MAC_Interrupts ETH MAC Interrupts 

+  * @{

+  */ 

+#define ETH_MAC_IT_TST       ((uint32_t)0x00000200)  /*!< Time stamp trigger interrupt (on MAC) */

+#define ETH_MAC_IT_MMCT      ((uint32_t)0x00000040)  /*!< MMC transmit interrupt */

+#define ETH_MAC_IT_MMCR      ((uint32_t)0x00000020)  /*!< MMC receive interrupt */

+#define ETH_MAC_IT_MMC       ((uint32_t)0x00000010)  /*!< MMC interrupt (on MAC) */

+#define ETH_MAC_IT_PMT       ((uint32_t)0x00000008)  /*!< PMT interrupt (on MAC) */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_DMA_Interrupts ETH DMA Interrupts 

+  * @{

+  */ 

+#define ETH_DMA_IT_TST       ((uint32_t)0x20000000)  /*!< Time-stamp trigger interrupt (on DMA) */

+#define ETH_DMA_IT_PMT       ((uint32_t)0x10000000)  /*!< PMT interrupt (on DMA) */

+#define ETH_DMA_IT_MMC       ((uint32_t)0x08000000)  /*!< MMC interrupt (on DMA) */

+#define ETH_DMA_IT_NIS       ((uint32_t)0x00010000)  /*!< Normal interrupt summary */

+#define ETH_DMA_IT_AIS       ((uint32_t)0x00008000)  /*!< Abnormal interrupt summary */

+#define ETH_DMA_IT_ER        ((uint32_t)0x00004000)  /*!< Early receive interrupt */

+#define ETH_DMA_IT_FBE       ((uint32_t)0x00002000)  /*!< Fatal bus error interrupt */

+#define ETH_DMA_IT_ET        ((uint32_t)0x00000400)  /*!< Early transmit interrupt */

+#define ETH_DMA_IT_RWT       ((uint32_t)0x00000200)  /*!< Receive watchdog timeout interrupt */

+#define ETH_DMA_IT_RPS       ((uint32_t)0x00000100)  /*!< Receive process stopped interrupt */

+#define ETH_DMA_IT_RBU       ((uint32_t)0x00000080)  /*!< Receive buffer unavailable interrupt */

+#define ETH_DMA_IT_R         ((uint32_t)0x00000040)  /*!< Receive interrupt */

+#define ETH_DMA_IT_TU        ((uint32_t)0x00000020)  /*!< Underflow interrupt */

+#define ETH_DMA_IT_RO        ((uint32_t)0x00000010)  /*!< Overflow interrupt */

+#define ETH_DMA_IT_TJT       ((uint32_t)0x00000008)  /*!< Transmit jabber timeout interrupt */

+#define ETH_DMA_IT_TBU       ((uint32_t)0x00000004)  /*!< Transmit buffer unavailable interrupt */

+#define ETH_DMA_IT_TPS       ((uint32_t)0x00000002)  /*!< Transmit process stopped interrupt */

+#define ETH_DMA_IT_T         ((uint32_t)0x00000001)  /*!< Transmit interrupt */

+/**

+  * @}

+  */

+

+/** @defgroup ETH_DMA_transmit_process_state ETH DMA transmit process state 

+  * @{

+  */ 

+#define ETH_DMA_TRANSMITPROCESS_STOPPED     ((uint32_t)0x00000000)  /*!< Stopped - Reset or Stop Tx Command issued */

+#define ETH_DMA_TRANSMITPROCESS_FETCHING    ((uint32_t)0x00100000)  /*!< Running - fetching the Tx descriptor */

+#define ETH_DMA_TRANSMITPROCESS_WAITING     ((uint32_t)0x00200000)  /*!< Running - waiting for status */

+#define ETH_DMA_TRANSMITPROCESS_READING     ((uint32_t)0x00300000)  /*!< Running - reading the data from host memory */

+#define ETH_DMA_TRANSMITPROCESS_SUSPENDED   ((uint32_t)0x00600000)  /*!< Suspended - Tx Descriptor unavailable */

+#define ETH_DMA_TRANSMITPROCESS_CLOSING     ((uint32_t)0x00700000)  /*!< Running - closing Rx descriptor */

+

+/**

+  * @}

+  */ 

+

+

+/** @defgroup ETH_DMA_receive_process_state ETH DMA receive process state 

+  * @{

+  */ 

+#define ETH_DMA_RECEIVEPROCESS_STOPPED      ((uint32_t)0x00000000)  /*!< Stopped - Reset or Stop Rx Command issued */

+#define ETH_DMA_RECEIVEPROCESS_FETCHING     ((uint32_t)0x00020000)  /*!< Running - fetching the Rx descriptor */

+#define ETH_DMA_RECEIVEPROCESS_WAITING      ((uint32_t)0x00060000)  /*!< Running - waiting for packet */

+#define ETH_DMA_RECEIVEPROCESS_SUSPENDED    ((uint32_t)0x00080000)  /*!< Suspended - Rx Descriptor unavailable */

+#define ETH_DMA_RECEIVEPROCESS_CLOSING      ((uint32_t)0x000A0000)  /*!< Running - closing descriptor */

+#define ETH_DMA_RECEIVEPROCESS_QUEUING      ((uint32_t)0x000E0000)  /*!< Running - queuing the receive frame into host memory */

+

+/**

+  * @}

+  */

+

+/** @defgroup ETH_DMA_overflow ETH DMA overflow

+  * @{

+  */ 

+#define ETH_DMA_OVERFLOW_RXFIFOCOUNTER      ((uint32_t)0x10000000)  /*!< Overflow bit for FIFO overflow counter */

+#define ETH_DMA_OVERFLOW_MISSEDFRAMECOUNTER ((uint32_t)0x00010000)  /*!< Overflow bit for missed frame counter */

+/**

+  * @}

+  */ 

+

+/** @defgroup ETH_EXTI_LINE_WAKEUP ETH EXTI LINE WAKEUP

+  * @{

+  */ 

+#define ETH_EXTI_LINE_WAKEUP              ((uint32_t)0x00080000)  /*!< External interrupt line 19 Connected to the ETH EXTI Line */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup ETH_Exported_Macros ETH Exported Macros

+ *  @brief macros to handle interrupts and specific clock configurations

+ * @{

+ */

+ 

+/** @brief Reset ETH handle state

+  * @param  __HANDLE__: specifies the ETH handle.

+  * @retval None

+  */

+#define __HAL_ETH_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_ETH_STATE_RESET)

+

+/** 

+  * @brief  Checks whether the specified ETHERNET DMA Tx Desc flag is set or not.

+  * @param  __HANDLE__: ETH Handle

+  * @param  __FLAG__: specifies the flag of TDES0 to check.

+  * @retval the ETH_DMATxDescFlag (SET or RESET).

+  */

+#define __HAL_ETH_DMATXDESC_GET_FLAG(__HANDLE__, __FLAG__)             ((__HANDLE__)->TxDesc->Status & (__FLAG__) == (__FLAG__))

+

+/**

+  * @brief  Checks whether the specified ETHERNET DMA Rx Desc flag is set or not.

+  * @param  __HANDLE__: ETH Handle

+  * @param  __FLAG__: specifies the flag of RDES0 to check.

+  * @retval the ETH_DMATxDescFlag (SET or RESET).

+  */

+#define __HAL_ETH_DMARXDESC_GET_FLAG(__HANDLE__, __FLAG__)             ((__HANDLE__)->RxDesc->Status & (__FLAG__) == (__FLAG__))

+

+/**

+  * @brief  Enables the specified DMA Rx Desc receive interrupt.

+  * @param  __HANDLE__: ETH Handle

+  * @retval None

+  */

+#define __HAL_ETH_DMARXDESC_ENABLE_IT(__HANDLE__)                          ((__HANDLE__)->RxDesc->ControlBufferSize &=(~(uint32_t)ETH_DMARXDESC_DIC))

+

+/**

+  * @brief  Disables the specified DMA Rx Desc receive interrupt.

+  * @param  __HANDLE__: ETH Handle

+  * @retval None

+  */

+#define __HAL_ETH_DMARXDESC_DISABLE_IT(__HANDLE__)                         ((__HANDLE__)->RxDesc->ControlBufferSize |= ETH_DMARXDESC_DIC)

+

+/**

+  * @brief  Set the specified DMA Rx Desc Own bit.

+  * @param  __HANDLE__: ETH Handle

+  * @retval None

+  */

+#define __HAL_ETH_DMARXDESC_SET_OWN_BIT(__HANDLE__)                           ((__HANDLE__)->RxDesc->Status |= ETH_DMARXDESC_OWN)

+

+/**

+  * @brief  Returns the specified ETHERNET DMA Tx Desc collision count.

+  * @param  __HANDLE__: ETH Handle                     

+  * @retval The Transmit descriptor collision counter value.

+  */

+#define __HAL_ETH_DMATXDESC_GET_COLLISION_COUNT(__HANDLE__)                   (((__HANDLE__)->TxDesc->Status & ETH_DMATXDESC_CC) >> ETH_DMATXDESC_COLLISION_COUNTSHIFT)

+

+/**

+  * @brief  Set the specified DMA Tx Desc Own bit.

+  * @param  __HANDLE__: ETH Handle

+  * @retval None

+  */

+#define __HAL_ETH_DMATXDESC_SET_OWN_BIT(__HANDLE__)                       ((__HANDLE__)->TxDesc->Status |= ETH_DMATXDESC_OWN)

+

+/**

+  * @brief  Enables the specified DMA Tx Desc Transmit interrupt.

+  * @param  __HANDLE__: ETH Handle                   

+  * @retval None

+  */

+#define __HAL_ETH_DMATXDESC_ENABLE_IT(__HANDLE__)                          ((__HANDLE__)->TxDesc->Status |= ETH_DMATXDESC_IC)

+

+/**

+  * @brief  Disables the specified DMA Tx Desc Transmit interrupt.

+  * @param  __HANDLE__: ETH Handle             

+  * @retval None

+  */

+#define __HAL_ETH_DMATXDESC_DISABLE_IT(__HANDLE__)                          ((__HANDLE__)->TxDesc->Status &= ~ETH_DMATXDESC_IC)

+

+/**

+  * @brief  Selects the specified ETHERNET DMA Tx Desc Checksum Insertion.

+  * @param  __HANDLE__: ETH Handle  

+  * @param  __CHECKSUM__: specifies is the DMA Tx desc checksum insertion.

+  *   This parameter can be one of the following values:

+  *     @arg ETH_DMATXDESC_CHECKSUMBYPASS : Checksum bypass

+  *     @arg ETH_DMATXDESC_CHECKSUMIPV4HEADER : IPv4 header checksum

+  *     @arg ETH_DMATXDESC_CHECKSUMTCPUDPICMPSEGMENT : TCP/UDP/ICMP checksum. Pseudo header checksum is assumed to be present

+  *     @arg ETH_DMATXDESC_CHECKSUMTCPUDPICMPFULL : TCP/UDP/ICMP checksum fully in hardware including pseudo header                                                                

+  * @retval None

+  */

+#define __HAL_ETH_DMATXDESC_CHECKSUM_INSERTION(__HANDLE__, __CHECKSUM__)     ((__HANDLE__)->TxDesc->Status |= (__CHECKSUM__))

+

+/**

+  * @brief  Enables the DMA Tx Desc CRC.

+  * @param  __HANDLE__: ETH Handle 

+  * @retval None

+  */

+#define __HAL_ETH_DMATXDESC_CRC_ENABLE(__HANDLE__)                          ((__HANDLE__)->TxDesc->Status &= ~ETH_DMATXDESC_DC)

+

+/**

+  * @brief  Disables the DMA Tx Desc CRC.

+  * @param  __HANDLE__: ETH Handle 

+  * @retval None

+  */

+#define __HAL_ETH_DMATXDESC_CRC_DISABLE(__HANDLE__)                         ((__HANDLE__)->TxDesc->Status |= ETH_DMATXDESC_DC)

+

+/**

+  * @brief  Enables the DMA Tx Desc padding for frame shorter than 64 bytes.

+  * @param  __HANDLE__: ETH Handle 

+  * @retval None

+  */

+#define __HAL_ETH_DMATXDESC_SHORT_FRAME_PADDING_ENABLE(__HANDLE__)            ((__HANDLE__)->TxDesc->Status &= ~ETH_DMATXDESC_DP)

+

+/**

+  * @brief  Disables the DMA Tx Desc padding for frame shorter than 64 bytes.

+  * @param  __HANDLE__: ETH Handle 

+  * @retval None

+  */

+#define __HAL_ETH_DMATXDESC_SHORT_FRAME_PADDING_DISABLE(__HANDLE__)           ((__HANDLE__)->TxDesc->Status |= ETH_DMATXDESC_DP)

+

+/** 

+ * @brief  Enables the specified ETHERNET MAC interrupts.

+  * @param  __HANDLE__   : ETH Handle

+  * @param  __INTERRUPT__: specifies the ETHERNET MAC interrupt sources to be

+  *   enabled or disabled.

+  *   This parameter can be any combination of the following values:

+  *     @arg ETH_MAC_IT_TST : Time stamp trigger interrupt 

+  *     @arg ETH_MAC_IT_PMT : PMT interrupt 

+  * @retval None

+  */

+#define __HAL_ETH_MAC_ENABLE_IT(__HANDLE__, __INTERRUPT__)                 ((__HANDLE__)->Instance->MACIMR |= (__INTERRUPT__))

+

+/**

+  * @brief  Disables the specified ETHERNET MAC interrupts.

+  * @param  __HANDLE__   : ETH Handle

+  * @param  __INTERRUPT__: specifies the ETHERNET MAC interrupt sources to be

+  *   enabled or disabled.

+  *   This parameter can be any combination of the following values:

+  *     @arg ETH_MAC_IT_TST : Time stamp trigger interrupt 

+  *     @arg ETH_MAC_IT_PMT : PMT interrupt

+  * @retval None

+  */

+#define __HAL_ETH_MAC_DISABLE_IT(__HANDLE__, __INTERRUPT__)                ((__HANDLE__)->Instance->MACIMR &= ~(__INTERRUPT__))

+

+/**

+  * @brief  Initiate a Pause Control Frame (Full-duplex only).

+  * @param  __HANDLE__: ETH Handle

+  * @retval None

+  */

+#define __HAL_ETH_INITIATE_PAUSE_CONTROL_FRAME(__HANDLE__)              ((__HANDLE__)->Instance->MACFCR |= ETH_MACFCR_FCBBPA)

+

+/**

+  * @brief  Checks whether the ETHERNET flow control busy bit is set or not.

+  * @param  __HANDLE__: ETH Handle

+  * @retval The new state of flow control busy status bit (SET or RESET).

+  */

+#define __HAL_ETH_GET_FLOW_CONTROL_BUSY_STATUS(__HANDLE__)               (((__HANDLE__)->Instance->MACFCR & ETH_MACFCR_FCBBPA) == ETH_MACFCR_FCBBPA)

+

+/**

+  * @brief  Enables the MAC Back Pressure operation activation (Half-duplex only).

+  * @param  __HANDLE__: ETH Handle

+  * @retval None

+  */

+#define __HAL_ETH_BACK_PRESSURE_ACTIVATION_ENABLE(__HANDLE__)          ((__HANDLE__)->Instance->MACFCR |= ETH_MACFCR_FCBBPA)

+

+/**

+  * @brief  Disables the MAC BackPressure operation activation (Half-duplex only).

+  * @param  __HANDLE__: ETH Handle

+  * @retval None

+  */

+#define __HAL_ETH_BACK_PRESSURE_ACTIVATION_DISABLE(__HANDLE__)         ((__HANDLE__)->Instance->MACFCR &= ~ETH_MACFCR_FCBBPA)

+

+/**

+  * @brief  Checks whether the specified ETHERNET MAC flag is set or not.

+  * @param  __HANDLE__: ETH Handle

+  * @param  __FLAG__: specifies the flag to check.

+  *   This parameter can be one of the following values:

+  *     @arg ETH_MAC_FLAG_TST  : Time stamp trigger flag   

+  *     @arg ETH_MAC_FLAG_MMCT : MMC transmit flag  

+  *     @arg ETH_MAC_FLAG_MMCR : MMC receive flag   

+  *     @arg ETH_MAC_FLAG_MMC  : MMC flag  

+  *     @arg ETH_MAC_FLAG_PMT  : PMT flag  

+  * @retval The state of ETHERNET MAC flag.

+  */

+#define __HAL_ETH_MAC_GET_FLAG(__HANDLE__, __FLAG__)                   (((__HANDLE__)->Instance->MACSR &( __FLAG__)) == ( __FLAG__))

+

+/** 

+  * @brief  Enables the specified ETHERNET DMA interrupts.

+  * @param  __HANDLE__   : ETH Handle

+  * @param  __INTERRUPT__: specifies the ETHERNET DMA interrupt sources to be

+  *   enabled @ref ETH_DMA_Interrupts

+  * @retval None

+  */

+#define __HAL_ETH_DMA_ENABLE_IT(__HANDLE__, __INTERRUPT__)                 ((__HANDLE__)->Instance->DMAIER |= (__INTERRUPT__))

+

+/**

+  * @brief  Disables the specified ETHERNET DMA interrupts.

+  * @param  __HANDLE__   : ETH Handle

+  * @param  __INTERRUPT__: specifies the ETHERNET DMA interrupt sources to be

+  *   disabled. @ref ETH_DMA_Interrupts

+  * @retval None

+  */

+#define __HAL_ETH_DMA_DISABLE_IT(__HANDLE__, __INTERRUPT__)                ((__HANDLE__)->Instance->DMAIER &= ~(__INTERRUPT__))

+

+/**

+  * @brief  Clears the ETHERNET DMA IT pending bit.

+  * @param  __HANDLE__   : ETH Handle

+  * @param  __INTERRUPT__: specifies the interrupt pending bit to clear. @ref ETH_DMA_Interrupts

+  * @retval None

+  */

+#define __HAL_ETH_DMA_CLEAR_IT(__HANDLE__, __INTERRUPT__)      ((__HANDLE__)->Instance->DMASR =(__INTERRUPT__))

+

+/**

+  * @brief  Checks whether the specified ETHERNET DMA flag is set or not.

+* @param  __HANDLE__: ETH Handle

+  * @param  __FLAG__: specifies the flag to check. @ref ETH_DMA_Flags

+  * @retval The new state of ETH_DMA_FLAG (SET or RESET).

+  */

+#define __HAL_ETH_DMA_GET_FLAG(__HANDLE__, __FLAG__)                   (((__HANDLE__)->Instance->DMASR &( __FLAG__)) == ( __FLAG__))

+

+/**

+  * @brief  Checks whether the specified ETHERNET DMA flag is set or not.

+  * @param  __HANDLE__: ETH Handle

+  * @param  __FLAG__: specifies the flag to clear. @ref ETH_DMA_Flags

+  * @retval The new state of ETH_DMA_FLAG (SET or RESET).

+  */

+#define __HAL_ETH_DMA_CLEAR_FLAG(__HANDLE__, __FLAG__)                 ((__HANDLE__)->Instance->DMASR = (__FLAG__))

+

+/**

+  * @brief  Checks whether the specified ETHERNET DMA overflow flag is set or not.

+  * @param  __HANDLE__: ETH Handle

+  * @param  __OVERFLOW__: specifies the DMA overflow flag to check.

+  *   This parameter can be one of the following values:

+  *     @arg ETH_DMA_OVERFLOW_RXFIFOCOUNTER : Overflow for FIFO Overflows Counter

+  *     @arg ETH_DMA_OVERFLOW_MISSEDFRAMECOUNTER : Overflow for Buffer Unavailable Missed Frame Counter

+  * @retval The state of ETHERNET DMA overflow Flag (SET or RESET).

+  */

+#define __HAL_ETH_GET_DMA_OVERFLOW_STATUS(__HANDLE__, __OVERFLOW__)       (((__HANDLE__)->Instance->DMAMFBOCR & (__OVERFLOW__)) == (__OVERFLOW__))

+

+/**

+  * @brief  Set the DMA Receive status watchdog timer register value

+  * @param  __HANDLE__: ETH Handle

+  * @param  __VALUE__: DMA Receive status watchdog timer register value   

+  * @retval None

+  */

+#define __HAL_ETH_SET_RECEIVE_WATCHDOG_TIMER(__HANDLE__, __VALUE__)       ((__HANDLE__)->Instance->DMARSWTR = (__VALUE__))

+

+/** 

+  * @brief  Enables any unicast packet filtered by the MAC address

+  *   recognition to be a wake-up frame.

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_GLOBAL_UNICAST_WAKEUP_ENABLE(__HANDLE__)               ((__HANDLE__)->Instance->MACPMTCSR |= ETH_MACPMTCSR_GU)

+

+/**

+  * @brief  Disables any unicast packet filtered by the MAC address

+  *   recognition to be a wake-up frame.

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_GLOBAL_UNICAST_WAKEUP_DISABLE(__HANDLE__)              ((__HANDLE__)->Instance->MACPMTCSR &= ~ETH_MACPMTCSR_GU)

+

+/**

+  * @brief  Enables the MAC Wake-Up Frame Detection.

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_WAKEUP_FRAME_DETECTION_ENABLE(__HANDLE__)              ((__HANDLE__)->Instance->MACPMTCSR |= ETH_MACPMTCSR_WFE)

+

+/**

+  * @brief  Disables the MAC Wake-Up Frame Detection.

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_WAKEUP_FRAME_DETECTION_DISABLE(__HANDLE__)             ((__HANDLE__)->Instance->MACPMTCSR &= ~ETH_MACPMTCSR_WFE)

+

+/**

+  * @brief  Enables the MAC Magic Packet Detection.

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_MAGIC_PACKET_DETECTION_ENABLE(__HANDLE__)              ((__HANDLE__)->Instance->MACPMTCSR |= ETH_MACPMTCSR_MPE)

+

+/**

+  * @brief  Disables the MAC Magic Packet Detection.

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_MAGIC_PACKET_DETECTION_DISABLE(__HANDLE__)             ((__HANDLE__)->Instance->MACPMTCSR &= ~ETH_MACPMTCSR_WFE)

+

+/**

+  * @brief  Enables the MAC Power Down.

+  * @param  __HANDLE__: ETH Handle

+  * @retval None

+  */

+#define __HAL_ETH_POWER_DOWN_ENABLE(__HANDLE__)                         ((__HANDLE__)->Instance->MACPMTCSR |= ETH_MACPMTCSR_PD)

+

+/**

+  * @brief  Disables the MAC Power Down.

+  * @param  __HANDLE__: ETH Handle

+  * @retval None

+  */

+#define __HAL_ETH_POWER_DOWN_DISABLE(__HANDLE__)                        ((__HANDLE__)->Instance->MACPMTCSR &= ~ETH_MACPMTCSR_PD)

+

+/**

+  * @brief  Checks whether the specified ETHERNET PMT flag is set or not.

+  * @param  __HANDLE__: ETH Handle.

+  * @param  __FLAG__: specifies the flag to check.

+  *   This parameter can be one of the following values:

+  *     @arg ETH_PMT_FLAG_WUFFRPR : Wake-Up Frame Filter Register Pointer Reset 

+  *     @arg ETH_PMT_FLAG_WUFR    : Wake-Up Frame Received 

+  *     @arg ETH_PMT_FLAG_MPR     : Magic Packet Received

+  * @retval The new state of ETHERNET PMT Flag (SET or RESET).

+  */

+#define __HAL_ETH_GET_PMT_FLAG_STATUS(__HANDLE__, __FLAG__)               (((__HANDLE__)->Instance->MACPMTCSR &( __FLAG__)) == ( __FLAG__))

+

+/** 

+  * @brief  Preset and Initialize the MMC counters to almost-full value: 0xFFFF_FFF0 (full - 16)

+  * @param   __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_MMC_COUNTER_FULL_PRESET(__HANDLE__)                     ((__HANDLE__)->Instance->MMCCR |= (ETH_MMCCR_MCFHP | ETH_MMCCR_MCP))

+

+/**

+  * @brief  Preset and Initialize the MMC counters to almost-half value: 0x7FFF_FFF0 (half - 16)

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_MMC_COUNTER_HALF_PRESET(__HANDLE__)                     do{(__HANDLE__)->Instance->MMCCR &= ~ETH_MMCCR_MCFHP;\

+                                                                          (__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_MCP;} while (0)

+

+/**

+  * @brief  Enables the MMC Counter Freeze.

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_MMC_COUNTER_FREEZE_ENABLE(__HANDLE__)                  ((__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_MCF)

+

+/**

+  * @brief  Disables the MMC Counter Freeze.

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_MMC_COUNTER_FREEZE_DISABLE(__HANDLE__)                 ((__HANDLE__)->Instance->MMCCR &= ~ETH_MMCCR_MCF)

+

+/**

+  * @brief  Enables the MMC Reset On Read.

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_ETH_MMC_RESET_ONREAD_ENABLE(__HANDLE__)                ((__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_ROR)

+

+/**

+  * @brief  Disables the MMC Reset On Read.

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_ETH_MMC_RESET_ONREAD_DISABLE(__HANDLE__)               ((__HANDLE__)->Instance->MMCCR &= ~ETH_MMCCR_ROR)

+

+/**

+  * @brief  Enables the MMC Counter Stop Rollover.

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_ETH_MMC_COUNTER_ROLLOVER_ENABLE(__HANDLE__)            ((__HANDLE__)->Instance->MMCCR &= ~ETH_MMCCR_CSR)

+

+/**

+  * @brief  Disables the MMC Counter Stop Rollover.

+  * @param  __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_ETH_MMC_COUNTER_ROLLOVER_DISABLE(__HANDLE__)           ((__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_CSR)

+

+/**

+  * @brief  Resets the MMC Counters.

+  * @param   __HANDLE__: ETH Handle.

+  * @retval None

+  */

+#define __HAL_ETH_MMC_COUNTERS_RESET(__HANDLE__)                         ((__HANDLE__)->Instance->MMCCR |= ETH_MMCCR_CR)

+

+/**

+  * @brief  Enables the specified ETHERNET MMC Rx interrupts.

+  * @param   __HANDLE__: ETH Handle.

+  * @param  __INTERRUPT__: specifies the ETHERNET MMC interrupt sources to be enabled or disabled.

+  *   This parameter can be one of the following values:  

+  *     @arg ETH_MMC_IT_RGUF  : When Rx good unicast frames counter reaches half the maximum value 

+  *     @arg ETH_MMC_IT_RFAE  : When Rx alignment error counter reaches half the maximum value 

+  *     @arg ETH_MMC_IT_RFCE  : When Rx crc error counter reaches half the maximum value

+  * @retval None

+  */

+#define __HAL_ETH_MMC_RX_IT_ENABLE(__HANDLE__, __INTERRUPT__)               (__HANDLE__)->Instance->MMCRIMR &= ~((__INTERRUPT__) & 0xEFFFFFFF)

+/**

+  * @brief  Disables the specified ETHERNET MMC Rx interrupts.

+  * @param   __HANDLE__: ETH Handle.

+  * @param  __INTERRUPT__: specifies the ETHERNET MMC interrupt sources to be enabled or disabled.

+  *   This parameter can be one of the following values: 

+  *     @arg ETH_MMC_IT_RGUF  : When Rx good unicast frames counter reaches half the maximum value 

+  *     @arg ETH_MMC_IT_RFAE  : When Rx alignment error counter reaches half the maximum value 

+  *     @arg ETH_MMC_IT_RFCE  : When Rx crc error counter reaches half the maximum value

+  * @retval None

+  */

+#define __HAL_ETH_MMC_RX_IT_DISABLE(__HANDLE__, __INTERRUPT__)              (__HANDLE__)->Instance->MMCRIMR |= ((__INTERRUPT__) & 0xEFFFFFFF)

+/**

+  * @brief  Enables the specified ETHERNET MMC Tx interrupts.

+  * @param   __HANDLE__: ETH Handle.

+  * @param  __INTERRUPT__: specifies the ETHERNET MMC interrupt sources to be enabled or disabled.

+  *   This parameter can be one of the following values:  

+  *     @arg ETH_MMC_IT_TGF   : When Tx good frame counter reaches half the maximum value 

+  *     @arg ETH_MMC_IT_TGFMSC: When Tx good multi col counter reaches half the maximum value 

+  *     @arg ETH_MMC_IT_TGFSC : When Tx good single col counter reaches half the maximum value 

+  * @retval None

+  */

+#define __HAL_ETH_MMC_TX_IT_ENABLE(__HANDLE__, __INTERRUPT__)            ((__HANDLE__)->Instance->MMCRIMR &= ~ (__INTERRUPT__))

+

+/**

+  * @brief  Disables the specified ETHERNET MMC Tx interrupts.

+  * @param   __HANDLE__: ETH Handle.

+  * @param  __INTERRUPT__: specifies the ETHERNET MMC interrupt sources to be enabled or disabled.

+  *   This parameter can be one of the following values:  

+  *     @arg ETH_MMC_IT_TGF   : When Tx good frame counter reaches half the maximum value 

+  *     @arg ETH_MMC_IT_TGFMSC: When Tx good multi col counter reaches half the maximum value 

+  *     @arg ETH_MMC_IT_TGFSC : When Tx good single col counter reaches half the maximum value 

+  * @retval None

+  */

+#define __HAL_ETH_MMC_TX_IT_DISABLE(__HANDLE__, __INTERRUPT__)           ((__HANDLE__)->Instance->MMCRIMR |= (__INTERRUPT__))

+

+/**

+  * @brief  Enables the ETH External interrupt line.

+  * @retval None

+  */

+#define __HAL_ETH_WAKEUP_EXTI_ENABLE_IT()    EXTI->IMR |= (ETH_EXTI_LINE_WAKEUP)

+

+/**

+  * @brief  Disables the ETH External interrupt line.

+  * @retval None

+  */

+#define __HAL_ETH_WAKEUP_EXTI_DISABLE_IT()   EXTI->IMR &= ~(ETH_EXTI_LINE_WAKEUP)

+

+/**

+  * @brief Enable event on ETH External event line.

+  * @retval None.

+  */

+#define __HAL_ETH_WAKEUP_EXTI_ENABLE_EVENT()  EXTI->EMR |= (ETH_EXTI_LINE_WAKEUP)

+

+/**

+  * @brief Disable event on ETH External event line

+  * @retval None.

+  */

+#define __HAL_ETH_WAKEUP_EXTI_DISABLE_EVENT() EXTI->EMR &= ~(ETH_EXTI_LINE_WAKEUP)

+

+/**

+  * @brief  Get flag of the ETH External interrupt line.

+  * @retval None

+  */

+#define __HAL_ETH_WAKEUP_EXTI_GET_FLAG()     EXTI->PR & (ETH_EXTI_LINE_WAKEUP)

+

+/**

+  * @brief  Clear flag of the ETH External interrupt line.

+  * @retval None

+  */

+#define __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG()   EXTI->PR = (ETH_EXTI_LINE_WAKEUP)

+

+/**

+  * @brief  Enables rising edge trigger to the ETH External interrupt line.

+  * @retval None

+  */

+#define __HAL_ETH_WAKEUP_EXTI_ENABLE_RISING_EDGE_TRIGGER()  EXTI->RTSR |= ETH_EXTI_LINE_WAKEUP

+                                                            

+/**

+  * @brief  Disables the rising edge trigger to the ETH External interrupt line.

+  * @retval None

+  */

+#define __HAL_ETH_WAKEUP_EXTI_DISABLE_RISING_EDGE_TRIGGER()  EXTI->RTSR &= ~(ETH_EXTI_LINE_WAKEUP)                                                          

+

+/**

+  * @brief  Enables falling edge trigger to the ETH External interrupt line.

+  * @retval None

+  */                                                      

+#define __HAL_ETH_WAKEUP_EXTI_ENABLE_FALLING_EDGE_TRIGGER()  EXTI->FTSR |= (ETH_EXTI_LINE_WAKEUP)

+

+/**

+  * @brief  Disables falling edge trigger to the ETH External interrupt line.

+  * @retval None

+  */

+#define __HAL_ETH_WAKEUP_EXTI_DISABLE_FALLING_EDGE_TRIGGER()  EXTI->FTSR &= ~(ETH_EXTI_LINE_WAKEUP)

+

+/**

+  * @brief  Enables rising/falling edge trigger to the ETH External interrupt line.

+  * @retval None

+  */

+#define __HAL_ETH_WAKEUP_EXTI_ENABLE_FALLINGRISING_TRIGGER()  EXTI->RTSR |= ETH_EXTI_LINE_WAKEUP;\

+                                                              EXTI->FTSR |= ETH_EXTI_LINE_WAKEUP

+

+/**

+  * @brief  Disables rising/falling edge trigger to the ETH External interrupt line.

+  * @retval None

+  */

+#define __HAL_ETH_WAKEUP_EXTI_DISABLE_FALLINGRISING_TRIGGER()  EXTI->RTSR &= ~(ETH_EXTI_LINE_WAKEUP);\

+                                                               EXTI->FTSR &= ~(ETH_EXTI_LINE_WAKEUP)

+

+/**

+  * @brief Generate a Software interrupt on selected EXTI line.

+  * @retval None.

+  */

+#define __HAL_ETH_WAKEUP_EXTI_GENERATE_SWIT()                  EXTI->SWIER|= ETH_EXTI_LINE_WAKEUP

+

+/**

+  * @}

+  */

+/* Exported functions --------------------------------------------------------*/

+

+/** @addtogroup ETH_Exported_Functions

+  * @{

+  */

+

+/* Initialization and de-initialization functions  ****************************/

+

+/** @addtogroup ETH_Exported_Functions_Group1

+  * @{

+  */

+HAL_StatusTypeDef HAL_ETH_Init(ETH_HandleTypeDef *heth);

+HAL_StatusTypeDef HAL_ETH_DeInit(ETH_HandleTypeDef *heth);

+void HAL_ETH_MspInit(ETH_HandleTypeDef *heth);

+void HAL_ETH_MspDeInit(ETH_HandleTypeDef *heth);

+HAL_StatusTypeDef HAL_ETH_DMATxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMATxDescTab, uint8_t* TxBuff, uint32_t TxBuffCount);

+HAL_StatusTypeDef HAL_ETH_DMARxDescListInit(ETH_HandleTypeDef *heth, ETH_DMADescTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount);

+

+/**

+  * @}

+  */

+/* IO operation functions  ****************************************************/

+

+/** @addtogroup ETH_Exported_Functions_Group2

+  * @{

+  */

+HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameLength);

+HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth);

+/* Communication with PHY functions*/

+HAL_StatusTypeDef HAL_ETH_ReadPHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t *RegValue);

+HAL_StatusTypeDef HAL_ETH_WritePHYRegister(ETH_HandleTypeDef *heth, uint16_t PHYReg, uint32_t RegValue);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth);

+void HAL_ETH_IRQHandler(ETH_HandleTypeDef *heth);

+/* Callback in non blocking modes (Interrupt) */

+void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *heth);

+void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth);

+void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth);

+/**

+  * @}

+  */

+

+/* Peripheral Control functions  **********************************************/

+

+/** @addtogroup ETH_Exported_Functions_Group3

+  * @{

+  */

+

+HAL_StatusTypeDef HAL_ETH_Start(ETH_HandleTypeDef *heth);

+HAL_StatusTypeDef HAL_ETH_Stop(ETH_HandleTypeDef *heth);

+HAL_StatusTypeDef HAL_ETH_ConfigMAC(ETH_HandleTypeDef *heth, ETH_MACInitTypeDef *macconf);

+HAL_StatusTypeDef HAL_ETH_ConfigDMA(ETH_HandleTypeDef *heth, ETH_DMAInitTypeDef *dmaconf);

+/**

+  * @}

+  */ 

+

+/* Peripheral State functions  ************************************************/

+

+/** @addtogroup ETH_Exported_Functions_Group4

+  * @{

+  */

+HAL_ETH_StateTypeDef HAL_ETH_GetState(ETH_HandleTypeDef *heth);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_ETH_H */

+

+

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_flash.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_flash.h
new file mode 100644
index 0000000..8696270
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_flash.h
@@ -0,0 +1,390 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_flash.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of FLASH HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_FLASH_H

+#define __STM32F7xx_HAL_FLASH_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup FLASH

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup FLASH_Exported_Types FLASH Exported Types

+  * @{

+  */

+ 

+/**

+  * @brief  FLASH Procedure structure definition

+  */

+typedef enum 

+{

+  FLASH_PROC_NONE = 0, 

+  FLASH_PROC_SECTERASE,

+  FLASH_PROC_MASSERASE,

+  FLASH_PROC_PROGRAM

+} FLASH_ProcedureTypeDef;

+

+

+/** 

+  * @brief  FLASH handle Structure definition  

+  */

+typedef struct

+{

+  __IO FLASH_ProcedureTypeDef ProcedureOnGoing;   /* Internal variable to indicate which procedure is ongoing or not in IT context */

+  

+  __IO uint32_t               NbSectorsToErase;   /* Internal variable to save the remaining sectors to erase in IT context        */

+  

+  __IO uint8_t                VoltageForErase;    /* Internal variable to provide voltage range selected by user in IT context    */

+  

+  __IO uint32_t               Sector;             /* Internal variable to define the current sector which is erasing               */

+  

+  __IO uint32_t               Address;            /* Internal variable to save address selected for program                        */

+  

+  HAL_LockTypeDef             Lock;               /* FLASH locking object                                                          */

+

+  __IO uint32_t               ErrorCode;          /* FLASH error code                    */

+

+}FLASH_ProcessTypeDef;

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup FLASH_Exported_Constants FLASH Exported Constants

+  * @{

+  */  

+

+/** @defgroup FLASH_Error_Code FLASH Error Code

+  * @brief    FLASH Error Code 

+  * @{

+  */ 

+#define HAL_FLASH_ERROR_NONE         ((uint32_t)0x00000000)    /*!< No error                      */

+#define HAL_FLASH_ERROR_ERS          ((uint32_t)0x00000002)    /*!< Programming Sequence error    */

+#define HAL_FLASH_ERROR_PGP          ((uint32_t)0x00000004)    /*!< Programming Parallelism error */

+#define HAL_FLASH_ERROR_PGA          ((uint32_t)0x00000008)    /*!< Programming Alignment error   */

+#define HAL_FLASH_ERROR_WRP          ((uint32_t)0x00000010)    /*!< Write protection error        */

+#define HAL_FLASH_ERROR_OPERATION    ((uint32_t)0x00000020)    /*!< Operation Error               */

+/**

+  * @}

+  */

+  

+/** @defgroup FLASH_Type_Program FLASH Type Program

+  * @{

+  */ 

+#define FLASH_TYPEPROGRAM_BYTE        ((uint32_t)0x00)  /*!< Program byte (8-bit) at a specified address           */

+#define FLASH_TYPEPROGRAM_HALFWORD    ((uint32_t)0x01)  /*!< Program a half-word (16-bit) at a specified address   */

+#define FLASH_TYPEPROGRAM_WORD        ((uint32_t)0x02)  /*!< Program a word (32-bit) at a specified address        */

+#define FLASH_TYPEPROGRAM_DOUBLEWORD  ((uint32_t)0x03)  /*!< Program a double word (64-bit) at a specified address */

+/**

+  * @}

+  */

+

+/** @defgroup FLASH_Flag_definition FLASH Flag definition

+  * @brief Flag definition

+  * @{

+  */ 

+#define FLASH_FLAG_EOP                 FLASH_SR_EOP            /*!< FLASH End of Operation flag               */

+#define FLASH_FLAG_OPERR               FLASH_SR_OPERR          /*!< FLASH operation Error flag                */

+#define FLASH_FLAG_WRPERR              FLASH_SR_WRPERR         /*!< FLASH Write protected error flag          */

+#define FLASH_FLAG_PGAERR              FLASH_SR_PGAERR         /*!< FLASH Programming Alignment error flag    */

+#define FLASH_FLAG_PGPERR              FLASH_SR_PGPERR         /*!< FLASH Programming Parallelism error flag  */

+#define FLASH_FLAG_ERSERR              FLASH_SR_ERSERR         /*!< FLASH Erasing Sequence error flag         */

+#define FLASH_FLAG_BSY                 FLASH_SR_BSY            /*!< FLASH Busy flag                           */ 

+/**

+  * @}

+  */

+

+/** @defgroup FLASH_Interrupt_definition FLASH Interrupt definition

+  * @brief FLASH Interrupt definition

+  * @{

+  */

+#define FLASH_IT_EOP                   FLASH_CR_EOPIE          /*!< End of FLASH Operation Interrupt source */

+#define FLASH_IT_ERR                   ((uint32_t)0x02000000)  /*!< Error Interrupt source                  */

+/**

+  * @}

+  */

+

+/** @defgroup FLASH_Program_Parallelism FLASH Program Parallelism

+  * @{

+  */

+#define FLASH_PSIZE_BYTE           ((uint32_t)0x00000000)

+#define FLASH_PSIZE_HALF_WORD      ((uint32_t)FLASH_CR_PSIZE_0)

+#define FLASH_PSIZE_WORD           ((uint32_t)FLASH_CR_PSIZE_1)

+#define FLASH_PSIZE_DOUBLE_WORD    ((uint32_t)FLASH_CR_PSIZE)

+#define CR_PSIZE_MASK              ((uint32_t)0xFFFFFCFF)

+/**

+  * @}

+  */ 

+

+/** @defgroup FLASH_Keys FLASH Keys

+  * @{

+  */ 

+#define FLASH_KEY1               ((uint32_t)0x45670123)

+#define FLASH_KEY2               ((uint32_t)0xCDEF89AB)

+#define FLASH_OPT_KEY1           ((uint32_t)0x08192A3B)

+#define FLASH_OPT_KEY2           ((uint32_t)0x4C5D6E7F)

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup FLASH_Exported_Macros FLASH Exported Macros

+  * @{

+  */

+/**

+  * @brief  Set the FLASH Latency.

+  * @param  __LATENCY__: FLASH Latency                   

+  *         The value of this parameter depend on device used within the same series

+  * @retval none

+  */

+#define __HAL_FLASH_SET_LATENCY(__LATENCY__) \

+                  MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(__LATENCY__))

+

+				  

+/**

+  * @brief  Enable the FLASH prefetch buffer.

+  * @retval none

+  */ 

+#define __HAL_FLASH_PREFETCH_BUFFER_ENABLE()  (FLASH->ACR |= FLASH_ACR_PRFTEN)

+

+/**

+  * @brief  Disable the FLASH prefetch buffer.

+  * @retval none

+  */ 

+#define __HAL_FLASH_PREFETCH_BUFFER_DISABLE()   (FLASH->ACR &= (~FLASH_ACR_PRFTEN))

+

+/**

+  * @brief  Enable the FLASH Adaptive Real-Time memory accelerator.

+  * @note   The ART accelerator is available only for flash access on ITCM interface.

+  * @retval none

+  */ 

+#define __HAL_FLASH_ART_ENABLE()  SET_BIT(FLASH->ACR, FLASH_ACR_ARTEN)

+

+/**

+  * @brief  Disable the FLASH Adaptive Real-Time memory accelerator.

+  * @retval none

+  */ 

+#define __HAL_FLASH_ART_DISABLE()   CLEAR_BIT(FLASH->ACR, FLASH_ACR_ARTEN)

+

+/**

+  * @brief  Resets the FLASH Adaptive Real-Time memory accelerator.

+  * @note   This function must be used only when the Adaptive Real-Time memory accelerator

+  *         is disabled.  

+  * @retval None

+  */

+#define __HAL_FLASH_ART_RESET()  (FLASH->ACR |= FLASH_ACR_ARTRST)

+

+/**

+  * @brief  Enable the specified FLASH interrupt.

+  * @param  __INTERRUPT__ : FLASH interrupt 

+  *         This parameter can be any combination of the following values:

+  *     @arg FLASH_IT_EOP: End of FLASH Operation Interrupt

+  *     @arg FLASH_IT_ERR: Error Interrupt    

+  * @retval none

+  */  

+#define __HAL_FLASH_ENABLE_IT(__INTERRUPT__)  (FLASH->CR |= (__INTERRUPT__))

+

+/**

+  * @brief  Disable the specified FLASH interrupt.

+  * @param  __INTERRUPT__ : FLASH interrupt 

+  *         This parameter can be any combination of the following values:

+  *     @arg FLASH_IT_EOP: End of FLASH Operation Interrupt

+  *     @arg FLASH_IT_ERR: Error Interrupt    

+  * @retval none

+  */  

+#define __HAL_FLASH_DISABLE_IT(__INTERRUPT__)  (FLASH->CR &= ~(uint32_t)(__INTERRUPT__))

+

+/**

+  * @brief  Get the specified FLASH flag status. 

+  * @param  __FLAG__: specifies the FLASH flag to check.

+  *          This parameter can be one of the following values:

+  *            @arg FLASH_FLAG_EOP   : FLASH End of Operation flag 

+  *            @arg FLASH_FLAG_OPERR : FLASH operation Error flag 

+  *            @arg FLASH_FLAG_WRPERR: FLASH Write protected error flag 

+  *            @arg FLASH_FLAG_PGAERR: FLASH Programming Alignment error flag

+  *            @arg FLASH_FLAG_PGPERR: FLASH Programming Parallelism error flag

+  *            @arg FLASH_FLAG_ERSERR : FLASH Erasing Sequence error flag 

+  *            @arg FLASH_FLAG_BSY   : FLASH Busy flag

+  * @retval The new state of __FLAG__ (SET or RESET).

+  */

+#define __HAL_FLASH_GET_FLAG(__FLAG__)   ((FLASH->SR & (__FLAG__)))

+

+/**

+  * @brief  Clear the specified FLASH flag.

+  * @param  __FLAG__: specifies the FLASH flags to clear.

+  *          This parameter can be any combination of the following values:

+  *            @arg FLASH_FLAG_EOP   : FLASH End of Operation flag 

+  *            @arg FLASH_FLAG_OPERR : FLASH operation Error flag 

+  *            @arg FLASH_FLAG_WRPERR: FLASH Write protected error flag 

+  *            @arg FLASH_FLAG_PGAERR: FLASH Programming Alignment error flag 

+  *            @arg FLASH_FLAG_PGPERR: FLASH Programming Parallelism error flag

+  *            @arg FLASH_FLAG_ERSERR : FLASH Erasing Sequence error flag    

+  * @retval none

+  */

+#define __HAL_FLASH_CLEAR_FLAG(__FLAG__)   (FLASH->SR = (__FLAG__))

+/**

+  * @}

+  */

+

+/* Include FLASH HAL Extension module */

+#include "stm32f7xx_hal_flash_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup FLASH_Exported_Functions

+  * @{

+  */

+/** @addtogroup FLASH_Exported_Functions_Group1

+  * @{

+  */

+/* Program operation functions  ***********************************************/

+HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data);

+HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t Address, uint64_t Data);

+/* FLASH IRQ handler method */

+void HAL_FLASH_IRQHandler(void);

+/* Callbacks in non blocking modes */ 

+void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue);

+void HAL_FLASH_OperationErrorCallback(uint32_t ReturnValue);

+/**

+  * @}

+  */

+

+/** @addtogroup FLASH_Exported_Functions_Group2

+  * @{

+  */

+/* Peripheral Control functions  **********************************************/

+HAL_StatusTypeDef HAL_FLASH_Unlock(void);

+HAL_StatusTypeDef HAL_FLASH_Lock(void);

+HAL_StatusTypeDef HAL_FLASH_OB_Unlock(void);

+HAL_StatusTypeDef HAL_FLASH_OB_Lock(void);

+/* Option bytes control */

+HAL_StatusTypeDef HAL_FLASH_OB_Launch(void);

+/**

+  * @}

+  */

+

+/** @addtogroup FLASH_Exported_Functions_Group3

+  * @{

+  */

+/* Peripheral State functions  ************************************************/

+uint32_t HAL_FLASH_GetError(void);

+HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup FLASH_Private_Variables FLASH Private Variables

+  * @{

+  */

+

+/**

+  * @}

+  */

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup FLASH_Private_Constants FLASH Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup FLASH_Private_Macros FLASH Private Macros

+  * @{

+  */

+

+/** @defgroup FLASH_IS_FLASH_Definitions FLASH Private macros to check input parameters

+  * @{

+  */

+#define IS_FLASH_TYPEPROGRAM(VALUE)(((VALUE) == FLASH_TYPEPROGRAM_BYTE) || \

+                                    ((VALUE) == FLASH_TYPEPROGRAM_HALFWORD) || \

+                                    ((VALUE) == FLASH_TYPEPROGRAM_WORD) || \

+                                    ((VALUE) == FLASH_TYPEPROGRAM_DOUBLEWORD))  

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup FLASH_Private_Functions FLASH Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_FLASH_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_flash_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_flash_ex.h
new file mode 100644
index 0000000..47a297f
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_flash_ex.h
@@ -0,0 +1,468 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_flash_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of FLASH HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_FLASH_EX_H

+#define __STM32F7xx_HAL_FLASH_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup FLASHEx

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup FLASHEx_Exported_Types FLASH Exported Types

+  * @{

+  */

+

+/**

+  * @brief  FLASH Erase structure definition

+  */

+typedef struct

+{

+  uint32_t TypeErase;   /*!< Mass erase or sector Erase.

+                             This parameter can be a value of @ref FLASHEx_Type_Erase */

+

+  uint32_t Sector;      /*!< Initial FLASH sector to erase when Mass erase is disabled

+                             This parameter must be a value of @ref FLASHEx_Sectors */

+

+  uint32_t NbSectors;   /*!< Number of sectors to be erased.

+                             This parameter must be a value between 1 and (max number of sectors - value of Initial sector)*/

+

+  uint32_t VoltageRange;/*!< The device voltage range which defines the erase parallelism

+                             This parameter must be a value of @ref FLASHEx_Voltage_Range */

+

+} FLASH_EraseInitTypeDef;

+

+/**

+  * @brief  FLASH Option Bytes Program structure definition

+  */

+typedef struct

+{

+  uint32_t OptionType;   /*!< Option byte to be configured.

+                              This parameter can be a value of @ref FLASHEx_Option_Type */

+

+  uint32_t WRPState;     /*!< Write protection activation or deactivation.

+                              This parameter can be a value of @ref FLASHEx_WRP_State */

+

+  uint32_t WRPSector;         /*!< Specifies the sector(s) to be write protected.

+                              The value of this parameter depend on device used within the same series */

+

+  uint32_t RDPLevel;     /*!< Set the read protection level.

+                              This parameter can be a value of @ref FLASHEx_Option_Bytes_Read_Protection */

+

+  uint32_t BORLevel;     /*!< Set the BOR Level.

+                              This parameter can be a value of @ref FLASHEx_BOR_Reset_Level */

+

+  uint32_t USERConfig;   /*!< Program the FLASH User Option Byte: WWDG_SW / IWDG_SW / RST_STOP / RST_STDBY / 

+                              IWDG_FREEZE_STOP / IWDG_FREEZE_SANDBY. */

+ 

+  uint32_t BootAddr0;    /*!< Boot base address when Boot pin = 0.

+                              This parameter can be a value of @ref FLASHEx_Boot_Address */

+

+  uint32_t BootAddr1;    /*!< Boot base address when Boot pin = 1.

+                              This parameter can be a value of @ref FLASHEx_Boot_Address */

+

+} FLASH_OBProgramInitTypeDef;

+

+/**

+  * @}

+  */

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup FLASHEx_Exported_Constants FLASH Exported Constants

+  * @{

+  */

+

+/** @defgroup FLASHEx_Type_Erase FLASH Type Erase

+  * @{

+  */ 

+#define FLASH_TYPEERASE_SECTORS         ((uint32_t)0x00)  /*!< Sectors erase only          */

+#define FLASH_TYPEERASE_MASSERASE       ((uint32_t)0x01)  /*!< Flash Mass erase activation */

+/**

+  * @}

+  */

+  

+/** @defgroup FLASHEx_Voltage_Range FLASH Voltage Range

+  * @{

+  */ 

+#define FLASH_VOLTAGE_RANGE_1        ((uint32_t)0x00)  /*!< Device operating range: 1.8V to 2.1V                */

+#define FLASH_VOLTAGE_RANGE_2        ((uint32_t)0x01)  /*!< Device operating range: 2.1V to 2.7V                */

+#define FLASH_VOLTAGE_RANGE_3        ((uint32_t)0x02)  /*!< Device operating range: 2.7V to 3.6V                */

+#define FLASH_VOLTAGE_RANGE_4        ((uint32_t)0x03)  /*!< Device operating range: 2.7V to 3.6V + External Vpp */

+/**

+  * @}

+  */

+  

+/** @defgroup FLASHEx_WRP_State FLASH WRP State

+  * @{

+  */ 

+#define OB_WRPSTATE_DISABLE       ((uint32_t)0x00)  /*!< Disable the write protection of the desired bank 1 sectors */

+#define OB_WRPSTATE_ENABLE        ((uint32_t)0x01)  /*!< Enable the write protection of the desired bank 1 sectors  */

+/**

+  * @}

+  */

+  

+/** @defgroup FLASHEx_Option_Type FLASH Option Type

+  * @{

+  */ 

+#define OPTIONBYTE_WRP         ((uint32_t)0x01)  /*!< WRP option byte configuration  */

+#define OPTIONBYTE_RDP         ((uint32_t)0x02)  /*!< RDP option byte configuration  */

+#define OPTIONBYTE_USER        ((uint32_t)0x04)  /*!< USER option byte configuration */

+#define OPTIONBYTE_BOR         ((uint32_t)0x08)  /*!< BOR option byte configuration  */

+#define OPTIONBYTE_BOOTADDR_0  ((uint32_t)0x10)  /*!< Boot 0 Address configuration   */

+#define OPTIONBYTE_BOOTADDR_1  ((uint32_t)0x20)  /*!< Boot 1 Address configuration   */

+/**

+  * @}

+  */

+  

+/** @defgroup FLASHEx_Option_Bytes_Read_Protection FLASH Option Bytes Read Protection

+  * @{

+  */

+#define OB_RDP_LEVEL_0       ((uint32_t)0xAA00)

+#define OB_RDP_LEVEL_1       ((uint32_t)0x5500)

+/*#define OB_RDP_LEVEL_2   ((uint32_t)0xCC)*/ /*!< Warning: When enabling read protection level 2 

+                                                  it s no more possible to go back to level 1 or 0 */

+/**

+  * @}

+  */ 

+  

+/** @defgroup FLASHEx_Option_Bytes_WWatchdog FLASH Option Bytes WWatchdog

+  * @{

+  */ 

+#define OB_WWDG_SW           ((uint32_t)0x10)  /*!< Software WWDG selected */

+#define OB_WWDG_HW           ((uint32_t)0x00)  /*!< Hardware WWDG selected */

+/**

+  * @}

+  */ 

+  

+

+/** @defgroup FLASHEx_Option_Bytes_IWatchdog FLASH Option Bytes IWatchdog

+  * @{

+  */ 

+#define OB_IWDG_SW           ((uint32_t)0x20)  /*!< Software IWDG selected */

+#define OB_IWDG_HW           ((uint32_t)0x00)  /*!< Hardware IWDG selected */

+/**

+  * @}

+  */ 

+

+/** @defgroup FLASHEx_Option_Bytes_nRST_STOP FLASH Option Bytes nRST_STOP

+  * @{

+  */ 

+#define OB_STOP_NO_RST       ((uint32_t)0x40) /*!< No reset generated when entering in STOP */

+#define OB_STOP_RST          ((uint32_t)0x00) /*!< Reset generated when entering in STOP    */

+/**

+  * @}

+  */ 

+

+/** @defgroup FLASHEx_Option_Bytes_nRST_STDBY FLASH Option Bytes nRST_STDBY

+  * @{

+  */                               

+#define OB_STDBY_NO_RST      ((uint32_t)0x80) /*!< No reset generated when entering in STANDBY */

+#define OB_STDBY_RST         ((uint32_t)0x00) /*!< Reset generated when entering in STANDBY    */

+/**

+  * @}

+  */

+

+/** @defgroup FLASHEx_Option_Bytes_IWDG_FREEZE_STOP FLASH IWDG Counter Freeze in STOP

+  * @{

+  */

+#define OB_IWDG_STOP_FREEZE      ((uint32_t)0x00000000) /*!< Freeze IWDG counter in STOP mode */

+#define OB_IWDG_STOP_ACTIVE      ((uint32_t)0x40000000) /*!< IWDG counter active in STOP mode */

+/**

+  * @}

+  */

+

+/** @defgroup FLASHEx_Option_Bytes_IWDG_FREEZE_SANDBY FLASH IWDG Counter Freeze in STANDBY

+  * @{

+  */

+#define OB_IWDG_STDBY_FREEZE      ((uint32_t)0x00000000) /*!< Freeze IWDG counter in STANDBY mode */

+#define OB_IWDG_STDBY_ACTIVE      ((uint32_t)0x40000000) /*!< IWDG counter active in STANDBY mode */

+/**

+  * @}

+  */

+

+/** @defgroup FLASHEx_BOR_Reset_Level FLASH BOR Reset Level

+  * @{

+  */

+#define OB_BOR_LEVEL3          ((uint32_t)0x00)  /*!< Supply voltage ranges from 2.70 to 3.60 V */

+#define OB_BOR_LEVEL2          ((uint32_t)0x04)  /*!< Supply voltage ranges from 2.40 to 2.70 V */

+#define OB_BOR_LEVEL1          ((uint32_t)0x08)  /*!< Supply voltage ranges from 2.10 to 2.40 V */

+#define OB_BOR_OFF             ((uint32_t)0x0C)  /*!< Supply voltage ranges from 1.62 to 2.10 V */

+

+/**

+  * @}

+  */

+  

+/** @defgroup FLASHEx_Boot_Address FLASH Boot Address

+  * @{

+  */

+#define OB_BOOTADDR_ITCM_RAM         ((uint32_t)0x0000)  /*!< Boot from ITCM RAM (0x00000000)                 */

+#define OB_BOOTADDR_SYSTEM           ((uint32_t)0x0040)  /*!< Boot from System memory bootloader (0x00100000) */

+#define OB_BOOTADDR_ITCM_FLASH       ((uint32_t)0x0080)  /*!< Boot from Flash on ITCM interface (0x00200000)  */

+#define OB_BOOTADDR_AXIM_FLASH       ((uint32_t)0x2000)  /*!< Boot from Flash on AXIM interface (0x08000000)  */

+#define OB_BOOTADDR_DTCM_RAM         ((uint32_t)0x8000)  /*!< Boot from DTCM RAM (0x20000000)                 */

+#define OB_BOOTADDR_SRAM1            ((uint32_t)0x8004)  /*!< Boot from SRAM1 (0x20010000)                    */

+#define OB_BOOTADDR_SRAM2            ((uint32_t)0x8013)  /*!< Boot from SRAM2 (0x2004C000)                    */

+

+/**

+  * @}

+  */

+  

+/** @defgroup FLASH_Latency FLASH Latency

+  * @{

+  */

+#define FLASH_LATENCY_0                FLASH_ACR_LATENCY_0WS   /*!< FLASH Zero Latency cycle      */

+#define FLASH_LATENCY_1                FLASH_ACR_LATENCY_1WS   /*!< FLASH One Latency cycle       */

+#define FLASH_LATENCY_2                FLASH_ACR_LATENCY_2WS   /*!< FLASH Two Latency cycles      */

+#define FLASH_LATENCY_3                FLASH_ACR_LATENCY_3WS   /*!< FLASH Three Latency cycles    */

+#define FLASH_LATENCY_4                FLASH_ACR_LATENCY_4WS   /*!< FLASH Four Latency cycles     */

+#define FLASH_LATENCY_5                FLASH_ACR_LATENCY_5WS   /*!< FLASH Five Latency cycles     */

+#define FLASH_LATENCY_6                FLASH_ACR_LATENCY_6WS   /*!< FLASH Six Latency cycles      */

+#define FLASH_LATENCY_7                FLASH_ACR_LATENCY_7WS   /*!< FLASH Seven Latency cycles    */

+#define FLASH_LATENCY_8                FLASH_ACR_LATENCY_8WS   /*!< FLASH Eight Latency cycles    */

+#define FLASH_LATENCY_9                FLASH_ACR_LATENCY_9WS   /*!< FLASH Nine Latency cycles     */

+#define FLASH_LATENCY_10               FLASH_ACR_LATENCY_10WS  /*!< FLASH Ten Latency cycles      */

+#define FLASH_LATENCY_11               FLASH_ACR_LATENCY_11WS  /*!< FLASH Eleven Latency cycles   */

+#define FLASH_LATENCY_12               FLASH_ACR_LATENCY_12WS  /*!< FLASH Twelve Latency cycles   */

+#define FLASH_LATENCY_13               FLASH_ACR_LATENCY_13WS  /*!< FLASH Thirteen Latency cycles */

+#define FLASH_LATENCY_14               FLASH_ACR_LATENCY_14WS  /*!< FLASH Fourteen Latency cycles */

+#define FLASH_LATENCY_15               FLASH_ACR_LATENCY_15WS  /*!< FLASH Fifteen Latency cycles  */

+/**

+  * @}

+  */ 

+

+/** @defgroup FLASHEx_MassErase_bit FLASH Mass Erase bit

+  * @{

+  */

+#define FLASH_MER_BIT     (FLASH_CR_MER) /*!< MER bit to clear */

+/**

+  * @}

+  */

+

+/** @defgroup FLASHEx_Sectors FLASH Sectors

+  * @{

+  */

+#define FLASH_SECTOR_0     ((uint32_t)0) /*!< Sector Number 0   */

+#define FLASH_SECTOR_1     ((uint32_t)1) /*!< Sector Number 1   */

+#define FLASH_SECTOR_2     ((uint32_t)2) /*!< Sector Number 2   */

+#define FLASH_SECTOR_3     ((uint32_t)3) /*!< Sector Number 3   */

+#define FLASH_SECTOR_4     ((uint32_t)4) /*!< Sector Number 4   */

+#define FLASH_SECTOR_5     ((uint32_t)5) /*!< Sector Number 5   */

+#define FLASH_SECTOR_6     ((uint32_t)6) /*!< Sector Number 6   */

+#define FLASH_SECTOR_7     ((uint32_t)7) /*!< Sector Number 7   */

+

+/**

+  * @}

+  */ 

+

+/** @defgroup FLASHEx_Option_Bytes_Write_Protection FLASH Option Bytes Write Protection

+  * @{

+  */

+#define OB_WRP_SECTOR_0       ((uint32_t)0x00010000) /*!< Write protection of Sector0     */

+#define OB_WRP_SECTOR_1       ((uint32_t)0x00020000) /*!< Write protection of Sector1     */

+#define OB_WRP_SECTOR_2       ((uint32_t)0x00040000) /*!< Write protection of Sector2     */

+#define OB_WRP_SECTOR_3       ((uint32_t)0x00080000) /*!< Write protection of Sector3     */

+#define OB_WRP_SECTOR_4       ((uint32_t)0x00100000) /*!< Write protection of Sector4     */

+#define OB_WRP_SECTOR_5       ((uint32_t)0x00200000) /*!< Write protection of Sector5     */

+#define OB_WRP_SECTOR_6       ((uint32_t)0x00400000) /*!< Write protection of Sector6     */

+#define OB_WRP_SECTOR_7       ((uint32_t)0x00800000) /*!< Write protection of Sector7     */

+#define OB_WRP_SECTOR_All     ((uint32_t)0x00FF0000) /*!< Write protection of all Sectors */

+

+

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+/* Exported macro ------------------------------------------------------------*/

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup FLASHEx_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup FLASHEx_Exported_Functions_Group1

+  * @{

+  */

+/* Extension Program operation functions  *************************************/

+HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *SectorError);

+HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit);

+HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit);

+void              HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit);

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup FLASHEx_Private_Constants FLASH Private Constants

+  * @{

+  */

+#define FLASH_SECTOR_TOTAL  8

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup FLASHEx_Private_Macros FLASH Private Macros

+  * @{

+  */

+

+/** @defgroup FLASHEx_IS_FLASH_Definitions FLASH Private macros to check input parameters

+  * @{

+  */

+

+#define IS_FLASH_TYPEERASE(VALUE)(((VALUE) == FLASH_TYPEERASE_SECTORS) || \

+                                  ((VALUE) == FLASH_TYPEERASE_MASSERASE))  

+

+#define IS_VOLTAGERANGE(RANGE)(((RANGE) == FLASH_VOLTAGE_RANGE_1) || \

+                               ((RANGE) == FLASH_VOLTAGE_RANGE_2) || \

+                               ((RANGE) == FLASH_VOLTAGE_RANGE_3) || \

+                               ((RANGE) == FLASH_VOLTAGE_RANGE_4))  

+

+#define IS_WRPSTATE(VALUE)(((VALUE) == OB_WRPSTATE_DISABLE) || \

+                           ((VALUE) == OB_WRPSTATE_ENABLE))  

+

+#define IS_OPTIONBYTE(VALUE)(((VALUE) <= (OPTIONBYTE_WRP | OPTIONBYTE_RDP        | OPTIONBYTE_USER |\

+                                          OPTIONBYTE_BOR | OPTIONBYTE_BOOTADDR_0 | OPTIONBYTE_BOOTADDR_1)))

+

+#define IS_OB_BOOT_ADDRESS(ADDRESS) (((ADDRESS) == OB_BOOTADDR_ITCM_RAM)   || \

+                                     ((ADDRESS) == OB_BOOTADDR_SYSTEM)     || \

+                                     ((ADDRESS) == OB_BOOTADDR_ITCM_FLASH) || \

+                                     ((ADDRESS) == OB_BOOTADDR_AXIM_FLASH) || \

+                                     ((ADDRESS) == OB_BOOTADDR_DTCM_RAM)   || \

+                                     ((ADDRESS) == OB_BOOTADDR_SRAM1)      || \

+                                     ((ADDRESS) == OB_BOOTADDR_SRAM2))

+

+#define IS_OB_RDP_LEVEL(LEVEL) (((LEVEL) == OB_RDP_LEVEL_0)   ||\

+                                ((LEVEL) == OB_RDP_LEVEL_1))/*||\

+                                ((LEVEL) == OB_RDP_LEVEL_2))*/

+

+#define IS_OB_WWDG_SOURCE(SOURCE) (((SOURCE) == OB_WWDG_SW) || ((SOURCE) == OB_WWDG_HW))

+

+#define IS_OB_IWDG_SOURCE(SOURCE) (((SOURCE) == OB_IWDG_SW) || ((SOURCE) == OB_IWDG_HW))

+

+#define IS_OB_STOP_SOURCE(SOURCE) (((SOURCE) == OB_STOP_NO_RST) || ((SOURCE) == OB_STOP_RST))

+

+#define IS_OB_STDBY_SOURCE(SOURCE) (((SOURCE) == OB_STDBY_NO_RST) || ((SOURCE) == OB_STDBY_RST))

+

+#define IS_OB_IWDG_STOP_FREEZE(FREEZE) (((FREEZE) == OB_IWDG_STOP_FREEZE) || ((FREEZE) == OB_IWDG_STOP_ACTIVE))

+

+#define IS_OB_IWDG_STDBY_FREEZE(FREEZE) (((FREEZE) == OB_IWDG_STDBY_FREEZE) || ((FREEZE) == OB_IWDG_STDBY_ACTIVE))

+

+#define IS_OB_BOR_LEVEL(LEVEL) (((LEVEL) == OB_BOR_LEVEL1) || ((LEVEL) == OB_BOR_LEVEL2) ||\

+                                ((LEVEL) == OB_BOR_LEVEL3) || ((LEVEL) == OB_BOR_OFF))

+

+#define IS_FLASH_LATENCY(LATENCY) (((LATENCY) == FLASH_LATENCY_0)  || \

+                                   ((LATENCY) == FLASH_LATENCY_1)  || \

+                                   ((LATENCY) == FLASH_LATENCY_2)  || \

+                                   ((LATENCY) == FLASH_LATENCY_3)  || \

+                                   ((LATENCY) == FLASH_LATENCY_4)  || \

+                                   ((LATENCY) == FLASH_LATENCY_5)  || \

+                                   ((LATENCY) == FLASH_LATENCY_6)  || \

+                                   ((LATENCY) == FLASH_LATENCY_7)  || \

+                                   ((LATENCY) == FLASH_LATENCY_8)  || \

+                                   ((LATENCY) == FLASH_LATENCY_9)  || \

+                                   ((LATENCY) == FLASH_LATENCY_10) || \

+                                   ((LATENCY) == FLASH_LATENCY_11) || \

+                                   ((LATENCY) == FLASH_LATENCY_12) || \

+                                   ((LATENCY) == FLASH_LATENCY_13) || \

+                                   ((LATENCY) == FLASH_LATENCY_14) || \

+                                   ((LATENCY) == FLASH_LATENCY_15))

+

+#define IS_FLASH_SECTOR(SECTOR) (((SECTOR) == FLASH_SECTOR_0)   || ((SECTOR) == FLASH_SECTOR_1)   ||\

+                                 ((SECTOR) == FLASH_SECTOR_2)   || ((SECTOR) == FLASH_SECTOR_3)   ||\

+                                 ((SECTOR) == FLASH_SECTOR_4)   || ((SECTOR) == FLASH_SECTOR_5)   ||\

+                                 ((SECTOR) == FLASH_SECTOR_6)   || ((SECTOR) == FLASH_SECTOR_7))

+

+

+#define IS_FLASH_ADDRESS(ADDRESS) (((ADDRESS) >= FLASH_BASE) && ((ADDRESS) <= FLASH_END))

+

+#define IS_FLASH_NBSECTORS(NBSECTORS) (((NBSECTORS) != 0) && ((NBSECTORS) <= FLASH_SECTOR_TOTAL))

+

+#define IS_OB_WRP_SECTOR(SECTOR)  ((((SECTOR) & (uint32_t)0xFF00FFFF) == 0x00000000) && ((SECTOR) != 0x00000000))

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup FLASHEx_Private_Functions FLASH Private Functions

+  * @{

+  */

+void FLASH_Erase_Sector(uint32_t Sector, uint8_t VoltageRange);

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_FLASH_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_gpio.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_gpio.h
new file mode 100644
index 0000000..32676ca
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_gpio.h
@@ -0,0 +1,327 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_gpio.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of GPIO HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_GPIO_H

+#define __STM32F7xx_HAL_GPIO_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup GPIO

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup GPIO_Exported_Types GPIO Exported Types

+  * @{

+  */

+

+/** 

+  * @brief GPIO Init structure definition  

+  */ 

+typedef struct

+{

+  uint32_t Pin;       /*!< Specifies the GPIO pins to be configured.

+                           This parameter can be any value of @ref GPIO_pins_define */

+

+  uint32_t Mode;      /*!< Specifies the operating mode for the selected pins.

+                           This parameter can be a value of @ref GPIO_mode_define */

+

+  uint32_t Pull;      /*!< Specifies the Pull-up or Pull-Down activation for the selected pins.

+                           This parameter can be a value of @ref GPIO_pull_define */

+

+  uint32_t Speed;     /*!< Specifies the speed for the selected pins.

+                           This parameter can be a value of @ref GPIO_speed_define */

+

+  uint32_t Alternate;  /*!< Peripheral to be connected to the selected pins. 

+                            This parameter can be a value of @ref GPIO_Alternate_function_selection */

+}GPIO_InitTypeDef;

+

+/** 

+  * @brief  GPIO Bit SET and Bit RESET enumeration 

+  */

+typedef enum

+{

+  GPIO_PIN_RESET = 0,

+  GPIO_PIN_SET

+}GPIO_PinState;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup GPIO_Exported_Constants GPIO Exported Constants

+  * @{

+  */ 

+

+/** @defgroup GPIO_pins_define GPIO pins define

+  * @{

+  */

+#define GPIO_PIN_0                 ((uint16_t)0x0001)  /* Pin 0 selected    */

+#define GPIO_PIN_1                 ((uint16_t)0x0002)  /* Pin 1 selected    */

+#define GPIO_PIN_2                 ((uint16_t)0x0004)  /* Pin 2 selected    */

+#define GPIO_PIN_3                 ((uint16_t)0x0008)  /* Pin 3 selected    */

+#define GPIO_PIN_4                 ((uint16_t)0x0010)  /* Pin 4 selected    */

+#define GPIO_PIN_5                 ((uint16_t)0x0020)  /* Pin 5 selected    */

+#define GPIO_PIN_6                 ((uint16_t)0x0040)  /* Pin 6 selected    */

+#define GPIO_PIN_7                 ((uint16_t)0x0080)  /* Pin 7 selected    */

+#define GPIO_PIN_8                 ((uint16_t)0x0100)  /* Pin 8 selected    */

+#define GPIO_PIN_9                 ((uint16_t)0x0200)  /* Pin 9 selected    */

+#define GPIO_PIN_10                ((uint16_t)0x0400)  /* Pin 10 selected   */

+#define GPIO_PIN_11                ((uint16_t)0x0800)  /* Pin 11 selected   */

+#define GPIO_PIN_12                ((uint16_t)0x1000)  /* Pin 12 selected   */

+#define GPIO_PIN_13                ((uint16_t)0x2000)  /* Pin 13 selected   */

+#define GPIO_PIN_14                ((uint16_t)0x4000)  /* Pin 14 selected   */

+#define GPIO_PIN_15                ((uint16_t)0x8000)  /* Pin 15 selected   */

+#define GPIO_PIN_All               ((uint16_t)0xFFFF)  /* All pins selected */

+

+#define GPIO_PIN_MASK              ((uint32_t)0x0000FFFF) /* PIN mask for assert test */

+/**

+  * @}

+  */

+

+/** @defgroup GPIO_mode_define GPIO mode define

+  * @brief GPIO Configuration Mode 

+  *        Elements values convention: 0xX0yz00YZ

+  *           - X  : GPIO mode or EXTI Mode

+  *           - y  : External IT or Event trigger detection 

+  *           - z  : IO configuration on External IT or Event

+  *           - Y  : Output type (Push Pull or Open Drain)

+  *           - Z  : IO Direction mode (Input, Output, Alternate or Analog)

+  * @{

+  */ 

+#define  GPIO_MODE_INPUT                        ((uint32_t)0x00000000)   /*!< Input Floating Mode                   */

+#define  GPIO_MODE_OUTPUT_PP                    ((uint32_t)0x00000001)   /*!< Output Push Pull Mode                 */

+#define  GPIO_MODE_OUTPUT_OD                    ((uint32_t)0x00000011)   /*!< Output Open Drain Mode                */

+#define  GPIO_MODE_AF_PP                        ((uint32_t)0x00000002)   /*!< Alternate Function Push Pull Mode     */

+#define  GPIO_MODE_AF_OD                        ((uint32_t)0x00000012)   /*!< Alternate Function Open Drain Mode    */

+

+#define  GPIO_MODE_ANALOG                       ((uint32_t)0x00000003)   /*!< Analog Mode  */

+    

+#define  GPIO_MODE_IT_RISING                    ((uint32_t)0x10110000)   /*!< External Interrupt Mode with Rising edge trigger detection          */

+#define  GPIO_MODE_IT_FALLING                   ((uint32_t)0x10210000)   /*!< External Interrupt Mode with Falling edge trigger detection         */

+#define  GPIO_MODE_IT_RISING_FALLING            ((uint32_t)0x10310000)   /*!< External Interrupt Mode with Rising/Falling edge trigger detection  */

+ 

+#define  GPIO_MODE_EVT_RISING                   ((uint32_t)0x10120000)   /*!< External Event Mode with Rising edge trigger detection               */

+#define  GPIO_MODE_EVT_FALLING                  ((uint32_t)0x10220000)   /*!< External Event Mode with Falling edge trigger detection              */

+#define  GPIO_MODE_EVT_RISING_FALLING           ((uint32_t)0x10320000)   /*!< External Event Mode with Rising/Falling edge trigger detection       */

+/**

+  * @}

+  */

+

+/** @defgroup GPIO_speed_define  GPIO speed define

+  * @brief GPIO Output Maximum frequency

+  * @{

+  */  

+#define  GPIO_SPEED_LOW         ((uint32_t)0x00000000)  /*!< Low speed     */

+#define  GPIO_SPEED_MEDIUM      ((uint32_t)0x00000001)  /*!< Medium speed  */

+#define  GPIO_SPEED_FAST        ((uint32_t)0x00000002)  /*!< Fast speed    */

+#define  GPIO_SPEED_HIGH        ((uint32_t)0x00000003)  /*!< High speed    */

+/**

+  * @}

+  */

+

+ /** @defgroup GPIO_pull_define GPIO pull define

+   * @brief GPIO Pull-Up or Pull-Down Activation

+   * @{

+   */  

+#define  GPIO_NOPULL        ((uint32_t)0x00000000)   /*!< No Pull-up or Pull-down activation  */

+#define  GPIO_PULLUP        ((uint32_t)0x00000001)   /*!< Pull-up activation                  */

+#define  GPIO_PULLDOWN      ((uint32_t)0x00000002)   /*!< Pull-down activation                */

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup GPIO_Exported_Macros GPIO Exported Macros

+  * @{

+  */

+

+/**

+  * @brief  Checks whether the specified EXTI line flag is set or not.

+  * @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).

+  */

+#define __HAL_GPIO_EXTI_GET_FLAG(__EXTI_LINE__) (EXTI->PR & (__EXTI_LINE__))

+

+/**

+  * @brief  Clears the EXTI's line pending flags.

+  * @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

+  */

+#define __HAL_GPIO_EXTI_CLEAR_FLAG(__EXTI_LINE__) (EXTI->PR = (__EXTI_LINE__))

+

+/**

+  * @brief  Checks whether the specified EXTI line is asserted or not.

+  * @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).

+  */

+#define __HAL_GPIO_EXTI_GET_IT(__EXTI_LINE__) (EXTI->PR & (__EXTI_LINE__))

+

+/**

+  * @brief  Clears the EXTI's line pending bits.

+  * @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

+  */

+#define __HAL_GPIO_EXTI_CLEAR_IT(__EXTI_LINE__) (EXTI->PR = (__EXTI_LINE__))

+

+/**

+  * @brief  Generates a Software interrupt on selected EXTI line.

+  * @param  __EXTI_LINE__: specifies the EXTI line to check.

+  *          This parameter can be GPIO_PIN_x where x can be(0..15)

+  * @retval None

+  */

+#define __HAL_GPIO_EXTI_GENERATE_SWIT(__EXTI_LINE__) (EXTI->SWIER |= (__EXTI_LINE__))

+/**

+  * @}

+  */

+

+/* Include GPIO HAL Extension module */

+#include "stm32f7xx_hal_gpio_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup GPIO_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup GPIO_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization and de-initialization functions *****************************/

+void  HAL_GPIO_Init(GPIO_TypeDef  *GPIOx, GPIO_InitTypeDef *GPIO_Init);

+void  HAL_GPIO_DeInit(GPIO_TypeDef  *GPIOx, uint32_t GPIO_Pin);

+/**

+  * @}

+  */

+

+/** @addtogroup GPIO_Exported_Functions_Group2

+  * @{

+  */

+/* IO operation functions *****************************************************/

+GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);

+void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState);

+void HAL_GPIO_TogglePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);

+HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);

+void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin);

+void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin);

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup GPIO_Private_Constants GPIO Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup GPIO_Private_Macros GPIO Private Macros

+  * @{

+  */

+#define IS_GPIO_PIN_ACTION(ACTION) (((ACTION) == GPIO_PIN_RESET) || ((ACTION) == GPIO_PIN_SET))

+#define IS_GPIO_PIN(PIN)           (((PIN) & GPIO_PIN_MASK ) != (uint32_t)0x00)

+#define IS_GPIO_MODE(MODE) (((MODE) == GPIO_MODE_INPUT)              ||\

+                            ((MODE) == GPIO_MODE_OUTPUT_PP)          ||\

+                            ((MODE) == GPIO_MODE_OUTPUT_OD)          ||\

+                            ((MODE) == GPIO_MODE_AF_PP)              ||\

+                            ((MODE) == GPIO_MODE_AF_OD)              ||\

+                            ((MODE) == GPIO_MODE_IT_RISING)          ||\

+                            ((MODE) == GPIO_MODE_IT_FALLING)         ||\

+                            ((MODE) == GPIO_MODE_IT_RISING_FALLING)  ||\

+                            ((MODE) == GPIO_MODE_EVT_RISING)         ||\

+                            ((MODE) == GPIO_MODE_EVT_FALLING)        ||\

+                            ((MODE) == GPIO_MODE_EVT_RISING_FALLING) ||\

+                            ((MODE) == GPIO_MODE_ANALOG))

+#define IS_GPIO_SPEED(SPEED) (((SPEED) == GPIO_SPEED_LOW)  || ((SPEED) == GPIO_SPEED_MEDIUM) || \

+                              ((SPEED) == GPIO_SPEED_FAST) || ((SPEED) == GPIO_SPEED_HIGH))

+#define IS_GPIO_PULL(PULL) (((PULL) == GPIO_NOPULL) || ((PULL) == GPIO_PULLUP) || \

+                            ((PULL) == GPIO_PULLDOWN))

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup GPIO_Private_Functions GPIO Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_GPIO_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_gpio_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_gpio_ex.h
new file mode 100644
index 0000000..63054f7
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_gpio_ex.h
@@ -0,0 +1,377 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_gpio_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of GPIO HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_GPIO_EX_H

+#define __STM32F7xx_HAL_GPIO_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @defgroup GPIOEx GPIOEx

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup GPIOEx_Exported_Constants GPIO Exported Constants

+  * @{

+  */

+  

+/** @defgroup GPIO_Alternate_function_selection GPIO Alternate Function Selection

+  * @{

+  */  

+

+/** 

+  * @brief   AF 0 selection  

+  */ 

+#define GPIO_AF0_RTC_50Hz      ((uint8_t)0x00)  /* RTC_50Hz Alternate Function mapping                       */

+#define GPIO_AF0_MCO           ((uint8_t)0x00)  /* MCO (MCO1 and MCO2) Alternate Function mapping            */

+#define GPIO_AF0_SWJ           ((uint8_t)0x00)  /* SWJ (SWD and JTAG) Alternate Function mapping             */

+#define GPIO_AF0_TRACE         ((uint8_t)0x00)  /* TRACE Alternate Function mapping                          */

+

+/** 

+  * @brief   AF 1 selection  

+  */ 

+#define GPIO_AF1_TIM1          ((uint8_t)0x01)  /* TIM1 Alternate Function mapping */

+#define GPIO_AF1_TIM2          ((uint8_t)0x01)  /* TIM2 Alternate Function mapping */

+

+/** 

+  * @brief   AF 2 selection  

+  */ 

+#define GPIO_AF2_TIM3          ((uint8_t)0x02)  /* TIM3 Alternate Function mapping */

+#define GPIO_AF2_TIM4          ((uint8_t)0x02)  /* TIM4 Alternate Function mapping */

+#define GPIO_AF2_TIM5          ((uint8_t)0x02)  /* TIM5 Alternate Function mapping */

+

+/** 

+  * @brief   AF 3 selection  

+  */ 

+#define GPIO_AF3_TIM8          ((uint8_t)0x03)  /* TIM8 Alternate Function mapping  */

+#define GPIO_AF3_TIM9          ((uint8_t)0x03)  /* TIM9 Alternate Function mapping  */

+#define GPIO_AF3_TIM10         ((uint8_t)0x03)  /* TIM10 Alternate Function mapping */

+#define GPIO_AF3_TIM11         ((uint8_t)0x03)  /* TIM11 Alternate Function mapping */

+#define GPIO_AF3_LPTIM1        ((uint8_t)0x03)  /* LPTIM1 Alternate Function mapping */

+#define GPIO_AF3_CEC           ((uint8_t)0x03)  /* CEC Alternate Function mapping */

+

+

+/** 

+  * @brief   AF 4 selection  

+  */ 

+#define GPIO_AF4_I2C1          ((uint8_t)0x04)  /* I2C1 Alternate Function mapping */

+#define GPIO_AF4_I2C2          ((uint8_t)0x04)  /* I2C2 Alternate Function mapping */

+#define GPIO_AF4_I2C3          ((uint8_t)0x04)  /* I2C3 Alternate Function mapping */

+#define GPIO_AF4_I2C4          ((uint8_t)0x04)  /* I2C4 Alternate Function mapping */

+#define GPIO_AF4_CEC           ((uint8_t)0x04)  /* CEC Alternate Function mapping */

+

+/** 

+  * @brief   AF 5 selection  

+  */ 

+#define GPIO_AF5_SPI1          ((uint8_t)0x05)  /* SPI1 Alternate Function mapping        */

+#define GPIO_AF5_SPI2          ((uint8_t)0x05)  /* SPI2/I2S2 Alternate Function mapping   */

+#define GPIO_AF5_SPI3          ((uint8_t)0x05)  /* SPI3/I2S3 Alternate Function mapping   */

+#define GPIO_AF5_SPI4          ((uint8_t)0x05)  /* SPI4 Alternate Function mapping        */

+#define GPIO_AF5_SPI5          ((uint8_t)0x05)  /* SPI5 Alternate Function mapping        */

+#define GPIO_AF5_SPI6          ((uint8_t)0x05)  /* SPI6 Alternate Function mapping        */

+

+/** 

+  * @brief   AF 6 selection  

+  */ 

+#define GPIO_AF6_SPI3          ((uint8_t)0x06)  /* SPI3/I2S3 Alternate Function mapping  */

+#define GPIO_AF6_SAI1          ((uint8_t)0x06)  /* SAI1 Alternate Function mapping       */

+

+/** 

+  * @brief   AF 7 selection  

+  */ 

+#define GPIO_AF7_USART1        ((uint8_t)0x07)  /* USART1 Alternate Function mapping     */

+#define GPIO_AF7_USART2        ((uint8_t)0x07)  /* USART2 Alternate Function mapping     */

+#define GPIO_AF7_USART3        ((uint8_t)0x07)  /* USART3 Alternate Function mapping     */

+#define GPIO_AF7_UART5         ((uint8_t)0x07)  /* UART5 Alternate Function mapping      */

+#define GPIO_AF7_SPDIFRX       ((uint8_t)0x07)  /* SPDIF-RX Alternate Function mapping   */

+#define GPIO_AF7_SPI2          ((uint8_t)0x07)  /* SPI2 Alternate Function mapping       */

+#define GPIO_AF7_SPI3          ((uint8_t)0x07)  /* SPI3 Alternate Function mapping       */

+

+/** 

+  * @brief   AF 8 selection  

+  */ 

+#define GPIO_AF8_UART4         ((uint8_t)0x08)  /* UART4 Alternate Function mapping  */

+#define GPIO_AF8_UART5         ((uint8_t)0x08)  /* UART5 Alternate Function mapping  */

+#define GPIO_AF8_USART6        ((uint8_t)0x08)  /* USART6 Alternate Function mapping */

+#define GPIO_AF8_UART7         ((uint8_t)0x08)  /* UART7 Alternate Function mapping  */

+#define GPIO_AF8_UART8         ((uint8_t)0x08)  /* UART8 Alternate Function mapping  */

+#define GPIO_AF8_SPDIFRX       ((uint8_t)0x08)  /* SPIDIF-RX Alternate Function mapping  */

+#define GPIO_AF8_SAI2          ((uint8_t)0x08)  /* SAI2 Alternate Function mapping  */

+

+

+/** 

+  * @brief   AF 9 selection 

+  */ 

+#define GPIO_AF9_CAN1          ((uint8_t)0x09)  /* CAN1 Alternate Function mapping    */

+#define GPIO_AF9_CAN2          ((uint8_t)0x09)  /* CAN2 Alternate Function mapping    */

+#define GPIO_AF9_TIM12         ((uint8_t)0x09)  /* TIM12 Alternate Function mapping   */

+#define GPIO_AF9_TIM13         ((uint8_t)0x09)  /* TIM13 Alternate Function mapping   */

+#define GPIO_AF9_TIM14         ((uint8_t)0x09)  /* TIM14 Alternate Function mapping   */

+#define GPIO_AF9_QUADSPI       ((uint8_t)0x09)  /* QUADSPI Alternate Function mapping */

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define GPIO_AF9_LTDC          ((uint8_t)0x09)  /* LCD-TFT Alternate Function mapping */

+#endif /* STM32F756xx || STM32F746xx */

+/** 

+  * @brief   AF 10 selection  

+  */ 

+#define GPIO_AF10_OTG_FS        ((uint8_t)0xA)  /* OTG_FS Alternate Function mapping */

+#define GPIO_AF10_OTG_HS        ((uint8_t)0xA)  /* OTG_HS Alternate Function mapping */

+#define GPIO_AF10_QUADSPI       ((uint8_t)0xA)  /* QUADSPI Alternate Function mapping */

+#define GPIO_AF10_SAI2          ((uint8_t)0xA)  /* SAI2 Alternate Function mapping */

+

+/** 

+  * @brief   AF 11 selection  

+  */ 

+#define GPIO_AF11_ETH           ((uint8_t)0x0B)  /* ETHERNET Alternate Function mapping */

+

+/** 

+  * @brief   AF 12 selection  

+  */ 

+#define GPIO_AF12_FMC           ((uint8_t)0xC)  /* FMC Alternate Function mapping                      */

+#define GPIO_AF12_OTG_HS_FS     ((uint8_t)0xC)  /* OTG HS configured in FS, Alternate Function mapping */

+#define GPIO_AF12_SDMMC1        ((uint8_t)0xC)  /* SDMMC1 Alternate Function mapping                     */

+

+/** 

+  * @brief   AF 13 selection  

+  */ 

+#define GPIO_AF13_DCMI          ((uint8_t)0x0D)  /* DCMI Alternate Function mapping */

+

+#if defined(STM32F756xx) || defined(STM32F746xx)

+/** 

+  * @brief   AF 14 selection  

+  */

+#define GPIO_AF14_LTDC          ((uint8_t)0x0E)  /* LCD-TFT Alternate Function mapping */

+#endif /* STM32F756xx || STM32F746xx */

+/** 

+  * @brief   AF 15 selection  

+  */ 

+#define GPIO_AF15_EVENTOUT      ((uint8_t)0x0F)  /* EVENTOUT Alternate Function mapping */

+

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup GPIOEx_Exported_Macros GPIO Exported Macros

+  * @{

+  */

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/ 

+/** @defgroup GPIOEx_Exported_Functions GPIO Exported Functions

+  * @{

+  */

+/**

+  * @}

+  */

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup GPIOEx_Private_Constants GPIO Private Constants

+  * @{

+  */

+

+/**

+  * @brief   GPIO pin available on the platform

+  */

+/* Defines the available pins per GPIOs */

+#define GPIOA_PIN_AVAILABLE  GPIO_PIN_All

+#define GPIOB_PIN_AVAILABLE  GPIO_PIN_All

+#define GPIOC_PIN_AVAILABLE  GPIO_PIN_All

+#define GPIOD_PIN_AVAILABLE  GPIO_PIN_All

+#define GPIOE_PIN_AVAILABLE  GPIO_PIN_All

+#define GPIOF_PIN_AVAILABLE  GPIO_PIN_All

+#define GPIOG_PIN_AVAILABLE  GPIO_PIN_All

+#define GPIOI_PIN_AVAILABLE  GPIO_PIN_All

+#define GPIOJ_PIN_AVAILABLE  GPIO_PIN_All

+#define GPIOH_PIN_AVAILABLE  GPIO_PIN_All

+#define GPIOK_PIN_AVAILABLE  (GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_3 | GPIO_PIN_4 | \

+                              GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7)

+

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup GPIOEx_Private_Macros GPIO Private Macros

+  * @{

+  */

+/** @defgroup GPIOEx_Get_Port_Index GPIO Get Port Index

+  * @{

+  */

+#define GPIO_GET_INDEX(__GPIOx__)   (uint8_t)(((__GPIOx__) == (GPIOA))? 0U :\

+                                              ((__GPIOx__) == (GPIOB))? 1U :\

+                                              ((__GPIOx__) == (GPIOC))? 2U :\

+                                              ((__GPIOx__) == (GPIOD))? 3U :\

+                                              ((__GPIOx__) == (GPIOE))? 4U :\

+                                              ((__GPIOx__) == (GPIOF))? 5U :\

+                                              ((__GPIOx__) == (GPIOG))? 6U :\

+                                              ((__GPIOx__) == (GPIOH))? 7U :\

+                                              ((__GPIOx__) == (GPIOI))? 8U :\

+                                              ((__GPIOx__) == (GPIOJ))? 9U : 10U)			

+/**

+  * @}

+  */

+

+#define IS_GPIO_PIN_AVAILABLE(__INSTANCE__,__PIN__)  \

+           ((((__INSTANCE__) == GPIOA) && (((__PIN__) & (GPIOA_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOA_PIN_AVAILABLE)) == (GPIOA_PIN_AVAILABLE))) || \

+            (((__INSTANCE__) == GPIOB) && (((__PIN__) & (GPIOB_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOB_PIN_AVAILABLE)) == (GPIOB_PIN_AVAILABLE))) || \

+            (((__INSTANCE__) == GPIOC) && (((__PIN__) & (GPIOC_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOC_PIN_AVAILABLE)) == (GPIOC_PIN_AVAILABLE))) || \

+            (((__INSTANCE__) == GPIOD) && (((__PIN__) & (GPIOD_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOD_PIN_AVAILABLE)) == (GPIOD_PIN_AVAILABLE))) || \

+            (((__INSTANCE__) == GPIOE) && (((__PIN__) & (GPIOE_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOE_PIN_AVAILABLE)) == (GPIOE_PIN_AVAILABLE))) || \

+            (((__INSTANCE__) == GPIOF) && (((__PIN__) & (GPIOF_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOF_PIN_AVAILABLE)) == (GPIOF_PIN_AVAILABLE))) || \

+			(((__INSTANCE__) == GPIOG) && (((__PIN__) & (GPIOG_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOG_PIN_AVAILABLE)) == (GPIOG_PIN_AVAILABLE))) || \

+			(((__INSTANCE__) == GPIOI) && (((__PIN__) & (GPIOI_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOI_PIN_AVAILABLE)) == (GPIOI_PIN_AVAILABLE))) || \

+			(((__INSTANCE__) == GPIOJ) && (((__PIN__) & (GPIOJ_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOJ_PIN_AVAILABLE)) == (GPIOJ_PIN_AVAILABLE))) || \

+			(((__INSTANCE__) == GPIOK) && (((__PIN__) & (GPIOK_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOK_PIN_AVAILABLE)) == (GPIOK_PIN_AVAILABLE))) || \

+			(((__INSTANCE__) == GPIOH) && (((__PIN__) & (GPIOH_PIN_AVAILABLE)) != 0) && (((__PIN__) | (GPIOH_PIN_AVAILABLE)) == (GPIOH_PIN_AVAILABLE))))

+/** @defgroup GPIOEx_IS_Alternat_function_selection GPIO Check Alternate Function

+  * @{

+  */

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define IS_GPIO_AF(AF)   (((AF) == GPIO_AF0_RTC_50Hz)   || ((AF) == GPIO_AF1_TIM1)        || \

+                          ((AF) == GPIO_AF0_SWJ)        || ((AF) == GPIO_AF0_TRACE)      || \

+                          ((AF) == GPIO_AF0_MCO)       || ((AF) == GPIO_AF1_TIM2)       || \

+                          ((AF) == GPIO_AF2_TIM3)       || ((AF) == GPIO_AF2_TIM4)       || \

+                          ((AF) == GPIO_AF2_TIM5)       || ((AF) == GPIO_AF3_TIM8)       || \

+                          ((AF) == GPIO_AF3_TIM9)       || ((AF) == GPIO_AF3_TIM10)      || \

+                          ((AF) == GPIO_AF3_TIM11)      || ((AF) == GPIO_AF3_LPTIM1)     || \

+                          ((AF) == GPIO_AF3_CEC)        || ((AF) == GPIO_AF4_CEC)        || \

+                          ((AF) == GPIO_AF4_I2C1)       || ((AF) == GPIO_AF4_I2C2)       || \

+                          ((AF) == GPIO_AF4_I2C3)       || ((AF) == GPIO_AF4_I2C4)       || \

+                          ((AF) == GPIO_AF5_SPI1)       || ((AF) == GPIO_AF5_SPI2)       || \

+                          ((AF) == GPIO_AF5_SPI3)       || ((AF) == GPIO_AF5_SPI4)       || \

+                          ((AF) == GPIO_AF5_SPI5)       || ((AF) == GPIO_AF5_SPI6)       || \

+                          ((AF) == GPIO_AF6_SPI3)       || ((AF) == GPIO_AF6_SAI1)       || \

+                          ((AF) == GPIO_AF7_SPI3)       || ((AF) == GPIO_AF7_SPI2)        || \

+                          ((AF) == GPIO_AF7_USART1)     || ((AF) == GPIO_AF7_USART2)      || \

+                          ((AF) == GPIO_AF7_USART3)     || ((AF) == GPIO_AF7_UART5)       || \

+                          ((AF) == GPIO_AF7_SPDIFRX)    || ((AF) == GPIO_AF8_SPDIFRX)     || \

+                          ((AF) == GPIO_AF8_SAI2)       || ((AF) == GPIO_AF8_USART6)      || \

+                          ((AF) == GPIO_AF8_UART4)      || ((AF) == GPIO_AF8_UART5)       || \

+                          ((AF) == GPIO_AF8_UART7)      || ((AF) == GPIO_AF8_UART8)       || \

+                          ((AF) == GPIO_AF9_CAN1)       || ((AF) == GPIO_AF9_CAN2)        || \

+                          ((AF) == GPIO_AF9_TIM12)      || ((AF) == GPIO_AF9_TIM12)      || \

+                          ((AF) == GPIO_AF9_TIM14)      || ((AF) == GPIO_AF9_QUADSPI)    || \

+                          ((AF) == GPIO_AF9_LTDC)       || ((AF) == GPIO_AF10_OTG_FS)    || \

+                          ((AF) == GPIO_AF10_OTG_HS)    || ((AF) == GPIO_AF10_SAI2)      || \

+                          ((AF) == GPIO_AF10_QUADSPI)   || ((AF) == GPIO_AF11_ETH)       || \

+                          ((AF) == GPIO_AF12_OTG_HS_FS) || ((AF) == GPIO_AF12_SDMMC1)     || \

+                          ((AF) == GPIO_AF12_FMC)       || ((AF) == GPIO_AF15_EVENTOUT)  || \

+                          ((AF) == GPIO_AF13_DCMI)      || ((AF) == GPIO_AF14_LTDC))

+#elif defined(STM32F745xx)

+#define IS_GPIO_AF(AF)   (((AF) == GPIO_AF0_RTC_50Hz)   || ((AF) == GPIO_AF1_TIM1)        || \

+                          ((AF) == GPIO_AF0_SWJ)        || ((AF) == GPIO_AF0_TRACE)      || \

+                          ((AF) == GPIO_AF0_MCO)       || ((AF) == GPIO_AF1_TIM2)       || \

+                          ((AF) == GPIO_AF2_TIM3)       || ((AF) == GPIO_AF2_TIM4)       || \

+                          ((AF) == GPIO_AF2_TIM5)       || ((AF) == GPIO_AF3_TIM8)       || \

+                          ((AF) == GPIO_AF3_TIM9)       || ((AF) == GPIO_AF3_TIM10)      || \

+                          ((AF) == GPIO_AF3_TIM11)      || ((AF) == GPIO_AF3_LPTIM1)     || \

+                          ((AF) == GPIO_AF3_CEC)        || ((AF) == GPIO_AF4_CEC)        || \

+                          ((AF) == GPIO_AF4_I2C1)       || ((AF) == GPIO_AF4_I2C2)       || \

+                          ((AF) == GPIO_AF4_I2C3)       || ((AF) == GPIO_AF4_I2C4)       || \

+                          ((AF) == GPIO_AF5_SPI1)       || ((AF) == GPIO_AF5_SPI2)       || \

+                          ((AF) == GPIO_AF5_SPI3)       || ((AF) == GPIO_AF5_SPI4)       || \

+                          ((AF) == GPIO_AF5_SPI5)       || ((AF) == GPIO_AF5_SPI6)       || \

+                          ((AF) == GPIO_AF6_SPI3)       || ((AF) == GPIO_AF6_SAI1)       || \

+                          ((AF) == GPIO_AF7_SPI3)       || ((AF) == GPIO_AF7_SPI2)        || \

+                          ((AF) == GPIO_AF7_USART1)     || ((AF) == GPIO_AF7_USART2)      || \

+                          ((AF) == GPIO_AF7_USART3)     || ((AF) == GPIO_AF7_UART5)       || \

+                          ((AF) == GPIO_AF7_SPDIFRX)    || ((AF) == GPIO_AF8_SPDIFRX)     || \

+                          ((AF) == GPIO_AF8_SAI2)       || ((AF) == GPIO_AF8_USART6)      || \

+                          ((AF) == GPIO_AF8_UART4)      || ((AF) == GPIO_AF8_UART5)       || \

+                          ((AF) == GPIO_AF8_UART7)      || ((AF) == GPIO_AF8_UART8)       || \

+                          ((AF) == GPIO_AF9_CAN1)       || ((AF) == GPIO_AF9_CAN2)        || \

+                          ((AF) == GPIO_AF9_TIM12)      || ((AF) == GPIO_AF9_TIM12)      || \

+                          ((AF) == GPIO_AF9_TIM14)      || ((AF) == GPIO_AF9_QUADSPI)    || \

+                          ((AF) == GPIO_AF13_DCMI)      || ((AF) == GPIO_AF10_OTG_FS)    || \

+                          ((AF) == GPIO_AF10_OTG_HS)    || ((AF) == GPIO_AF10_SAI2)      || \

+                          ((AF) == GPIO_AF10_QUADSPI)   || ((AF) == GPIO_AF11_ETH)       || \

+                          ((AF) == GPIO_AF12_OTG_HS_FS) || ((AF) == GPIO_AF12_SDMMC1)     || \

+                          ((AF) == GPIO_AF12_FMC)       || ((AF) == GPIO_AF15_EVENTOUT))

+#endif /* STM32F756xx || STM32F746xx */

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup GPIOEx_Private_Functions GPIO Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_GPIO_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_hash.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_hash.h
new file mode 100644
index 0000000..c5c2c26
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_hash.h
@@ -0,0 +1,446 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_hash.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of HASH HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_HASH_H

+#define __STM32F7xx_HAL_HASH_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+#if defined(STM32F756xx)

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup HASH    

+  * @brief HASH HAL module driver 

+  *  @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup HASH_Exported_Types HASH Exported Types

+  * @{

+  */

+

+/** @defgroup HASH_Exported_Types_Group1 HASH Configuration Structure definition

+  * @{

+  */

+

+typedef struct

+{

+  uint32_t DataType;  /*!< 32-bit data, 16-bit data, 8-bit data or 1-bit string.

+                           This parameter can be a value of @ref HASH DataType */

+

+  uint32_t KeySize;   /*!< The key size is used only in HMAC operation          */

+

+  uint8_t* pKey;      /*!< The key is used only in HMAC operation               */

+}HASH_InitTypeDef;

+

+/** 

+  * @}

+  */

+

+/** @defgroup HASH_Exported_Types_Group2 HASH State structures definition

+  * @{

+  */

+

+typedef enum

+{

+  HAL_HASH_STATE_RESET     = 0x00,  /*!< HASH not yet initialized or disabled */

+  HAL_HASH_STATE_READY     = 0x01,  /*!< HASH initialized and ready for use   */

+  HAL_HASH_STATE_BUSY      = 0x02,  /*!< HASH internal process is ongoing     */

+  HAL_HASH_STATE_TIMEOUT   = 0x03,  /*!< HASH timeout state                   */

+  HAL_HASH_STATE_ERROR     = 0x04   /*!< HASH error state                     */

+}HAL_HASH_STATETypeDef;

+

+/** 

+  * @}

+  */

+  

+/** @defgroup HASH_Exported_Types_Group3 HASH phase structures definition

+  * @{

+  */

+  

+typedef enum

+{

+  HAL_HASH_PHASE_READY     = 0x01,  /*!< HASH peripheral is ready for initialization */

+  HAL_HASH_PHASE_PROCESS   = 0x02,  /*!< HASH peripheral is in processing phase      */

+}HAL_HASHPhaseTypeDef;

+

+/** 

+  * @}

+  */

+ 

+/** @defgroup HASH_Exported_Types_Group4 HASH Handle structures definition

+  * @{

+  */ 

+  

+typedef struct

+{

+      HASH_InitTypeDef           Init;              /*!< HASH required parameters       */

+

+      uint8_t                    *pHashInBuffPtr;   /*!< Pointer to input buffer        */

+

+      uint8_t                    *pHashOutBuffPtr;  /*!< Pointer to input buffer        */

+

+     __IO uint32_t               HashBuffSize;      /*!< Size of buffer to be processed */

+

+     __IO uint32_t               HashInCount;       /*!< Counter of inputed data        */

+

+     __IO uint32_t               HashITCounter;     /*!< Counter of issued interrupts   */

+

+      HAL_StatusTypeDef          Status;            /*!< HASH peripheral status         */

+

+      HAL_HASHPhaseTypeDef       Phase;             /*!< HASH peripheral phase          */

+

+      DMA_HandleTypeDef          *hdmain;           /*!< HASH In DMA handle parameters  */

+

+      HAL_LockTypeDef            Lock;              /*!< HASH locking object            */

+

+     __IO HAL_HASH_STATETypeDef  State;             /*!< HASH peripheral state          */

+} HASH_HandleTypeDef;

+

+/** 

+  * @}

+  */

+  

+

+/**

+  * @}

+  */ 

+  

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup HASH_Exported_Constants HASH Exported Constants

+  * @{

+  */

+

+/** @defgroup HASH_Exported_Constants_Group1 HASH Algorithm Selection

+  * @{

+  */

+#define HASH_ALGOSELECTION_SHA1      ((uint32_t)0x0000)  /*!< HASH function is SHA1   */

+#define HASH_ALGOSELECTION_SHA224    HASH_CR_ALGO_1      /*!< HASH function is SHA224 */

+#define HASH_ALGOSELECTION_SHA256    HASH_CR_ALGO        /*!< HASH function is SHA256 */

+#define HASH_ALGOSELECTION_MD5       HASH_CR_ALGO_0      /*!< HASH function is MD5    */

+/**

+  * @}

+  */

+

+/** @defgroup HASH_Exported_Constants_Group2 HASH Algorithm Mode

+  * @{

+  */

+#define HASH_ALGOMODE_HASH         ((uint32_t)0x00000000)  /*!< Algorithm is HASH */ 

+#define HASH_ALGOMODE_HMAC         HASH_CR_MODE            /*!< Algorithm is HMAC */

+/**

+  * @}

+  */

+

+/** @defgroup HASH_Exported_Constants_Group3 HASH DataType

+  * @{

+  */

+#define HASH_DATATYPE_32B          ((uint32_t)0x0000) /*!< 32-bit data. No swapping                     */

+#define HASH_DATATYPE_16B          HASH_CR_DATATYPE_0 /*!< 16-bit data. Each half word is swapped       */

+#define HASH_DATATYPE_8B           HASH_CR_DATATYPE_1 /*!< 8-bit data. All bytes are swapped            */

+#define HASH_DATATYPE_1B           HASH_CR_DATATYPE   /*!< 1-bit data. In the word all bits are swapped */

+/**

+  * @}

+  */

+

+/** @defgroup HASH_Exported_Constants_Group4 HASH HMAC Long key 

+  * @brief HASH HMAC Long key used only for HMAC mode

+  * @{

+  */

+#define HASH_HMAC_KEYTYPE_SHORTKEY      ((uint32_t)0x00000000)  /*!< HMAC Key is <= 64 bytes */

+#define HASH_HMAC_KEYTYPE_LONGKEY       HASH_CR_LKEY            /*!< HMAC Key is > 64 bytes  */

+/**

+  * @}

+  */

+

+/** @defgroup HASH_Exported_Constants_Group5 HASH Flags definition 

+  * @{

+  */

+#define HASH_FLAG_DINIS            HASH_SR_DINIS  /*!< 16 locations are free in the DIN : A new block can be entered into the input buffer */

+#define HASH_FLAG_DCIS             HASH_SR_DCIS   /*!< Digest calculation complete                                                         */

+#define HASH_FLAG_DMAS             HASH_SR_DMAS   /*!< DMA interface is enabled (DMAE=1) or a transfer is ongoing                          */

+#define HASH_FLAG_BUSY             HASH_SR_BUSY   /*!< The hash core is Busy : processing a block of data                                  */

+#define HASH_FLAG_DINNE            HASH_CR_DINNE  /*!< DIN not empty : The input buffer contains at least one word of data                 */

+/**

+  * @}

+  */

+

+/** @defgroup HASH_Exported_Constants_Group6 HASH Interrupts definition 

+  * @{

+  */

+#define HASH_IT_DINI               HASH_IMR_DINIM  /*!< A new block can be entered into the input buffer (DIN) */

+#define HASH_IT_DCI                HASH_IMR_DCIM   /*!< Digest calculation complete                            */

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup HASH_Exported_Macros HASH Exported Macros

+  * @{

+  */

+  

+/** @brief Reset HASH handle state

+  * @param  __HANDLE__: specifies the HASH handle.

+  * @retval None

+  */

+#define __HAL_HASH_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_HASH_STATE_RESET)

+

+/** @brief  Check whether the specified HASH flag is set or not.

+  * @param  __FLAG__: specifies the flag to check.

+  *         This parameter can be one of the following values:

+  *            @arg HASH_FLAG_DINIS: A new block can be entered into the input buffer. 

+  *            @arg HASH_FLAG_DCIS: Digest calculation complete

+  *            @arg HASH_FLAG_DMAS: DMA interface is enabled (DMAE=1) or a transfer is ongoing

+  *            @arg HASH_FLAG_BUSY: The hash core is Busy : processing a block of data

+  *            @arg HASH_FLAG_DINNE: DIN not empty : The input buffer contains at least one word of data

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define __HAL_HASH_GET_FLAG(__FLAG__) ((HASH->SR & (__FLAG__)) == (__FLAG__))

+

+/**

+  * @brief  Enable the multiple DMA mode. 

+  *         This feature is available only in STM32F429x and STM32F439x devices.

+  * @retval None

+  */

+#define __HAL_HASH_SET_MDMAT()          HASH->CR |= HASH_CR_MDMAT

+

+/**

+  * @brief  Disable the multiple DMA mode.

+  * @retval None

+  */

+#define __HAL_HASH_RESET_MDMAT()        HASH->CR &= (uint32_t)(~HASH_CR_MDMAT)

+

+/**

+  * @brief  Start the digest computation

+  * @retval None

+  */

+#define __HAL_HASH_START_DIGEST()       HASH->STR |= HASH_STR_DCAL

+

+/**

+  * @brief Set the number of valid bits in last word written in Data register

+  * @param  SIZE: size in byte of last data written in Data register.

+  * @retval None

+*/

+#define __HAL_HASH_SET_NBVALIDBITS(SIZE) do{HASH->STR &= ~(HASH_STR_NBW);\

+                                            HASH->STR |= 8 * ((SIZE) % 4);\

+                                           }while(0)

+

+/**

+  * @}

+  */ 

+

+/* Include HASH HAL Extension module */

+#include "stm32f7xx_hal_hash_ex.h"

+/* Exported functions --------------------------------------------------------*/

+

+/** @defgroup HASH_Exported_Functions HASH Exported Functions

+  * @{

+  */

+

+/** @addtogroup HASH_Exported_Functions_Group1

+  * @{

+  */  

+HAL_StatusTypeDef HAL_HASH_Init(HASH_HandleTypeDef *hhash);

+HAL_StatusTypeDef HAL_HASH_DeInit(HASH_HandleTypeDef *hhash);

+/**

+  * @}

+  */ 

+

+/** @addtogroup HASH_Exported_Functions_Group2

+  * @{

+  */  

+HAL_StatusTypeDef HAL_HASH_SHA1_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);

+HAL_StatusTypeDef HAL_HASH_MD5_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);

+HAL_StatusTypeDef HAL_HASH_MD5_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);

+HAL_StatusTypeDef HAL_HASH_SHA1_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);

+/**

+  * @}

+  */ 

+  

+/** @addtogroup HASH_Exported_Functions_Group3

+  * @{

+  */  

+HAL_StatusTypeDef HAL_HMAC_SHA1_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);

+HAL_StatusTypeDef HAL_HMAC_MD5_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);

+/**

+  * @}

+  */ 

+

+/** @addtogroup HASH_Exported_Functions_Group4

+  * @{

+  */  

+HAL_StatusTypeDef HAL_HASH_SHA1_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer);

+HAL_StatusTypeDef HAL_HASH_MD5_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer);

+/**

+  * @}

+  */ 

+

+/** @addtogroup HASH_Exported_Functions_Group5

+  * @{

+  */    

+HAL_StatusTypeDef HAL_HASH_SHA1_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);

+HAL_StatusTypeDef HAL_HASH_SHA1_Finish(HASH_HandleTypeDef *hhash, uint8_t* pOutBuffer, uint32_t Timeout);

+HAL_StatusTypeDef HAL_HASH_MD5_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);

+HAL_StatusTypeDef HAL_HASH_MD5_Finish(HASH_HandleTypeDef *hhash, uint8_t* pOutBuffer, uint32_t Timeout);

+/**

+  * @}

+  */ 

+

+/** @addtogroup HASH_Exported_Functions_Group6

+  * @{

+  */  

+HAL_StatusTypeDef HAL_HMAC_SHA1_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);

+HAL_StatusTypeDef HAL_HMAC_MD5_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);

+/**

+  * @}

+  */ 

+

+/** @addtogroup HASH_Exported_Functions_Group7

+  * @{

+  */  

+void HAL_HASH_IRQHandler(HASH_HandleTypeDef *hhash);

+/**

+  * @}

+  */ 

+

+/** @addtogroup HASH_Exported_Functions_Group8

+  * @{

+  */

+HAL_HASH_STATETypeDef HAL_HASH_GetState(HASH_HandleTypeDef *hhash);

+void HAL_HASH_MspInit(HASH_HandleTypeDef *hhash);

+void HAL_HASH_MspDeInit(HASH_HandleTypeDef *hhash);

+void HAL_HASH_InCpltCallback(HASH_HandleTypeDef *hhash);

+void HAL_HASH_DgstCpltCallback(HASH_HandleTypeDef *hhash);

+void HAL_HASH_ErrorCallback(HASH_HandleTypeDef *hhash);

+/**

+  * @}

+  */ 

+  

+ /**

+  * @}

+  */ 

+ 

+ /* Private types -------------------------------------------------------------*/

+/** @defgroup HASH_Private_Types HASH Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup HASH_Private_Variables HASH Private Variables

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup HASH_Private_Constants HASH Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup HASH_Private_Macros HASH Private Macros

+  * @{

+  */

+#define IS_HASH_ALGOSELECTION(__ALGOSELECTION__) (((__ALGOSELECTION__) == HASH_ALGOSELECTION_SHA1)   || \

+                                                  ((__ALGOSELECTION__) == HASH_ALGOSELECTION_SHA224) || \

+                                                  ((__ALGOSELECTION__) == HASH_ALGOSELECTION_SHA256) || \

+                                                  ((__ALGOSELECTION__) == HASH_ALGOSELECTION_MD5))

+

+

+#define IS_HASH_ALGOMODE(__ALGOMODE__) (((__ALGOMODE__) == HASH_ALGOMODE_HASH) || \

+                                        ((__ALGOMODE__) == HASH_ALGOMODE_HMAC))

+

+

+#define IS_HASH_DATATYPE(__DATATYPE__) (((__DATATYPE__) == HASH_DATATYPE_32B)|| \

+                                        ((__DATATYPE__) == HASH_DATATYPE_16B)|| \

+                                        ((__DATATYPE__) == HASH_DATATYPE_8B) || \

+                                        ((__DATATYPE__) == HASH_DATATYPE_1B))

+

+

+#define IS_HASH_HMAC_KEYTYPE(__KEYTYPE__) (((__KEYTYPE__) == HASH_HMAC_KEYTYPE_SHORTKEY) || \

+                                           ((__KEYTYPE__) == HASH_HMAC_KEYTYPE_LONGKEY))

+

+/**

+  * @}

+  */ 

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup HASH_Private_Functions HASH Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+ 

+/**

+  * @}

+  */ 

+#endif /* STM32F756xx */

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+

+#endif /* __STM32F7xx_HAL_HASH_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_hash_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_hash_ex.h
new file mode 100644
index 0000000..8c60611
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_hash_ex.h
@@ -0,0 +1,199 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_hash_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of HASH HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_HASH_EX_H

+#define __STM32F7xx_HAL_HASH_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+#if defined(STM32F756xx)

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup HASHEx    

+  * @brief HASHEx HAL Extension module driver 

+  *  @{

+  */ 

+  

+/* Exported types ------------------------------------------------------------*/ 

+/* Exported constants --------------------------------------------------------*/

+/* Exported macro ------------------------------------------------------------*/

+/* Exported functions --------------------------------------------------------*/

+

+/** @defgroup HASHEx_Exported_Functions HASHEx Exported Functions

+  * @{

+  */

+

+/** @defgroup HASHEx_Exported_Functions_Group1 HASHEx processing using polling functions

+  * @{

+  */  

+

+HAL_StatusTypeDef HAL_HASHEx_SHA224_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);

+HAL_StatusTypeDef HAL_HASHEx_SHA256_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);

+HAL_StatusTypeDef HAL_HASHEx_SHA224_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);

+HAL_StatusTypeDef HAL_HASHEx_SHA256_Accumulate(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);

+

+/**

+  * @}

+  */ 

+  

+/** @defgroup HASHEx_Exported_Functions_Group2 HMAC processing using polling functions

+  * @{

+  */ 

+  

+HAL_StatusTypeDef HAL_HMACEx_SHA224_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);

+HAL_StatusTypeDef HAL_HMACEx_SHA256_Start(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer, uint32_t Timeout);

+

+/**

+  * @}

+  */ 

+  

+/** @defgroup HASHEx_Exported_Functions_Group3 HASHEx processing using  functions

+  * @{

+  */ 

+  

+HAL_StatusTypeDef HAL_HASHEx_SHA224_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer);

+HAL_StatusTypeDef HAL_HASHEx_SHA256_Start_IT(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t* pOutBuffer);

+

+/**

+  * @}

+  */ 

+  

+/** @defgroup HASHEx_Exported_Functions_Group4 HASHEx processing using DMA

+  * @{

+  */

+  

+HAL_StatusTypeDef HAL_HASHEx_SHA224_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);

+HAL_StatusTypeDef HAL_HASHEx_SHA224_Finish(HASH_HandleTypeDef *hhash, uint8_t* pOutBuffer, uint32_t Timeout);

+HAL_StatusTypeDef HAL_HASHEx_SHA256_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);

+HAL_StatusTypeDef HAL_HASHEx_SHA256_Finish(HASH_HandleTypeDef *hhash, uint8_t* pOutBuffer, uint32_t Timeout);

+

+/**

+  * @}

+  */ 

+  

+/** @defgroup HASHEx_Exported_Functions_Group5 HMAC processing using DMA

+  * @{

+  */

+  

+HAL_StatusTypeDef HAL_HMACEx_SHA224_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);

+HAL_StatusTypeDef HAL_HMACEx_SHA256_Start_DMA(HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size);

+/**

+  * @}

+  */ 

+  

+/** @defgroup HASHEx_Exported_Functions_Group6 HASHEx processing functions

+  * @{

+  */

+  

+void HAL_HASHEx_IRQHandler(HASH_HandleTypeDef *hhash);

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+ 

+ /* Private types -------------------------------------------------------------*/

+/** @defgroup HASHEx_Private_Types HASHEx Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup HASHEx_Private_Variables HASHEx Private Variables

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup HASHEx_Private_Constants HASHEx Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup HASHEx_Private_Macros HASHEx Private Macros

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup HASHEx_Private_Functions HASHEx Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+   

+/**

+  * @}

+  */ 

+#endif /* STM32F756xx */

+/**

+  * @}

+  */ 

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_HASH_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_hcd.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_hcd.h
new file mode 100644
index 0000000..484f6e2
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_hcd.h
@@ -0,0 +1,277 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_hcd.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of HCD HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_HCD_H

+#define __STM32F7xx_HAL_HCD_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_ll_usb.h"

+   

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @defgroup HCD HCD

+  * @brief HCD HAL module driver

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup HCD_Exported_Types HCD Exported Types

+  * @{

+  */ 

+

+/** @defgroup HCD_Exported_Types_Group1 HCD State Structure definition 

+  * @{

+  */

+typedef enum 

+{

+  HAL_HCD_STATE_RESET    = 0x00,

+  HAL_HCD_STATE_READY    = 0x01,

+  HAL_HCD_STATE_ERROR    = 0x02,

+  HAL_HCD_STATE_BUSY     = 0x03,

+  HAL_HCD_STATE_TIMEOUT  = 0x04

+} HCD_StateTypeDef;

+

+typedef USB_OTG_GlobalTypeDef   HCD_TypeDef;

+typedef USB_OTG_CfgTypeDef      HCD_InitTypeDef;

+typedef USB_OTG_HCTypeDef       HCD_HCTypeDef ;   

+typedef USB_OTG_URBStateTypeDef HCD_URBStateTypeDef ;

+typedef USB_OTG_HCStateTypeDef  HCD_HCStateTypeDef ;

+/**

+  * @}

+  */

+

+/** @defgroup HCD_Exported_Types_Group2 HCD Handle Structure definition   

+  * @{

+  */ 

+typedef struct

+{

+  HCD_TypeDef               *Instance;  /*!< Register base address    */ 

+  HCD_InitTypeDef           Init;       /*!< HCD required parameters  */

+  HCD_HCTypeDef             hc[15];     /*!< Host channels parameters */

+  HAL_LockTypeDef           Lock;       /*!< HCD peripheral status    */

+  __IO HCD_StateTypeDef     State;      /*!< HCD communication state  */

+  void                      *pData;     /*!< Pointer Stack Handler    */

+} HCD_HandleTypeDef;

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup HCD_Exported_Constants HCD Exported Constants

+  * @{

+  */

+/** @defgroup HCD_Speed HCD Speed

+  * @{

+  */

+#define HCD_SPEED_HIGH               0

+#define HCD_SPEED_LOW                2  

+#define HCD_SPEED_FULL               3

+/**

+  * @}

+  */

+  

+/** @defgroup HCD_PHY_Module HCD PHY Module

+  * @{

+  */

+#define HCD_PHY_ULPI                 1

+#define HCD_PHY_EMBEDDED             2

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */ 

+  

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup HCD_Exported_Macros HCD Exported Macros

+ *  @brief macros to handle interrupts and specific clock configurations

+ * @{

+ */

+#define __HAL_HCD_ENABLE(__HANDLE__)                   USB_EnableGlobalInt ((__HANDLE__)->Instance)

+#define __HAL_HCD_DISABLE(__HANDLE__)                  USB_DisableGlobalInt ((__HANDLE__)->Instance)

+

+#define __HAL_HCD_GET_FLAG(__HANDLE__, __INTERRUPT__)      ((USB_ReadInterrupts((__HANDLE__)->Instance) & (__INTERRUPT__)) == (__INTERRUPT__))

+#define __HAL_HCD_CLEAR_FLAG(__HANDLE__, __INTERRUPT__)    (((__HANDLE__)->Instance->GINTSTS) = (__INTERRUPT__))

+#define __HAL_HCD_IS_INVALID_INTERRUPT(__HANDLE__)         (USB_ReadInterrupts((__HANDLE__)->Instance) == 0)    

+

+#define __HAL_HCD_CLEAR_HC_INT(chnum, __INTERRUPT__)  (USBx_HC(chnum)->HCINT = (__INTERRUPT__)) 

+#define __HAL_HCD_MASK_HALT_HC_INT(chnum)             (USBx_HC(chnum)->HCINTMSK &= ~USB_OTG_HCINTMSK_CHHM) 

+#define __HAL_HCD_UNMASK_HALT_HC_INT(chnum)           (USBx_HC(chnum)->HCINTMSK |= USB_OTG_HCINTMSK_CHHM) 

+#define __HAL_HCD_MASK_ACK_HC_INT(chnum)              (USBx_HC(chnum)->HCINTMSK &= ~USB_OTG_HCINTMSK_ACKM) 

+#define __HAL_HCD_UNMASK_ACK_HC_INT(chnum)            (USBx_HC(chnum)->HCINTMSK |= USB_OTG_HCINTMSK_ACKM) 

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @defgroup HCD_Exported_Functions HCD Exported Functions

+  * @{

+  */

+

+/** @defgroup HCD_Exported_Functions_Group1 Initialization and de-initialization functions

+  * @{

+  */

+HAL_StatusTypeDef      HAL_HCD_Init(HCD_HandleTypeDef *hhcd);

+HAL_StatusTypeDef      HAL_HCD_DeInit (HCD_HandleTypeDef *hhcd);

+HAL_StatusTypeDef      HAL_HCD_HC_Init(HCD_HandleTypeDef *hhcd,  

+                                  uint8_t ch_num,

+                                  uint8_t epnum,

+                                  uint8_t dev_address,

+                                  uint8_t speed,

+                                  uint8_t ep_type,

+                                  uint16_t mps);

+

+HAL_StatusTypeDef   HAL_HCD_HC_Halt(HCD_HandleTypeDef *hhcd, uint8_t ch_num);

+void                HAL_HCD_MspInit(HCD_HandleTypeDef *hhcd);

+void                HAL_HCD_MspDeInit(HCD_HandleTypeDef *hhcd);

+/**

+  * @}

+  */

+

+/** @defgroup HCD_Exported_Functions_Group2 IO operation functions

+  * @{

+  */

+HAL_StatusTypeDef       HAL_HCD_HC_SubmitRequest(HCD_HandleTypeDef *hhcd,

+                                                 uint8_t pipe, 

+                                                 uint8_t direction ,

+                                                 uint8_t ep_type,  

+                                                 uint8_t token, 

+                                                 uint8_t* pbuff, 

+                                                 uint16_t length,

+                                                 uint8_t do_ping);

+

+ /* Non-Blocking mode: Interrupt */

+void                    HAL_HCD_IRQHandler(HCD_HandleTypeDef *hhcd);

+void             HAL_HCD_SOF_Callback(HCD_HandleTypeDef *hhcd);

+void             HAL_HCD_Connect_Callback(HCD_HandleTypeDef *hhcd);

+void             HAL_HCD_Disconnect_Callback(HCD_HandleTypeDef *hhcd);

+void             HAL_HCD_HC_NotifyURBChange_Callback(HCD_HandleTypeDef *hhcd, 

+                                                            uint8_t chnum, 

+                                                            HCD_URBStateTypeDef urb_state);

+/**

+  * @}

+  */

+

+/** @defgroup HCD_Exported_Functions_Group3 Peripheral Control functions

+  * @{

+  */

+HAL_StatusTypeDef       HAL_HCD_ResetPort(HCD_HandleTypeDef *hhcd);

+HAL_StatusTypeDef       HAL_HCD_Start(HCD_HandleTypeDef *hhcd);

+HAL_StatusTypeDef       HAL_HCD_Stop(HCD_HandleTypeDef *hhcd);

+/**

+  * @}

+  */

+

+/** @defgroup HCD_Exported_Functions_Group4 Peripheral State functions

+  * @{

+  */

+HCD_StateTypeDef        HAL_HCD_GetState(HCD_HandleTypeDef *hhcd);

+HCD_URBStateTypeDef     HAL_HCD_HC_GetURBState(HCD_HandleTypeDef *hhcd, uint8_t chnum);

+uint32_t                HAL_HCD_HC_GetXferCount(HCD_HandleTypeDef *hhcd, uint8_t chnum);

+HCD_HCStateTypeDef      HAL_HCD_HC_GetState(HCD_HandleTypeDef *hhcd, uint8_t chnum);

+uint32_t                HAL_HCD_GetCurrentFrame(HCD_HandleTypeDef *hhcd);

+uint32_t                HAL_HCD_GetCurrentSpeed(HCD_HandleTypeDef *hhcd);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup HCD_Private_Macros HCD Private Macros

+ * @{

+ */

+/** @defgroup HCD_Instance_definition HCD Instance definition

+  * @{

+  */

+#define IS_HCD_ALL_INSTANCE(INSTANCE) (((INSTANCE) == USB_OTG_FS) || \

+                                       ((INSTANCE) == USB_OTG_HS))

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private functions prototypes ----------------------------------------------*/

+/** @defgroup HCD_Private_Functions_Prototypes HCD Private Functions Prototypes

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup HCD_Private_Functions HCD Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_HCD_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_i2c.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_i2c.h
new file mode 100644
index 0000000..4c84d3d
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_i2c.h
@@ -0,0 +1,598 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_i2c.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of I2C HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_I2C_H

+#define __STM32F7xx_HAL_I2C_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"  

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup I2C

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup I2C_Exported_Types I2C Exported Types

+  * @{

+  */

+

+/** @defgroup I2C_Configuration_Structure_definition I2C Configuration Structure definition

+  * @brief  I2C Configuration Structure definition  

+  * @{

+  */

+typedef struct

+{

+  uint32_t Timing;              /*!< Specifies the I2C_TIMINGR_register value.

+                                  This parameter calculated by referring to I2C initialization 

+                                         section in Reference manual */

+

+  uint32_t OwnAddress1;         /*!< Specifies the first device own address.

+                                  This parameter can be a 7-bit or 10-bit address. */

+

+  uint32_t AddressingMode;      /*!< Specifies if 7-bit or 10-bit addressing mode is selected.

+                                  This parameter can be a value of @ref I2C_addressing_mode */

+

+  uint32_t DualAddressMode;     /*!< Specifies if dual addressing mode is selected.

+                                  This parameter can be a value of @ref I2C_dual_addressing_mode */

+

+  uint32_t OwnAddress2;         /*!< Specifies the second device own address if dual addressing mode is selected

+                                  This parameter can be a 7-bit address. */

+

+  uint32_t OwnAddress2Masks;    /*!< Specifies the acknoledge mask address second device own address if dual addressing mode is selected

+                                  This parameter can be a value of @ref I2C_own_address2_masks */

+

+  uint32_t GeneralCallMode;     /*!< Specifies if general call mode is selected.

+                                  This parameter can be a value of @ref I2C_general_call_addressing_mode */

+

+  uint32_t NoStretchMode;       /*!< Specifies if nostretch mode is selected.

+                                  This parameter can be a value of @ref I2C_nostretch_mode */

+

+}I2C_InitTypeDef;

+

+/** 

+  * @}

+  */

+

+/** @defgroup HAL_state_structure_definition HAL state structure definition

+  * @brief  HAL State structure definition  

+  * @{

+  */ 

+

+typedef enum

+{

+  HAL_I2C_STATE_RESET           = 0x00,  /*!< I2C not yet initialized or disabled         */

+  HAL_I2C_STATE_READY           = 0x01,  /*!< I2C initialized and ready for use           */

+  HAL_I2C_STATE_BUSY            = 0x02,  /*!< I2C internal process is ongoing             */

+  HAL_I2C_STATE_MASTER_BUSY_TX  = 0x12,  /*!< Master Data Transmission process is ongoing */

+  HAL_I2C_STATE_MASTER_BUSY_RX  = 0x22,  /*!< Master Data Reception process is ongoing    */

+  HAL_I2C_STATE_SLAVE_BUSY_TX   = 0x32,  /*!< Slave Data Transmission process is ongoing  */

+  HAL_I2C_STATE_SLAVE_BUSY_RX   = 0x42,  /*!< Slave Data Reception process is ongoing     */

+  HAL_I2C_STATE_MEM_BUSY_TX     = 0x52,  /*!< Memory Data Transmission process is ongoing */

+  HAL_I2C_STATE_MEM_BUSY_RX     = 0x62,  /*!< Memory Data Reception process is ongoing    */

+  HAL_I2C_STATE_TIMEOUT         = 0x03,  /*!< Timeout state                               */

+  HAL_I2C_STATE_ERROR           = 0x04   /*!< Reception process is ongoing                */

+}HAL_I2C_StateTypeDef;

+

+/** 

+  * @}

+  */

+

+/** @defgroup I2C_Error_Code_definition I2C Error Code definition

+  * @brief  I2C Error Code definition  

+  * @{

+  */ 

+#define HAL_I2C_ERROR_NONE      ((uint32_t)0x00000000)    /*!< No error              */

+#define HAL_I2C_ERROR_BERR      ((uint32_t)0x00000001)    /*!< BERR error            */

+#define HAL_I2C_ERROR_ARLO      ((uint32_t)0x00000002)    /*!< ARLO error            */

+#define HAL_I2C_ERROR_AF        ((uint32_t)0x00000004)    /*!< ACKF error            */

+#define HAL_I2C_ERROR_OVR       ((uint32_t)0x00000008)    /*!< OVR error             */

+#define HAL_I2C_ERROR_DMA       ((uint32_t)0x00000010)    /*!< DMA transfer error    */

+#define HAL_I2C_ERROR_TIMEOUT   ((uint32_t)0x00000020)    /*!< Timeout error         */

+#define HAL_I2C_ERROR_SIZE      ((uint32_t)0x00000040)    /*!< Size Management error */

+/** 

+  * @}

+  */

+

+/** @defgroup I2C_handle_Structure_definition I2C handle Structure definition 

+  * @brief  I2C handle Structure definition  

+  * @{

+  */

+typedef struct

+{

+  I2C_TypeDef                *Instance;  /*!< I2C registers base address     */

+

+  I2C_InitTypeDef            Init;       /*!< I2C communication parameters   */

+

+  uint8_t                    *pBuffPtr;  /*!< Pointer to I2C transfer buffer */

+

+  uint16_t                   XferSize;   /*!< I2C transfer size              */

+

+  __IO uint16_t              XferCount;  /*!< I2C transfer counter           */

+

+  DMA_HandleTypeDef          *hdmatx;    /*!< I2C Tx DMA handle parameters   */

+

+  DMA_HandleTypeDef          *hdmarx;    /*!< I2C Rx DMA handle parameters   */

+

+  HAL_LockTypeDef            Lock;       /*!< I2C locking object             */

+

+  __IO HAL_I2C_StateTypeDef  State;      /*!< I2C communication state        */

+

+  __IO uint32_t              ErrorCode;  /*!< I2C Error code                   */

+

+}I2C_HandleTypeDef;

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */  

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup I2C_Exported_Constants I2C Exported Constants

+  * @{

+  */

+

+/** @defgroup I2C_addressing_mode I2C addressing mode

+  * @{

+  */

+#define I2C_ADDRESSINGMODE_7BIT         ((uint32_t)0x00000001)

+#define I2C_ADDRESSINGMODE_10BIT        ((uint32_t)0x00000002)

+/**

+  * @}

+  */

+

+/** @defgroup I2C_dual_addressing_mode I2C dual addressing mode

+  * @{

+  */

+#define I2C_DUALADDRESS_DISABLE         ((uint32_t)0x00000000)

+#define I2C_DUALADDRESS_ENABLE          I2C_OAR2_OA2EN

+/**

+  * @}

+  */

+

+/** @defgroup I2C_own_address2_masks I2C own address2 masks

+  * @{

+  */

+#define I2C_OA2_NOMASK                  ((uint8_t)0x00)

+#define I2C_OA2_MASK01                  ((uint8_t)0x01)

+#define I2C_OA2_MASK02                  ((uint8_t)0x02)

+#define I2C_OA2_MASK03                  ((uint8_t)0x03)

+#define I2C_OA2_MASK04                  ((uint8_t)0x04)

+#define I2C_OA2_MASK05                  ((uint8_t)0x05)

+#define I2C_OA2_MASK06                  ((uint8_t)0x06)

+#define I2C_OA2_MASK07                  ((uint8_t)0x07)

+/**

+  * @}

+  */

+

+/** @defgroup I2C_general_call_addressing_mode I2C general call addressing mode

+  * @{

+  */

+#define I2C_GENERALCALL_DISABLE         ((uint32_t)0x00000000)

+#define I2C_GENERALCALL_ENABLE          I2C_CR1_GCEN

+/**

+  * @}

+  */

+

+/** @defgroup I2C_nostretch_mode I2C nostretch mode

+  * @{

+  */

+#define I2C_NOSTRETCH_DISABLE           ((uint32_t)0x00000000)

+#define I2C_NOSTRETCH_ENABLE            I2C_CR1_NOSTRETCH

+/**

+  * @}

+  */

+

+/** @defgroup I2C_Memory_Address_Size I2C Memory Address Size

+  * @{

+  */

+#define I2C_MEMADD_SIZE_8BIT            ((uint32_t)0x00000001)

+#define I2C_MEMADD_SIZE_16BIT           ((uint32_t)0x00000002)

+/**

+  * @}

+  */  

+  

+/** @defgroup I2C_ReloadEndMode_definition I2C ReloadEndMode definition

+  * @{

+  */

+#define  I2C_RELOAD_MODE                I2C_CR2_RELOAD

+#define  I2C_AUTOEND_MODE               I2C_CR2_AUTOEND

+#define  I2C_SOFTEND_MODE               ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup I2C_StartStopMode_definition I2C StartStopMode definition

+  * @{

+  */

+#define  I2C_NO_STARTSTOP               ((uint32_t)0x00000000)

+#define  I2C_GENERATE_STOP              I2C_CR2_STOP

+#define  I2C_GENERATE_START_READ        (uint32_t)(I2C_CR2_START | I2C_CR2_RD_WRN)

+#define  I2C_GENERATE_START_WRITE       I2C_CR2_START

+/**

+  * @}

+  */

+

+/** @defgroup I2C_Interrupt_configuration_definition I2C Interrupt configuration definition

+  * @brief I2C Interrupt definition

+  *        Elements values convention: 0xXXXXXXXX

+  *           - XXXXXXXX  : Interrupt control mask

+  * @{

+  */

+#define I2C_IT_ERRI                     I2C_CR1_ERRIE

+#define I2C_IT_TCI                      I2C_CR1_TCIE

+#define I2C_IT_STOPI                    I2C_CR1_STOPIE

+#define I2C_IT_NACKI                    I2C_CR1_NACKIE

+#define I2C_IT_ADDRI                    I2C_CR1_ADDRIE

+#define I2C_IT_RXI                      I2C_CR1_RXIE

+#define I2C_IT_TXI                      I2C_CR1_TXIE

+

+/**

+  * @}

+  */

+

+/** @defgroup I2C_Flag_definition I2C Flag definition

+  * @{

+  */ 

+#define I2C_FLAG_TXE                    I2C_ISR_TXE

+#define I2C_FLAG_TXIS                   I2C_ISR_TXIS

+#define I2C_FLAG_RXNE                   I2C_ISR_RXNE

+#define I2C_FLAG_ADDR                   I2C_ISR_ADDR

+#define I2C_FLAG_AF                     I2C_ISR_NACKF

+#define I2C_FLAG_STOPF                  I2C_ISR_STOPF

+#define I2C_FLAG_TC                     I2C_ISR_TC

+#define I2C_FLAG_TCR                    I2C_ISR_TCR

+#define I2C_FLAG_BERR                   I2C_ISR_BERR

+#define I2C_FLAG_ARLO                   I2C_ISR_ARLO

+#define I2C_FLAG_OVR                    I2C_ISR_OVR

+#define I2C_FLAG_PECERR                 I2C_ISR_PECERR

+#define I2C_FLAG_TIMEOUT                I2C_ISR_TIMEOUT

+#define I2C_FLAG_ALERT                  I2C_ISR_ALERT

+#define I2C_FLAG_BUSY                   I2C_ISR_BUSY

+#define I2C_FLAG_DIR                    I2C_ISR_DIR

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported macros -----------------------------------------------------------*/

+  

+/** @defgroup I2C_Exported_Macros I2C Exported Macros

+  * @{

+  */

+

+/** @brief Reset I2C handle state

+  * @param  __HANDLE__: specifies the I2C Handle.

+  * @retval None

+  */

+#define __HAL_I2C_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_I2C_STATE_RESET)

+

+/** @brief  Enable the specified I2C interrupts.

+  * @param  __HANDLE__: specifies the I2C Handle.

+  * @param  __INTERRUPT__: specifies the interrupt source to enable.

+  *        This parameter can be one of the following values:

+  *            @arg I2C_IT_ERRI: Errors interrupt enable

+  *            @arg I2C_IT_TCI: Transfer complete interrupt enable

+  *            @arg I2C_IT_STOPI: STOP detection interrupt enable

+  *            @arg I2C_IT_NACKI: NACK received interrupt enable

+  *            @arg I2C_IT_ADDRI: Address match interrupt enable

+  *            @arg I2C_IT_RXI: RX interrupt enable

+  *            @arg I2C_IT_TXI: TX interrupt enable

+  *   

+  * @retval None

+  */

+  

+#define __HAL_I2C_ENABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->CR1 |= (__INTERRUPT__))

+

+/** @brief  Disable the specified I2C interrupts.

+  * @param  __HANDLE__: specifies the I2C Handle.

+  * @param  __INTERRUPT__: specifies the interrupt source to disable.

+  *        This parameter can be one of the following values:

+  *            @arg I2C_IT_ERRI: Errors interrupt enable

+  *            @arg I2C_IT_TCI: Transfer complete interrupt enable

+  *            @arg I2C_IT_STOPI: STOP detection interrupt enable

+  *            @arg I2C_IT_NACKI: NACK received interrupt enable

+  *            @arg I2C_IT_ADDRI: Address match interrupt enable

+  *            @arg I2C_IT_RXI: RX interrupt enable

+  *            @arg I2C_IT_TXI: TX interrupt enable

+  *   

+  * @retval None

+  */

+#define __HAL_I2C_DISABLE_IT(__HANDLE__, __INTERRUPT__)  ((__HANDLE__)->Instance->CR1 &= (~(__INTERRUPT__)))

+ 

+/** @brief  Checks if the specified I2C interrupt source is enabled or disabled.

+  * @param  __HANDLE__: specifies the I2C Handle.

+  * @param  __INTERRUPT__: specifies the I2C interrupt source to check.

+  *          This parameter can be one of the following values:

+  *            @arg I2C_IT_ERRI: Errors interrupt enable

+  *            @arg I2C_IT_TCI: Transfer complete interrupt enable

+  *            @arg I2C_IT_STOPI: STOP detection interrupt enable

+  *            @arg I2C_IT_NACKI: NACK received interrupt enable

+  *            @arg I2C_IT_ADDRI: Address match interrupt enable

+  *            @arg I2C_IT_RXI: RX interrupt enable

+  *            @arg I2C_IT_TXI: TX interrupt enable

+  *   

+  * @retval The new state of __INTERRUPT__ (TRUE or FALSE).

+  */

+#define __HAL_I2C_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

+

+/** @brief  Checks whether the specified I2C flag is set or not.

+  * @param  __HANDLE__: specifies the I2C Handle.

+  * @param  __FLAG__: specifies the flag to check.

+  *        This parameter can be one of the following values:

+  *            @arg I2C_FLAG_TXE:      Transmit data register empty

+  *            @arg I2C_FLAG_TXIS:     Transmit interrupt status

+  *            @arg I2C_FLAG_RXNE:     Receive data register not empty

+  *            @arg I2C_FLAG_ADDR:     Address matched (slave mode)

+  *            @arg I2C_FLAG_AF:       Acknowledge failure received flag

+  *            @arg I2C_FLAG_STOPF:    STOP detection flag

+  *            @arg I2C_FLAG_TC:       Transfer complete (master mode)

+  *            @arg I2C_FLAG_TCR:      Transfer complete reload

+  *            @arg I2C_FLAG_BERR:     Bus error

+  *            @arg I2C_FLAG_ARLO:     Arbitration lost

+  *            @arg I2C_FLAG_OVR:      Overrun/Underrun

+  *            @arg I2C_FLAG_PECERR:   PEC error in reception

+  *            @arg I2C_FLAG_TIMEOUT:  Timeout or Tlow detection flag 

+  *            @arg I2C_FLAG_ALERT:    SMBus alert

+  *            @arg I2C_FLAG_BUSY:     Bus busy

+  *            @arg I2C_FLAG_DIR:      Transfer direction (slave mode)

+  *

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define I2C_FLAG_MASK  ((uint32_t)0x0001FFFF)

+#define __HAL_I2C_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & ((__FLAG__) & I2C_FLAG_MASK)) == ((__FLAG__) & I2C_FLAG_MASK)))

+

+/** @brief  Clears the I2C pending flags which are cleared by writing 1 in a specific bit.

+  * @param  __HANDLE__: specifies the I2C Handle.

+  * @param  __FLAG__: specifies the flag to clear.

+  *          This parameter can be any combination of the following values:

+  *            @arg I2C_FLAG_ADDR:    Address matched (slave mode)

+  *            @arg I2C_FLAG_AF:      Acknowledge failure received flag

+  *            @arg I2C_FLAG_STOPF:   STOP detection flag

+  *            @arg I2C_FLAG_BERR:    Bus error

+  *            @arg I2C_FLAG_ARLO:    Arbitration lost

+  *            @arg I2C_FLAG_OVR:     Overrun/Underrun            

+  *            @arg I2C_FLAG_PECERR:  PEC error in reception

+  *            @arg I2C_FLAG_TIMEOUT: Timeout or Tlow detection flag 

+  *            @arg I2C_FLAG_ALERT:   SMBus alert

+  *   

+  * @retval None

+  */

+#define __HAL_I2C_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = ((__FLAG__) & I2C_FLAG_MASK))

+ 

+/** @brief  Enable the specified I2C peripheral.

+  * @param  __HANDLE__: specifies the I2C Handle. 

+  * @retval None

+  */

+#define __HAL_I2C_ENABLE(__HANDLE__)                            (SET_BIT((__HANDLE__)->Instance->CR1,  I2C_CR1_PE))

+

+/** @brief  Disable the specified I2C peripheral.

+  * @param  __HANDLE__: specifies the I2C Handle. 

+  * @retval None

+  */

+#define __HAL_I2C_DISABLE(__HANDLE__)                           (CLEAR_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_PE))

+

+/**

+  * @}

+  */ 

+

+/* Include I2C HAL Extension module */

+#include "stm32f7xx_hal_i2c_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup I2C_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup I2C_Exported_Functions_Group1 Initialization and de-initialization functions

+  * @{

+  */

+/* Initialization and de-initialization functions******************************/

+HAL_StatusTypeDef HAL_I2C_Init(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);

+/**

+  * @}

+  */ 

+

+/** @addtogroup I2C_Exported_Functions_Group2 Input and Output operation functions

+  * @{

+  */

+/* IO operation functions  ****************************************************/

+ /******* 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);

+HAL_StatusTypeDef HAL_I2C_Slave_Receive(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_I2C_Mem_Write(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_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 */

+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);

+HAL_StatusTypeDef HAL_I2C_Slave_Receive_IT(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_I2C_Mem_Write_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_I2C_Mem_Read_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size);

+

+ /******* 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);

+HAL_StatusTypeDef HAL_I2C_Slave_Receive_DMA(I2C_HandleTypeDef *hi2c, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_I2C_Mem_Write_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_I2C_Mem_Read_DMA(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size);

+/**

+  * @}

+  */ 

+

+/** @addtogroup IRQ_Handler_and_Callbacks IRQ Handler and Callbacks

+ * @{

+ */   

+/******* I2C IRQHandler and Callbacks used in non blocking modes (Interrupt and DMA) */

+void HAL_I2C_EV_IRQHandler(I2C_HandleTypeDef *hi2c);

+void HAL_I2C_ER_IRQHandler(I2C_HandleTypeDef *hi2c);

+void HAL_I2C_MasterTxCpltCallback(I2C_HandleTypeDef *hi2c);

+void HAL_I2C_MasterRxCpltCallback(I2C_HandleTypeDef *hi2c);

+void HAL_I2C_SlaveTxCpltCallback(I2C_HandleTypeDef *hi2c);

+void HAL_I2C_SlaveRxCpltCallback(I2C_HandleTypeDef *hi2c);

+void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *hi2c);

+void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c);

+void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c);

+/**

+  * @}

+  */ 

+

+/** @addtogroup I2C_Exported_Functions_Group3 Peripheral State and Errors functions

+  * @{

+  */

+/* Peripheral State and Errors functions  *************************************/

+HAL_I2C_StateTypeDef HAL_I2C_GetState(I2C_HandleTypeDef *hi2c);

+uint32_t             HAL_I2C_GetError(I2C_HandleTypeDef *hi2c);

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+  

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup I2C_Private_Constants I2C Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup I2C_Private_Macro I2C Private Macros

+  * @{

+  */

+

+#define IS_I2C_ADDRESSING_MODE(MODE)    (((MODE) == I2C_ADDRESSINGMODE_7BIT) || \

+                                          ((MODE) == I2C_ADDRESSINGMODE_10BIT))

+

+#define IS_I2C_DUAL_ADDRESS(ADDRESS)    (((ADDRESS) == I2C_DUALADDRESS_DISABLE) || \

+                                          ((ADDRESS) == I2C_DUALADDRESS_ENABLE))

+

+#define IS_I2C_OWN_ADDRESS2_MASK(MASK)  (((MASK) == I2C_OA2_NOMASK)  || \

+                                          ((MASK) == I2C_OA2_MASK01) || \

+                                          ((MASK) == I2C_OA2_MASK02) || \

+                                          ((MASK) == I2C_OA2_MASK03) || \

+                                          ((MASK) == I2C_OA2_MASK04) || \

+                                          ((MASK) == I2C_OA2_MASK05) || \

+                                          ((MASK) == I2C_OA2_MASK06) || \

+                                          ((MASK) == I2C_OA2_MASK07))  

+

+#define IS_I2C_GENERAL_CALL(CALL)       (((CALL) == I2C_GENERALCALL_DISABLE) || \

+                                          ((CALL) == I2C_GENERALCALL_ENABLE))

+

+#define IS_I2C_NO_STRETCH(STRETCH)      (((STRETCH) == I2C_NOSTRETCH_DISABLE) || \

+                                          ((STRETCH) == I2C_NOSTRETCH_ENABLE))

+

+#define IS_I2C_MEMADD_SIZE(SIZE)        (((SIZE) == I2C_MEMADD_SIZE_8BIT) || \

+                                          ((SIZE) == I2C_MEMADD_SIZE_16BIT))

+                              

+

+#define IS_TRANSFER_MODE(MODE)          (((MODE) == I2C_RELOAD_MODE)   || \

+                                          ((MODE) == I2C_AUTOEND_MODE) || \

+                                          ((MODE) == I2C_SOFTEND_MODE))

+

+#define IS_TRANSFER_REQUEST(REQUEST)    (((REQUEST) == I2C_GENERATE_STOP)         || \

+                                          ((REQUEST) == I2C_GENERATE_START_READ)  || \

+                                          ((REQUEST) == I2C_GENERATE_START_WRITE) || \

+                                          ((REQUEST) == I2C_NO_STARTSTOP))

+                               

+

+#define I2C_RESET_CR2(__HANDLE__)       ((__HANDLE__)->Instance->CR2 &= (uint32_t)~((uint32_t)(I2C_CR2_SADD | I2C_CR2_HEAD10R | I2C_CR2_NBYTES | I2C_CR2_RELOAD | I2C_CR2_RD_WRN)))

+

+#define IS_I2C_OWN_ADDRESS1(ADDRESS1)   ((ADDRESS1) <= (uint32_t)0x000003FF)

+#define IS_I2C_OWN_ADDRESS2(ADDRESS2)   ((ADDRESS2) <= (uint16_t)0x00FF)

+

+#define I2C_MEM_ADD_MSB(__ADDRESS__)    ((uint8_t)((uint16_t)(((uint16_t)((__ADDRESS__) & (uint16_t)(0xFF00))) >> 8)))

+#define I2C_MEM_ADD_LSB(__ADDRESS__)    ((uint8_t)((uint16_t)((__ADDRESS__) & (uint16_t)(0x00FF))))

+

+#define I2C_GENERATE_START(__ADDMODE__,__ADDRESS__)   (((__ADDMODE__) == I2C_ADDRESSINGMODE_7BIT) ? (uint32_t)((((uint32_t)(__ADDRESS__) & (I2C_CR2_SADD)) | (I2C_CR2_START) | (I2C_CR2_AUTOEND)) & (~I2C_CR2_RD_WRN)) : \

+                                                          (uint32_t)((((uint32_t)(__ADDRESS__) & (I2C_CR2_SADD)) | (I2C_CR2_ADD10) | (I2C_CR2_START)) & (~I2C_CR2_RD_WRN)))

+/**

+  * @}

+  */ 

+

+/* Private Functions ---------------------------------------------------------*/

+/** @defgroup I2C_Private_Functions I2C Private Functions

+  * @{

+  */

+/* Private functions are defined in stm32f7xx_hal_i2c.c file */

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+  

+#ifdef __cplusplus

+}

+#endif

+

+

+#endif /* __STM32F7xx_HAL_I2C_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_i2c_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_i2c_ex.h
new file mode 100644
index 0000000..96fd3ad
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_i2c_ex.h
@@ -0,0 +1,129 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_i2c_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of I2C HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_I2C_EX_H

+#define __STM32F7xx_HAL_I2C_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"  

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup I2CEx

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup I2CEx_Exported_Constants I2CEx Exported Constants

+  * @{

+  */

+

+/** @defgroup I2CEx_Analog_Filter I2CEx Analog Filter

+  * @{

+  */

+#define I2C_ANALOGFILTER_ENABLE        ((uint32_t)0x00000000)

+#define I2C_ANALOGFILTER_DISABLE       I2C_CR1_ANFOFF

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+/* Exported macro ------------------------------------------------------------*/

+/* Exported functions --------------------------------------------------------*/

+

+/* Peripheral Control methods  ************************************************/

+HAL_StatusTypeDef HAL_I2CEx_ConfigAnalogFilter(I2C_HandleTypeDef *hi2c, uint32_t AnalogFilter);

+HAL_StatusTypeDef HAL_I2CEx_ConfigDigitalFilter(I2C_HandleTypeDef *hi2c, uint32_t DigitalFilter);

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup I2C_Private_Constants I2C Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup I2C_Private_Macro I2C Private Macros

+  * @{

+  */

+#define IS_I2C_ANALOG_FILTER(FILTER)    (((FILTER) == I2C_ANALOGFILTER_ENABLE) || \

+                                          ((FILTER) == I2C_ANALOGFILTER_DISABLE))

+

+#define IS_I2C_DIGITAL_FILTER(FILTER)   ((FILTER) <= 0x0000000F)

+/**

+  * @}

+  */ 

+

+/* Private Functions ---------------------------------------------------------*/

+/** @defgroup I2C_Private_Functions I2C Private Functions

+  * @{

+  */

+/* Private functions are defined in stm32f7xx_hal_i2c_ex.c file */

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_I2C_EX_H */

+

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_i2s.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_i2s.h
new file mode 100644
index 0000000..2184dfb
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_i2s.h
@@ -0,0 +1,483 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_i2s.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of I2S HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_I2S_H

+#define __STM32F7xx_HAL_I2S_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"  

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup I2S

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup I2S_Exported_Types I2S Exported Types

+  * @{

+  */

+

+/** 

+  * @brief I2S Init structure definition  

+  */

+typedef struct

+{

+  uint32_t Mode;                /*!< Specifies the I2S operating mode.

+                                     This parameter can be a value of @ref I2S_Mode */

+

+  uint32_t Standard;            /*!< Specifies the standard used for the I2S communication.

+                                     This parameter can be a value of @ref I2S_Standard */

+

+  uint32_t DataFormat;          /*!< Specifies the data format for the I2S communication.

+                                     This parameter can be a value of @ref I2S_Data_Format */

+

+  uint32_t MCLKOutput;          /*!< Specifies whether the I2S MCLK output is enabled or not.

+                                     This parameter can be a value of @ref I2S_MCLK_Output */

+

+  uint32_t AudioFreq;           /*!< Specifies the frequency selected for the I2S communication.

+                                     This parameter can be a value of @ref I2S_Audio_Frequency */

+

+  uint32_t CPOL;                /*!< Specifies the idle state of the I2S clock.

+                                     This parameter can be a value of @ref I2S_Clock_Polarity */

+   

+  uint32_t ClockSource;         /*!< Specifies the I2S Clock Source.

+                                     This parameter can be a value of @ref I2S_Clock_Source */

+}I2S_InitTypeDef;

+

+/** 

+  * @brief  HAL State structures definition  

+  */ 

+typedef enum

+{

+  HAL_I2S_STATE_RESET      = 0x00,  /*!< I2S not yet initialized or disabled                */

+  HAL_I2S_STATE_READY      = 0x01,  /*!< I2S initialized and ready for use                  */

+  HAL_I2S_STATE_BUSY       = 0x02,  /*!< I2S internal process is ongoing                    */   

+  HAL_I2S_STATE_BUSY_TX    = 0x03,  /*!< Data Transmission process is ongoing               */ 

+  HAL_I2S_STATE_BUSY_RX    = 0x04,  /*!< Data Reception process is ongoing                  */

+  HAL_I2S_STATE_BUSY_TX_RX = 0x05,  /*!< Data Transmission and Reception process is ongoing */

+  HAL_I2S_STATE_TIMEOUT    = 0x06,  /*!< I2S timeout state                                  */  

+  HAL_I2S_STATE_ERROR      = 0x07   /*!< I2S error state                                    */      

+                                                                        

+}HAL_I2S_StateTypeDef;

+

+/** 

+  * @brief I2S handle Structure definition  

+  */

+typedef struct

+{

+  SPI_TypeDef                *Instance;    /* I2S registers base address */

+

+  I2S_InitTypeDef            Init;         /* I2S communication parameters */

+  

+  uint16_t                   *pTxBuffPtr;  /* Pointer to I2S Tx transfer buffer */

+  

+  __IO uint16_t              TxXferSize;   /* I2S Tx transfer size */

+  

+  __IO uint16_t              TxXferCount;  /* I2S Tx transfer Counter */

+  

+  uint16_t                   *pRxBuffPtr;  /* Pointer to I2S Rx transfer buffer */

+  

+  __IO uint16_t              RxXferSize;   /* I2S Rx transfer size */

+  

+  __IO uint16_t              RxXferCount;  /* I2S Rx transfer counter 

+                                              (This field is initialized at the 

+                                               same value as transfer size at the 

+                                               beginning of the transfer and 

+                                               decremented when a sample is received. 

+                                               NbSamplesReceived = RxBufferSize-RxBufferCount) */

+

+  DMA_HandleTypeDef          *hdmatx;      /* I2S Tx DMA handle parameters */

+

+  DMA_HandleTypeDef          *hdmarx;      /* I2S Rx DMA handle parameters */

+  

+  __IO HAL_LockTypeDef       Lock;         /* I2S locking object */

+  

+  __IO HAL_I2S_StateTypeDef  State;        /* I2S communication state */

+

+  __IO uint32_t  ErrorCode;                /* I2S Error code                 */

+

+}I2S_HandleTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup I2S_Exported_Constants I2S Exported Constants

+  * @{

+  */

+

+/** @defgroup I2S_Error_Defintion I2S_Error_Defintion

+  *@brief     I2S Error Code

+  * @{

+  */

+#define HAL_I2S_ERROR_NONE      ((uint32_t)0x00000000)  /*!< No error           */

+#define HAL_I2S_ERROR_TIMEOUT   ((uint32_t)0x00000001)  /*!< Timeout error      */

+#define HAL_I2S_ERROR_OVR       ((uint32_t)0x00000002)  /*!< OVR error          */

+#define HAL_I2S_ERROR_UDR       ((uint32_t)0x00000004)  /*!< UDR error          */

+#define HAL_I2S_ERROR_DMA       ((uint32_t)0x00000008)  /*!< DMA transfer error */

+#define HAL_I2S_ERROR_UNKNOW    ((uint32_t)0x00000010)  /*!< Unknow Error error */

+

+/**

+  * @}

+  */

+/** @defgroup I2S_Clock_Source I2S Clock Source

+  * @{

+  */

+#define I2S_CLOCK_EXTERNAL                ((uint32_t)0x00000001)

+#define I2S_CLOCK_SYSCLK                  ((uint32_t)0x00000002)

+/**

+  * @}

+  */

+

+/** @defgroup I2S_Mode I2S Mode

+  * @{

+  */

+#define I2S_MODE_SLAVE_TX                ((uint32_t)0x00000000)

+#define I2S_MODE_SLAVE_RX                ((uint32_t)0x00000100)

+#define I2S_MODE_MASTER_TX               ((uint32_t)0x00000200)

+#define I2S_MODE_MASTER_RX               ((uint32_t)0x00000300)

+/**

+  * @}

+  */

+  

+/** @defgroup I2S_Standard I2S Standard

+  * @{

+  */

+#define I2S_STANDARD_PHILIPS             ((uint32_t)0x00000000)

+#define I2S_STANDARD_MSB                 ((uint32_t)0x00000010)

+#define I2S_STANDARD_LSB                 ((uint32_t)0x00000020)

+#define I2S_STANDARD_PCM_SHORT           ((uint32_t)0x00000030)

+#define I2S_STANDARD_PCM_LONG            ((uint32_t)0x000000B0)

+/**

+  * @}

+  */

+  

+/** @defgroup I2S_Data_Format I2S Data Format

+  * @{

+  */

+#define I2S_DATAFORMAT_16B               ((uint32_t)0x00000000)

+#define I2S_DATAFORMAT_16B_EXTENDED      ((uint32_t)0x00000001)

+#define I2S_DATAFORMAT_24B               ((uint32_t)0x00000003)

+#define I2S_DATAFORMAT_32B               ((uint32_t)0x00000005)

+/**

+  * @}

+  */

+

+/** @defgroup I2S_MCLK_Output I2S Mclk Output

+  * @{

+  */

+#define I2S_MCLKOUTPUT_ENABLE           ((uint32_t)SPI_I2SPR_MCKOE)

+#define I2S_MCLKOUTPUT_DISABLE          ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup I2S_Audio_Frequency I2S Audio Frequency

+  * @{

+  */

+#define I2S_AUDIOFREQ_192K               ((uint32_t)192000)

+#define I2S_AUDIOFREQ_96K                ((uint32_t)96000)

+#define I2S_AUDIOFREQ_48K                ((uint32_t)48000)

+#define I2S_AUDIOFREQ_44K                ((uint32_t)44100)

+#define I2S_AUDIOFREQ_32K                ((uint32_t)32000)

+#define I2S_AUDIOFREQ_22K                ((uint32_t)22050)

+#define I2S_AUDIOFREQ_16K                ((uint32_t)16000)

+#define I2S_AUDIOFREQ_11K                ((uint32_t)11025)

+#define I2S_AUDIOFREQ_8K                 ((uint32_t)8000)

+#define I2S_AUDIOFREQ_DEFAULT            ((uint32_t)2)

+/**

+  * @}

+  */

+            

+

+/** @defgroup I2S_Clock_Polarity I2S Clock Polarity

+  * @{

+  */

+#define I2S_CPOL_LOW                    ((uint32_t)0x00000000)

+#define I2S_CPOL_HIGH                   ((uint32_t)SPI_I2SCFGR_CKPOL)

+/**

+  * @}

+  */

+

+/** @defgroup I2S_Interrupts_Definition I2S Interrupts Definition

+  * @{

+  */

+#define I2S_IT_TXE                      SPI_CR2_TXEIE

+#define I2S_IT_RXNE                     SPI_CR2_RXNEIE

+#define I2S_IT_ERR                      SPI_CR2_ERRIE

+/**

+  * @}

+  */

+

+/** @defgroup I2S_Flags_Definition I2S Flags Definition

+  * @{

+  */ 

+#define I2S_FLAG_TXE                    SPI_SR_TXE

+#define I2S_FLAG_RXNE                   SPI_SR_RXNE

+

+#define I2S_FLAG_UDR                    SPI_SR_UDR

+#define I2S_FLAG_OVR                    SPI_SR_OVR

+#define I2S_FLAG_FRE                    SPI_SR_FRE

+

+#define I2S_FLAG_CHSIDE                 SPI_SR_CHSIDE

+#define I2S_FLAG_BSY                    SPI_SR_BSY

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+/* Exported macros -----------------------------------------------------------*/

+/** @defgroup I2S_Exported_Macros I2S Exported Macros

+  * @{

+  */

+

+/** @brief  Reset I2S handle state

+  * @param  __HANDLE__: specifies the 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. 

+  * @retval None

+  */

+#define __HAL_I2S_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->I2SCFGR |= SPI_I2SCFGR_I2SE)

+#define __HAL_I2S_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->I2SCFGR &= ~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.

+  *        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

+  *            @arg I2S_IT_ERR: Error interrupt enable

+  * @retval None

+  */  

+#define __HAL_I2S_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR2 |= (__INTERRUPT__))

+#define __HAL_I2S_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR2 &= ~(__INTERRUPT__))

+ 

+/** @brief  Checks if the specified I2S interrupt source is enabled or disabled.

+  * @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.

+  *          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

+  *            @arg I2S_IT_ERR: Error interrupt enable

+  * @retval The new state of __IT__ (TRUE or FALSE).

+  */

+#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.

+  *        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

+  *            @arg I2S_FLAG_UDR: Underrun flag

+  *            @arg I2S_FLAG_OVR: Overrun flag

+  *            @arg I2S_FLAG_FRE: Frame error flag

+  *            @arg I2S_FLAG_CHSIDE: Channel Side flag

+  *            @arg I2S_FLAG_BSY: Busy flag

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#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.

+  * @retval None

+  */

+#define __HAL_I2S_CLEAR_OVRFLAG(__HANDLE__)     \

+  do{                                           \

+    __IO uint32_t tmpreg;                       \

+    tmpreg = (__HANDLE__)->Instance->DR;        \

+    tmpreg = (__HANDLE__)->Instance->SR;        \

+    UNUSED(tmpreg);                             \

+  } while(0)

+    

+/** @brief Clears the I2S UDR pending flag.

+  * @param  __HANDLE__: specifies the I2S Handle.

+  * @retval None

+  */

+#define __HAL_I2S_CLEAR_UDRFLAG(__HANDLE__)     \

+  do{                                             \

+  __IO uint32_t tmpreg;                         \

+  tmpreg = (__HANDLE__)->Instance->SR;          \

+  UNUSED(tmpreg);                               \

+  } while(0)

+/**

+  * @}

+  */ 

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup I2S_Exported_Functions  I2S Exported Functions

+  * @{

+  */

+                                                

+/** @addtogroup I2S_Exported_Functions_Group1 Initialization and de-initialization functions 

+  * @{

+  */

+

+/* Initialization and de-initialization functions *****************************/

+HAL_StatusTypeDef HAL_I2S_Init(I2S_HandleTypeDef *hi2s);

+HAL_StatusTypeDef HAL_I2S_DeInit (I2S_HandleTypeDef *hi2s);

+void HAL_I2S_MspInit(I2S_HandleTypeDef *hi2s);

+void HAL_I2S_MspDeInit(I2S_HandleTypeDef *hi2s);

+/**

+  * @}

+  */

+

+/** @addtogroup I2S_Exported_Functions_Group2 Input and Output operation functions 

+  * @{

+  */

+/* I/O operation functions  ***************************************************/

+ /* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_I2S_Transmit(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_I2S_Receive(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size, uint32_t Timeout);

+

+ /* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_I2S_Transmit_IT(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_I2S_Receive_IT(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size);

+void HAL_I2S_IRQHandler(I2S_HandleTypeDef *hi2s);

+

+/* Non-Blocking mode: DMA */

+HAL_StatusTypeDef HAL_I2S_Transmit_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_I2S_Receive_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size);

+

+HAL_StatusTypeDef HAL_I2S_DMAPause(I2S_HandleTypeDef *hi2s);

+HAL_StatusTypeDef HAL_I2S_DMAResume(I2S_HandleTypeDef *hi2s);

+HAL_StatusTypeDef HAL_I2S_DMAStop(I2S_HandleTypeDef *hi2s);

+

+/* Callbacks used in non blocking modes (Interrupt and DMA) *******************/

+void HAL_I2S_TxHalfCpltCallback(I2S_HandleTypeDef *hi2s);

+void HAL_I2S_TxCpltCallback(I2S_HandleTypeDef *hi2s);

+void HAL_I2S_RxHalfCpltCallback(I2S_HandleTypeDef *hi2s);

+void HAL_I2S_RxCpltCallback(I2S_HandleTypeDef *hi2s);

+void HAL_I2S_ErrorCallback(I2S_HandleTypeDef *hi2s);

+/**

+  * @}

+  */

+

+/** @addtogroup I2S_Exported_Functions_Group3 Peripheral State and Errors functions

+  * @{

+  */

+/* Peripheral Control and State functions  ************************************/

+HAL_I2S_StateTypeDef HAL_I2S_GetState(I2S_HandleTypeDef *hi2s);

+uint32_t HAL_I2S_GetError(I2S_HandleTypeDef *hi2s);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup I2S_Private_Constants I2S Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup I2S_Private_Macros I2S Private Macros

+  * @{

+  */

+#define IS_I2S_CLOCKSOURCE(CLOCK) (((CLOCK) == I2S_CLOCK_EXTERNAL) || \

+                                   ((CLOCK) == I2S_CLOCK_SYSCLK))

+								   

+#define IS_I2S_MODE(MODE) (((MODE) == I2S_MODE_SLAVE_TX) || \

+                           ((MODE) == I2S_MODE_SLAVE_RX) || \

+                           ((MODE) == I2S_MODE_MASTER_TX)|| \

+                           ((MODE) == I2S_MODE_MASTER_RX))

+                           

+#define IS_I2S_STANDARD(STANDARD) (((STANDARD) == I2S_STANDARD_PHILIPS)   || \

+                                   ((STANDARD) == I2S_STANDARD_MSB)       || \

+                                   ((STANDARD) == I2S_STANDARD_LSB)       || \

+                                   ((STANDARD) == I2S_STANDARD_PCM_SHORT) || \

+                                   ((STANDARD) == I2S_STANDARD_PCM_LONG))

+

+#define IS_I2S_DATA_FORMAT(FORMAT) (((FORMAT) == I2S_DATAFORMAT_16B)          || \

+                                    ((FORMAT) == I2S_DATAFORMAT_16B_EXTENDED) || \

+                                    ((FORMAT) == I2S_DATAFORMAT_24B)          || \

+                                    ((FORMAT) == I2S_DATAFORMAT_32B))

+

+#define IS_I2S_MCLK_OUTPUT(OUTPUT) (((OUTPUT) == I2S_MCLKOUTPUT_ENABLE) || \

+                                    ((OUTPUT) == I2S_MCLKOUTPUT_DISABLE))

+                                    

+#define IS_I2S_AUDIO_FREQ(FREQ) ((((FREQ) >= I2S_AUDIOFREQ_8K) && \

+                                 ((FREQ) <= I2S_AUDIOFREQ_192K)) || \

+                                 ((FREQ) == I2S_AUDIOFREQ_DEFAULT))

+								 

+#define IS_I2S_CPOL(CPOL) (((CPOL) == I2S_CPOL_LOW) || \

+                           ((CPOL) == I2S_CPOL_HIGH))

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */  

+	

+#ifdef __cplusplus

+}

+#endif

+

+

+#endif /* __STM32F7xx_HAL_I2S_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_irda.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_irda.h
new file mode 100644
index 0000000..bdd756e
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_irda.h
@@ -0,0 +1,643 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_irda.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of IRDA HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_IRDA_H

+#define __STM32F7xx_HAL_IRDA_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup IRDA

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup IRDA_Exported_Types IRDA Exported Types

+  * @{

+  */

+/** 

+  * @brief IRDA Init Structure definition  

+  */ 

+typedef struct

+{

+  uint32_t BaudRate;                  /*!< This member configures the IRDA communication baud rate.

+                                           The baud rate register is computed using the following formula:

+                                              Baud Rate Register = ((PCLKx) / ((hirda->Init.BaudRate))) */

+

+  uint32_t WordLength;                /*!< Specifies the number of data bits transmitted or received in a frame.

+                                           This parameter can be a value of @ref IRDAEx_Word_Length */

+

+  uint32_t Parity;                    /*!< Specifies the parity mode.

+                                           This parameter can be a value of @ref IRDA_Parity

+                                           @note When parity is enabled, the computed parity is inserted

+                                                 at the MSB position of the transmitted data (9th bit when

+                                                 the word length is set to 9 data bits; 8th bit when the

+                                                 word length is set to 8 data bits). */

+ 

+  uint16_t Mode;                      /*!< Specifies wether the Receive or Transmit mode is enabled or disabled.

+                                           This parameter can be a value of @ref IRDA_Mode */

+  

+  uint8_t  Prescaler;                 /*!< Specifies the Prescaler value for dividing the UART/USART source clock

+                                           to achieve low-power frequency.

+                                           @note Prescaler value 0 is forbidden */

+  

+  uint16_t PowerMode;                 /*!< Specifies the IRDA power mode.

+                                           This parameter can be a value of @ref IRDA_Low_Power */

+}IRDA_InitTypeDef;

+

+/** 

+  * @brief HAL State structures definition  

+  */ 

+typedef enum

+{

+  HAL_IRDA_STATE_RESET             = 0x00,    /*!< Peripheral is not yet Initialized */

+  HAL_IRDA_STATE_READY             = 0x01,    /*!< Peripheral Initialized and ready for use */

+  HAL_IRDA_STATE_BUSY              = 0x02,    /*!< An internal process is ongoing */

+  HAL_IRDA_STATE_BUSY_TX           = 0x12,    /*!< Data Transmission process is ongoing */

+  HAL_IRDA_STATE_BUSY_RX           = 0x22,    /*!< Data Reception process is ongoing */

+  HAL_IRDA_STATE_BUSY_TX_RX        = 0x32,    /*!< Data Transmission and Reception process is ongoing */

+  HAL_IRDA_STATE_TIMEOUT           = 0x03,    /*!< Timeout state */

+  HAL_IRDA_STATE_ERROR             = 0x04     /*!< Error */

+}HAL_IRDA_StateTypeDef;

+

+/**

+  * @brief IRDA clock sources definition

+  */

+typedef enum

+{

+  IRDA_CLOCKSOURCE_PCLK1      = 0x00,    /*!< PCLK1 clock source  */

+  IRDA_CLOCKSOURCE_PCLK2      = 0x01,    /*!< PCLK2 clock source  */

+  IRDA_CLOCKSOURCE_HSI        = 0x02,    /*!< HSI clock source    */

+  IRDA_CLOCKSOURCE_SYSCLK     = 0x04,    /*!< SYSCLK clock source */

+  IRDA_CLOCKSOURCE_LSE        = 0x08     /*!< LSE clock source     */

+}IRDA_ClockSourceTypeDef;

+

+/** 

+  * @brief  IRDA handle Structure definition  

+  */

+typedef struct

+{

+  USART_TypeDef            *Instance;        /* IRDA registers base address        */

+

+  IRDA_InitTypeDef         Init;             /* IRDA communication parameters      */

+

+  uint8_t                  *pTxBuffPtr;      /* Pointer to IRDA Tx transfer Buffer */

+

+  uint16_t                 TxXferSize;       /* IRDA Tx Transfer size              */

+

+  uint16_t                 TxXferCount;      /* IRDA Tx Transfer Counter           */

+

+  uint8_t                  *pRxBuffPtr;      /* Pointer to IRDA Rx transfer Buffer */

+

+  uint16_t                 RxXferSize;       /* IRDA Rx Transfer size              */

+

+  uint16_t                 RxXferCount;      /* IRDA Rx Transfer Counter           */

+

+  uint16_t                 Mask;             /* IRDA RX RDR register mask         */

+

+  DMA_HandleTypeDef        *hdmatx;          /* IRDA Tx DMA Handle parameters      */

+

+  DMA_HandleTypeDef        *hdmarx;          /* IRDA Rx DMA Handle parameters      */

+

+  HAL_LockTypeDef          Lock;             /* Locking object                     */

+

+  __IO HAL_IRDA_StateTypeDef    State;       /* IRDA communication state           */

+

+  __IO uint32_t    ErrorCode;   /* IRDA Error code                    */

+

+}IRDA_HandleTypeDef;

+

+/**

+  * @}

+  */ 

+

+/** 

+  * @brief  IRDA Configuration enumeration values definition  

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup IRDA_Exported_Constants IRDA Exported constants

+  * @{

+  */

+/** @defgroup IRDA_Error_Code IRDA Error Code

+  * @brief    IRDA Error Code 

+  * @{

+  */ 

+

+#define HAL_IRDA_ERROR_NONE      ((uint32_t)0x00000000)    /*!< No error            */

+#define HAL_IRDA_ERROR_PE        ((uint32_t)0x00000001)    /*!< Parity error        */

+#define HAL_IRDA_ERROR_NE        ((uint32_t)0x00000002)    /*!< Noise error         */

+#define HAL_IRDA_ERROR_FE        ((uint32_t)0x00000004)    /*!< frame error         */

+#define HAL_IRDA_ERROR_ORE       ((uint32_t)0x00000008)    /*!< Overrun error       */

+#define HAL_IRDA_ERROR_DMA       ((uint32_t)0x00000010)    /*!< DMA transfer error  */

+/**

+  * @}

+  */

+

+/** @defgroup IRDA_Parity IRDA Parity

+  * @{

+  */ 

+#define IRDA_PARITY_NONE                    ((uint32_t)0x0000)

+#define IRDA_PARITY_EVEN                    ((uint32_t)USART_CR1_PCE)

+#define IRDA_PARITY_ODD                     ((uint32_t)(USART_CR1_PCE | USART_CR1_PS)) 

+/**

+  * @}

+  */ 

+

+

+/** @defgroup IRDA_Transfer_Mode IRDA Transfer Mode

+  * @{

+  */ 

+#define IRDA_MODE_RX                        ((uint32_t)USART_CR1_RE)

+#define IRDA_MODE_TX                        ((uint32_t)USART_CR1_TE)

+#define IRDA_MODE_TX_RX                     ((uint32_t)(USART_CR1_TE |USART_CR1_RE))

+/**

+  * @}

+  */

+

+/** @defgroup IRDA_Low_Power IRDA Low Power

+  * @{

+  */

+#define IRDA_POWERMODE_NORMAL                    ((uint32_t)0x0000)

+#define IRDA_POWERMODE_LOWPOWER                  ((uint32_t)USART_CR3_IRLP)

+/**

+  * @}

+  */

+    

+ /** @defgroup IRDA_State IRDA State

+  * @{

+  */ 

+#define IRDA_STATE_DISABLE                  ((uint32_t)0x0000)

+#define IRDA_STATE_ENABLE                   ((uint32_t)USART_CR1_UE)

+/**

+  * @}

+  */

+

+ /** @defgroup IRDA_Mode IRDA Mode

+  * @{

+  */ 

+#define IRDA_MODE_DISABLE                  ((uint32_t)0x0000)

+#define IRDA_MODE_ENABLE                   ((uint32_t)USART_CR3_IREN)

+/**

+  * @}

+  */

+

+/** @defgroup IRDA_One_Bit IRDA One Bit

+  * @{

+  */

+#define IRDA_ONE_BIT_SAMPLE_DISABLE          ((uint32_t)0x00000000)

+#define IRDA_ONE_BIT_SAMPLE_ENABLE           ((uint32_t)USART_CR3_ONEBIT)

+/**

+  * @}

+  */  

+  

+/** @defgroup IRDA_DMA_Tx IRDA DMA Tx

+  * @{

+  */

+#define IRDA_DMA_TX_DISABLE          ((uint32_t)0x00000000)

+#define IRDA_DMA_TX_ENABLE           ((uint32_t)USART_CR3_DMAT)

+/**

+  * @}

+  */  

+  

+/** @defgroup IRDA_DMA_Rx IRDA DMA Rx

+  * @{

+  */

+#define IRDA_DMA_RX_DISABLE           ((uint32_t)0x0000)

+#define IRDA_DMA_RX_ENABLE            ((uint32_t)USART_CR3_DMAR)

+/**

+  * @}

+  */

+  

+/** @defgroup IRDA_Flags IRDA Flags

+  *        Elements values convention: 0xXXXX

+  *           - 0xXXXX  : Flag mask in the ISR register

+  * @{

+  */

+#define IRDA_FLAG_REACK                     ((uint32_t)0x00400000)

+#define IRDA_FLAG_TEACK                     ((uint32_t)0x00200000)  

+#define IRDA_FLAG_BUSY                      ((uint32_t)0x00010000)

+#define IRDA_FLAG_ABRF                      ((uint32_t)0x00008000)  

+#define IRDA_FLAG_ABRE                      ((uint32_t)0x00004000)

+#define IRDA_FLAG_TXE                       ((uint32_t)0x00000080)

+#define IRDA_FLAG_TC                        ((uint32_t)0x00000040)

+#define IRDA_FLAG_RXNE                      ((uint32_t)0x00000020)

+#define IRDA_FLAG_ORE                       ((uint32_t)0x00000008)

+#define IRDA_FLAG_NE                        ((uint32_t)0x00000004)

+#define IRDA_FLAG_FE                        ((uint32_t)0x00000002)

+#define IRDA_FLAG_PE                        ((uint32_t)0x00000001)

+/**

+  * @}

+  */ 

+

+/** @defgroup IRDA_Interrupt_definition IRDA Interrupt definition

+  *        Elements values convention: 0000ZZZZ0XXYYYYYb

+  *           - YYYYY  : Interrupt source position in the XX register (5bits)

+  *           - XX  : Interrupt source register (2bits)

+  *                 - 01: CR1 register

+  *                 - 10: CR2 register

+  *                 - 11: CR3 register

+  *           - ZZZZ  : Flag position in the ISR register(4bits)

+  * @{   

+  */  

+#define IRDA_IT_PE                          ((uint16_t)0x0028)

+#define IRDA_IT_TXE                         ((uint16_t)0x0727)

+#define IRDA_IT_TC                          ((uint16_t)0x0626)

+#define IRDA_IT_RXNE                        ((uint16_t)0x0525)

+#define IRDA_IT_IDLE                        ((uint16_t)0x0424)

+

+

+                                

+/**       Elements values convention: 000000000XXYYYYYb

+  *           - YYYYY  : Interrupt source position in the XX register (5bits)

+  *           - XX  : Interrupt source register (2bits)

+  *                 - 01: CR1 register

+  *                 - 10: CR2 register

+  *                 - 11: CR3 register

+  */

+#define IRDA_IT_ERR                         ((uint16_t)0x0060)

+

+/**       Elements values convention: 0000ZZZZ00000000b

+  *           - ZZZZ  : Flag position in the ISR register(4bits)

+  */

+#define IRDA_IT_ORE                         ((uint16_t)0x0300)

+#define IRDA_IT_NE                          ((uint16_t)0x0200)

+#define IRDA_IT_FE                          ((uint16_t)0x0100)

+/**

+  * @}

+  */

+  

+/** @defgroup IRDA_IT_CLEAR_Flags IRDA IT CLEAR Flags

+  * @{

+  */

+#define IRDA_CLEAR_PEF                       USART_ICR_PECF            /*!< Parity Error Clear Flag */          

+#define IRDA_CLEAR_FEF                       USART_ICR_FECF            /*!< Framing Error Clear Flag */         

+#define IRDA_CLEAR_NEF                       USART_ICR_NCF             /*!< Noise detected Clear Flag */        

+#define IRDA_CLEAR_OREF                      USART_ICR_ORECF           /*!< OverRun Error Clear Flag */         

+#define IRDA_CLEAR_TCF                       USART_ICR_TCCF            /*!< Transmission Complete Clear Flag */ 

+/**

+  * @}

+  */ 

+

+

+

+/** @defgroup IRDA_Request_Parameters IRDA Request Parameters

+  * @{

+  */

+#define IRDA_AUTOBAUD_REQUEST            ((uint16_t)USART_RQR_ABRRQ)        /*!< Auto-Baud Rate Request */     

+#define IRDA_RXDATA_FLUSH_REQUEST        ((uint16_t)USART_RQR_RXFRQ)        /*!< Receive Data flush Request */ 

+#define IRDA_TXDATA_FLUSH_REQUEST        ((uint16_t)USART_RQR_TXFRQ)        /*!< Transmit data flush Request */

+/**

+  * @}

+  */

+  

+/**

+ * @}

+ */

+

+  

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup IRDA_Exported_Macros IRDA Exported Macros

+  * @{

+  */

+

+/** @brief Reset IRDA handle state

+  * @param  __HANDLE__: specifies the IRDA Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @retval None

+  */

+#define __HAL_IRDA_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_IRDA_STATE_RESET)

+

+/** @brief  Check whether the specified IRDA flag is set or not.

+  * @param  __HANDLE__: specifies the IRDA Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  *         UART peripheral

+  * @param  __FLAG__: specifies the flag to check.

+  *        This parameter can be one of the following values:

+  *            @arg IRDA_FLAG_REACK: Receive enable acknowledge flag

+  *            @arg IRDA_FLAG_TEACK: Transmit enable acknowledge flag

+  *            @arg IRDA_FLAG_BUSY:  Busy flag

+  *            @arg IRDA_FLAG_ABRF:  Auto Baud rate detection flag

+  *            @arg IRDA_FLAG_ABRE:  Auto Baud rate detection error flag

+  *            @arg IRDA_FLAG_TXE:   Transmit data register empty flag

+  *            @arg IRDA_FLAG_TC:    Transmission Complete flag

+  *            @arg IRDA_FLAG_RXNE:  Receive data register not empty flag

+  *            @arg IRDA_FLAG_IDLE:  Idle Line detection flag

+  *            @arg IRDA_FLAG_ORE:   OverRun Error flag

+  *            @arg IRDA_FLAG_NE:    Noise Error flag

+  *            @arg IRDA_FLAG_FE:    Framing Error flag

+  *            @arg IRDA_FLAG_PE:    Parity Error flag

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define __HAL_IRDA_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))   

+

+/** @brief  Enable the specified IRDA interrupt.

+  * @param  __HANDLE__: specifies the IRDA Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  *         UART peripheral

+  * @param  __INTERRUPT__: specifies the IRDA interrupt source to enable.

+  *          This parameter can be one of the following values:

+  *            @arg IRDA_IT_TXE:  Transmit Data Register empty interrupt

+  *            @arg IRDA_IT_TC:   Transmission complete interrupt

+  *            @arg IRDA_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg IRDA_IT_IDLE: Idle line detection interrupt

+  *            @arg IRDA_IT_PE:   Parity Error interrupt

+  *            @arg IRDA_IT_ERR:  Error interrupt(Frame error, noise error, overrun error)

+  * @retval None

+  */

+#define __HAL_IRDA_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((((uint8_t)(__INTERRUPT__)) >> 5) == 1)? ((__HANDLE__)->Instance->CR1 |= (1 << ((__INTERRUPT__) & IRDA_IT_MASK))): \

+                                                          ((((uint8_t)(__INTERRUPT__)) >> 5) == 2)? ((__HANDLE__)->Instance->CR2 |= (1 << ((__INTERRUPT__) & IRDA_IT_MASK))): \

+                                                          ((__HANDLE__)->Instance->CR3 |= (1 << ((__INTERRUPT__) & IRDA_IT_MASK))))

+

+/** @brief  Disable the specified IRDA interrupt.

+  * @param  __HANDLE__: specifies the IRDA Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @param  __INTERRUPT__: specifies the IRDA interrupt source to disable.

+  *          This parameter can be one of the following values:

+  *            @arg IRDA_IT_TXE:  Transmit Data Register empty interrupt

+  *            @arg IRDA_IT_TC:   Transmission complete interrupt

+  *            @arg IRDA_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg IRDA_IT_IDLE: Idle line detection interrupt

+  *            @arg IRDA_IT_PE:   Parity Error interrupt

+  *            @arg IRDA_IT_ERR:  Error interrupt(Frame error, noise error, overrun error)

+  * @retval None

+  */

+#define __HAL_IRDA_DISABLE_IT(__HANDLE__, __INTERRUPT__)  (((((uint8_t)(__INTERRUPT__)) >> 5) == 1)? ((__HANDLE__)->Instance->CR1 &= ~ ((uint32_t)1 << ((__INTERRUPT__) & IRDA_IT_MASK))): \

+                                                           ((((uint8_t)(__INTERRUPT__)) >> 5) == 2)? ((__HANDLE__)->Instance->CR2 &= ~ ((uint32_t)1 << ((__INTERRUPT__) & IRDA_IT_MASK))): \

+                                                           ((__HANDLE__)->Instance->CR3 &= ~ ((uint32_t)1 << ((__INTERRUPT__) & IRDA_IT_MASK))))

+

+/** @brief  Check whether the specified IRDA interrupt has occurred or not.

+  * @param  __HANDLE__: specifies the IRDA Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @param  __IT__: specifies the IRDA interrupt source to check.

+  *          This parameter can be one of the following values:

+  *            @arg IRDA_IT_TXE: Transmit Data Register empty interrupt

+  *            @arg IRDA_IT_TC:  Transmission complete interrupt

+  *            @arg IRDA_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg IRDA_IT_IDLE: Idle line detection interrupt

+  *            @arg IRDA_IT_ORE: OverRun Error interrupt

+  *            @arg IRDA_IT_NE: Noise Error interrupt

+  *            @arg IRDA_IT_FE: Framing Error interrupt

+  *            @arg IRDA_IT_PE: Parity Error interrupt  

+  * @retval The new state of __IT__ (TRUE or FALSE).

+  */

+#define __HAL_IRDA_GET_IT(__HANDLE__, __IT__) ((__HANDLE__)->Instance->ISR & ((uint32_t)1 << ((__IT__)>> 0x08))) 

+

+/** @brief  Check whether the specified IRDA interrupt source is enabled.

+  * @param  __HANDLE__: specifies the IRDA Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @param  __IT__: specifies the IRDA interrupt source to check.

+  *          This parameter can be one of the following values:

+  *            @arg IRDA_IT_TXE: Transmit Data Register empty interrupt

+  *            @arg IRDA_IT_TC:  Transmission complete interrupt

+  *            @arg IRDA_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg IRDA_IT_IDLE: Idle line detection interrupt

+  *            @arg IRDA_IT_ORE: OverRun Error interrupt

+  *            @arg IRDA_IT_NE: Noise Error interrupt

+  *            @arg IRDA_IT_FE: Framing Error interrupt

+  *            @arg IRDA_IT_PE: Parity Error interrupt  

+  * @retval The new state of __IT__ (TRUE or FALSE).

+  */

+#define __HAL_IRDA_GET_IT_SOURCE(__HANDLE__, __IT__) ((((((uint8_t)(__IT__)) >> 5) == 1)? (__HANDLE__)->Instance->CR1:(((((uint8_t)(__IT__)) >> 5) == 2)? \

+                                                          (__HANDLE__)->Instance->CR2 : (__HANDLE__)->Instance->CR3)) & ((uint32_t)1 << (((uint16_t)(__IT__)) & IRDA_IT_MASK)))

+

+/** @brief  Clear the specified IRDA ISR flag, in setting the proper ICR register flag.

+  * @param  __HANDLE__: specifies the IRDA Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @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 IRDA_CLEAR_PEF: Parity Error Clear Flag

+  *            @arg IRDA_CLEAR_FEF: Framing Error Clear Flag

+  *            @arg IRDA_CLEAR_NEF: Noise detected Clear Flag

+  *            @arg IRDA_CLEAR_OREF: OverRun Error Clear Flag

+  *            @arg IRDA_CLEAR_TCF: Transmission Complete Clear Flag 

+  * @retval None

+  */

+#define __HAL_IRDA_CLEAR_IT(__HANDLE__, __IT_CLEAR__) ((__HANDLE__)->Instance->ICR |= (uint32_t)(__IT_CLEAR__))

+

+/** @brief  Set a specific IRDA request flag.

+  * @param  __HANDLE__: specifies the IRDA Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @param  __REQ__: specifies the request flag to set

+  *          This parameter can be one of the following values:

+  *            @arg IRDA_AUTOBAUD_REQUEST: Auto-Baud Rate Request     

+  *            @arg IRDA_RXDATA_FLUSH_REQUEST: Receive Data flush Request 

+  *            @arg IRDA_TXDATA_FLUSH_REQUEST: Transmit data flush Request 

+  *

+  * @retval None

+  */

+#define __HAL_IRDA_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (uint16_t)(__REQ__)) 

+

+/** @brief  Enable UART/USART associated to IRDA Handle

+  * @param  __HANDLE__: specifies the IRDA Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @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.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @retval None

+  */

+#define __HAL_IRDA_DISABLE(__HANDLE__)                  ((__HANDLE__)->Instance->CR1 &=  ~USART_CR1_UE)

+

+/**

+  * @}

+  */

+

+/* Include IRDA HAL Extension module */

+#include "stm32f7xx_hal_irda_ex.h"  

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup IRDA_Exported_Functions IrDA Exported Functions

+  * @{

+  */

+

+/** @addtogroup IRDA_Exported_Functions_Group1 IrDA Initialization and de-initialization functions

+  * @{

+  */

+

+/* Initialization and de-initialization functions  ****************************/

+HAL_StatusTypeDef HAL_IRDA_Init(IRDA_HandleTypeDef *hirda);

+HAL_StatusTypeDef HAL_IRDA_DeInit(IRDA_HandleTypeDef *hirda);

+void HAL_IRDA_MspInit(IRDA_HandleTypeDef *hirda);

+void HAL_IRDA_MspDeInit(IRDA_HandleTypeDef *hirda);

+/**

+  * @}

+  */

+

+/** @addtogroup IRDA_Exported_Functions_Group2 IO operation functions

+  * @{

+  */

+

+/* IO operation functions *****************************************************/

+HAL_StatusTypeDef HAL_IRDA_Transmit(IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_IRDA_Receive(IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_IRDA_Transmit_IT(IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_IRDA_Receive_IT(IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_IRDA_Transmit_DMA(IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_IRDA_Receive_DMA(IRDA_HandleTypeDef *hirda, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_IRDA_DMAPause(IRDA_HandleTypeDef *hirda);

+HAL_StatusTypeDef HAL_IRDA_DMAResume(IRDA_HandleTypeDef *hirda);

+HAL_StatusTypeDef HAL_IRDA_DMAStop(IRDA_HandleTypeDef *hirda);

+void HAL_IRDA_IRQHandler(IRDA_HandleTypeDef *hirda);

+void HAL_IRDA_TxCpltCallback(IRDA_HandleTypeDef *hirda);

+void HAL_IRDA_RxCpltCallback(IRDA_HandleTypeDef *hirda);

+void HAL_IRDA_TxHalfCpltCallback(IRDA_HandleTypeDef *hirda);

+void HAL_IRDA_RxHalfCpltCallback(IRDA_HandleTypeDef *hirda);

+void HAL_IRDA_ErrorCallback(IRDA_HandleTypeDef *hirda);

+/**

+ * @}

+ */

+

+/** @addtogroup IRDA_Exported_Functions_Group3 Peripheral Control functions

+ * @{

+ */

+/* Peripheral State methods  **************************************************/

+HAL_IRDA_StateTypeDef HAL_IRDA_GetState(IRDA_HandleTypeDef *hirda);

+uint32_t HAL_IRDA_GetError(IRDA_HandleTypeDef *hirda);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup IRDA_Private_Constants IRDA Private Constants

+  * @{

+  */

+

+/** @defgroup IRDA_Interruption_Mask IRDA Interruption Mask

+  * @{

+  */ 

+#define IRDA_IT_MASK  ((uint16_t)0x001F)  

+/**

+  * @}

+  */

+/**

+  * @}

+  */

+

+/* Private macros --------------------------------------------------------*/

+/** @defgroup IRDA_Private_Macros   IRDA Private Macros

+  * @{

+  */

+

+/** @brief  Ensure that IRDA Baud rate is less or equal to maximum value

+  * @param  __BAUDRATE__: specifies the IRDA Baudrate set by the user.

+  * @retval True or False

+  */   

+#define IS_IRDA_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) < 115201)

+

+/** @brief  Ensure that IRDA prescaler value is strictly larger than 0

+  * @param  __PRESCALER__: specifies the IRDA prescaler value set by the user.

+  * @retval True or False

+  */  

+#define IS_IRDA_PRESCALER(__PRESCALER__) ((__PRESCALER__) > 0)

+

+#define IS_IRDA_PARITY(__PARITY__) (((__PARITY__) == IRDA_PARITY_NONE) || \

+                                    ((__PARITY__) == IRDA_PARITY_EVEN) || \

+                                    ((__PARITY__) == IRDA_PARITY_ODD))

+								

+#define IS_IRDA_TX_RX_MODE(__MODE__) ((((__MODE__) & (~((uint32_t)(IRDA_MODE_TX_RX)))) == (uint32_t)0x00) && ((__MODE__) != (uint32_t)0x00))

+

+#define IS_IRDA_POWERMODE(__MODE__) (((__MODE__) == IRDA_POWERMODE_LOWPOWER) || \

+                                     ((__MODE__) == IRDA_POWERMODE_NORMAL))

+									 

+#define IS_IRDA_STATE(__STATE__) (((__STATE__) == IRDA_STATE_DISABLE) || \

+                                  ((__STATE__) == IRDA_STATE_ENABLE))

+								  

+#define IS_IRDA_MODE(__STATE__)  (((__STATE__) == IRDA_MODE_DISABLE) || \

+                                  ((__STATE__) == IRDA_MODE_ENABLE))

+								  

+#define IS_IRDA_ONE_BIT_SAMPLE(__ONEBIT__)     (((__ONEBIT__) == IRDA_ONE_BIT_SAMPLE_DISABLE) || \

+                                               ((__ONEBIT__) == IRDA_ONE_BIT_SAMPLE_ENABLE))

+

+#define IS_IRDA_DMA_TX(__DMATX__)     (((__DMATX__) == IRDA_DMA_TX_DISABLE) || \

+                                       ((__DMATX__) == IRDA_DMA_TX_ENABLE))		

+

+#define IS_IRDA_DMA_RX(__DMARX__)     (((__DMARX__) == IRDA_DMA_RX_DISABLE) || \

+                                       ((__DMARX__) == IRDA_DMA_RX_ENABLE))

+

+#define IS_IRDA_REQUEST_PARAMETER(PARAM) (((PARAM) == IRDA_AUTOBAUD_REQUEST) || \

+                                          ((PARAM) == IRDA_SENDBREAK_REQUEST) || \

+                                          ((PARAM) == IRDA_MUTE_MODE_REQUEST) || \

+                                          ((PARAM) == IRDA_RXDATA_FLUSH_REQUEST) || \

+                                          ((PARAM) == IRDA_TXDATA_FLUSH_REQUEST))									   

+/**

+ * @}

+ */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup IRDA_Private_Functions IRDA Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_IRDA_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_irda_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_irda_ex.h
new file mode 100644
index 0000000..96af0ab
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_irda_ex.h
@@ -0,0 +1,239 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_irda_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of IRDA HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *                               

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************  

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_IRDA_EX_H

+#define __STM32F7xx_HAL_IRDA_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup IRDAEx

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup IRDAEx_Extended_Exported_Constants IRDAEx Extended Exported Constants

+  * @{

+  */

+  

+/** @defgroup IRDAEx_Word_Length IRDAEx Word Length

+  * @{

+  */

+#define IRDA_WORDLENGTH_7B                  ((uint32_t)USART_CR1_M_1)

+#define IRDA_WORDLENGTH_8B                  ((uint32_t)0x00000000)

+#define IRDA_WORDLENGTH_9B                  ((uint32_t)USART_CR1_M_0)

+/**

+  * @}

+  */

+  

+  

+/**

+  * @}

+  */  

+  

+/* Exported macro ------------------------------------------------------------*/

+

+/* Private macros ------------------------------------------------------------*/

+

+/** @defgroup IRDAEx_Private_Macros IRDAEx Private Macros

+  * @{

+  */

+/** @brief  Reports the IRDA clock source.

+  * @param  __HANDLE__: specifies the IRDA Handle

+  * @param  __CLOCKSOURCE__ : output variable

+  * @retval IRDA clocking source, written in __CLOCKSOURCE__.

+  */

+#define IRDA_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__)       \

+  do {                                                        \

+    if((__HANDLE__)->Instance == USART1)                      \

+    {                                                         \

+       switch(__HAL_RCC_GET_USART1_SOURCE())                  \

+       {                                                      \

+        case RCC_USART1CLKSOURCE_PCLK2:                       \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_PCLK2;         \

+          break;                                              \

+        case RCC_USART1CLKSOURCE_HSI:                         \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_HSI;           \

+          break;                                              \

+        case RCC_USART1CLKSOURCE_SYSCLK:                      \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_SYSCLK;        \

+          break;                                              \

+        case RCC_USART1CLKSOURCE_LSE:                         \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_LSE;           \

+          break;                                              \

+        default:                                              \

+          break;                                              \

+       }                                                      \

+    }                                                         \

+    else if((__HANDLE__)->Instance == USART2)                 \

+    {                                                         \

+       switch(__HAL_RCC_GET_USART2_SOURCE())                  \

+       {                                                      \

+        case RCC_USART2CLKSOURCE_PCLK1:                       \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_PCLK1;         \

+          break;                                              \

+        case RCC_USART2CLKSOURCE_HSI:                         \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_HSI;           \

+          break;                                              \

+        case RCC_USART2CLKSOURCE_SYSCLK:                      \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_SYSCLK;        \

+          break;                                              \

+        case RCC_USART2CLKSOURCE_LSE:                         \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_LSE;           \

+          break;                                              \

+        default:                                              \

+          break;                                              \

+       }                                                      \

+    }                                                         \

+    else if((__HANDLE__)->Instance == USART3)                 \

+    {                                                         \

+       switch(__HAL_RCC_GET_USART3_SOURCE())                  \

+       {                                                      \

+        case RCC_USART3CLKSOURCE_PCLK1:                       \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_PCLK1;         \

+          break;                                              \

+        case RCC_USART3CLKSOURCE_HSI:                         \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_HSI;           \

+          break;                                              \

+        case RCC_USART3CLKSOURCE_SYSCLK:                      \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_SYSCLK;        \

+          break;                                              \

+        case RCC_USART3CLKSOURCE_LSE:                         \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_LSE;           \

+          break;                                              \

+        default:                                              \

+          break;                                              \

+       }                                                      \

+    }                                                         \

+    else if((__HANDLE__)->Instance == USART6)                 \

+    {                                                         \

+       switch(__HAL_RCC_GET_USART6_SOURCE())                  \

+       {                                                      \

+        case RCC_USART6CLKSOURCE_PCLK2:                       \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_PCLK2;         \

+          break;                                              \

+        case RCC_USART6CLKSOURCE_HSI:                         \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_HSI;           \

+          break;                                              \

+        case RCC_USART6CLKSOURCE_SYSCLK:                      \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_SYSCLK;        \

+          break;                                              \

+        case RCC_USART6CLKSOURCE_LSE:                         \

+          (__CLOCKSOURCE__) = IRDA_CLOCKSOURCE_LSE;           \

+          break;                                              \

+        default:                                              \

+          break;                                              \

+       }                                                      \

+    }                                                         \

+	} while(0)

+

+/** @brief  Reports the mask to apply to retrieve the received data

+  *         according to the word length and to the parity bits activation.

+  * @param  __HANDLE__: specifies the IRDA Handle

+  * @retval mask to apply to USART RDR register value.

+  */    

+#define IRDA_MASK_COMPUTATION(__HANDLE__)                       \

+  do {                                                                \

+  if ((__HANDLE__)->Init.WordLength == IRDA_WORDLENGTH_9B)            \

+  {                                                                   \

+     if ((__HANDLE__)->Init.Parity == IRDA_PARITY_NONE)               \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x01FF ;                                 \

+     }                                                                \

+     else                                                             \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x00FF ;                                 \

+     }                                                                \

+  }                                                                   \

+  else if ((__HANDLE__)->Init.WordLength == IRDA_WORDLENGTH_8B)       \

+  {                                                                   \

+     if ((__HANDLE__)->Init.Parity == IRDA_PARITY_NONE)               \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x00FF ;                                 \

+     }                                                                \

+     else                                                             \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x007F ;                                 \

+     }                                                                \

+  }                                                                   \

+  else if ((__HANDLE__)->Init.WordLength == IRDA_WORDLENGTH_7B)       \

+  {                                                                   \

+     if ((__HANDLE__)->Init.Parity == IRDA_PARITY_NONE)               \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x007F ;                                 \

+     }                                                                \

+     else                                                             \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x003F ;                                 \

+     }                                                                \

+  }                                                                   \

+} while(0)

+

+#define IS_IRDA_WORD_LENGTH(LENGTH) (((LENGTH) == IRDA_WORDLENGTH_7B) || \

+                                     ((LENGTH) == IRDA_WORDLENGTH_8B) || \

+                                     ((LENGTH) == IRDA_WORDLENGTH_9B))

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_IRDA_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_iwdg.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_iwdg.h
new file mode 100644
index 0000000..a2a1f69
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_iwdg.h
@@ -0,0 +1,308 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_iwdg.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of IWDG HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_IWDG_H

+#define __STM32F7xx_HAL_IWDG_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup IWDG

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup IWDG_Exported_Types IWDG Exported Types

+  * @{

+  */

+

+/** 

+  * @brief  IWDG HAL State Structure definition

+  */

+typedef enum

+{

+  HAL_IWDG_STATE_RESET     = 0x00,  /*!< IWDG not yet initialized or disabled */

+  HAL_IWDG_STATE_READY     = 0x01,  /*!< IWDG initialized and ready for use   */

+  HAL_IWDG_STATE_BUSY      = 0x02,  /*!< IWDG internal process is ongoing     */

+  HAL_IWDG_STATE_TIMEOUT   = 0x03,  /*!< IWDG timeout state                   */

+  HAL_IWDG_STATE_ERROR     = 0x04   /*!< IWDG error state                     */

+

+}HAL_IWDG_StateTypeDef;

+

+/** 

+  * @brief  IWDG Init structure definition

+  */

+typedef struct

+{

+  uint32_t Prescaler;  /*!< Select the prescaler of the IWDG.

+                            This parameter can be a value of @ref IWDG_Prescaler */

+

+  uint32_t Reload;     /*!< Specifies the IWDG down-counter reload value.

+                            This parameter must be a number between Min_Data = 0 and Max_Data = 0x0FFF */

+

+  uint32_t Window;     /*!< Specifies the window value to be compared to the down-counter.

+                            This parameter must be a number between Min_Data = 0 and Max_Data = 0x0FFF */

+

+} IWDG_InitTypeDef;

+

+/** 

+  * @brief  IWDG Handle Structure definition  

+  */

+typedef struct

+{

+  IWDG_TypeDef                 *Instance;  /*!< Register base address    */

+

+  IWDG_InitTypeDef             Init;       /*!< IWDG required parameters */

+

+  HAL_LockTypeDef              Lock;      /*!< IWDG Locking object      */

+

+  __IO HAL_IWDG_StateTypeDef   State;      /*!< IWDG communication state */

+

+}IWDG_HandleTypeDef;

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup IWDG_Exported_Constants IWDG Exported Constants

+  * @{

+  */

+

+/** @defgroup IWDG_Prescaler IWDG Prescaler

+  * @{

+  */

+#define IWDG_PRESCALER_4                ((uint8_t)0x00)                            /*!< IWDG prescaler set to 4   */

+#define IWDG_PRESCALER_8                ((uint8_t)(IWDG_PR_PR_0))                  /*!< IWDG prescaler set to 8   */

+#define IWDG_PRESCALER_16               ((uint8_t)(IWDG_PR_PR_1))                  /*!< IWDG prescaler set to 16  */

+#define IWDG_PRESCALER_32               ((uint8_t)(IWDG_PR_PR_1 | IWDG_PR_PR_0))   /*!< IWDG prescaler set to 32  */

+#define IWDG_PRESCALER_64               ((uint8_t)(IWDG_PR_PR_2))                  /*!< IWDG prescaler set to 64  */

+#define IWDG_PRESCALER_128              ((uint8_t)(IWDG_PR_PR_2 | IWDG_PR_PR_0))   /*!< IWDG prescaler set to 128 */

+#define IWDG_PRESCALER_256              ((uint8_t)(IWDG_PR_PR_2 | IWDG_PR_PR_1))   /*!< IWDG prescaler set to 256 */

+/**

+  * @}

+  */

+

+/** @defgroup IWDG_Window IWDG Window

+  * @{

+  */

+#define IWDG_WINDOW_DISABLE             ((uint32_t)0x00000FFF)

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported macros -----------------------------------------------------------*/

+/** @defgroup IWDG_Exported_Macros IWDG Exported Macros

+  * @{

+  */

+

+/** @brief Reset IWDG handle state

+  * @param  __HANDLE__: IWDG handle.

+  * @retval None

+  */

+#define __HAL_IWDG_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_IWDG_STATE_RESET)

+

+/**

+  * @brief  Enables the IWDG peripheral.

+  * @param  __HANDLE__: IWDG handle

+  * @retval None

+  */

+#define __HAL_IWDG_START(__HANDLE__)                WRITE_REG((__HANDLE__)->Instance->KR, IWDG_KEY_ENABLE)

+

+/**

+  * @brief  Reloads IWDG counter with value defined in the reload register

+  *         (write access to IWDG_PR and IWDG_RLR registers disabled).

+  * @param  __HANDLE__: IWDG handle

+  * @retval None

+  */

+#define __HAL_IWDG_RELOAD_COUNTER(__HANDLE__)       WRITE_REG((__HANDLE__)->Instance->KR, IWDG_KEY_RELOAD)

+

+/**

+  * @brief  Gets the selected IWDG's flag status.

+  * @param  __HANDLE__: IWDG handle

+  * @param  __FLAG__: specifies the flag to check.

+  *         This parameter can be one of the following values:

+  *            @arg IWDG_FLAG_PVU:  Watchdog counter reload value update flag

+  *            @arg IWDG_FLAG_RVU:  Watchdog counter prescaler value flag

+  *            @arg IWDG_FLAG_WVU:  Watchdog counter window value flag

+  * @retval The new state of __FLAG__ (TRUE or FALSE) .

+  */

+#define __HAL_IWDG_GET_FLAG(__HANDLE__, __FLAG__)   (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))

+

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup IWDG_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup IWDG_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization/de-initialization functions  ********************************/

+HAL_StatusTypeDef HAL_IWDG_Init(IWDG_HandleTypeDef *hiwdg);

+void              HAL_IWDG_MspInit(IWDG_HandleTypeDef *hiwdg);

+/**

+  * @}

+  */

+

+/** @addtogroup IWDG_Exported_Functions_Group2

+  * @{

+  */

+/* I/O operation functions ****************************************************/

+HAL_StatusTypeDef HAL_IWDG_Start(IWDG_HandleTypeDef *hiwdg);

+HAL_StatusTypeDef HAL_IWDG_Refresh(IWDG_HandleTypeDef *hiwdg);

+/**

+  * @}

+  */

+

+/** @addtogroup IWDG_Exported_Functions_Group3

+  * @{

+  */

+/* Peripheral State functions  ************************************************/

+HAL_IWDG_StateTypeDef HAL_IWDG_GetState(IWDG_HandleTypeDef *hiwdg);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private constants ---------------------------------------------------------*/

+/** @addtogroup IWDG_Private_Defines

+  * @{

+  */

+/**

+  * @brief  IWDG Key Register BitMask

+  */

+#define IWDG_KEY_RELOAD                 ((uint32_t)0x0000AAAA)  /*!< IWDG Reload Counter Enable   */

+#define IWDG_KEY_ENABLE                 ((uint32_t)0x0000CCCC)  /*!< IWDG Peripheral Enable       */

+#define IWDG_KEY_WRITE_ACCESS_ENABLE    ((uint32_t)0x00005555)  /*!< IWDG KR Write Access Enable  */

+#define IWDG_KEY_WRITE_ACCESS_DISABLE   ((uint32_t)0x00000000)  /*!< IWDG KR Write Access Disable */

+

+/**

+  * @brief  IWDG Flag definition

+  */

+#define IWDG_FLAG_PVU                   ((uint32_t)IWDG_SR_PVU)  /*!< Watchdog counter prescaler value update flag */

+#define IWDG_FLAG_RVU                   ((uint32_t)IWDG_SR_RVU)  /*!< Watchdog counter reload value update flag    */

+#define IWDG_FLAG_WVU                   ((uint32_t)IWDG_SR_WVU)  /*!< Watchdog counter window value update flag    */

+

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup IWDG_Private_Macro IWDG Private Macros

+  * @{

+  */

+/**

+  * @brief  Enables write access to IWDG_PR, IWDG_RLR and IWDG_WINR registers.

+  * @param  __HANDLE__: IWDG handle

+  * @retval None

+  */

+#define IWDG_ENABLE_WRITE_ACCESS(__HANDLE__)  WRITE_REG((__HANDLE__)->Instance->KR, IWDG_KEY_WRITE_ACCESS_ENABLE)

+

+/**

+  * @brief  Disables write access to IWDG_PR, IWDG_RLR and IWDG_WINR registers.

+  * @param  __HANDLE__: IWDG handle

+  * @retval None

+  */

+#define IWDG_DISABLE_WRITE_ACCESS(__HANDLE__) WRITE_REG((__HANDLE__)->Instance->KR, IWDG_KEY_WRITE_ACCESS_DISABLE)

+

+/**

+  * @brief  Check IWDG prescaler value.

+  * @param  __PRESCALER__: IWDG prescaler value

+  * @retval None

+  */

+#define IS_IWDG_PRESCALER(__PRESCALER__)      (((__PRESCALER__) == IWDG_PRESCALER_4)  || \

+                                               ((__PRESCALER__) == IWDG_PRESCALER_8)  || \

+                                               ((__PRESCALER__) == IWDG_PRESCALER_16) || \

+                                               ((__PRESCALER__) == IWDG_PRESCALER_32) || \

+                                               ((__PRESCALER__) == IWDG_PRESCALER_64) || \

+                                               ((__PRESCALER__) == IWDG_PRESCALER_128)|| \

+                                               ((__PRESCALER__) == IWDG_PRESCALER_256))

+

+/**

+  * @brief  Check IWDG reload value.

+  * @param  __RELOAD__: IWDG reload value

+  * @retval None

+  */

+#define IS_IWDG_RELOAD(__RELOAD__)            ((__RELOAD__) <= 0xFFF)

+

+/**

+  * @brief  Check IWDG window value.

+  * @param  __WINDOW__: IWDG window value

+  * @retval None

+  */

+#define IS_IWDG_WINDOW(__WINDOW__)            ((__WINDOW__) <= 0xFFF)

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_IWDG_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_lptim.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_lptim.h
new file mode 100644
index 0000000..5339851
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_lptim.h
@@ -0,0 +1,648 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_lptim.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of LPTIM HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_LPTIM_H

+#define __STM32F7xx_HAL_LPTIM_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @defgroup LPTIM LPTIM

+  * @brief LPTIM HAL module driver

+  * @{

+  */

+  

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup LPTIM_Exported_Types LPTIM Exported Types

+  * @{

+  */

+

+/** 

+  * @brief  LPTIM Clock configuration definition  

+  */

+typedef struct

+{

+  uint32_t Source;         /*!< Selects the clock source.

+                           This parameter can be a value of @ref LPTIM_Clock_Source   */

+

+  uint32_t Prescaler;      /*!< Specifies the counter clock Prescaler.

+                           This parameter can be a value of @ref LPTIM_Clock_Prescaler */

+  

+}LPTIM_ClockConfigTypeDef;

+

+/** 

+  * @brief  LPTIM Clock configuration definition  

+  */

+typedef struct

+{

+  uint32_t Polarity;      /*!< Selects the polarity of the active edge for the counter unit

+                           if the ULPTIM input is selected.

+                           Note: This parameter is used only when Ultra low power clock source is used.

+                           Note: If the polarity is configured on 'both edges', an auxiliary clock

+                           (one of the Low power oscillator) must be active.

+                           This parameter can be a value of @ref LPTIM_Clock_Polarity */ 

+  

+  uint32_t SampleTime;     /*!< Selects the clock sampling time to configure the clock glitch filter.

+                           Note: This parameter is used only when Ultra low power clock source is used.

+                           This parameter can be a value of @ref LPTIM_Clock_Sample_Time */  

+  

+}LPTIM_ULPClockConfigTypeDef;

+

+/** 

+  * @brief  LPTIM Trigger configuration definition  

+  */

+typedef struct

+{

+  uint32_t Source;        /*!< Selects the Trigger source.

+                          This parameter can be a value of @ref LPTIM_Trigger_Source */

+  

+  uint32_t ActiveEdge;    /*!< Selects the Trigger active edge.

+                          Note: This parameter is used only when an external trigger is used.

+                          This parameter can be a value of @ref LPTIM_External_Trigger_Polarity */

+  

+  uint32_t SampleTime;    /*!< Selects the trigger sampling time to configure the clock glitch filter.

+                          Note: This parameter is used only when an external trigger is used.

+                          This parameter can be a value of @ref LPTIM_Trigger_Sample_Time  */  

+}LPTIM_TriggerConfigTypeDef;

+

+/** 

+  * @brief  LPTIM Initialization Structure definition  

+  */

+typedef struct

+{                                                    

+  LPTIM_ClockConfigTypeDef     Clock;               /*!< Specifies the clock parameters */

+                                                    

+  LPTIM_ULPClockConfigTypeDef  UltraLowPowerClock;  /*!< Specifies the Ultra Low Power clock parameters */

+                                                    

+  LPTIM_TriggerConfigTypeDef   Trigger;             /*!< Specifies the Trigger parameters */

+                                                    

+  uint32_t                     OutputPolarity;      /*!< Specifies the Output polarity.

+                                                    This parameter can be a value of @ref LPTIM_Output_Polarity */

+                                                    

+  uint32_t                     UpdateMode;          /*!< Specifies whether the update of the autorelaod and the compare

+                                                    values is done immediately or after the end of current period.

+                                                    This parameter can be a value of @ref LPTIM_Updating_Mode */

+

+  uint32_t                     CounterSource;       /*!< Specifies whether the counter is incremented each internal event

+                                                    or each external event.

+                                                    This parameter can be a value of @ref LPTIM_Counter_Source */  

+  

+}LPTIM_InitTypeDef;

+

+/** 

+  * @brief  HAL LPTIM State structure definition  

+  */ 

+typedef enum __HAL_LPTIM_StateTypeDef

+{

+  HAL_LPTIM_STATE_RESET            = 0x00,    /*!< Peripheral not yet initialized or disabled  */

+  HAL_LPTIM_STATE_READY            = 0x01,    /*!< Peripheral Initialized and ready for use    */

+  HAL_LPTIM_STATE_BUSY             = 0x02,    /*!< An internal process is ongoing              */    

+  HAL_LPTIM_STATE_TIMEOUT          = 0x03,    /*!< Timeout state                               */  

+  HAL_LPTIM_STATE_ERROR            = 0x04     /*!< Internal Process is ongoing                */                                                                             

+}HAL_LPTIM_StateTypeDef;

+

+/** 

+  * @brief  LPTIM handle Structure definition  

+  */ 

+typedef struct

+{

+      LPTIM_TypeDef              *Instance;         /*!< Register base address     */

+      

+      LPTIM_InitTypeDef           Init;             /*!< LPTIM required parameters */

+  

+      HAL_StatusTypeDef           Status;           /*!< LPTIM peripheral status   */  

+  

+      HAL_LockTypeDef             Lock;             /*!< LPTIM locking object      */

+  

+   __IO  HAL_LPTIM_StateTypeDef   State;            /*!< LPTIM peripheral state    */

+  

+}LPTIM_HandleTypeDef;

+

+/**

+  * @}

+  */ 

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup LPTIM_Exported_Constants LPTIM Exported Constants

+  * @{

+  */

+

+/** @defgroup LPTIM_Clock_Source LPTIM Clock Source

+  * @{

+  */

+#define LPTIM_CLOCKSOURCE_APBCLOCK_LPOSC        ((uint32_t)0x00)

+#define LPTIM_CLOCKSOURCE_ULPTIM                LPTIM_CFGR_CKSEL                                           

+/**                                             

+  * @}

+  */

+

+/** @defgroup LPTIM_Clock_Prescaler LPTIM Clock Prescaler

+  * @{

+  */

+#define LPTIM_PRESCALER_DIV1                    ((uint32_t)0x000000)

+#define LPTIM_PRESCALER_DIV2                    LPTIM_CFGR_PRESC_0

+#define LPTIM_PRESCALER_DIV4                    LPTIM_CFGR_PRESC_1

+#define LPTIM_PRESCALER_DIV8                    ((uint32_t)(LPTIM_CFGR_PRESC_0 | LPTIM_CFGR_PRESC_1))

+#define LPTIM_PRESCALER_DIV16                   LPTIM_CFGR_PRESC_2

+#define LPTIM_PRESCALER_DIV32                   ((uint32_t)(LPTIM_CFGR_PRESC_0 | LPTIM_CFGR_PRESC_2))

+#define LPTIM_PRESCALER_DIV64                   ((uint32_t)(LPTIM_CFGR_PRESC_1 | LPTIM_CFGR_PRESC_2))

+#define LPTIM_PRESCALER_DIV128                  ((uint32_t)LPTIM_CFGR_PRESC)                                             

+/**

+  * @}

+  */ 

+

+/** @defgroup LPTIM_Output_Polarity LPTIM Output Polarity

+  * @{

+  */

+

+#define LPTIM_OUTPUTPOLARITY_HIGH               ((uint32_t)0x00000000)

+#define LPTIM_OUTPUTPOLARITY_LOW                (LPTIM_CFGR_WAVPOL)

+/**

+  * @}

+  */

+

+/** @defgroup LPTIM_Clock_Sample_Time LPTIM Clock Sample Time

+  * @{

+  */

+#define LPTIM_CLOCKSAMPLETIME_DIRECTTRANSITION ((uint32_t)0x00000000)

+#define LPTIM_CLOCKSAMPLETIME_2TRANSITIONS     LPTIM_CFGR_CKFLT_0

+#define LPTIM_CLOCKSAMPLETIME_4TRANSITIONS     LPTIM_CFGR_CKFLT_1

+#define LPTIM_CLOCKSAMPLETIME_8TRANSITIONS     LPTIM_CFGR_CKFLT

+/**

+  * @}

+  */

+

+/** @defgroup LPTIM_Clock_Polarity LPTIM Clock Polarity

+  * @{

+  */

+

+#define LPTIM_CLOCKPOLARITY_RISING                ((uint32_t)0x00000000)

+#define LPTIM_CLOCKPOLARITY_FALLING               LPTIM_CFGR_CKPOL_0

+#define LPTIM_CLOCKPOLARITY_RISING_FALLING        LPTIM_CFGR_CKPOL_1

+/**

+  * @}

+  */

+

+/** @defgroup LPTIM_Trigger_Source LPTIM Trigger Source

+  * @{

+  */

+#define LPTIM_TRIGSOURCE_SOFTWARE               ((uint32_t)0x0000FFFF)

+#define LPTIM_TRIGSOURCE_0                      ((uint32_t)0x00000000)

+#define LPTIM_TRIGSOURCE_1                      ((uint32_t)LPTIM_CFGR_TRIGSEL_0)

+#define LPTIM_TRIGSOURCE_2                      LPTIM_CFGR_TRIGSEL_1

+#define LPTIM_TRIGSOURCE_3                      ((uint32_t)LPTIM_CFGR_TRIGSEL_0 | LPTIM_CFGR_TRIGSEL_1)

+#define LPTIM_TRIGSOURCE_4                      LPTIM_CFGR_TRIGSEL_2

+#define LPTIM_TRIGSOURCE_5                      ((uint32_t)LPTIM_CFGR_TRIGSEL_0 | LPTIM_CFGR_TRIGSEL_2)

+/**

+  * @}

+  */

+

+/** @defgroup LPTIM_External_Trigger_Polarity LPTIM External Trigger Polarity

+  * @{

+  */

+#define LPTIM_ACTIVEEDGE_RISING                LPTIM_CFGR_TRIGEN_0

+#define LPTIM_ACTIVEEDGE_FALLING               LPTIM_CFGR_TRIGEN_1

+#define LPTIM_ACTIVEEDGE_RISING_FALLING        LPTIM_CFGR_TRIGEN

+/**

+  * @}

+  */

+

+/** @defgroup LPTIM_Trigger_Sample_Time LPTIM Trigger Sample Time

+  * @{

+  */

+#define LPTIM_TRIGSAMPLETIME_DIRECTTRANSITION  ((uint32_t)0x00000000)

+#define LPTIM_TRIGSAMPLETIME_2TRANSITIONS      LPTIM_CFGR_TRGFLT_0

+#define LPTIM_TRIGSAMPLETIME_4TRANSITIONS      LPTIM_CFGR_TRGFLT_1

+#define LPTIM_TRIGSAMPLETIME_8TRANSITIONS      LPTIM_CFGR_TRGFLT

+/**

+  * @}

+  */

+

+/** @defgroup LPTIM_Updating_Mode LPTIM Updating Mode

+  * @{

+  */

+

+#define LPTIM_UPDATE_IMMEDIATE                  ((uint32_t)0x00000000)

+#define LPTIM_UPDATE_ENDOFPERIOD                LPTIM_CFGR_PRELOAD

+/**

+  * @}

+  */

+

+/** @defgroup LPTIM_Counter_Source LPTIM Counter Source

+  * @{

+  */

+

+#define LPTIM_COUNTERSOURCE_INTERNAL            ((uint32_t)0x00000000)

+#define LPTIM_COUNTERSOURCE_EXTERNAL            LPTIM_CFGR_COUNTMODE

+/**

+  * @}

+  */

+ 

+/** @defgroup LPTIM_Flag_Definition LPTIM Flag Definition

+  * @{

+  */

+

+#define LPTIM_FLAG_DOWN                          LPTIM_ISR_DOWN

+#define LPTIM_FLAG_UP                            LPTIM_ISR_UP

+#define LPTIM_FLAG_ARROK                         LPTIM_ISR_ARROK

+#define LPTIM_FLAG_CMPOK                         LPTIM_ISR_CMPOK

+#define LPTIM_FLAG_EXTTRIG                       LPTIM_ISR_EXTTRIG

+#define LPTIM_FLAG_ARRM                          LPTIM_ISR_ARRM

+#define LPTIM_FLAG_CMPM                          LPTIM_ISR_CMPM

+/**

+  * @}

+  */

+

+/** @defgroup LPTIM_Interrupts_Definition LPTIM Interrupts Definition

+  * @{

+  */

+

+#define LPTIM_IT_DOWN                            LPTIM_IER_DOWNIE

+#define LPTIM_IT_UP                              LPTIM_IER_UPIE

+#define LPTIM_IT_ARROK                           LPTIM_IER_ARROKIE

+#define LPTIM_IT_CMPOK                           LPTIM_IER_CMPOKIE

+#define LPTIM_IT_EXTTRIG                         LPTIM_IER_EXTTRIGIE

+#define LPTIM_IT_ARRM                            LPTIM_IER_ARRMIE

+#define LPTIM_IT_CMPM                            LPTIM_IER_CMPMIE

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup LPTIM_Exported_Macros LPTIM Exported Macros

+  * @{

+  */

+

+/** @brief Reset LPTIM handle state

+  * @param  __HANDLE__: LPTIM handle

+  * @retval None

+  */

+#define __HAL_LPTIM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_LPTIM_STATE_RESET)

+

+/**

+  * @brief  Enable/Disable the LPTIM peripheral.

+  * @param  __HANDLE__: LPTIM handle

+  * @retval None

+  */

+#define __HAL_LPTIM_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR |=  (LPTIM_CR_ENABLE))

+#define __HAL_LPTIM_DISABLE(__HANDLE__)  ((__HANDLE__)->Instance->CR &=  ~(LPTIM_CR_ENABLE))

+

+/**

+  * @brief  Starts the LPTIM peripheral in Continuous or in single mode.

+  * @param  __HANDLE__: DMA handle

+  * @retval None

+  */

+#define __HAL_LPTIM_START_CONTINUOUS(__HANDLE__)  ((__HANDLE__)->Instance->CR |=  LPTIM_CR_CNTSTRT)

+#define __HAL_LPTIM_START_SINGLE(__HANDLE__)      ((__HANDLE__)->Instance->CR |=  LPTIM_CR_SNGSTRT)

+ 

+    

+/**

+  * @brief  Writes the passed parameter in the Autoreload register.

+  * @param  __HANDLE__: LPTIM handle

+  * @param  __VALUE__ : Autoreload value

+  * @retval None

+  */

+#define __HAL_LPTIM_AUTORELOAD_SET(__HANDLE__ , __VALUE__)  ((__HANDLE__)->Instance->ARR =  (__VALUE__))

+

+/**

+  * @brief  Writes the passed parameter in the Compare register.

+  * @param  __HANDLE__: LPTIM handle

+  * @param  __VALUE__ : Compare value

+  * @retval None

+  */

+#define __HAL_LPTIM_COMPARE_SET(__HANDLE__ , __VALUE__)     ((__HANDLE__)->Instance->CMP =  (__VALUE__))

+

+/**

+  * @brief  Checks whether the specified LPTIM flag is set or not.

+  * @param  __HANDLE__: LPTIM handle

+  * @param  __FLAG__  : LPTIM flag to check

+  *            This parameter can be a value of:

+  *            @arg LPTIM_FLAG_DOWN    : Counter direction change up Flag.

+  *            @arg LPTIM_FLAG_UP      : Counter direction change down to up Flag.

+  *            @arg LPTIM_FLAG_ARROK   : Autoreload register update OK Flag.

+  *            @arg LPTIM_FLAG_CMPOK   : Compare register update OK Flag.

+  *            @arg LPTIM_FLAG_EXTTRIG : External trigger edge event Flag.

+  *            @arg LPTIM_FLAG_ARRM    : Autoreload match Flag.

+  *            @arg LPTIM_FLAG_CMPM    : Compare match Flag.

+  * @retval The state of the specified flag (SET or RESET).

+  */

+#define __HAL_LPTIM_GET_FLAG(__HANDLE__, __FLAG__)          (((__HANDLE__)->Instance->ISR &(__FLAG__)) == (__FLAG__))

+

+/**

+  * @brief  Clears the specified LPTIM flag.

+  * @param  __HANDLE__: LPTIM handle.

+  * @param  __FLAG__  : LPTIM flag to clear.

+  *            This parameter can be a value of:

+  *            @arg LPTIM_FLAG_DOWN    : Counter direction change up Flag.

+  *            @arg LPTIM_FLAG_UP      : Counter direction change down to up Flag.

+  *            @arg LPTIM_FLAG_ARROK   : Autoreload register update OK Flag.

+  *            @arg LPTIM_FLAG_CMPOK   : Compare register update OK Flag.

+  *            @arg LPTIM_FLAG_EXTTRIG : External trigger edge event Flag.

+  *            @arg LPTIM_FLAG_ARRM    : Autoreload match Flag.

+  *            @arg LPTIM_FLAG_CMPM    : Compare match Flag.

+  * @retval None.

+  */

+#define __HAL_LPTIM_CLEAR_FLAG(__HANDLE__, __FLAG__)         ((__HANDLE__)->Instance->ICR  = (__FLAG__))

+

+/**

+  * @brief  Enable the specified LPTIM interrupt.

+  * @param  __HANDLE__    : LPTIM handle.

+  * @param  __INTERRUPT__ : LPTIM interrupt to set.

+  *            This parameter can be a value of:

+  *            @arg LPTIM_IT_DOWN    : Counter direction change up Interrupt.

+  *            @arg LPTIM_IT_UP      : Counter direction change down to up Interrupt.

+  *            @arg LPTIM_IT_ARROK   : Autoreload register update OK Interrupt.

+  *            @arg LPTIM_IT_CMPOK   : Compare register update OK Interrupt.

+  *            @arg LPTIM_IT_EXTTRIG : External trigger edge event Interrupt.

+  *            @arg LPTIM_IT_ARRM    : Autoreload match Interrupt.

+  *            @arg LPTIM_IT_CMPM    : Compare match Interrupt.

+  * @retval None.

+  */

+#define __HAL_LPTIM_ENABLE_IT(__HANDLE__, __INTERRUPT__)         ((__HANDLE__)->Instance->IER  |= (__INTERRUPT__))

+

+ /**

+  * @brief  Disable the specified LPTIM interrupt.

+  * @param  __HANDLE__    : LPTIM handle.

+  * @param  __INTERRUPT__ : LPTIM interrupt to set.

+  *            This parameter can be a value of:

+  *            @arg LPTIM_IT_DOWN    : Counter direction change up Interrupt.

+  *            @arg LPTIM_IT_UP      : Counter direction change down to up Interrupt.

+  *            @arg LPTIM_IT_ARROK   : Autoreload register update OK Interrupt.

+  *            @arg LPTIM_IT_CMPOK   : Compare register update OK Interrupt.

+  *            @arg LPTIM_IT_EXTTRIG : External trigger edge event Interrupt.

+  *            @arg LPTIM_IT_ARRM    : Autoreload match Interrupt.

+  *            @arg LPTIM_IT_CMPM    : Compare match Interrupt.

+  * @retval None.

+  */

+#define __HAL_LPTIM_DISABLE_IT(__HANDLE__, __INTERRUPT__)         ((__HANDLE__)->Instance->IER  &= (~(__INTERRUPT__)))

+

+    /**

+  * @brief  Checks whether the specified LPTIM interrupt is set or not.

+  * @param  __HANDLE__    : LPTIM handle.

+  * @param  __INTERRUPT__ : LPTIM interrupt to check.

+  *            This parameter can be a value of:

+  *            @arg LPTIM_IT_DOWN    : Counter direction change up Interrupt.

+  *            @arg LPTIM_IT_UP      : Counter direction change down to up Interrupt.

+  *            @arg LPTIM_IT_ARROK   : Autoreload register update OK Interrupt.

+  *            @arg LPTIM_IT_CMPOK   : Compare register update OK Interrupt.

+  *            @arg LPTIM_IT_EXTTRIG : External trigger edge event Interrupt.

+  *            @arg LPTIM_IT_ARRM    : Autoreload match Interrupt.

+  *            @arg LPTIM_IT_CMPM    : Compare match Interrupt.

+  * @retval Interrupt status.

+  */

+    

+#define __HAL_LPTIM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->IER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

+

+/**

+  * @}

+  */

+   

+/* Exported functions --------------------------------------------------------*/

+/** @defgroup LPTIM_Exported_Functions LPTIM Exported Functions

+  * @{

+  */

+

+/* Initialization/de-initialization functions  ********************************/

+HAL_StatusTypeDef HAL_LPTIM_Init(LPTIM_HandleTypeDef *hlptim);

+HAL_StatusTypeDef HAL_LPTIM_DeInit(LPTIM_HandleTypeDef *hlptim);

+

+/* MSP functions  *************************************************************/

+void HAL_LPTIM_MspInit(LPTIM_HandleTypeDef *hlptim);

+void HAL_LPTIM_MspDeInit(LPTIM_HandleTypeDef *hlptim);

+

+/* Start/Stop operation functions  *********************************************/

+/* ################################# PWM Mode ################################*/

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_LPTIM_PWM_Start(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse);

+HAL_StatusTypeDef HAL_LPTIM_PWM_Stop(LPTIM_HandleTypeDef *hlptim);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_LPTIM_PWM_Start_IT(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse);

+HAL_StatusTypeDef HAL_LPTIM_PWM_Stop_IT(LPTIM_HandleTypeDef *hlptim);

+

+/* ############################# One Pulse Mode ##############################*/

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_LPTIM_OnePulse_Start(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse);

+HAL_StatusTypeDef HAL_LPTIM_OnePulse_Stop(LPTIM_HandleTypeDef *hlptim);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_LPTIM_OnePulse_Start_IT(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse);

+HAL_StatusTypeDef HAL_LPTIM_OnePulse_Stop_IT(LPTIM_HandleTypeDef *hlptim);

+

+/* ############################## Set once Mode ##############################*/

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_LPTIM_SetOnce_Start(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse);

+HAL_StatusTypeDef HAL_LPTIM_SetOnce_Stop(LPTIM_HandleTypeDef *hlptim);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_LPTIM_SetOnce_Start_IT(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Pulse);

+HAL_StatusTypeDef HAL_LPTIM_SetOnce_Stop_IT(LPTIM_HandleTypeDef *hlptim);

+

+/* ############################### Encoder Mode ##############################*/

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_LPTIM_Encoder_Start(LPTIM_HandleTypeDef *hlptim, uint32_t Period);

+HAL_StatusTypeDef HAL_LPTIM_Encoder_Stop(LPTIM_HandleTypeDef *hlptim);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_LPTIM_Encoder_Start_IT(LPTIM_HandleTypeDef *hlptim, uint32_t Period);

+HAL_StatusTypeDef HAL_LPTIM_Encoder_Stop_IT(LPTIM_HandleTypeDef *hlptim);

+

+/* ############################# Time out  Mode ##############################*/

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_LPTIM_TimeOut_Start(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Timeout);

+HAL_StatusTypeDef HAL_LPTIM_TimeOut_Stop(LPTIM_HandleTypeDef *hlptim);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_LPTIM_TimeOut_Start_IT(LPTIM_HandleTypeDef *hlptim, uint32_t Period, uint32_t Timeout);

+HAL_StatusTypeDef HAL_LPTIM_TimeOut_Stop_IT(LPTIM_HandleTypeDef *hlptim);

+

+/* ############################## Counter Mode ###############################*/

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_LPTIM_Counter_Start(LPTIM_HandleTypeDef *hlptim, uint32_t Period);

+HAL_StatusTypeDef HAL_LPTIM_Counter_Stop(LPTIM_HandleTypeDef *hlptim);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_LPTIM_Counter_Start_IT(LPTIM_HandleTypeDef *hlptim, uint32_t Period);

+HAL_StatusTypeDef HAL_LPTIM_Counter_Stop_IT(LPTIM_HandleTypeDef *hlptim);

+

+/* Reading operation functions ************************************************/

+uint32_t HAL_LPTIM_ReadCounter(LPTIM_HandleTypeDef *hlptim);

+uint32_t HAL_LPTIM_ReadAutoReload(LPTIM_HandleTypeDef *hlptim);

+uint32_t HAL_LPTIM_ReadCompare(LPTIM_HandleTypeDef *hlptim);

+

+/* LPTIM IRQ functions  *******************************************************/

+void HAL_LPTIM_IRQHandler(LPTIM_HandleTypeDef *hlptim);

+

+/* CallBack functions  ********************************************************/

+void HAL_LPTIM_CompareMatchCallback(LPTIM_HandleTypeDef *hlptim);

+void HAL_LPTIM_AutoReloadMatchCallback(LPTIM_HandleTypeDef *hlptim);

+void HAL_LPTIM_TriggerCallback(LPTIM_HandleTypeDef *hlptim);

+void HAL_LPTIM_CompareWriteCallback(LPTIM_HandleTypeDef *hlptim);

+void HAL_LPTIM_AutoReloadWriteCallback(LPTIM_HandleTypeDef *hlptim);

+void HAL_LPTIM_DirectionUpCallback(LPTIM_HandleTypeDef *hlptim);

+void HAL_LPTIM_DirectionDownCallback(LPTIM_HandleTypeDef *hlptim);

+

+/* Peripheral State functions  ************************************************/

+HAL_LPTIM_StateTypeDef HAL_LPTIM_GetState(LPTIM_HandleTypeDef *hlptim);

+

+/**

+  * @}

+  */

+  

+/* Private types -------------------------------------------------------------*/

+/** @defgroup LPTIM_Private_Types LPTIM Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup LPTIM_Private_Variables LPTIM Private Variables

+  * @{

+  */

+  

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup LPTIM_Private_Constants LPTIM Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup LPTIM_Private_Macros LPTIM Private Macros

+  * @{

+  */

+  

+#define IS_LPTIM_CLOCK_SOURCE(__SOURCE__)           (((__SOURCE__) == LPTIM_CLOCKSOURCE_ULPTIM) || \

+                                                     ((__SOURCE__) == LPTIM_CLOCKSOURCE_APBCLOCK_LPOSC))

+													 

+#define IS_LPTIM_CLOCK_PRESCALER(__PRESCALER__)     (((__PRESCALER__) ==  LPTIM_PRESCALER_DIV1  ) || \

+                                                     ((__PRESCALER__) ==  LPTIM_PRESCALER_DIV2  ) || \

+                                                     ((__PRESCALER__) ==  LPTIM_PRESCALER_DIV4  ) || \

+                                                     ((__PRESCALER__) ==  LPTIM_PRESCALER_DIV8  ) || \

+                                                     ((__PRESCALER__) ==  LPTIM_PRESCALER_DIV16 ) || \

+                                                     ((__PRESCALER__) ==  LPTIM_PRESCALER_DIV32 ) || \

+                                                     ((__PRESCALER__) ==  LPTIM_PRESCALER_DIV64 ) || \

+                                                     ((__PRESCALER__) ==  LPTIM_PRESCALER_DIV128))

+#define IS_LPTIM_CLOCK_PRESCALERDIV1(__PRESCALER__) ((__PRESCALER__) ==  LPTIM_PRESCALER_DIV1)													 

+

+#define IS_LPTIM_OUTPUT_POLARITY(__POLARITY__)      (((__POLARITY__) == LPTIM_OUTPUTPOLARITY_LOW ) || \

+                                                     ((__POLARITY__) == LPTIM_OUTPUTPOLARITY_HIGH))

+													 

+#define IS_LPTIM_CLOCK_SAMPLE_TIME(__SAMPLETIME__)  (((__SAMPLETIME__) == LPTIM_CLOCKSAMPLETIME_DIRECTTRANSITION) || \

+                                                     ((__SAMPLETIME__) == LPTIM_CLOCKSAMPLETIME_2TRANSITIONS)     || \

+                                                     ((__SAMPLETIME__) == LPTIM_CLOCKSAMPLETIME_4TRANSITIONS)     || \

+                                                     ((__SAMPLETIME__) == LPTIM_CLOCKSAMPLETIME_8TRANSITIONS))

+

+#define IS_LPTIM_CLOCK_POLARITY(__POLARITY__)       (((__POLARITY__) == LPTIM_CLOCKPOLARITY_RISING)  || \

+                                                     ((__POLARITY__) == LPTIM_CLOCKPOLARITY_FALLING) || \

+                                                     ((__POLARITY__) == LPTIM_CLOCKPOLARITY_RISING_FALLING))

+

+#define IS_LPTIM_TRG_SOURCE(__TRIG__)               (((__TRIG__) == LPTIM_TRIGSOURCE_SOFTWARE) || \

+													 ((__TRIG__) == LPTIM_TRIGSOURCE_0) || \

+													 ((__TRIG__) == LPTIM_TRIGSOURCE_1) || \

+													 ((__TRIG__) == LPTIM_TRIGSOURCE_2) || \

+													 ((__TRIG__) == LPTIM_TRIGSOURCE_3) || \

+													 ((__TRIG__) == LPTIM_TRIGSOURCE_4) || \

+													 ((__TRIG__) == LPTIM_TRIGSOURCE_5))

+

+#define IS_LPTIM_EXT_TRG_POLARITY(__POLAR__)        (((__POLAR__) == LPTIM_ACTIVEEDGE_RISING         ) || \

+                                                     ((__POLAR__) == LPTIM_ACTIVEEDGE_FALLING        ) || \

+                                                     ((__POLAR__) == LPTIM_ACTIVEEDGE_RISING_FALLING ))

+

+#define IS_LPTIM_TRIG_SAMPLE_TIME(__SAMPLETIME__)   (((__SAMPLETIME__) == LPTIM_TRIGSAMPLETIME_DIRECTTRANSITION) || \

+                                                     ((__SAMPLETIME__) == LPTIM_TRIGSAMPLETIME_2TRANSITIONS    ) || \

+                                                     ((__SAMPLETIME__) == LPTIM_TRIGSAMPLETIME_4TRANSITIONS    ) || \

+                                                     ((__SAMPLETIME__) == LPTIM_TRIGSAMPLETIME_8TRANSITIONS    ))		

+

+#define IS_LPTIM_UPDATE_MODE(__MODE__)              (((__MODE__) == LPTIM_UPDATE_IMMEDIATE) || \

+                                                     ((__MODE__) == LPTIM_UPDATE_ENDOFPERIOD))

+

+#define IS_LPTIM_COUNTER_SOURCE(__SOURCE__)         (((__SOURCE__) == LPTIM_COUNTERSOURCE_INTERNAL) || \

+                                                     ((__SOURCE__) == LPTIM_COUNTERSOURCE_EXTERNAL))

+

+#define IS_LPTIM_AUTORELOAD(__AUTORELOAD__)         ((__AUTORELOAD__) <= 0x0000FFFF)

+

+#define IS_LPTIM_COMPARE(__COMPARE__)               ((__COMPARE__) <= 0x0000FFFF)

+  

+#define IS_LPTIM_PERIOD(PERIOD)               ((PERIOD) <= 0x0000FFFF)

+

+#define IS_LPTIM_PULSE(PULSE)                 ((PULSE) <= 0x0000FFFF)

+

+/**

+  * @}

+  */ 

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup LPTIM_Private_Functions LPTIM Private Functions

+  * @{

+  */

+  

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_LPTIM_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_ltdc.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_ltdc.h
new file mode 100644
index 0000000..52c67c9
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_ltdc.h
@@ -0,0 +1,630 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_ltdc.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of LTDC HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_LTDC_H

+#define __STM32F7xx_HAL_LTDC_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+#if defined(STM32F756xx) || defined(STM32F746xx)

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @defgroup LTDC LTDC

+  * @brief LTDC HAL module driver

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup LTDC_Exported_Types LTDC Exported Types

+  * @{

+  */

+#define MAX_LAYER  2

+

+/** 

+  * @brief  LTDC color structure definition

+  */

+typedef struct

+{

+  uint8_t Blue;                    /*!< Configures the blue value.

+                                        This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */

+

+  uint8_t Green;                   /*!< Configures the green value.

+                                        This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */

+

+  uint8_t Red;                     /*!< Configures the red value. 

+                                        This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */

+

+  uint8_t Reserved;                /*!< Reserved 0xFF */

+} LTDC_ColorTypeDef;

+

+/** 

+  * @brief  LTDC Init structure definition

+  */

+typedef struct

+{

+  uint32_t            HSPolarity;                /*!< configures the horizontal synchronization polarity.

+                                                      This parameter can be one value of @ref LTDC_HS_POLARITY */

+

+  uint32_t            VSPolarity;                /*!< configures the vertical synchronization polarity.

+                                                      This parameter can be one value of @ref LTDC_VS_POLARITY */

+

+  uint32_t            DEPolarity;                /*!< configures the data enable polarity. 

+                                                      This parameter can be one of value of @ref LTDC_DE_POLARITY */

+

+  uint32_t            PCPolarity;                /*!< configures the pixel clock polarity. 

+                                                      This parameter can be one of value of @ref LTDC_PC_POLARITY */

+

+  uint32_t            HorizontalSync;            /*!< configures the number of Horizontal synchronization width.

+                                                      This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */

+

+  uint32_t            VerticalSync;              /*!< configures the number of Vertical synchronization height. 

+                                                      This parameter must be a number between Min_Data = 0x000 and Max_Data = 0x7FF. */

+

+  uint32_t            AccumulatedHBP;            /*!< configures the accumulated horizontal back porch width.

+                                                      This parameter must be a number between Min_Data = LTDC_HorizontalSync and Max_Data = 0xFFF. */

+

+  uint32_t            AccumulatedVBP;            /*!< configures the accumulated vertical back porch height.

+                                                      This parameter must be a number between Min_Data = LTDC_VerticalSync and Max_Data = 0x7FF. */

+

+  uint32_t            AccumulatedActiveW;        /*!< configures the accumulated active width. 

+                                                      This parameter must be a number between Min_Data = LTDC_AccumulatedHBP and Max_Data = 0xFFF. */

+

+  uint32_t            AccumulatedActiveH;        /*!< configures the accumulated active height.

+                                                      This parameter must be a number between Min_Data = LTDC_AccumulatedVBP and Max_Data = 0x7FF. */

+

+  uint32_t            TotalWidth;                /*!< configures the total width.

+                                                      This parameter must be a number between Min_Data = LTDC_AccumulatedActiveW and Max_Data = 0xFFF. */

+

+  uint32_t            TotalHeigh;                /*!< configures the total height.

+                                                      This parameter must be a number between Min_Data = LTDC_AccumulatedActiveH and Max_Data = 0x7FF. */

+

+  LTDC_ColorTypeDef   Backcolor;                 /*!< Configures the background color. */

+} LTDC_InitTypeDef;

+

+/** 

+  * @brief  LTDC Layer structure definition

+  */

+typedef struct

+{

+  uint32_t WindowX0;                   /*!< Configures the Window Horizontal Start Position.

+                                            This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */

+

+  uint32_t WindowX1;                   /*!< Configures the Window Horizontal Stop Position.

+                                            This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */

+

+  uint32_t WindowY0;                   /*!< Configures the Window vertical Start Position.

+                                            This parameter must be a number between Min_Data = 0x000 and Max_Data = 0xFFF. */

+

+  uint32_t WindowY1;                   /*!< Configures the Window vertical Stop Position.

+                                            This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF. */

+

+  uint32_t PixelFormat;                /*!< Specifies the pixel format. 

+                                            This parameter can be one of value of @ref LTDC_Pixelformat */

+

+  uint32_t Alpha;                      /*!< Specifies the constant alpha used for blending.

+                                            This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */

+

+  uint32_t Alpha0;                     /*!< Configures the default alpha value.

+                                            This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */

+

+  uint32_t BlendingFactor1;            /*!< Select the blending factor 1. 

+                                            This parameter can be one of value of @ref LTDC_BlendingFactor1 */

+

+  uint32_t BlendingFactor2;            /*!< Select the blending factor 2. 

+                                            This parameter can be one of value of @ref LTDC_BlendingFactor2 */

+

+  uint32_t FBStartAdress;              /*!< Configures the color frame buffer address */

+

+  uint32_t ImageWidth;                 /*!< Configures the color frame buffer line length. 

+                                            This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x1FFF. */

+

+  uint32_t ImageHeight;                /*!< Specifies the number of line in frame buffer. 

+                                            This parameter must be a number between Min_Data = 0x000 and Max_Data = 0x7FF. */

+

+  LTDC_ColorTypeDef   Backcolor;       /*!< Configures the layer background color. */

+} LTDC_LayerCfgTypeDef;

+

+/** 

+  * @brief  HAL LTDC State structures definition

+  */

+typedef enum

+{

+  HAL_LTDC_STATE_RESET             = 0x00,    /*!< LTDC not yet initialized or disabled */

+  HAL_LTDC_STATE_READY             = 0x01,    /*!< LTDC initialized and ready for use   */

+  HAL_LTDC_STATE_BUSY              = 0x02,    /*!< LTDC internal process is ongoing     */

+  HAL_LTDC_STATE_TIMEOUT           = 0x03,    /*!< LTDC Timeout state                   */

+  HAL_LTDC_STATE_ERROR             = 0x04     /*!< LTDC state error                     */

+}HAL_LTDC_StateTypeDef;

+

+/** 

+  * @brief  LTDC handle Structure definition

+  */

+typedef struct

+{

+  LTDC_TypeDef                *Instance;                /*!< LTDC Register base address                */

+

+  LTDC_InitTypeDef            Init;                     /*!< LTDC parameters                           */

+

+  LTDC_LayerCfgTypeDef        LayerCfg[MAX_LAYER];      /*!< LTDC Layers parameters                    */

+

+  HAL_LockTypeDef             Lock;                     /*!< LTDC Lock                                 */

+

+  __IO HAL_LTDC_StateTypeDef  State;                    /*!< LTDC state                                */

+

+  __IO uint32_t               ErrorCode;                /*!< LTDC Error code                           */

+

+} LTDC_HandleTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup LTDC_Exported_Constants LTDC Exported Constants

+  * @{

+  */

+

+/** @defgroup LTDC_Error_Code LTDC Error Code

+  * @{

+  */

+#define HAL_LTDC_ERROR_NONE      ((uint32_t)0x00000000)    /*!< LTDC No error             */

+#define HAL_LTDC_ERROR_TE        ((uint32_t)0x00000001)    /*!< LTDC Transfer error       */

+#define HAL_LTDC_ERROR_FU        ((uint32_t)0x00000002)    /*!< LTDC FIFO Underrun        */

+#define HAL_LTDC_ERROR_TIMEOUT   ((uint32_t)0x00000020)    /*!< LTDC Timeout error        */

+/**

+  * @}

+  */

+

+/** @defgroup LTDC_HS_POLARITY LTDC HS POLARITY

+  * @{

+  */

+#define LTDC_HSPOLARITY_AL                ((uint32_t)0x00000000)                /*!< Horizontal Synchronization is active low. */

+#define LTDC_HSPOLARITY_AH                LTDC_GCR_HSPOL                        /*!< Horizontal Synchronization is active high. */

+/**

+  * @}

+  */

+

+/** @defgroup LTDC_VS_POLARITY LTDC VS POLARITY

+  * @{

+  */

+#define LTDC_VSPOLARITY_AL                ((uint32_t)0x00000000)                /*!< Vertical Synchronization is active low. */

+#define LTDC_VSPOLARITY_AH                LTDC_GCR_VSPOL                        /*!< Vertical Synchronization is active high. */

+/**

+  * @}

+  */

+  

+/** @defgroup LTDC_DE_POLARITY LTDC DE POLARITY

+  * @{

+  */

+#define LTDC_DEPOLARITY_AL                ((uint32_t)0x00000000)                /*!< Data Enable, is active low. */

+#define LTDC_DEPOLARITY_AH                LTDC_GCR_DEPOL                        /*!< Data Enable, is active high. */

+/**

+  * @}

+  */

+

+/** @defgroup LTDC_PC_POLARITY LTDC PC POLARITY

+  * @{

+  */

+#define LTDC_PCPOLARITY_IPC               ((uint32_t)0x00000000)                /*!< input pixel clock. */

+#define LTDC_PCPOLARITY_IIPC              LTDC_GCR_PCPOL                        /*!< inverted input pixel clock. */

+/**

+  * @}

+  */

+

+/** @defgroup LTDC_SYNC LTDC SYNC

+  * @{

+  */

+#define LTDC_HORIZONTALSYNC               (LTDC_SSCR_HSW >> 16)                 /*!< Horizontal synchronization width. */ 

+#define LTDC_VERTICALSYNC                 LTDC_SSCR_VSH                         /*!< Vertical synchronization height. */

+/**

+  * @}

+  */

+

+/** @defgroup LTDC_BACK_COLOR LTDC BACK COLOR

+  * @{

+  */

+#define LTDC_COLOR                   ((uint32_t)0x000000FF)                     /*!< Color mask */ 

+/**

+  * @}

+  */

+      

+/** @defgroup LTDC_BlendingFactor1 LTDC Blending Factor1

+  * @{

+  */

+#define LTDC_BLENDING_FACTOR1_CA                       ((uint32_t)0x00000400)   /*!< Blending factor : Cte Alpha */

+#define LTDC_BLENDING_FACTOR1_PAxCA                    ((uint32_t)0x00000600)   /*!< Blending factor : Cte Alpha x Pixel Alpha*/

+/**

+  * @}

+  */

+

+/** @defgroup LTDC_BlendingFactor2 LTDC Blending Factor2

+  * @{

+  */

+#define LTDC_BLENDING_FACTOR2_CA                       ((uint32_t)0x00000005)   /*!< Blending factor : Cte Alpha */

+#define LTDC_BLENDING_FACTOR2_PAxCA                    ((uint32_t)0x00000007)   /*!< Blending factor : Cte Alpha x Pixel Alpha*/

+/**

+  * @}

+  */

+      

+/** @defgroup LTDC_Pixelformat LTDC Pixel format

+  * @{

+  */

+#define LTDC_PIXEL_FORMAT_ARGB8888                  ((uint32_t)0x00000000)      /*!< ARGB8888 LTDC pixel format */

+#define LTDC_PIXEL_FORMAT_RGB888                    ((uint32_t)0x00000001)      /*!< RGB888 LTDC pixel format   */

+#define LTDC_PIXEL_FORMAT_RGB565                    ((uint32_t)0x00000002)      /*!< RGB565 LTDC pixel format   */

+#define LTDC_PIXEL_FORMAT_ARGB1555                  ((uint32_t)0x00000003)      /*!< ARGB1555 LTDC pixel format */

+#define LTDC_PIXEL_FORMAT_ARGB4444                  ((uint32_t)0x00000004)      /*!< ARGB4444 LTDC pixel format */

+#define LTDC_PIXEL_FORMAT_L8                        ((uint32_t)0x00000005)      /*!< L8 LTDC pixel format       */

+#define LTDC_PIXEL_FORMAT_AL44                      ((uint32_t)0x00000006)      /*!< AL44 LTDC pixel format     */

+#define LTDC_PIXEL_FORMAT_AL88                      ((uint32_t)0x00000007)      /*!< AL88 LTDC pixel format     */

+/**

+  * @}

+  */

+

+/** @defgroup LTDC_Alpha LTDC Alpha

+  * @{

+  */

+#define LTDC_ALPHA               LTDC_LxCACR_CONSTA                             /*!< LTDC Cte Alpha mask */

+/**

+  * @}

+  */

+

+/** @defgroup LTDC_LAYER_Config LTDC LAYER Config

+  * @{

+  */

+#define LTDC_STOPPOSITION                 (LTDC_LxWHPCR_WHSPPOS >> 16)          /*!< LTDC Layer stop position  */

+#define LTDC_STARTPOSITION                LTDC_LxWHPCR_WHSTPOS                  /*!< LTDC Layer start position */

+

+#define LTDC_COLOR_FRAME_BUFFER           LTDC_LxCFBLR_CFBLL                    /*!< LTDC Layer Line length    */ 

+#define LTDC_LINE_NUMBER                  LTDC_LxCFBLNR_CFBLNBR                 /*!< LTDC Layer Line number    */

+/**

+  * @}

+  */

+

+/** @defgroup LTDC_Interrupts LTDC Interrupts

+  * @{

+  */

+#define LTDC_IT_LI                      LTDC_IER_LIE

+#define LTDC_IT_FU                      LTDC_IER_FUIE

+#define LTDC_IT_TE                      LTDC_IER_TERRIE

+#define LTDC_IT_RR                      LTDC_IER_RRIE

+/**

+  * @}

+  */

+      

+/** @defgroup LTDC_Flag LTDC Flag

+  * @{

+  */

+#define LTDC_FLAG_LI                     LTDC_ISR_LIF

+#define LTDC_FLAG_FU                     LTDC_ISR_FUIF

+#define LTDC_FLAG_TE                     LTDC_ISR_TERRIF

+#define LTDC_FLAG_RR                     LTDC_ISR_RRIF

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */  

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup LTDC_Exported_Macros LTDC Exported Macros

+  * @{

+  */

+

+/** @brief Reset LTDC handle state

+  * @param  __HANDLE__: specifies the LTDC handle.

+  * @retval None

+  */

+#define __HAL_LTDC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_LTDC_STATE_RESET)

+

+/**

+  * @brief  Enable the LTDC.

+  * @param  __HANDLE__: LTDC handle

+  * @retval None.

+  */

+#define __HAL_LTDC_ENABLE(__HANDLE__)    ((__HANDLE__)->Instance->GCR |= LTDC_GCR_LTDCEN)

+

+/**

+  * @brief  Disable the LTDC.

+  * @param  __HANDLE__: LTDC handle

+  * @retval None.

+  */

+#define __HAL_LTDC_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->GCR &= ~(LTDC_GCR_LTDCEN))

+

+/**

+  * @brief  Enable the LTDC Layer.

+  * @param  __HANDLE__: LTDC handle

+  * @param  __LAYER__: Specify the layer to be enabled

+  *                     This parameter can be 0 or 1

+  * @retval None.

+  */

+#define __HAL_LTDC_LAYER_ENABLE(__HANDLE__, __LAYER__)  ((LTDC_LAYER((__HANDLE__), (__LAYER__)))->CR |= (uint32_t)LTDC_LxCR_LEN)

+

+/**

+  * @brief  Disable the LTDC Layer.

+  * @param  __HANDLE__: LTDC handle

+  * @param  __LAYER__: Specify the layer to be disabled

+  *                     This parameter can be 0 or 1

+  * @retval None.

+  */

+#define __HAL_LTDC_LAYER_DISABLE(__HANDLE__, __LAYER__) ((LTDC_LAYER((__HANDLE__), (__LAYER__)))->CR &= ~(uint32_t)LTDC_LxCR_LEN)

+

+/**

+  * @brief  Reload  Layer Configuration.

+  * @param  __HANDLE__: LTDC handle

+  * @retval None.

+  */

+#define __HAL_LTDC_RELOAD_CONFIG(__HANDLE__)   ((__HANDLE__)->Instance->SRCR |= LTDC_SRCR_IMR)

+

+/* Interrupt & Flag management */

+/**

+  * @brief  Get the LTDC pending flags.

+  * @param  __HANDLE__: LTDC handle

+  * @param  __FLAG__: Get the specified flag.

+  *          This parameter can be any combination of the following values:

+  *            @arg LTDC_FLAG_LI: Line Interrupt flag 

+  *            @arg LTDC_FLAG_FU: FIFO Underrun Interrupt flag

+  *            @arg LTDC_FLAG_TE: Transfer Error interrupt flag

+  *            @arg LTDC_FLAG_RR: Register Reload Interrupt Flag 

+  * @retval The state of FLAG (SET or RESET).

+  */

+#define __HAL_LTDC_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR & (__FLAG__))

+

+/**

+  * @brief  Clears the LTDC pending flags.

+  * @param  __HANDLE__: LTDC handle

+  * @param  __FLAG__: specifies the flag to clear.

+  *          This parameter can be any combination of the following values:

+  *            @arg LTDC_FLAG_LI: Line Interrupt flag 

+  *            @arg LTDC_FLAG_FU: FIFO Underrun Interrupt flag

+  *            @arg LTDC_FLAG_TE: Transfer Error interrupt flag

+  *            @arg LTDC_FLAG_RR: Register Reload Interrupt Flag 

+  * @retval None

+  */

+#define __HAL_LTDC_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))

+

+/**

+  * @brief  Enables the specified LTDC interrupts.

+  * @param  __HANDLE__: LTDC handle

+  * @param __INTERRUPT__: specifies the LTDC interrupt sources to be enabled. 

+  *          This parameter can be any combination of the following values:

+  *            @arg LTDC_IT_LI: Line Interrupt flag 

+  *            @arg LTDC_IT_FU: FIFO Underrun Interrupt flag

+  *            @arg LTDC_IT_TE: Transfer Error interrupt flag

+  *            @arg LTDC_IT_RR: Register Reload Interrupt Flag

+  * @retval None

+  */

+#define __HAL_LTDC_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))

+

+/**

+  * @brief  Disables the specified LTDC interrupts.

+  * @param  __HANDLE__: LTDC handle

+  * @param __INTERRUPT__: specifies the LTDC interrupt sources to be disabled. 

+  *          This parameter can be any combination of the following values:

+  *            @arg LTDC_IT_LI: Line Interrupt flag 

+  *            @arg LTDC_IT_FU: FIFO Underrun Interrupt flag

+  *            @arg LTDC_IT_TE: Transfer Error interrupt flag

+  *            @arg LTDC_IT_RR: Register Reload Interrupt Flag

+  * @retval None

+  */

+#define __HAL_LTDC_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= ~(__INTERRUPT__))

+

+/**

+  * @brief  Checks whether the specified LTDC interrupt has occurred or not.

+  * @param  __HANDLE__: LTDC handle

+  * @param  __INTERRUPT__: specifies the LTDC interrupt source to check.

+  *          This parameter can be one of the following values:

+  *            @arg LTDC_IT_LI: Line Interrupt flag 

+  *            @arg LTDC_IT_FU: FIFO Underrun Interrupt flag

+  *            @arg LTDC_IT_TE: Transfer Error interrupt flag

+  *            @arg LTDC_IT_RR: Register Reload Interrupt Flag

+  * @retval The state of INTERRUPT (SET or RESET).

+  */

+#define __HAL_LTDC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->ISR & (__INTERRUPT__))

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup LTDC_Exported_Functions

+  * @{

+  */

+/** @addtogroup LTDC_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization and de-initialization functions *****************************/

+HAL_StatusTypeDef HAL_LTDC_Init(LTDC_HandleTypeDef *hltdc);

+HAL_StatusTypeDef HAL_LTDC_DeInit(LTDC_HandleTypeDef *hltdc);

+void HAL_LTDC_MspInit(LTDC_HandleTypeDef* hltdc);

+void HAL_LTDC_MspDeInit(LTDC_HandleTypeDef* hltdc);

+void HAL_LTDC_ErrorCallback(LTDC_HandleTypeDef *hltdc);

+void HAL_LTDC_LineEvenCallback(LTDC_HandleTypeDef *hltdc);

+/**

+  * @}

+  */

+

+/** @addtogroup LTDC_Exported_Functions_Group2

+  * @{

+  */

+/* IO operation functions *****************************************************/

+void  HAL_LTDC_IRQHandler(LTDC_HandleTypeDef *hltdc);

+/**

+  * @}

+  */

+

+/** @addtogroup LTDC_Exported_Functions_Group3

+  * @{

+  */

+/* Peripheral Control functions ***********************************************/

+HAL_StatusTypeDef HAL_LTDC_ConfigLayer(LTDC_HandleTypeDef *hltdc, LTDC_LayerCfgTypeDef *pLayerCfg, uint32_t LayerIdx);

+HAL_StatusTypeDef HAL_LTDC_SetWindowSize(LTDC_HandleTypeDef *hltdc, uint32_t XSize, uint32_t YSize, uint32_t LayerIdx);

+HAL_StatusTypeDef HAL_LTDC_SetWindowPosition(LTDC_HandleTypeDef *hltdc, uint32_t X0, uint32_t Y0, uint32_t LayerIdx);

+HAL_StatusTypeDef HAL_LTDC_SetPixelFormat(LTDC_HandleTypeDef *hltdc, uint32_t Pixelformat, uint32_t LayerIdx);

+HAL_StatusTypeDef HAL_LTDC_SetAlpha(LTDC_HandleTypeDef *hltdc, uint32_t Alpha, uint32_t LayerIdx);

+HAL_StatusTypeDef HAL_LTDC_SetAddress(LTDC_HandleTypeDef *hltdc, uint32_t Address, uint32_t LayerIdx);

+HAL_StatusTypeDef HAL_LTDC_ConfigColorKeying(LTDC_HandleTypeDef *hltdc, uint32_t RGBValue, uint32_t LayerIdx);

+HAL_StatusTypeDef HAL_LTDC_ConfigCLUT(LTDC_HandleTypeDef *hltdc, uint32_t *pCLUT, uint32_t CLUTSize, uint32_t LayerIdx);

+HAL_StatusTypeDef HAL_LTDC_EnableColorKeying(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx);

+HAL_StatusTypeDef HAL_LTDC_DisableColorKeying(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx);

+HAL_StatusTypeDef HAL_LTDC_EnableCLUT(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx);

+HAL_StatusTypeDef HAL_LTDC_DisableCLUT(LTDC_HandleTypeDef *hltdc, uint32_t LayerIdx);

+HAL_StatusTypeDef HAL_LTDC_ProgramLineEvent(LTDC_HandleTypeDef *hltdc, uint32_t Line);

+HAL_StatusTypeDef HAL_LTDC_EnableDither(LTDC_HandleTypeDef *hltdc);

+HAL_StatusTypeDef HAL_LTDC_DisableDither(LTDC_HandleTypeDef *hltdc);

+/**

+  * @}

+  */

+

+/** @addtogroup LTDC_Exported_Functions_Group4

+  * @{

+  */

+/* Peripheral State functions *************************************************/

+HAL_LTDC_StateTypeDef HAL_LTDC_GetState(LTDC_HandleTypeDef *hltdc);

+uint32_t              HAL_LTDC_GetError(LTDC_HandleTypeDef *hltdc);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+/* Private types -------------------------------------------------------------*/

+/** @defgroup LTDC_Private_Types LTDC Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup LTDC_Private_Variables LTDC Private Variables

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup LTDC_Private_Constants LTDC Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup LTDC_Private_Macros LTDC Private Macros

+  * @{

+  */

+#define LTDC_LAYER(__HANDLE__, __LAYER__)         ((LTDC_Layer_TypeDef *)((uint32_t)(((uint32_t)((__HANDLE__)->Instance)) + 0x84 + (0x80*(__LAYER__)))))

+#define IS_LTDC_LAYER(LAYER)                      ((LAYER) <= MAX_LAYER)

+#define IS_LTDC_HSPOL(HSPOL)                      (((HSPOL) == LTDC_HSPOLARITY_AL) || \

+                                                   ((HSPOL) == LTDC_HSPOLARITY_AH))

+#define IS_LTDC_VSPOL(VSPOL)                      (((VSPOL) == LTDC_VSPOLARITY_AL) || \

+                                                   ((VSPOL) == LTDC_VSPOLARITY_AH))

+#define IS_LTDC_DEPOL(DEPOL)                      (((DEPOL) ==  LTDC_DEPOLARITY_AL) || \

+                                                   ((DEPOL) ==  LTDC_DEPOLARITY_AH))

+#define IS_LTDC_PCPOL(PCPOL)                      (((PCPOL) ==  LTDC_PCPOLARITY_IPC) || \

+                                                   ((PCPOL) ==  LTDC_PCPOLARITY_IIPC))

+#define IS_LTDC_HSYNC(HSYNC)                      ((HSYNC)  <= LTDC_HORIZONTALSYNC)

+#define IS_LTDC_VSYNC(VSYNC)                      ((VSYNC)  <= LTDC_VERTICALSYNC)

+#define IS_LTDC_AHBP(AHBP)                        ((AHBP)   <= LTDC_HORIZONTALSYNC)

+#define IS_LTDC_AVBP(AVBP)                        ((AVBP)   <= LTDC_VERTICALSYNC)

+#define IS_LTDC_AAW(AAW)                          ((AAW)    <= LTDC_HORIZONTALSYNC)

+#define IS_LTDC_AAH(AAH)                          ((AAH)    <= LTDC_VERTICALSYNC)

+#define IS_LTDC_TOTALW(TOTALW)                    ((TOTALW) <= LTDC_HORIZONTALSYNC)

+#define IS_LTDC_TOTALH(TOTALH)                    ((TOTALH) <= LTDC_VERTICALSYNC)

+#define IS_LTDC_BLUEVALUE(BBLUE)                  ((BBLUE)  <= LTDC_COLOR)

+#define IS_LTDC_GREENVALUE(BGREEN)                ((BGREEN) <= LTDC_COLOR)

+#define IS_LTDC_REDVALUE(BRED)                    ((BRED)   <= LTDC_COLOR)

+#define IS_LTDC_BLENDING_FACTOR1(BlendingFactor1) (((BlendingFactor1) == LTDC_BLENDING_FACTOR1_CA) || \

+                                                   ((BlendingFactor1) == LTDC_BLENDING_FACTOR1_PAxCA))

+#define IS_LTDC_BLENDING_FACTOR2(BlendingFactor2) (((BlendingFactor2) == LTDC_BLENDING_FACTOR2_CA) || \

+                                                   ((BlendingFactor2) == LTDC_BLENDING_FACTOR2_PAxCA))

+#define IS_LTDC_PIXEL_FORMAT(Pixelformat)         (((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB8888) || ((Pixelformat) == LTDC_PIXEL_FORMAT_RGB888)   || \

+                                                   ((Pixelformat) == LTDC_PIXEL_FORMAT_RGB565)   || ((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB1555) || \

+                                                   ((Pixelformat) == LTDC_PIXEL_FORMAT_ARGB4444) || ((Pixelformat) == LTDC_PIXEL_FORMAT_L8)       || \

+                                                   ((Pixelformat) == LTDC_PIXEL_FORMAT_AL44)     || ((Pixelformat) == LTDC_PIXEL_FORMAT_AL88))

+#define IS_LTDC_ALPHA(ALPHA)                      ((ALPHA) <= LTDC_ALPHA)

+#define IS_LTDC_HCONFIGST(HCONFIGST)              ((HCONFIGST) <= LTDC_STARTPOSITION)

+#define IS_LTDC_HCONFIGSP(HCONFIGSP)              ((HCONFIGSP) <= LTDC_STOPPOSITION)

+#define IS_LTDC_VCONFIGST(VCONFIGST)              ((VCONFIGST) <= LTDC_STARTPOSITION)

+#define IS_LTDC_VCONFIGSP(VCONFIGSP)              ((VCONFIGSP) <= LTDC_STOPPOSITION)

+#define IS_LTDC_CFBP(CFBP)                        ((CFBP) <= LTDC_COLOR_FRAME_BUFFER)

+#define IS_LTDC_CFBLL(CFBLL)                      ((CFBLL) <= LTDC_COLOR_FRAME_BUFFER)

+#define IS_LTDC_CFBLNBR(CFBLNBR)                  ((CFBLNBR) <= LTDC_LINE_NUMBER)

+#define IS_LTDC_LIPOS(LIPOS)                      ((LIPOS) <= 0x7FF)

+/**

+  * @}

+  */ 

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup LTDC_Private_Functions LTDC Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+#endif /* STM32F756xx || STM32F746xx */

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_LTDC_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_nand.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_nand.h
new file mode 100644
index 0000000..6318d54
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_nand.h
@@ -0,0 +1,301 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_nand.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of NAND HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_NAND_H

+#define __STM32F7xx_HAL_NAND_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_ll_fmc.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup NAND

+  * @{

+  */ 

+

+/* Exported typedef ----------------------------------------------------------*/

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup NAND_Exported_Types NAND Exported Types

+  * @{

+  */

+

+/** 

+  * @brief  HAL NAND State structures definition

+  */

+typedef enum

+{

+  HAL_NAND_STATE_RESET     = 0x00,  /*!< NAND not yet initialized or disabled */

+  HAL_NAND_STATE_READY     = 0x01,  /*!< NAND initialized and ready for use   */

+  HAL_NAND_STATE_BUSY      = 0x02,  /*!< NAND internal process is ongoing     */

+  HAL_NAND_STATE_ERROR     = 0x03   /*!< NAND error state                     */

+}HAL_NAND_StateTypeDef;

+   

+/** 

+  * @brief  NAND Memory electronic signature Structure definition

+  */

+typedef struct

+{

+  /*<! NAND memory electronic signature maker and device IDs */

+

+  uint8_t Maker_Id; 

+

+  uint8_t Device_Id;

+

+  uint8_t Third_Id;

+

+  uint8_t Fourth_Id;

+}NAND_IDTypeDef;

+

+/** 

+  * @brief  NAND Memory address Structure definition

+  */

+typedef struct 

+{

+  uint16_t Page;   /*!< NAND memory Page address  */

+

+  uint16_t Zone;   /*!< NAND memory Zone address  */

+

+  uint16_t Block;  /*!< NAND memory Block address */

+

+}NAND_AddressTypeDef;

+

+/** 

+  * @brief  NAND Memory info Structure definition

+  */ 

+typedef struct

+{

+  uint32_t PageSize;       /*!< NAND memory page (without spare area) size measured in K. bytes */

+

+  uint32_t SpareAreaSize;  /*!< NAND memory spare area size measured in K. bytes                */

+

+  uint32_t BlockSize;      /*!< NAND memory block size number of pages                          */

+

+  uint32_t BlockNbr;       /*!< NAND memory number of blocks                                    */

+

+  uint32_t ZoneSize;       /*!< NAND memory zone size measured in number of blocks              */

+}NAND_InfoTypeDef;

+

+/** 

+  * @brief  NAND handle Structure definition

+  */   

+typedef struct

+{

+  FMC_NAND_TypeDef             *Instance;  /*!< Register base address                        */

+  

+  FMC_NAND_InitTypeDef         Init;       /*!< NAND device control configuration parameters */

+

+  HAL_LockTypeDef              Lock;       /*!< NAND locking object                          */

+

+  __IO HAL_NAND_StateTypeDef   State;      /*!< NAND device access state                     */

+

+  NAND_InfoTypeDef             Info;       /*!< NAND characteristic information structure    */

+}NAND_HandleTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup NAND_Exported_Macros NAND Exported Macros

+ * @{

+ */ 

+

+/** @brief Reset NAND handle state

+  * @param  __HANDLE__: specifies the NAND handle.

+  * @retval None

+  */

+#define __HAL_NAND_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_NAND_STATE_RESET)

+

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup NAND_Exported_Functions NAND Exported Functions

+  * @{

+  */

+    

+/** @addtogroup NAND_Exported_Functions_Group1 Initialization and 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);

+void               HAL_NAND_IRQHandler(NAND_HandleTypeDef *hnand);

+void               HAL_NAND_ITCallback(NAND_HandleTypeDef *hnand);

+

+/**

+  * @}

+  */

+  

+/** @addtogroup NAND_Exported_Functions_Group2 Input and Output functions 

+  * @{

+  */

+

+/* 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_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);

+

+/**

+  * @}

+  */

+

+/** @addtogroup NAND_Exported_Functions_Group3 Peripheral Control functions 

+  * @{

+  */

+

+/* NAND Control functions  ****************************************************/

+HAL_StatusTypeDef  HAL_NAND_ECC_Enable(NAND_HandleTypeDef *hnand);

+HAL_StatusTypeDef  HAL_NAND_ECC_Disable(NAND_HandleTypeDef *hnand);

+HAL_StatusTypeDef  HAL_NAND_GetECC(NAND_HandleTypeDef *hnand, uint32_t *ECCval, uint32_t Timeout);

+

+/**

+  * @}

+  */

+    

+/** @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);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup NAND_Private_Constants NAND Private Constants

+  * @{

+  */

+#define NAND_DEVICE                ((uint32_t)0x80000000) 

+#define NAND_WRITE_TIMEOUT         ((uint32_t)0x01000000)

+

+#define CMD_AREA                   ((uint32_t)(1<<16))  /* A16 = CLE high */

+#define ADDR_AREA                  ((uint32_t)(1<<17))  /* 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         ((uint32_t)0x00000100)

+#define NAND_INVALID_ADDRESS       ((uint32_t)0x00000200)

+#define NAND_TIMEOUT_ERROR         ((uint32_t)0x00000400)

+#define NAND_BUSY                  ((uint32_t)0x00000000)

+#define NAND_ERROR                 ((uint32_t)0x00000001)

+#define NAND_READY                 ((uint32_t)0x00000040)

+/**

+  * @}

+  */

+

+/* 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__)->Zone) * ((__HANDLE__)->Info.ZoneSize)))* ((__HANDLE__)->Info.BlockSize)))

+

+/**

+  * @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 */

+/**

+  * @}

+  */

+    

+/**

+  * @}

+  */

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_NAND_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_nor.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_nor.h
new file mode 100644
index 0000000..e3359ee
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_nor.h
@@ -0,0 +1,299 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_nor.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of NOR HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_NOR_H

+#define __STM32F7xx_HAL_NOR_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_ll_fmc.h"

+

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup NOR

+  * @{

+  */ 

+

+/* Exported typedef ----------------------------------------------------------*/

+/** @defgroup NOR_Exported_Types NOR Exported Types

+  * @{

+  */

+

+/** 

+  * @brief  HAL SRAM State structures definition  

+  */ 

+typedef enum

+{  

+  HAL_NOR_STATE_RESET             = 0x00,  /*!< NOR not yet initialized or disabled  */

+  HAL_NOR_STATE_READY             = 0x01,  /*!< NOR initialized and ready for use    */

+  HAL_NOR_STATE_BUSY              = 0x02,  /*!< NOR internal processing is ongoing   */

+  HAL_NOR_STATE_ERROR             = 0x03,  /*!< NOR error state                      */

+  HAL_NOR_STATE_PROTECTED         = 0x04   /*!< NOR NORSRAM device write protected   */

+}HAL_NOR_StateTypeDef;

+

+/**

+  * @brief  FMC NOR Status typedef

+  */

+typedef enum

+{

+  HAL_NOR_STATUS_SUCCESS  = 0,

+  HAL_NOR_STATUS_ONGOING,

+  HAL_NOR_STATUS_ERROR,

+  HAL_NOR_STATUS_TIMEOUT

+}HAL_NOR_StatusTypeDef;

+

+/**

+  * @brief  FMC NOR ID typedef

+  */

+typedef struct

+{

+  uint16_t Manufacturer_Code;  /*!< Defines the device's manufacturer code used to identify the memory       */

+

+  uint16_t Device_Code1;

+

+  uint16_t Device_Code2;

+

+  uint16_t Device_Code3;       /*!< Defines the device's codes used to identify the memory. 

+                                    These codes can be accessed by performing read operations with specific 

+                                    control signals and addresses set.They can also be accessed by issuing 

+                                    an Auto Select command                                                   */

+}NOR_IDTypeDef;

+

+/**

+  * @brief  FMC NOR CFI typedef

+  */

+typedef struct

+{

+  /*!< Defines the information stored in the memory's Common flash interface

+       which contains a description of various electrical and timing parameters, 

+       density information and functions supported by the memory                   */

+

+  uint16_t CFI_1;

+

+  uint16_t CFI_2;

+

+  uint16_t CFI_3;

+

+  uint16_t CFI_4;

+}NOR_CFITypeDef;

+

+/** 

+  * @brief  NOR handle Structure definition

+  */ 

+typedef struct

+{

+  FMC_NORSRAM_TypeDef           *Instance;    /*!< Register base address                        */

+

+  FMC_NORSRAM_EXTENDED_TypeDef  *Extended;    /*!< Extended mode register base address          */

+

+  FMC_NORSRAM_InitTypeDef       Init;         /*!< NOR device control configuration parameters  */

+

+  HAL_LockTypeDef               Lock;         /*!< NOR locking object                           */

+

+  __IO HAL_NOR_StateTypeDef     State;        /*!< NOR device access state                      */

+

+}NOR_HandleTypeDef;

+/**

+  * @}

+  */

+  

+/* Exported constants --------------------------------------------------------*/

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup NOR_Exported_Macros NOR Exported Macros

+  * @{

+  */

+/** @brief Reset NOR handle state

+  * @param  __HANDLE__: specifies the NOR handle.

+  * @retval None

+  */

+#define __HAL_NOR_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_NOR_STATE_RESET)

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup NOR_Exported_Functions NOR Exported Functions

+  * @{

+  */

+

+/** @addtogroup NOR_Exported_Functions_Group1 Initialization and de-initialization functions 

+  * @{

+  */

+

+/* Initialization/de-initialization functions  ********************************/

+HAL_StatusTypeDef HAL_NOR_Init(NOR_HandleTypeDef *hnor, FMC_NORSRAM_TimingTypeDef *Timing, FMC_NORSRAM_TimingTypeDef *ExtTiming);

+HAL_StatusTypeDef HAL_NOR_DeInit(NOR_HandleTypeDef *hnor);

+void HAL_NOR_MspInit(NOR_HandleTypeDef *hnor);

+void HAL_NOR_MspDeInit(NOR_HandleTypeDef *hnor);

+void HAL_NOR_MspWait(NOR_HandleTypeDef *hnor, uint32_t Timeout);

+/**

+  * @}

+  */

+

+/** @addtogroup NOR_Exported_Functions_Group2 Input and Output functions 

+  * @{

+  */

+

+/* I/O operation functions  ***************************************************/

+HAL_StatusTypeDef HAL_NOR_Read_ID(NOR_HandleTypeDef *hnor, NOR_IDTypeDef *pNOR_ID);

+HAL_StatusTypeDef HAL_NOR_ReturnToReadMode(NOR_HandleTypeDef *hnor);

+HAL_StatusTypeDef HAL_NOR_Read(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData);

+HAL_StatusTypeDef HAL_NOR_Program(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData);

+

+HAL_StatusTypeDef HAL_NOR_ReadBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize);

+HAL_StatusTypeDef HAL_NOR_ProgramBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize);

+

+HAL_StatusTypeDef HAL_NOR_Erase_Block(NOR_HandleTypeDef *hnor, uint32_t BlockAddress, uint32_t Address);

+HAL_StatusTypeDef HAL_NOR_Erase_Chip(NOR_HandleTypeDef *hnor, uint32_t Address);

+HAL_StatusTypeDef HAL_NOR_Read_CFI(NOR_HandleTypeDef *hnor, NOR_CFITypeDef *pNOR_CFI);

+/**

+  * @}

+  */

+  

+/** @addtogroup NOR_Exported_Functions_Group3 NOR Control functions 

+  * @{

+  */

+

+/* NOR Control functions  *****************************************************/

+HAL_StatusTypeDef HAL_NOR_WriteOperation_Enable(NOR_HandleTypeDef *hnor);

+HAL_StatusTypeDef HAL_NOR_WriteOperation_Disable(NOR_HandleTypeDef *hnor);

+/**

+  * @}

+  */

+  

+/** @addtogroup NOR_Exported_Functions_Group4 NOR State functions 

+  * @{

+  */

+

+/* NOR State functions ********************************************************/

+HAL_NOR_StateTypeDef  HAL_NOR_GetState(NOR_HandleTypeDef *hnor);

+HAL_NOR_StatusTypeDef HAL_NOR_GetStatus(NOR_HandleTypeDef *hnor, uint32_t Address, uint32_t Timeout);

+/**

+  * @}

+  */

+    

+/**

+  * @}

+  */

+  

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup NOR_Private_Constants NOR Private Constants

+  * @{

+  */

+/* NOR device IDs addresses */

+#define MC_ADDRESS               ((uint16_t)0x0000)

+#define DEVICE_CODE1_ADDR        ((uint16_t)0x0001)

+#define DEVICE_CODE2_ADDR        ((uint16_t)0x000E)

+#define DEVICE_CODE3_ADDR        ((uint16_t)0x000F)

+

+/* NOR CFI IDs addresses */

+#define CFI1_ADDRESS             ((uint16_t)0x61)

+#define CFI2_ADDRESS             ((uint16_t)0x62)

+#define CFI3_ADDRESS             ((uint16_t)0x63)

+#define CFI4_ADDRESS             ((uint16_t)0x64)

+

+/* NOR operation wait timeout */

+#define NOR_TMEOUT               ((uint16_t)0xFFFF)

+   

+/* NOR memory data width */

+#define NOR_MEMORY_8B            ((uint8_t)0x0)

+#define NOR_MEMORY_16B           ((uint8_t)0x1)

+

+/* NOR memory device read/write start address */

+#define NOR_MEMORY_ADRESS1       ((uint32_t)0x60000000)

+#define NOR_MEMORY_ADRESS2       ((uint32_t)0x64000000)

+#define NOR_MEMORY_ADRESS3       ((uint32_t)0x68000000)

+#define NOR_MEMORY_ADRESS4       ((uint32_t)0x6C000000)

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup NOR_Private_Macros NOR Private Macros

+  * @{

+  */

+/**

+  * @brief  NOR memory address shifting.

+  * @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__)       \

+            ((uint32_t)(((__NOR_MEMORY_WIDTH_) == NOR_MEMORY_8B)?              \

+              ((uint32_t)((__NOR_ADDRESS) + (2 * (__ADDRESS__)))):              \

+              ((uint32_t)((__NOR_ADDRESS) + (__ADDRESS__)))))

+ 

+/**

+  * @brief  NOR memory write data to specified address.

+  * @param  __ADDRESS__: NOR memory address 

+  * @param  __DATA__: Data to write

+  * @retval None

+  */

+#define NOR_WRITE(__ADDRESS__, __DATA__)   do{                                                             \

+                                                 (*(__IO uint16_t *)((uint32_t)(__ADDRESS__)) = (__DATA__)); \

+                                                 __DSB();                                                    \

+                                               } while(0)

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_NOR_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_pcd.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_pcd.h
new file mode 100644
index 0000000..ac6b71d
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_pcd.h
@@ -0,0 +1,326 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_pcd.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of PCD HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_PCD_H

+#define __STM32F7xx_HAL_PCD_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_ll_usb.h"

+   

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup PCD

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup PCD_Exported_Types PCD Exported Types

+  * @{

+  */

+   

+/**

+  * @brief  PCD State structure definition

+  */ 

+typedef enum 

+{

+  HAL_PCD_STATE_RESET   = 0x00,

+  HAL_PCD_STATE_READY   = 0x01,

+  HAL_PCD_STATE_ERROR   = 0x02,

+  HAL_PCD_STATE_BUSY    = 0x03,

+  HAL_PCD_STATE_TIMEOUT = 0x04

+} PCD_StateTypeDef;

+

+/* Device LPM suspend state */

+typedef enum  

+{

+  LPM_L0 = 0x00, /* on */

+  LPM_L1 = 0x01, /* LPM L1 sleep */

+  LPM_L2 = 0x02, /* suspend */

+  LPM_L3 = 0x03, /* off */

+}PCD_LPM_StateTypeDef;

+

+typedef USB_OTG_GlobalTypeDef  PCD_TypeDef;

+typedef USB_OTG_CfgTypeDef     PCD_InitTypeDef;

+typedef USB_OTG_EPTypeDef      PCD_EPTypeDef ;                          

+

+/** 

+  * @brief  PCD Handle Structure definition  

+  */ 

+typedef struct

+{

+  PCD_TypeDef             *Instance;   /*!< Register base address              */ 

+  PCD_InitTypeDef         Init;       /*!< PCD required parameters            */

+  PCD_EPTypeDef           IN_ep[15];  /*!< IN endpoint parameters             */

+  PCD_EPTypeDef           OUT_ep[15]; /*!< OUT endpoint parameters            */ 

+  HAL_LockTypeDef         Lock;       /*!< PCD peripheral status              */

+  __IO PCD_StateTypeDef   State;      /*!< PCD communication state            */

+  uint32_t                Setup[12];  /*!< Setup packet buffer                */

+  PCD_LPM_StateTypeDef    LPM_State;    /*!< LPM State                          */

+  uint32_t                BESL;

+  uint32_t                lpm_active;   /*!< Enable or disable the Link Power Management .                                  

+                                        This parameter can be set to ENABLE or DISABLE */

+  void                    *pData;       /*!< Pointer to upper stack Handler */  

+} PCD_HandleTypeDef;

+

+/**

+  * @}

+  */

+    

+/* Include PCD HAL Extension module */

+#include "stm32f7xx_hal_pcd_ex.h"

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup PCD_Exported_Constants PCD Exported Constants

+  * @{

+  */

+

+/** @defgroup PCD_Speed PCD Speed

+  * @{

+  */

+#define PCD_SPEED_HIGH               0

+#define PCD_SPEED_HIGH_IN_FULL       1

+#define PCD_SPEED_FULL               2

+/**

+  * @}

+  */

+  

+/** @defgroup PCD_PHY_Module PCD PHY Module

+  * @{

+  */

+#define PCD_PHY_ULPI                 1

+#define PCD_PHY_EMBEDDED             2

+/**

+  * @}

+  */

+

+/** @defgroup PCD_Turnaround_Timeout Turnaround Timeout Value

+  * @{

+  */

+#ifndef USBD_HS_TRDT_VALUE

+ #define USBD_HS_TRDT_VALUE           9

+#endif /* USBD_HS_TRDT_VALUE */

+#ifndef USBD_FS_TRDT_VALUE

+ #define USBD_FS_TRDT_VALUE           5

+#endif /* USBD_HS_TRDT_VALUE */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+/* Exported macros -----------------------------------------------------------*/

+/** @defgroup PCD_Exported_Macros PCD Exported Macros

+ *  @brief macros to handle interrupts and specific clock configurations

+ * @{

+ */

+#define __HAL_PCD_ENABLE(__HANDLE__)                   USB_EnableGlobalInt ((__HANDLE__)->Instance)

+#define __HAL_PCD_DISABLE(__HANDLE__)                  USB_DisableGlobalInt ((__HANDLE__)->Instance)

+   

+#define __HAL_PCD_GET_FLAG(__HANDLE__, __INTERRUPT__)      ((USB_ReadInterrupts((__HANDLE__)->Instance) & (__INTERRUPT__)) == (__INTERRUPT__))

+#define __HAL_PCD_CLEAR_FLAG(__HANDLE__, __INTERRUPT__)    (((__HANDLE__)->Instance->GINTSTS) = (__INTERRUPT__))

+#define __HAL_PCD_IS_INVALID_INTERRUPT(__HANDLE__)         (USB_ReadInterrupts((__HANDLE__)->Instance) == 0)

+

+

+#define __HAL_PCD_UNGATE_PHYCLOCK(__HANDLE__)             *(__IO uint32_t *)((uint32_t)((__HANDLE__)->Instance) + USB_OTG_PCGCCTL_BASE) &= \

+                                                       ~(USB_OTG_PCGCCTL_STOPCLK)

+

+#define __HAL_PCD_GATE_PHYCLOCK(__HANDLE__)               *(__IO uint32_t *)((uint32_t)((__HANDLE__)->Instance) + USB_OTG_PCGCCTL_BASE) |= USB_OTG_PCGCCTL_STOPCLK

+                                                      

+#define __HAL_PCD_IS_PHY_SUSPENDED(__HANDLE__)            ((*(__IO uint32_t *)((uint32_t)((__HANDLE__)->Instance) + USB_OTG_PCGCCTL_BASE))&0x10)

+                                                         

+#define USB_OTG_FS_WAKEUP_EXTI_RISING_EDGE      ((uint32_t)0x08) 

+#define USB_OTG_FS_WAKEUP_EXTI_FALLING_EDGE     ((uint32_t)0x0C) 

+#define USB_OTG_FS_WAKEUP_EXTI_RISING_FALLING_EDGE        ((uint32_t)0x10) 

+

+#define USB_OTG_HS_WAKEUP_EXTI_RISING_EDGE      ((uint32_t)0x08) 

+#define USB_OTG_HS_WAKEUP_EXTI_FALLING_EDGE     ((uint32_t)0x0C) 

+#define USB_OTG_HS_WAKEUP_EXTI_RISING_FALLING_EDGE        ((uint32_t)0x10) 

+

+#define USB_OTG_HS_WAKEUP_EXTI_LINE              ((uint32_t)0x00100000)  /*!< External interrupt line 20 Connected to the USB HS EXTI Line */

+#define USB_OTG_FS_WAKEUP_EXTI_LINE              ((uint32_t)0x00040000)  /*!< External interrupt line 18 Connected to the USB FS EXTI Line */

+

+#define __HAL_USB_OTG_HS_WAKEUP_EXTI_ENABLE_IT()    EXTI->IMR |= (USB_OTG_HS_WAKEUP_EXTI_LINE)

+#define __HAL_USB_OTG_HS_WAKEUP_EXTI_DISABLE_IT()   EXTI->IMR &= ~(USB_OTG_HS_WAKEUP_EXTI_LINE)

+#define __HAL_USB_OTG_HS_WAKEUP_EXTI_GET_FLAG()     EXTI->PR & (USB_OTG_HS_WAKEUP_EXTI_LINE)

+#define __HAL_USB_OTG_HS_WAKEUP_EXTI_CLEAR_FLAG()   EXTI->PR = (USB_OTG_HS_WAKEUP_EXTI_LINE)

+

+#define __HAL_USB_OTG_HS_WAKEUP_EXTI_ENABLE_RISING_EDGE() EXTI->FTSR &= ~(USB_OTG_HS_WAKEUP_EXTI_LINE);\

+                                                          EXTI->RTSR |= USB_OTG_HS_WAKEUP_EXTI_LINE

+                                                      

+#define __HAL_USB_OTG_HS_WAKEUP_EXTI_ENABLE_FALLING_EDGE()  EXTI->FTSR |= (USB_OTG_HS_WAKEUP_EXTI_LINE);\

+                                                            EXTI->RTSR &= ~(USB_OTG_HS_WAKEUP_EXTI_LINE)

+

+#define __HAL_USB_OTG_HS_WAKEUP_EXTI_ENABLE_RISING_FALLING_EDGE()   EXTI->RTSR &= ~(USB_OTG_HS_WAKEUP_EXTI_LINE);\

+                                                                    EXTI->FTSR &= ~(USB_OTG_HS_WAKEUP_EXTI_LINE;)\

+                                                                    EXTI->RTSR |= USB_OTG_HS_WAKEUP_EXTI_LINE;\

+                                                                    EXTI->FTSR |= USB_OTG_HS_WAKEUP_EXTI_LINE

+

+#define __HAL_USB_OTG_HS_WAKEUP_EXTI_GENERATE_SWIT()   (EXTI->SWIER |= USB_OTG_FS_WAKEUP_EXTI_LINE) 

+                                                                                                                    

+#define __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_IT()    EXTI->IMR |= USB_OTG_FS_WAKEUP_EXTI_LINE

+#define __HAL_USB_OTG_FS_WAKEUP_EXTI_DISABLE_IT()   EXTI->IMR &= ~(USB_OTG_FS_WAKEUP_EXTI_LINE)

+#define __HAL_USB_OTG_FS_WAKEUP_EXTI_GET_FLAG()     EXTI->PR & (USB_OTG_FS_WAKEUP_EXTI_LINE)

+#define __HAL_USB_OTG_FS_WAKEUP_EXTI_CLEAR_FLAG()   EXTI->PR = USB_OTG_FS_WAKEUP_EXTI_LINE

+

+#define __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_RISING_EDGE() EXTI->FTSR &= ~(USB_OTG_FS_WAKEUP_EXTI_LINE);\

+                                                          EXTI->RTSR |= USB_OTG_FS_WAKEUP_EXTI_LINE

+

+                                                      

+#define __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_FALLING_EDGE()  EXTI->FTSR |= (USB_OTG_FS_WAKEUP_EXTI_LINE);\

+                                                            EXTI->RTSR &= ~(USB_OTG_FS_WAKEUP_EXTI_LINE)

+

+#define __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_RISING_FALLING_EDGE()  EXTI->RTSR &= ~(USB_OTG_FS_WAKEUP_EXTI_LINE);\

+                                                                   EXTI->FTSR &= ~(USB_OTG_FS_WAKEUP_EXTI_LINE);\

+                                                                   EXTI->RTSR |= USB_OTG_FS_WAKEUP_EXTI_LINE;\

+                                                                   EXTI->FTSR |= USB_OTG_FS_WAKEUP_EXTI_LINE 

+                                                         

+#define __HAL_USB_OTG_FS_WAKEUP_EXTI_GENERATE_SWIT()  (EXTI->SWIER |= USB_OTG_FS_WAKEUP_EXTI_LINE)                                                     

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup PCD_Exported_Functions PCD Exported Functions

+  * @{

+  */

+

+/* Initialization/de-initialization functions  ********************************/

+/** @addtogroup PCD_Exported_Functions_Group1 Initialization and de-initialization functions

+  * @{

+  */

+HAL_StatusTypeDef HAL_PCD_Init(PCD_HandleTypeDef *hpcd);

+HAL_StatusTypeDef HAL_PCD_DeInit (PCD_HandleTypeDef *hpcd);

+void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd);

+void HAL_PCD_MspDeInit(PCD_HandleTypeDef *hpcd);

+/**

+  * @}

+  */

+

+/* I/O operation functions  ***************************************************/

+/* Non-Blocking mode: Interrupt */

+/** @addtogroup PCD_Exported_Functions_Group2 IO operation functions

+  * @{

+  */

+HAL_StatusTypeDef HAL_PCD_Start(PCD_HandleTypeDef *hpcd);

+HAL_StatusTypeDef HAL_PCD_Stop(PCD_HandleTypeDef *hpcd);

+void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd);

+

+void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum);

+void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum);

+void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd);

+void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd);

+void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd);

+void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd);

+void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd);

+void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum);

+void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum);

+void HAL_PCD_ConnectCallback(PCD_HandleTypeDef *hpcd);

+void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd);

+/**

+  * @}

+  */

+

+/* Peripheral Control functions  **********************************************/

+/** @addtogroup PCD_Exported_Functions_Group3 Peripheral Control functions

+  * @{

+  */

+HAL_StatusTypeDef HAL_PCD_DevConnect(PCD_HandleTypeDef *hpcd);

+HAL_StatusTypeDef HAL_PCD_DevDisconnect(PCD_HandleTypeDef *hpcd);

+HAL_StatusTypeDef HAL_PCD_SetAddress(PCD_HandleTypeDef *hpcd, uint8_t address);

+HAL_StatusTypeDef HAL_PCD_EP_Open(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint16_t ep_mps, uint8_t ep_type);

+HAL_StatusTypeDef HAL_PCD_EP_Close(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);

+HAL_StatusTypeDef HAL_PCD_EP_Receive(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint8_t *pBuf, uint32_t len);

+HAL_StatusTypeDef HAL_PCD_EP_Transmit(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint8_t *pBuf, uint32_t len);

+uint16_t          HAL_PCD_EP_GetRxCount(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);

+HAL_StatusTypeDef HAL_PCD_EP_SetStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);

+HAL_StatusTypeDef HAL_PCD_EP_ClrStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);

+HAL_StatusTypeDef HAL_PCD_EP_Flush(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);

+HAL_StatusTypeDef HAL_PCD_ActivateRemoteWakeup(PCD_HandleTypeDef *hpcd);

+HAL_StatusTypeDef HAL_PCD_DeActivateRemoteWakeup(PCD_HandleTypeDef *hpcd);

+/**

+  * @}

+  */

+

+/* Peripheral State functions  ************************************************/

+/** @addtogroup PCD_Exported_Functions_Group4 Peripheral State functions

+  * @{

+  */

+PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+/** @defgroup PCD_Instance_definition PCD Instance definition

+  * @{

+  */

+#define IS_PCD_ALL_INSTANCE(INSTANCE) (((INSTANCE) == USB_OTG_FS) || \

+                                       ((INSTANCE) == USB_OTG_HS))

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+#ifdef __cplusplus

+}

+#endif

+

+

+#endif /* __STM32F7xx_HAL_PCD_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_pcd_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_pcd_ex.h
new file mode 100644
index 0000000..3c270c5
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_pcd_ex.h
@@ -0,0 +1,101 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_pcd_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of PCD HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_PCD_EX_H

+#define __STM32F7xx_HAL_PCD_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+   

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup PCDEx

+  * @{

+  */

+/* Exported types ------------------------------------------------------------*/

+typedef enum  

+{

+  PCD_LPM_L0_ACTIVE = 0x00, /* on */

+  PCD_LPM_L1_ACTIVE = 0x01, /* LPM L1 sleep */

+}PCD_LPM_MsgTypeDef;

+

+/* Exported constants --------------------------------------------------------*/

+/* Exported macros -----------------------------------------------------------*/

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup PCDEx_Exported_Functions PCDEx Exported Functions

+  * @{

+  */

+/** @addtogroup PCDEx_Exported_Functions_Group1 Peripheral Control functions

+  * @{

+  */

+HAL_StatusTypeDef HAL_PCDEx_SetTxFiFo(PCD_HandleTypeDef *hpcd, uint8_t fifo, uint16_t size);

+HAL_StatusTypeDef HAL_PCDEx_SetRxFiFo(PCD_HandleTypeDef *hpcd, uint16_t size);

+HAL_StatusTypeDef HAL_PCDEx_ActivateLPM(PCD_HandleTypeDef *hpcd);

+HAL_StatusTypeDef HAL_PCDEx_DeActivateLPM(PCD_HandleTypeDef *hpcd);

+void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg);

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+

+#endif /* __STM32F7xx_HAL_PCD_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_pwr.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_pwr.h
new file mode 100644
index 0000000..c3c2d2c
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_pwr.h
@@ -0,0 +1,424 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_pwr.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of PWR HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_PWR_H

+#define __STM32F7xx_HAL_PWR_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup PWR

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+

+/** @defgroup PWR_Exported_Types PWR Exported Types

+  * @{

+  */

+   

+/**

+  * @brief  PWR PVD configuration structure definition

+  */

+typedef struct

+{

+  uint32_t PVDLevel;   /*!< PVDLevel: Specifies the PVD detection level.

+                            This parameter can be a value of @ref PWR_PVD_detection_level */

+

+  uint32_t Mode;      /*!< Mode: Specifies the operating mode for the selected pins.

+                           This parameter can be a value of @ref PWR_PVD_Mode */

+}PWR_PVDTypeDef;

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup PWR_Exported_Constants PWR Exported Constants

+  * @{

+  */

+

+/** @defgroup PWR_PVD_detection_level PWR PVD detection level

+  * @{

+  */ 

+#define PWR_PVDLEVEL_0                  PWR_CR1_PLS_LEV0

+#define PWR_PVDLEVEL_1                  PWR_CR1_PLS_LEV1

+#define PWR_PVDLEVEL_2                  PWR_CR1_PLS_LEV2

+#define PWR_PVDLEVEL_3                  PWR_CR1_PLS_LEV3

+#define PWR_PVDLEVEL_4                  PWR_CR1_PLS_LEV4

+#define PWR_PVDLEVEL_5                  PWR_CR1_PLS_LEV5

+#define PWR_PVDLEVEL_6                  PWR_CR1_PLS_LEV6

+#define PWR_PVDLEVEL_7                  PWR_CR1_PLS_LEV7/* External input analog voltage 

+                                                          (Compare internally to VREFINT) */

+

+/**

+  * @}

+  */   

+ 

+/** @defgroup PWR_PVD_Mode PWR PVD Mode

+  * @{

+  */

+#define PWR_PVD_MODE_NORMAL                 ((uint32_t)0x00000000)   /*!< basic mode is used */

+#define PWR_PVD_MODE_IT_RISING              ((uint32_t)0x00010001)   /*!< External Interrupt Mode with Rising edge trigger detection */

+#define PWR_PVD_MODE_IT_FALLING             ((uint32_t)0x00010002)   /*!< External Interrupt Mode with Falling edge trigger detection */

+#define PWR_PVD_MODE_IT_RISING_FALLING      ((uint32_t)0x00010003)   /*!< External Interrupt Mode with Rising/Falling edge trigger detection */

+#define PWR_PVD_MODE_EVENT_RISING           ((uint32_t)0x00020001)   /*!< Event Mode with Rising edge trigger detection */

+#define PWR_PVD_MODE_EVENT_FALLING          ((uint32_t)0x00020002)   /*!< Event Mode with Falling edge trigger detection */

+#define PWR_PVD_MODE_EVENT_RISING_FALLING   ((uint32_t)0x00020003)   /*!< Event Mode with Rising/Falling edge trigger detection */

+/**

+  * @}

+  */

+

+/** @defgroup PWR_Regulator_state_in_STOP_mode PWR Regulator state in SLEEP/STOP mode

+  * @{

+  */

+#define PWR_MAINREGULATOR_ON                        ((uint32_t)0x00000000)

+#define PWR_LOWPOWERREGULATOR_ON                    PWR_CR1_LPDS

+/**

+  * @}

+  */

+    

+/** @defgroup PWR_SLEEP_mode_entry PWR SLEEP mode entry

+  * @{

+  */

+#define PWR_SLEEPENTRY_WFI              ((uint8_t)0x01)

+#define PWR_SLEEPENTRY_WFE              ((uint8_t)0x02)

+/**

+  * @}

+  */

+

+/** @defgroup PWR_STOP_mode_entry PWR STOP mode entry

+  * @{

+  */

+#define PWR_STOPENTRY_WFI               ((uint8_t)0x01)

+#define PWR_STOPENTRY_WFE               ((uint8_t)0x02)

+/**

+  * @}

+  */

+

+/** @defgroup PWR_Regulator_Voltage_Scale PWR Regulator Voltage Scale

+  * @{

+  */

+#define PWR_REGULATOR_VOLTAGE_SCALE1         PWR_CR1_VOS

+#define PWR_REGULATOR_VOLTAGE_SCALE2         PWR_CR1_VOS_1

+#define PWR_REGULATOR_VOLTAGE_SCALE3         PWR_CR1_VOS_0

+/**

+  * @}

+  */

+

+/** @defgroup PWR_Flag PWR Flag

+  * @{

+  */

+#define PWR_FLAG_WU                     PWR_CSR1_WUIF

+#define PWR_FLAG_SB                     PWR_CSR1_SBF

+#define PWR_FLAG_PVDO                   PWR_CSR1_PVDO

+#define PWR_FLAG_BRR                    PWR_CSR1_BRR

+#define PWR_FLAG_VOSRDY                 PWR_CSR1_VOSRDY

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup PWR_Exported_Macro PWR Exported Macro

+  * @{

+  */

+

+/** @brief  macros configure the main internal regulator output voltage.

+  * @param  __REGULATOR__: specifies the regulator output voltage to achieve

+  *         a tradeoff between performance and power consumption when the device does

+  *         not operate at the maximum frequency (refer to the datasheets for more details).

+  *          This parameter can be one of the following values:

+  *            @arg PWR_REGULATOR_VOLTAGE_SCALE1: Regulator voltage output Scale 1 mode

+  *            @arg PWR_REGULATOR_VOLTAGE_SCALE2: Regulator voltage output Scale 2 mode

+  *            @arg PWR_REGULATOR_VOLTAGE_SCALE3: Regulator voltage output Scale 3 mode

+  * @retval None

+  */

+#define __HAL_PWR_VOLTAGESCALING_CONFIG(__REGULATOR__) do {                                                     \

+                                                            __IO uint32_t tmpreg;                               \

+                                                            MODIFY_REG(PWR->CR1, PWR_CR1_VOS, (__REGULATOR__)); \

+                                                            /* Delay after an RCC peripheral clock enabling */  \

+                                                            tmpreg = READ_BIT(PWR->CR1, PWR_CR1_VOS);           \

+                                                            UNUSED(tmpreg);                                     \

+				                                                	} while(0)

+

+/** @brief  Check PWR flag is set or not.

+  * @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 on the internal wakeup line in standby mode (RTC alarm (Alarm A or Alarm B),

+  *                  RTC Tamper event, RTC TimeStamp event or RTC Wakeup)).

+  *            @arg PWR_FLAG_SB: StandBy flag. This flag indicates that the system was

+  *                  resumed from StandBy mode.    

+  *            @arg PWR_FLAG_PVDO: PVD Output. This flag is valid only if PVD is enabled 

+  *                  by the HAL_PWR_EnablePVD() function. The PVD is stopped by Standby mode 

+  *                  For this reason, this bit is equal to 0 after Standby or reset

+  *                  until the PVDE bit is set.

+  *            @arg PWR_FLAG_BRR: Backup regulator ready flag. This bit is not reset 

+  *                  when the device wakes up from Standby mode or by a system reset 

+  *                  or power reset.  

+  *            @arg PWR_FLAG_VOSRDY: This flag indicates that the Regulator voltage 

+  *                 scaling output selection is ready.

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define __HAL_PWR_GET_FLAG(__FLAG__) ((PWR->CSR1 & (__FLAG__)) == (__FLAG__))

+

+/** @brief  Clear the PWR's pending flags.

+  * @param  __FLAG__: specifies the flag to clear.

+  *          This parameter can be one of the following values:

+  *            @arg PWR_FLAG_SB: StandBy flag

+  */

+#define __HAL_PWR_CLEAR_FLAG(__FLAG__) (PWR->CR1 |=  (__FLAG__) << 2)

+

+/**

+  * @brief Enable the PVD Exti Line 16.

+  * @retval None.

+  */

+#define __HAL_PWR_PVD_EXTI_ENABLE_IT()   (EXTI->IMR |= (PWR_EXTI_LINE_PVD))

+

+/**

+  * @brief Disable the PVD EXTI Line 16.

+  * @retval None.

+  */

+#define __HAL_PWR_PVD_EXTI_DISABLE_IT()  (EXTI->IMR &= ~(PWR_EXTI_LINE_PVD))

+

+/**

+  * @brief Enable event on PVD Exti Line 16.

+  * @retval None.

+  */

+#define __HAL_PWR_PVD_EXTI_ENABLE_EVENT()   (EXTI->EMR |= (PWR_EXTI_LINE_PVD))

+

+/**

+  * @brief Disable event on PVD Exti Line 16.

+  * @retval None.

+  */

+#define __HAL_PWR_PVD_EXTI_DISABLE_EVENT()  (EXTI->EMR &= ~(PWR_EXTI_LINE_PVD))

+

+/**

+  * @brief Enable the PVD Extended Interrupt Rising Trigger.

+  * @retval None.

+  */

+#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE()   SET_BIT(EXTI->RTSR, PWR_EXTI_LINE_PVD)

+

+/**

+  * @brief Disable the PVD Extended Interrupt Rising Trigger.

+  * @retval None.

+  */

+#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE()  CLEAR_BIT(EXTI->RTSR, PWR_EXTI_LINE_PVD)

+

+/**

+  * @brief Enable the PVD Extended Interrupt Falling Trigger.

+  * @retval None.

+  */

+#define __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE()   SET_BIT(EXTI->FTSR, PWR_EXTI_LINE_PVD)

+

+

+/**

+  * @brief Disable the PVD Extended Interrupt Falling Trigger.

+  * @retval None.

+  */

+#define __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE()  CLEAR_BIT(EXTI->FTSR, PWR_EXTI_LINE_PVD)

+

+

+/**

+  * @brief  PVD EXTI line configuration: set rising & falling edge trigger.

+  * @retval None.

+  */

+#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_FALLING_EDGE()   __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE();__HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE();

+

+/**

+  * @brief Disable the PVD Extended Interrupt Rising & Falling Trigger.

+  * @retval None.

+  */

+#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_FALLING_EDGE()  __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE();__HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE();

+

+/**

+  * @brief checks whether the specified PVD Exti interrupt flag is set or not.

+  * @retval EXTI PVD Line Status.

+  */

+#define __HAL_PWR_PVD_EXTI_GET_FLAG()  (EXTI->PR & (PWR_EXTI_LINE_PVD))

+

+/**

+  * @brief Clear the PVD Exti flag.

+  * @retval None.

+  */

+#define __HAL_PWR_PVD_EXTI_CLEAR_FLAG()  (EXTI->PR = (PWR_EXTI_LINE_PVD))

+

+/**

+  * @brief  Generates a Software interrupt on PVD EXTI line.

+  * @retval None

+  */

+#define __HAL_PWR_PVD_EXTI_GENERATE_SWIT() (EXTI->SWIER |= (PWR_EXTI_LINE_PVD))

+

+/**

+  * @}

+  */

+

+/* Include PWR HAL Extension module */

+#include "stm32f7xx_hal_pwr_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup PWR_Exported_Functions PWR Exported Functions

+  * @{

+  */

+  

+/** @addtogroup PWR_Exported_Functions_Group1 Initialization and de-initialization functions 

+  * @{

+  */

+/* Initialization and de-initialization functions *****************************/

+void HAL_PWR_DeInit(void);

+void HAL_PWR_EnableBkUpAccess(void);

+void HAL_PWR_DisableBkUpAccess(void);

+/**

+  * @}

+  */

+

+/** @addtogroup PWR_Exported_Functions_Group2 Peripheral Control functions 

+  * @{

+  */

+/* Peripheral Control functions  **********************************************/

+/* PVD configuration */

+void HAL_PWR_ConfigPVD(PWR_PVDTypeDef *sConfigPVD);

+void HAL_PWR_EnablePVD(void);

+void HAL_PWR_DisablePVD(void);

+

+/* WakeUp pins configuration */

+void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinPolarity);

+void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx);

+

+/* Low Power modes entry */

+void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry);

+void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry);

+void HAL_PWR_EnterSTANDBYMode(void);

+

+/* Power PVD IRQ Handler */

+void HAL_PWR_PVD_IRQHandler(void);

+void HAL_PWR_PVDCallback(void);

+

+/* Cortex System Control functions  *******************************************/

+void HAL_PWR_EnableSleepOnExit(void);

+void HAL_PWR_DisableSleepOnExit(void);

+void HAL_PWR_EnableSEVOnPend(void);

+void HAL_PWR_DisableSEVOnPend(void);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup PWR_Private_Constants PWR Private Constants

+  * @{

+  */

+

+/** @defgroup PWR_PVD_EXTI_Line PWR PVD EXTI Line

+  * @{

+  */

+#define PWR_EXTI_LINE_PVD  ((uint32_t)EXTI_IMR_MR16)  /*!< External interrupt line 16 Connected to the PVD EXTI Line */

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup PWR_Private_Macros PWR Private Macros

+  * @{

+  */

+

+/** @defgroup PWR_IS_PWR_Definitions PWR Private macros to check input parameters

+  * @{

+  */

+#define IS_PWR_WAKEUP_POLARITY(POLARITY)       (((POLARITY) == PWR_POLARITY_RISINGEDGE)  || \

+                                                    ((POLARITY) == PWR_POLARITY_FALLINGEDGE))

+#define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLEVEL_0) || ((LEVEL) == PWR_PVDLEVEL_1)|| \

+                                 ((LEVEL) == PWR_PVDLEVEL_2) || ((LEVEL) == PWR_PVDLEVEL_3)|| \

+                                 ((LEVEL) == PWR_PVDLEVEL_4) || ((LEVEL) == PWR_PVDLEVEL_5)|| \

+                                 ((LEVEL) == PWR_PVDLEVEL_6) || ((LEVEL) == PWR_PVDLEVEL_7))

+#define IS_PWR_PVD_MODE(MODE) (((MODE) == PWR_PVD_MODE_IT_RISING)|| ((MODE) == PWR_PVD_MODE_IT_FALLING) || \

+                              ((MODE) == PWR_PVD_MODE_IT_RISING_FALLING) || ((MODE) == PWR_PVD_MODE_EVENT_RISING) || \

+                              ((MODE) == PWR_PVD_MODE_EVENT_FALLING) || ((MODE) == PWR_PVD_MODE_EVENT_RISING_FALLING) || \

+                              ((MODE) == PWR_PVD_MODE_NORMAL))

+#define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_ON) || \

+                                     ((REGULATOR) == PWR_LOWPOWERREGULATOR_ON))

+#define IS_PWR_SLEEP_ENTRY(ENTRY) (((ENTRY) == PWR_SLEEPENTRY_WFI) || ((ENTRY) == PWR_SLEEPENTRY_WFE))

+#define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPENTRY_WFI) || ((ENTRY) == PWR_STOPENTRY_WFE))

+#define IS_PWR_REGULATOR_VOLTAGE(VOLTAGE) (((VOLTAGE) == PWR_REGULATOR_VOLTAGE_SCALE1) || \

+                                           ((VOLTAGE) == PWR_REGULATOR_VOLTAGE_SCALE2) || \

+                                           ((VOLTAGE) == PWR_REGULATOR_VOLTAGE_SCALE3))

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+

+#endif /* __STM32F7xx_HAL_PWR_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_pwr_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_pwr_ex.h
new file mode 100644
index 0000000..4b15a27
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_pwr_ex.h
@@ -0,0 +1,280 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_pwr_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of PWR HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_PWR_EX_H

+#define __STM32F7xx_HAL_PWR_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup PWREx

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup PWREx_Exported_Constants PWREx Exported Constants

+  * @{

+  */

+/** @defgroup PWREx_WakeUp_Pins PWREx Wake Up Pins

+  * @{

+  */

+#define PWR_WAKEUP_PIN1                PWR_CSR2_EWUP1

+#define PWR_WAKEUP_PIN2                PWR_CSR2_EWUP2

+#define PWR_WAKEUP_PIN3                PWR_CSR2_EWUP3

+#define PWR_WAKEUP_PIN4                PWR_CSR2_EWUP4

+#define PWR_WAKEUP_PIN5                PWR_CSR2_EWUP5

+#define PWR_WAKEUP_PIN6                PWR_CSR2_EWUP6

+#define PWR_WAKEUP_PIN1_HIGH           PWR_CSR2_EWUP1

+#define PWR_WAKEUP_PIN2_HIGH           PWR_CSR2_EWUP2

+#define PWR_WAKEUP_PIN3_HIGH           PWR_CSR2_EWUP3

+#define PWR_WAKEUP_PIN4_HIGH           PWR_CSR2_EWUP4

+#define PWR_WAKEUP_PIN5_HIGH           PWR_CSR2_EWUP5

+#define PWR_WAKEUP_PIN6_HIGH           PWR_CSR2_EWUP6

+#define PWR_WAKEUP_PIN1_LOW            (uint32_t)((PWR_CR2_WUPP1<<6) | PWR_CSR2_EWUP1)

+#define PWR_WAKEUP_PIN2_LOW            (uint32_t)((PWR_CR2_WUPP2<<6) | PWR_CSR2_EWUP2)

+#define PWR_WAKEUP_PIN3_LOW            (uint32_t)((PWR_CR2_WUPP3<<6) | PWR_CSR2_EWUP3)

+#define PWR_WAKEUP_PIN4_LOW            (uint32_t)((PWR_CR2_WUPP4<<6) | PWR_CSR2_EWUP4)

+#define PWR_WAKEUP_PIN5_LOW            (uint32_t)((PWR_CR2_WUPP5<<6) | PWR_CSR2_EWUP5)

+#define PWR_WAKEUP_PIN6_LOW            (uint32_t)((PWR_CR2_WUPP6<<6) | PWR_CSR2_EWUP6)

+

+/**

+  * @}

+  */

+	

+/** @defgroup PWREx_Regulator_state_in_UnderDrive_mode PWREx Regulator state in UnderDrive mode

+  * @{

+  */

+#define PWR_MAINREGULATOR_UNDERDRIVE_ON                       PWR_CR1_MRUDS

+#define PWR_LOWPOWERREGULATOR_UNDERDRIVE_ON                   ((uint32_t)(PWR_CR1_LPDS | PWR_CR1_LPUDS))

+/**

+  * @}

+  */ 

+  

+/** @defgroup PWREx_Over_Under_Drive_Flag PWREx Over Under Drive Flag

+  * @{

+  */

+#define PWR_FLAG_ODRDY                  PWR_CSR1_ODRDY

+#define PWR_FLAG_ODSWRDY                PWR_CSR1_ODSWRDY

+#define PWR_FLAG_UDRDY                  PWR_CSR1_UDSWRDY

+/**

+  * @}

+  */

+	

+/** @defgroup PWREx_Wakeup_Pins_Flag PWREx Wake Up Pin Flags

+  * @{

+  */

+#define PWR_WAKEUP_PIN_FLAG1            PWR_CSR2_WUPF1

+#define PWR_WAKEUP_PIN_FLAG2            PWR_CSR2_WUPF2

+#define PWR_WAKEUP_PIN_FLAG3            PWR_CSR2_WUPF3

+#define PWR_WAKEUP_PIN_FLAG4            PWR_CSR2_WUPF4

+#define PWR_WAKEUP_PIN_FLAG5            PWR_CSR2_WUPF5

+#define PWR_WAKEUP_PIN_FLAG6            PWR_CSR2_WUPF6

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup PWREx_Exported_Macro PWREx Exported Macro

+  *  @{

+  */

+/** @brief Macros to enable or disable the Over drive mode.

+  */

+#define __HAL_PWR_OVERDRIVE_ENABLE() (PWR->CR1 |= (uint32_t)PWR_CR1_ODEN)

+#define __HAL_PWR_OVERDRIVE_DISABLE() (PWR->CR1 &= (uint32_t)(~PWR_CR1_ODEN))

+

+/** @brief Macros to enable or disable the Over drive switching.

+  */

+#define __HAL_PWR_OVERDRIVESWITCHING_ENABLE() (PWR->CR1 |= (uint32_t)PWR_CR1_ODSWEN)

+#define __HAL_PWR_OVERDRIVESWITCHING_DISABLE() (PWR->CR1 &= (uint32_t)(~PWR_CR1_ODSWEN))

+

+/** @brief Macros to enable or disable the Under drive mode.

+  * @note  This mode is enabled only with STOP low power mode.

+  *        In this mode, the 1.2V domain is preserved in reduced leakage mode. This 

+  *        mode is only available when the main regulator or the low power regulator 

+  *        is in low voltage mode.      

+  * @note  If the Under-drive mode was enabled, it is automatically disabled after 

+  *        exiting Stop mode. 

+  *        When the voltage regulator operates in Under-drive mode, an additional  

+  *        startup delay is induced when waking up from Stop mode.

+  */

+#define __HAL_PWR_UNDERDRIVE_ENABLE() (PWR->CR1 |= (uint32_t)PWR_CR1_UDEN)

+#define __HAL_PWR_UNDERDRIVE_DISABLE() (PWR->CR1 &= (uint32_t)(~PWR_CR1_UDEN))

+

+/** @brief  Check PWR flag is set or not.

+  * @param  __FLAG__: specifies the flag to check.

+  *         This parameter can be one of the following values:

+  *            @arg PWR_FLAG_ODRDY: This flag indicates that the Over-drive mode

+  *                                 is ready 

+  *            @arg PWR_FLAG_ODSWRDY: This flag indicates that the Over-drive mode

+  *                                   switching is ready  

+  *            @arg PWR_FLAG_UDRDY: This flag indicates that the Under-drive mode

+  *                                 is enabled in Stop mode

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define __HAL_PWR_GET_ODRUDR_FLAG(__FLAG__) ((PWR->CSR1 & (__FLAG__)) == (__FLAG__))

+

+/** @brief Clear the Under-Drive Ready flag.

+  */

+#define __HAL_PWR_CLEAR_ODRUDR_FLAG() (PWR->CSR1 |= PWR_FLAG_UDRDY)

+

+/** @brief  Check Wake Up flag is set or not.

+  * @param  __WUFLAG__: specifies the Wake Up flag to check.

+  *          This parameter can be one of the following values:

+  *            @arg PWR_WAKEUP_PIN_FLAG1: Wakeup Pin Flag for PA0

+  *            @arg PWR_WAKEUP_PIN_FLAG2: Wakeup Pin Flag for PA2

+  *            @arg PWR_WAKEUP_PIN_FLAG3: Wakeup Pin Flag for PC1

+  *            @arg PWR_WAKEUP_PIN_FLAG4: Wakeup Pin Flag for PC13

+  *            @arg PWR_WAKEUP_PIN_FLAG5: Wakeup Pin Flag for PI8

+  *            @arg PWR_WAKEUP_PIN_FLAG6: Wakeup Pin Flag for PI11          

+  */

+#define __HAL_PWR_GET_WAKEUP_FLAG(__WUFLAG__) (PWR->CSR2 & (__WUFLAG__))

+

+/** @brief  Clear the WakeUp pins flags.

+  * @param  __WUFLAG__: specifies the Wake Up pin flag to clear.

+  *          This parameter can be one of the following values:

+  *            @arg PWR_WAKEUP_PIN_FLAG1: Wakeup Pin Flag for PA0

+  *            @arg PWR_WAKEUP_PIN_FLAG2: Wakeup Pin Flag for PA2

+  *            @arg PWR_WAKEUP_PIN_FLAG3: Wakeup Pin Flag for PC1

+  *            @arg PWR_WAKEUP_PIN_FLAG4: Wakeup Pin Flag for PC13

+  *            @arg PWR_WAKEUP_PIN_FLAG5: Wakeup Pin Flag for PI8

+  *            @arg PWR_WAKEUP_PIN_FLAG6: Wakeup Pin Flag for PI11          

+  */

+#define __HAL_PWR_CLEAR_WAKEUP_FLAG(__WUFLAG__) (PWR->CR2 |=  (__WUFLAG__))

+/**

+  * @}

+  */

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup PWREx_Exported_Functions PWREx Exported Functions

+  *  @{

+  */

+ 

+/** @addtogroup PWREx_Exported_Functions_Group1

+  * @{

+  */

+uint32_t HAL_PWREx_GetVoltageRange(void);

+HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling);

+

+void HAL_PWREx_EnableFlashPowerDown(void);

+void HAL_PWREx_DisableFlashPowerDown(void); 

+HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg(void);

+HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg(void); 

+

+void HAL_PWREx_EnableMainRegulatorLowVoltage(void);

+void HAL_PWREx_DisableMainRegulatorLowVoltage(void);

+void HAL_PWREx_EnableLowRegulatorLowVoltage(void);

+void HAL_PWREx_DisableLowRegulatorLowVoltage(void);

+

+HAL_StatusTypeDef HAL_PWREx_EnableOverDrive(void);

+HAL_StatusTypeDef HAL_PWREx_DisableOverDrive(void);

+HAL_StatusTypeDef HAL_PWREx_EnterUnderDriveSTOPMode(uint32_t Regulator, uint8_t STOPEntry);

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup PWREx_Private_Macros PWREx Private Macros

+  * @{

+  */

+

+/** @defgroup PWREx_IS_PWR_Definitions PWREx Private macros to check input parameters

+  * @{

+  */

+#define IS_PWR_REGULATOR_UNDERDRIVE(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_UNDERDRIVE_ON) || \

+                                                ((REGULATOR) == PWR_LOWPOWERREGULATOR_UNDERDRIVE_ON))

+#define IS_PWR_WAKEUP_PIN(__PIN__)         (((__PIN__) == PWR_WAKEUP_PIN1)       || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN2)       || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN3)       || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN4)       || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN5)       || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN6)  		 || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN1_HIGH)  || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN2_HIGH)  || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN3_HIGH)  || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN4_HIGH)  || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN5_HIGH)  || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN6_HIGH)  || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN1_LOW)   || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN2_LOW)   || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN3_LOW)   || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN4_LOW)   || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN5_LOW)	 || \

+                                            ((__PIN__) == PWR_WAKEUP_PIN6_LOW))

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+

+#endif /* __STM32F7xx_HAL_PWR_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_qspi.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_qspi.h
new file mode 100644
index 0000000..d45be94
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_qspi.h
@@ -0,0 +1,786 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_qspi.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of QSPI HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************  

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_QSPI_H

+#define __STM32F7xx_HAL_QSPI_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup QSPI

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup QSPI_Exported_Types QSPI Exported Types

+  * @{

+  */

+  

+/** 

+  * @brief  QSPI Init structure definition  

+  */

+

+typedef struct

+{

+  uint32_t ClockPrescaler;     /* Specifies the prescaler factor for generating clock based on the AHB clock.

+                                  This parameter can be a number between 0 and 255 */ 

+                                  

+  uint32_t FifoThreshold;      /* Specifies the threshold number of bytes in the FIFO (used only in indirect mode)

+                                  This parameter can be a value between 1 and 32 */

+                                  

+  uint32_t SampleShifting;     /* Specifies the Sample Shift. The data is sampled 1/2 clock cycle delay later to 

+                                  take in account external signal delays. (It should be QSPI_SAMPLE_SHIFTING_NONE in DDR mode)

+                                  This parameter can be a value of @ref QSPI_SampleShifting */

+                                  

+  uint32_t FlashSize;          /* Specifies the Flash Size. FlashSize+1 is effectively the number of address bits 

+                                  required to address the flash memory. The flash capacity can be up to 4GB 

+                                  (addressed using 32 bits) in indirect mode, but the addressable space in 

+                                  memory-mapped mode is limited to 256MB

+                                  This parameter can be a number between 0 and 31 */

+                                  

+  uint32_t ChipSelectHighTime; /* Specifies the Chip Select High Time. ChipSelectHighTime+1 defines the minimum number 

+                                  of clock cycles which the chip select must remain high between commands.

+                                  This parameter can be a value of @ref QSPI_ChipSelectHighTime */ 

+                                    

+  uint32_t ClockMode;          /* Specifies the Clock Mode. It indicates the level that clock takes between commands.

+                                  This parameter can be a value of @ref QSPI_ClockMode */

+                                 

+  uint32_t FlashID;            /* Specifies the Flash which will be used,

+                                  This parameter can be a value of @ref QSPI_Flash_Select */

+                                 

+  uint32_t DualFlash;          /* Specifies the Dual Flash Mode State

+                                  This parameter can be a value of @ref QSPI_DualFlash_Mode */                                               

+}QSPI_InitTypeDef;

+

+/** 

+  * @brief HAL QSPI State structures definition  

+  */ 

+typedef enum

+{

+  HAL_QSPI_STATE_RESET             = 0x00,    /*!< Peripheral not initialized                            */

+  HAL_QSPI_STATE_READY             = 0x01,    /*!< Peripheral initialized and ready for use              */

+  HAL_QSPI_STATE_BUSY              = 0x02,    /*!< Peripheral in indirect mode and busy                  */ 

+  HAL_QSPI_STATE_BUSY_INDIRECT_TX  = 0x12,    /*!< Peripheral in indirect mode with transmission ongoing */ 

+  HAL_QSPI_STATE_BUSY_INDIRECT_RX  = 0x22,    /*!< Peripheral in indirect mode with reception ongoing    */

+  HAL_QSPI_STATE_BUSY_AUTO_POLLING = 0x42,    /*!< Peripheral in auto polling mode ongoing               */

+  HAL_QSPI_STATE_BUSY_MEM_MAPPED   = 0x82,    /*!< Peripheral in memory mapped mode ongoing              */

+  HAL_QSPI_STATE_ERROR             = 0x04     /*!< Peripheral in error                                   */

+}HAL_QSPI_StateTypeDef;

+

+/** 

+  * @brief  QSPI Handle Structure definition  

+  */  

+typedef struct

+{

+  QUADSPI_TypeDef            *Instance;        /* QSPI registers base address        */

+  QSPI_InitTypeDef           Init;             /* QSPI communication parameters      */

+  uint8_t                    *pTxBuffPtr;      /* Pointer to QSPI Tx transfer Buffer */

+  __IO uint16_t              TxXferSize;       /* QSPI Tx Transfer size              */

+  __IO uint16_t              TxXferCount;      /* QSPI Tx Transfer Counter           */

+  uint8_t                    *pRxBuffPtr;      /* Pointer to QSPI Rx transfer Buffer */

+  __IO uint16_t              RxXferSize;       /* QSPI Rx Transfer size              */

+  __IO uint16_t              RxXferCount;      /* QSPI Rx Transfer Counter           */

+  DMA_HandleTypeDef          *hdma;            /* QSPI Rx/Tx DMA Handle parameters   */

+  __IO HAL_LockTypeDef       Lock;             /* Locking object                     */

+  __IO HAL_QSPI_StateTypeDef State;            /* QSPI communication state           */

+  __IO uint32_t              ErrorCode;        /* QSPI Error code                    */

+  uint32_t                   Timeout;          /* Timeout for the QSPI memory access */ 

+}QSPI_HandleTypeDef;

+

+/** 

+  * @brief  QSPI Command structure definition  

+  */

+typedef struct

+{

+  uint32_t Instruction;        /* Specifies the Instruction to be sent

+                                  This parameter can be a value (8-bit) between 0x00 and 0xFF */

+  uint32_t Address;            /* Specifies the Address to be sent (Size from 1 to 4 bytes according AddressSize)

+                                  This parameter can be a value (32-bits) between 0x0 and 0xFFFFFFFF */

+  uint32_t AlternateBytes;     /* Specifies the Alternate Bytes to be sent (Size from 1 to 4 bytes according AlternateBytesSize)

+                                  This parameter can be a value (32-bits) between 0x0 and 0xFFFFFFFF */

+  uint32_t AddressSize;        /* Specifies the Address Size

+                                  This parameter can be a value of @ref QSPI_AddressSize */

+  uint32_t AlternateBytesSize; /* Specifies the Alternate Bytes Size

+                                  This parameter can be a value of @ref QSPI_AlternateBytesSize */

+  uint32_t DummyCycles;        /* Specifies the Number of Dummy Cycles.

+                                  This parameter can be a number between 0 and 31 */

+  uint32_t InstructionMode;    /* Specifies the Instruction Mode

+                                  This parameter can be a value of @ref QSPI_InstructionMode */

+  uint32_t AddressMode;        /* Specifies the Address Mode

+                                  This parameter can be a value of @ref QSPI_AddressMode */

+  uint32_t AlternateByteMode;  /* Specifies the Alternate Bytes Mode

+                                  This parameter can be a value of @ref QSPI_AlternateBytesMode */

+  uint32_t DataMode;           /* Specifies the Data Mode (used for dummy cycles and data phases)

+                                  This parameter can be a value of @ref QSPI_DataMode */

+  uint32_t NbData;             /* Specifies the number of data to transfer. 

+                                  This parameter can be any value between 0 and 0xFFFFFFFF (0 means undefined length 

+                                  until end of memory)*/

+  uint32_t DdrMode;            /* Specifies the double data rate mode for address, alternate byte and data phase

+                                  This parameter can be a value of @ref QSPI_DdrMode */

+  uint32_t DdrHoldHalfCycle;   /* Specifies the DDR hold half cycle. It delays the data output by one half of 

+                                  system clock in DDR mode.

+                                  This parameter can be a value of @ref QSPI_DdrHoldHalfCycle */

+  uint32_t SIOOMode;          /* Specifies the send instruction only once mode

+                                  This parameter can be a value of @ref QSPI_SIOOMode */

+}QSPI_CommandTypeDef;

+

+/** 

+  * @brief  QSPI Auto Polling mode configuration structure definition  

+  */

+typedef struct

+{

+  uint32_t Match;              /* Specifies the value to be compared with the masked status register to get a match.

+                                  This parameter can be any value between 0 and 0xFFFFFFFF */

+  uint32_t Mask;               /* Specifies the mask to be applied to the status bytes received. 

+                                  This parameter can be any value between 0 and 0xFFFFFFFF */

+  uint32_t Interval;           /* Specifies the number of clock cycles between two read during automatic polling phases.

+                                  This parameter can be any value between 0 and 0xFFFF */

+  uint32_t StatusBytesSize;    /* Specifies the size of the status bytes received.

+                                  This parameter can be any value between 1 and 4 */

+  uint32_t MatchMode;          /* Specifies the method used for determining a match.

+                                  This parameter can be a value of @ref QSPI_MatchMode */

+  uint32_t AutomaticStop;      /* Specifies if automatic polling is stopped after a match.

+                                  This parameter can be a value of @ref QSPI_AutomaticStop */

+}QSPI_AutoPollingTypeDef;

+                           

+/** 

+  * @brief  QSPI Memory Mapped mode configuration structure definition  

+  */

+typedef struct

+{

+  uint32_t TimeOutPeriod;      /* Specifies the number of clock to wait when the FIFO is full before to release the chip select.

+                                  This parameter can be any value between 0 and 0xFFFF */

+  uint32_t TimeOutActivation;  /* Specifies if the time out counter is enabled to release the chip select. 

+                                  This parameter can be a value of @ref QSPI_TimeOutActivation */

+}QSPI_MemoryMappedTypeDef;                                     

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup QSPI_Exported_Constants QSPI Exported Constants

+  * @{

+  */

+/** @defgroup QSPI_ErrorCode QSPI Error Code

+  * @{

+  */ 

+#define HAL_QSPI_ERROR_NONE            ((uint32_t)0x00000000) /*!< No error           */

+#define HAL_QSPI_ERROR_TIMEOUT         ((uint32_t)0x00000001) /*!< Timeout error      */

+#define HAL_QSPI_ERROR_TRANSFER        ((uint32_t)0x00000002) /*!< Transfer error     */

+#define HAL_QSPI_ERROR_DMA             ((uint32_t)0x00000004) /*!< DMA transfer error */

+/**

+  * @}

+  */ 

+  

+/** @defgroup QSPI_SampleShifting QSPI Sample Shifting

+  * @{

+  */

+#define QSPI_SAMPLE_SHIFTING_NONE           ((uint32_t)0x00000000)        /*!<No clock cycle shift to sample data*/

+#define QSPI_SAMPLE_SHIFTING_HALFCYCLE      ((uint32_t)QUADSPI_CR_SSHIFT) /*!<1/2 clock cycle shift to sample data*/

+/**

+  * @}

+  */ 

+

+/** @defgroup QSPI_ChipSelectHighTime QSPI Chip Select High Time

+  * @{

+  */

+#define QSPI_CS_HIGH_TIME_1_CYCLE           ((uint32_t)0x00000000)                              /*!<nCS stay high for at least 1 clock cycle between commands*/

+#define QSPI_CS_HIGH_TIME_2_CYCLE           ((uint32_t)QUADSPI_DCR_CSHT_0)                      /*!<nCS stay high for at least 2 clock cycles between commands*/

+#define QSPI_CS_HIGH_TIME_3_CYCLE           ((uint32_t)QUADSPI_DCR_CSHT_1)                      /*!<nCS stay high for at least 3 clock cycles between commands*/

+#define QSPI_CS_HIGH_TIME_4_CYCLE           ((uint32_t)QUADSPI_DCR_CSHT_0 | QUADSPI_DCR_CSHT_1) /*!<nCS stay high for at least 4 clock cycles between commands*/

+#define QSPI_CS_HIGH_TIME_5_CYCLE           ((uint32_t)QUADSPI_DCR_CSHT_2)                      /*!<nCS stay high for at least 5 clock cycles between commands*/

+#define QSPI_CS_HIGH_TIME_6_CYCLE           ((uint32_t)QUADSPI_DCR_CSHT_2 | QUADSPI_DCR_CSHT_0) /*!<nCS stay high for at least 6 clock cycles between commands*/

+#define QSPI_CS_HIGH_TIME_7_CYCLE           ((uint32_t)QUADSPI_DCR_CSHT_2 | QUADSPI_DCR_CSHT_1) /*!<nCS stay high for at least 7 clock cycles between commands*/

+#define QSPI_CS_HIGH_TIME_8_CYCLE           ((uint32_t)QUADSPI_DCR_CSHT)                        /*!<nCS stay high for at least 8 clock cycles between commands*/

+/**

+  * @}

+  */

+

+/** @defgroup QSPI_ClockMode QSPI Clock Mode

+  * @{

+  */

+#define QSPI_CLOCK_MODE_0                   ((uint32_t)0x00000000)         /*!<Clk stays low while nCS is released*/

+#define QSPI_CLOCK_MODE_3                   ((uint32_t)QUADSPI_DCR_CKMODE) /*!<Clk goes high while nCS is released*/

+/**

+  * @}

+  */

+  

+/** @defgroup QSPI_Flash_Select QSPI Flash Select

+  * @{

+  */

+#define QSPI_FLASH_ID_1           ((uint32_t)0x00000000)

+#define QSPI_FLASH_ID_2           ((uint32_t)QUADSPI_CR_FSEL)

+/**

+  * @}

+  */  

+

+  /** @defgroup QSPI_DualFlash_Mode  QSPI Dual Flash Mode

+  * @{

+  */

+#define QSPI_DUALFLASH_ENABLE            ((uint32_t)QUADSPI_CR_DFM)

+#define QSPI_DUALFLASH_DISABLE           ((uint32_t)0x00000000) 

+/**

+  * @}

+  */ 

+

+/** @defgroup QSPI_AddressSize QSPI Address Size 

+  * @{

+  */

+#define QSPI_ADDRESS_8_BITS            ((uint32_t)0x00000000)           /*!<8-bit address*/

+#define QSPI_ADDRESS_16_BITS           ((uint32_t)QUADSPI_CCR_ADSIZE_0) /*!<16-bit address*/

+#define QSPI_ADDRESS_24_BITS           ((uint32_t)QUADSPI_CCR_ADSIZE_1) /*!<24-bit address*/

+#define QSPI_ADDRESS_32_BITS           ((uint32_t)QUADSPI_CCR_ADSIZE)   /*!<32-bit address*/

+/**

+  * @}

+  */  

+

+/** @defgroup QSPI_AlternateBytesSize QSPI Alternate Bytes Size

+  * @{

+  */

+#define QSPI_ALTERNATE_BYTES_8_BITS    ((uint32_t)0x00000000)           /*!<8-bit alternate bytes*/

+#define QSPI_ALTERNATE_BYTES_16_BITS   ((uint32_t)QUADSPI_CCR_ABSIZE_0) /*!<16-bit alternate bytes*/

+#define QSPI_ALTERNATE_BYTES_24_BITS   ((uint32_t)QUADSPI_CCR_ABSIZE_1) /*!<24-bit alternate bytes*/

+#define QSPI_ALTERNATE_BYTES_32_BITS   ((uint32_t)QUADSPI_CCR_ABSIZE)   /*!<32-bit alternate bytes*/

+/**

+  * @}

+  */

+

+/** @defgroup QSPI_InstructionMode QSPI Instruction Mode

+* @{

+*/

+#define QSPI_INSTRUCTION_NONE          ((uint32_t)0x00000000)          /*!<No instruction*/

+#define QSPI_INSTRUCTION_1_LINE        ((uint32_t)QUADSPI_CCR_IMODE_0) /*!<Instruction on a single line*/

+#define QSPI_INSTRUCTION_2_LINES       ((uint32_t)QUADSPI_CCR_IMODE_1) /*!<Instruction on two lines*/

+#define QSPI_INSTRUCTION_4_LINES       ((uint32_t)QUADSPI_CCR_IMODE)   /*!<Instruction on four lines*/

+/**

+  * @}

+  */

+

+/** @defgroup QSPI_AddressMode QSPI Address Mode

+* @{

+*/

+#define QSPI_ADDRESS_NONE              ((uint32_t)0x00000000)           /*!<No address*/

+#define QSPI_ADDRESS_1_LINE            ((uint32_t)QUADSPI_CCR_ADMODE_0) /*!<Address on a single line*/

+#define QSPI_ADDRESS_2_LINES           ((uint32_t)QUADSPI_CCR_ADMODE_1) /*!<Address on two lines*/

+#define QSPI_ADDRESS_4_LINES           ((uint32_t)QUADSPI_CCR_ADMODE)   /*!<Address on four lines*/

+/**

+  * @}

+  */  

+

+/** @defgroup QSPI_AlternateBytesMode  QSPI Alternate Bytes Mode

+* @{                                  

+*/

+#define QSPI_ALTERNATE_BYTES_NONE      ((uint32_t)0x00000000)           /*!<No alternate bytes*/

+#define QSPI_ALTERNATE_BYTES_1_LINE    ((uint32_t)QUADSPI_CCR_ABMODE_0) /*!<Alternate bytes on a single line*/

+#define QSPI_ALTERNATE_BYTES_2_LINES   ((uint32_t)QUADSPI_CCR_ABMODE_1) /*!<Alternate bytes on two lines*/

+#define QSPI_ALTERNATE_BYTES_4_LINES   ((uint32_t)QUADSPI_CCR_ABMODE)   /*!<Alternate bytes on four lines*/

+/**

+  * @}

+  */  

+

+/** @defgroup QSPI_DataMode QSPI Data Mode

+  * @{

+  */

+#define QSPI_DATA_NONE                 ((uint32_t)0X00000000)           /*!<No data*/

+#define QSPI_DATA_1_LINE               ((uint32_t)QUADSPI_CCR_DMODE_0) /*!<Data on a single line*/

+#define QSPI_DATA_2_LINES              ((uint32_t)QUADSPI_CCR_DMODE_1) /*!<Data on two lines*/

+#define QSPI_DATA_4_LINES              ((uint32_t)QUADSPI_CCR_DMODE)   /*!<Data on four lines*/

+/**

+  * @}

+  */  

+

+/** @defgroup QSPI_DdrMode QSPI Ddr Mode

+  * @{

+  */

+#define QSPI_DDR_MODE_DISABLE              ((uint32_t)0x00000000)       /*!<Double data rate mode disabled*/

+#define QSPI_DDR_MODE_ENABLE               ((uint32_t)QUADSPI_CCR_DDRM) /*!<Double data rate mode enabled*/

+/**

+  * @}

+  */

+

+/** @defgroup QSPI_DdrHoldHalfCycle QSPI Ddr HoldHalfCycle

+  * @{

+  */

+#define QSPI_DDR_HHC_ANALOG_DELAY           ((uint32_t)0x00000000)       /*!<Delay the data output using analog delay in DDR mode*/

+#define QSPI_DDR_HHC_HALF_CLK_DELAY         ((uint32_t)QUADSPI_CCR_DHHC) /*!<Delay the data output by 1/2 clock cycle in DDR mode*/

+/**

+  * @}

+  */

+

+/** @defgroup QSPI_SIOOMode QSPI SIOO Mode

+  * @{

+  */

+#define QSPI_SIOO_INST_EVERY_CMD       ((uint32_t)0x00000000)       /*!<Send instruction on every transaction*/

+#define QSPI_SIOO_INST_ONLY_FIRST_CMD  ((uint32_t)QUADSPI_CCR_SIOO) /*!<Send instruction only for the first command*/

+/**

+  * @}

+  */

+

+/** @defgroup QSPI_MatchMode QSPI Match Mode

+  * @{

+  */

+#define QSPI_MATCH_MODE_AND                 ((uint32_t)0x00000000)     /*!<AND match mode between unmasked bits*/

+#define QSPI_MATCH_MODE_OR                  ((uint32_t)QUADSPI_CR_PMM) /*!<OR match mode between unmasked bits*/

+/**

+  * @}

+  */  

+

+/** @defgroup QSPI_AutomaticStop QSPI Automatic Stop

+  * @{

+  */

+#define QSPI_AUTOMATIC_STOP_DISABLE        ((uint32_t)0x00000000)      /*!<AutoPolling stops only with abort or QSPI disabling*/

+#define QSPI_AUTOMATIC_STOP_ENABLE         ((uint32_t)QUADSPI_CR_APMS) /*!<AutoPolling stops as soon as there is a match*/

+/**

+  * @}

+  */  

+

+/** @defgroup QSPI_TimeOutActivation QSPI TimeOut Activation

+  * @{

+  */

+#define QSPI_TIMEOUT_COUNTER_DISABLE       ((uint32_t)0x00000000)      /*!<Timeout counter disabled, nCS remains active*/

+#define QSPI_TIMEOUT_COUNTER_ENABLE        ((uint32_t)QUADSPI_CR_TCEN) /*!<Timeout counter enabled, nCS released when timeout expires*/

+/**

+  * @}

+  */  

+

+/** @defgroup QSPI_Flags  QSPI Flags

+  * @{

+  */

+#define QSPI_FLAG_BUSY                      QUADSPI_SR_BUSY /*!<Busy flag: operation is ongoing*/

+#define QSPI_FLAG_TO                        QUADSPI_SR_TOF  /*!<Timeout flag: timeout occurs in memory-mapped mode*/

+#define QSPI_FLAG_SM                        QUADSPI_SR_SMF  /*!<Status match flag: received data matches in autopolling mode*/

+#define QSPI_FLAG_FT                        QUADSPI_SR_FTF  /*!<Fifo threshold flag: Fifo threshold reached or data left after read from memory is complete*/

+#define QSPI_FLAG_TC                        QUADSPI_SR_TCF  /*!<Transfer complete flag: programmed number of data have been transferred or the transfer has been aborted*/

+#define QSPI_FLAG_TE                        QUADSPI_SR_TEF  /*!<Transfer error flag: invalid address is being accessed*/

+/**

+  * @}

+  */

+

+/** @defgroup QSPI_Interrupts  QSPI Interrupts

+  * @{

+  */  

+#define QSPI_IT_TO                          QUADSPI_CR_TOIE /*!<Interrupt on the timeout flag*/

+#define QSPI_IT_SM                          QUADSPI_CR_SMIE /*!<Interrupt on the status match flag*/

+#define QSPI_IT_FT                          QUADSPI_CR_FTIE /*!<Interrupt on the fifo threshold flag*/

+#define QSPI_IT_TC                          QUADSPI_CR_TCIE /*!<Interrupt on the transfer complete flag*/

+#define QSPI_IT_TE                          QUADSPI_CR_TEIE /*!<Interrupt on the transfer error flag*/

+/**

+  * @}

+  */

+

+/** @defgroup QSPI_Timeout_definition QSPI Timeout definition

+  * @{

+  */ 

+#define HAL_QPSI_TIMEOUT_DEFAULT_VALUE ((uint32_t)5000)/* 5 s */

+/**

+  * @}

+  */  

+    

+/**

+  * @}

+  */

+

+/* Exported macros -----------------------------------------------------------*/

+/** @defgroup QSPI_Exported_Macros QSPI Exported Macros

+  * @{

+  */

+

+/** @brief Reset QSPI handle state

+  * @param  __HANDLE__: QSPI handle.

+  * @retval None

+  */

+#define __HAL_QSPI_RESET_HANDLE_STATE(__HANDLE__)           ((__HANDLE__)->State = HAL_QSPI_STATE_RESET)

+

+/** @brief  Enable QSPI

+  * @param  __HANDLE__: specifies the QSPI Handle.

+  * @retval None

+  */ 

+#define __HAL_QSPI_ENABLE(__HANDLE__)                       SET_BIT((__HANDLE__)->Instance->CR, QUADSPI_CR_EN)

+

+/** @brief  Disable QSPI

+  * @param  __HANDLE__: specifies the QSPI Handle.

+  * @retval None

+  */

+#define __HAL_QSPI_DISABLE(__HANDLE__)                      CLEAR_BIT((__HANDLE__)->Instance->CR, QUADSPI_CR_EN)

+

+/** @brief  Enables the specified QSPI interrupt.

+  * @param  __HANDLE__: specifies the QSPI Handle.

+  * @param  __INTERRUPT__: specifies the QSPI interrupt source to enable.

+  *          This parameter can be one of the following values:

+  *            @arg QSPI_IT_TO: QSPI Time out interrupt

+  *            @arg QSPI_IT_SM: QSPI Status match interrupt

+  *            @arg QSPI_IT_FT: QSPI FIFO threshold interrupt

+  *            @arg QSPI_IT_TC: QSPI Transfer complete interrupt

+  *            @arg QSPI_IT_TE: QSPI Transfer error interrupt

+  * @retval None

+  */

+#define __HAL_QSPI_ENABLE_IT(__HANDLE__, __INTERRUPT__)     SET_BIT((__HANDLE__)->Instance->CR, (__INTERRUPT__))

+

+

+/** @brief  Disables the specified QSPI interrupt.

+  * @param  __HANDLE__: specifies the QSPI Handle.

+  * @param  __INTERRUPT__: specifies the QSPI interrupt source to disable.

+  *          This parameter can be one of the following values:

+  *            @arg QSPI_IT_TO: QSPI Timeout interrupt

+  *            @arg QSPI_IT_SM: QSPI Status match interrupt

+  *            @arg QSPI_IT_FT: QSPI FIFO threshold interrupt

+  *            @arg QSPI_IT_TC: QSPI Transfer complete interrupt

+  *            @arg QSPI_IT_TE: QSPI Transfer error interrupt

+  * @retval None

+  */

+#define __HAL_QSPI_DISABLE_IT(__HANDLE__, __INTERRUPT__)    CLEAR_BIT((__HANDLE__)->Instance->CR, (__INTERRUPT__))

+

+/** @brief  Checks whether the specified QSPI interrupt source is enabled.

+  * @param  __HANDLE__: specifies the QSPI Handle.

+  * @param  __INTERRUPT__: specifies the QSPI interrupt source to check.

+  *          This parameter can be one of the following values:

+  *            @arg QSPI_IT_TO: QSPI Time out interrupt

+  *            @arg QSPI_IT_SM: QSPI Status match interrupt

+  *            @arg QSPI_IT_FT: QSPI FIFO threshold interrupt

+  *            @arg QSPI_IT_TC: QSPI Transfer complete interrupt

+  *            @arg QSPI_IT_TE: QSPI Transfer error interrupt

+  * @retval The new state of __INTERRUPT__ (TRUE or FALSE).

+  */

+#define __HAL_QSPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (READ_BIT((__HANDLE__)->Instance->CR, (__INTERRUPT__)) == (__INTERRUPT__)) 

+

+/**

+  * @brief  Get the selected QSPI's flag status.

+  * @param  __HANDLE__: specifies the QSPI Handle.

+  * @param  __FLAG__: specifies the QSPI flag to check.

+  *          This parameter can be one of the following values:

+  *            @arg QSPI_FLAG_BUSY: QSPI Busy flag

+  *            @arg QSPI_FLAG_TO:   QSPI Time out flag

+  *            @arg QSPI_FLAG_SM:   QSPI Status match flag

+  *            @arg QSPI_FLAG_FT:   QSPI FIFO threshold flag

+  *            @arg QSPI_FLAG_TC:   QSPI Transfer complete flag

+  *            @arg QSPI_FLAG_TE:   QSPI Transfer error flag

+  * @retval None

+  */

+#define __HAL_QSPI_GET_FLAG(__HANDLE__, __FLAG__)           (READ_BIT((__HANDLE__)->Instance->SR, (__FLAG__)) != 0)

+

+/** @brief  Clears the specified QSPI's flag status.

+  * @param  __HANDLE__: specifies the QSPI Handle.

+  * @param  __FLAG__: specifies the QSPI clear register flag that needs to be set

+  *          This parameter can be one of the following values:

+  *            @arg QSPI_FLAG_TO: QSPI Time out flag

+  *            @arg QSPI_FLAG_SM: QSPI Status match flag

+  *            @arg QSPI_FLAG_TC: QSPI Transfer complete flag

+  *            @arg QSPI_FLAG_TE: QSPI Transfer error flag

+  * @retval None

+  */

+#define __HAL_QSPI_CLEAR_FLAG(__HANDLE__, __FLAG__)         WRITE_REG((__HANDLE__)->Instance->FCR, (__FLAG__))

+/**

+  * @}

+  */

+  

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup QSPI_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup QSPI_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization/de-initialization functions  ********************************/

+HAL_StatusTypeDef     HAL_QSPI_Init     (QSPI_HandleTypeDef *hqspi);

+HAL_StatusTypeDef     HAL_QSPI_DeInit   (QSPI_HandleTypeDef *hqspi);

+void                  HAL_QSPI_MspInit  (QSPI_HandleTypeDef *hqspi);

+void                  HAL_QSPI_MspDeInit(QSPI_HandleTypeDef *hqspi);

+/**

+  * @}

+  */

+

+/** @addtogroup QSPI_Exported_Functions_Group2

+  * @{

+  */  

+/* IO operation functions *****************************************************/

+/* QSPI IRQ handler method */

+void                  HAL_QSPI_IRQHandler(QSPI_HandleTypeDef *hqspi);

+

+/* QSPI indirect mode */

+HAL_StatusTypeDef     HAL_QSPI_Command      (QSPI_HandleTypeDef *hqspi, QSPI_CommandTypeDef *cmd, uint32_t Timeout);

+HAL_StatusTypeDef     HAL_QSPI_Transmit     (QSPI_HandleTypeDef *hqspi, uint8_t *pData, uint32_t Timeout);

+HAL_StatusTypeDef     HAL_QSPI_Receive      (QSPI_HandleTypeDef *hqspi, uint8_t *pData, uint32_t Timeout);

+HAL_StatusTypeDef     HAL_QSPI_Command_IT   (QSPI_HandleTypeDef *hqspi, QSPI_CommandTypeDef *cmd);

+HAL_StatusTypeDef     HAL_QSPI_Transmit_IT  (QSPI_HandleTypeDef *hqspi, uint8_t *pData);

+HAL_StatusTypeDef     HAL_QSPI_Receive_IT   (QSPI_HandleTypeDef *hqspi, uint8_t *pData);

+HAL_StatusTypeDef     HAL_QSPI_Transmit_DMA (QSPI_HandleTypeDef *hqspi, uint8_t *pData);

+HAL_StatusTypeDef     HAL_QSPI_Receive_DMA  (QSPI_HandleTypeDef *hqspi, uint8_t *pData);

+

+/* QSPI status flag polling mode */

+HAL_StatusTypeDef     HAL_QSPI_AutoPolling   (QSPI_HandleTypeDef *hqspi, QSPI_CommandTypeDef *cmd, QSPI_AutoPollingTypeDef *cfg, uint32_t Timeout);

+HAL_StatusTypeDef     HAL_QSPI_AutoPolling_IT(QSPI_HandleTypeDef *hqspi, QSPI_CommandTypeDef *cmd, QSPI_AutoPollingTypeDef *cfg);

+

+/* QSPI memory-mapped mode */

+HAL_StatusTypeDef     HAL_QSPI_MemoryMapped(QSPI_HandleTypeDef *hqspi, QSPI_CommandTypeDef *cmd, QSPI_MemoryMappedTypeDef *cfg);

+/**

+  * @}

+  */

+

+/** @addtogroup QSPI_Exported_Functions_Group3

+  * @{

+  */  

+/* Callback functions in non-blocking modes ***********************************/

+void                  HAL_QSPI_ErrorCallback        (QSPI_HandleTypeDef *hqspi);

+void                  HAL_QSPI_FifoThresholdCallback(QSPI_HandleTypeDef *hqspi);

+

+/* QSPI indirect mode */

+void                  HAL_QSPI_CmdCpltCallback      (QSPI_HandleTypeDef *hqspi);

+void                  HAL_QSPI_RxCpltCallback       (QSPI_HandleTypeDef *hqspi);

+void                  HAL_QSPI_TxCpltCallback       (QSPI_HandleTypeDef *hqspi);

+void                  HAL_QSPI_RxHalfCpltCallback   (QSPI_HandleTypeDef *hqspi);

+void                  HAL_QSPI_TxHalfCpltCallback   (QSPI_HandleTypeDef *hqspi);

+

+/* QSPI status flag polling mode */

+void                  HAL_QSPI_StatusMatchCallback  (QSPI_HandleTypeDef *hqspi);

+

+/* QSPI memory-mapped mode */

+void                  HAL_QSPI_TimeOutCallback      (QSPI_HandleTypeDef *hqspi);

+/**

+  * @}

+  */

+

+/** @addtogroup QSPI_Exported_Functions_Group4

+  * @{

+  */  

+/* Peripheral Control and State functions  ************************************/

+HAL_QSPI_StateTypeDef HAL_QSPI_GetState(QSPI_HandleTypeDef *hqspi);

+uint32_t              HAL_QSPI_GetError(QSPI_HandleTypeDef *hqspi);

+HAL_StatusTypeDef     HAL_QSPI_Abort   (QSPI_HandleTypeDef *hqspi);

+void                  HAL_QSPI_SetTimeout(QSPI_HandleTypeDef *hqspi, uint32_t Timeout);

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */

+  

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup QSPI_Private_Constants QSPI Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup QSPI_Private_Macros QSPI Private Macros

+  * @{

+  */

+/** @defgroup QSPI_ClockPrescaler QSPI Clock Prescaler

+  * @{

+  */ 

+#define IS_QSPI_CLOCK_PRESCALER(PRESCALER)  ((PRESCALER) <= 0xFF)

+/**

+  * @}

+  */

+

+/** @defgroup QSPI_FifoThreshold  QSPI Fifo Threshold 

+  * @{

+  */

+#define IS_QSPI_FIFO_THRESHOLD(THR)         (((THR) > 0) && ((THR) <= 32))

+/**

+  * @}

+  */

+  

+#define IS_QSPI_SSHIFT(SSHIFT)              (((SSHIFT) == QSPI_SAMPLE_SHIFTING_NONE) || \

+                                             ((SSHIFT) == QSPI_SAMPLE_SHIFTING_HALFCYCLE)) 

+

+/** @defgroup QSPI_FlashSize QSPI Flash Size

+  * @{

+  */

+#define IS_QSPI_FLASH_SIZE(FSIZE)           (((FSIZE) <= 31))

+/**

+  * @}

+  */

+  

+#define IS_QSPI_CS_HIGH_TIME(CSHTIME)       (((CSHTIME) == QSPI_CS_HIGH_TIME_1_CYCLE) || \

+                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_2_CYCLE) || \

+                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_3_CYCLE) || \

+                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_4_CYCLE) || \

+                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_5_CYCLE) || \

+                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_6_CYCLE) || \

+                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_7_CYCLE) || \

+                                             ((CSHTIME) == QSPI_CS_HIGH_TIME_8_CYCLE))   

+

+#define IS_QSPI_CLOCK_MODE(CLKMODE)         (((CLKMODE) == QSPI_CLOCK_MODE_0) || \

+                                             ((CLKMODE) == QSPI_CLOCK_MODE_3))

+

+#define IS_QSPI_FLASH_ID(FLA)    (((FLA) == QSPI_FLASH_ID_1) || \

+                                  ((FLA) == QSPI_FLASH_ID_2)) 

+                                  

+#define IS_QSPI_DUAL_FLASH_MODE(MODE)    (((MODE) == QSPI_DUALFLASH_ENABLE) || \

+                                          ((MODE) == QSPI_DUALFLASH_DISABLE))

+                                          

+  

+/** @defgroup QSPI_Instruction QSPI Instruction

+  * @{

+  */

+#define IS_QSPI_INSTRUCTION(INSTRUCTION)    ((INSTRUCTION) <= 0xFF) 

+/**

+  * @}

+  */ 

+

+#define IS_QSPI_ADDRESS_SIZE(ADDR_SIZE)     (((ADDR_SIZE) == QSPI_ADDRESS_8_BITS)  || \

+                                             ((ADDR_SIZE) == QSPI_ADDRESS_16_BITS) || \

+                                             ((ADDR_SIZE) == QSPI_ADDRESS_24_BITS) || \

+                                             ((ADDR_SIZE) == QSPI_ADDRESS_32_BITS))

+

+#define IS_QSPI_ALTERNATE_BYTES_SIZE(SIZE)  (((SIZE) == QSPI_ALTERNATE_BYTES_8_BITS)  || \

+                                             ((SIZE) == QSPI_ALTERNATE_BYTES_16_BITS) || \

+                                             ((SIZE) == QSPI_ALTERNATE_BYTES_24_BITS) || \

+                                             ((SIZE) == QSPI_ALTERNATE_BYTES_32_BITS))                                               

+

+

+/** @defgroup QSPI_DummyCycles QSPI Dummy Cycles

+  * @{

+  */

+#define IS_QSPI_DUMMY_CYCLES(DCY)           ((DCY) <= 31) 

+/**

+  * @}

+  */

+

+#define IS_QSPI_INSTRUCTION_MODE(MODE)      (((MODE) == QSPI_INSTRUCTION_NONE)    || \

+                                             ((MODE) == QSPI_INSTRUCTION_1_LINE)  || \

+                                             ((MODE) == QSPI_INSTRUCTION_2_LINES) || \

+                                             ((MODE) == QSPI_INSTRUCTION_4_LINES))  

+

+#define IS_QSPI_ADDRESS_MODE(MODE)          (((MODE) == QSPI_ADDRESS_NONE)    || \

+                                             ((MODE) == QSPI_ADDRESS_1_LINE)  || \

+                                             ((MODE) == QSPI_ADDRESS_2_LINES) || \

+                                             ((MODE) == QSPI_ADDRESS_4_LINES))

+

+#define IS_QSPI_ALTERNATE_BYTES_MODE(MODE)  (((MODE) == QSPI_ALTERNATE_BYTES_NONE)    || \

+                                             ((MODE) == QSPI_ALTERNATE_BYTES_1_LINE)  || \

+                                             ((MODE) == QSPI_ALTERNATE_BYTES_2_LINES) || \

+                                             ((MODE) == QSPI_ALTERNATE_BYTES_4_LINES))

+

+#define IS_QSPI_DATA_MODE(MODE)             (((MODE) == QSPI_DATA_NONE)    || \

+                                             ((MODE) == QSPI_DATA_1_LINE)  || \

+                                             ((MODE) == QSPI_DATA_2_LINES) || \

+                                             ((MODE) == QSPI_DATA_4_LINES))

+

+#define IS_QSPI_DDR_MODE(DDR_MODE)          (((DDR_MODE) == QSPI_DDR_MODE_DISABLE) || \

+                                             ((DDR_MODE) == QSPI_DDR_MODE_ENABLE))

+

+#define IS_QSPI_DDR_HHC(DDR_HHC)            (((DDR_HHC) == QSPI_DDR_HHC_ANALOG_DELAY) || \

+                                             ((DDR_HHC) == QSPI_DDR_HHC_HALF_CLK_DELAY))

+

+#define IS_QSPI_SIOO_MODE(SIOO_MODE)      (((SIOO_MODE) == QSPI_SIOO_INST_EVERY_CMD) || \

+                                             ((SIOO_MODE) == QSPI_SIOO_INST_ONLY_FIRST_CMD))

+

+/** @defgroup QSPI_Interval QSPI Interval 

+  * @{

+  */

+#define IS_QSPI_INTERVAL(INTERVAL)        ((INTERVAL) <= QUADSPI_PIR_INTERVAL) 

+/**

+  * @}

+  */

+

+/** @defgroup QSPI_StatusBytesSize QSPI Status Bytes Size

+  * @{

+  */

+#define IS_QSPI_STATUS_BYTES_SIZE(SIZE)   (((SIZE) >= 1) && ((SIZE) <= 4)) 

+/**

+  * @}

+  */

+#define IS_QSPI_MATCH_MODE(MODE)            (((MODE) == QSPI_MATCH_MODE_AND) || \

+                                             ((MODE) == QSPI_MATCH_MODE_OR)) 

+                                             

+#define IS_QSPI_AUTOMATIC_STOP(APMS)        (((APMS) == QSPI_AUTOMATIC_STOP_DISABLE) || \

+                                             ((APMS) == QSPI_AUTOMATIC_STOP_ENABLE))                                                                                                                                                                                                                                    

+

+#define IS_QSPI_TIMEOUT_ACTIVATION(TCEN)    (((TCEN) == QSPI_TIMEOUT_COUNTER_DISABLE) || \

+                                             ((TCEN) == QSPI_TIMEOUT_COUNTER_ENABLE)) 

+

+/** @defgroup QSPI_TimeOutPeriod  QSPI TimeOut Period

+  * @{

+  */

+#define IS_QSPI_TIMEOUT_PERIOD(PERIOD)      ((PERIOD) <= 0xFFFF) 

+/**

+  * @}

+  */

+

+#define IS_QSPI_GET_FLAG(FLAG)              (((FLAG) == QSPI_FLAG_BUSY) || \

+                                             ((FLAG) == QSPI_FLAG_TO)   || \

+                                             ((FLAG) == QSPI_FLAG_SM)   || \

+                                             ((FLAG) == QSPI_FLAG_FT)   || \

+                                             ((FLAG) == QSPI_FLAG_TC)   || \

+                                             ((FLAG) == QSPI_FLAG_TE))    

+

+#define IS_QSPI_IT(IT)                      ((((IT) & (uint32_t)0xFFE0FFFF) == 0x00000000) && ((IT) != 0x00000000))

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup QSPI_Private_Functions QSPI Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_QSPI_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rcc.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rcc.h
new file mode 100644
index 0000000..4862c8e
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rcc.h
@@ -0,0 +1,1304 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_rcc.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of RCC HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_RCC_H

+#define __STM32F7xx_HAL_RCC_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup RCC

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/ 

+

+/** @defgroup RCC_Exported_Types RCC Exported Types

+  * @{

+  */

+

+/** 

+  * @brief  RCC PLL configuration structure definition  

+  */

+typedef struct

+{

+  uint32_t PLLState;   /*!< The new state of the PLL.

+                            This parameter can be a value of @ref RCC_PLL_Config                      */

+

+  uint32_t PLLSource;  /*!< RCC_PLLSource: PLL entry clock source.

+                            This parameter must be a value of @ref RCC_PLL_Clock_Source               */           

+

+  uint32_t PLLM;       /*!< PLLM: Division factor for PLL VCO input clock.

+                            This parameter must be a number between Min_Data = 2 and Max_Data = 63    */        

+

+  uint32_t PLLN;       /*!< PLLN: Multiplication factor for PLL VCO output clock.

+                            This parameter must be a number between Min_Data = 192 and Max_Data = 432 */

+

+  uint32_t PLLP;       /*!< PLLP: Division factor for main system clock (SYSCLK).

+                            This parameter must be a value of @ref RCC_PLLP_Clock_Divider             */

+

+  uint32_t PLLQ;       /*!< PLLQ: Division factor for OTG FS, SDMMC and RNG clocks.

+                            This parameter must be a number between Min_Data = 2 and Max_Data = 15    */

+

+}RCC_PLLInitTypeDef;

+

+/**

+  * @brief  RCC Internal/External Oscillator (HSE, HSI, LSE and LSI) configuration structure definition  

+  */

+typedef struct

+{

+  uint32_t OscillatorType;       /*!< The oscillators to be configured.

+                                      This parameter can be a value of @ref RCC_Oscillator_Type                   */

+

+  uint32_t HSEState;             /*!< The new state of the HSE.

+                                      This parameter can be a value of @ref RCC_HSE_Config                        */

+

+  uint32_t LSEState;             /*!< The new state of the LSE.

+                                      This parameter can be a value of @ref RCC_LSE_Config                        */

+                                          

+  uint32_t HSIState;             /*!< The new state of the HSI.

+                                      This parameter can be a value of @ref RCC_HSI_Config                        */

+

+  uint32_t HSICalibrationValue;   /*!< The calibration trimming value (default is RCC_HSICALIBRATION_DEFAULT).

+                                       This parameter must be a number between Min_Data = 0x00 and Max_Data = 0x1F */

+                               

+  uint32_t LSIState;             /*!< The new state of the LSI.

+                                      This parameter can be a value of @ref RCC_LSI_Config                        */

+

+  RCC_PLLInitTypeDef PLL;        /*!< PLL structure parameters                                                    */      

+

+}RCC_OscInitTypeDef;

+

+/**

+  * @brief  RCC System, AHB and APB busses clock configuration structure definition  

+  */

+typedef struct

+{

+  uint32_t ClockType;             /*!< The clock to be configured.

+                                       This parameter can be a value of @ref RCC_System_Clock_Type */

+  

+  uint32_t SYSCLKSource;          /*!< The clock source (SYSCLKS) used as system clock.

+                                       This parameter can be a value of @ref RCC_System_Clock_Source    */

+

+  uint32_t AHBCLKDivider;         /*!< The AHB clock (HCLK) divider. This clock is derived from the system clock (SYSCLK).

+                                       This parameter can be a value of @ref RCC_AHB_Clock_Source       */

+

+  uint32_t APB1CLKDivider;        /*!< The APB1 clock (PCLK1) divider. This clock is derived from the AHB clock (HCLK).

+                                       This parameter can be a value of @ref RCC_APB1_APB2_Clock_Source */

+

+  uint32_t APB2CLKDivider;        /*!< The APB2 clock (PCLK2) divider. This clock is derived from the AHB clock (HCLK).

+                                       This parameter can be a value of @ref RCC_APB1_APB2_Clock_Source */

+

+}RCC_ClkInitTypeDef;

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup RCC_Exported_Constants RCC Exported Constants

+  * @{

+  */

+

+/** @defgroup RCC_Oscillator_Type Oscillator Type

+  * @{

+  */

+#define RCC_OSCILLATORTYPE_NONE            ((uint32_t)0x00000000)

+#define RCC_OSCILLATORTYPE_HSE             ((uint32_t)0x00000001)

+#define RCC_OSCILLATORTYPE_HSI             ((uint32_t)0x00000002)

+#define RCC_OSCILLATORTYPE_LSE             ((uint32_t)0x00000004)

+#define RCC_OSCILLATORTYPE_LSI             ((uint32_t)0x00000008)

+/**

+  * @}

+  */

+

+/** @defgroup RCC_HSE_Config RCC HSE Config

+  * @{

+  */

+#define RCC_HSE_OFF                      ((uint32_t)0x00000000)

+#define RCC_HSE_ON                       RCC_CR_HSEON

+#define RCC_HSE_BYPASS                   ((uint32_t)(RCC_CR_HSEBYP | RCC_CR_HSEON))

+/**

+  * @}

+  */

+

+/** @defgroup RCC_LSE_Config RCC LSE Config

+  * @{

+  */

+#define RCC_LSE_OFF                    ((uint32_t)0x00000000)

+#define RCC_LSE_ON                     RCC_BDCR_LSEON

+#define RCC_LSE_BYPASS                 ((uint32_t)(RCC_BDCR_LSEBYP | RCC_BDCR_LSEON))

+/**

+  * @}

+  */

+

+/** @defgroup RCC_HSI_Config RCC HSI Config

+  * @{

+  */

+#define RCC_HSI_OFF                    ((uint32_t)0x00000000)

+#define RCC_HSI_ON                     RCC_CR_HSION

+/**

+  * @}

+  */

+

+/** @defgroup RCC_LSI_Config RCC LSI Config

+  * @{

+  */

+#define RCC_LSI_OFF                    ((uint32_t)0x00000000)

+#define RCC_LSI_ON                     RCC_CSR_LSION

+/**

+  * @}

+  */

+

+/** @defgroup RCC_PLL_Config RCC PLL Config

+  * @{

+  */

+#define RCC_PLL_NONE                   ((uint32_t)0x00000000)

+#define RCC_PLL_OFF                    ((uint32_t)0x00000001)

+#define RCC_PLL_ON                     ((uint32_t)0x00000002)

+/**

+  * @}

+  */

+

+/** @defgroup RCC_PLLP_Clock_Divider PLLP Clock Divider

+  * @{

+  */

+#define RCC_PLLP_DIV2                  ((uint32_t)0x00000002)

+#define RCC_PLLP_DIV4                  ((uint32_t)0x00000004)

+#define RCC_PLLP_DIV6                  ((uint32_t)0x00000006)

+#define RCC_PLLP_DIV8                  ((uint32_t)0x00000008)

+/**

+  * @}

+  */

+

+/** @defgroup RCC_PLL_Clock_Source PLL Clock Source

+  * @{

+  */

+#define RCC_PLLSOURCE_HSI                RCC_PLLCFGR_PLLSRC_HSI

+#define RCC_PLLSOURCE_HSE                RCC_PLLCFGR_PLLSRC_HSE

+/**

+  * @}

+  */

+

+/** @defgroup RCC_System_Clock_Type RCC System Clock Type

+  * @{

+  */

+#define RCC_CLOCKTYPE_SYSCLK             ((uint32_t)0x00000001)

+#define RCC_CLOCKTYPE_HCLK               ((uint32_t)0x00000002)

+#define RCC_CLOCKTYPE_PCLK1              ((uint32_t)0x00000004)

+#define RCC_CLOCKTYPE_PCLK2              ((uint32_t)0x00000008)

+/**

+  * @}

+  */

+  

+/** @defgroup RCC_System_Clock_Source RCC System Clock Source

+  * @{

+  */

+#define RCC_SYSCLKSOURCE_HSI             RCC_CFGR_SW_HSI

+#define RCC_SYSCLKSOURCE_HSE             RCC_CFGR_SW_HSE

+#define RCC_SYSCLKSOURCE_PLLCLK          RCC_CFGR_SW_PLL

+/**

+  * @}

+  */

+

+

+/** @defgroup RCC_System_Clock_Source_Status System Clock Source Status

+  * @{

+  */

+#define RCC_SYSCLKSOURCE_STATUS_HSI      RCC_CFGR_SWS_HSI   /*!< HSI used as system clock */

+#define RCC_SYSCLKSOURCE_STATUS_HSE      RCC_CFGR_SWS_HSE   /*!< HSE used as system clock */

+#define RCC_SYSCLKSOURCE_STATUS_PLLCLK   RCC_CFGR_SWS_PLL   /*!< PLL used as system clock */

+/**

+  * @}

+  */

+

+/** @defgroup RCC_AHB_Clock_Source RCC AHB Clock Source

+  * @{

+  */

+#define RCC_SYSCLK_DIV1                  RCC_CFGR_HPRE_DIV1

+#define RCC_SYSCLK_DIV2                  RCC_CFGR_HPRE_DIV2

+#define RCC_SYSCLK_DIV4                  RCC_CFGR_HPRE_DIV4

+#define RCC_SYSCLK_DIV8                  RCC_CFGR_HPRE_DIV8

+#define RCC_SYSCLK_DIV16                 RCC_CFGR_HPRE_DIV16

+#define RCC_SYSCLK_DIV64                 RCC_CFGR_HPRE_DIV64

+#define RCC_SYSCLK_DIV128                RCC_CFGR_HPRE_DIV128

+#define RCC_SYSCLK_DIV256                RCC_CFGR_HPRE_DIV256

+#define RCC_SYSCLK_DIV512                RCC_CFGR_HPRE_DIV512

+/**

+  * @}

+  */ 

+  

+/** @defgroup RCC_APB1_APB2_Clock_Source RCC APB1/APB2 Clock Source

+  * @{

+  */

+#define RCC_HCLK_DIV1                    RCC_CFGR_PPRE1_DIV1

+#define RCC_HCLK_DIV2                    RCC_CFGR_PPRE1_DIV2

+#define RCC_HCLK_DIV4                    RCC_CFGR_PPRE1_DIV4

+#define RCC_HCLK_DIV8                    RCC_CFGR_PPRE1_DIV8

+#define RCC_HCLK_DIV16                   RCC_CFGR_PPRE1_DIV16

+/**

+  * @}

+  */ 

+

+/** @defgroup RCC_RTC_Clock_Source RCC RTC Clock Source

+  * @{

+  */

+#define RCC_RTCCLKSOURCE_LSE             ((uint32_t)0x00000100)

+#define RCC_RTCCLKSOURCE_LSI             ((uint32_t)0x00000200)

+#define RCC_RTCCLKSOURCE_HSE_DIV2        ((uint32_t)0x00020300)

+#define RCC_RTCCLKSOURCE_HSE_DIV3        ((uint32_t)0x00030300)

+#define RCC_RTCCLKSOURCE_HSE_DIV4        ((uint32_t)0x00040300)

+#define RCC_RTCCLKSOURCE_HSE_DIV5        ((uint32_t)0x00050300)

+#define RCC_RTCCLKSOURCE_HSE_DIV6        ((uint32_t)0x00060300)

+#define RCC_RTCCLKSOURCE_HSE_DIV7        ((uint32_t)0x00070300)

+#define RCC_RTCCLKSOURCE_HSE_DIV8        ((uint32_t)0x00080300)

+#define RCC_RTCCLKSOURCE_HSE_DIV9        ((uint32_t)0x00090300)

+#define RCC_RTCCLKSOURCE_HSE_DIV10       ((uint32_t)0x000A0300)

+#define RCC_RTCCLKSOURCE_HSE_DIV11       ((uint32_t)0x000B0300)

+#define RCC_RTCCLKSOURCE_HSE_DIV12       ((uint32_t)0x000C0300)

+#define RCC_RTCCLKSOURCE_HSE_DIV13       ((uint32_t)0x000D0300)

+#define RCC_RTCCLKSOURCE_HSE_DIV14       ((uint32_t)0x000E0300)

+#define RCC_RTCCLKSOURCE_HSE_DIV15       ((uint32_t)0x000F0300)

+#define RCC_RTCCLKSOURCE_HSE_DIV16       ((uint32_t)0x00100300)

+#define RCC_RTCCLKSOURCE_HSE_DIV17       ((uint32_t)0x00110300)

+#define RCC_RTCCLKSOURCE_HSE_DIV18       ((uint32_t)0x00120300)

+#define RCC_RTCCLKSOURCE_HSE_DIV19       ((uint32_t)0x00130300)

+#define RCC_RTCCLKSOURCE_HSE_DIV20       ((uint32_t)0x00140300)

+#define RCC_RTCCLKSOURCE_HSE_DIV21       ((uint32_t)0x00150300)

+#define RCC_RTCCLKSOURCE_HSE_DIV22       ((uint32_t)0x00160300)

+#define RCC_RTCCLKSOURCE_HSE_DIV23       ((uint32_t)0x00170300)

+#define RCC_RTCCLKSOURCE_HSE_DIV24       ((uint32_t)0x00180300)

+#define RCC_RTCCLKSOURCE_HSE_DIV25       ((uint32_t)0x00190300)

+#define RCC_RTCCLKSOURCE_HSE_DIV26       ((uint32_t)0x001A0300)

+#define RCC_RTCCLKSOURCE_HSE_DIV27       ((uint32_t)0x001B0300)

+#define RCC_RTCCLKSOURCE_HSE_DIV28       ((uint32_t)0x001C0300)

+#define RCC_RTCCLKSOURCE_HSE_DIV29       ((uint32_t)0x001D0300)

+#define RCC_RTCCLKSOURCE_HSE_DIV30       ((uint32_t)0x001E0300)

+#define RCC_RTCCLKSOURCE_HSE_DIV31       ((uint32_t)0x001F0300)

+/**

+  * @}

+  */

+

+

+

+/** @defgroup RCC_MCO_Index RCC MCO Index

+  * @{

+  */

+#define RCC_MCO1                         ((uint32_t)0x00000000)

+#define RCC_MCO2                         ((uint32_t)0x00000001)

+/**

+  * @}

+  */

+

+/** @defgroup RCC_MCO1_Clock_Source RCC MCO1 Clock Source

+  * @{

+  */

+#define RCC_MCO1SOURCE_HSI               ((uint32_t)0x00000000)

+#define RCC_MCO1SOURCE_LSE               RCC_CFGR_MCO1_0

+#define RCC_MCO1SOURCE_HSE               RCC_CFGR_MCO1_1

+#define RCC_MCO1SOURCE_PLLCLK            RCC_CFGR_MCO1

+/**

+  * @}

+  */

+

+/** @defgroup RCC_MCO2_Clock_Source RCC MCO2 Clock Source

+  * @{

+  */

+#define RCC_MCO2SOURCE_SYSCLK            ((uint32_t)0x00000000)

+#define RCC_MCO2SOURCE_PLLI2SCLK         RCC_CFGR_MCO2_0

+#define RCC_MCO2SOURCE_HSE               RCC_CFGR_MCO2_1

+#define RCC_MCO2SOURCE_PLLCLK            RCC_CFGR_MCO2

+/**

+  * @}

+  */

+

+/** @defgroup RCC_MCOx_Clock_Prescaler RCC MCO1 Clock Prescaler

+  * @{

+  */

+#define RCC_MCODIV_1                    ((uint32_t)0x00000000)

+#define RCC_MCODIV_2                    RCC_CFGR_MCO1PRE_2

+#define RCC_MCODIV_3                    ((uint32_t)RCC_CFGR_MCO1PRE_0 | RCC_CFGR_MCO1PRE_2)

+#define RCC_MCODIV_4                    ((uint32_t)RCC_CFGR_MCO1PRE_1 | RCC_CFGR_MCO1PRE_2)

+#define RCC_MCODIV_5                    RCC_CFGR_MCO1PRE

+/**

+  * @}

+  */

+

+/** @defgroup RCC_Interrupt RCC Interrupt 

+  * @{

+  */

+#define RCC_IT_LSIRDY                    ((uint8_t)0x01)

+#define RCC_IT_LSERDY                    ((uint8_t)0x02)

+#define RCC_IT_HSIRDY                    ((uint8_t)0x04)

+#define RCC_IT_HSERDY                    ((uint8_t)0x08)

+#define RCC_IT_PLLRDY                    ((uint8_t)0x10)

+#define RCC_IT_PLLI2SRDY                 ((uint8_t)0x20)

+#define RCC_IT_PLLSAIRDY                 ((uint8_t)0x40)

+#define RCC_IT_CSS                       ((uint8_t)0x80)

+/**

+  * @}

+  */

+  

+/** @defgroup RCC_Flag RCC Flags

+  *        Elements values convention: 0XXYYYYYb

+  *           - YYYYY  : Flag position in the register

+  *           - 0XX  : Register index

+  *                 - 01: CR register

+  *                 - 10: BDCR register

+  *                 - 11: CSR register

+  * @{

+  */

+/* Flags in the CR register */

+#define RCC_FLAG_HSIRDY                  ((uint8_t)0x21)

+#define RCC_FLAG_HSERDY                  ((uint8_t)0x31)

+#define RCC_FLAG_PLLRDY                  ((uint8_t)0x39)

+#define RCC_FLAG_PLLI2SRDY               ((uint8_t)0x3B)

+#define RCC_FLAG_PLLSAIRDY               ((uint8_t)0x3C)

+

+/* Flags in the BDCR register */

+#define RCC_FLAG_LSERDY                  ((uint8_t)0x41)

+

+/* Flags in the CSR register */

+#define RCC_FLAG_LSIRDY                  ((uint8_t)0x61)

+#define RCC_FLAG_BORRST                  ((uint8_t)0x79)

+#define RCC_FLAG_PINRST                  ((uint8_t)0x7A)

+#define RCC_FLAG_PORRST                  ((uint8_t)0x7B)

+#define RCC_FLAG_SFTRST                  ((uint8_t)0x7C)

+#define RCC_FLAG_IWDGRST                 ((uint8_t)0x7D)

+#define RCC_FLAG_WWDGRST                 ((uint8_t)0x7E)

+#define RCC_FLAG_LPWRRST                 ((uint8_t)0x7F)

+/**

+  * @}

+  */ 

+

+/** @defgroup RCC_LSEDrive_Configuration RCC LSE Drive configurations

+  * @{

+  */

+#define RCC_LSEDRIVE_LOW                 ((uint32_t)0x00000000)

+#define RCC_LSEDRIVE_MEDIUMLOW           RCC_BDCR_LSEDRV_1

+#define RCC_LSEDRIVE_MEDIUMHIGH          RCC_BDCR_LSEDRV_0

+#define RCC_LSEDRIVE_HIGH                RCC_BDCR_LSEDRV

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */

+   

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup RCC_Exported_Macros RCC Exported Macros

+  * @{

+  */

+

+/** @defgroup RCC_AHB1_Clock_Enable_Disable AHB1 Peripheral Clock Enable Disable

+  * @brief  Enable or disable the AHB1 peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before 

+  *         using it.   

+  * @{

+  */

+#define __HAL_RCC_CRC_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_CRCEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_CRCEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+									  

+#define __HAL_RCC_DMA1_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA1EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA1EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_CRC_CLK_DISABLE()          (RCC->AHB1ENR &= ~(RCC_AHB1ENR_CRCEN))

+#define __HAL_RCC_DMA1_CLK_DISABLE()         (RCC->AHB1ENR &= ~(RCC_AHB1ENR_DMA1EN))

+

+/**

+  * @}

+  */

+

+/** @defgroup RCC_APB1_Clock_Enable_Disable APB1 Peripheral Clock Enable Disable

+  * @brief  Enable or disable the Low Speed APB (APB1) peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before

+  *         using it.

+  * @{

+  */

+#define __HAL_RCC_WWDG_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_WWDGEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_WWDGEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+									  

+#define __HAL_RCC_PWR_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_PWREN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_PWREN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)									  

+

+#define __HAL_RCC_WWDG_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_WWDGEN))

+#define __HAL_RCC_PWR_CLK_DISABLE()    (RCC->APB1ENR &= ~(RCC_APB1ENR_PWREN)) 

+/**

+  * @}

+  */

+

+/** @defgroup RCC_APB2_Clock_Enable_Disable APB2 Peripheral Clock Enable Disable                                      

+  * @brief  Enable or disable the High Speed APB (APB2) peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before 

+  *         using it.

+  * @{

+  */

+#define __HAL_RCC_SYSCFG_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SYSCFGEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SYSCFGEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+									  

+#define __HAL_RCC_SYSCFG_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_SYSCFGEN))

+

+/**

+  * @}

+  */

+  

+/** @defgroup RCC_AHB1_Peripheral_Clock_Enable_Disable_Status AHB1 Peripheral Clock Enable Disable Status

+  * @brief  Get the enable or disable status of the AHB1 peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before

+  *         using it.

+  * @{

+  */

+#define __HAL_RCC_CRC_IS_CLK_ENABLED()         ((RCC->AHB1ENR & (RCC_AHB1ENR_CRCEN)) != RESET)  

+#define __HAL_RCC_DMA1_IS_CLK_ENABLED()        ((RCC->AHB1ENR & (RCC_AHB1ENR_DMA1EN)) != RESET)

+

+#define __HAL_RCC_CRC_IS_CLK_DISABLED()        ((RCC->AHB1ENR & (RCC_AHB1ENR_CRCEN)) == RESET)

+#define __HAL_RCC_DMA1_IS_CLK_DISABLED()       ((RCC->AHB1ENR & (RCC_AHB1ENR_DMA1EN)) == RESET)

+/**

+  * @}

+  */

+  

+/** @defgroup RCC_APB1_Clock_Enable_Disable_Status APB1 Peripheral Clock Enable Disable  Status

+  * @brief  Get the enable or disable status of the APB1 peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before

+  *         using it.

+  * @{

+  */

+#define __HAL_RCC_WWDG_IS_CLK_ENABLED()        ((RCC->APB1ENR & (RCC_APB1ENR_WWDGEN)) != RESET)

+#define __HAL_RCC_PWR_IS_CLK_ENABLED()         ((RCC->APB1ENR & (RCC_APB1ENR_PWREN)) != RESET)

+

+#define __HAL_RCC_WWDG_IS_CLK_DISABLED()       ((RCC->APB1ENR & (RCC_APB1ENR_WWDGEN)) == RESET)

+#define __HAL_RCC_PWR_IS_CLK_DISABLED()        ((RCC->APB1ENR & (RCC_APB1ENR_PWREN)) == RESET)

+/**

+  * @}

+  */  

+

+/** @defgroup RCC_APB2_Clock_Enable_Disable_Status APB2 Peripheral Clock Enable Disable Status

+  * @brief  EGet the enable or disable status of the APB2 peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before

+  *         using it.

+  * @{

+  */

+#define __HAL_RCC_SYSCFG_IS_CLK_ENABLED()      ((RCC->APB2ENR & (RCC_APB2ENR_SYSCFGEN)) != RESET)

+#define __HAL_RCC_SYSCFG_IS_CLK_DISABLED()     ((RCC->APB2ENR & (RCC_APB2ENR_SYSCFGEN)) == RESET)

+/**

+  * @}

+  */  

+  

+/** @defgroup RCC_Peripheral_Clock_Force_Release RCC Peripheral Clock Force Release

+  * @brief  Force or release AHB peripheral reset.

+  * @{

+  */  

+#define __HAL_RCC_AHB1_FORCE_RESET()    (RCC->AHB1RSTR = 0xFFFFFFFF)

+#define __HAL_RCC_CRC_FORCE_RESET()     (RCC->AHB1RSTR |= (RCC_AHB1RSTR_CRCRST))

+#define __HAL_RCC_DMA1_FORCE_RESET()    (RCC->AHB1RSTR |= (RCC_AHB1RSTR_DMA1RST))

+

+#define __HAL_RCC_AHB1_RELEASE_RESET()  (RCC->AHB1RSTR = 0x00)

+#define __HAL_RCC_CRC_RELEASE_RESET()   (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_CRCRST))

+#define __HAL_RCC_DMA1_RELEASE_RESET()  (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_DMA1RST))

+/**

+  * @}

+  */

+

+/** @defgroup RCC_APB1_Force_Release_Reset APB1 Force Release Reset 

+  * @brief  Force or release APB1 peripheral reset.

+  * @{

+  */

+#define __HAL_RCC_APB1_FORCE_RESET()     (RCC->APB1RSTR = 0xFFFFFFFF)  

+#define __HAL_RCC_WWDG_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_WWDGRST))

+#define __HAL_RCC_PWR_FORCE_RESET()      (RCC->APB1RSTR |= (RCC_APB1RSTR_PWRRST))

+

+#define __HAL_RCC_APB1_RELEASE_RESET()   (RCC->APB1RSTR = 0x00) 

+#define __HAL_RCC_WWDG_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_WWDGRST))

+#define __HAL_RCC_PWR_RELEASE_RESET()    (RCC->APB1RSTR &= ~(RCC_APB1RSTR_PWRRST))

+/**

+  * @}

+  */

+

+/** @defgroup RCC_APB2_Force_Release_Reset APB2 Force Release Reset 

+  * @brief  Force or release APB2 peripheral reset.

+  * @{

+  */

+#define __HAL_RCC_APB2_FORCE_RESET()     (RCC->APB2RSTR = 0xFFFFFFFF)  

+#define __HAL_RCC_SYSCFG_FORCE_RESET()   (RCC->APB2RSTR |= (RCC_APB2RSTR_SYSCFGRST))

+

+#define __HAL_RCC_APB2_RELEASE_RESET()   (RCC->APB2RSTR = 0x00)

+#define __HAL_RCC_SYSCFG_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SYSCFGRST))

+

+/**

+  * @}

+  */

+

+/** @defgroup RCC_Peripheral_Clock_Sleep_Enable_Disable RCC Peripheral Clock Sleep Enable Disable

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  * @{

+  */

+#define __HAL_RCC_CRC_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_CRCLPEN))

+#define __HAL_RCC_DMA1_CLK_SLEEP_ENABLE()     (RCC->AHB1LPENR |= (RCC_AHB1LPENR_DMA1LPEN))

+

+#define __HAL_RCC_CRC_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_CRCLPEN))

+#define __HAL_RCC_DMA1_CLK_SLEEP_DISABLE()    (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_DMA1LPEN))

+

+/** @brief  Enable or disable the APB1 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  */

+#define __HAL_RCC_WWDG_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_WWDGLPEN))

+#define __HAL_RCC_PWR_CLK_SLEEP_ENABLE()     (RCC->APB1LPENR |= (RCC_APB1LPENR_PWRLPEN))

+

+#define __HAL_RCC_WWDG_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_WWDGLPEN))

+#define __HAL_RCC_PWR_CLK_SLEEP_DISABLE()    (RCC->APB1LPENR &= ~(RCC_APB1LPENR_PWRLPEN))

+

+/** @brief  Enable or disable the APB2 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  */

+#define __HAL_RCC_SYSCFG_CLK_SLEEP_ENABLE()  (RCC->APB2LPENR |= (RCC_APB2LPENR_SYSCFGLPEN))

+#define __HAL_RCC_SYSCFG_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SYSCFGLPEN))

+

+/**

+  * @}

+  */

+  

+/** @defgroup RCC_AHB1_Clock_Sleep_Enable_Disable_Status AHB1 Peripheral Clock Sleep Enable Disable Status

+  * @brief  Get the enable or disable status of the AHB1 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  * @{

+  */

+#define __HAL_RCC_CRC_IS_CLK_SLEEP_ENABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_CRCLPEN)) != RESET)

+#define __HAL_RCC_DMA1_IS_CLK_SLEEP_ENABLED()    ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA1LPEN)) != RESET)

+

+#define __HAL_RCC_CRC_IS_CLK_SLEEP_DISABLED()    ((RCC->AHB1LPENR & (RCC_AHB1LPENR_CRCLPEN)) == RESET)

+#define __HAL_RCC_DMA1_IS_CLK_SLEEP_DISABLED()   ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA1LPEN)) == RESET)

+/**

+  * @}

+  */

+

+/** @defgroup RCC_APB1_Clock_Sleep_Enable_Disable_Status APB1 Peripheral Clock Sleep Enable Disable Status

+  * @brief  Get the enable or disable status of the APB1 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  * @{

+  */

+#define __HAL_RCC_WWDG_IS_CLK_SLEEP_ENABLED()      ((RCC->APB1LPENR & (RCC_APB1LPENR_WWDGLPEN)) != RESET)

+#define __HAL_RCC_PWR_IS_CLK_SLEEP_ENABLED()       ((RCC->APB1LPENR & (RCC_APB1LPENR_PWRLPEN)) != RESET)

+

+#define __HAL_RCC_WWDG_IS_CLK_SLEEP_DISABLED()     ((RCC->APB1LPENR & (RCC_APB1LPENR_WWDGLPEN)) == RESET)

+#define __HAL_RCC_PWR_IS_CLK_SLEEP_DISABLED()      ((RCC->APB1LPENR & (RCC_APB1LPENR_PWRLPEN)) == RESET)

+/**

+  * @}

+  */

+

+/** @defgroup RCC_APB2_Clock_Sleep_Enable_Disable_Status APB2 Peripheral Clock Sleep Enable Disable Status

+  * @brief  Get the enable or disable status of the APB2 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  * @{

+  */

+#define __HAL_RCC_SYSCFG_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_SYSCFGLPEN)) != RESET)

+#define __HAL_RCC_SYSCFG_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_SYSCFGLPEN)) == RESET)

+/**

+  * @}

+  */  

+

+/** @defgroup RCC_HSI_Configuration HSI Configuration

+  * @{   

+  */ 

+                                      

+/** @brief  Macros to enable or disable the Internal High Speed oscillator (HSI).

+  * @note   The HSI is stopped by hardware when entering STOP and STANDBY modes.

+  *         It is used (enabled by hardware) as system clock source after startup

+  *         from Reset, wakeup from STOP and STANDBY mode, or in case of failure

+  *         of the HSE used directly or indirectly as system clock (if the Clock

+  *         Security System CSS is enabled).             

+  * @note   HSI can not be stopped if it is used as system clock source. In this case,

+  *         you have to select another source of the system clock then stop the HSI.  

+  * @note   After enabling the HSI, the application software should wait on HSIRDY

+  *         flag to be set indicating that HSI clock is stable and can be used as

+  *         system clock source.  

+  * @note   When the HSI is stopped, HSIRDY flag goes low after 6 HSI oscillator

+  *         clock cycles.  

+  */

+#define __HAL_RCC_HSI_ENABLE() (RCC->CR |= (RCC_CR_HSION))

+#define __HAL_RCC_HSI_DISABLE() (RCC->CR &= ~(RCC_CR_HSION))

+

+/** @brief  Macro to adjust the Internal High Speed oscillator (HSI) calibration value.

+  * @note   The calibration is used to compensate for the variations in voltage

+  *         and temperature that influence the frequency of the internal HSI RC.

+  * @param  __HSICALIBRATIONVALUE__: specifies the calibration trimming value.

+  *         This parameter must be a number between 0 and 0x1F.

+  */

+#define __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(__HSICALIBRATIONVALUE__) (MODIFY_REG(RCC->CR,\

+        RCC_CR_HSITRIM, (uint32_t)(__HSICALIBRATIONVALUE__) << POSITION_VAL(RCC_CR_HSITRIM)))

+/**

+  * @}

+  */

+

+/** @defgroup RCC_LSI_Configuration LSI Configuration

+  * @{   

+  */ 

+

+/** @brief  Macros to enable or disable the Internal Low Speed oscillator (LSI).

+  * @note   After enabling the LSI, the application software should wait on 

+  *         LSIRDY flag to be set indicating that LSI clock is stable and can

+  *         be used to clock the IWDG and/or the RTC.

+  * @note   LSI can not be disabled if the IWDG is running.

+  * @note   When the LSI is stopped, LSIRDY flag goes low after 6 LSI oscillator

+  *         clock cycles. 

+  */

+#define __HAL_RCC_LSI_ENABLE()  (RCC->CSR |= (RCC_CSR_LSION))

+#define __HAL_RCC_LSI_DISABLE() (RCC->CSR &= ~(RCC_CSR_LSION))

+/**

+  * @}

+  */

+

+/** @defgroup RCC_HSE_Configuration HSE Configuration

+  * @{   

+  */ 

+/**

+  * @brief  Macro to configure the External High Speed oscillator (__HSE__).

+  * @note   After enabling the HSE (RCC_HSE_ON or RCC_HSE_Bypass), the application

+  *         software should wait on HSERDY flag to be set indicating that HSE clock

+  *         is stable and can be used to clock the PLL and/or system clock.

+  * @note   HSE state can not be changed if it is used directly or through the

+  *         PLL as system clock. In this case, you have to select another source

+  *         of the system clock then change the HSE state (ex. disable it).

+  * @note   The HSE is stopped by hardware when entering STOP and STANDBY modes.  

+  * @note   This function reset the CSSON bit, so if the clock security system(CSS)

+  *         was previously enabled you have to enable it again after calling this

+  *         function.    

+  * @param  __STATE__: specifies the new state of the HSE.

+  *         This parameter can be one of the following values:

+  *            @arg RCC_HSE_OFF: turn OFF the HSE oscillator, HSERDY flag goes low after

+  *                              6 HSE oscillator clock cycles.

+  *            @arg RCC_HSE_ON: turn ON the HSE oscillator.

+  *            @arg RCC_HSE_BYPASS: HSE oscillator bypassed with external clock.

+  */

+#define __HAL_RCC_HSE_CONFIG(__STATE__) \

+                    do {                                     \

+                      CLEAR_BIT(RCC->CR, RCC_CR_HSEON);      \

+                      if((__STATE__) == RCC_HSE_ON)          \

+                      {                                      \

+                        CLEAR_BIT(RCC->CR, RCC_CR_HSEBYP);   \

+                        SET_BIT(RCC->CR, RCC_CR_HSEON);      \

+                      }                                      \

+                      else if((__STATE__) == RCC_HSE_BYPASS) \

+                      {                                      \

+                        SET_BIT(RCC->CR, RCC_CR_HSEBYP);     \

+                        SET_BIT(RCC->CR, RCC_CR_HSEON);      \

+                      }                                      \

+                      else                                   \

+                      {                                      \

+                        CLEAR_BIT(RCC->CR, RCC_CR_HSEBYP);   \

+                        CLEAR_BIT(RCC->CR, RCC_CR_HSEON);    \

+                        }                                    \

+                    } while(0)

+/**

+  * @}

+  */

+

+/** @defgroup RCC_LSE_Configuration LSE Configuration

+  * @{   

+  */

+

+/**

+  * @brief  Macro to configure the External Low Speed oscillator (LSE).

+  * @note   Transition LSE Bypass to LSE On and LSE On to LSE Bypass are not supported by this macro. 

+  *         User should request a transition to LSE Off first and then LSE On or LSE Bypass.  

+  * @note   As the LSE is in the Backup domain and write access is denied to

+  *         this domain after reset, you have to enable write access using 

+  *         HAL_PWR_EnableBkUpAccess() function before to configure the LSE

+  *         (to be done once after reset).  

+  * @note   After enabling the LSE (RCC_LSE_ON or RCC_LSE_BYPASS), the application

+  *         software should wait on LSERDY flag to be set indicating that LSE clock

+  *         is stable and can be used to clock the RTC.

+  * @param  __STATE__: specifies the new state of the LSE.

+  *         This parameter can be one of the following values:

+  *            @arg RCC_LSE_OFF: turn OFF the LSE oscillator, LSERDY flag goes low after

+  *                              6 LSE oscillator clock cycles.

+  *            @arg RCC_LSE_ON: turn ON the LSE oscillator.

+  *            @arg RCC_LSE_BYPASS: LSE oscillator bypassed with external clock.

+  */

+#define __HAL_RCC_LSE_CONFIG(__STATE__) \

+                    do {                                       \

+                      CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEON);    \

+                      if((__STATE__) == RCC_LSE_ON)            \

+                      {                                        \

+                        CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEBYP); \

+                        SET_BIT(RCC->BDCR, RCC_BDCR_LSEON);    \

+                      }                                        \

+                      else if((__STATE__) == RCC_LSE_BYPASS)   \

+                      {                                        \

+                        SET_BIT(RCC->BDCR, RCC_BDCR_LSEBYP);   \

+                        SET_BIT(RCC->BDCR, RCC_BDCR_LSEON);    \

+                      }                                        \

+                      else                                     \

+                      {                                        \

+                        CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEBYP); \

+                        CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEON);  \

+                      }                                        \

+                    } while(0)

+/**

+  * @}

+  */

+

+/** @defgroup RCC_Internal_RTC_Clock_Configuration RTC Clock Configuration

+  * @{   

+  */

+

+/** @brief  Macros to enable or disable the RTC clock.

+  * @note   These macros must be used only after the RTC clock source was selected.

+  */

+#define __HAL_RCC_RTC_ENABLE()  (RCC->BDCR |= (RCC_BDCR_RTCEN))

+#define __HAL_RCC_RTC_DISABLE() (RCC->BDCR &= ~(RCC_BDCR_RTCEN))

+

+/** @brief  Macros to configure the RTC clock (RTCCLK).

+  * @note   As the RTC clock configuration bits are in the Backup domain and write

+  *         access is denied to this domain after reset, you have to enable write

+  *         access using the Power Backup Access macro before to configure

+  *         the RTC clock source (to be done once after reset).    

+  * @note   Once the RTC clock is configured it can't be changed unless the  

+  *         Backup domain is reset using __HAL_RCC_BackupReset_RELEASE() macro, or by

+  *         a Power On Reset (POR).

+  * @param  __RTCCLKSource__: specifies the RTC clock source.

+  *         This parameter can be one of the following values:

+  *            @arg RCC_RTCCLKSOURCE_LSE: LSE selected as RTC clock.

+  *            @arg RCC_RTCCLKSOURCE_LSI: LSI selected as RTC clock.

+  *            @arg RCC_RTCCLKSOURCE_HSE_DIVx: HSE clock divided by x selected

+  *                                            as RTC clock, where x:[2,31]

+  * @note   If the LSE or LSI is used as RTC clock source, the RTC continues to

+  *         work in STOP and STANDBY modes, and can be used as wakeup source.

+  *         However, when the HSE clock is used as RTC clock source, the RTC

+  *         cannot be used in STOP and STANDBY modes.    

+  * @note   The maximum input clock frequency for RTC is 1MHz (when using HSE as

+  *         RTC clock source).

+  */

+#define __HAL_RCC_RTC_CLKPRESCALER(__RTCCLKSource__) (((__RTCCLKSource__) & RCC_BDCR_RTCSEL) == RCC_BDCR_RTCSEL) ?    \

+                                                 MODIFY_REG(RCC->CFGR, RCC_CFGR_RTCPRE, ((__RTCCLKSource__) & 0xFFFFCFF)) : CLEAR_BIT(RCC->CFGR, RCC_CFGR_RTCPRE)

+                                                   

+#define __HAL_RCC_RTC_CONFIG(__RTCCLKSource__) do { __HAL_RCC_RTC_CLKPRESCALER(__RTCCLKSource__);    \

+                                                    RCC->BDCR |= ((__RTCCLKSource__) & 0x00000FFF);  \

+                                                   } while (0)

+

+/** @brief  Macros to force or release the Backup domain reset.

+  * @note   This function resets the RTC peripheral (including the backup registers)

+  *         and the RTC clock source selection in RCC_CSR register.

+  * @note   The BKPSRAM is not affected by this reset.   

+  */

+#define __HAL_RCC_BACKUPRESET_FORCE()   (RCC->BDCR |= (RCC_BDCR_BDRST))

+#define __HAL_RCC_BACKUPRESET_RELEASE() (RCC->BDCR &= ~(RCC_BDCR_BDRST))

+/**

+  * @}

+  */

+

+/** @defgroup RCC_PLL_Configuration PLL Configuration

+  * @{   

+  */

+

+/** @brief  Macros to enable or disable the main PLL.

+  * @note   After enabling the main PLL, the application software should wait on 

+  *         PLLRDY flag to be set indicating that PLL clock is stable and can

+  *         be used as system clock source.

+  * @note   The main PLL can not be disabled if it is used as system clock source

+  * @note   The main PLL is disabled by hardware when entering STOP and STANDBY modes.

+  */

+#define __HAL_RCC_PLL_ENABLE() SET_BIT(RCC->CR, RCC_CR_PLLON)

+#define __HAL_RCC_PLL_DISABLE() CLEAR_BIT(RCC->CR, RCC_CR_PLLON)

+

+

+/** @brief  Macro to configure the main PLL clock source, multiplication and division factors.

+  * @note   This function must be used only when the main PLL is disabled.

+  * @param  __RCC_PLLSource__: specifies the PLL entry clock source.

+  *         This parameter can be one of the following values:

+  *            @arg RCC_PLLSOURCE_HSI: HSI oscillator clock selected as PLL clock entry

+  *            @arg RCC_PLLSOURCE_HSE: HSE oscillator clock selected as PLL clock entry

+  * @note   This clock source (RCC_PLLSource) is common for the main PLL and PLLI2S.  

+  * @param  __PLLM__: specifies the division factor for PLL VCO input clock

+  *         This parameter must be a number between Min_Data = 2 and Max_Data = 63.

+  * @note   You have to set the PLLM parameter correctly to ensure that the VCO input

+  *         frequency ranges from 1 to 2 MHz. It is recommended to select a frequency

+  *         of 2 MHz to limit PLL jitter.

+  * @param  __PLLN__: specifies the multiplication factor for PLL VCO output clock

+  *         This parameter must be a number between Min_Data = 192 and Max_Data = 432.

+  * @note   You have to set the PLLN parameter correctly to ensure that the VCO

+  *         output frequency is between 192 and 432 MHz.

+  * @param  __PLLP__: specifies the division factor for main system clock (SYSCLK)

+  *         This parameter must be a number in the range {2, 4, 6, or 8}.

+  * @note   You have to set the PLLP parameter correctly to not exceed 216 MHz on

+  *         the System clock frequency.

+  * @param  __PLLQ__: specifies the division factor for OTG FS, SDMMC and RNG clocks

+  *         This parameter must be a number between Min_Data = 2 and Max_Data = 15.

+  * @note   If the USB OTG FS is used in your application, you have to set the

+  *         PLLQ parameter correctly to have 48 MHz clock for the USB. However,

+  *         the SDMMC and RNG need a frequency lower than or equal to 48 MHz to work

+  *         correctly.

+  */

+#define __HAL_RCC_PLL_CONFIG(__RCC_PLLSource__, __PLLM__, __PLLN__, __PLLP__, __PLLQ__)\

+                            (RCC->PLLCFGR = (0x20000000 | (__PLLM__) | ((__PLLN__) << POSITION_VAL(RCC_PLLCFGR_PLLN)) | \

+                            ((((__PLLP__) >> 1) -1) << POSITION_VAL(RCC_PLLCFGR_PLLP)) | (__RCC_PLLSource__) | \

+                            ((__PLLQ__) << POSITION_VAL(RCC_PLLCFGR_PLLQ))))

+                            

+/** @brief  Macro to configure the PLL clock source.

+  * @note   This function must be used only when the main PLL is disabled.

+  * @param  __PLLSOURCE__: specifies the PLL entry clock source.

+  *         This parameter can be one of the following values:

+  *            @arg RCC_PLLSOURCE_HSI: HSI oscillator clock selected as PLL clock entry

+  *            @arg RCC_PLLSOURCE_HSE: HSE oscillator clock selected as PLL clock entry

+  *      

+  */

+#define __HAL_RCC_PLL_PLLSOURCE_CONFIG(__PLLSOURCE__) MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLSRC, (__PLLSOURCE__))

+

+/** @brief  Macro to configure the PLL multiplication factor.

+  * @note   This function must be used only when the main PLL is disabled.

+  * @param  __PLLM__: specifies the division factor for PLL VCO input clock

+  *         This parameter must be a number between Min_Data = 2 and Max_Data = 63.

+  * @note   You have to set the PLLM parameter correctly to ensure that the VCO input

+  *         frequency ranges from 1 to 2 MHz. It is recommended to select a frequency

+  *         of 2 MHz to limit PLL jitter.

+  *      

+  */

+#define __HAL_RCC_PLL_PLLM_CONFIG(__PLLM__) MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLM, (__PLLM__))

+/**

+  * @}

+  */

+

+/** @defgroup RCC_PLL_I2S_Configuration PLL I2S Configuration

+  * @{   

+  */

+

+/** @brief  Macro to configure the I2S clock source (I2SCLK).

+  * @note   This function must be called before enabling the I2S APB clock.

+  * @param  __SOURCE__: specifies the I2S clock source.

+  *         This parameter can be one of the following values:

+  *            @arg RCC_I2SCLKSOURCE_PLLI2S: PLLI2S clock used as I2S clock source.

+  *            @arg RCC_I2SCLKSOURCE_EXT: External clock mapped on the I2S_CKIN pin

+  *                                       used as I2S clock source.

+  */

+#define __HAL_RCC_I2S_CONFIG(__SOURCE__) do {RCC->CFGR &= ~(RCC_CFGR_I2SSRC); \

+                                          RCC->CFGR |= (__SOURCE__); \

+                                         }while(0)

+

+/** @brief Macros to enable or disable the PLLI2S. 

+  * @note  The PLLI2S is disabled by hardware when entering STOP and STANDBY modes.

+  */

+#define __HAL_RCC_PLLI2S_ENABLE() (RCC->CR |= (RCC_CR_PLLI2SON))

+#define __HAL_RCC_PLLI2S_DISABLE() (RCC->CR &= ~(RCC_CR_PLLI2SON))

+/**

+  * @}

+  */

+

+/** @defgroup RCC_Get_Clock_source Get Clock source

+  * @{   

+  */

+/**

+  * @brief Macro to configure the system clock source.

+  * @param __RCC_SYSCLKSOURCE__: specifies the system clock source.

+  * This parameter can be one of the following values:

+  *              - RCC_SYSCLKSOURCE_HSI: HSI oscillator is used as system clock source.

+  *              - RCC_SYSCLKSOURCE_HSE: HSE oscillator is used as system clock source.

+  *              - RCC_SYSCLKSOURCE_PLLCLK: PLL output is used as system clock source.

+  */

+#define __HAL_RCC_SYSCLK_CONFIG(__RCC_SYSCLKSOURCE__) MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, (__RCC_SYSCLKSOURCE__))

+

+/** @brief  Macro to get the clock source used as system clock.

+  * @retval The clock source used as system clock. The returned value can be one

+  *         of the following:

+  *              - RCC_SYSCLKSOURCE_STATUS_HSI: HSI used as system clock.

+  *              - RCC_SYSCLKSOURCE_STATUS_HSE: HSE used as system clock.

+  *              - RCC_SYSCLKSOURCE_STATUS_PLLCLK: PLL used as system clock.

+  */     

+#define __HAL_RCC_GET_SYSCLK_SOURCE() ((uint32_t)(RCC->CFGR & RCC_CFGR_SWS))

+

+/**

+  * @brief  Macro to configures the External Low Speed oscillator (LSE) drive capability.

+  * @note   As the LSE is in the Backup domain and write access is denied to

+  *         this domain after reset, you have to enable write access using

+  *         HAL_PWR_EnableBkUpAccess() function before to configure the LSE

+  *         (to be done once after reset).

+  * @param  __RCC_LSEDRIVE__: specifies the new state of the LSE drive capability.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_LSEDRIVE_LOW: LSE oscillator low drive capability.

+  *            @arg RCC_LSEDRIVE_MEDIUMLOW: LSE oscillator medium low drive capability.

+  *            @arg RCC_LSEDRIVE_MEDIUMHIGH: LSE oscillator medium high drive capability.

+  *            @arg RCC_LSEDRIVE_HIGH: LSE oscillator high drive capability.

+  * @retval None

+  */

+#define __HAL_RCC_LSEDRIVE_CONFIG(__RCC_LSEDRIVE__) \

+                  (MODIFY_REG(RCC->BDCR, RCC_BDCR_LSEDRV, (uint32_t)(__RCC_LSEDRIVE__) ))

+

+/** @brief  Macro to get the oscillator used as PLL clock source.

+  * @retval The oscillator used as PLL clock source. The returned value can be one

+  *         of the following:

+  *              - RCC_PLLSOURCE_HSI: HSI oscillator is used as PLL clock source.

+  *              - RCC_PLLSOURCE_HSE: HSE oscillator is used as PLL clock source.

+  */

+#define __HAL_RCC_GET_PLL_OSCSOURCE() ((uint32_t)(RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC))

+/**

+  * @}

+  */

+

+/** @defgroup RCC_Flags_Interrupts_Management Flags Interrupts Management

+  * @brief macros to manage the specified RCC Flags and interrupts.

+  * @{

+  */

+

+/** @brief  Enable RCC interrupt (Perform Byte access to RCC_CIR[14:8] bits to enable

+  *         the selected interrupts).

+  * @param  __INTERRUPT__: specifies the RCC interrupt sources to be enabled.

+  *         This parameter can be any combination of the following values:

+  *            @arg RCC_IT_LSIRDY: LSI ready interrupt.

+  *            @arg RCC_IT_LSERDY: LSE ready interrupt.

+  *            @arg RCC_IT_HSIRDY: HSI ready interrupt.

+  *            @arg RCC_IT_HSERDY: HSE ready interrupt.

+  *            @arg RCC_IT_PLLRDY: Main PLL ready interrupt.

+  *            @arg RCC_IT_PLLI2SRDY: PLLI2S ready interrupt.

+  */

+#define __HAL_RCC_ENABLE_IT(__INTERRUPT__) (*(__IO uint8_t *) RCC_CIR_BYTE1_ADDRESS |= (__INTERRUPT__))

+

+/** @brief Disable RCC interrupt (Perform Byte access to RCC_CIR[14:8] bits to disable 

+  *        the selected interrupts).

+  * @param  __INTERRUPT__: specifies the RCC interrupt sources to be disabled.

+  *         This parameter can be any combination of the following values:

+  *            @arg RCC_IT_LSIRDY: LSI ready interrupt.

+  *            @arg RCC_IT_LSERDY: LSE ready interrupt.

+  *            @arg RCC_IT_HSIRDY: HSI ready interrupt.

+  *            @arg RCC_IT_HSERDY: HSE ready interrupt.

+  *            @arg RCC_IT_PLLRDY: Main PLL ready interrupt.

+  *            @arg RCC_IT_PLLI2SRDY: PLLI2S ready interrupt.

+  */

+#define __HAL_RCC_DISABLE_IT(__INTERRUPT__) (*(__IO uint8_t *) RCC_CIR_BYTE1_ADDRESS &= ~(__INTERRUPT__))

+

+/** @brief  Clear the RCC's interrupt pending bits (Perform Byte access to RCC_CIR[23:16]

+  *         bits to clear the selected interrupt pending bits.

+  * @param  __INTERRUPT__: specifies the interrupt pending bit to clear.

+  *         This parameter can be any combination of the following values:

+  *            @arg RCC_IT_LSIRDY: LSI ready interrupt.

+  *            @arg RCC_IT_LSERDY: LSE ready interrupt.

+  *            @arg RCC_IT_HSIRDY: HSI ready interrupt.

+  *            @arg RCC_IT_HSERDY: HSE ready interrupt.

+  *            @arg RCC_IT_PLLRDY: Main PLL ready interrupt.

+  *            @arg RCC_IT_PLLI2SRDY: PLLI2S ready interrupt.  

+  *            @arg RCC_IT_CSS: Clock Security System interrupt

+  */

+#define __HAL_RCC_CLEAR_IT(__INTERRUPT__) (*(__IO uint8_t *) RCC_CIR_BYTE2_ADDRESS = (__INTERRUPT__))

+

+/** @brief  Check the RCC's interrupt has occurred or not.

+  * @param  __INTERRUPT__: specifies the RCC interrupt source to check.

+  *         This parameter can be one of the following values:

+  *            @arg RCC_IT_LSIRDY: LSI ready interrupt.

+  *            @arg RCC_IT_LSERDY: LSE ready interrupt.

+  *            @arg RCC_IT_HSIRDY: HSI ready interrupt.

+  *            @arg RCC_IT_HSERDY: HSE ready interrupt.

+  *            @arg RCC_IT_PLLRDY: Main PLL ready interrupt.

+  *            @arg RCC_IT_PLLI2SRDY: PLLI2S ready interrupt.

+  *            @arg RCC_IT_CSS: Clock Security System interrupt

+  * @retval The new state of __INTERRUPT__ (TRUE or FALSE).

+  */

+#define __HAL_RCC_GET_IT(__INTERRUPT__) ((RCC->CIR & (__INTERRUPT__)) == (__INTERRUPT__))

+

+/** @brief Set RMVF bit to clear the reset flags: RCC_FLAG_PINRST, RCC_FLAG_PORRST, 

+  *        RCC_FLAG_SFTRST, RCC_FLAG_IWDGRST, RCC_FLAG_WWDGRST and RCC_FLAG_LPWRRST.

+  */

+#define __HAL_RCC_CLEAR_RESET_FLAGS() (RCC->CSR |= RCC_CSR_RMVF)

+

+/** @brief  Check RCC flag is set or not.

+  * @param  __FLAG__: specifies the flag to check.

+  *         This parameter can be one of the following values:

+  *            @arg RCC_FLAG_HSIRDY: HSI oscillator clock ready.

+  *            @arg RCC_FLAG_HSERDY: HSE oscillator clock ready.

+  *            @arg RCC_FLAG_PLLRDY: Main PLL clock ready.

+  *            @arg RCC_FLAG_PLLI2SRDY: PLLI2S clock ready.

+  *            @arg RCC_FLAG_LSERDY: LSE oscillator clock ready.

+  *            @arg RCC_FLAG_LSIRDY: LSI oscillator clock ready.

+  *            @arg RCC_FLAG_BORRST: POR/PDR or BOR reset.

+  *            @arg RCC_FLAG_PINRST: Pin reset.

+  *            @arg RCC_FLAG_PORRST: POR/PDR reset.

+  *            @arg RCC_FLAG_SFTRST: Software reset.

+  *            @arg RCC_FLAG_IWDGRST: Independent Watchdog reset.

+  *            @arg RCC_FLAG_WWDGRST: Window Watchdog reset.

+  *            @arg RCC_FLAG_LPWRRST: Low Power reset.

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define RCC_FLAG_MASK  ((uint8_t)0x1F)

+#define __HAL_RCC_GET_FLAG(__FLAG__) (((((((__FLAG__) >> 5) == 1)? RCC->CR :((((__FLAG__) >> 5) == 2) ? RCC->BDCR :((((__FLAG__) >> 5) == 3)? RCC->CSR :RCC->CIR))) & ((uint32_t)1 << ((__FLAG__) & RCC_FLAG_MASK)))!= 0)? 1 : 0)

+

+/**

+  * @}

+  */

+     

+/**

+  * @}

+  */

+

+/* Include RCC HAL Extension module */

+#include "stm32f7xx_hal_rcc_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+ /** @addtogroup RCC_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup RCC_Exported_Functions_Group1

+  * @{

+  */                             

+/* Initialization and de-initialization functions  ******************************/

+void HAL_RCC_DeInit(void);

+HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct);

+HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency);

+/**

+  * @}

+  */

+

+/** @addtogroup RCC_Exported_Functions_Group2

+  * @{

+  */

+/* Peripheral Control functions  ************************************************/

+void     HAL_RCC_MCOConfig(uint32_t RCC_MCOx, uint32_t RCC_MCOSource, uint32_t RCC_MCODiv);

+void     HAL_RCC_EnableCSS(void);

+void     HAL_RCC_DisableCSS(void);

+uint32_t HAL_RCC_GetSysClockFreq(void);

+uint32_t HAL_RCC_GetHCLKFreq(void);

+uint32_t HAL_RCC_GetPCLK1Freq(void);

+uint32_t HAL_RCC_GetPCLK2Freq(void);

+void     HAL_RCC_GetOscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct);

+void     HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency);

+

+/* CSS NMI IRQ handler */

+void HAL_RCC_NMI_IRQHandler(void);

+

+/* User Callbacks in non blocking mode (IT mode) */ 

+void HAL_RCC_CSSCallback(void);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup RCC_Private_Constants RCC Private Constants

+  * @{

+  */

+#define HSE_TIMEOUT_VALUE          HSE_STARTUP_TIMEOUT

+#define HSI_TIMEOUT_VALUE          ((uint32_t)100)  /* 100 ms */

+#define LSI_TIMEOUT_VALUE          ((uint32_t)100)  /* 100 ms */

+#define PLL_TIMEOUT_VALUE          ((uint32_t)100)  /* 100 ms */

+#define CLOCKSWITCH_TIMEOUT_VALUE  ((uint32_t)5000) /* 5 s    */ 

+

+/** @defgroup RCC_BitAddress_Alias RCC BitAddress Alias

+  * @brief RCC registers bit address alias

+  * @{

+  */

+/* CIR register byte 2 (Bits[15:8]) base address */

+#define RCC_CIR_BYTE1_ADDRESS         ((uint32_t)(RCC_BASE + 0x0C + 0x01))

+

+/* CIR register byte 3 (Bits[23:16]) base address */

+#define RCC_CIR_BYTE2_ADDRESS         ((uint32_t)(RCC_BASE + 0x0C + 0x02))

+

+#define RCC_DBP_TIMEOUT_VALUE      ((uint32_t)100)

+#define RCC_LSE_TIMEOUT_VALUE      ((uint32_t)5000)

+/**

+  * @}

+  */

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @addtogroup RCC_Private_Macros RCC Private Macros

+  * @{

+  */

+    

+/** @defgroup RCC_IS_RCC_Definitions RCC Private macros to check input parameters

+  * @{

+  */  

+#define IS_RCC_OSCILLATORTYPE(OSCILLATOR) ((OSCILLATOR) <= 15)

+

+#define IS_RCC_HSE(HSE) (((HSE) == RCC_HSE_OFF) || ((HSE) == RCC_HSE_ON) || \

+                         ((HSE) == RCC_HSE_BYPASS))

+

+#define IS_RCC_LSE(LSE) (((LSE) == RCC_LSE_OFF) || ((LSE) == RCC_LSE_ON) || \

+                         ((LSE) == RCC_LSE_BYPASS))

+

+#define IS_RCC_HSI(HSI) (((HSI) == RCC_HSI_OFF) || ((HSI) == RCC_HSI_ON))

+

+#define IS_RCC_LSI(LSI) (((LSI) == RCC_LSI_OFF) || ((LSI) == RCC_LSI_ON))

+

+#define IS_RCC_PLL(PLL) (((PLL) == RCC_PLL_NONE) ||((PLL) == RCC_PLL_OFF) || ((PLL) == RCC_PLL_ON))

+

+#define IS_RCC_PLLSOURCE(SOURCE) (((SOURCE) == RCC_PLLSOURCE_HSI) || \

+                                  ((SOURCE) == RCC_PLLSOURCE_HSE))

+

+#define IS_RCC_SYSCLKSOURCE(SOURCE) (((SOURCE) == RCC_SYSCLKSOURCE_HSI) || \

+                                     ((SOURCE) == RCC_SYSCLKSOURCE_HSE) || \

+                                     ((SOURCE) == RCC_SYSCLKSOURCE_PLLCLK))

+#define IS_RCC_PLLM_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 63))

+

+#define IS_RCC_PLLN_VALUE(VALUE) ((192 <= (VALUE)) && ((VALUE) <= 432))

+

+#define IS_RCC_PLLP_VALUE(VALUE) (((VALUE) == RCC_PLLP_DIV2) || ((VALUE) == RCC_PLLP_DIV4) || \

+                                  ((VALUE) == RCC_PLLP_DIV6) || ((VALUE) == RCC_PLLP_DIV8))

+#define IS_RCC_PLLQ_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 15))

+

+#define IS_RCC_HCLK(HCLK) (((HCLK) == RCC_SYSCLK_DIV1)   || ((HCLK) == RCC_SYSCLK_DIV2)   || \

+                           ((HCLK) == RCC_SYSCLK_DIV4)   || ((HCLK) == RCC_SYSCLK_DIV8)   || \

+                           ((HCLK) == RCC_SYSCLK_DIV16)  || ((HCLK) == RCC_SYSCLK_DIV64)  || \

+                           ((HCLK) == RCC_SYSCLK_DIV128) || ((HCLK) == RCC_SYSCLK_DIV256) || \

+                           ((HCLK) == RCC_SYSCLK_DIV512))

+

+#define IS_RCC_CLOCKTYPE(CLK) ((1 <= (CLK)) && ((CLK) <= 15))

+

+#define IS_RCC_PCLK(PCLK) (((PCLK) == RCC_HCLK_DIV1) || ((PCLK) == RCC_HCLK_DIV2) || \

+                           ((PCLK) == RCC_HCLK_DIV4) || ((PCLK) == RCC_HCLK_DIV8) || \

+                           ((PCLK) == RCC_HCLK_DIV16))

+

+#define IS_RCC_MCO(MCOX) (((MCOX) == RCC_MCO1) || ((MCOX) == RCC_MCO2))

+

+

+#define IS_RCC_MCO1SOURCE(SOURCE) (((SOURCE) == RCC_MCO1SOURCE_HSI) || ((SOURCE) == RCC_MCO1SOURCE_LSE) || \

+                                   ((SOURCE) == RCC_MCO1SOURCE_HSE) || ((SOURCE) == RCC_MCO1SOURCE_PLLCLK))

+

+#define IS_RCC_MCO2SOURCE(SOURCE) (((SOURCE) == RCC_MCO2SOURCE_SYSCLK) || ((SOURCE) == RCC_MCO2SOURCE_PLLI2SCLK)|| \

+                                   ((SOURCE) == RCC_MCO2SOURCE_HSE)    || ((SOURCE) == RCC_MCO2SOURCE_PLLCLK))

+

+#define IS_RCC_MCODIV(DIV) (((DIV) == RCC_MCODIV_1)  || ((DIV) == RCC_MCODIV_2) || \

+                             ((DIV) == RCC_MCODIV_3) || ((DIV) == RCC_MCODIV_4) || \

+                             ((DIV) == RCC_MCODIV_5)) 

+#define IS_RCC_CALIBRATION_VALUE(VALUE) ((VALUE) <= 0x1F)

+

+#define IS_RCC_RTCCLKSOURCE(SOURCE) (((SOURCE) == RCC_RTCCLKSOURCE_LSE) || ((SOURCE) == RCC_RTCCLKSOURCE_LSI) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV2) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV3) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV4) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV5) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV6) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV7) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV8) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV9) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV10) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV11) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV12) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV13) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV14) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV15) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV16) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV17) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV18) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV19) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV20) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV21) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV22) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV23) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV24) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV25) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV26) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV27) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV28) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV29) || \

+                                     ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV30) || ((SOURCE) == RCC_RTCCLKSOURCE_HSE_DIV31))

+

+

+#define IS_RCC_LSE_DRIVE(DRIVE) (((DRIVE) == RCC_LSEDRIVE_LOW)        || \

+                                     ((DRIVE) == RCC_LSEDRIVE_MEDIUMLOW)  || \

+                                     ((DRIVE) == RCC_LSEDRIVE_MEDIUMHIGH) || \

+                                     ((DRIVE) == RCC_LSEDRIVE_HIGH))

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_RCC_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rcc_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rcc_ex.h
new file mode 100644
index 0000000..ea77668
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rcc_ex.h
@@ -0,0 +1,2698 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_rcc_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of RCC HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_RCC_EX_H

+#define __STM32F7xx_HAL_RCC_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup RCCEx

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup RCCEx_Exported_Types RCCEx Exported Types

+  * @{

+  */

+

+/** 

+  * @brief  PLLI2S Clock structure definition  

+  */

+typedef struct

+{

+  uint32_t PLLI2SN;    /*!< Specifies the multiplication factor for PLLI2S VCO output clock.

+                            This parameter must be a number between Min_Data = 49 and Max_Data = 432.

+                            This parameter will be used only when PLLI2S is selected as Clock Source I2S or SAI */

+

+  uint32_t PLLI2SR;    /*!< Specifies the division factor for I2S clock.

+                            This parameter must be a number between Min_Data = 2 and Max_Data = 7. 

+                            This parameter will be used only when PLLI2S is selected as Clock Source I2S or SAI */

+

+  uint32_t PLLI2SQ;    /*!< Specifies the division factor for SAI1 clock.

+                            This parameter must be a number between Min_Data = 2 and Max_Data = 15. 

+                            This parameter will be used only when PLLI2S is selected as Clock Source SAI */

+

+  uint32_t PLLI2SP;    /*!< Specifies the division factor for SPDIF-RX clock.

+                            This parameter must be a number between 0 and 3 for respective values 2, 4, 6 and 8. 

+                            This parameter will be used only when PLLI2S is selected as Clock Source SPDDIF-RX */

+}RCC_PLLI2SInitTypeDef;

+

+/** 

+  * @brief  PLLSAI Clock structure definition  

+  */

+typedef struct

+{

+  uint32_t PLLSAIN;    /*!< Specifies the multiplication factor for PLLI2S VCO output clock.

+                            This parameter must be a number between Min_Data = 49 and Max_Data = 432.

+                            This parameter will be used only when PLLSAI is selected as Clock Source SAI or LTDC */ 

+                                 

+  uint32_t PLLSAIQ;    /*!< Specifies the division factor for SAI1 clock.

+                            This parameter must be a number between Min_Data = 2 and Max_Data = 15.

+                            This parameter will be used only when PLLSAI is selected as Clock Source SAI or LTDC */

+                              

+  uint32_t PLLSAIR;    /*!< specifies the division factor for LTDC clock

+                            This parameter must be a number between Min_Data = 2 and Max_Data = 7.

+                            This parameter will be used only when PLLSAI is selected as Clock Source LTDC */

+

+  uint32_t PLLSAIP;    /*!< Specifies the division factor for 48MHz clock.

+                            This parameter can be a value of @ref RCCEx_PLLSAIP_Clock_Divider

+                            This parameter will be used only when PLLSAI is disabled */

+}RCC_PLLSAIInitTypeDef;

+

+/** 

+  * @brief  RCC extended clocks structure definition  

+  */

+typedef struct

+{

+  uint32_t PeriphClockSelection; /*!< The Extended Clock to be configured.

+                                      This parameter can be a value of @ref RCCEx_Periph_Clock_Selection */

+

+  RCC_PLLI2SInitTypeDef PLLI2S;  /*!< PLL I2S structure parameters. 

+                                      This parameter will be used only when PLLI2S is selected as Clock Source I2S or SAI */

+

+  RCC_PLLSAIInitTypeDef PLLSAI;  /*!< PLL SAI structure parameters. 

+                                      This parameter will be used only when PLLI2S is selected as Clock Source SAI or LTDC */

+

+  uint32_t PLLI2SDivQ;           /*!< Specifies the PLLI2S division factor for SAI1 clock.

+                                      This parameter must be a number between Min_Data = 1 and Max_Data = 32

+                                      This parameter will be used only when PLLI2S is selected as Clock Source SAI */

+

+  uint32_t PLLSAIDivQ;           /*!< Specifies the PLLI2S division factor for SAI1 clock.

+                                      This parameter must be a number between Min_Data = 1 and Max_Data = 32

+                                      This parameter will be used only when PLLSAI is selected as Clock Source SAI */

+

+  uint32_t PLLSAIDivR;           /*!< Specifies the PLLSAI division factor for LTDC clock.

+                                      This parameter must be one value of @ref RCCEx_PLLSAI_DIVR */

+

+  uint32_t RTCClockSelection;      /*!< Specifies RTC Clock source Selection. 

+                                        This parameter can be a value of @ref RCC_RTC_Clock_Source */

+                                        

+  uint32_t I2sClockSelection;      /*!< Specifies I2S Clock source Selection. 

+                                        This parameter can be a value of @ref RCCEx_I2S_Clock_Source */

+

+  uint32_t TIMPresSelection;      /*!< Specifies TIM Clock Prescalers Selection. 

+                                       This parameter can be a value of @ref RCCEx_TIM_Prescaler_Selection */

+  

+  uint32_t Sai1ClockSelection;     /*!< Specifies SAI1 Clock Prescalers Selection

+                                        This parameter can be a value of @ref RCCEx_SAI1_Clock_Source */

+

+  uint32_t Sai2ClockSelection;     /*!< Specifies SAI2 Clock Prescalers Selection

+                                        This parameter can be a value of @ref RCCEx_SAI2_Clock_Source */

+  

+  uint32_t Usart1ClockSelection; /*!< USART1 clock source      

+                                      This parameter can be a value of @ref RCCEx_USART1_Clock_Source */

+  

+  uint32_t Usart2ClockSelection; /*!< USART2 clock source      

+                                      This parameter can be a value of @ref RCCEx_USART2_Clock_Source */

+

+  uint32_t Usart3ClockSelection; /*!< USART3 clock source      

+                                      This parameter can be a value of @ref RCCEx_USART3_Clock_Source */                                

+  

+  uint32_t Uart4ClockSelection;  /*!< UART4 clock source      

+                                      This parameter can be a value of @ref RCCEx_UART4_Clock_Source */

+  

+  uint32_t Uart5ClockSelection;  /*!< UART5 clock source      

+                                      This parameter can be a value of @ref RCCEx_UART5_Clock_Source */

+  

+  uint32_t Usart6ClockSelection;  /*!< USART6 clock source      

+                                      This parameter can be a value of @ref RCCEx_USART6_Clock_Source */

+  

+  uint32_t Uart7ClockSelection;  /*!< UART7 clock source      

+                                      This parameter can be a value of @ref RCCEx_UART7_Clock_Source */

+  

+  uint32_t Uart8ClockSelection;  /*!< UART8 clock source      

+                                      This parameter can be a value of @ref RCCEx_UART8_Clock_Source */

+  

+  uint32_t I2c1ClockSelection;   /*!< I2C1 clock source      

+                                      This parameter can be a value of @ref RCCEx_I2C1_Clock_Source */

+

+  uint32_t I2c2ClockSelection;   /*!< I2C2 clock source      

+                                      This parameter can be a value of @ref RCCEx_I2C2_Clock_Source */

+

+  uint32_t I2c3ClockSelection;   /*!< I2C3 clock source      

+                                      This parameter can be a value of @ref RCCEx_I2C3_Clock_Source */

+  

+  uint32_t I2c4ClockSelection;   /*!< I2C4 clock source      

+                                      This parameter can be a value of @ref RCCEx_I2C4_Clock_Source */

+  

+  uint32_t Lptim1ClockSelection;   /*!< Specifies LPTIM1 clock source

+                                        This parameter can be a value of @ref RCCEx_LPTIM1_Clock_Source */

+  

+  uint32_t CecClockSelection;      /*!< CEC clock source      

+                                        This parameter can be a value of @ref RCCEx_CEC_Clock_Source */

+  

+  uint32_t Clk48ClockSelection;    /*!< Specifies 48Mhz clock source used by USB OTG FS, RNG and SDMMC

+                                        This parameter can be a value of @ref RCCEx_CLK48_Clock_Source */

+  

+  uint32_t Sdmmc1ClockSelection;     /*!< SDMMC1 clock source      

+                                        This parameter can be a value of @ref RCCEx_SDMMC1_Clock_Source */

+

+}RCC_PeriphCLKInitTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup RCCEx_Exported_Constants RCCEx Exported Constants

+  * @{

+  */

+

+/** @defgroup RCCEx_Periph_Clock_Selection RCC Periph Clock Selection

+  * @{

+  */

+#define RCC_PERIPHCLK_I2S             ((uint32_t)0x00000001)

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define RCC_PERIPHCLK_LTDC            ((uint32_t)0x00000008)

+#endif /* STM32F756xx || STM32F746xx */

+#define RCC_PERIPHCLK_TIM             ((uint32_t)0x00000010)

+#define RCC_PERIPHCLK_RTC             ((uint32_t)0x00000020)

+#define RCC_PERIPHCLK_USART1          ((uint32_t)0x00000040)

+#define RCC_PERIPHCLK_USART2          ((uint32_t)0x00000080)

+#define RCC_PERIPHCLK_USART3          ((uint32_t)0x00000100)

+#define RCC_PERIPHCLK_UART4           ((uint32_t)0x00000200)

+#define RCC_PERIPHCLK_UART5           ((uint32_t)0x00000400)

+#define RCC_PERIPHCLK_USART6          ((uint32_t)0x00000800)

+#define RCC_PERIPHCLK_UART7           ((uint32_t)0x00001000)

+#define RCC_PERIPHCLK_UART8           ((uint32_t)0x00002000)

+#define RCC_PERIPHCLK_I2C1            ((uint32_t)0x00004000)

+#define RCC_PERIPHCLK_I2C2            ((uint32_t)0x00008000)

+#define RCC_PERIPHCLK_I2C3            ((uint32_t)0x00010000)

+#define RCC_PERIPHCLK_I2C4            ((uint32_t)0x00020000)

+#define RCC_PERIPHCLK_LPTIM1          ((uint32_t)0x00040000)

+#define RCC_PERIPHCLK_SAI1            ((uint32_t)0x00080000)

+#define RCC_PERIPHCLK_SAI2            ((uint32_t)0x00100000)

+#define RCC_PERIPHCLK_CLK48           ((uint32_t)0x00200000)

+#define RCC_PERIPHCLK_CEC             ((uint32_t)0x00400000)

+#define RCC_PERIPHCLK_SDMMC1          ((uint32_t)0x00800000)

+#define RCC_PERIPHCLK_SPDIFRX         ((uint32_t)0x01000000)

+#define RCC_PERIPHCLK_PLLI2S          ((uint32_t)0x02000000)

+

+

+/**

+  * @}

+  */

+  

+/** @defgroup RCCEx_PLLSAIP_Clock_Divider RCCEx PLLSAIP Clock Divider

+  * @{

+  */

+#define RCC_PLLSAIP_DIV2                  ((uint32_t)0x00000000)

+#define RCC_PLLSAIP_DIV4                  ((uint32_t)0x00000001)

+#define RCC_PLLSAIP_DIV6                  ((uint32_t)0x00000002)

+#define RCC_PLLSAIP_DIV8                  ((uint32_t)0x00000003)

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_PLLSAI_DIVR RCCEx PLLSAI DIVR

+  * @{

+  */

+#define RCC_PLLSAIDIVR_2                ((uint32_t)0x00000000)

+#define RCC_PLLSAIDIVR_4                RCC_DCKCFGR1_PLLSAIDIVR_0

+#define RCC_PLLSAIDIVR_8                RCC_DCKCFGR1_PLLSAIDIVR_1

+#define RCC_PLLSAIDIVR_16               RCC_DCKCFGR1_PLLSAIDIVR

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_I2S_Clock_Source RCCEx I2S Clock Source

+  * @{

+  */

+#define RCC_I2SCLKSOURCE_PLLI2S             ((uint32_t)0x00000000)

+#define RCC_I2SCLKSOURCE_EXT                RCC_CFGR_I2SSRC

+

+/**

+  * @}

+  */ 

+  

+  

+/** @defgroup RCCEx_SAI1_Clock_Source RCCEx SAI1 Clock Source

+  * @{

+  */

+#define RCC_SAI1CLKSOURCE_PLLSAI             ((uint32_t)0x00000000)

+#define RCC_SAI1CLKSOURCE_PLLI2S             RCC_DCKCFGR1_SAI1SEL_0

+#define RCC_SAI1CLKSOURCE_PIN                RCC_DCKCFGR1_SAI1SEL_1

+

+/**

+  * @}

+  */ 

+

+/** @defgroup RCCEx_SAI2_Clock_Source RCCEx SAI2 Clock Source

+  * @{

+  */

+#define RCC_SAI2CLKSOURCE_PLLSAI             ((uint32_t)0x00000000)

+#define RCC_SAI2CLKSOURCE_PLLI2S             RCC_DCKCFGR1_SAI2SEL_0

+#define RCC_SAI2CLKSOURCE_PIN                RCC_DCKCFGR1_SAI2SEL_1

+/**

+  * @}

+  */ 

+

+/** @defgroup RCCEx_SDMMC1_Clock_Source RCCEx SDMMC1 Clock Source

+  * @{

+  */

+#define RCC_SDMMC1CLKSOURCE_CLK48              ((uint32_t)0x00000000)

+#define RCC_SDMMC1CLKSOURCE_SYSCLK             RCC_DCKCFGR2_SDMMC1SEL

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_CEC_Clock_Source RCCEx CEC Clock Source

+  * @{

+  */

+#define RCC_CECCLKSOURCE_LSE             ((uint32_t)0x00000000)

+#define RCC_CECCLKSOURCE_HSI             RCC_DCKCFGR2_CECSEL /* CEC clock is HSI/488*/

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_USART1_Clock_Source RCCEx USART1 Clock Source

+  * @{

+  */

+#define RCC_USART1CLKSOURCE_PCLK2      ((uint32_t)0x00000000)

+#define RCC_USART1CLKSOURCE_SYSCLK     RCC_DCKCFGR2_USART1SEL_0

+#define RCC_USART1CLKSOURCE_HSI        RCC_DCKCFGR2_USART1SEL_1

+#define RCC_USART1CLKSOURCE_LSE        RCC_DCKCFGR2_USART1SEL

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_USART2_Clock_Source RCCEx USART2 Clock Source

+  * @{

+  */

+#define RCC_USART2CLKSOURCE_PCLK1       ((uint32_t)0x00000000)

+#define RCC_USART2CLKSOURCE_SYSCLK     RCC_DCKCFGR2_USART2SEL_0

+#define RCC_USART2CLKSOURCE_HSI        RCC_DCKCFGR2_USART2SEL_1

+#define RCC_USART2CLKSOURCE_LSE        RCC_DCKCFGR2_USART2SEL

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_USART3_Clock_Source RCCEx USART3 Clock Source

+  * @{

+  */

+#define RCC_USART3CLKSOURCE_PCLK1       ((uint32_t)0x00000000)

+#define RCC_USART3CLKSOURCE_SYSCLK     RCC_DCKCFGR2_USART3SEL_0

+#define RCC_USART3CLKSOURCE_HSI        RCC_DCKCFGR2_USART3SEL_1

+#define RCC_USART3CLKSOURCE_LSE        RCC_DCKCFGR2_USART3SEL

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_UART4_Clock_Source RCCEx UART4 Clock Source

+  * @{

+  */

+#define RCC_UART4CLKSOURCE_PCLK1        ((uint32_t)0x00000000)

+#define RCC_UART4CLKSOURCE_SYSCLK       RCC_DCKCFGR2_UART4SEL_0

+#define RCC_UART4CLKSOURCE_HSI          RCC_DCKCFGR2_UART4SEL_1

+#define RCC_UART4CLKSOURCE_LSE          RCC_DCKCFGR2_UART4SEL

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_UART5_Clock_Source RCCEx UART5 Clock Source

+  * @{

+  */

+#define RCC_UART5CLKSOURCE_PCLK1        ((uint32_t)0x00000000)

+#define RCC_UART5CLKSOURCE_SYSCLK       RCC_DCKCFGR2_UART5SEL_0

+#define RCC_UART5CLKSOURCE_HSI          RCC_DCKCFGR2_UART5SEL_1

+#define RCC_UART5CLKSOURCE_LSE          RCC_DCKCFGR2_UART5SEL

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_USART6_Clock_Source RCCEx USART6 Clock Source

+  * @{

+  */

+#define RCC_USART6CLKSOURCE_PCLK2       ((uint32_t)0x00000000)

+#define RCC_USART6CLKSOURCE_SYSCLK      RCC_DCKCFGR2_USART6SEL_0

+#define RCC_USART6CLKSOURCE_HSI         RCC_DCKCFGR2_USART6SEL_1

+#define RCC_USART6CLKSOURCE_LSE         RCC_DCKCFGR2_USART6SEL

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_UART7_Clock_Source RCCEx UART7 Clock Source

+  * @{

+  */

+#define RCC_UART7CLKSOURCE_PCLK1       ((uint32_t)0x00000000)

+#define RCC_UART7CLKSOURCE_SYSCLK      RCC_DCKCFGR2_UART7SEL_0

+#define RCC_UART7CLKSOURCE_HSI         RCC_DCKCFGR2_UART7SEL_1

+#define RCC_UART7CLKSOURCE_LSE         RCC_DCKCFGR2_UART7SEL

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_UART8_Clock_Source RCCEx UART8 Clock Source

+  * @{

+  */

+#define RCC_UART8CLKSOURCE_PCLK1        ((uint32_t)0x00000000)

+#define RCC_UART8CLKSOURCE_SYSCLK      RCC_DCKCFGR2_UART8SEL_0

+#define RCC_UART8CLKSOURCE_HSI         RCC_DCKCFGR2_UART8SEL_1

+#define RCC_UART8CLKSOURCE_LSE         RCC_DCKCFGR2_UART8SEL

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_I2C1_Clock_Source RCCEx I2C1 Clock Source

+  * @{

+  */

+#define RCC_I2C1CLKSOURCE_PCLK1        ((uint32_t)0x00000000)

+#define RCC_I2C1CLKSOURCE_SYSCLK       RCC_DCKCFGR2_I2C1SEL_0

+#define RCC_I2C1CLKSOURCE_HSI          RCC_DCKCFGR2_I2C1SEL_1

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_I2C2_Clock_Source RCCEx I2C2 Clock Source

+  * @{

+  */

+#define RCC_I2C2CLKSOURCE_PCLK1        ((uint32_t)0x00000000)

+#define RCC_I2C2CLKSOURCE_SYSCLK       RCC_DCKCFGR2_I2C2SEL_0

+#define RCC_I2C2CLKSOURCE_HSI          RCC_DCKCFGR2_I2C2SEL_1

+

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_I2C3_Clock_Source RCCEx I2C3 Clock Source

+  * @{

+  */

+#define RCC_I2C3CLKSOURCE_PCLK1        ((uint32_t)0x00000000)

+#define RCC_I2C3CLKSOURCE_SYSCLK       RCC_DCKCFGR2_I2C3SEL_0

+#define RCC_I2C3CLKSOURCE_HSI          RCC_DCKCFGR2_I2C3SEL_1

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_I2C4_Clock_Source RCCEx I2C4 Clock Source

+  * @{

+  */

+#define RCC_I2C4CLKSOURCE_PCLK1        ((uint32_t)0x00000000)

+#define RCC_I2C4CLKSOURCE_SYSCLK       RCC_DCKCFGR2_I2C4SEL_0

+#define RCC_I2C4CLKSOURCE_HSI          RCC_DCKCFGR2_I2C4SEL_1

+/**

+  * @}

+  */

+

+

+/** @defgroup RCCEx_LPTIM1_Clock_Source RCCEx LPTIM1 Clock Source

+  * @{

+  */

+#define RCC_LPTIM1CLKSOURCE_PCLK       ((uint32_t)0x00000000)

+#define RCC_LPTIM1CLKSOURCE_LSI        RCC_DCKCFGR2_LPTIM1SEL_0

+#define RCC_LPTIM1CLKSOURCE_HSI        RCC_DCKCFGR2_LPTIM1SEL_1

+#define RCC_LPTIM1CLKSOURCE_LSE        RCC_DCKCFGR2_LPTIM1SEL

+

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_CLK48_Clock_Source RCCEx CLK48 Clock Source

+  * @{

+  */

+#define RCC_CLK48SOURCE_PLL         ((uint32_t)0x00000000)

+#define RCC_CLK48SOURCE_PLLSAIP     RCC_DCKCFGR2_CK48MSEL

+/**

+  * @}

+  */

+

+/** @defgroup RCCEx_TIM_Prescaler_Selection RCCEx TIM Prescaler Selection

+  * @{

+  */

+#define RCC_TIMPRES_DESACTIVATED        ((uint32_t)0x00000000)

+#define RCC_TIMPRES_ACTIVATED           RCC_DCKCFGR1_TIMPRE

+

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+     

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup RCCEx_Exported_Macros RCCEx Exported Macros

+  * @{

+  */

+/** @defgroup RCCEx_Peripheral_Clock_Enable_Disable RCCEx_Peripheral_Clock_Enable_Disable

+  * @brief  Enables or disables the AHB/APB peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before 

+  *         using it.   

+  * @{

+  */

+ 

+/** @brief  Enables or disables the AHB1 peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before 

+  *         using it.

+  */

+#define __HAL_RCC_BKPSRAM_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_BKPSRAMEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_BKPSRAMEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+									  

+#define __HAL_RCC_DTCMRAMEN_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DTCMRAMEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DTCMRAMEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+									  

+#define __HAL_RCC_DMA2_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA2EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA2EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)  

+

+#define __HAL_RCC_DMA2D_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA2DEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_DMA2DEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0) 

+

+#define __HAL_RCC_USB_OTG_HS_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_OTGHSEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_OTGHSEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_USB_OTG_HS_ULPI_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_OTGHSULPIEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_OTGHSULPIEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_GPIOA_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOAEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOAEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_GPIOB_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOBEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOBEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_GPIOC_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOCEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_GPIOD_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIODEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIODEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_GPIOE_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOEEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOEEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_GPIOF_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOFEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOFEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_GPIOG_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOGEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOGEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_GPIOH_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOHEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOHEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_GPIOI_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOIEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOIEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_GPIOJ_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOJEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOJEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_GPIOK_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOKEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_GPIOKEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_BKPSRAM_CLK_DISABLE()         (RCC->AHB1ENR &= ~(RCC_AHB1ENR_BKPSRAMEN))

+#define __HAL_RCC_DTCMRAMEN_CLK_DISABLE()       (RCC->AHB1ENR &= ~(RCC_AHB1ENR_DTCMRAMEN))

+#define __HAL_RCC_DMA2_CLK_DISABLE()            (RCC->AHB1ENR &= ~(RCC_AHB1ENR_DMA2EN))

+#define __HAL_RCC_DMA2D_CLK_DISABLE()           (RCC->AHB1ENR &= ~(RCC_AHB1ENR_DMA2DEN))

+#define __HAL_RCC_USB_OTG_HS_CLK_DISABLE()      (RCC->AHB1ENR &= ~(RCC_AHB1ENR_OTGHSEN))

+#define __HAL_RCC_USB_OTG_HS_ULPI_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_OTGHSULPIEN))

+#define __HAL_RCC_GPIOA_CLK_DISABLE()           (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOAEN))

+#define __HAL_RCC_GPIOB_CLK_DISABLE()           (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOBEN))

+#define __HAL_RCC_GPIOC_CLK_DISABLE()           (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOCEN))

+#define __HAL_RCC_GPIOD_CLK_DISABLE()           (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIODEN))

+#define __HAL_RCC_GPIOE_CLK_DISABLE()           (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOEEN))

+#define __HAL_RCC_GPIOF_CLK_DISABLE()           (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOFEN))

+#define __HAL_RCC_GPIOG_CLK_DISABLE()           (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOGEN))

+#define __HAL_RCC_GPIOH_CLK_DISABLE()           (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOHEN))

+#define __HAL_RCC_GPIOI_CLK_DISABLE()           (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOIEN))

+#define __HAL_RCC_GPIOJ_CLK_DISABLE()           (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOJEN))

+#define __HAL_RCC_GPIOK_CLK_DISABLE()           (RCC->AHB1ENR &= ~(RCC_AHB1ENR_GPIOKEN))

+/**

+  * @brief  Enable ETHERNET clock.

+  */

+#define __HAL_RCC_ETHMAC_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_ETHMACTX_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACTXEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACTXEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_ETHMACRX_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACRXEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACRXEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_ETHMACPTP_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACPTPEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB1ENR, RCC_AHB1ENR_ETHMACPTPEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+									  

+#define __HAL_RCC_ETH_CLK_ENABLE()       do {                            \

+                                     __HAL_RCC_ETHMAC_CLK_ENABLE();      \

+                                     __HAL_RCC_ETHMACTX_CLK_ENABLE();    \

+                                     __HAL_RCC_ETHMACRX_CLK_ENABLE();    \

+                                    } while(0)

+/**

+  * @brief  Disable ETHERNET clock.

+  */

+#define __HAL_RCC_ETHMAC_CLK_DISABLE()    (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACEN))

+#define __HAL_RCC_ETHMACTX_CLK_DISABLE()  (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACTXEN))

+#define __HAL_RCC_ETHMACRX_CLK_DISABLE()  (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACRXEN))

+#define __HAL_RCC_ETHMACPTP_CLK_DISABLE() (RCC->AHB1ENR &= ~(RCC_AHB1ENR_ETHMACPTPEN))

+#define __HAL_RCC_ETH_CLK_DISABLE()       do {                             \

+                                      __HAL_RCC_ETHMACTX_CLK_DISABLE();    \

+                                      __HAL_RCC_ETHMACRX_CLK_DISABLE();    \

+                                      __HAL_RCC_ETHMAC_CLK_DISABLE();      \

+                                     } while(0)

+                                     

+/** @brief  Enable or disable the AHB2 peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before 

+  *         using it.

+  */

+#define __HAL_RCC_DCMI_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_DCMIEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_DCMIEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_RNG_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_RNGEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_RNGEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_USB_OTG_FS_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_OTGFSEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_OTGFSEN);\

+                                        UNUSED(tmpreg); \

+										__HAL_RCC_SYSCFG_CLK_ENABLE();\

+                                      } while(0) 

+									  

+#define __HAL_RCC_DCMI_CLK_DISABLE()  (RCC->AHB2ENR &= ~(RCC_AHB2ENR_DCMIEN))

+#define __HAL_RCC_RNG_CLK_DISABLE()   (RCC->AHB2ENR &= ~(RCC_AHB2ENR_RNGEN))                                        

+

+#define __HAL_RCC_USB_OTG_FS_CLK_DISABLE() do { (RCC->AHB2ENR &= ~(RCC_AHB2ENR_OTGFSEN));\

+                                         __HAL_RCC_SYSCFG_CLK_DISABLE();\

+                                    }while(0)

+#if defined(STM32F756xx)

+#define __HAL_RCC_CRYP_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_CRYPEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_CRYPEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_HASH_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB2ENR, RCC_AHB2ENR_HASHEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_HASHEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+									  

+#define __HAL_RCC_CRYP_CLK_DISABLE()  (RCC->AHB2ENR &= ~(RCC_AHB2ENR_CRYPEN))

+#define __HAL_RCC_HASH_CLK_DISABLE()  (RCC->AHB2ENR &= ~(RCC_AHB2ENR_HASHEN)) 

+#endif /* STM32F756x */

+/** @brief  Enables or disables the AHB3 peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before 

+  *         using it. 

+  */

+#define __HAL_RCC_FMC_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_FMCEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_QSPI_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->AHB3ENR, RCC_AHB3ENR_QSPIEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->AHB3ENR, RCC_AHB3ENR_QSPIEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_FMC_CLK_DISABLE()   (RCC->AHB3ENR &= ~(RCC_AHB3ENR_FMCEN))

+#define __HAL_RCC_QSPI_CLK_DISABLE()  (RCC->AHB3ENR &= ~(RCC_AHB3ENR_QSPIEN))

+

+/** @brief  Enable or disable the Low Speed APB (APB1) peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before 

+  *         using it. 

+  */

+#define __HAL_RCC_TIM2_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM2EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM2EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM3_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM3EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM3EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM4_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM4EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM4EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM5_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM5EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM5EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM6_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM6EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM6EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM7_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM7EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM7EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM12_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM12EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM12EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM13_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM13EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM13EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM14_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM14EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_TIM14EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_LPTIM1_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_LPTIM1EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_LPTIM1EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_SPI2_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_SPI2EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_SPI2EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_SPI3_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_SPI3EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_SPI3EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_SPDIFRX_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_SPDIFRXEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_SPDIFRXEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_USART2_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_USART2EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_USART2EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_USART3_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_USART3EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_USART3EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_UART4_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_UART4EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_UART4EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_UART5_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_UART5EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_UART5EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_I2C1_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C1EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C1EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_I2C2_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C2EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C2EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_I2C3_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C3EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C3EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_I2C4_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C4EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_I2C4EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_CAN1_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_CAN1EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_CAN1EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_CAN2_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_CAN2EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_CAN2EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_CEC_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_CECEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_CECEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_DAC_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_DACEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_DACEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_UART7_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_UART7EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_UART7EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_UART8_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB1ENR, RCC_APB1ENR_UART8EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB1ENR, RCC_APB1ENR_UART8EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM2_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM2EN))

+#define __HAL_RCC_TIM3_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM3EN))

+#define __HAL_RCC_TIM4_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM4EN))

+#define __HAL_RCC_TIM5_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM5EN))

+#define __HAL_RCC_TIM6_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM6EN))

+#define __HAL_RCC_TIM7_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM7EN))

+#define __HAL_RCC_TIM12_CLK_DISABLE()  (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM12EN))

+#define __HAL_RCC_TIM13_CLK_DISABLE()  (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM13EN))

+#define __HAL_RCC_TIM14_CLK_DISABLE()  (RCC->APB1ENR &= ~(RCC_APB1ENR_TIM14EN))

+#define __HAL_RCC_LPTIM1_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_LPTIM1EN))

+#define __HAL_RCC_SPI2_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_SPI2EN))

+#define __HAL_RCC_SPI3_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_SPI3EN))

+#define __HAL_RCC_SPDIFRX_CLK_DISABLE()(RCC->APB1ENR &= ~(RCC_APB1ENR_SPDIFRXEN))

+#define __HAL_RCC_USART2_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_USART2EN))

+#define __HAL_RCC_USART3_CLK_DISABLE() (RCC->APB1ENR &= ~(RCC_APB1ENR_USART3EN))

+#define __HAL_RCC_UART4_CLK_DISABLE()  (RCC->APB1ENR &= ~(RCC_APB1ENR_UART4EN))

+#define __HAL_RCC_UART5_CLK_DISABLE()  (RCC->APB1ENR &= ~(RCC_APB1ENR_UART5EN))

+#define __HAL_RCC_I2C1_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_I2C1EN))

+#define __HAL_RCC_I2C2_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_I2C2EN))

+#define __HAL_RCC_I2C3_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_I2C3EN))

+#define __HAL_RCC_I2C4_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_I2C4EN))

+#define __HAL_RCC_CAN1_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_CAN1EN))

+#define __HAL_RCC_CAN2_CLK_DISABLE()   (RCC->APB1ENR &= ~(RCC_APB1ENR_CAN2EN))

+#define __HAL_RCC_CEC_CLK_DISABLE()    (RCC->APB1ENR &= ~(RCC_APB1ENR_CECEN))

+#define __HAL_RCC_DAC_CLK_DISABLE()    (RCC->APB1ENR &= ~(RCC_APB1ENR_DACEN))

+#define __HAL_RCC_UART7_CLK_DISABLE()  (RCC->APB1ENR &= ~(RCC_APB1ENR_UART7EN))

+#define __HAL_RCC_UART8_CLK_DISABLE()  (RCC->APB1ENR &= ~(RCC_APB1ENR_UART8EN))

+

+/** @brief  Enable or disable the High Speed APB (APB2) peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before 

+  *         using it.

+  */

+#define __HAL_RCC_TIM1_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM1EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM1EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM8_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM8EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM8EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_USART1_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_USART1EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_USART1EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_USART6_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_USART6EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_USART6EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_ADC1_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC1EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC1EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_ADC2_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC2EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC2EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_ADC3_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC3EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC3EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_SDMMC1_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SDMMC1EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SDMMC1EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_SPI1_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI1EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI1EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_SPI4_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI4EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI4EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM9_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM9EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM9EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM10_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM10EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM10EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_TIM11_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM11EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM11EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_SPI5_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI5EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI5EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_SPI6_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI6EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SPI6EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_SAI1_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI1EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI1EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#define __HAL_RCC_SAI2_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI2EN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_SAI2EN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define __HAL_RCC_LTDC_CLK_ENABLE()   do { \

+                                        __IO uint32_t tmpreg; \

+                                        SET_BIT(RCC->APB2ENR, RCC_APB2ENR_LTDCEN);\

+                                        /* Delay after an RCC peripheral clock enabling */ \

+                                        tmpreg = READ_BIT(RCC->APB2ENR, RCC_APB2ENR_LTDCEN);\

+                                        UNUSED(tmpreg); \

+                                      } while(0)

+#endif /* STM32F756xx || STM32F746xx */

+

+#define __HAL_RCC_TIM1_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM1EN))

+#define __HAL_RCC_TIM8_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM8EN))

+#define __HAL_RCC_USART1_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_USART1EN))

+#define __HAL_RCC_USART6_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_USART6EN))

+#define __HAL_RCC_ADC1_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_ADC1EN))

+#define __HAL_RCC_ADC2_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_ADC2EN))

+#define __HAL_RCC_ADC3_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_ADC3EN))

+#define __HAL_RCC_SDMMC1_CLK_DISABLE()  (RCC->APB2ENR &= ~(RCC_APB2ENR_SDMMC1EN))

+#define __HAL_RCC_SPI1_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI1EN))

+#define __HAL_RCC_SPI4_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI4EN))

+#define __HAL_RCC_TIM9_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM9EN))

+#define __HAL_RCC_TIM10_CLK_DISABLE()  (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM10EN))

+#define __HAL_RCC_TIM11_CLK_DISABLE()  (RCC->APB2ENR &= ~(RCC_APB2ENR_TIM11EN))

+#define __HAL_RCC_SPI5_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI5EN))

+#define __HAL_RCC_SPI6_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_SPI6EN))

+#define __HAL_RCC_SAI1_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_SAI1EN))

+#define __HAL_RCC_SAI2_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_SAI2EN))

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define __HAL_RCC_LTDC_CLK_DISABLE()   (RCC->APB2ENR &= ~(RCC_APB2ENR_LTDCEN))

+#endif /* STM32F756xx || STM32F746xx */

+/**

+  * @}

+  */

+

+

+/** @defgroup RCCEx_Peripheral_Clock_Enable_Disable_Status Peripheral Clock Enable Disable Status

+  * @brief  Get the enable or disable status of the AHB/APB peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before

+  *         using it.

+  * @{

+  */

+ 

+/** @brief  Get the enable or disable status of the AHB1 peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before

+  *         using it. 

+  */

+#define __HAL_RCC_BKPSRAM_IS_CLK_ENABLED()          ((RCC->AHB1ENR & (RCC_AHB1ENR_BKPSRAMEN)) != RESET)

+#define __HAL_RCC_DTCMRAMEN_IS_CLK_ENABLED()        ((RCC->AHB1ENR & (RCC_AHB1ENR_DTCMRAMEN)) != RESET)

+#define __HAL_RCC_DMA2_IS_CLK_ENABLED()             ((RCC->AHB1ENR & (RCC_AHB1ENR_DMA2EN)) != RESET)  

+#define __HAL_RCC_DMA2D_IS_CLK_ENABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_DMA2DEN)) != RESET)

+#define __HAL_RCC_USB_OTG_HS_IS_CLK_ENABLED()       ((RCC->AHB1ENR & (RCC_AHB1ENR_OTGHSEN)) != RESET)

+#define __HAL_RCC_USB_OTG_HS_ULPI_IS_CLK_ENABLED()  ((RCC->AHB1ENR & (RCC_AHB1ENR_OTGHSULPIEN)) != RESET)

+#define __HAL_RCC_GPIOA_IS_CLK_ENABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOAEN)) != RESET)

+#define __HAL_RCC_GPIOB_IS_CLK_ENABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOBEN)) != RESET)

+#define __HAL_RCC_GPIOC_IS_CLK_ENABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOCEN)) != RESET)

+#define __HAL_RCC_GPIOD_IS_CLK_ENABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIODEN)) != RESET)

+#define __HAL_RCC_GPIOE_IS_CLK_ENABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOEEN)) != RESET)

+#define __HAL_RCC_GPIOF_IS_CLK_ENABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOFEN)) != RESET)

+#define __HAL_RCC_GPIOG_IS_CLK_ENABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOGEN)) != RESET)

+#define __HAL_RCC_GPIOH_IS_CLK_ENABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOHEN)) != RESET)

+#define __HAL_RCC_GPIOI_IS_CLK_ENABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOIEN)) != RESET)

+#define __HAL_RCC_GPIOJ_IS_CLK_ENABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOJEN)) != RESET)

+#define __HAL_RCC_GPIOK_IS_CLK_ENABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOKEN)) != RESET)

+

+#define __HAL_RCC_BKPSRAM_IS_CLK_DISABLED()         ((RCC->AHB1ENR & (RCC_AHB1ENR_BKPSRAMEN)) == RESET)

+#define __HAL_RCC_DTCMRAMEN_IS_CLK_DISABLED()       ((RCC->AHB1ENR & (RCC_AHB1ENR_DTCMRAMEN)) == RESET)

+#define __HAL_RCC_DMA2_IS_CLK_DISABLED()            ((RCC->AHB1ENR & (RCC_AHB1ENR_DMA2EN)) == RESET)

+#define __HAL_RCC_DMA2D_IS_CLK_DISABLED()           ((RCC->AHB1ENR & (RCC_AHB1ENR_DMA2DEN)) == RESET)

+#define __HAL_RCC_USB_OTG_HS_IS_CLK_DISABLED()      ((RCC->AHB1ENR & (RCC_AHB1ENR_OTGHSEN)) == RESET)

+#define __HAL_RCC_USB_OTG_HS_ULPI_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_OTGHSULPIEN)) == RESET)

+#define __HAL_RCC_GPIOA_IS_CLK_DISABLED()           ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOAEN)) == RESET)

+#define __HAL_RCC_GPIOB_IS_CLK_DISABLED()           ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOBEN)) == RESET)

+#define __HAL_RCC_GPIOC_IS_CLK_DISABLED()           ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOCEN)) == RESET)

+#define __HAL_RCC_GPIOD_IS_CLK_DISABLED()           ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIODEN)) == RESET)

+#define __HAL_RCC_GPIOE_IS_CLK_DISABLED()           ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOEEN)) == RESET)

+#define __HAL_RCC_GPIOF_IS_CLK_DISABLED()           ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOFEN)) == RESET)

+#define __HAL_RCC_GPIOG_IS_CLK_DISABLED()           ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOGEN)) == RESET)

+#define __HAL_RCC_GPIOH_IS_CLK_DISABLED()           ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOHEN)) == RESET)

+#define __HAL_RCC_GPIOI_IS_CLK_DISABLED()           ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOIEN)) == RESET)

+#define __HAL_RCC_GPIOJ_IS_CLK_DISABLED()           ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOJEN)) == RESET)

+#define __HAL_RCC_GPIOK_IS_CLK_DISABLED()           ((RCC->AHB1ENR & (RCC_AHB1ENR_GPIOKEN)) == RESET)

+/**

+  * @brief  Enable ETHERNET clock.

+  */

+#define __HAL_RCC_ETHMAC_IS_CLK_ENABLED()     ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACEN)) != RESET)

+#define __HAL_RCC_ETHMACTX_IS_CLK_ENABLED()   ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACTXEN)) != RESET)

+#define __HAL_RCC_ETHMACRX_IS_CLK_ENABLED()   ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACRXEN)) != RESET)

+#define __HAL_RCC_ETHMACPTP_IS_CLK_ENABLED()  ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACPTPEN)) != RESET)

+#define __HAL_RCC_ETH_IS_CLK_ENABLED()        (__HAL_RCC_ETHMAC_IS_CLK_ENABLED()   && \

+                                               __HAL_RCC_ETHMACTX_IS_CLK_ENABLED() && \

+											   __HAL_RCC_ETHMACRX_IS_CLK_ENABLED())

+

+/**

+  * @brief  Disable ETHERNET clock.

+  */

+#define __HAL_RCC_ETHMAC_IS_CLK_DISABLED()    ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACEN)) == RESET)

+#define __HAL_RCC_ETHMACTX_IS_CLK_DISABLED()  ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACTXEN)) == RESET)

+#define __HAL_RCC_ETHMACRX_IS_CLK_DISABLED()  ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACRXEN)) == RESET)

+#define __HAL_RCC_ETHMACPTP_IS_CLK_DISABLED() ((RCC->AHB1ENR & (RCC_AHB1ENR_ETHMACPTPEN)) == RESET)

+#define __HAL_RCC_ETH_IS_CLK_DISABLED()        (__HAL_RCC_ETHMAC_IS_CLK_DISABLED()   && \

+                                                __HAL_RCC_ETHMACTX_IS_CLK_DISABLED() && \

+											    __HAL_RCC_ETHMACRX_IS_CLK_DISABLED())

+

+/** @brief  Get the enable or disable status of the AHB2 peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before

+  *         using it. 

+  */

+#define __HAL_RCC_DCMI_IS_CLK_ENABLED()        ((RCC->AHB2ENR & (RCC_AHB2ENR_DCMIEN)) != RESET)

+#define __HAL_RCC_RNG_IS_CLK_ENABLED()         ((RCC->AHB2ENR & (RCC_AHB2ENR_RNGEN)) != RESET)

+#define __HAL_RCC_USB_OTG_FS_IS_CLK_ENABLED()  ((RCC->AHB2ENR & (RCC_AHB2ENR_OTGFSEN)) != RESET)

+

+                                    

+#define __HAL_RCC_DCMI_IS_CLK_DISABLED()       ((RCC->AHB2ENR & (RCC_AHB2ENR_DCMIEN)) == RESET)

+#define __HAL_RCC_RNG_IS_CLK_DISABLED()        ((RCC->AHB2ENR & (RCC_AHB2ENR_RNGEN)) == RESET)                                        

+#define __HAL_RCC_USB_IS_OTG_FS_CLK_DISABLED() ((RCC->AHB2ENR & (RCC_AHB2ENR_OTGFSEN)) == RESET)

+

+#if defined(STM32F756xx)

+#define __HAL_RCC_CRYP_IS_CLK_ENABLED()   ((RCC->AHB2ENR & (RCC_AHB2ENR_CRYPEN)) != RESET)

+#define __HAL_RCC_HASH_IS_CLK_ENABLED()   ((RCC->AHB2ENR & (RCC_AHB2ENR_HASHEN)) != RESET)

+#define __HAL_RCC_CRYP_IS_CLK_DISABLED()  ((RCC->AHB2ENR & (RCC_AHB2ENR_CRYPEN)) == RESET)

+#define __HAL_RCC_HASH_IS_CLK_DISABLED()  ((RCC->AHB2ENR & (RCC_AHB2ENR_HASHEN)) == RESET) 

+#endif /* STM32F756x */

+

+/** @brief  Get the enable or disable status of the AHB3 peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before

+  *         using it.

+  */  

+#define __HAL_RCC_FMC_IS_CLK_ENABLED()   ((RCC->AHB3ENR & (RCC_AHB3ENR_FMCEN)) != RESET)

+#define __HAL_RCC_QSPI_IS_CLK_ENABLED()  ((RCC->AHB3ENR & (RCC_AHB3ENR_QSPIEN)) != RESET)

+

+#define __HAL_RCC_FMC_IS_CLK_DISABLED()   ((RCC->AHB3ENR & (RCC_AHB3ENR_FMCEN)) == RESET)

+#define __HAL_RCC_QSPI_IS_CLK_DISABLED()  ((RCC->AHB3ENR & (RCC_AHB3ENR_QSPIEN)) == RESET)

+

+/** @brief  Get the enable or disable status of the APB1 peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before

+  *         using it.

+  */

+#define __HAL_RCC_TIM2_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_TIM2EN)) != RESET)

+#define __HAL_RCC_TIM3_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_TIM3EN)) != RESET)

+#define __HAL_RCC_TIM4_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_TIM4EN)) != RESET)

+#define __HAL_RCC_TIM5_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_TIM5EN)) != RESET)

+#define __HAL_RCC_TIM6_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_TIM6EN)) != RESET)

+#define __HAL_RCC_TIM7_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_TIM7EN)) != RESET)

+#define __HAL_RCC_TIM12_IS_CLK_ENABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_TIM12EN)) != RESET)

+#define __HAL_RCC_TIM13_IS_CLK_ENABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_TIM13EN)) != RESET)

+#define __HAL_RCC_TIM14_IS_CLK_ENABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_TIM14EN)) != RESET)

+#define __HAL_RCC_LPTIM1_IS_CLK_ENABLED()  ((RCC->APB1ENR & (RCC_APB1ENR_LPTIM1EN)) != RESET)

+#define __HAL_RCC_SPI2_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_SPI2EN)) != RESET)

+#define __HAL_RCC_SPI3_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_SPI3EN)) != RESET)

+#define __HAL_RCC_SPDIFRX_IS_CLK_ENABLED() ((RCC->APB1ENR & (RCC_APB1ENR_SPDIFRXEN)) != RESET)

+#define __HAL_RCC_USART2_IS_CLK_ENABLED()  ((RCC->APB1ENR & (RCC_APB1ENR_USART2EN)) != RESET)

+#define __HAL_RCC_USART3_IS_CLK_ENABLED()  ((RCC->APB1ENR & (RCC_APB1ENR_USART3EN)) != RESET)

+#define __HAL_RCC_UART4_IS_CLK_ENABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_UART4EN)) != RESET)

+#define __HAL_RCC_UART5_IS_CLK_ENABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_UART5EN)) != RESET)

+#define __HAL_RCC_I2C1_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_I2C1EN)) != RESET)

+#define __HAL_RCC_I2C2_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_I2C2EN)) != RESET)

+#define __HAL_RCC_I2C3_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_I2C3EN)) != RESET)

+#define __HAL_RCC_I2C4_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_I2C4EN)) != RESET)

+#define __HAL_RCC_CAN1_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_CAN1EN)) != RESET)

+#define __HAL_RCC_CAN2_IS_CLK_ENABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_CAN2EN)) != RESET)

+#define __HAL_RCC_CEC_IS_CLK_ENABLED()     ((RCC->APB1ENR & (RCC_APB1ENR_CECEN)) != RESET)

+#define __HAL_RCC_DAC_IS_CLK_ENABLED()     ((RCC->APB1ENR & (RCC_APB1ENR_DACEN)) != RESET)

+#define __HAL_RCC_UART7_IS_CLK_ENABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_UART7EN)) != RESET)

+#define __HAL_RCC_UART8_IS_CLK_ENABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_UART8EN)) != RESET)

+

+#define __HAL_RCC_TIM2_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_TIM2EN)) == RESET)

+#define __HAL_RCC_TIM3_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_TIM3EN)) == RESET)

+#define __HAL_RCC_TIM4_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_TIM4EN)) == RESET)

+#define __HAL_RCC_TIM5_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_TIM5EN)) == RESET)

+#define __HAL_RCC_TIM6_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_TIM6EN)) == RESET)

+#define __HAL_RCC_TIM7_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_TIM7EN)) == RESET)

+#define __HAL_RCC_TIM12_IS_CLK_DISABLED()  ((RCC->APB1ENR & (RCC_APB1ENR_TIM12EN)) == RESET)

+#define __HAL_RCC_TIM13_IS_CLK_DISABLED()  ((RCC->APB1ENR & (RCC_APB1ENR_TIM13EN)) == RESET)

+#define __HAL_RCC_TIM14_IS_CLK_DISABLED()  ((RCC->APB1ENR & (RCC_APB1ENR_TIM14EN)) == RESET)

+#define __HAL_RCC_LPTIM1_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_LPTIM1EN)) == RESET)

+#define __HAL_RCC_SPI2_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_SPI2EN)) == RESET)

+#define __HAL_RCC_SPI3_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_SPI3EN)) == RESET)

+#define __HAL_RCC_SPDIFRX_IS_CLK_DISABLED()((RCC->APB1ENR & (RCC_APB1ENR_SPDIFRXEN)) == RESET)

+#define __HAL_RCC_USART2_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_USART2EN)) == RESET)

+#define __HAL_RCC_USART3_IS_CLK_DISABLED() ((RCC->APB1ENR & (RCC_APB1ENR_USART3EN)) == RESET)

+#define __HAL_RCC_UART4_IS_CLK_DISABLED()  ((RCC->APB1ENR & (RCC_APB1ENR_UART4EN)) == RESET)

+#define __HAL_RCC_UART5_IS_CLK_DISABLED()  ((RCC->APB1ENR & (RCC_APB1ENR_UART5EN)) == RESET)

+#define __HAL_RCC_I2C1_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_I2C1EN)) == RESET)

+#define __HAL_RCC_I2C2_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_I2C2EN)) == RESET)

+#define __HAL_RCC_I2C3_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_I2C3EN)) == RESET)

+#define __HAL_RCC_I2C4_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_I2C4EN)) == RESET)

+#define __HAL_RCC_CAN1_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_CAN1EN)) == RESET)

+#define __HAL_RCC_CAN2_IS_CLK_DISABLED()   ((RCC->APB1ENR & (RCC_APB1ENR_CAN2EN)) == RESET)

+#define __HAL_RCC_CEC_IS_CLK_DISABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_CECEN)) == RESET)

+#define __HAL_RCC_DAC_IS_CLK_DISABLED()    ((RCC->APB1ENR & (RCC_APB1ENR_DACEN)) == RESET)

+#define __HAL_RCC_UART7_IS_CLK_DISABLED()  ((RCC->APB1ENR & (RCC_APB1ENR_UART7EN)) == RESET)

+#define __HAL_RCC_UART8_IS_CLK_DISABLED()  ((RCC->APB1ENR & (RCC_APB1ENR_UART8EN)) == RESET)

+

+/** @brief  Get the enable or disable status of the APB2 peripheral clock.

+  * @note   After reset, the peripheral clock (used for registers read/write access)

+  *         is disabled and the application software has to enable this clock before

+  *         using it.

+  */

+#define __HAL_RCC_TIM1_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_TIM1EN)) != RESET)

+#define __HAL_RCC_TIM8_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_TIM8EN)) != RESET)

+#define __HAL_RCC_USART1_IS_CLK_ENABLED()  ((RCC->APB2ENR & (RCC_APB2ENR_USART1EN)) != RESET)

+#define __HAL_RCC_USART6_IS_CLK_ENABLED()  ((RCC->APB2ENR & (RCC_APB2ENR_USART6EN)) != RESET)

+#define __HAL_RCC_ADC1_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_ADC1EN)) != RESET)

+#define __HAL_RCC_ADC2_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_ADC2EN)) != RESET)

+#define __HAL_RCC_ADC3_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_ADC3EN)) != RESET)

+#define __HAL_RCC_SDMMC1_IS_CLK_ENABLED()  ((RCC->APB2ENR & (RCC_APB2ENR_SDMMC1EN)) != RESET)

+#define __HAL_RCC_SPI1_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_SPI1EN)) != RESET)

+#define __HAL_RCC_SPI4_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_SPI4EN)) != RESET)

+#define __HAL_RCC_TIM9_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_TIM9EN)) != RESET)

+#define __HAL_RCC_TIM10_IS_CLK_ENABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_TIM10EN)) != RESET)

+#define __HAL_RCC_TIM11_IS_CLK_ENABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_TIM11EN)) != RESET)

+#define __HAL_RCC_SPI5_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_SPI5EN)) != RESET)

+#define __HAL_RCC_SPI6_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_SPI6EN)) != RESET)

+#define __HAL_RCC_SAI1_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_SAI1EN)) != RESET)

+#define __HAL_RCC_SAI2_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_SAI2EN)) != RESET)

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define __HAL_RCC_LTDC_IS_CLK_ENABLED()    ((RCC->APB2ENR & (RCC_APB2ENR_LTDCEN)) != RESET)

+#endif /* STM32F756xx || STM32F746xx */

+#define __HAL_RCC_TIM1_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_TIM1EN)) == RESET)

+#define __HAL_RCC_TIM8_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_TIM8EN)) == RESET)

+#define __HAL_RCC_USART1_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_USART1EN)) == RESET)

+#define __HAL_RCC_USART6_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_USART6EN)) == RESET)

+#define __HAL_RCC_ADC1_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_ADC1EN)) == RESET)

+#define __HAL_RCC_ADC2_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_ADC2EN)) == RESET)

+#define __HAL_RCC_ADC3_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_ADC3EN)) == RESET)

+#define __HAL_RCC_SDMMC1_IS_CLK_DISABLED() ((RCC->APB2ENR & (RCC_APB2ENR_SDMMC1EN)) == RESET)

+#define __HAL_RCC_SPI1_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_SPI1EN)) == RESET)

+#define __HAL_RCC_SPI4_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_SPI4EN)) == RESET)

+#define __HAL_RCC_TIM9_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_TIM9EN)) == RESET)

+#define __HAL_RCC_TIM10_IS_CLK_DISABLED()  ((RCC->APB2ENR & (RCC_APB2ENR_TIM10EN)) == RESET)

+#define __HAL_RCC_TIM11_IS_CLK_DISABLED()  ((RCC->APB2ENR & (RCC_APB2ENR_TIM11EN)) == RESET)

+#define __HAL_RCC_SPI5_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_SPI5EN)) == RESET)

+#define __HAL_RCC_SPI6_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_SPI6EN)) == RESET)

+#define __HAL_RCC_SAI1_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_SAI1EN)) == RESET)

+#define __HAL_RCC_SAI2_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_SAI2EN)) == RESET)

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define __HAL_RCC_LTDC_IS_CLK_DISABLED()   ((RCC->APB2ENR & (RCC_APB2ENR_LTDCEN)) == RESET)  

+#endif /* STM32F756xx || STM32F746xx */

+/**

+  * @}

+  */  

+

+/** @defgroup RCCEx_Force_Release_Peripheral_Reset RCCEx Force Release Peripheral Reset

+  * @brief  Forces or releases AHB/APB peripheral reset.

+  * @{

+  */

+  

+/** @brief  Force or release AHB1 peripheral reset.

+  */  

+#define __HAL_RCC_DMA2_FORCE_RESET()    (RCC->AHB1RSTR |= (RCC_AHB1RSTR_DMA2RST))

+#define __HAL_RCC_DMA2D_FORCE_RESET()    (RCC->AHB1RSTR |= (RCC_AHB1RSTR_DMA2DRST))

+#define __HAL_RCC_ETHMAC_FORCE_RESET()   (RCC->AHB1RSTR |= (RCC_AHB1RSTR_ETHMACRST))

+#define __HAL_RCC_USB_OTG_HS_FORCE_RESET()    (RCC->AHB1RSTR |= (RCC_AHB1RSTR_OTGHRST))

+#define __HAL_RCC_GPIOA_FORCE_RESET()   (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOARST))

+#define __HAL_RCC_GPIOB_FORCE_RESET()   (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOBRST))

+#define __HAL_RCC_GPIOC_FORCE_RESET()   (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOCRST))

+#define __HAL_RCC_GPIOD_FORCE_RESET()   (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIODRST))

+#define __HAL_RCC_GPIOE_FORCE_RESET()   (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOERST))

+#define __HAL_RCC_GPIOF_FORCE_RESET()   (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOFRST))

+#define __HAL_RCC_GPIOG_FORCE_RESET()   (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOGRST))

+#define __HAL_RCC_GPIOH_FORCE_RESET()   (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOHRST))

+#define __HAL_RCC_GPIOI_FORCE_RESET()   (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOIRST))

+#define __HAL_RCC_GPIOJ_FORCE_RESET()   (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOJRST))

+#define __HAL_RCC_GPIOK_FORCE_RESET()   (RCC->AHB1RSTR |= (RCC_AHB1RSTR_GPIOKRST))

+

+#define __HAL_RCC_DMA2_RELEASE_RESET()  (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_DMA2RST))

+#define __HAL_RCC_DMA2D_RELEASE_RESET()  (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_DMA2DRST))

+#define __HAL_RCC_ETHMAC_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_ETHMACRST))

+#define __HAL_RCC_USB_OTG_HS_RELEASE_RESET()  (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_OTGHRST))

+#define __HAL_RCC_GPIOA_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOARST))

+#define __HAL_RCC_GPIOB_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOBRST))

+#define __HAL_RCC_GPIOC_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOCRST))

+#define __HAL_RCC_GPIOD_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIODRST))

+#define __HAL_RCC_GPIOE_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOERST))

+#define __HAL_RCC_GPIOF_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOFRST))

+#define __HAL_RCC_GPIOG_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOGRST))

+#define __HAL_RCC_GPIOH_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOHRST))

+#define __HAL_RCC_GPIOI_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOIRST))

+#define __HAL_RCC_GPIOJ_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOJRST))

+#define __HAL_RCC_GPIOK_RELEASE_RESET() (RCC->AHB1RSTR &= ~(RCC_AHB1RSTR_GPIOKRST))

+ 

+/** @brief  Force or release AHB2 peripheral reset.

+  */

+#define __HAL_RCC_AHB2_FORCE_RESET()    (RCC->AHB2RSTR = 0xFFFFFFFF) 

+#define __HAL_RCC_DCMI_FORCE_RESET()   (RCC->AHB2RSTR |= (RCC_AHB2RSTR_DCMIRST))

+

+#define __HAL_RCC_RNG_FORCE_RESET()    (RCC->AHB2RSTR |= (RCC_AHB2RSTR_RNGRST))

+#define __HAL_RCC_USB_OTG_FS_FORCE_RESET()   (RCC->AHB2RSTR |= (RCC_AHB2RSTR_OTGFSRST))

+

+#define __HAL_RCC_AHB2_RELEASE_RESET()  (RCC->AHB2RSTR = 0x00)

+#define __HAL_RCC_DCMI_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_DCMIRST))

+#define __HAL_RCC_RNG_RELEASE_RESET()  (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_RNGRST))

+#define __HAL_RCC_USB_OTG_FS_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_OTGFSRST))

+

+#if defined(STM32F756xx)

+#define __HAL_RCC_CRYP_FORCE_RESET()   (RCC->AHB2RSTR |= (RCC_AHB2RSTR_CRYPRST))

+#define __HAL_RCC_HASH_FORCE_RESET()   (RCC->AHB2RSTR |= (RCC_AHB2RSTR_HASHRST))

+#define __HAL_RCC_CRYP_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_CRYPRST))

+#define __HAL_RCC_HASH_RELEASE_RESET() (RCC->AHB2RSTR &= ~(RCC_AHB2RSTR_HASHRST))

+#endif /* STM32F756xx */

+

+/** @brief  Force or release AHB3 peripheral reset

+  */ 

+#define __HAL_RCC_AHB3_FORCE_RESET()   (RCC->AHB3RSTR = 0xFFFFFFFF) 

+#define __HAL_RCC_FMC_FORCE_RESET()    (RCC->AHB3RSTR |= (RCC_AHB3RSTR_FMCRST))

+#define __HAL_RCC_QSPI_FORCE_RESET()   (RCC->AHB3RSTR |= (RCC_AHB3RSTR_QSPIRST))

+

+#define __HAL_RCC_AHB3_RELEASE_RESET() (RCC->AHB3RSTR = 0x00)

+#define __HAL_RCC_FMC_RELEASE_RESET()  (RCC->AHB3RSTR &= ~(RCC_AHB3RSTR_FMCRST))

+#define __HAL_RCC_QSPI_RELEASE_RESET() (RCC->AHB3RSTR &= ~(RCC_AHB3RSTR_QSPIRST))

+ 

+/** @brief  Force or release APB1 peripheral reset.

+  */ 

+#define __HAL_RCC_TIM2_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM2RST))

+#define __HAL_RCC_TIM3_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM3RST))

+#define __HAL_RCC_TIM4_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM4RST))

+#define __HAL_RCC_TIM5_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM5RST))

+#define __HAL_RCC_TIM6_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM6RST))

+#define __HAL_RCC_TIM7_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM7RST))

+#define __HAL_RCC_TIM12_FORCE_RESET()    (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM12RST))

+#define __HAL_RCC_TIM13_FORCE_RESET()    (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM13RST))

+#define __HAL_RCC_TIM14_FORCE_RESET()    (RCC->APB1RSTR |= (RCC_APB1RSTR_TIM14RST))

+#define __HAL_RCC_LPTIM1_FORCE_RESET()   (RCC->APB1RSTR |= (RCC_APB1RSTR_LPTIM1RST))

+#define __HAL_RCC_SPI2_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_SPI2RST))

+#define __HAL_RCC_SPI3_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_SPI3RST))

+#define __HAL_RCC_SPDIFRX_FORCE_RESET()  (RCC->APB1RSTR |= (RCC_APB1RSTR_SPDIFRXRST))

+#define __HAL_RCC_USART2_FORCE_RESET()   (RCC->APB1RSTR |= (RCC_APB1RSTR_USART2RST))

+#define __HAL_RCC_USART3_FORCE_RESET()   (RCC->APB1RSTR |= (RCC_APB1RSTR_USART3RST))

+#define __HAL_RCC_UART4_FORCE_RESET()    (RCC->APB1RSTR |= (RCC_APB1RSTR_UART4RST))

+#define __HAL_RCC_UART5_FORCE_RESET()    (RCC->APB1RSTR |= (RCC_APB1RSTR_UART5RST))

+#define __HAL_RCC_I2C1_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_I2C1RST))

+#define __HAL_RCC_I2C2_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_I2C2RST))

+#define __HAL_RCC_I2C3_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_I2C3RST))

+#define __HAL_RCC_I2C4_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_I2C4RST))

+#define __HAL_RCC_CAN1_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_CAN1RST))

+#define __HAL_RCC_CAN2_FORCE_RESET()     (RCC->APB1RSTR |= (RCC_APB1RSTR_CAN2RST))

+#define __HAL_RCC_CEC_FORCE_RESET()      (RCC->APB1RSTR |= (RCC_APB1RSTR_CECRST))

+#define __HAL_RCC_DAC_FORCE_RESET()      (RCC->APB1RSTR |= (RCC_APB1RSTR_DACRST))

+#define __HAL_RCC_UART7_FORCE_RESET()    (RCC->APB1RSTR |= (RCC_APB1RSTR_UART7RST))

+#define __HAL_RCC_UART8_FORCE_RESET()    (RCC->APB1RSTR |= (RCC_APB1RSTR_UART8RST))

+

+#define __HAL_RCC_TIM2_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM2RST))

+#define __HAL_RCC_TIM3_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM3RST))

+#define __HAL_RCC_TIM4_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM4RST))

+#define __HAL_RCC_TIM5_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM5RST))

+#define __HAL_RCC_TIM6_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM6RST))

+#define __HAL_RCC_TIM7_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM7RST))

+#define __HAL_RCC_TIM12_RELEASE_RESET()  (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM12RST))

+#define __HAL_RCC_TIM13_RELEASE_RESET()  (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM13RST))

+#define __HAL_RCC_TIM14_RELEASE_RESET()  (RCC->APB1RSTR &= ~(RCC_APB1RSTR_TIM14RST))

+#define __HAL_RCC_LPTIM1_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_LPTIM1RST))

+#define __HAL_RCC_SPI2_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_SPI2RST))

+#define __HAL_RCC_SPI3_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_SPI3RST))

+#define __HAL_RCC_SPDIFRX_RELEASE_RESET()(RCC->APB1RSTR &= ~(RCC_APB1RSTR_SPDIFRXRST))

+#define __HAL_RCC_USART2_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_USART2RST))

+#define __HAL_RCC_USART3_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_USART3RST))

+#define __HAL_RCC_UART4_RELEASE_RESET()  (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART4RST))

+#define __HAL_RCC_UART5_RELEASE_RESET()  (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART5RST))

+#define __HAL_RCC_I2C1_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_I2C1RST))

+#define __HAL_RCC_I2C2_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_I2C2RST))

+#define __HAL_RCC_I2C3_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_I2C3RST))

+#define __HAL_RCC_I2C4_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_I2C4RST))

+#define __HAL_RCC_CAN1_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_CAN1RST))

+#define __HAL_RCC_CAN2_RELEASE_RESET()   (RCC->APB1RSTR &= ~(RCC_APB1RSTR_CAN2RST))

+#define __HAL_RCC_CEC_RELEASE_RESET()    (RCC->APB1RSTR &= ~(RCC_APB1RSTR_CECRST))

+#define __HAL_RCC_DAC_RELEASE_RESET()    (RCC->APB1RSTR &= ~(RCC_APB1RSTR_DACRST))

+#define __HAL_RCC_UART7_RELEASE_RESET()  (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART7RST))

+#define __HAL_RCC_UART8_RELEASE_RESET()  (RCC->APB1RSTR &= ~(RCC_APB1RSTR_UART8RST))

+

+/** @brief  Force or release APB2 peripheral reset.

+  */

+#define __HAL_RCC_TIM1_FORCE_RESET()     (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM1RST))

+#define __HAL_RCC_TIM8_FORCE_RESET()     (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM8RST))

+#define __HAL_RCC_USART1_FORCE_RESET()   (RCC->APB2RSTR |= (RCC_APB2RSTR_USART1RST))

+#define __HAL_RCC_USART6_FORCE_RESET()   (RCC->APB2RSTR |= (RCC_APB2RSTR_USART6RST))

+#define __HAL_RCC_ADC_FORCE_RESET()      (RCC->APB2RSTR |= (RCC_APB2RSTR_ADCRST))

+#define __HAL_RCC_SDMMC1_FORCE_RESET()   (RCC->APB2RSTR |= (RCC_APB2RSTR_SDMMC1RST))

+#define __HAL_RCC_SPI1_FORCE_RESET()     (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI1RST))

+#define __HAL_RCC_SPI4_FORCE_RESET()     (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI4RST))

+#define __HAL_RCC_TIM9_FORCE_RESET()     (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM9RST))

+#define __HAL_RCC_TIM10_FORCE_RESET()    (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM10RST))

+#define __HAL_RCC_TIM11_FORCE_RESET()    (RCC->APB2RSTR |= (RCC_APB2RSTR_TIM11RST))

+#define __HAL_RCC_SPI5_FORCE_RESET()     (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI5RST))

+#define __HAL_RCC_SPI6_FORCE_RESET()     (RCC->APB2RSTR |= (RCC_APB2RSTR_SPI6RST))

+#define __HAL_RCC_SAI1_FORCE_RESET()     (RCC->APB2RSTR |= (RCC_APB2RSTR_SAI1RST))

+#define __HAL_RCC_SAI2_FORCE_RESET()     (RCC->APB2RSTR |= (RCC_APB2RSTR_SAI2RST))

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define __HAL_RCC_LTDC_FORCE_RESET()     (RCC->APB2RSTR |= (RCC_APB2RSTR_LTDCRST))

+#endif /* STM32F756xx || STM32F746xx */

+

+#define __HAL_RCC_TIM1_RELEASE_RESET()   (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM1RST))

+#define __HAL_RCC_TIM8_RELEASE_RESET()   (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM8RST))

+#define __HAL_RCC_USART1_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_USART1RST))

+#define __HAL_RCC_USART6_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_USART6RST))

+#define __HAL_RCC_ADC_RELEASE_RESET()    (RCC->APB2RSTR &= ~(RCC_APB2RSTR_ADCRST))

+#define __HAL_RCC_SDMMC1_RELEASE_RESET() (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SDMMC1RST))

+#define __HAL_RCC_SPI1_RELEASE_RESET()   (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI1RST))

+#define __HAL_RCC_SPI4_RELEASE_RESET()   (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI4RST))

+#define __HAL_RCC_TIM9_RELEASE_RESET()   (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM9RST))

+#define __HAL_RCC_TIM10_RELEASE_RESET()  (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM10RST))

+#define __HAL_RCC_TIM11_RELEASE_RESET()  (RCC->APB2RSTR &= ~(RCC_APB2RSTR_TIM11RST))

+#define __HAL_RCC_SPI5_RELEASE_RESET()   (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI5RST))

+#define __HAL_RCC_SPI6_RELEASE_RESET()   (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SPI6RST))

+#define __HAL_RCC_SAI1_RELEASE_RESET()   (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SAI1RST))

+#define __HAL_RCC_SAI2_RELEASE_RESET()   (RCC->APB2RSTR &= ~(RCC_APB2RSTR_SAI2RST))

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define __HAL_RCC_LTDC_RELEASE_RESET()   (RCC->APB2RSTR &= ~(RCC_APB2RSTR_LTDCRST))

+#endif /* STM32F756xx || STM32F746xx */

+/**

+  * @}

+  */ 

+

+/** @defgroup RCCEx_Peripheral_Clock_Sleep_Enable_Disable RCCEx Peripheral Clock Sleep Enable Disable

+  * @brief  Enables or disables the AHB/APB peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  * @{

+  */ 

+  

+/** @brief  Enable or disable the AHB1 peripheral clock during Low Power (Sleep) mode.

+  */ 

+#define __HAL_RCC_FLITF_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_FLITFLPEN))

+#define __HAL_RCC_AXI_CLK_SLEEP_ENABLE()        (RCC->AHB1LPENR |= (RCC_AHB1LPENR_AXILPEN))

+#define __HAL_RCC_SRAM1_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_SRAM1LPEN))

+#define __HAL_RCC_SRAM2_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_SRAM2LPEN))

+#define __HAL_RCC_BKPSRAM_CLK_SLEEP_ENABLE()    (RCC->AHB1LPENR |= (RCC_AHB1LPENR_BKPSRAMLPEN))

+#define __HAL_RCC_DTCM_CLK_SLEEP_ENABLE()       (RCC->AHB1LPENR |= (RCC_AHB1LPENR_DTCMLPEN))

+#define __HAL_RCC_DMA2_CLK_SLEEP_ENABLE()       (RCC->AHB1LPENR |= (RCC_AHB1LPENR_DMA2LPEN))

+#define __HAL_RCC_DMA2D_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_DMA2DLPEN))

+#define __HAL_RCC_ETHMAC_CLK_SLEEP_ENABLE()     (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACLPEN))

+#define __HAL_RCC_ETHMACTX_CLK_SLEEP_ENABLE()   (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACTXLPEN))

+#define __HAL_RCC_ETHMACRX_CLK_SLEEP_ENABLE()   (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACRXLPEN))

+#define __HAL_RCC_ETHMACPTP_CLK_SLEEP_ENABLE()  (RCC->AHB1LPENR |= (RCC_AHB1LPENR_ETHMACPTPLPEN))

+#define __HAL_RCC_USB_OTG_HS_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_OTGHSLPEN))

+#define __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_ENABLE() (RCC->AHB1LPENR |= (RCC_AHB1LPENR_OTGHSULPILPEN))

+#define __HAL_RCC_GPIOA_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOALPEN))

+#define __HAL_RCC_GPIOB_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOBLPEN))

+#define __HAL_RCC_GPIOC_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOCLPEN))

+#define __HAL_RCC_GPIOD_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIODLPEN))

+#define __HAL_RCC_GPIOE_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOELPEN))

+#define __HAL_RCC_GPIOF_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOFLPEN))

+#define __HAL_RCC_GPIOG_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOGLPEN))

+#define __HAL_RCC_GPIOH_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOHLPEN))

+#define __HAL_RCC_GPIOI_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOILPEN))

+#define __HAL_RCC_GPIOJ_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOJLPEN))

+#define __HAL_RCC_GPIOK_CLK_SLEEP_ENABLE()      (RCC->AHB1LPENR |= (RCC_AHB1LPENR_GPIOKLPEN))

+

+#define __HAL_RCC_FLITF_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_FLITFLPEN))

+#define __HAL_RCC_AXI_CLK_SLEEP_DISABLE()       (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_AXILPEN))

+#define __HAL_RCC_SRAM1_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_SRAM1LPEN))

+#define __HAL_RCC_SRAM2_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_SRAM2LPEN))

+#define __HAL_RCC_BKPSRAM_CLK_SLEEP_DISABLE()   (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_BKPSRAMLPEN))

+#define __HAL_RCC_DTCM_CLK_SLEEP_DISABLE()      (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_DTCMLPEN))

+#define __HAL_RCC_DMA2_CLK_SLEEP_DISABLE()      (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_DMA2LPEN))

+#define __HAL_RCC_DMA2D_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_DMA2DLPEN))

+#define __HAL_RCC_ETHMAC_CLK_SLEEP_DISABLE()    (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACLPEN))

+#define __HAL_RCC_ETHMACTX_CLK_SLEEP_DISABLE()  (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACTXLPEN))

+#define __HAL_RCC_ETHMACRX_CLK_SLEEP_DISABLE()  (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACRXLPEN))

+#define __HAL_RCC_ETHMACPTP_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_ETHMACPTPLPEN))

+#define __HAL_RCC_USB_OTG_HS_CLK_SLEEP_DISABLE()      (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_OTGHSLPEN))

+#define __HAL_RCC_USB_OTG_HS_ULPI_CLK_SLEEP_DISABLE() (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_OTGHSULPILPEN))

+#define __HAL_RCC_GPIOA_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOALPEN))

+#define __HAL_RCC_GPIOB_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOBLPEN))

+#define __HAL_RCC_GPIOC_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOCLPEN))

+#define __HAL_RCC_GPIOD_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIODLPEN))

+#define __HAL_RCC_GPIOE_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOELPEN))

+#define __HAL_RCC_GPIOF_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOFLPEN))

+#define __HAL_RCC_GPIOG_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOGLPEN))

+#define __HAL_RCC_GPIOH_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOHLPEN))

+#define __HAL_RCC_GPIOI_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOILPEN))

+#define __HAL_RCC_GPIOJ_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOJLPEN))

+#define __HAL_RCC_GPIOK_CLK_SLEEP_DISABLE()     (RCC->AHB1LPENR &= ~(RCC_AHB1LPENR_GPIOKLPEN))

+

+/** @brief  Enable or disable the AHB2 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  */

+#define __HAL_RCC_DCMI_CLK_SLEEP_ENABLE()        (RCC->AHB2LPENR |= (RCC_AHB2LPENR_DCMILPEN))

+#define __HAL_RCC_DCMI_CLK_SLEEP_DISABLE()       (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_DCMILPEN))

+                                         

+#define __HAL_RCC_RNG_CLK_SLEEP_ENABLE()         (RCC->AHB2LPENR |= (RCC_AHB2LPENR_RNGLPEN))

+#define __HAL_RCC_RNG_CLK_SLEEP_DISABLE()        (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_RNGLPEN))

+

+#define __HAL_RCC_USB_OTG_FS_CLK_SLEEP_ENABLE()  (RCC->AHB2LPENR |= (RCC_AHB2LPENR_OTGFSLPEN))

+#define __HAL_RCC_USB_OTG_FS_CLK_SLEEP_DISABLE() (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_OTGFSLPEN))

+

+#if defined(STM32F756xx)

+#define __HAL_RCC_CRYP_CLK_SLEEP_ENABLE()        (RCC->AHB2LPENR |= (RCC_AHB2LPENR_CRYPLPEN))

+#define __HAL_RCC_HASH_CLK_SLEEP_ENABLE()        (RCC->AHB2LPENR |= (RCC_AHB2LPENR_HASHLPEN))

+                                         

+#define __HAL_RCC_CRYP_CLK_SLEEP_DISABLE()       (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_CRYPLPEN))

+#define __HAL_RCC_HASH_CLK_SLEEP_DISABLE()       (RCC->AHB2LPENR &= ~(RCC_AHB2LPENR_HASHLPEN))

+#endif /* STM32F756xx */

+

+/** @brief  Enable or disable the AHB3 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  */

+#define __HAL_RCC_FMC_CLK_SLEEP_ENABLE()  (RCC->AHB3LPENR |= (RCC_AHB3LPENR_FMCLPEN))

+#define __HAL_RCC_FMC_CLK_SLEEP_DISABLE() (RCC->AHB3LPENR &= ~(RCC_AHB3LPENR_FMCLPEN))

+

+#define __HAL_RCC_QSPI_CLK_SLEEP_ENABLE()  (RCC->AHB3LPENR |= (RCC_AHB3LPENR_QSPILPEN))

+#define __HAL_RCC_QSPI_CLK_SLEEP_DISABLE() (RCC->AHB3LPENR &= ~(RCC_AHB3LPENR_QSPILPEN))

+

+/** @brief  Enable or disable the APB1 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  */  

+#define __HAL_RCC_TIM2_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM2LPEN))

+#define __HAL_RCC_TIM3_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM3LPEN))

+#define __HAL_RCC_TIM4_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM4LPEN))

+#define __HAL_RCC_TIM5_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM5LPEN))

+#define __HAL_RCC_TIM6_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM6LPEN))

+#define __HAL_RCC_TIM7_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM7LPEN))

+#define __HAL_RCC_TIM12_CLK_SLEEP_ENABLE()   (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM12LPEN))

+#define __HAL_RCC_TIM13_CLK_SLEEP_ENABLE()   (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM13LPEN))

+#define __HAL_RCC_TIM14_CLK_SLEEP_ENABLE()   (RCC->APB1LPENR |= (RCC_APB1LPENR_TIM14LPEN))

+#define __HAL_RCC_LPTIM1_CLK_SLEEP_ENABLE()  (RCC->APB1LPENR |= (RCC_APB1LPENR_LPTIM1LPEN))

+#define __HAL_RCC_SPI2_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_SPI2LPEN))

+#define __HAL_RCC_SPI3_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_SPI3LPEN))

+#define __HAL_RCC_SPDIFRX_CLK_SLEEP_ENABLE() (RCC->APB1LPENR |= (RCC_APB1LPENR_SPDIFRXLPEN))

+#define __HAL_RCC_USART2_CLK_SLEEP_ENABLE()  (RCC->APB1LPENR |= (RCC_APB1LPENR_USART2LPEN))

+#define __HAL_RCC_USART3_CLK_SLEEP_ENABLE()  (RCC->APB1LPENR |= (RCC_APB1LPENR_USART3LPEN))

+#define __HAL_RCC_UART4_CLK_SLEEP_ENABLE()   (RCC->APB1LPENR |= (RCC_APB1LPENR_UART4LPEN))

+#define __HAL_RCC_UART5_CLK_SLEEP_ENABLE()   (RCC->APB1LPENR |= (RCC_APB1LPENR_UART5LPEN))

+#define __HAL_RCC_I2C1_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_I2C1LPEN))

+#define __HAL_RCC_I2C2_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_I2C2LPEN))

+#define __HAL_RCC_I2C3_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_I2C3LPEN))

+#define __HAL_RCC_I2C4_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_I2C4LPEN))

+#define __HAL_RCC_CAN1_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_CAN1LPEN))

+#define __HAL_RCC_CAN2_CLK_SLEEP_ENABLE()    (RCC->APB1LPENR |= (RCC_APB1LPENR_CAN2LPEN))

+#define __HAL_RCC_CEC_CLK_SLEEP_ENABLE()     (RCC->APB1LPENR |= (RCC_APB1LPENR_CECLPEN))

+#define __HAL_RCC_DAC_CLK_SLEEP_ENABLE()     (RCC->APB1LPENR |= (RCC_APB1LPENR_DACLPEN))

+#define __HAL_RCC_UART7_CLK_SLEEP_ENABLE()   (RCC->APB1LPENR |= (RCC_APB1LPENR_UART7LPEN))

+#define __HAL_RCC_UART8_CLK_SLEEP_ENABLE()   (RCC->APB1LPENR |= (RCC_APB1LPENR_UART8LPEN))

+

+#define __HAL_RCC_TIM2_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM2LPEN))

+#define __HAL_RCC_TIM3_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM3LPEN))

+#define __HAL_RCC_TIM4_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM4LPEN))

+#define __HAL_RCC_TIM5_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM5LPEN))

+#define __HAL_RCC_TIM6_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM6LPEN))

+#define __HAL_RCC_TIM7_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM7LPEN))

+#define __HAL_RCC_TIM12_CLK_SLEEP_DISABLE()  (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM12LPEN))

+#define __HAL_RCC_TIM13_CLK_SLEEP_DISABLE()  (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM13LPEN))

+#define __HAL_RCC_TIM14_CLK_SLEEP_DISABLE()  (RCC->APB1LPENR &= ~(RCC_APB1LPENR_TIM14LPEN))

+#define __HAL_RCC_LPTIM1_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_LPTIM1LPEN))

+#define __HAL_RCC_SPI2_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_SPI2LPEN))

+#define __HAL_RCC_SPI3_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_SPI3LPEN))

+#define __HAL_RCC_SPDIFRX_CLK_SLEEP_DISABLE()(RCC->APB1LPENR &= ~(RCC_APB1LPENR_SPDIFRXLPEN))

+#define __HAL_RCC_USART2_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_USART2LPEN))

+#define __HAL_RCC_USART3_CLK_SLEEP_DISABLE() (RCC->APB1LPENR &= ~(RCC_APB1LPENR_USART3LPEN))

+#define __HAL_RCC_UART4_CLK_SLEEP_DISABLE()  (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART4LPEN))

+#define __HAL_RCC_UART5_CLK_SLEEP_DISABLE()  (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART5LPEN))

+#define __HAL_RCC_I2C1_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C1LPEN))

+#define __HAL_RCC_I2C2_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C2LPEN))

+#define __HAL_RCC_I2C3_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C3LPEN))

+#define __HAL_RCC_I2C4_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_I2C4LPEN))

+#define __HAL_RCC_CAN1_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_CAN1LPEN))

+#define __HAL_RCC_CAN2_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_CAN2LPEN))

+#define __HAL_RCC_CEC_CLK_SLEEP_DISABLE()    (RCC->APB1LPENR &= ~(RCC_APB1LPENR_CECLPEN))

+#define __HAL_RCC_DAC_CLK_SLEEP_DISABLE()    (RCC->APB1LPENR &= ~(RCC_APB1LPENR_DACLPEN))

+#define __HAL_RCC_UART7_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART7LPEN))

+#define __HAL_RCC_UART8_CLK_SLEEP_DISABLE()   (RCC->APB1LPENR &= ~(RCC_APB1LPENR_UART8LPEN))

+

+/** @brief  Enable or disable the APB2 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  */ 

+#define __HAL_RCC_TIM1_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM1LPEN))

+#define __HAL_RCC_TIM8_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM8LPEN))

+#define __HAL_RCC_USART1_CLK_SLEEP_ENABLE()  (RCC->APB2LPENR |= (RCC_APB2LPENR_USART1LPEN))

+#define __HAL_RCC_USART6_CLK_SLEEP_ENABLE()  (RCC->APB2LPENR |= (RCC_APB2LPENR_USART6LPEN))

+#define __HAL_RCC_ADC1_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_ADC1LPEN))

+#define __HAL_RCC_ADC2_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_ADC2LPEN))

+#define __HAL_RCC_ADC3_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_ADC3LPEN))

+#define __HAL_RCC_SDMMC1_CLK_SLEEP_ENABLE()  (RCC->APB2LPENR |= (RCC_APB2LPENR_SDMMC1LPEN))

+#define __HAL_RCC_SPI1_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI1LPEN))

+#define __HAL_RCC_SPI4_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI4LPEN))

+#define __HAL_RCC_TIM9_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM9LPEN))

+#define __HAL_RCC_TIM10_CLK_SLEEP_ENABLE()   (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM10LPEN))

+#define __HAL_RCC_TIM11_CLK_SLEEP_ENABLE()   (RCC->APB2LPENR |= (RCC_APB2LPENR_TIM11LPEN))

+#define __HAL_RCC_SPI5_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI5LPEN))

+#define __HAL_RCC_SPI6_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_SPI6LPEN))

+#define __HAL_RCC_SAI1_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_SAI1LPEN))

+#define __HAL_RCC_SAI2_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_SAI2LPEN))

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define __HAL_RCC_LTDC_CLK_SLEEP_ENABLE()    (RCC->APB2LPENR |= (RCC_APB2LPENR_LTDCLPEN))

+#endif /* STM32F756xx || STM32F746xx */

+

+#define __HAL_RCC_TIM1_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM1LPEN))

+#define __HAL_RCC_TIM8_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM8LPEN))

+#define __HAL_RCC_USART1_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_USART1LPEN))

+#define __HAL_RCC_USART6_CLK_SLEEP_DISABLE() (RCC->APB2LPENR &= ~(RCC_APB2LPENR_USART6LPEN))

+#define __HAL_RCC_ADC1_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_ADC1LPEN))

+#define __HAL_RCC_ADC2_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_ADC2LPEN))

+#define __HAL_RCC_ADC3_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_ADC3LPEN))

+#define __HAL_RCC_SDMMC1_CLK_SLEEP_DISABLE()  (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SDMMC1LPEN))

+#define __HAL_RCC_SPI1_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI1LPEN))

+#define __HAL_RCC_SPI4_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI4LPEN))

+#define __HAL_RCC_TIM9_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM9LPEN))

+#define __HAL_RCC_TIM10_CLK_SLEEP_DISABLE()  (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM10LPEN))

+#define __HAL_RCC_TIM11_CLK_SLEEP_DISABLE()  (RCC->APB2LPENR &= ~(RCC_APB2LPENR_TIM11LPEN))

+#define __HAL_RCC_SPI5_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI5LPEN))

+#define __HAL_RCC_SPI6_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SPI6LPEN))

+#define __HAL_RCC_SAI1_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SAI1LPEN))

+#define __HAL_RCC_SAI2_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_SAI2LPEN))

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define __HAL_RCC_LTDC_CLK_SLEEP_DISABLE()   (RCC->APB2LPENR &= ~(RCC_APB2LPENR_LTDCLPEN))

+#endif /* STM32F756xx || STM32F746xx */

+/**

+  * @}

+  */

+

+/** @defgroup RCC_Clock_Sleep_Enable_Disable_Status AHB/APB Peripheral Clock Sleep Enable Disable Status

+  * @brief  Get the enable or disable status of the AHB/APB peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  * @{

+  */

+  

+/** @brief  Get the enable or disable status of the AHB1 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.  

+  */

+#define __HAL_RCC_FLITF_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_FLITFLPEN)) != RESET)

+#define __HAL_RCC_AXI_IS_CLK_SLEEP_ENABLED()        ((RCC->AHB1LPENR & (RCC_AHB1LPENR_AXILPEN)) != RESET)

+#define __HAL_RCC_SRAM1_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_SRAM1LPEN)) != RESET)

+#define __HAL_RCC_SRAM2_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_SRAM2LPEN)) != RESET)

+#define __HAL_RCC_BKPSRAM_IS_CLK_SLEEP_ENABLED()    ((RCC->AHB1LPENR & (RCC_AHB1LPENR_BKPSRAMLPEN)) != RESET)

+#define __HAL_RCC_DTCM_IS_CLK_SLEEP_ENABLED()       ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DTCMLPEN)) != RESET)

+#define __HAL_RCC_DMA2_IS_CLK_SLEEP_ENABLED()       ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA2LPEN)) != RESET)

+#define __HAL_RCC_DMA2D_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA2DLPEN)) != RESET)

+#define __HAL_RCC_ETHMAC_IS_CLK_SLEEP_ENABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACLPEN)) != RESET)

+#define __HAL_RCC_ETHMACTX_IS_CLK_SLEEP_ENABLED()   ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACTXLPEN)) != RESET)

+#define __HAL_RCC_ETHMACRX_IS_CLK_SLEEP_ENABLED()   ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACRXLPEN)) != RESET)

+#define __HAL_RCC_ETHMACPTP_IS_CLK_SLEEP_ENABLED()  ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACPTPLPEN)) != RESET)

+#define __HAL_RCC_USB_OTG_HS_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_OTGHSLPEN)) != RESET)

+#define __HAL_RCC_USB_OTG_HS_ULPI_IS_CLK_SLEEP_ENABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_OTGHSULPILPEN)) != RESET)

+#define __HAL_RCC_GPIOA_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOALPEN)) != RESET)

+#define __HAL_RCC_GPIOB_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOBLPEN)) != RESET)

+#define __HAL_RCC_GPIOC_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOCLPEN)) != RESET)

+#define __HAL_RCC_GPIOD_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIODLPEN)) != RESET)

+#define __HAL_RCC_GPIOE_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOELPEN)) != RESET)

+#define __HAL_RCC_GPIOF_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOFLPEN)) != RESET)

+#define __HAL_RCC_GPIOG_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOGLPEN)) != RESET)

+#define __HAL_RCC_GPIOH_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOHLPEN)) != RESET)

+#define __HAL_RCC_GPIOI_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOILPEN)) != RESET)

+#define __HAL_RCC_GPIOJ_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOJLPEN)) != RESET)

+#define __HAL_RCC_GPIOK_IS_CLK_SLEEP_ENABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOKLPEN)) != RESET)

+

+#define __HAL_RCC_FLITF_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_FLITFLPEN)) == RESET)

+#define __HAL_RCC_AXI_IS_CLK_SLEEP_DISABLED()       ((RCC->AHB1LPENR & (RCC_AHB1LPENR_AXILPEN)) == RESET)

+#define __HAL_RCC_SRAM1_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_SRAM1LPEN)) == RESET)

+#define __HAL_RCC_SRAM2_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_SRAM2LPEN)) == RESET)

+#define __HAL_RCC_BKPSRAM_IS_CLK_SLEEP_DISABLED()   ((RCC->AHB1LPENR & (RCC_AHB1LPENR_BKPSRAMLPEN)) == RESET)

+#define __HAL_RCC_DTCM_IS_CLK_SLEEP_DISABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DTCMLPEN)) == RESET)

+#define __HAL_RCC_DMA2_IS_CLK_SLEEP_DISABLED()      ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA2LPEN)) == RESET)

+#define __HAL_RCC_DMA2D_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_DMA2DLPEN)) == RESET)

+#define __HAL_RCC_ETHMAC_IS_CLK_SLEEP_DISABLED()    ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACLPEN)) == RESET)

+#define __HAL_RCC_ETHMACTX_IS_CLK_SLEEP_DISABLED()  ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACTXLPEN)) == RESET)

+#define __HAL_RCC_ETHMACRX_IS_CLK_SLEEP_DISABLED()  ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACRXLPEN)) == RESET)

+#define __HAL_RCC_ETHMACPTP_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_ETHMACPTPLPEN)) == RESET)

+#define __HAL_RCC_USB_OTG_HS_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_OTGHSLPEN)) == RESET)

+#define __HAL_RCC_USB_OTG_HS_ULPI_IS_CLK_SLEEP_DISABLED() ((RCC->AHB1LPENR & (RCC_AHB1LPENR_OTGHSULPILPEN)) == RESET)

+#define __HAL_RCC_GPIOA_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOALPEN)) == RESET)

+#define __HAL_RCC_GPIOB_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOBLPEN)) == RESET)

+#define __HAL_RCC_GPIOC_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOCLPEN)) == RESET)

+#define __HAL_RCC_GPIOD_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIODLPEN)) == RESET)

+#define __HAL_RCC_GPIOE_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOELPEN)) == RESET)

+#define __HAL_RCC_GPIOF_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOFLPEN)) == RESET)

+#define __HAL_RCC_GPIOG_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOGLPEN)) == RESET)

+#define __HAL_RCC_GPIOH_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOHLPEN)) == RESET)

+#define __HAL_RCC_GPIOI_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOILPEN)) == RESET)

+#define __HAL_RCC_GPIOJ_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOJLPEN)) == RESET)

+#define __HAL_RCC_GPIOK_IS_CLK_SLEEP_DISABLED()     ((RCC->AHB1LPENR & (RCC_AHB1LPENR_GPIOKLPEN)) == RESET)

+

+/** @brief  Get the enable or disable status of the AHB2 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  */

+#define __HAL_RCC_DCMI_IS_CLK_SLEEP_ENABLED()        ((RCC->AHB2LPENR & (RCC_AHB2LPENR_DCMILPEN)) != RESET)

+#define __HAL_RCC_DCMI_IS_CLK_SLEEP_DISABLED()       ((RCC->AHB2LPENR & (RCC_AHB2LPENR_DCMILPEN)) == RESET)

+                                         

+#define __HAL_RCC_RNG_IS_CLK_SLEEP_ENABLED()         ((RCC->AHB2LPENR & (RCC_AHB2LPENR_RNGLPEN)) != RESET)

+#define __HAL_RCC_RNG_IS_CLK_SLEEP_DISABLED()        ((RCC->AHB2LPENR & (RCC_AHB2LPENR_RNGLPEN)) == RESET)

+

+#define __HAL_RCC_USB_OTG_FS_IS_CLK_SLEEP_ENABLED()  ((RCC->AHB2LPENR & (RCC_AHB2LPENR_OTGFSLPEN)) != RESET)

+#define __HAL_RCC_USB_OTG_FS_IS_CLK_SLEEP_DISABLED() ((RCC->AHB2LPENR & (RCC_AHB2LPENR_OTGFSLPEN)) == RESET)

+

+#if defined(STM32F756xx)

+#define __HAL_RCC_CRYP_IS_CLK_SLEEP_ENABLED()        ((RCC->AHB2LPENR & (RCC_AHB2LPENR_CRYPLPEN)) != RESET)

+#define __HAL_RCC_HASH_IS_CLK_SLEEP_ENABLED()        ((RCC->AHB2LPENR & (RCC_AHB2LPENR_HASHLPEN)) != RESET)

+                                         

+#define __HAL_RCC_CRYP_IS_CLK_SLEEP_DISABLED()       ((RCC->AHB2LPENR & (RCC_AHB2LPENR_CRYPLPEN)) == RESET)

+#define __HAL_RCC_HASH_IS_CLK_SLEEP_DISABLED()       ((RCC->AHB2LPENR & (RCC_AHB2LPENR_HASHLPEN)) == RESET)

+#endif /* STM32F756xx */

+

+/** @brief  Get the enable or disable status of the AHB3 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  */

+#define __HAL_RCC_FMC_IS_CLK_SLEEP_ENABLED()  ((RCC->AHB3LPENR & (RCC_AHB3LPENR_FMCLPEN)) != RESET)

+#define __HAL_RCC_FMC_IS_CLK_SLEEP_DISABLED() ((RCC->AHB3LPENR & (RCC_AHB3LPENR_FMCLPEN)) == RESET)

+

+#define __HAL_RCC_QSPI_IS_CLK_SLEEP_ENABLED()  ((RCC->AHB3LPENR & (RCC_AHB3LPENR_QSPILPEN)) != RESET)

+#define __HAL_RCC_QSPI_IS_CLK_SLEEP_DISABLED() ((RCC->AHB3LPENR & (RCC_AHB3LPENR_QSPILPEN)) == RESET)

+

+/** @brief  Get the enable or disable status of the APB1 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  */  

+#define __HAL_RCC_TIM2_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM2LPEN)) != RESET)

+#define __HAL_RCC_TIM3_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM3LPEN)) != RESET)

+#define __HAL_RCC_TIM4_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM4LPEN)) != RESET)

+#define __HAL_RCC_TIM5_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM5LPEN)) != RESET)

+#define __HAL_RCC_TIM6_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM6LPEN)) != RESET)

+#define __HAL_RCC_TIM7_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM7LPEN)) != RESET)

+#define __HAL_RCC_TIM12_IS_CLK_SLEEP_ENABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM12LPEN)) != RESET)

+#define __HAL_RCC_TIM13_IS_CLK_SLEEP_ENABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM13LPEN)) != RESET)

+#define __HAL_RCC_TIM14_IS_CLK_SLEEP_ENABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM14LPEN)) != RESET)

+#define __HAL_RCC_LPTIM1_IS_CLK_SLEEP_ENABLED()  ((RCC->APB1LPENR & (RCC_APB1LPENR_LPTIM1LPEN)) != RESET)

+#define __HAL_RCC_SPI2_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_SPI2LPEN)) != RESET)

+#define __HAL_RCC_SPI3_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_SPI3LPEN)) != RESET)

+#define __HAL_RCC_SPDIFRX_IS_CLK_SLEEP_ENABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_SPDIFRXLPEN)) != RESET)

+#define __HAL_RCC_USART2_IS_CLK_SLEEP_ENABLED()  ((RCC->APB1LPENR & (RCC_APB1LPENR_USART2LPEN)) != RESET)

+#define __HAL_RCC_USART3_IS_CLK_SLEEP_ENABLED()  ((RCC->APB1LPENR & (RCC_APB1LPENR_USART3LPEN)) != RESET)

+#define __HAL_RCC_UART4_IS_CLK_SLEEP_ENABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_UART4LPEN)) != RESET)

+#define __HAL_RCC_UART5_IS_CLK_SLEEP_ENABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_UART5LPEN)) != RESET)

+#define __HAL_RCC_I2C1_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C1LPEN)) != RESET)

+#define __HAL_RCC_I2C2_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C2LPEN)) != RESET)

+#define __HAL_RCC_I2C3_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C3LPEN)) != RESET)

+#define __HAL_RCC_I2C4_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C4LPEN)) != RESET)

+#define __HAL_RCC_CAN1_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_CAN1LPEN)) != RESET)

+#define __HAL_RCC_CAN2_IS_CLK_SLEEP_ENABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_CAN2LPEN)) != RESET)

+#define __HAL_RCC_CEC_IS_CLK_SLEEP_ENABLED()     ((RCC->APB1LPENR & (RCC_APB1LPENR_CECLPEN)) != RESET)

+#define __HAL_RCC_DAC_IS_CLK_SLEEP_ENABLED()     ((RCC->APB1LPENR & (RCC_APB1LPENR_DACLPEN)) != RESET)

+#define __HAL_RCC_UART7_IS_CLK_SLEEP_ENABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_UART7LPEN)) != RESET)

+#define __HAL_RCC_UART8_IS_CLK_SLEEP_ENABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_UART8LPEN)) != RESET)

+

+#define __HAL_RCC_TIM2_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM2LPEN)) == RESET)

+#define __HAL_RCC_TIM3_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM3LPEN)) == RESET)

+#define __HAL_RCC_TIM4_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM4LPEN)) == RESET)

+#define __HAL_RCC_TIM5_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM5LPEN)) == RESET)

+#define __HAL_RCC_TIM6_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM6LPEN)) == RESET)

+#define __HAL_RCC_TIM7_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM7LPEN)) == RESET)

+#define __HAL_RCC_TIM12_IS_CLK_SLEEP_DISABLED()  ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM12LPEN)) == RESET)

+#define __HAL_RCC_TIM13_IS_CLK_SLEEP_DISABLED()  ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM13LPEN)) == RESET)

+#define __HAL_RCC_TIM14_IS_CLK_SLEEP_DISABLED()  ((RCC->APB1LPENR & (RCC_APB1LPENR_TIM14LPEN)) == RESET)

+#define __HAL_RCC_LPTIM1_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_LPTIM1LPEN)) == RESET)

+#define __HAL_RCC_SPI2_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_SPI2LPEN)) == RESET)

+#define __HAL_RCC_SPI3_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_SPI3LPEN)) == RESET)

+#define __HAL_RCC_SPDIFRX_IS_CLK_SLEEP_DISABLED()((RCC->APB1LPENR & (RCC_APB1LPENR_SPDIFRXLPEN)) == RESET)

+#define __HAL_RCC_USART2_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_USART2LPEN)) == RESET)

+#define __HAL_RCC_USART3_IS_CLK_SLEEP_DISABLED() ((RCC->APB1LPENR & (RCC_APB1LPENR_USART3LPEN)) == RESET)

+#define __HAL_RCC_UART4_IS_CLK_SLEEP_DISABLED()  ((RCC->APB1LPENR & (RCC_APB1LPENR_UART4LPEN)) == RESET)

+#define __HAL_RCC_UART5_IS_CLK_SLEEP_DISABLED()  ((RCC->APB1LPENR & (RCC_APB1LPENR_UART5LPEN)) == RESET)

+#define __HAL_RCC_I2C1_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C1LPEN)) == RESET)

+#define __HAL_RCC_I2C2_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C2LPEN)) == RESET)

+#define __HAL_RCC_I2C3_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C3LPEN)) == RESET)

+#define __HAL_RCC_I2C4_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_I2C4LPEN)) == RESET)

+#define __HAL_RCC_CAN1_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_CAN1LPEN)) == RESET)

+#define __HAL_RCC_CAN2_IS_CLK_SLEEP_DISABLED()   ((RCC->APB1LPENR & (RCC_APB1LPENR_CAN2LPEN)) == RESET)

+#define __HAL_RCC_CEC_IS_CLK_SLEEP_DISABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_CECLPEN)) == RESET)

+#define __HAL_RCC_DAC_IS_CLK_SLEEP_DISABLED()    ((RCC->APB1LPENR & (RCC_APB1LPENR_DACLPEN)) == RESET)

+#define __HAL_RCC_UART7_IS_CLK_SLEEP_DISABLED()  ((RCC->APB1LPENR & (RCC_APB1LPENR_UART7LPEN)) == RESET)

+#define __HAL_RCC_UART8_IS_CLK_SLEEP_DISABLED()  ((RCC->APB1LPENR & (RCC_APB1LPENR_UART8LPEN)) == RESET)

+

+/** @brief  Get the enable or disable status of the APB2 peripheral clock during Low Power (Sleep) mode.

+  * @note   Peripheral clock gating in SLEEP mode can be used to further reduce

+  *         power consumption.

+  * @note   After wakeup from SLEEP mode, the peripheral clock is enabled again.

+  * @note   By default, all peripheral clocks are enabled during SLEEP mode.

+  */ 

+#define __HAL_RCC_TIM1_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM1LPEN)) != RESET)

+#define __HAL_RCC_TIM8_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM8LPEN)) != RESET)

+#define __HAL_RCC_USART1_IS_CLK_SLEEP_ENABLED()  ((RCC->APB2LPENR & (RCC_APB2LPENR_USART1LPEN)) != RESET)

+#define __HAL_RCC_USART6_IS_CLK_SLEEP_ENABLED()  ((RCC->APB2LPENR & (RCC_APB2LPENR_USART6LPEN)) != RESET)

+#define __HAL_RCC_ADC1_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_ADC1LPEN)) != RESET)

+#define __HAL_RCC_ADC2_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_ADC2LPEN)) != RESET)

+#define __HAL_RCC_ADC3_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_ADC3LPEN)) != RESET)

+#define __HAL_RCC_SDMMC1_IS_CLK_SLEEP_ENABLED()  ((RCC->APB2LPENR & (RCC_APB2LPENR_SDMMC1LPEN)) != RESET)

+#define __HAL_RCC_SPI1_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI1LPEN)) != RESET)

+#define __HAL_RCC_SPI4_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI4LPEN)) != RESET)

+#define __HAL_RCC_TIM9_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM9LPEN)) != RESET)

+#define __HAL_RCC_TIM10_IS_CLK_SLEEP_ENABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM10LPEN)) != RESET)

+#define __HAL_RCC_TIM11_IS_CLK_SLEEP_ENABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM11LPEN)) != RESET)

+#define __HAL_RCC_SPI5_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI5LPEN)) != RESET)

+#define __HAL_RCC_SPI6_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI6LPEN)) != RESET)

+#define __HAL_RCC_SAI1_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI1LPEN)) != RESET)

+#define __HAL_RCC_SAI2_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI2LPEN)) != RESET)

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define __HAL_RCC_LTDC_IS_CLK_SLEEP_ENABLED()    ((RCC->APB2LPENR & (RCC_APB2LPENR_LTDCLPEN)) != RESET)

+#endif /* STM32F756xx || STM32F746xx */

+

+#define __HAL_RCC_TIM1_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM1LPEN)) == RESET)

+#define __HAL_RCC_TIM8_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM8LPEN)) == RESET)

+#define __HAL_RCC_USART1_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_USART1LPEN)) == RESET)

+#define __HAL_RCC_USART6_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_USART6LPEN)) == RESET)

+#define __HAL_RCC_ADC1_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_ADC1LPEN)) == RESET)

+#define __HAL_RCC_ADC2_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_ADC2LPEN)) == RESET)

+#define __HAL_RCC_ADC3_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_ADC3LPEN)) == RESET)

+#define __HAL_RCC_SDMMC1_IS_CLK_SLEEP_DISABLED() ((RCC->APB2LPENR & (RCC_APB2LPENR_SDMMC1LPEN)) == RESET)

+#define __HAL_RCC_SPI1_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI1LPEN)) == RESET)

+#define __HAL_RCC_SPI4_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI4LPEN)) == RESET)

+#define __HAL_RCC_TIM9_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM9LPEN)) == RESET)

+#define __HAL_RCC_TIM10_IS_CLK_SLEEP_DISABLED()  ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM10LPEN)) == RESET)

+#define __HAL_RCC_TIM11_IS_CLK_SLEEP_DISABLED()  ((RCC->APB2LPENR & (RCC_APB2LPENR_TIM11LPEN)) == RESET)

+#define __HAL_RCC_SPI5_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI5LPEN)) == RESET)

+#define __HAL_RCC_SPI6_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_SPI6LPEN)) == RESET)

+#define __HAL_RCC_SAI1_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI1LPEN)) == RESET)

+#define __HAL_RCC_SAI2_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_SAI2LPEN)) == RESET)

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define __HAL_RCC_LTDC_IS_CLK_SLEEP_DISABLED()   ((RCC->APB2LPENR & (RCC_APB2LPENR_LTDCLPEN)) == RESET)

+#endif /* STM32F756xx || STM32F746xx */

+/**

+  * @}

+  */

+  

+/*---------------------------------------------------------------------------------------------*/

+

+/** @brief  Macro to configure the Timers clocks prescalers 

+  * @param  __PRESC__ : specifies the Timers clocks prescalers selection

+  *         This parameter can be one of the following values:

+  *            @arg RCC_TIMPRES_DESACTIVATED: The Timers kernels clocks prescaler is 

+  *                 equal to HPRE if PPREx is corresponding to division by 1 or 2, 

+  *                 else it is equal to [(HPRE * PPREx) / 2] if PPREx is corresponding to 

+  *                 division by 4 or more.       

+  *            @arg RCC_TIMPRES_ACTIVATED: The Timers kernels clocks prescaler is 

+  *                 equal to HPRE if PPREx is corresponding to division by 1, 2 or 4, 

+  *                 else it is equal to [(HPRE * PPREx) / 4] if PPREx is corresponding 

+  *                 to division by 8 or more.

+  */     

+#define __HAL_RCC_TIMCLKPRESCALER(__PRESC__) do {RCC->DCKCFGR1 &= ~(RCC_DCKCFGR1_TIMPRE);\

+                                             RCC->DCKCFGR1 |= (__PRESC__);\

+                                             }while(0)

+

+/** @brief Macros to Enable or Disable the PLLISAI. 

+  * @note  The PLLSAI is disabled by hardware when entering STOP and STANDBY modes. 

+  */

+#define __HAL_RCC_PLLSAI_ENABLE() (RCC->CR |= (RCC_CR_PLLSAION))

+#define __HAL_RCC_PLLSAI_DISABLE() (RCC->CR &= ~(RCC_CR_PLLSAION))

+

+/** @brief  Macro to configure the PLLSAI clock multiplication and division factors.

+  * @note   This function must be used only when the PLLSAI is disabled.

+  * @note   PLLSAI clock source is common with the main PLL (configured in 

+  *         RCC_PLLConfig function )

+  * @param  __PLLSAIN__: specifies the multiplication factor for PLLSAI VCO output clock.

+  *         This parameter must be a number between Min_Data = 49 and Max_Data = 432.

+  * @note   You have to set the PLLSAIN parameter correctly to ensure that the VCO 

+  *         output frequency is between Min_Data = 49 and Max_Data = 432 MHz.

+  * @param  __PLLSAIQ__: specifies the division factor for SAI clock

+  *         This parameter must be a number between Min_Data = 2 and Max_Data = 15.

+  * @param  __PLLSAIR__: specifies the division factor for LTDC clock

+  *         This parameter must be a number between Min_Data = 2 and Max_Data = 7.

+  * @param  __PLLSAIP__: specifies the division factor for USB, RNG, SDMMC clocks

+  *         This parameter can be a value of @ref RCCEx_PLLSAIP_Clock_Divider .

+  */   

+#define __HAL_RCC_PLLSAI_CONFIG(__PLLSAIN__, __PLLSAIP__, __PLLSAIQ__, __PLLSAIR__) (RCC->PLLSAICFGR = ((__PLLSAIN__) << 6) | ((__PLLSAIP__) << 16) | ((__PLLSAIQ__) << 24) | ((__PLLSAIR__) << 28))

+

+/** @brief  Macro used by the SAI HAL driver to configure the PLLI2S clock multiplication and division factors.

+  * @note   This macro must be used only when the PLLI2S is disabled.

+  * @note   PLLI2S clock source is common with the main PLL (configured in 

+  *         HAL_RCC_ClockConfig() API)             

+  * @param  __PLLI2SN__: specifies the multiplication factor for PLLI2S VCO output clock.

+  *         This parameter must be a number between Min_Data = 192 and Max_Data = 432.

+  * @note   You have to set the PLLI2SN parameter correctly to ensure that the VCO 

+  *         output frequency is between Min_Data = 192 and Max_Data = 432 MHz.

+  * @param  __PLLI2SQ__: specifies the division factor for SAI clock.

+  *         This parameter must be a number between Min_Data = 2 and Max_Data = 15. 

+  * @param  __PLLI2SR__: specifies the division factor for I2S clock

+  *         This parameter must be a number between Min_Data = 2 and Max_Data = 7.

+  * @note   You have to set the PLLI2SR parameter correctly to not exceed 192 MHz

+  *         on the I2S clock frequency.

+  * @param  __PLLI2SP__: specifies the division factor for SPDDIF-RX clock.

+  *         This parameter can be a number between 0 and 3 for respective values 2, 4, 6 and 8 

+  */

+#define __HAL_RCC_PLLI2S_CONFIG(__PLLI2SN__, __PLLI2SP__, __PLLI2SQ__, __PLLI2SR__) (RCC->PLLI2SCFGR = ((__PLLI2SN__) << 6) | ((__PLLI2SP__) << 16)  | ((__PLLI2SQ__) << 24) | ((__PLLI2SR__) << 28))

+    

+/** @brief  Macro to configure the SAI clock Divider coming from PLLI2S.

+  * @note   This function must be called before enabling the PLLI2S.          

+  * @param  __PLLI2SDivQ__: specifies the PLLI2S division factor for SAI1 clock .

+  *          This parameter must be a number between 1 and 32.

+  *          SAI1 clock frequency = f(PLLI2SQ) / __PLLI2SDivQ__ 

+  */

+#define __HAL_RCC_PLLI2S_PLLSAICLKDIVQ_CONFIG(__PLLI2SDivQ__) (MODIFY_REG(RCC->DCKCFGR1, RCC_DCKCFGR1_PLLI2SDIVQ, (__PLLI2SDivQ__)-1))

+

+/** @brief  Macro to configure the SAI clock Divider coming from PLLSAI.

+  * @note   This function must be called before enabling the PLLSAI.

+  * @param  __PLLSAIDivQ__: specifies the PLLSAI division factor for SAI1 clock .

+  *         This parameter must be a number between Min_Data = 1 and Max_Data = 32.

+  *         SAI1 clock frequency = f(PLLSAIQ) / __PLLSAIDivQ__  

+  */

+#define __HAL_RCC_PLLSAI_PLLSAICLKDIVQ_CONFIG(__PLLSAIDivQ__) (MODIFY_REG(RCC->DCKCFGR1, RCC_DCKCFGR1_PLLSAIDIVQ, ((__PLLSAIDivQ__)-1)<<8))

+

+/** @brief  Macro to configure the LTDC clock Divider coming from PLLSAI.

+  * 

+  * @note   This function must be called before enabling the PLLSAI. 

+  * @param  __PLLSAIDivR__: specifies the PLLSAI division factor for LTDC clock .

+  *          This parameter must be a number between Min_Data = 2 and Max_Data = 16.

+  *          LTDC clock frequency = f(PLLSAIR) / __PLLSAIDivR__ 

+  */   

+#define __HAL_RCC_PLLSAI_PLLSAICLKDIVR_CONFIG(__PLLSAIDivR__)\

+                            MODIFY_REG(RCC->DCKCFGR1, RCC_DCKCFGR1_PLLSAIDIVR, (uint32_t)(__PLLSAIDivR__))

+

+/** @brief  Macro to configure SAI1 clock source selection.

+  * @note   This function must be called before enabling PLLSAI, PLLI2S and  

+  *         the SAI clock.

+  * @param  __SOURCE__: specifies the SAI1 clock source.

+  *         This parameter can be one of the following values:

+  *            @arg RCC_SAI1CLKSOURCE_PLLI2S: PLLI2S_Q clock divided by PLLI2SDIVQ used 

+  *                                           as SAI1 clock. 

+  *            @arg RCC_SAI1CLKSOURCE_PLLSAI: PLLISAI_Q clock divided by PLLSAIDIVQ used 

+  *                                           as SAI1 clock.

+  *            @arg RCC_SAI1CLKSOURCE_PIN: External clock mapped on the I2S_CKIN pin

+  *                                        used as SAI1 clock.

+  */

+#define __HAL_RCC_SAI1_CONFIG(__SOURCE__)\

+                             MODIFY_REG(RCC->DCKCFGR1, RCC_DCKCFGR1_SAI1SEL, (uint32_t)(__SOURCE__))

+

+/** @brief  Macro to get the SAI1 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_SAI1CLKSOURCE_PLLI2S: PLLI2S_Q clock divided by PLLI2SDIVQ used 

+  *                                           as SAI1 clock. 

+  *            @arg RCC_SAI1CLKSOURCE_PLLSAI: PLLISAI_Q clock divided by PLLSAIDIVQ used 

+  *                                           as SAI1 clock.

+  *            @arg RCC_SAI1CLKSOURCE_PIN: External clock mapped on the I2S_CKIN pin

+  *                                        used as SAI1 clock.

+  */

+#define __HAL_RCC_GET_SAI1_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR1, RCC_DCKCFGR1_SAI1SEL)))

+

+

+/** @brief  Macro to configure SAI2 clock source selection.

+  * @note   This function must be called before enabling PLLSAI, PLLI2S and  

+  *         the SAI clock.

+  * @param  __SOURCE__: specifies the SAI2 clock source.

+  *         This parameter can be one of the following values:

+  *            @arg RCC_SAI2CLKSOURCE_PLLI2S: PLLI2S_Q clock divided by PLLI2SDIVQ used 

+  *                                           as SAI2 clock. 

+  *            @arg RCC_SAI2CLKSOURCE_PLLSAI: PLLISAI_Q clock divided by PLLSAIDIVQ used 

+  *                                           as SAI2 clock. 

+  *            @arg RCC_SAI2CLKSOURCE_PIN: External clock mapped on the I2S_CKIN pin

+  *                                        used as SAI2 clock.

+  */

+#define __HAL_RCC_SAI2_CONFIG(__SOURCE__)\

+                            MODIFY_REG(RCC->DCKCFGR1, RCC_DCKCFGR1_SAI2SEL, (uint32_t)(__SOURCE__))

+

+

+/** @brief  Macro to get the SAI2 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_SAI2CLKSOURCE_PLLI2S: PLLI2S_Q clock divided by PLLI2SDIVQ used 

+  *                                           as SAI2 clock. 

+  *            @arg RCC_SAI2CLKSOURCE_PLLSAI: PLLISAI_Q clock divided by PLLSAIDIVQ used 

+  *                                           as SAI2 clock.

+  *            @arg RCC_SAI2CLKSOURCE_PIN: External clock mapped on the I2S_CKIN pin

+  *                                        used as SAI2 clock.

+  */

+#define __HAL_RCC_GET_SAI2_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR1, RCC_DCKCFGR1_SAI2SEL)))

+

+

+/** @brief Enable PLLSAI_RDY interrupt.

+  */

+#define __HAL_RCC_PLLSAI_ENABLE_IT() (RCC->CIR |= (RCC_CIR_PLLSAIRDYIE))

+

+/** @brief Disable PLLSAI_RDY interrupt.

+  */

+#define __HAL_RCC_PLLSAI_DISABLE_IT() (RCC->CIR &= ~(RCC_CIR_PLLSAIRDYIE))

+

+/** @brief Clear the PLLSAI RDY interrupt pending bits.

+  */

+#define __HAL_RCC_PLLSAI_CLEAR_IT() (RCC->CIR |= (RCC_CIR_PLLSAIRDYF))

+

+/** @brief Check the PLLSAI RDY interrupt has occurred or not.

+  * @retval The new state (TRUE or FALSE).

+  */

+#define __HAL_RCC_PLLSAI_GET_IT() ((RCC->CIR & (RCC_CIR_PLLSAIRDYIE)) == (RCC_CIR_PLLSAIRDYIE))

+

+/** @brief  Check PLLSAI RDY flag is set or not.

+  * @retval The new state (TRUE or FALSE).

+  */

+#define __HAL_RCC_PLLSAI_GET_FLAG() ((RCC->CR & (RCC_CR_PLLSAIRDY)) == (RCC_CR_PLLSAIRDY))

+

+/** @brief  Macro to Get I2S clock source selection.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_I2SCLKSOURCE_PLLI2S: PLLI2S VCO output clock divided by PLLI2SR used as I2S clock. 

+  *            @arg RCC_I2SCLKSOURCE_EXT: External clock mapped on the I2S_CKIN pin used as I2S clock source

+  */

+#define __HAL_RCC_GET_I2SCLKSOURCE() (READ_BIT(RCC->CFGR, RCC_CFGR_I2SSRC))

+

+/** @brief  Macro to configure the I2C1 clock (I2C1CLK).

+  *

+  * @param  __I2C1_CLKSOURCE__: specifies the I2C1 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_I2C1CLKSOURCE_PCLK1: PCLK1 selected as I2C1 clock

+  *            @arg RCC_I2C1CLKSOURCE_HSI: HSI selected as I2C1 clock

+  *            @arg RCC_I2C1CLKSOURCE_SYSCLK: System Clock selected as I2C1 clock

+  */

+#define __HAL_RCC_I2C1_CONFIG(__I2C1_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C1SEL, (uint32_t)(__I2C1_CLKSOURCE__))

+

+/** @brief  Macro to get the I2C1 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_I2C1CLKSOURCE_PCLK1: PCLK1 selected as I2C1 clock

+  *            @arg RCC_I2C1CLKSOURCE_HSI: HSI selected as I2C1 clock

+  *            @arg RCC_I2C1CLKSOURCE_SYSCLK: System Clock selected as I2C1 clock

+  */

+#define __HAL_RCC_GET_I2C1_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C1SEL)))

+

+/** @brief  Macro to configure the I2C2 clock (I2C2CLK).

+  *

+  * @param  __I2C2_CLKSOURCE__: specifies the I2C2 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_I2C2CLKSOURCE_PCLK1: PCLK1 selected as I2C2 clock

+  *            @arg RCC_I2C2CLKSOURCE_HSI: HSI selected as I2C2 clock

+  *            @arg RCC_I2C2CLKSOURCE_SYSCLK: System Clock selected as I2C2 clock

+  */

+#define __HAL_RCC_I2C2_CONFIG(__I2C2_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C2SEL, (uint32_t)(__I2C2_CLKSOURCE__))

+

+/** @brief  Macro to get the I2C2 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_I2C2CLKSOURCE_PCLK1: PCLK1 selected as I2C2 clock

+  *            @arg RCC_I2C2CLKSOURCE_HSI: HSI selected as I2C2 clock

+  *            @arg RCC_I2C2CLKSOURCE_SYSCLK: System Clock selected as I2C2 clock

+  */

+#define __HAL_RCC_GET_I2C2_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C2SEL)))

+

+/** @brief  Macro to configure the I2C3 clock (I2C3CLK).

+  *

+  * @param  __I2C3_CLKSOURCE__: specifies the I2C3 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_I2C3CLKSOURCE_PCLK1: PCLK1 selected as I2C3 clock

+  *            @arg RCC_I2C3CLKSOURCE_HSI: HSI selected as I2C3 clock

+  *            @arg RCC_I2C3CLKSOURCE_SYSCLK: System Clock selected as I2C3 clock

+  */

+#define __HAL_RCC_I2C3_CONFIG(__I2C3_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C3SEL, (uint32_t)(__I2C3_CLKSOURCE__))

+

+/** @brief  macro to get the I2C3 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_I2C3CLKSOURCE_PCLK1: PCLK1 selected as I2C3 clock

+  *            @arg RCC_I2C3CLKSOURCE_HSI: HSI selected as I2C3 clock

+  *            @arg RCC_I2C3CLKSOURCE_SYSCLK: System Clock selected as I2C3 clock

+  */

+#define __HAL_RCC_GET_I2C3_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C3SEL)))

+

+/** @brief  Macro to configure the I2C4 clock (I2C4CLK).

+  *

+  * @param  __I2C4_CLKSOURCE__: specifies the I2C4 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_I2C4CLKSOURCE_PCLK1: PCLK1 selected as I2C4 clock

+  *            @arg RCC_I2C4CLKSOURCE_HSI: HSI selected as I2C4 clock

+  *            @arg RCC_I2C4CLKSOURCE_SYSCLK: System Clock selected as I2C4 clock

+  */

+#define __HAL_RCC_I2C4_CONFIG(__I2C4_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C4SEL, (uint32_t)(__I2C4_CLKSOURCE__))

+

+/** @brief  macro to get the I2C4 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_I2C4CLKSOURCE_PCLK1: PCLK1 selected as I2C4 clock

+  *            @arg RCC_I2C4CLKSOURCE_HSI: HSI selected as I2C4 clock

+  *            @arg RCC_I2C4CLKSOURCE_SYSCLK: System Clock selected as I2C4 clock

+  */

+#define __HAL_RCC_GET_I2C4_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_I2C4SEL)))

+

+/** @brief  Macro to configure the USART1 clock (USART1CLK).

+  *

+  * @param  __USART1_CLKSOURCE__: specifies the USART1 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_USART1CLKSOURCE_PCLK2: PCLK2 selected as USART1 clock

+  *            @arg RCC_USART1CLKSOURCE_HSI: HSI selected as USART1 clock

+  *            @arg RCC_USART1CLKSOURCE_SYSCLK: System Clock selected as USART1 clock

+  *            @arg RCC_USART1CLKSOURCE_LSE: LSE selected as USART1 clock

+  */

+#define __HAL_RCC_USART1_CONFIG(__USART1_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_USART1SEL, (uint32_t)(__USART1_CLKSOURCE__))

+

+/** @brief  macro to get the USART1 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_USART1CLKSOURCE_PCLK2: PCLK2 selected as USART1 clock

+  *            @arg RCC_USART1CLKSOURCE_HSI: HSI selected as USART1 clock

+  *            @arg RCC_USART1CLKSOURCE_SYSCLK: System Clock selected as USART1 clock

+  *            @arg RCC_USART1CLKSOURCE_LSE: LSE selected as USART1 clock

+  */

+#define __HAL_RCC_GET_USART1_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_USART1SEL)))

+

+/** @brief  Macro to configure the USART2 clock (USART2CLK).

+  *

+  * @param  __USART2_CLKSOURCE__: specifies the USART2 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_USART2CLKSOURCE_PCLK1: PCLK1 selected as USART2 clock

+  *            @arg RCC_USART2CLKSOURCE_HSI: HSI selected as USART2 clock

+  *            @arg RCC_USART2CLKSOURCE_SYSCLK: System Clock selected as USART2 clock

+  *            @arg RCC_USART2CLKSOURCE_LSE: LSE selected as USART2 clock

+  */

+#define __HAL_RCC_USART2_CONFIG(__USART2_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_USART2SEL, (uint32_t)(__USART2_CLKSOURCE__))

+

+/** @brief  macro to get the USART2 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_USART2CLKSOURCE_PCLK1: PCLK1 selected as USART2 clock

+  *            @arg RCC_USART2CLKSOURCE_HSI: HSI selected as USART2 clock

+  *            @arg RCC_USART2CLKSOURCE_SYSCLK: System Clock selected as USART2 clock

+  *            @arg RCC_USART2CLKSOURCE_LSE: LSE selected as USART2 clock

+  */

+#define __HAL_RCC_GET_USART2_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_USART2SEL)))

+

+/** @brief  Macro to configure the USART3 clock (USART3CLK).

+  *

+  * @param  __USART3_CLKSOURCE__: specifies the USART3 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_USART3CLKSOURCE_PCLK1: PCLK1 selected as USART3 clock

+  *            @arg RCC_USART3CLKSOURCE_HSI: HSI selected as USART3 clock

+  *            @arg RCC_USART3CLKSOURCE_SYSCLK: System Clock selected as USART3 clock

+  *            @arg RCC_USART3CLKSOURCE_LSE: LSE selected as USART3 clock

+  */

+#define __HAL_RCC_USART3_CONFIG(__USART3_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_USART3SEL, (uint32_t)(__USART3_CLKSOURCE__))

+

+/** @brief  macro to get the USART3 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_USART3CLKSOURCE_PCLK1: PCLK1 selected as USART3 clock

+  *            @arg RCC_USART3CLKSOURCE_HSI: HSI selected as USART3 clock

+  *            @arg RCC_USART3CLKSOURCE_SYSCLK: System Clock selected as USART3 clock

+  *            @arg RCC_USART3CLKSOURCE_LSE: LSE selected as USART3 clock

+  */

+#define __HAL_RCC_GET_USART3_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_USART3SEL)))

+

+ /** @brief  Macro to configure the UART4 clock (UART4CLK).

+  *

+  * @param  __UART4_CLKSOURCE__: specifies the UART4 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_UART4CLKSOURCE_PCLK1: PCLK1 selected as UART4 clock

+  *            @arg RCC_UART4CLKSOURCE_HSI: HSI selected as UART4 clock

+  *            @arg RCC_UART4CLKSOURCE_SYSCLK: System Clock selected as UART4 clock

+  *            @arg RCC_UART4CLKSOURCE_LSE: LSE selected as UART4 clock

+  */

+#define __HAL_RCC_UART4_CONFIG(__UART4_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_UART4SEL, (uint32_t)(__UART4_CLKSOURCE__))

+

+/** @brief  macro to get the UART4 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_UART4CLKSOURCE_PCLK1: PCLK1 selected as UART4 clock

+  *            @arg RCC_UART4CLKSOURCE_HSI: HSI selected as UART4 clock

+  *            @arg RCC_UART4CLKSOURCE_SYSCLK: System Clock selected as UART4 clock

+  *            @arg RCC_UART4CLKSOURCE_LSE: LSE selected as UART4 clock

+  */

+#define __HAL_RCC_GET_UART4_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_UART4SEL)))

+

+ /** @brief  Macro to configure the UART5 clock (UART5CLK).

+  *

+  * @param  __UART5_CLKSOURCE__: specifies the UART5 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_UART5CLKSOURCE_PCLK1: PCLK1 selected as UART5 clock

+  *            @arg RCC_UART5CLKSOURCE_HSI: HSI selected as UART5 clock

+  *            @arg RCC_UART5CLKSOURCE_SYSCLK: System Clock selected as UART5 clock

+  *            @arg RCC_UART5CLKSOURCE_LSE: LSE selected as UART5 clock

+  */

+#define __HAL_RCC_UART5_CONFIG(__UART5_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_UART5SEL, (uint32_t)(__UART5_CLKSOURCE__))

+

+/** @brief  macro to get the UART5 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_UART5CLKSOURCE_PCLK1: PCLK1 selected as UART5 clock

+  *            @arg RCC_UART5CLKSOURCE_HSI: HSI selected as UART5 clock

+  *            @arg RCC_UART5CLKSOURCE_SYSCLK: System Clock selected as UART5 clock

+  *            @arg RCC_UART5CLKSOURCE_LSE: LSE selected as UART5 clock

+  */

+#define __HAL_RCC_GET_UART5_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_UART5SEL)))

+

+ /** @brief  Macro to configure the USART6 clock (USART6CLK).

+  *

+  * @param  __USART6_CLKSOURCE__: specifies the USART6 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_USART6CLKSOURCE_PCLK1: PCLK1 selected as USART6 clock

+  *            @arg RCC_USART6CLKSOURCE_HSI: HSI selected as USART6 clock

+  *            @arg RCC_USART6CLKSOURCE_SYSCLK: System Clock selected as USART6 clock

+  *            @arg RCC_USART6CLKSOURCE_LSE: LSE selected as USART6 clock

+  */

+#define __HAL_RCC_USART6_CONFIG(__USART6_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_USART6SEL, (uint32_t)(__USART6_CLKSOURCE__))

+

+/** @brief  macro to get the USART6 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_USART6CLKSOURCE_PCLK1: PCLK1 selected as USART6 clock

+  *            @arg RCC_USART6CLKSOURCE_HSI: HSI selected as USART6 clock

+  *            @arg RCC_USART6CLKSOURCE_SYSCLK: System Clock selected as USART6 clock

+  *            @arg RCC_USART6CLKSOURCE_LSE: LSE selected as USART6 clock

+  */

+#define __HAL_RCC_GET_USART6_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_USART6SEL)))

+

+ /** @brief  Macro to configure the UART7 clock (UART7CLK).

+  *

+  * @param  __UART7_CLKSOURCE__: specifies the UART7 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_UART7CLKSOURCE_PCLK1: PCLK1 selected as UART7 clock

+  *            @arg RCC_UART7CLKSOURCE_HSI: HSI selected as UART7 clock

+  *            @arg RCC_UART7CLKSOURCE_SYSCLK: System Clock selected as UART7 clock

+  *            @arg RCC_UART7CLKSOURCE_LSE: LSE selected as UART7 clock

+  */

+#define __HAL_RCC_UART7_CONFIG(__UART7_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_UART7SEL, (uint32_t)(__UART7_CLKSOURCE__))

+

+/** @brief  macro to get the UART7 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_UART7CLKSOURCE_PCLK1: PCLK1 selected as UART7 clock

+  *            @arg RCC_UART7CLKSOURCE_HSI: HSI selected as UART7 clock

+  *            @arg RCC_UART7CLKSOURCE_SYSCLK: System Clock selected as UART7 clock

+  *            @arg RCC_UART7CLKSOURCE_LSE: LSE selected as UART7 clock

+  */

+#define __HAL_RCC_GET_UART7_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_UART7SEL)))

+

+/** @brief  Macro to configure the UART8 clock (UART8CLK).

+  *

+  * @param  __UART8_CLKSOURCE__: specifies the UART8 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_UART8CLKSOURCE_PCLK1: PCLK1 selected as UART8 clock

+  *            @arg RCC_UART8CLKSOURCE_HSI: HSI selected as UART8 clock

+  *            @arg RCC_UART8CLKSOURCE_SYSCLK: System Clock selected as UART8 clock

+  *            @arg RCC_UART8CLKSOURCE_LSE: LSE selected as UART8 clock

+  */

+#define __HAL_RCC_UART8_CONFIG(__UART8_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_UART8SEL, (uint32_t)(__UART8_CLKSOURCE__))

+

+/** @brief  macro to get the UART8 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_UART8CLKSOURCE_PCLK1: PCLK1 selected as UART8 clock

+  *            @arg RCC_UART8CLKSOURCE_HSI: HSI selected as UART8 clock

+  *            @arg RCC_UART8CLKSOURCE_SYSCLK: System Clock selected as UART8 clock

+  *            @arg RCC_UART8CLKSOURCE_LSE: LSE selected as UART8 clock

+  */

+#define __HAL_RCC_GET_UART8_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_UART8SEL)))

+

+/** @brief  Macro to configure the LPTIM1 clock (LPTIM1CLK).

+  *

+  * @param  __LPTIM1_CLKSOURCE__: specifies the LPTIM1 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_LPTIM1CLKSOURCE_PCLK: PCLK selected as LPTIM1 clock

+  *            @arg RCC_LPTIM1CLKSOURCE_HSI: HSI selected as LPTIM1 clock

+  *            @arg RCC_LPTIM1CLKSOURCE_LSI: LSI selected as LPTIM1 clock

+  *            @arg RCC_LPTIM1CLKSOURCE_LSE: LSE selected as LPTIM1 clock

+  */

+#define __HAL_RCC_LPTIM1_CONFIG(__LPTIM1_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_LPTIM1SEL, (uint32_t)(__LPTIM1_CLKSOURCE__))

+

+/** @brief  macro to get the LPTIM1 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_LPTIM1CLKSOURCE_PCLK: PCLK selected as LPTIM1 clock

+  *            @arg RCC_LPTIM1CLKSOURCE_HSI: HSI selected as LPTIM1 clock

+  *            @arg RCC_LPTIM1CLKSOURCE_LSI: LSI selected as LPTIM1 clock

+  *            @arg RCC_LPTIM1CLKSOURCE_LSE: LSE selected as LPTIM1 clock

+  */

+#define __HAL_RCC_GET_LPTIM1_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_LPTIM1SEL)))

+

+/** @brief  Macro to configure the CEC clock (CECCLK).

+  *

+  * @param  __CEC_CLKSOURCE__: specifies the CEC clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_CECCLKSOURCE_LSE: LSE selected as CEC clock

+  *            @arg RCC_CECCLKSOURCE_HSI: HSI selected as CEC clock

+  */

+#define __HAL_RCC_CEC_CONFIG(__CEC_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_CECSEL, (uint32_t)(__CEC_CLKSOURCE__))

+

+/** @brief  macro to get the CEC clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_CECCLKSOURCE_LSE: LSE selected as CEC clock

+  *            @arg RCC_CECCLKSOURCE_HSI: HSI selected as CEC clock

+  */

+#define __HAL_RCC_GET_CEC_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_CECSEL)))

+

+/** @brief  Macro to configure the CLK48 source (CLK48CLK).

+  *

+  * @param  __CLK48_SOURCE__: specifies the CLK48 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_CLK48SOURCE_PLL: PLL selected as CLK48 source

+  *            @arg RCC_CLK48SOURCE_PLSAI1: PLLSAI1 selected as CLK48 source

+  */

+#define __HAL_RCC_CLK48_CONFIG(__CLK48_SOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_CK48MSEL, (uint32_t)(__CLK48_SOURCE__))

+

+/** @brief  macro to get the CLK48 source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_CLK48SOURCE_PLL: PLL used as CLK48 source

+  *            @arg RCC_CLK48SOURCE_PLSAI1: PLLSAI1 used as CLK48 source

+  */

+#define __HAL_RCC_GET_CLK48_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_CK48MSEL)))

+

+/** @brief  Macro to configure the SDMMC1 clock (SDMMC1CLK).

+  *

+  * @param  __SDMMC1_CLKSOURCE__: specifies the SDMMC1 clock source.

+  *          This parameter can be one of the following values:

+  *            @arg RCC_SDMMC1CLKSOURCE_CLK48: CLK48 selected as SDMMC clock

+  *            @arg RCC_SDMMC1CLKSOURCE_SYSCLK: SYSCLK selected as SDMMC clock

+  */

+#define __HAL_RCC_SDMMC1_CONFIG(__SDMMC1_CLKSOURCE__) \

+                  MODIFY_REG(RCC->DCKCFGR2, RCC_DCKCFGR2_SDMMC1SEL, (uint32_t)(__SDMMC1_CLKSOURCE__))

+

+/** @brief  macro to get the SDMMC1 clock source.

+  * @retval The clock source can be one of the following values:

+  *            @arg RCC_SDMMC1CLKSOURCE_CLK48: CLK48 selected as SDMMC1 clock

+  *            @arg RCC_SDMMC1CLKSOURCE_SYSCLK: SYSCLK selected as SDMMC1 clock

+  */

+#define __HAL_RCC_GET_SDMMC1_SOURCE() ((uint32_t)(READ_BIT(RCC->DCKCFGR2, RCC_DCKCFGR2_SDMMC1SEL)))

+

+/**

+  * @}

+  */

+  

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup RCCEx_Exported_Functions_Group1

+  * @{

+  */

+HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef  *PeriphClkInit);

+void HAL_RCCEx_GetPeriphCLKConfig(RCC_PeriphCLKInitTypeDef  *PeriphClkInit);

+uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk);

+

+/**

+  * @}

+  */ 

+/* Private macros ------------------------------------------------------------*/

+/** @addtogroup RCCEx_Private_Macros RCCEx Private Macros

+  * @{

+  */

+/** @defgroup RCCEx_IS_RCC_Definitions RCC Private macros to check input parameters

+  * @{

+  */

+#if defined(STM32F756xx) || defined(STM32F746xx)

+#define IS_RCC_PERIPHCLOCK(SELECTION)  \

+               ((((SELECTION) & RCC_PERIPHCLK_I2S)         == RCC_PERIPHCLK_I2S)      || \

+                (((SELECTION) & RCC_PERIPHCLK_LTDC)        == RCC_PERIPHCLK_LTDC)    || \

+                (((SELECTION) & RCC_PERIPHCLK_TIM)         == RCC_PERIPHCLK_TIM)     || \

+                (((SELECTION) & RCC_PERIPHCLK_USART1)      == RCC_PERIPHCLK_USART1)  || \

+                (((SELECTION) & RCC_PERIPHCLK_USART2)      == RCC_PERIPHCLK_USART2)  || \

+                (((SELECTION) & RCC_PERIPHCLK_USART3)      == RCC_PERIPHCLK_USART3)  || \

+                (((SELECTION) & RCC_PERIPHCLK_UART4)       == RCC_PERIPHCLK_UART4)   || \

+                (((SELECTION) & RCC_PERIPHCLK_UART5)       == RCC_PERIPHCLK_UART5)   || \

+                (((SELECTION) & RCC_PERIPHCLK_USART6)      == RCC_PERIPHCLK_USART6)  || \

+                (((SELECTION) & RCC_PERIPHCLK_UART7)       == RCC_PERIPHCLK_UART7)   || \

+                (((SELECTION) & RCC_PERIPHCLK_UART8)       == RCC_PERIPHCLK_UART8)   || \

+                (((SELECTION) & RCC_PERIPHCLK_I2C1)        == RCC_PERIPHCLK_I2C1)    || \

+                (((SELECTION) & RCC_PERIPHCLK_I2C2)        == RCC_PERIPHCLK_I2C2)    || \

+                (((SELECTION) & RCC_PERIPHCLK_I2C3)        == RCC_PERIPHCLK_I2C3)    || \

+                (((SELECTION) & RCC_PERIPHCLK_I2C4)        == RCC_PERIPHCLK_I2C4)    || \

+                (((SELECTION) & RCC_PERIPHCLK_LPTIM1)      == RCC_PERIPHCLK_LPTIM1)  || \

+                (((SELECTION) & RCC_PERIPHCLK_SAI1)        == RCC_PERIPHCLK_SAI1)    || \

+                (((SELECTION) & RCC_PERIPHCLK_SAI2)        == RCC_PERIPHCLK_SAI2)    || \

+                (((SELECTION) & RCC_PERIPHCLK_CLK48)       == RCC_PERIPHCLK_CLK48)   || \

+                (((SELECTION) & RCC_PERIPHCLK_CEC)         == RCC_PERIPHCLK_CEC)     || \

+                (((SELECTION) & RCC_PERIPHCLK_SDMMC1)      == RCC_PERIPHCLK_SDMMC1)    || \

+                (((SELECTION) & RCC_PERIPHCLK_SPDIFRX)     == RCC_PERIPHCLK_SPDIFRX)    || \

+                (((SELECTION) & RCC_PERIPHCLK_RTC)         == RCC_PERIPHCLK_RTC))

+#elif defined(STM32F745xx)

+#define IS_RCC_PERIPHCLOCK(SELECTION)  \

+               ((((SELECTION) & RCC_PERIPHCLK_I2S)         == RCC_PERIPHCLK_I2S)      || \

+                (((SELECTION) & RCC_PERIPHCLK_TIM)         == RCC_PERIPHCLK_TIM)     || \

+                (((SELECTION) & RCC_PERIPHCLK_USART1)      == RCC_PERIPHCLK_USART1)  || \

+                (((SELECTION) & RCC_PERIPHCLK_USART2)      == RCC_PERIPHCLK_USART2)  || \

+                (((SELECTION) & RCC_PERIPHCLK_USART3)      == RCC_PERIPHCLK_USART3)  || \

+                (((SELECTION) & RCC_PERIPHCLK_UART4)       == RCC_PERIPHCLK_UART4)   || \

+                (((SELECTION) & RCC_PERIPHCLK_UART5)       == RCC_PERIPHCLK_UART5)   || \

+                (((SELECTION) & RCC_PERIPHCLK_USART6)      == RCC_PERIPHCLK_USART6)  || \

+                (((SELECTION) & RCC_PERIPHCLK_UART7)       == RCC_PERIPHCLK_UART7)   || \

+                (((SELECTION) & RCC_PERIPHCLK_UART8)       == RCC_PERIPHCLK_UART8)   || \

+                (((SELECTION) & RCC_PERIPHCLK_I2C1)        == RCC_PERIPHCLK_I2C1)    || \

+                (((SELECTION) & RCC_PERIPHCLK_I2C2)        == RCC_PERIPHCLK_I2C2)    || \

+                (((SELECTION) & RCC_PERIPHCLK_I2C3)        == RCC_PERIPHCLK_I2C3)    || \

+                (((SELECTION) & RCC_PERIPHCLK_I2C4)        == RCC_PERIPHCLK_I2C4)    || \

+                (((SELECTION) & RCC_PERIPHCLK_LPTIM1)      == RCC_PERIPHCLK_LPTIM1)  || \

+                (((SELECTION) & RCC_PERIPHCLK_SAI1)        == RCC_PERIPHCLK_SAI1)    || \

+                (((SELECTION) & RCC_PERIPHCLK_SAI2)        == RCC_PERIPHCLK_SAI2)    || \

+                (((SELECTION) & RCC_PERIPHCLK_CLK48)       == RCC_PERIPHCLK_CLK48)   || \

+                (((SELECTION) & RCC_PERIPHCLK_CEC)         == RCC_PERIPHCLK_CEC)     || \

+                (((SELECTION) & RCC_PERIPHCLK_SDMMC1)      == RCC_PERIPHCLK_SDMMC1)    || \

+                (((SELECTION) & RCC_PERIPHCLK_SPDIFRX)     == RCC_PERIPHCLK_SPDIFRX)    || \

+                (((SELECTION) & RCC_PERIPHCLK_RTC)         == RCC_PERIPHCLK_RTC))

+#endif /* STM32F756xx || STM32F746xx */

+#define IS_RCC_PLLI2SN_VALUE(VALUE) ((49 <= (VALUE)) && ((VALUE) <= 432))

+#define IS_RCC_PLLI2SP_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 8))

+#define IS_RCC_PLLI2SQ_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 15))

+#define IS_RCC_PLLI2SR_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 7))

+

+#define IS_RCC_PLLSAIN_VALUE(VALUE) ((49 <= (VALUE)) && ((VALUE) <= 432))

+#define IS_RCC_PLLSAIP_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 8))

+#define IS_RCC_PLLSAIQ_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 15))

+#define IS_RCC_PLLSAIR_VALUE(VALUE) ((2 <= (VALUE)) && ((VALUE) <= 7))  

+

+#define IS_RCC_PLLSAI_DIVQ_VALUE(VALUE) ((1 <= (VALUE)) && ((VALUE) <= 32))

+

+#define IS_RCC_PLLI2S_DIVQ_VALUE(VALUE) ((1 <= (VALUE)) && ((VALUE) <= 32))

+

+#define IS_RCC_PLLSAI_DIVR_VALUE(VALUE) (((VALUE) == RCC_PLLSAIDIVR_2) ||\

+                                         ((VALUE) == RCC_PLLSAIDIVR_4)  ||\

+                                         ((VALUE) == RCC_PLLSAIDIVR_8)  ||\

+                                         ((VALUE) == RCC_PLLSAIDIVR_16))

+#define IS_RCC_I2SCLKSOURCE(SOURCE)  (((SOURCE) == RCC_I2SCLKSOURCE_PLLI2S) || \

+                                          ((SOURCE) == RCC_I2SCLKSOURCE_EXT))

+#define IS_RCC_SAI1CLKSOURCE(SOURCE)  (((SOURCE) == RCC_SAI1CLKSOURCE_PLLSAI) || \

+                                      ((SOURCE) == RCC_SAI1CLKSOURCE_PLLI2S) || \

+                                      ((SOURCE) == RCC_SAI1CLKSOURCE_PIN))

+#define IS_RCC_SAI2CLKSOURCE(SOURCE)  (((SOURCE) == RCC_SAI2CLKSOURCE_PLLSAI) || \

+                                      ((SOURCE) == RCC_SAI2CLKSOURCE_PLLI2S) || \

+                                      ((SOURCE) == RCC_SAI2CLKSOURCE_PIN))

+

+#define IS_RCC_SDMMC1CLKSOURCE(SOURCE)  (((SOURCE) == RCC_SDMMC1CLKSOURCE_SYSCLK) || \

+                                      ((SOURCE) == RCC_SDMMC1CLKSOURCE_CLK48))

+

+#define IS_RCC_CECCLKSOURCE(SOURCE)  (((SOURCE) == RCC_CECCLKSOURCE_HSI) || \

+                                      ((SOURCE) == RCC_CECCLKSOURCE_LSE))

+#define IS_RCC_USART1CLKSOURCE(SOURCE)  \

+               (((SOURCE) == RCC_USART1CLKSOURCE_PCLK2)  || \

+                ((SOURCE) == RCC_USART1CLKSOURCE_SYSCLK) || \

+                ((SOURCE) == RCC_USART1CLKSOURCE_LSE)    || \

+                ((SOURCE) == RCC_USART1CLKSOURCE_HSI))

+

+#define IS_RCC_USART2CLKSOURCE(SOURCE)  \

+               (((SOURCE) == RCC_USART2CLKSOURCE_PCLK1)  || \

+                ((SOURCE) == RCC_USART2CLKSOURCE_SYSCLK) || \

+                ((SOURCE) == RCC_USART2CLKSOURCE_LSE)    || \

+                ((SOURCE) == RCC_USART2CLKSOURCE_HSI))

+#define IS_RCC_USART3CLKSOURCE(SOURCE)  \

+               (((SOURCE) == RCC_USART3CLKSOURCE_PCLK1)  || \

+                ((SOURCE) == RCC_USART3CLKSOURCE_SYSCLK) || \

+                ((SOURCE) == RCC_USART3CLKSOURCE_LSE)    || \

+                ((SOURCE) == RCC_USART3CLKSOURCE_HSI))

+

+#define IS_RCC_UART4CLKSOURCE(SOURCE)  \

+               (((SOURCE) == RCC_UART4CLKSOURCE_PCLK1)  || \

+                ((SOURCE) == RCC_UART4CLKSOURCE_SYSCLK) || \

+                ((SOURCE) == RCC_UART4CLKSOURCE_LSE)    || \

+                ((SOURCE) == RCC_UART4CLKSOURCE_HSI))

+

+#define IS_RCC_UART5CLKSOURCE(SOURCE)  \

+               (((SOURCE) == RCC_UART5CLKSOURCE_PCLK1)  || \

+                ((SOURCE) == RCC_UART5CLKSOURCE_SYSCLK) || \

+                ((SOURCE) == RCC_UART5CLKSOURCE_LSE)    || \

+                ((SOURCE) == RCC_UART5CLKSOURCE_HSI))

+

+#define IS_RCC_USART6CLKSOURCE(SOURCE)  \

+               (((SOURCE) == RCC_USART6CLKSOURCE_PCLK2)  || \

+                ((SOURCE) == RCC_USART6CLKSOURCE_SYSCLK) || \

+                ((SOURCE) == RCC_USART6CLKSOURCE_LSE)    || \

+                ((SOURCE) == RCC_USART6CLKSOURCE_HSI))

+

+#define IS_RCC_UART7CLKSOURCE(SOURCE)  \

+               (((SOURCE) == RCC_UART7CLKSOURCE_PCLK1)  || \

+                ((SOURCE) == RCC_UART7CLKSOURCE_SYSCLK) || \

+                ((SOURCE) == RCC_UART7CLKSOURCE_LSE)    || \

+                ((SOURCE) == RCC_UART7CLKSOURCE_HSI))

+

+#define IS_RCC_UART8CLKSOURCE(SOURCE)  \

+               (((SOURCE) == RCC_UART8CLKSOURCE_PCLK1)  || \

+                ((SOURCE) == RCC_UART8CLKSOURCE_SYSCLK) || \

+                ((SOURCE) == RCC_UART8CLKSOURCE_LSE)    || \

+                ((SOURCE) == RCC_UART8CLKSOURCE_HSI))

+#define IS_RCC_I2C1CLKSOURCE(SOURCE)   \

+               (((SOURCE) == RCC_I2C1CLKSOURCE_PCLK1) || \

+                ((SOURCE) == RCC_I2C1CLKSOURCE_SYSCLK)|| \

+                ((SOURCE) == RCC_I2C1CLKSOURCE_HSI))

+#define IS_RCC_I2C2CLKSOURCE(SOURCE)   \

+               (((SOURCE) == RCC_I2C2CLKSOURCE_PCLK1) || \

+                ((SOURCE) == RCC_I2C2CLKSOURCE_SYSCLK)|| \

+                ((SOURCE) == RCC_I2C2CLKSOURCE_HSI))

+

+#define IS_RCC_I2C3CLKSOURCE(SOURCE)   \

+               (((SOURCE) == RCC_I2C3CLKSOURCE_PCLK1) || \

+                ((SOURCE) == RCC_I2C3CLKSOURCE_SYSCLK)|| \

+                ((SOURCE) == RCC_I2C3CLKSOURCE_HSI))

+#define IS_RCC_I2C4CLKSOURCE(SOURCE)   \

+               (((SOURCE) == RCC_I2C4CLKSOURCE_PCLK1) || \

+                ((SOURCE) == RCC_I2C4CLKSOURCE_SYSCLK)|| \

+                ((SOURCE) == RCC_I2C4CLKSOURCE_HSI))

+#define IS_RCC_LPTIM1CLK(SOURCE)  \

+               (((SOURCE) == RCC_LPTIM1CLKSOURCE_PCLK) || \

+                ((SOURCE) == RCC_LPTIM1CLKSOURCE_LSI)  || \

+                ((SOURCE) == RCC_LPTIM1CLKSOURCE_HSI)  || \

+                ((SOURCE) == RCC_LPTIM1CLKSOURCE_LSE))

+#define IS_RCC_CLK48SOURCE(SOURCE)  \

+               (((SOURCE) == RCC_CLK48SOURCE_PLLSAIP) || \

+                ((SOURCE) == RCC_CLK48SOURCE_PLL))

+#define IS_RCC_TIMPRES(VALUE)  \

+               (((VALUE) == RCC_TIMPRES_DESACTIVATED) || \

+                ((VALUE) == RCC_TIMPRES_ACTIVATED))

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_RCC_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rng.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rng.h
new file mode 100644
index 0000000..c94254f
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rng.h
@@ -0,0 +1,358 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_rng.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of RNG HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_RNG_H

+#define __STM32F7xx_HAL_RNG_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @defgroup RNG RNG

+  * @brief RNG HAL module driver

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/ 

+

+/** @defgroup RNG_Exported_Types RNG Exported Types

+  * @{

+  */

+

+/** @defgroup RNG_Exported_Types_Group1 RNG State Structure definition 

+  * @{

+  */

+typedef enum

+{

+  HAL_RNG_STATE_RESET     = 0x00,  /*!< RNG not yet initialized or disabled */

+  HAL_RNG_STATE_READY     = 0x01,  /*!< RNG initialized and ready for use   */

+  HAL_RNG_STATE_BUSY      = 0x02,  /*!< RNG internal process is ongoing     */ 

+  HAL_RNG_STATE_TIMEOUT   = 0x03,  /*!< RNG timeout state                   */

+  HAL_RNG_STATE_ERROR     = 0x04   /*!< RNG error state                     */

+    

+}HAL_RNG_StateTypeDef;

+

+/** 

+  * @}

+  */

+

+/** @defgroup RNG_Exported_Types_Group2 RNG Handle Structure definition   

+  * @{

+  */ 

+typedef struct

+{

+  RNG_TypeDef                 *Instance;    /*!< Register base address   */

+

+  uint32_t                    RandomNumber; /*!< Last Generated random number */	

+  

+  HAL_LockTypeDef             Lock;         /*!< RNG locking object      */

+  

+  __IO HAL_RNG_StateTypeDef   State;        /*!< RNG communication state */

+  

+}RNG_HandleTypeDef;

+

+/** 

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+   

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup RNG_Exported_Constants RNG Exported Constants

+  * @{

+  */

+

+/** @defgroup RNG_Exported_Constants_Group1 RNG Interrupt definition

+  * @{

+  */

+#define RNG_IT_DRDY  RNG_SR_DRDY  /*!< Data Ready interrupt  */

+#define RNG_IT_CEI   RNG_SR_CEIS  /*!< Clock error interrupt */

+#define RNG_IT_SEI   RNG_SR_SEIS  /*!< Seed error interrupt  */

+/**

+  * @}

+  */

+

+/** @defgroup RNG_Exported_Constants_Group2 RNG Flag definition

+  * @{

+  */

+#define RNG_FLAG_DRDY   RNG_SR_DRDY  /*!< Data ready                 */

+#define RNG_FLAG_CECS   RNG_SR_CECS  /*!< Clock error current status */

+#define RNG_FLAG_SECS   RNG_SR_SECS  /*!< Seed error current status  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+/* Exported macros -----------------------------------------------------------*/

+

+/** @defgroup RNG_Exported_Macros RNG Exported Macros

+  * @{

+  */

+

+/** @brief Reset RNG handle state

+  * @param  __HANDLE__: RNG Handle

+  * @retval None

+  */

+#define __HAL_RNG_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_RNG_STATE_RESET)

+

+/**

+  * @brief  Enables the RNG peripheral.

+  * @param  __HANDLE__: RNG Handle

+  * @retval None

+  */

+#define __HAL_RNG_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |=  RNG_CR_RNGEN)

+

+/**

+  * @brief  Disables the RNG peripheral.

+  * @param  __HANDLE__: RNG Handle

+  * @retval None

+  */

+#define __HAL_RNG_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~RNG_CR_RNGEN)

+

+/**

+  * @brief  Check the selected RNG flag status.

+  * @param  __HANDLE__: RNG Handle

+  * @param  __FLAG__: RNG flag

+  *          This parameter can be one of the following values:

+  *            @arg RNG_FLAG_DRDY: Data ready                

+  *            @arg RNG_FLAG_CECS: Clock error current status

+  *            @arg RNG_FLAG_SECS: Seed error current status 

+  * @retval The new state of __FLAG__ (SET or RESET).

+  */

+#define __HAL_RNG_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))

+

+/**

+  * @brief  Clears the selected RNG flag status.

+  * @param  __HANDLE__: RNG handle

+  * @param  __FLAG__: RNG flag to clear  

+  * @note   WARNING: This is a dummy macro for HAL code alignment,

+  *         flags RNG_FLAG_DRDY, RNG_FLAG_CECS and RNG_FLAG_SECS are read-only.

+  * @retval None

+  */

+#define __HAL_RNG_CLEAR_FLAG(__HANDLE__, __FLAG__)                      /* dummy  macro */

+

+

+

+/**

+  * @brief  Enables the RNG interrupts.

+  * @param  __HANDLE__: RNG Handle

+  * @retval None

+  */

+#define __HAL_RNG_ENABLE_IT(__HANDLE__) ((__HANDLE__)->Instance->CR |=  RNG_CR_IE)

+    

+/**

+  * @brief  Disables the RNG interrupts.

+  * @param  __HANDLE__: RNG Handle

+  * @retval None

+  */

+#define __HAL_RNG_DISABLE_IT(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~RNG_CR_IE)

+

+/**

+  * @brief  Checks whether the specified RNG interrupt has occurred or not.

+  * @param  __HANDLE__: RNG Handle

+  * @param  __INTERRUPT__: specifies the RNG interrupt status flag to check.

+  *         This parameter can be one of the following values:

+  *            @arg RNG_IT_DRDY: Data ready interrupt              

+  *            @arg RNG_IT_CEI: Clock error interrupt

+  *            @arg RNG_IT_SEI: Seed error interrupt

+  * @retval The new state of __INTERRUPT__ (SET or RESET).

+  */

+#define __HAL_RNG_GET_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->SR & (__INTERRUPT__)) == (__INTERRUPT__))   

+

+/**

+  * @brief  Clear the RNG interrupt status flags.

+  * @param  __HANDLE__: RNG Handle

+  * @param  __INTERRUPT__: specifies the RNG interrupt status flag to clear.

+  *          This parameter can be one of the following values:            

+  *            @arg RNG_IT_CEI: Clock error interrupt

+  *            @arg RNG_IT_SEI: Seed error interrupt

+  * @note   RNG_IT_DRDY flag is read-only, reading RNG_DR register automatically clears RNG_IT_DRDY.          

+  * @retval None

+  */

+#define __HAL_RNG_CLEAR_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->SR) = ~(__INTERRUPT__))

+

+/**

+  * @}

+  */ 

+

+/* Exported functions --------------------------------------------------------*/

+/** @defgroup RNG_Exported_Functions RNG Exported Functions

+  * @{

+  */

+

+/** @defgroup RNG_Exported_Functions_Group1 Initialization and de-initialization functions

+  * @{

+  */  

+HAL_StatusTypeDef HAL_RNG_Init(RNG_HandleTypeDef *hrng);

+HAL_StatusTypeDef HAL_RNG_DeInit (RNG_HandleTypeDef *hrng);

+void HAL_RNG_MspInit(RNG_HandleTypeDef *hrng);

+void HAL_RNG_MspDeInit(RNG_HandleTypeDef *hrng);

+

+/**

+  * @}

+  */ 

+

+/** @defgroup RNG_Exported_Functions_Group2 Peripheral Control functions

+  * @{

+  */

+uint32_t HAL_RNG_GetRandomNumber(RNG_HandleTypeDef *hrng);    /* Obsolete, use HAL_RNG_GenerateRandomNumber() instead    */

+uint32_t HAL_RNG_GetRandomNumber_IT(RNG_HandleTypeDef *hrng); /* Obsolete, use HAL_RNG_GenerateRandomNumber_IT() instead */

+

+HAL_StatusTypeDef HAL_RNG_GenerateRandomNumber(RNG_HandleTypeDef *hrng, uint32_t *random32bit);

+HAL_StatusTypeDef HAL_RNG_GenerateRandomNumber_IT(RNG_HandleTypeDef *hrng);

+uint32_t HAL_RNG_ReadLastRandomNumber(RNG_HandleTypeDef *hrng);

+

+void HAL_RNG_IRQHandler(RNG_HandleTypeDef *hrng);

+void HAL_RNG_ErrorCallback(RNG_HandleTypeDef *hrng);

+void HAL_RNG_ReadyDataCallback(RNG_HandleTypeDef* hrng, uint32_t random32bit);

+

+/**

+  * @}

+  */ 

+

+/** @defgroup RNG_Exported_Functions_Group3 Peripheral State functions

+  * @{

+  */

+HAL_RNG_StateTypeDef HAL_RNG_GetState(RNG_HandleTypeDef *hrng);

+

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */ 

+

+/* Private types -------------------------------------------------------------*/

+/** @defgroup RNG_Private_Types RNG Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private defines -----------------------------------------------------------*/

+/** @defgroup RNG_Private_Defines RNG Private Defines

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+          

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup RNG_Private_Variables RNG Private Variables

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup RNG_Private_Constants RNG Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup RNG_Private_Macros RNG Private Macros

+  * @{

+  */

+#define IS_RNG_IT(IT) (((IT) == RNG_IT_CEI) || \

+                       ((IT) == RNG_IT_SEI))

+

+#define IS_RNG_FLAG(FLAG) (((FLAG) == RNG_FLAG_DRDY) || \

+                           ((FLAG) == RNG_FLAG_CECS) || \

+                           ((FLAG) == RNG_FLAG_SECS))

+

+/**

+  * @}

+  */ 

+

+/* Private functions prototypes ----------------------------------------------*/

+/** @defgroup RNG_Private_Functions_Prototypes RNG Private Functions Prototypes

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup RNG_Private_Functions RNG Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_RNG_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rtc.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rtc.h
new file mode 100644
index 0000000..dd64383
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rtc.h
@@ -0,0 +1,806 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_rtc.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of RTC HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_RTC_H

+#define __STM32F7xx_HAL_RTC_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup RTC

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup RTC_Exported_Types RTC Exported Types

+  * @{

+  */

+

+/** 

+  * @brief  HAL State structures definition  

+  */ 

+typedef enum

+{

+  HAL_RTC_STATE_RESET             = 0x00,  /*!< RTC not yet initialized or disabled */

+  HAL_RTC_STATE_READY             = 0x01,  /*!< RTC initialized and ready for use   */

+  HAL_RTC_STATE_BUSY              = 0x02,  /*!< RTC process is ongoing              */     

+  HAL_RTC_STATE_TIMEOUT           = 0x03,  /*!< RTC timeout state                   */  

+  HAL_RTC_STATE_ERROR             = 0x04   /*!< RTC error state                     */      

+                                                                        

+}HAL_RTCStateTypeDef;

+

+/** 

+  * @brief  RTC Configuration Structure definition  

+  */

+typedef struct

+{

+  uint32_t HourFormat;      /*!< Specifies the RTC Hour Format.

+                                 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 = 0x7F */        

+                               

+  uint32_t SynchPrediv;     /*!< Specifies the RTC Synchronous Predivider value.

+                                 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 */      

+  

+  uint32_t OutPutPolarity;  /*!< Specifies the polarity of the output signal.  

+                                 This parameter can be a value of @ref RTC_Output_Polarity_Definitions */ 

+  

+  uint32_t OutPutType;      /*!< Specifies the RTC Output Pin mode.   

+                                 This parameter can be a value of @ref RTC_Output_Type_ALARM_OUT */             

+}RTC_InitTypeDef;

+

+/** 

+  * @brief  RTC Time structure definition  

+  */

+typedef struct

+{

+  uint8_t Hours;            /*!< Specifies the RTC Time Hour.

+                                 This parameter must be a number between Min_Data = 0 and Max_Data = 12 if the RTC_HourFormat_12 is selected.

+                                 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 = 59 */

+  

+  uint8_t Seconds;          /*!< Specifies the RTC Time Seconds.

+                                 This parameter must be a number between Min_Data = 0 and Max_Data = 59 */

+  

+  uint32_t SubSeconds;      /*!< Specifies the RTC Time SubSeconds.

+                                 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 DayLightSaving;  /*!< Specifies RTC_DayLightSaveOperation: the value of hour adjustment.

+                                 This parameter can be a value of @ref RTC_DayLightSaving_Definitions */

+  

+  uint32_t StoreOperation;  /*!< Specifies RTC_StoreOperation value to be written in the BCK bit 

+                                 in CR register to store the operation.

+                                 This parameter can be a value of @ref RTC_StoreOperation_Definitions */

+}RTC_TimeTypeDef; 

+  

+/** 

+  * @brief  RTC Date structure definition  

+  */

+typedef struct

+{

+  uint8_t WeekDay;  /*!< Specifies the RTC Date WeekDay.

+                         This parameter can be a value of @ref RTC_WeekDay_Definitions */

+  

+  uint8_t Month;    /*!< Specifies the RTC Date Month (in BCD format).

+                         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 = 31 */

+  

+  uint8_t Year;     /*!< Specifies the RTC Date Year.

+                         This parameter must be a number between Min_Data = 0 and Max_Data = 99 */

+                        

+}RTC_DateTypeDef;

+

+/** 

+  * @brief  RTC Alarm structure definition  

+  */

+typedef struct

+{

+  RTC_TimeTypeDef AlarmTime;     /*!< Specifies the RTC Alarm Time members */

+    

+  uint32_t AlarmMask;            /*!< Specifies the RTC Alarm Masks.

+                                      This parameter can be a value of @ref RTC_AlarmMask_Definitions */

+  

+  uint32_t AlarmSubSecondMask;   /*!< Specifies the RTC Alarm SubSeconds Masks.

+                                      This parameter can be a value of @ref RTC_Alarm_Sub_Seconds_Masks_Definitions */                                   

+

+  uint32_t AlarmDateWeekDaySel;  /*!< Specifies the RTC Alarm is on Date or WeekDay.

+                                     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 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 .

+                                      This parameter can be a value of @ref RTC_Alarms_Definitions */                            

+}RTC_AlarmTypeDef;

+

+/** 

+  * @brief  RTC Handle Structure definition  

+  */ 

+typedef struct

+{

+  RTC_TypeDef                 *Instance;  /*!< Register base address    */

+   

+  RTC_InitTypeDef             Init;       /*!< RTC required parameters  */ 

+  

+  HAL_LockTypeDef             Lock;       /*!< RTC locking object       */

+  

+  __IO HAL_RTCStateTypeDef    State;      /*!< Time communication state */

+    

+}RTC_HandleTypeDef;

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup RTC_Exported_Constants RTC Exported Constants

+  * @{

+  */

+ 

+/** @defgroup RTC_Hour_Formats RTC Hour Formats

+  * @{

+  */ 

+#define RTC_HOURFORMAT_24              ((uint32_t)0x00000000)

+#define RTC_HOURFORMAT_12              ((uint32_t)0x00000040)

+/**

+  * @}

+  */ 

+

+

+/** @defgroup RTC_Output_Polarity_Definitions RTC Output Polarity Definitions 

+  * @{

+  */ 

+#define RTC_OUTPUT_POLARITY_HIGH       ((uint32_t)0x00000000)

+#define RTC_OUTPUT_POLARITY_LOW        ((uint32_t)0x00100000)

+/**

+  * @}

+  */ 

+

+/** @defgroup RTC_Output_Type_ALARM_OUT RTC Output Type ALARM OUT

+  * @{

+  */ 

+#define RTC_OUTPUT_TYPE_OPENDRAIN      ((uint32_t)0x00000000)

+#define RTC_OUTPUT_TYPE_PUSHPULL       ((uint32_t)RTC_OR_ALARMTYPE)  /* 0x00000008 */

+/**

+  * @}

+  */

+

+/** @defgroup RTC_AM_PM_Definitions RTC AM PM Definitions

+  * @{

+  */ 

+#define RTC_HOURFORMAT12_AM            ((uint8_t)0x00)

+#define RTC_HOURFORMAT12_PM            ((uint8_t)0x40)

+/**

+  * @}

+  */ 

+

+/** @defgroup RTC_DayLightSaving_Definitions RTC DayLight Saving Definitions

+  * @{

+  */ 

+#define RTC_DAYLIGHTSAVING_SUB1H       ((uint32_t)0x00020000)

+#define RTC_DAYLIGHTSAVING_ADD1H       ((uint32_t)0x00010000)

+#define RTC_DAYLIGHTSAVING_NONE        ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup RTC_StoreOperation_Definitions RTC Store Operation Definitions

+  * @{

+  */ 

+#define RTC_STOREOPERATION_RESET        ((uint32_t)0x00000000)

+#define RTC_STOREOPERATION_SET          ((uint32_t)0x00040000)

+/**

+  * @}

+  */

+

+/** @defgroup RTC_Input_parameter_format_definitions RTC Input Parameter Format Definitions

+  * @{

+  */ 

+#define RTC_FORMAT_BIN                      ((uint32_t)0x000000000)

+#define RTC_FORMAT_BCD                      ((uint32_t)0x000000001)

+/**

+  * @}

+  */ 

+

+/** @defgroup RTC_Month_Date_Definitions RTC Month Date Definitions

+  * @{

+  */

+/* Coded in BCD format */

+#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)

+/**

+  * @}

+  */ 

+

+/** @defgroup RTC_WeekDay_Definitions RTC WeekDay Definitions

+  * @{

+  */   

+#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)

+/**

+  * @}

+  */                                 

+

+/** @defgroup RTC_AlarmDateWeekDay_Definitions RTC Alarm Date WeekDay Definitions

+  * @{

+  */ 

+#define RTC_ALARMDATEWEEKDAYSEL_DATE      ((uint32_t)0x00000000)

+#define RTC_ALARMDATEWEEKDAYSEL_WEEKDAY   ((uint32_t)0x40000000)

+/**

+  * @}

+  */ 

+

+/** @defgroup RTC_AlarmMask_Definitions RTC Alarm Mask Definitions 

+  * @{

+  */ 

+#define RTC_ALARMMASK_NONE                ((uint32_t)0x00000000)

+#define RTC_ALARMMASK_DATEWEEKDAY         RTC_ALRMAR_MSK4

+#define RTC_ALARMMASK_HOURS               RTC_ALRMAR_MSK3

+#define RTC_ALARMMASK_MINUTES             RTC_ALRMAR_MSK2

+#define RTC_ALARMMASK_SECONDS             RTC_ALRMAR_MSK1

+#define RTC_ALARMMASK_ALL                 ((uint32_t)0x80808080)

+/**

+  * @}

+  */ 

+

+/** @defgroup RTC_Alarms_Definitions RTC Alarms Definitions 

+  * @{

+  */ 

+#define RTC_ALARM_A                       RTC_CR_ALRAE

+#define RTC_ALARM_B                       RTC_CR_ALRBE

+/**

+  * @}

+  */

+

+/** @defgroup RTC_Alarm_Sub_Seconds_Masks_Definitions RTC Alarm Sub Seconds Masks Definitions

+  * @{

+  */

+#define RTC_ALARMSUBSECONDMASK_ALL         ((uint32_t)0x00000000)  /*!< All Alarm SS fields are masked. 

+                                                                        There is no comparison on sub seconds 

+                                                                        for Alarm */

+#define RTC_ALARMSUBSECONDMASK_SS14_1      ((uint32_t)0x01000000)  /*!< SS[14:1] are don't care in Alarm 

+                                                                        comparison. Only SS[0] is compared.    */

+#define RTC_ALARMSUBSECONDMASK_SS14_2      ((uint32_t)0x02000000)  /*!< SS[14:2] are don't care in Alarm 

+                                                                        comparison. Only SS[1:0] are compared  */

+#define RTC_ALARMSUBSECONDMASK_SS14_3      ((uint32_t)0x03000000)  /*!< SS[14:3] are don't care in Alarm 

+                                                                        comparison. Only SS[2:0] are compared  */

+#define RTC_ALARMSUBSECONDMASK_SS14_4      ((uint32_t)0x04000000)  /*!< SS[14:4] are don't care in Alarm 

+                                                                        comparison. Only SS[3:0] are compared  */

+#define RTC_ALARMSUBSECONDMASK_SS14_5      ((uint32_t)0x05000000)  /*!< SS[14:5] are don't care in Alarm 

+                                                                        comparison. Only SS[4:0] are compared  */

+#define RTC_ALARMSUBSECONDMASK_SS14_6      ((uint32_t)0x06000000)  /*!< SS[14:6] are don't care in Alarm 

+                                                                        comparison. Only SS[5:0] are compared  */

+#define RTC_ALARMSUBSECONDMASK_SS14_7      ((uint32_t)0x07000000)  /*!< SS[14:7] are don't care in Alarm 

+                                                                        comparison. Only SS[6:0] are compared  */

+#define RTC_ALARMSUBSECONDMASK_SS14_8      ((uint32_t)0x08000000)  /*!< SS[14:8] are don't care in Alarm 

+                                                                        comparison. Only SS[7:0] are compared  */

+#define RTC_ALARMSUBSECONDMASK_SS14_9      ((uint32_t)0x09000000)  /*!< SS[14:9] are don't care in Alarm 

+                                                                        comparison. Only SS[8:0] are compared  */

+#define RTC_ALARMSUBSECONDMASK_SS14_10     ((uint32_t)0x0A000000)  /*!< SS[14:10] are don't care in Alarm 

+                                                                        comparison. Only SS[9:0] are compared  */

+#define RTC_ALARMSUBSECONDMASK_SS14_11     ((uint32_t)0x0B000000)  /*!< SS[14:11] are don't care in Alarm 

+                                                                        comparison. Only SS[10:0] are compared */

+#define RTC_ALARMSUBSECONDMASK_SS14_12     ((uint32_t)0x0C000000)  /*!< SS[14:12] are don't care in Alarm 

+                                                                        comparison.Only SS[11:0] are compared  */

+#define RTC_ALARMSUBSECONDMASK_SS14_13     ((uint32_t)0x0D000000)  /*!< SS[14:13] are don't care in Alarm 

+                                                                        comparison. Only SS[12:0] are compared */

+#define RTC_ALARMSUBSECONDMASK_SS14        ((uint32_t)0x0E000000)  /*!< SS[14] is don't care in Alarm 

+                                                                        comparison.Only SS[13:0] are compared  */

+#define RTC_ALARMSUBSECONDMASK_NONE        ((uint32_t)0x0F000000)  /*!< SS[14:0] are compared and must match 

+                                                                        to activate alarm. */

+/**

+  * @}

+  */   

+

+/** @defgroup RTC_Interrupts_Definitions RTC Interrupts Definitions 

+  * @{

+  */ 

+#define RTC_IT_TS                         ((uint32_t)RTC_CR_TSIE)

+#define RTC_IT_WUT                        ((uint32_t)RTC_CR_WUTIE)

+#define RTC_IT_ALRA                       ((uint32_t)RTC_CR_ALRAIE)

+#define RTC_IT_ALRB                       ((uint32_t)RTC_CR_ALRBIE)

+#define RTC_IT_TAMP                       ((uint32_t)RTC_TAMPCR_TAMPIE) /* Used only to Enable the Tamper Interrupt */

+#define RTC_IT_TAMP1                      ((uint32_t)RTC_TAMPCR_TAMP1IE)

+#define RTC_IT_TAMP2                      ((uint32_t)RTC_TAMPCR_TAMP2IE)

+#define RTC_IT_TAMP3                      ((uint32_t)RTC_TAMPCR_TAMP3IE)

+/**

+  * @}

+  */

+

+/** @defgroup RTC_Flags_Definitions RTC Flags Definitions 

+  * @{

+  */ 

+#define RTC_FLAG_RECALPF                  ((uint32_t)RTC_ISR_RECALPF)

+#define RTC_FLAG_TAMP3F                   ((uint32_t)RTC_ISR_TAMP3F)

+#define RTC_FLAG_TAMP2F                   ((uint32_t)RTC_ISR_TAMP2F)

+#define RTC_FLAG_TAMP1F                   ((uint32_t)RTC_ISR_TAMP1F)

+#define RTC_FLAG_TSOVF                    ((uint32_t)RTC_ISR_TSOVF)

+#define RTC_FLAG_TSF                      ((uint32_t)RTC_ISR_TSF)

+#define RTC_FLAG_ITSF                     ((uint32_t)RTC_ISR_ITSF)

+#define RTC_FLAG_WUTF                     ((uint32_t)RTC_ISR_WUTF)

+#define RTC_FLAG_ALRBF                    ((uint32_t)RTC_ISR_ALRBF)

+#define RTC_FLAG_ALRAF                    ((uint32_t)RTC_ISR_ALRAF)

+#define RTC_FLAG_INITF                    ((uint32_t)RTC_ISR_INITF)

+#define RTC_FLAG_RSF                      ((uint32_t)RTC_ISR_RSF)

+#define RTC_FLAG_INITS                    ((uint32_t)RTC_ISR_INITS)

+#define RTC_FLAG_SHPF                     ((uint32_t)RTC_ISR_SHPF)

+#define RTC_FLAG_WUTWF                    ((uint32_t)RTC_ISR_WUTWF)

+#define RTC_FLAG_ALRBWF                   ((uint32_t)RTC_ISR_ALRBWF)

+#define RTC_FLAG_ALRAWF                   ((uint32_t)RTC_ISR_ALRAWF)

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup RTC_Exported_Macros RTC Exported Macros

+  * @{

+  */

+

+/** @brief Reset RTC handle state

+  * @param  __HANDLE__: specifies the 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.

+  * @retval None

+  */

+#define __HAL_RTC_WRITEPROTECTION_DISABLE(__HANDLE__)             \

+                        do{                                       \

+                            (__HANDLE__)->Instance->WPR = 0xCA;   \

+                            (__HANDLE__)->Instance->WPR = 0x53;   \

+                          } while(0)

+

+/**

+  * @brief  Enable the write protection for RTC registers.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @retval None

+  */

+#define __HAL_RTC_WRITEPROTECTION_ENABLE(__HANDLE__)              \

+                        do{                                       \

+                            (__HANDLE__)->Instance->WPR = 0xFF;   \

+                          } while(0)                            

+ 

+/**

+  * @brief  Enable the RTC ALARMA peripheral.

+  * @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.

+  * @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.

+  * @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.

+  * @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. 

+  *          This parameter can be any combination of the following values:

+  *             @arg RTC_IT_ALRA: Alarm A interrupt

+  *             @arg RTC_IT_ALRB: Alarm B interrupt  

+  * @retval None

+  */   

+#define __HAL_RTC_ALARM_ENABLE_IT(__HANDLE__, __INTERRUPT__)          ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))

+

+/**

+  * @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. 

+  *         This parameter can be any combination of the following values:

+  *            @arg RTC_IT_ALRA: Alarm A interrupt

+  *            @arg RTC_IT_ALRB: Alarm B interrupt  

+  * @retval None

+  */

+#define __HAL_RTC_ALARM_DISABLE_IT(__HANDLE__, __INTERRUPT__)         ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))

+

+/**

+  * @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.

+  *         This parameter can be:

+  *            @arg RTC_IT_ALRA: Alarm A interrupt

+  *            @arg RTC_IT_ALRB: Alarm B interrupt  

+  * @retval None

+  */

+#define __HAL_RTC_ALARM_GET_IT(__HANDLE__, __INTERRUPT__)                  ((((((__HANDLE__)->Instance->ISR)& ((__INTERRUPT__)>> 4)) & 0x0000FFFF) != RESET)? SET : RESET)

+

+/**

+  * @brief  Get the selected RTC Alarm's flag status.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @param  __FLAG__: specifies the RTC Alarm Flag to check.

+  *         This parameter can be:

+  *            @arg RTC_FLAG_ALRAF

+  *            @arg RTC_FLAG_ALRBF

+  *            @arg RTC_FLAG_ALRAWF     

+  *            @arg RTC_FLAG_ALRBWF    

+  * @retval None

+  */

+#define __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__)                (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET)? SET : RESET)

+

+/**

+  * @brief  Clear the RTC Alarm's pending flags.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @param  __FLAG__: specifies the RTC Alarm Flag sources to be enabled or disabled.

+  *          This parameter can be:

+  *             @arg RTC_FLAG_ALRAF

+  *             @arg RTC_FLAG_ALRBF 

+  * @retval None

+  */

+#define __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__)                  ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0000FFFF)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))

+                                       

+/**

+  * @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.

+  *         This parameter can be:

+  *            @arg RTC_IT_ALRA: Alarm A interrupt

+  *            @arg RTC_IT_ALRB: Alarm B interrupt

+  * @retval None

+  */

+#define __HAL_RTC_ALARM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)     (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != RESET) ? SET : RESET)

+

+/**

+  * @brief  Enable interrupt on the RTC Alarm associated Exti line.

+  * @retval None

+  */

+#define __HAL_RTC_ALARM_EXTI_ENABLE_IT()            (EXTI->IMR |= RTC_EXTI_LINE_ALARM_EVENT)

+

+/**

+  * @brief  Disable interrupt on the RTC Alarm associated Exti line.

+  * @retval None

+  */

+#define __HAL_RTC_ALARM_EXTI_DISABLE_IT()           (EXTI->IMR &= ~(RTC_EXTI_LINE_ALARM_EVENT))

+

+/**

+  * @brief  Enable event on the RTC Alarm associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_ALARM_EXTI_ENABLE_EVENT()         (EXTI->EMR |= RTC_EXTI_LINE_ALARM_EVENT)

+

+/**

+  * @brief  Disable event on the RTC Alarm associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_ALARM_EXTI_DISABLE_EVENT()         (EXTI->EMR &= ~(RTC_EXTI_LINE_ALARM_EVENT))

+

+/**

+  * @brief  Enable falling edge trigger on the RTC Alarm associated Exti line.  

+  * @retval None.

+  */

+#define __HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE()   (EXTI->FTSR |= RTC_EXTI_LINE_ALARM_EVENT)

+

+/**

+  * @brief  Disable falling edge trigger on the RTC Alarm associated Exti line.  

+  * @retval None.

+  */

+#define __HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE()  (EXTI->FTSR &= ~(RTC_EXTI_LINE_ALARM_EVENT))

+

+/**

+  * @brief  Enable rising edge trigger on the RTC Alarm associated Exti line.  

+  * @retval None.

+  */

+#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE()    (EXTI->RTSR |= RTC_EXTI_LINE_ALARM_EVENT)

+

+/**

+  * @brief  Disable rising edge trigger on the RTC Alarm associated Exti line.  

+  * @retval None.

+  */

+#define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE()   (EXTI->RTSR &= ~(RTC_EXTI_LINE_ALARM_EVENT))

+

+/**

+  * @brief  Enable rising & falling edge trigger on the RTC Alarm associated Exti line.  

+  * @retval None.

+  */

+#define __HAL_RTC_ALARM_EXTI_ENABLE_RISING_FALLING_EDGE() __HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE();__HAL_RTC_ALARM_EXTI_ENABLE_FALLING_EDGE();

+

+/**

+  * @brief  Disable rising & falling edge trigger on the RTC Alarm associated Exti line.  

+  * @retval None.

+  */

+#define __HAL_RTC_ALARM_EXTI_DISABLE_RISING_FALLING_EDGE() __HAL_RTC_ALARM_EXTI_DISABLE_RISING_EDGE();__HAL_RTC_ALARM_EXTI_DISABLE_FALLING_EDGE();

+

+/**

+  * @brief Check whether the RTC Alarm associated Exti line interrupt flag is set or not.

+  * @retval Line Status.

+  */

+#define __HAL_RTC_ALARM_EXTI_GET_FLAG()              (EXTI->PR & RTC_EXTI_LINE_ALARM_EVENT)

+

+/**

+  * @brief Clear the RTC Alarm associated Exti line flag.

+  * @retval None.

+  */

+#define __HAL_RTC_ALARM_EXTI_CLEAR_FLAG()            (EXTI->PR = RTC_EXTI_LINE_ALARM_EVENT)

+

+/**

+  * @brief Generate a Software interrupt on RTC Alarm associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_ALARM_EXTI_GENERATE_SWIT()         (EXTI->SWIER |= RTC_EXTI_LINE_ALARM_EVENT)

+/**

+  * @}

+  */

+

+/* Include RTC HAL Extension module */

+#include "stm32f7xx_hal_rtc_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup RTC_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup RTC_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization and de-initialization functions  ****************************/

+HAL_StatusTypeDef HAL_RTC_Init(RTC_HandleTypeDef *hrtc);

+HAL_StatusTypeDef HAL_RTC_DeInit(RTC_HandleTypeDef *hrtc);

+void       HAL_RTC_MspInit(RTC_HandleTypeDef *hrtc);

+void       HAL_RTC_MspDeInit(RTC_HandleTypeDef *hrtc);

+/**

+  * @}

+  */

+

+/** @addtogroup RTC_Exported_Functions_Group2

+  * @{

+  */

+/* RTC Time and Date functions ************************************************/

+HAL_StatusTypeDef HAL_RTC_SetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format);

+HAL_StatusTypeDef HAL_RTC_GetTime(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTime, uint32_t Format);

+HAL_StatusTypeDef HAL_RTC_SetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format);

+HAL_StatusTypeDef HAL_RTC_GetDate(RTC_HandleTypeDef *hrtc, RTC_DateTypeDef *sDate, uint32_t Format);

+/**

+  * @}

+  */

+

+/** @addtogroup RTC_Exported_Functions_Group3

+  * @{

+  */

+/* RTC Alarm functions ********************************************************/

+HAL_StatusTypeDef HAL_RTC_SetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format);

+HAL_StatusTypeDef HAL_RTC_SetAlarm_IT(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Format);

+HAL_StatusTypeDef HAL_RTC_DeactivateAlarm(RTC_HandleTypeDef *hrtc, uint32_t Alarm);

+HAL_StatusTypeDef HAL_RTC_GetAlarm(RTC_HandleTypeDef *hrtc, RTC_AlarmTypeDef *sAlarm, uint32_t Alarm, uint32_t Format);

+void                HAL_RTC_AlarmIRQHandler(RTC_HandleTypeDef *hrtc);

+HAL_StatusTypeDef   HAL_RTC_PollForAlarmAEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout);

+void         HAL_RTC_AlarmAEventCallback(RTC_HandleTypeDef *hrtc);

+/**

+  * @}

+  */

+

+/** @addtogroup RTC_Exported_Functions_Group4

+  * @{

+  */

+/* Peripheral Control functions ***********************************************/

+HAL_StatusTypeDef   HAL_RTC_WaitForSynchro(RTC_HandleTypeDef* hrtc);

+/**

+  * @}

+  */

+

+/** @addtogroup RTC_Exported_Functions_Group5

+  * @{

+  */

+/* Peripheral State functions *************************************************/

+HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup RTC_Private_Constants RTC Private Constants

+  * @{

+  */

+/* Masks Definition */

+#define RTC_TR_RESERVED_MASK    ((uint32_t)0x007F7F7F)

+#define RTC_DR_RESERVED_MASK    ((uint32_t)0x00FFFF3F) 

+#define RTC_INIT_MASK           ((uint32_t)0xFFFFFFFF)  

+#define RTC_RSF_MASK            ((uint32_t)0xFFFFFF5F)

+

+#define RTC_TIMEOUT_VALUE       1000

+

+#define RTC_EXTI_LINE_ALARM_EVENT             ((uint32_t)EXTI_IMR_MR17)  /*!< External interrupt line 17 Connected to the RTC Alarm event */

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup RTC_Private_Macros RTC Private Macros

+  * @{

+  */

+

+/** @defgroup RTC_IS_RTC_Definitions RTC Private macros to check input parameters

+  * @{

+  */

+#define IS_RTC_HOUR_FORMAT(__FORMAT__) (((__FORMAT__) == RTC_HOURFORMAT_12) || \

+                                        ((__FORMAT__) == RTC_HOURFORMAT_24))

+#define IS_RTC_OUTPUT_POL(__POL__)     (((__POL__) == RTC_OUTPUT_POLARITY_HIGH) || \

+                                        ((__POL__) == RTC_OUTPUT_POLARITY_LOW))

+#define IS_RTC_OUTPUT_TYPE(__TYPE__)   (((__TYPE__) == RTC_OUTPUT_TYPE_OPENDRAIN) || \

+                                        ((__TYPE__) == RTC_OUTPUT_TYPE_PUSHPULL))

+#define IS_RTC_ASYNCH_PREDIV(__PREDIV__)   ((__PREDIV__) <= (uint32_t)0x7F) 

+#define IS_RTC_SYNCH_PREDIV(__PREDIV__)    ((__PREDIV__) <= (uint32_t)0x7FFF)

+#define IS_RTC_HOUR12(__HOUR__)            (((__HOUR__) > (uint32_t)0) && ((__HOUR__) <= (uint32_t)12))

+#define IS_RTC_HOUR24(__HOUR__)            ((__HOUR__) <= (uint32_t)23)

+#define IS_RTC_MINUTES(__MINUTES__)        ((__MINUTES__) <= (uint32_t)59)

+#define IS_RTC_SECONDS(__SECONDS__)        ((__SECONDS__) <= (uint32_t)59)

+#define IS_RTC_HOURFORMAT12(__PM__)  (((__PM__) == RTC_HOURFORMAT12_AM) || ((__PM__) == RTC_HOURFORMAT12_PM))

+#define IS_RTC_DAYLIGHT_SAVING(__SAVE__) (((__SAVE__) == RTC_DAYLIGHTSAVING_SUB1H) || \

+                                          ((__SAVE__) == RTC_DAYLIGHTSAVING_ADD1H) || \

+                                          ((__SAVE__) == RTC_DAYLIGHTSAVING_NONE))

+#define IS_RTC_STORE_OPERATION(__OPERATION__) (((__OPERATION__) == RTC_STOREOPERATION_RESET) || \

+                                               ((__OPERATION__) == RTC_STOREOPERATION_SET))

+#define IS_RTC_FORMAT(__FORMAT__) (((__FORMAT__) == RTC_FORMAT_BIN) || ((__FORMAT__) == RTC_FORMAT_BCD))

+#define IS_RTC_YEAR(__YEAR__)              ((__YEAR__) <= (uint32_t)99)

+#define IS_RTC_MONTH(__MONTH__)            (((__MONTH__) >= (uint32_t)1) && ((__MONTH__) <= (uint32_t)12))

+#define IS_RTC_DATE(__DATE__)              (((__DATE__) >= (uint32_t)1) && ((__DATE__) <= (uint32_t)31))

+#define IS_RTC_WEEKDAY(__WEEKDAY__) (((__WEEKDAY__) == RTC_WEEKDAY_MONDAY)    || \

+                                     ((__WEEKDAY__) == RTC_WEEKDAY_TUESDAY)   || \

+                                     ((__WEEKDAY__) == RTC_WEEKDAY_WEDNESDAY) || \

+                                     ((__WEEKDAY__) == RTC_WEEKDAY_THURSDAY)  || \

+                                     ((__WEEKDAY__) == RTC_WEEKDAY_FRIDAY)    || \

+                                     ((__WEEKDAY__) == RTC_WEEKDAY_SATURDAY)  || \

+                                     ((__WEEKDAY__) == RTC_WEEKDAY_SUNDAY))

+

+#define IS_RTC_ALARM_DATE_WEEKDAY_DATE(__DATE__) (((__DATE__) >(uint32_t) 0) && ((__DATE__) <= (uint32_t)31))

+#define IS_RTC_ALARM_DATE_WEEKDAY_WEEKDAY(__WEEKDAY__) (((__WEEKDAY__) == RTC_WEEKDAY_MONDAY)    || \

+                                                        ((__WEEKDAY__) == RTC_WEEKDAY_TUESDAY)   || \

+                                                        ((__WEEKDAY__) == RTC_WEEKDAY_WEDNESDAY) || \

+                                                        ((__WEEKDAY__) == RTC_WEEKDAY_THURSDAY)  || \

+                                                        ((__WEEKDAY__) == RTC_WEEKDAY_FRIDAY)    || \

+                                                        ((__WEEKDAY__) == RTC_WEEKDAY_SATURDAY)  || \

+                                                        ((__WEEKDAY__) == RTC_WEEKDAY_SUNDAY))

+#define IS_RTC_ALARM_DATE_WEEKDAY_SEL(__SEL__) (((__SEL__) == RTC_ALARMDATEWEEKDAYSEL_DATE) || \

+                                                ((__SEL__) == RTC_ALARMDATEWEEKDAYSEL_WEEKDAY))

+#define IS_RTC_ALARM_MASK(__MASK__)  (((__MASK__) & 0x7F7F7F7F) == (uint32_t)RESET)

+#define IS_RTC_ALARM(__ALARM__)      (((__ALARM__) == RTC_ALARM_A) || ((__ALARM__) == RTC_ALARM_B))

+#define IS_RTC_ALARM_SUB_SECOND_VALUE(__VALUE__) ((__VALUE__) <= (uint32_t)0x00007FFF)

+#define IS_RTC_ALARM_SUB_SECOND_MASK(__MASK__)   (((__MASK__) == RTC_ALARMSUBSECONDMASK_ALL) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_1) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_2) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_3) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_4) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_5) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_6) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_7) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_8) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_9) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_10) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_11) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_12) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14_13) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_SS14) || \

+                                                  ((__MASK__) == RTC_ALARMSUBSECONDMASK_NONE))

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup RTC_Private_Functions RTC Private Functions

+  * @{

+  */

+HAL_StatusTypeDef  RTC_EnterInitMode(RTC_HandleTypeDef* hrtc);

+uint8_t            RTC_ByteToBcd2(uint8_t Value);

+uint8_t            RTC_Bcd2ToByte(uint8_t Value);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_RTC_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rtc_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rtc_ex.h
new file mode 100644
index 0000000..2d353e6
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_rtc_ex.h
@@ -0,0 +1,1022 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_rtc_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of RTC HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_RTC_EX_H

+#define __STM32F7xx_HAL_RTC_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup RTCEx

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup RTCEx_Exported_Types RTCEx Exported Types

+  * @{

+  */

+

+/** 

+  * @brief  RTC Tamper structure definition  

+  */

+typedef struct 

+{

+  uint32_t Tamper;                      /*!< Specifies the Tamper Pin.

+                                             This parameter can be a value of @ref  RTCEx_Tamper_Pins_Definitions */

+  

+  uint32_t Interrupt;                   /*!< Specifies the Tamper Interrupt.

+                                             This parameter can be a value of @ref  RTCEx_Tamper_Interrupt_Definitions */                                  

+                                             

+  uint32_t Trigger;                     /*!< Specifies the Tamper Trigger.

+                                             This parameter can be a value of @ref  RTCEx_Tamper_Trigger_Definitions */

+                                             

+  uint32_t NoErase;                     /*!< Specifies the Tamper no erase mode.

+                                             This parameter can be a value of @ref  RTCEx_Tamper_EraseBackUp_Definitions */

+

+  uint32_t MaskFlag;                     /*!< Specifies the Tamper Flag masking.

+                                             This parameter can be a value of @ref RTCEx_Tamper_MaskFlag_Definitions   */

+

+  uint32_t Filter;                      /*!< Specifies the RTC Filter Tamper.

+                                             This parameter can be a value of @ref RTCEx_Tamper_Filter_Definitions */

+  

+  uint32_t SamplingFrequency;           /*!< Specifies the sampling frequency.

+                                             This parameter can be a value of @ref RTCEx_Tamper_Sampling_Frequencies_Definitions */

+                                      

+  uint32_t PrechargeDuration;           /*!< Specifies the Precharge Duration .

+                                             This parameter can be a value of @ref RTCEx_Tamper_Pin_Precharge_Duration_Definitions */ 

+ 

+  uint32_t TamperPullUp;                /*!< Specifies the Tamper PullUp .

+                                             This parameter can be a value of @ref RTCEx_Tamper_Pull_UP_Definitions */           

+ 

+  uint32_t TimeStampOnTamperDetection;  /*!< Specifies the TimeStampOnTamperDetection.

+                                             This parameter can be a value of @ref RTCEx_Tamper_TimeStampOnTamperDetection_Definitions */                      

+}RTC_TamperTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup RTCEx_Exported_Constants RTCEx Exported Constants

+  * @{

+  */

+

+/** @defgroup RTCEx_Output_selection_Definitions RTCEx Output selection Definitions 

+  * @{

+  */ 

+#define RTC_OUTPUT_DISABLE             ((uint32_t)0x00000000)

+#define RTC_OUTPUT_ALARMA              ((uint32_t)0x00200000)

+#define RTC_OUTPUT_ALARMB              ((uint32_t)0x00400000)

+#define RTC_OUTPUT_WAKEUP              ((uint32_t)0x00600000)

+/**

+  * @}

+  */ 

+  

+/** @defgroup RTCEx_Backup_Registers_Definitions RTC Backup Registers Definitions

+  * @{

+  */

+#define RTC_BKP_DR0                       ((uint32_t)0x00000000)

+#define RTC_BKP_DR1                       ((uint32_t)0x00000001)

+#define RTC_BKP_DR2                       ((uint32_t)0x00000002)

+#define RTC_BKP_DR3                       ((uint32_t)0x00000003)

+#define RTC_BKP_DR4                       ((uint32_t)0x00000004)

+#define RTC_BKP_DR5                       ((uint32_t)0x00000005)

+#define RTC_BKP_DR6                       ((uint32_t)0x00000006)

+#define RTC_BKP_DR7                       ((uint32_t)0x00000007)

+#define RTC_BKP_DR8                       ((uint32_t)0x00000008)

+#define RTC_BKP_DR9                       ((uint32_t)0x00000009)

+#define RTC_BKP_DR10                      ((uint32_t)0x0000000A)

+#define RTC_BKP_DR11                      ((uint32_t)0x0000000B)

+#define RTC_BKP_DR12                      ((uint32_t)0x0000000C)

+#define RTC_BKP_DR13                      ((uint32_t)0x0000000D)

+#define RTC_BKP_DR14                      ((uint32_t)0x0000000E)

+#define RTC_BKP_DR15                      ((uint32_t)0x0000000F)

+#define RTC_BKP_DR16                      ((uint32_t)0x00000010)

+#define RTC_BKP_DR17                      ((uint32_t)0x00000011)

+#define RTC_BKP_DR18                      ((uint32_t)0x00000012)

+#define RTC_BKP_DR19                      ((uint32_t)0x00000013)

+#define RTC_BKP_DR20                      ((uint32_t)0x00000014)

+#define RTC_BKP_DR21                      ((uint32_t)0x00000015)

+#define RTC_BKP_DR22                      ((uint32_t)0x00000016)

+#define RTC_BKP_DR23                      ((uint32_t)0x00000017)

+#define RTC_BKP_DR24                      ((uint32_t)0x00000018)

+#define RTC_BKP_DR25                      ((uint32_t)0x00000019)

+#define RTC_BKP_DR26                      ((uint32_t)0x0000001A)

+#define RTC_BKP_DR27                      ((uint32_t)0x0000001B)

+#define RTC_BKP_DR28                      ((uint32_t)0x0000001C)

+#define RTC_BKP_DR29                      ((uint32_t)0x0000001D)

+#define RTC_BKP_DR30                      ((uint32_t)0x0000001E)

+#define RTC_BKP_DR31                      ((uint32_t)0x0000001F)

+/**

+  * @}

+  */ 

+

+/** @defgroup RTCEx_Time_Stamp_Edges_definitions RTCEx Time Stamp Edges definitions 

+  * @{

+  */ 

+#define RTC_TIMESTAMPEDGE_RISING          ((uint32_t)0x00000000)

+#define RTC_TIMESTAMPEDGE_FALLING         ((uint32_t)0x00000008)

+/**

+  * @}

+  */

+  

+/** @defgroup RTCEx_Tamper_Pins_Definitions RTCEx Tamper Pins Definitions 

+  * @{

+  */ 

+#define RTC_TAMPER_1                    RTC_TAMPCR_TAMP1E

+#define RTC_TAMPER_2                    RTC_TAMPCR_TAMP2E

+#define RTC_TAMPER_3                    RTC_TAMPCR_TAMP3E

+/**

+  * @}

+  */

+

+/** @defgroup RTCEx_Tamper_Interrupt_Definitions RTCEx Tamper Interrupt Definitions

+  * @{

+  */

+#define RTC_TAMPER1_INTERRUPT                RTC_TAMPCR_TAMP1IE

+#define RTC_TAMPER2_INTERRUPT                RTC_TAMPCR_TAMP2IE

+#define RTC_TAMPER3_INTERRUPT                RTC_TAMPCR_TAMP3IE

+#define RTC_ALL_TAMPER_INTERRUPT             RTC_TAMPCR_TAMPIE

+/**

+  * @}

+  */

+

+/** @defgroup RTCEx_TimeStamp_Pin_Selection RTCEx TimeStamp Pin Selection

+  * @{

+  */ 

+#define RTC_TIMESTAMPPIN_DEFAULT              ((uint32_t)0x00000000)

+#define RTC_TIMESTAMPPIN_PI8               ((uint32_t)0x00000002)

+#define RTC_TIMESTAMPPIN_PC1               ((uint32_t)0x00000004)

+/**

+  * @}

+  */ 

+

+/** @defgroup RTCEx_Tamper_Trigger_Definitions RTCEx Tamper Trigger Definitions 

+  * @{

+  */ 

+#define RTC_TAMPERTRIGGER_RISINGEDGE       ((uint32_t)0x00000000)

+#define RTC_TAMPERTRIGGER_FALLINGEDGE      ((uint32_t)0x00000002)

+#define RTC_TAMPERTRIGGER_LOWLEVEL         RTC_TAMPERTRIGGER_RISINGEDGE

+#define RTC_TAMPERTRIGGER_HIGHLEVEL        RTC_TAMPERTRIGGER_FALLINGEDGE 

+/**

+  * @}

+  */  

+

+  /** @defgroup RTCEx_Tamper_EraseBackUp_Definitions RTCEx Tamper EraseBackUp Definitions

+* @{

+*/

+#define RTC_TAMPER_ERASE_BACKUP_ENABLE               ((uint32_t)0x00000000)

+#define RTC_TAMPER_ERASE_BACKUP_DISABLE              ((uint32_t)0x00020000)

+/**

+  * @}

+  */

+

+/** @defgroup RTCEx_Tamper_MaskFlag_Definitions RTCEx Tamper MaskFlag Definitions

+  * @{

+  */

+#define RTC_TAMPERMASK_FLAG_DISABLE                ((uint32_t)0x00000000)

+#define RTC_TAMPERMASK_FLAG_ENABLE                 ((uint32_t)0x00040000)

+/**

+  * @}

+  */

+  

+/** @defgroup RTCEx_Tamper_Filter_Definitions RTCEx Tamper Filter Definitions 

+  * @{

+  */ 

+#define RTC_TAMPERFILTER_DISABLE   ((uint32_t)0x00000000)  /*!< Tamper filter is disabled */

+

+#define RTC_TAMPERFILTER_2SAMPLE   ((uint32_t)0x00000800)  /*!< Tamper is activated after 2 

+                                                                consecutive samples at the active level */

+#define RTC_TAMPERFILTER_4SAMPLE   ((uint32_t)0x00001000)  /*!< Tamper is activated after 4 

+                                                                consecutive samples at the active level */

+#define RTC_TAMPERFILTER_8SAMPLE   ((uint32_t)0x00001800)  /*!< Tamper is activated after 8 

+                                                                consecutive samples at the active leve. */

+/**

+  * @}

+  */

+

+/** @defgroup RTCEx_Tamper_Sampling_Frequencies_Definitions RTCEx Tamper Sampling Frequencies Definitions 

+  * @{

+  */

+#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768  ((uint32_t)0x00000000)  /*!< Each of the tamper inputs are sampled

+                                                                             with a frequency =  RTCCLK / 32768 */

+#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV16384  ((uint32_t)0x00000100)  /*!< Each of the tamper inputs are sampled

+                                                                             with a frequency =  RTCCLK / 16384 */

+#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV8192   ((uint32_t)0x00000200)  /*!< Each of the tamper inputs are sampled

+                                                                             with a frequency =  RTCCLK / 8192  */

+#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV4096   ((uint32_t)0x00000300)  /*!< Each of the tamper inputs are sampled

+                                                                             with a frequency =  RTCCLK / 4096  */

+#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV2048   ((uint32_t)0x00000400)  /*!< Each of the tamper inputs are sampled

+                                                                             with a frequency =  RTCCLK / 2048  */

+#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV1024   ((uint32_t)0x00000500)  /*!< Each of the tamper inputs are sampled

+                                                                             with a frequency =  RTCCLK / 1024  */

+#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV512    ((uint32_t)0x00000600)  /*!< Each of the tamper inputs are sampled

+                                                                             with a frequency =  RTCCLK / 512   */

+#define RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV256    ((uint32_t)0x00000700)  /*!< Each of the tamper inputs are sampled

+                                                                             with a frequency =  RTCCLK / 256   */

+/**

+  * @}

+  */

+

+/** @defgroup RTCEx_Tamper_Pin_Precharge_Duration_Definitions RTCEx Tamper Pin Precharge Duration Definitions 

+  * @{

+  */ 

+#define RTC_TAMPERPRECHARGEDURATION_1RTCCLK ((uint32_t)0x00000000)  /*!< Tamper pins are pre-charged before 

+                                                                         sampling during 1 RTCCLK cycle */

+#define RTC_TAMPERPRECHARGEDURATION_2RTCCLK ((uint32_t)0x00002000)  /*!< Tamper pins are pre-charged before 

+                                                                         sampling during 2 RTCCLK cycles */

+#define RTC_TAMPERPRECHARGEDURATION_4RTCCLK ((uint32_t)0x00004000)  /*!< Tamper pins are pre-charged before 

+                                                                         sampling during 4 RTCCLK cycles */

+#define RTC_TAMPERPRECHARGEDURATION_8RTCCLK ((uint32_t)0x00006000)  /*!< Tamper pins are pre-charged before 

+                                                                         sampling during 8 RTCCLK cycles */

+/**

+  * @}

+  */

+  

+/** @defgroup RTCEx_Tamper_TimeStampOnTamperDetection_Definitions RTCEx Tamper TimeStampOnTamperDetection Definitions

+  * @{

+  */ 

+#define RTC_TIMESTAMPONTAMPERDETECTION_ENABLE  ((uint32_t)RTC_TAMPCR_TAMPTS)  /*!< TimeStamp on Tamper Detection event saved        */

+#define RTC_TIMESTAMPONTAMPERDETECTION_DISABLE ((uint32_t)0x00000000)        /*!< TimeStamp on Tamper Detection event is not saved */                                                                      

+/**

+  * @}

+  */

+  

+/** @defgroup  RTCEx_Tamper_Pull_UP_Definitions RTCEx Tamper Pull UP Definitions

+  * @{

+  */ 

+#define RTC_TAMPER_PULLUP_ENABLE  ((uint32_t)0x00000000)            /*!< TimeStamp on Tamper Detection event saved        */

+#define RTC_TAMPER_PULLUP_DISABLE ((uint32_t)RTC_TAMPCR_TAMPPUDIS)   /*!< TimeStamp on Tamper Detection event is not saved */                                                                  

+/**

+  * @}

+  */

+

+/** @defgroup RTCEx_Wakeup_Timer_Definitions RTCEx Wakeup Timer Definitions 

+  * @{

+  */ 

+#define RTC_WAKEUPCLOCK_RTCCLK_DIV16        ((uint32_t)0x00000000)

+#define RTC_WAKEUPCLOCK_RTCCLK_DIV8         ((uint32_t)0x00000001)

+#define RTC_WAKEUPCLOCK_RTCCLK_DIV4         ((uint32_t)0x00000002)

+#define RTC_WAKEUPCLOCK_RTCCLK_DIV2         ((uint32_t)0x00000003)

+#define RTC_WAKEUPCLOCK_CK_SPRE_16BITS      ((uint32_t)0x00000004)

+#define RTC_WAKEUPCLOCK_CK_SPRE_17BITS      ((uint32_t)0x00000006)

+/**

+  * @}

+  */ 

+

+/** @defgroup RTCEx_Smooth_calib_period_Definitions RTCEx Smooth calib period Definitions 

+  * @{

+  */ 

+#define RTC_SMOOTHCALIB_PERIOD_32SEC   ((uint32_t)0x00000000)  /*!< If RTCCLK = 32768 Hz, Smooth calibration

+                                                                    period is 32s,  else 2exp20 RTCCLK seconds */

+#define RTC_SMOOTHCALIB_PERIOD_16SEC   ((uint32_t)0x00002000)  /*!< If RTCCLK = 32768 Hz, Smooth calibration 

+                                                                    period is 16s, else 2exp19 RTCCLK seconds */

+#define RTC_SMOOTHCALIB_PERIOD_8SEC    ((uint32_t)0x00004000)  /*!< If RTCCLK = 32768 Hz, Smooth calibration 

+                                                                    period is 8s, else 2exp18 RTCCLK seconds */                                        

+/**

+  * @}

+  */ 

+

+/** @defgroup RTCEx_Smooth_calib_Plus_pulses_Definitions RTCEx Smooth calib Plus pulses Definitions 

+  * @{

+  */ 

+#define RTC_SMOOTHCALIB_PLUSPULSES_SET    ((uint32_t)0x00008000)  /*!< The number of RTCCLK pulses added  

+                                                                       during a X -second window = Y - CALM[8:0] 

+                                                                       with Y = 512, 256, 128 when X = 32, 16, 8 */

+#define RTC_SMOOTHCALIB_PLUSPULSES_RESET  ((uint32_t)0x00000000)  /*!< The number of RTCCLK pulses subbstited

+                                                                       during a 32-second window = CALM[8:0] */

+/**

+  * @}

+  */

+

+/** @defgroup RTCEx_Add_1_Second_Parameter_Definitions RTCEx Add 1 Second Parameter Definitions

+  * @{

+  */ 

+#define RTC_SHIFTADD1S_RESET      ((uint32_t)0x00000000)

+#define RTC_SHIFTADD1S_SET        ((uint32_t)0x80000000)

+/**

+  * @}

+  */

+

+ /** @defgroup RTCEx_Calib_Output_selection_Definitions RTCEx Calib Output selection Definitions

+  * @{

+  */ 

+#define RTC_CALIBOUTPUT_512HZ            ((uint32_t)0x00000000) 

+#define RTC_CALIBOUTPUT_1HZ              ((uint32_t)0x00080000)

+/**

+  * @}

+  */ 

+  

+/**

+  * @}

+  */ 

+  

+/* Exported macros -----------------------------------------------------------*/

+/** @defgroup RTCEx_Exported_Macros RTCEx Exported Macros

+  * @{

+  */

+

+/**

+  * @brief  Enable the RTC WakeUp Timer peripheral.

+  * @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.

+  * @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 or disabled.

+  *         This parameter can be:

+  *            @arg RTC_IT_WUT: WakeUpTimer interrupt

+  * @retval None

+  */

+#define __HAL_RTC_WAKEUPTIMER_ENABLE_IT(__HANDLE__, __INTERRUPT__)    ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))

+

+/**

+  * @brief  Disable the RTC WakeUpTimer interrupt.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @param  __INTERRUPT__: specifies the RTC WakeUpTimer interrupt sources to be enabled or disabled.

+  *         This parameter can be:

+  *            @arg RTC_IT_WUT: WakeUpTimer interrupt

+  * @retval None

+  */

+#define __HAL_RTC_WAKEUPTIMER_DISABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))

+

+/**

+  * @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 sources to check.

+  *         This parameter can be:

+  *            @arg RTC_IT_WUT:  WakeUpTimer interrupt

+  * @retval None

+  */

+#define __HAL_RTC_WAKEUPTIMER_GET_IT(__HANDLE__, __INTERRUPT__)       (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 4)) != RESET) ? SET : RESET)

+

+/**

+  * @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.

+  *         This parameter can be:

+  *            @arg RTC_IT_WUT:  WakeUpTimer interrupt

+  * @retval None

+  */

+#define __HAL_RTC_WAKEUPTIMER_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)   (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != RESET) ? SET : RESET)

+

+/**

+  * @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.

+  *          This parameter can be:

+  *             @arg RTC_FLAG_WUTF

+  *             @arg RTC_FLAG_WUTWF

+  * @retval None

+  */

+#define __HAL_RTC_WAKEUPTIMER_GET_FLAG(__HANDLE__, __FLAG__)   (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET) ? SET : RESET)

+

+/**

+  * @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.

+  *         This parameter can be:

+  *            @arg RTC_FLAG_WUTF

+  * @retval None

+  */

+#define __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0000FFFF)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT)) 

+

+/**

+  * @brief  Enable the RTC Tamper1 input detection.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @retval None

+  */

+#define __HAL_RTC_TAMPER1_ENABLE(__HANDLE__)                         ((__HANDLE__)->Instance->TAMPCR |= (RTC_TAMPCR_TAMP1E))

+

+/**

+  * @brief  Disable the RTC Tamper1 input detection.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @retval None

+  */

+#define __HAL_RTC_TAMPER1_DISABLE(__HANDLE__)                        ((__HANDLE__)->Instance->TAMPCR &= ~(RTC_TAMPCR_TAMP1E))

+

+/**

+  * @brief  Enable the RTC Tamper2 input detection.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @retval None

+  */

+#define __HAL_RTC_TAMPER2_ENABLE(__HANDLE__)                         ((__HANDLE__)->Instance->TAMPCR |= (RTC_TAMPCR_TAMP2E))

+

+/**

+  * @brief  Disable the RTC Tamper2 input detection.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @retval None

+  */

+#define __HAL_RTC_TAMPER2_DISABLE(__HANDLE__)                        ((__HANDLE__)->Instance->TAMPCR &= ~(RTC_TAMPCR_TAMP2E))

+

+/**

+  * @brief  Enable the RTC Tamper3 input detection.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @retval None

+  */

+#define __HAL_RTC_TAMPER3_ENABLE(__HANDLE__)                         ((__HANDLE__)->Instance->TAMPCR |= (RTC_TAMPCR_TAMP3E))

+

+/**

+  * @brief  Disable the RTC Tamper3 input detection.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @retval None

+  */

+#define __HAL_RTC_TAMPER3_DISABLE(__HANDLE__)                        ((__HANDLE__)->Instance->TAMPCR &= ~(RTC_TAMPCR_TAMP3E))

+

+/**

+  * @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.

+  *         This parameter can be:

+  *            @arg  RTC_IT_TAMP: All tampers interrupts

+  *            @arg  RTC_IT_TAMP1: Tamper1 interrupt

+  *            @arg  RTC_IT_TAMP2: Tamper2 interrupt

+  *            @arg  RTC_IT_TAMP3: Tamper3 interrupt

+  * @retval None

+  */

+#define __HAL_RTC_TAMPER_GET_IT(__HANDLE__, __INTERRUPT__)           (((__INTERRUPT__) == RTC_IT_TAMP1) ? (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 3)) != RESET) ? SET : RESET) : \

+                                                                      ((__INTERRUPT__) == RTC_IT_TAMP2) ? (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 5)) != RESET) ? SET : RESET) : \

+                                                                      (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 7)) != RESET) ? SET : RESET))

+

+/**

+  * @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.

+  *         This parameter can be:

+  *            @arg  RTC_IT_TAMP: All tampers interrupts

+  *            @arg  RTC_IT_TAMP1: Tamper1 interrupt

+  *            @arg  RTC_IT_TAMP2: Tamper2 interrupt

+  *            @arg  RTC_IT_TAMP3: Tamper3 interrupt

+  * @retval None

+  */

+#define __HAL_RTC_TAMPER_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)    (((((__HANDLE__)->Instance->TAMPCR) & (__INTERRUPT__)) != RESET) ? SET : RESET)

+

+/**

+  * @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.

+  *          This parameter can be:

+  *             @arg RTC_FLAG_TAMP1F: Tamper1 flag

+  *             @arg RTC_FLAG_TAMP2F: Tamper2 flag

+  *             @arg RTC_FLAG_TAMP3F: Tamper3 flag

+  * @retval None

+  */

+#define __HAL_RTC_TAMPER_GET_FLAG(__HANDLE__, __FLAG__)        (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET) ? SET : RESET)

+

+/**

+  * @brief  Clear the RTC Tamper's pending flags.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @param  __FLAG__: specifies the RTC Tamper Flag sources to clear.

+  *          This parameter can be:

+  *             @arg RTC_FLAG_TAMP1F: Tamper1 flag

+  *             @arg RTC_FLAG_TAMP2F: Tamper2 flag

+  *             @arg RTC_FLAG_TAMP3F: Tamper3 flag

+  * @retval None

+  */

+#define __HAL_RTC_TAMPER_CLEAR_FLAG(__HANDLE__, __FLAG__)      ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0000FFFF)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))

+

+/**

+  * @brief  Enable the RTC TimeStamp peripheral.

+  * @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.

+  * @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 sources to be enabled or disabled.

+  *         This parameter can be:

+  *            @arg RTC_IT_TS: TimeStamp interrupt

+  * @retval None

+  */

+#define __HAL_RTC_TIMESTAMP_ENABLE_IT(__HANDLE__, __INTERRUPT__)     ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))

+

+/**

+  * @brief  Disable the RTC TimeStamp interrupt.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @param  __INTERRUPT__: specifies the RTC TimeStamp interrupt sources to be enabled or disabled. 

+  *         This parameter can be:

+  *            @arg RTC_IT_TS: TimeStamp interrupt

+  * @retval None

+  */

+#define __HAL_RTC_TIMESTAMP_DISABLE_IT(__HANDLE__, __INTERRUPT__)    ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))

+

+/**

+  * @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 sources to check.

+  *         This parameter can be:

+  *            @arg RTC_IT_TS: TimeStamp interrupt

+  * @retval None

+  */

+#define __HAL_RTC_TIMESTAMP_GET_IT(__HANDLE__, __INTERRUPT__)        (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__)>> 4)) != RESET) ? SET : RESET)

+

+/**

+  * @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.

+  *         This parameter can be:

+  *            @arg RTC_IT_TS: TimeStamp interrupt

+  * @retval None

+  */

+#define __HAL_RTC_TIMESTAMP_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)     (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != RESET) ? SET : RESET)

+

+/**

+  * @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.

+  *         This parameter can be:

+  *            @arg RTC_FLAG_TSF

+  *            @arg RTC_FLAG_TSOVF

+  * @retval None

+  */

+#define __HAL_RTC_TIMESTAMP_GET_FLAG(__HANDLE__, __FLAG__)     (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET) ? SET : RESET)

+

+/**

+  * @brief  Clear the RTC Time Stamp's pending flags.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @param  __FLAG__: specifies the RTC Alarm Flag sources to clear.

+  *          This parameter can be:

+  *             @arg RTC_FLAG_TSF

+  *             @arg RTC_FLAG_TSOVF

+  * @retval None

+  */

+#define __HAL_RTC_TIMESTAMP_CLEAR_FLAG(__HANDLE__, __FLAG__)   ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0000FFFF)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))

+

+/**

+  * @brief  Enable the RTC internal TimeStamp peripheral.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @retval None

+  */

+#define __HAL_RTC_INTERNAL_TIMESTAMP_ENABLE(__HANDLE__)                ((__HANDLE__)->Instance->CR |= (RTC_CR_ITSE))

+

+/**

+  * @brief  Disable the RTC internal TimeStamp peripheral.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @retval None

+  */

+#define __HAL_RTC_INTERNAL_TIMESTAMP_DISABLE(__HANDLE__)               ((__HANDLE__)->Instance->CR &= ~(RTC_CR_ITSE))

+

+/**

+  * @brief  Get the selected RTC Internal Time Stamp's flag status.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @param  __FLAG__: specifies the RTC Internal Time Stamp Flag is pending or not.

+  *         This parameter can be:

+  *            @arg RTC_FLAG_ITSF

+  * @retval None

+  */

+#define __HAL_RTC_INTERNAL_TIMESTAMP_GET_FLAG(__HANDLE__, __FLAG__)    (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET) ? SET : RESET)

+

+/**

+  * @brief  Clear the RTC Internal Time Stamp's pending flags.

+  * @param  __HANDLE__: specifies the RTC handle.

+  * @param  __FLAG__: specifies the RTC Internal Time Stamp Flag source to clear.

+  *          This parameter can be:

+  *             @arg RTC_FLAG_ITSF

+  * @retval None

+  */

+#define __HAL_RTC_INTERNAL_TIMESTAMP_CLEAR_FLAG(__HANDLE__, __FLAG__)  ((__HANDLE__)->Instance->ISR) = (~(((__FLAG__) | RTC_ISR_INIT)& 0x0003FFFF)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))

+

+/**

+  * @brief  Enable the RTC calibration output.

+  * @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.

+  * @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.

+  * @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.

+  * @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.

+  *          This parameter can be:

+  *             @arg RTC_FLAG_SHPF

+  * @retval None

+  */

+#define __HAL_RTC_SHIFT_GET_FLAG(__HANDLE__, __FLAG__)         (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != RESET) ? SET : RESET)

+

+/**

+  * @brief  Enable interrupt on the RTC WakeUp Timer associated Exti line.

+  * @retval None

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_IT()       (EXTI->IMR |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)

+

+/**

+  * @brief  Disable interrupt on the RTC WakeUp Timer associated Exti line.

+  * @retval None

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_IT()      (EXTI->IMR &= ~(RTC_EXTI_LINE_WAKEUPTIMER_EVENT))

+

+/**

+  * @brief  Enable event on the RTC WakeUp Timer associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_EVENT()    (EXTI->EMR |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)

+

+/**

+  * @brief  Disable event on the RTC WakeUp Timer associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_EVENT()   (EXTI->EMR &= ~(RTC_EXTI_LINE_WAKEUPTIMER_EVENT))

+

+/**

+  * @brief  Enable falling edge trigger on the RTC WakeUp Timer associated Exti line. 

+  * @retval None.

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_FALLING_EDGE()   (EXTI->FTSR |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)

+

+/**

+  * @brief  Disable falling edge trigger on the RTC WakeUp Timer associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_FALLING_EDGE()  (EXTI->FTSR &= ~(RTC_EXTI_LINE_WAKEUPTIMER_EVENT))

+

+/**

+  * @brief  Enable rising edge trigger on the RTC WakeUp Timer associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_EDGE()    (EXTI->RTSR |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)

+

+/**

+  * @brief  Disable rising edge trigger on the RTC WakeUp Timer associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_RISING_EDGE()   (EXTI->RTSR &= ~(RTC_EXTI_LINE_WAKEUPTIMER_EVENT))

+

+/**

+  * @brief  Enable rising & falling edge trigger on the RTC WakeUp Timer associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_FALLING_EDGE() __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_RISING_EDGE();__HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_FALLING_EDGE();

+

+/**

+  * @brief  Disable rising & falling edge trigger on the RTC WakeUp Timer associated Exti line.

+  * This parameter can be:

+  * @retval None.

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_RISING_FALLING_EDGE() __HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_RISING_EDGE();__HAL_RTC_WAKEUPTIMER_EXTI_DISABLE_FALLING_EDGE();

+

+/**

+  * @brief Check whether the RTC WakeUp Timer associated Exti line interrupt flag is set or not.

+  * @retval Line Status.

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_GET_FLAG()              (EXTI->PR & RTC_EXTI_LINE_WAKEUPTIMER_EVENT)

+

+/**

+  * @brief Clear the RTC WakeUp Timer associated Exti line flag.

+  * @retval None.

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG()            (EXTI->PR = RTC_EXTI_LINE_WAKEUPTIMER_EVENT)

+

+/**

+  * @brief Generate a Software interrupt on the RTC WakeUp Timer associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_WAKEUPTIMER_EXTI_GENERATE_SWIT()         (EXTI->SWIER |= RTC_EXTI_LINE_WAKEUPTIMER_EVENT)

+

+/**

+  * @brief  Enable interrupt on the RTC Tamper and Timestamp associated Exti line.

+  * @retval None

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_IT()        (EXTI->IMR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)

+

+/**

+  * @brief  Disable interrupt on the RTC Tamper and Timestamp associated Exti line.

+  * @retval None

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_IT()       (EXTI->IMR &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT))

+

+/**

+  * @brief  Enable event on the RTC Tamper and Timestamp associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_EVENT()    (EXTI->EMR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)

+

+/**

+  * @brief  Disable event on the RTC Tamper and Timestamp associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_EVENT()   (EXTI->EMR &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT))

+

+/**

+  * @brief  Enable falling edge trigger on the RTC Tamper and Timestamp associated Exti line. 

+  * @retval None.

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_FALLING_EDGE()   (EXTI->FTSR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)

+

+/**

+  * @brief  Disable falling edge trigger on the RTC Tamper and Timestamp associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_FALLING_EDGE()  (EXTI->FTSR &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT))

+

+/**

+  * @brief  Enable rising edge trigger on the RTC Tamper and Timestamp associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_EDGE()    (EXTI->RTSR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)

+

+/**

+  * @brief  Disable rising edge trigger on the RTC Tamper and Timestamp associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_RISING_EDGE()   (EXTI->RTSR &= ~(RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT))

+

+/**

+  * @brief  Enable rising & falling edge trigger on the RTC Tamper and Timestamp associated Exti line.

+  * @retval None.

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_FALLING_EDGE() __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_RISING_EDGE();__HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_FALLING_EDGE();

+

+/**

+  * @brief  Disable rising & falling edge trigger on the RTC Tamper and Timestamp associated Exti line.

+  * This parameter can be:

+  * @retval None.

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_RISING_FALLING_EDGE() __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_RISING_EDGE();__HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_FALLING_EDGE();

+

+/**

+  * @brief Check whether the RTC Tamper and Timestamp associated Exti line interrupt flag is set or not.

+  * @retval Line Status.

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GET_FLAG()         (EXTI->PR & RTC_EXTI_LINE_WAKEUPTIMER_EVENT)

+

+/**

+  * @brief Clear the RTC Tamper and Timestamp associated Exti line flag.

+  * @retval None.

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_CLEAR_FLAG()       (EXTI->PR = RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)

+

+/**

+  * @brief Generate a Software interrupt on the RTC Tamper and Timestamp associated Exti line

+  * @retval None.

+  */

+#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_GENERATE_SWIT()    (EXTI->SWIER |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)

+

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @defgroup RTCEx_Exported_Functions RTCEx Exported Functions

+  * @{

+  */

+

+/** @addtogroup RTCEx_Exported_Functions_Group1

+  * @{

+  */

+

+/* RTC TimeStamp and Tamper functions *****************************************/

+HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin);

+HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp_IT(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin);

+HAL_StatusTypeDef HAL_RTCEx_DeactivateTimeStamp(RTC_HandleTypeDef *hrtc);

+HAL_StatusTypeDef HAL_RTCEx_SetInternalTimeStamp(RTC_HandleTypeDef *hrtc);

+HAL_StatusTypeDef HAL_RTCEx_DeactivateInternalTimeStamp(RTC_HandleTypeDef *hrtc);

+HAL_StatusTypeDef HAL_RTCEx_GetTimeStamp(RTC_HandleTypeDef *hrtc, RTC_TimeTypeDef *sTimeStamp, RTC_DateTypeDef *sTimeStampDate, uint32_t Format);

+

+HAL_StatusTypeDef HAL_RTCEx_SetTamper(RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef* sTamper);

+HAL_StatusTypeDef HAL_RTCEx_SetTamper_IT(RTC_HandleTypeDef *hrtc, RTC_TamperTypeDef* sTamper);

+HAL_StatusTypeDef HAL_RTCEx_DeactivateTamper(RTC_HandleTypeDef *hrtc, uint32_t Tamper);

+void              HAL_RTCEx_TamperTimeStampIRQHandler(RTC_HandleTypeDef *hrtc);

+

+void              HAL_RTCEx_Tamper1EventCallback(RTC_HandleTypeDef *hrtc);

+void              HAL_RTCEx_Tamper2EventCallback(RTC_HandleTypeDef *hrtc);

+void              HAL_RTCEx_Tamper3EventCallback(RTC_HandleTypeDef *hrtc);

+void              HAL_RTCEx_TimeStampEventCallback(RTC_HandleTypeDef *hrtc);

+HAL_StatusTypeDef HAL_RTCEx_PollForTimeStampEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout);

+HAL_StatusTypeDef HAL_RTCEx_PollForTamper1Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout);

+HAL_StatusTypeDef HAL_RTCEx_PollForTamper2Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout);

+HAL_StatusTypeDef HAL_RTCEx_PollForTamper3Event(RTC_HandleTypeDef *hrtc, uint32_t Timeout);

+/**

+  * @}

+  */

+

+/** @addtogroup RTCEx_Exported_Functions_Group2

+  * @{

+  */

+/* RTC Wake-up functions ******************************************************/

+HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock);

+HAL_StatusTypeDef HAL_RTCEx_SetWakeUpTimer_IT(RTC_HandleTypeDef *hrtc, uint32_t WakeUpCounter, uint32_t WakeUpClock);

+uint32_t          HAL_RTCEx_DeactivateWakeUpTimer(RTC_HandleTypeDef *hrtc);

+uint32_t          HAL_RTCEx_GetWakeUpTimer(RTC_HandleTypeDef *hrtc);

+void              HAL_RTCEx_WakeUpTimerIRQHandler(RTC_HandleTypeDef *hrtc);

+void              HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc);

+HAL_StatusTypeDef HAL_RTCEx_PollForWakeUpTimerEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout);

+/**

+  * @}

+  */

+

+/** @addtogroup RTCEx_Exported_Functions_Group3

+  * @{

+  */

+/* Extension Control functions ************************************************/

+void              HAL_RTCEx_BKUPWrite(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister, uint32_t Data);

+uint32_t          HAL_RTCEx_BKUPRead(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister);

+

+HAL_StatusTypeDef HAL_RTCEx_SetSmoothCalib(RTC_HandleTypeDef *hrtc, uint32_t SmoothCalibPeriod, uint32_t SmoothCalibPlusPulses, uint32_t SmouthCalibMinusPulsesValue);

+HAL_StatusTypeDef HAL_RTCEx_SetSynchroShift(RTC_HandleTypeDef *hrtc, uint32_t ShiftAdd1S, uint32_t ShiftSubFS);

+HAL_StatusTypeDef HAL_RTCEx_SetCalibrationOutPut(RTC_HandleTypeDef *hrtc, uint32_t CalibOutput);

+HAL_StatusTypeDef HAL_RTCEx_DeactivateCalibrationOutPut(RTC_HandleTypeDef *hrtc);

+HAL_StatusTypeDef HAL_RTCEx_SetRefClock(RTC_HandleTypeDef *hrtc);

+HAL_StatusTypeDef HAL_RTCEx_DeactivateRefClock(RTC_HandleTypeDef *hrtc);

+HAL_StatusTypeDef HAL_RTCEx_EnableBypassShadow(RTC_HandleTypeDef *hrtc);

+HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow(RTC_HandleTypeDef *hrtc);

+/**

+  * @}

+  */

+

+/** @addtogroup RTCEx_Exported_Functions_Group4

+  * @{

+  */

+/* Extension RTC features functions *******************************************/

+void              HAL_RTCEx_AlarmBEventCallback(RTC_HandleTypeDef *hrtc); 

+HAL_StatusTypeDef HAL_RTCEx_PollForAlarmBEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout);

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+/* Private types -------------------------------------------------------------*/ 

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup RTCEx_Private_Constants RTCEx Private Constants

+  * @{

+  */

+#define RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT  ((uint32_t)EXTI_IMR_MR21)  /*!< External interrupt line 21 Connected to the RTC Tamper and Time Stamp events */                                               

+#define RTC_EXTI_LINE_WAKEUPTIMER_EVENT       ((uint32_t)EXTI_IMR_MR22)  /*!< External interrupt line 22 Connected to the RTC Wake-up event */  

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup RTCEx_Private_Macros RTCEx Private Macros

+  * @{

+  */

+

+/** @defgroup RTCEx_IS_RTC_Definitions Private macros to check input parameters

+  * @{

+  */

+#define IS_RTC_OUTPUT(__OUTPUT__)      (((__OUTPUT__) == RTC_OUTPUT_DISABLE) || \

+                                        ((__OUTPUT__) == RTC_OUTPUT_ALARMA)  || \

+                                        ((__OUTPUT__) == RTC_OUTPUT_ALARMB)  || \

+                                        ((__OUTPUT__) == RTC_OUTPUT_WAKEUP))

+#define IS_RTC_BKP(__BKP__)               ((__BKP__) < (uint32_t) RTC_BKP_NUMBER)

+#define IS_TIMESTAMP_EDGE(__EDGE__) (((__EDGE__) == RTC_TIMESTAMPEDGE_RISING) || \

+                                     ((__EDGE__) == RTC_TIMESTAMPEDGE_FALLING))

+#define IS_RTC_TAMPER(__TAMPER__) ((((__TAMPER__) & (uint32_t)0xFFFFFFD6) == 0x00) && ((__TAMPER__) != (uint32_t)RESET))

+#define IS_RTC_TAMPER_INTERRUPT(__INTERRUPT__) ((((__INTERRUPT__) & (uint32_t)0xFFB6FFFB) == 0x00) && ((__INTERRUPT__) != (uint32_t)RESET))

+#define IS_RTC_TIMESTAMP_PIN(__PIN__) (((__PIN__) == RTC_TIMESTAMPPIN_DEFAULT) || \

+                                       ((__PIN__) == RTC_TIMESTAMPPIN_PI8)  || \

+                                       ((__PIN__) == RTC_TIMESTAMPPIN_PC1))

+#define IS_RTC_TAMPER_TRIGGER(__TRIGGER__) (((__TRIGGER__) == RTC_TAMPERTRIGGER_RISINGEDGE) || \

+                                        ((__TRIGGER__) == RTC_TAMPERTRIGGER_FALLINGEDGE) || \

+                                        ((__TRIGGER__) == RTC_TAMPERTRIGGER_LOWLEVEL) || \

+                                        ((__TRIGGER__) == RTC_TAMPERTRIGGER_HIGHLEVEL))

+#define IS_RTC_TAMPER_ERASE_MODE(__MODE__)             (((__MODE__) == RTC_TAMPER_ERASE_BACKUP_ENABLE) || \

+                                                        ((__MODE__) == RTC_TAMPER_ERASE_BACKUP_DISABLE))

+#define IS_RTC_TAMPER_MASKFLAG_STATE(__STATE__)     (((__STATE__) == RTC_TAMPERMASK_FLAG_ENABLE) || \

+                                                     ((__STATE__) == RTC_TAMPERMASK_FLAG_DISABLE))

+#define IS_RTC_TAMPER_FILTER(__FILTER__)  (((__FILTER__) == RTC_TAMPERFILTER_DISABLE) || \

+                                       ((__FILTER__) == RTC_TAMPERFILTER_2SAMPLE) || \

+                                       ((__FILTER__) == RTC_TAMPERFILTER_4SAMPLE) || \

+                                       ((__FILTER__) == RTC_TAMPERFILTER_8SAMPLE))

+#define IS_RTC_TAMPER_SAMPLING_FREQ(__FREQ__) (((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV32768)|| \

+                                           ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV16384)|| \

+                                           ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV8192) || \

+                                           ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV4096) || \

+                                           ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV2048) || \

+                                           ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV1024) || \

+                                           ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV512)  || \

+                                           ((__FREQ__) == RTC_TAMPERSAMPLINGFREQ_RTCCLK_DIV256))

+#define IS_RTC_TAMPER_PRECHARGE_DURATION(__DURATION__) (((__DURATION__) == RTC_TAMPERPRECHARGEDURATION_1RTCCLK) || \

+                                                    ((__DURATION__) == RTC_TAMPERPRECHARGEDURATION_2RTCCLK) || \

+                                                    ((__DURATION__) == RTC_TAMPERPRECHARGEDURATION_4RTCCLK) || \

+                                                    ((__DURATION__) == RTC_TAMPERPRECHARGEDURATION_8RTCCLK))

+#define IS_RTC_TAMPER_TIMESTAMPONTAMPER_DETECTION(__DETECTION__) (((__DETECTION__) == RTC_TIMESTAMPONTAMPERDETECTION_ENABLE) || \

+                                                              ((__DETECTION__) == RTC_TIMESTAMPONTAMPERDETECTION_DISABLE))

+#define IS_RTC_TAMPER_PULLUP_STATE(__STATE__) (((__STATE__) == RTC_TAMPER_PULLUP_ENABLE) || \

+                                       ((__STATE__) == RTC_TAMPER_PULLUP_DISABLE))

+#define IS_RTC_WAKEUP_CLOCK(__CLOCK__) (((__CLOCK__) == RTC_WAKEUPCLOCK_RTCCLK_DIV16)       || \

+                                    ((__CLOCK__) == RTC_WAKEUPCLOCK_RTCCLK_DIV8)    || \

+                                    ((__CLOCK__) == RTC_WAKEUPCLOCK_RTCCLK_DIV4)    || \

+                                    ((__CLOCK__) == RTC_WAKEUPCLOCK_RTCCLK_DIV2)    || \

+                                    ((__CLOCK__) == RTC_WAKEUPCLOCK_CK_SPRE_16BITS) || \

+                                    ((__CLOCK__) == RTC_WAKEUPCLOCK_CK_SPRE_17BITS))

+

+#define IS_RTC_WAKEUP_COUNTER(__COUNTER__)  ((__COUNTER__) <= 0xFFFF)

+#define IS_RTC_SMOOTH_CALIB_PERIOD(__PERIOD__) (((__PERIOD__) == RTC_SMOOTHCALIB_PERIOD_32SEC) || \

+                                                ((__PERIOD__) == RTC_SMOOTHCALIB_PERIOD_16SEC) || \

+                                                ((__PERIOD__) == RTC_SMOOTHCALIB_PERIOD_8SEC))

+#define IS_RTC_SMOOTH_CALIB_PLUS(__PLUS__) (((__PLUS__) == RTC_SMOOTHCALIB_PLUSPULSES_SET) || \

+                                            ((__PLUS__) == RTC_SMOOTHCALIB_PLUSPULSES_RESET))

+#define  IS_RTC_SMOOTH_CALIB_MINUS(__VALUE__) ((__VALUE__) <= 0x000001FF)

+#define IS_RTC_SHIFT_ADD1S(__SEL__) (((__SEL__) == RTC_SHIFTADD1S_RESET) || \

+                                     ((__SEL__) == RTC_SHIFTADD1S_SET))

+#define IS_RTC_SHIFT_SUBFS(__FS__) ((__FS__) <= 0x00007FFF)

+#define IS_RTC_CALIB_OUTPUT(__OUTPUT__)  (((__OUTPUT__) == RTC_CALIBOUTPUT_512HZ) || \

+                                          ((__OUTPUT__) == RTC_CALIBOUTPUT_1HZ))

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_RTC_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sai.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sai.h
new file mode 100644
index 0000000..0f92d96
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sai.h
@@ -0,0 +1,904 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_sai.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of SAI HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_SAI_H

+#define __STM32F7xx_HAL_SAI_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"  

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup SAI

+  * @{

+  */ 

+  

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup SAI_Exported_Types SAI Exported Types

+  * @{

+  */

+ 

+/** 

+  * @brief  HAL State structures definition  

+  */ 

+typedef enum

+{

+  HAL_SAI_STATE_RESET      = 0x00,  /*!< SAI not yet initialized or disabled                */

+  HAL_SAI_STATE_READY      = 0x01,  /*!< SAI initialized and ready for use                  */

+  HAL_SAI_STATE_BUSY       = 0x02,  /*!< SAI internal process is ongoing                    */

+  HAL_SAI_STATE_BUSY_TX    = 0x12,  /*!< Data transmission process is ongoing               */ 

+  HAL_SAI_STATE_BUSY_RX    = 0x22,  /*!< Data reception process is ongoing                  */  

+  HAL_SAI_STATE_TIMEOUT    = 0x03,  /*!< SAI timeout state                                  */

+  HAL_SAI_STATE_ERROR      = 0x04   /*!< SAI error state                                    */                                                                        

+}HAL_SAI_StateTypeDef;

+

+/** 

+  * @brief  SAI Callback prototype 

+  */

+typedef void (*SAIcallback)(void);

+

+/** 

+  * @brief  SAI Init Structure definition  

+  */

+typedef struct

+{                                    

+  uint32_t AudioMode;           /*!< Specifies the SAI Block audio Mode. 

+                                     This parameter can be a value of @ref SAI_Block_Mode                 */

+

+  uint32_t Synchro;             /*!< Specifies SAI Block synchronization

+                                     This parameter can be a value of @ref SAI_Block_Synchronization           */

+ 

+  uint32_t SynchroExt;          /*!< Specifies SAI Block synchronization, this setup is common 

+                                     for BLOCKA and BLOCKB

+                                     This parameter can be a value of @ref SAI_Block_SyncExt                   */

+

+  uint32_t OutputDrive;         /*!< Specifies when SAI Block outputs are driven.

+                                     This parameter can be a value of @ref SAI_Block_Output_Drive

+                                     @note this value has to be set before enabling the audio block  

+                                     but after the audio block configuration.                                  */

+

+  uint32_t NoDivider;           /*!< Specifies whether master clock will be divided or not.

+                                     This parameter can be a value of @ref SAI_Block_NoDivider

+                                     @note: If bit NODIV in the SAI_xCR1 register is cleared, the frame length 

+                                            should be aligned to a number equal to a power of 2, from 8 to 256.

+                                            If bit NODIV in the SAI_xCR1 register is set, the frame length can 

+                                            take any of the values without constraint since the input clock of 

+                                            the audio block should be equal to the bit clock.

+                                             There is no MCLK_x clock which can be output.                     */

+  

+  uint32_t FIFOThreshold;       /*!< Specifies SAI Block FIFO threshold.

+                                     This parameter can be a value of @ref SAI_Block_Fifo_Threshold            */

+

+  uint32_t AudioFrequency;      /*!< Specifies the audio frequency sampling.     

+                                     This parameter can be a value of @ref SAI_Audio_Frequency                 */

+

+  uint32_t Mckdiv;              /*!< Specifies the master clock divider, the parameter will be used if for 

+                                     AudioFrequency the user choice 

+                                     This parameter must be a number between Min_Data = 0 and Max_Data = 15    */

+

+  uint32_t MonoStereoMode;      /*!< Specifies if the mono or stereo mode is selected.     

+                                     This parameter can be a value of @ref SAI_Mono_Stereo_Mode                */  

+                                   

+  uint32_t CompandingMode;      /*!< Specifies the companding mode type.     

+                                     This parameter can be a value of @ref SAI_Block_Companding_Mode           */

+  

+  uint32_t TriState;            /*!< Specifies the companding mode type.     

+                                     This parameter can be a value of @ref SAI_TRIState_Management             */

+                                   

+  /* This part of the structure is automatically filled if your are using the high level initialisation 

+     function HAL_SAI_InitProtocol                                                                             */

+

+  uint32_t Protocol;        /*!< Specifies the SAI Block protocol.

+                                 This parameter can be a value of @ref SAI_Block_Protocol                      */

+ 

+  uint32_t DataSize;        /*!< Specifies the SAI Block data size.

+                                 This parameter can be a value of @ref SAI_Block_Data_Size                     */

+

+  uint32_t FirstBit;        /*!< Specifies whether data transfers start from MSB or LSB bit.

+                                 This parameter can be a value of @ref SAI_Block_MSB_LSB_transmission          */

+

+  uint32_t ClockStrobing;   /*!< Specifies the SAI Block clock strobing edge sensitivity.

+                                 This parameter can be a value of @ref SAI_Block_Clock_Strobing                */                             

+}SAI_InitTypeDef;

+

+/** 

+  * @brief  SAI Block Frame Init structure definition  

+  */

+ 

+typedef struct

+{

+

+  uint32_t FrameLength;         /*!< Specifies the Frame length, the number of SCK clocks for each audio frame.

+                                     This parameter must be a number between Min_Data = 8 and Max_Data = 256.

+                                     @note: If master clock MCLK_x pin is declared as an output, the frame length

+                                            should be aligned to a number equal to power of 2 in order to keep 

+                                            in an audio frame, an integer number of MCLK pulses by bit Clock. */                                               

+                                                                            

+  uint32_t ActiveFrameLength;  /*!< Specifies the Frame synchronization active level length.

+                                    This Parameter specifies the length in number of bit clock (SCK + 1)  

+                                    of the active level of FS signal in audio frame.

+                                    This parameter must be a number between Min_Data = 1 and Max_Data = 128   */

+                                         

+  uint32_t FSDefinition;       /*!< Specifies the Frame synchronization definition.

+                                    This parameter can be a value of @ref SAI_Block_FS_Definition             */

+                                         

+  uint32_t FSPolarity;         /*!< Specifies the Frame synchronization Polarity.

+                                    This parameter can be a value of @ref SAI_Block_FS_Polarity               */

+

+  uint32_t FSOffset;           /*!< Specifies the Frame synchronization Offset.

+                                    This parameter can be a value of @ref SAI_Block_FS_Offset                 */

+

+}SAI_FrameInitTypeDef;

+

+/**

+  * @brief   SAI Block Slot Init Structure definition

+  */    

+

+typedef struct

+{

+  uint32_t FirstBitOffset;  /*!< Specifies the position of first data transfer bit in the slot.

+                                 This parameter must be a number between Min_Data = 0 and Max_Data = 24 */

+

+  uint32_t SlotSize;        /*!< Specifies the Slot Size.

+                                 This parameter can be a value of @ref SAI_Block_Slot_Size              */

+

+  uint32_t SlotNumber;      /*!< Specifies the number of slot in the audio frame.

+                                 This parameter must be a number between Min_Data = 1 and Max_Data = 16 */

+

+  uint32_t SlotActive;      /*!< Specifies the slots in audio frame that will be activated.

+                                 This parameter can be a value of @ref SAI_Block_Slot_Active            */

+}SAI_SlotInitTypeDef;

+

+/** 

+  * @brief  SAI handle Structure definition  

+  */

+typedef struct __SAI_HandleTypeDef

+{

+  SAI_Block_TypeDef         *Instance;  /*!< SAI Blockx registers base address        */

+

+  SAI_InitTypeDef           Init;       /*!< SAI communication parameters             */

+

+  SAI_FrameInitTypeDef      FrameInit;  /*!< SAI Frame configuration parameters       */

+

+  SAI_SlotInitTypeDef       SlotInit;   /*!< SAI Slot configuration parameters        */

+

+  uint8_t                  *pBuffPtr;  /*!< Pointer to SAI transfer Buffer            */

+

+  uint16_t                  XferSize;  /*!< SAI transfer size                         */

+

+  uint16_t                  XferCount; /*!< SAI transfer counter                      */

+

+  DMA_HandleTypeDef         *hdmatx;     /*!< SAI Tx DMA handle parameters            */

+

+  DMA_HandleTypeDef         *hdmarx;     /*!< SAI Rx DMA handle parameters            */

+

+  SAIcallback               mutecallback;/*!< SAI mute callback                */

+  

+  void (*InterruptServiceRoutine)(struct __SAI_HandleTypeDef *hsai); /* function pointer for IRQ handler   */

+  

+  HAL_LockTypeDef           Lock;        /*!< SAI locking object                      */

+

+  __IO HAL_SAI_StateTypeDef State;       /*!< SAI communication state                 */

+

+  __IO uint32_t             ErrorCode;   /*!< SAI Error code                          */

+}SAI_HandleTypeDef;

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup SAI_Exported_Constants SAI Exported Constants

+  * @{

+  */

+

+/** @defgroup SAI_Error_Code SAI Error Code 

+  * @{

+  */

+#define HAL_SAI_ERROR_NONE    ((uint32_t)0x00000000)  /*!< No error                                    */

+#define HAL_SAI_ERROR_OVR     ((uint32_t)0x00000001)  /*!< Overrun Error                               */

+#define HAL_SAI_ERROR_UDR     ((uint32_t)0x00000002)  /*!< Underrun error                              */

+#define HAL_SAI_ERROR_AFSDET  ((uint32_t)0x00000004)  /*!< Anticipated Frame synchronisation detection */

+#define HAL_SAI_ERROR_LFSDET  ((uint32_t)0x00000008)  /*!< Late Frame synchronisation detection        */

+#define HAL_SAI_ERROR_CNREADY ((uint32_t)0x00000010)  /*!< codec not ready                             */

+#define HAL_SAI_ERROR_WCKCFG  ((uint32_t)0x00000020)  /*!< Wrong clock configuration                   */ 

+#define HAL_SAI_ERROR_TIMEOUT ((uint32_t)0x00000040)  /*!< Timeout error                               */    

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Block_SyncExt SAI External synchronisation

+  * @{

+  */

+#define SAI_SYNCEXT_DISABLE           ((uint32_t)0x00000000)

+#define SAI_SYNCEXT_IN_ENABLE         ((uint32_t)0x00000001)

+#define SAI_SYNCEXT_OUTBLOCKA_ENABLE  ((uint32_t)0x00000002)

+#define SAI_SYNCEXT_OUTBLOCKB_ENABLE  ((uint32_t)0x00000004)

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Protocol SAI Supported protocol

+  * @{

+  */

+#define SAI_I2S_STANDARD      ((uint32_t)0x00000000)

+#define SAI_I2S_MSBJUSTIFIED  ((uint32_t)0x00000001)

+#define SAI_I2S_LSBJUSTIFIED  ((uint32_t)0x00000002)

+#define SAI_PCM_LONG          ((uint32_t)0x00000004)

+#define SAI_PCM_SHORT         ((uint32_t)0x00000008)

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Protocol_DataSize SAI protocol data size

+  * @{

+  */

+#define SAI_PROTOCOL_DATASIZE_16BIT          ((uint32_t)0x00000000)

+#define SAI_PROTOCOL_DATASIZE_16BITEXTENDED  ((uint32_t)0x00000001)

+#define SAI_PROTOCOL_DATASIZE_24BIT          ((uint32_t)0x00000002)

+#define SAI_PROTOCOL_DATASIZE_32BIT          ((uint32_t)0x00000004)

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Clock_Source  SAI Clock Source

+  * @{

+  */

+#define SAI_CLKSOURCE_PLLSAI             ((uint32_t)0x00000000)

+#define SAI_CLKSOURCE_PLLI2S             ((uint32_t)0x00100000)

+#define SAI_CLKSOURCE_EXT                ((uint32_t)0x00200000)

+#define SAI_CLKSOURCE_NA                 ((uint32_t)0x00400000)

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Audio_Frequency SAI Audio Frequency

+  * @{

+  */

+#define SAI_AUDIO_FREQUENCY_192K          ((uint32_t)192000)

+#define SAI_AUDIO_FREQUENCY_96K           ((uint32_t)96000)

+#define SAI_AUDIO_FREQUENCY_48K           ((uint32_t)48000)

+#define SAI_AUDIO_FREQUENCY_44K           ((uint32_t)44100)

+#define SAI_AUDIO_FREQUENCY_32K           ((uint32_t)32000)

+#define SAI_AUDIO_FREQUENCY_22K           ((uint32_t)22050)

+#define SAI_AUDIO_FREQUENCY_16K           ((uint32_t)16000)

+#define SAI_AUDIO_FREQUENCY_11K           ((uint32_t)11025)

+#define SAI_AUDIO_FREQUENCY_8K            ((uint32_t)8000)

+#define SAI_AUDIO_FREQUENCY_MCKDIV        ((uint32_t)0)    

+

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Block_Mode SAI Block Mode

+  * @{

+  */

+#define SAI_MODEMASTER_TX         ((uint32_t)0x00000000)

+#define SAI_MODEMASTER_RX         ((uint32_t)SAI_xCR1_MODE_0)

+#define SAI_MODESLAVE_TX          ((uint32_t)SAI_xCR1_MODE_1)

+#define SAI_MODESLAVE_RX          ((uint32_t)(SAI_xCR1_MODE_1 | SAI_xCR1_MODE_0))

+

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Block_Protocol SAI Block Protocol

+  * @{

+  */

+#define SAI_FREE_PROTOCOL                 ((uint32_t)0x00000000)

+#define SAI_SPDIF_PROTOCOL                ((uint32_t)SAI_xCR1_PRTCFG_0)

+#define SAI_AC97_PROTOCOL                 ((uint32_t)SAI_xCR1_PRTCFG_1)

+

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Block_Data_Size SAI Block Data Size

+  * @{

+  */

+#define SAI_DATASIZE_8                   ((uint32_t)SAI_xCR1_DS_1)

+#define SAI_DATASIZE_10                  ((uint32_t)(SAI_xCR1_DS_1 | SAI_xCR1_DS_0))

+#define SAI_DATASIZE_16                  ((uint32_t)SAI_xCR1_DS_2)

+#define SAI_DATASIZE_20                  ((uint32_t)(SAI_xCR1_DS_2 | SAI_xCR1_DS_0))

+#define SAI_DATASIZE_24                  ((uint32_t)(SAI_xCR1_DS_2 | SAI_xCR1_DS_1))

+#define SAI_DATASIZE_32                  ((uint32_t)(SAI_xCR1_DS_2 | SAI_xCR1_DS_1 | SAI_xCR1_DS_0))

+

+/**

+  * @}

+  */ 

+

+/** @defgroup SAI_Block_MSB_LSB_transmission SAI Block MSB LSB transmission 

+  * @{

+  */

+#define SAI_FIRSTBIT_MSB                  ((uint32_t)0x00000000)

+#define SAI_FIRSTBIT_LSB                  ((uint32_t)SAI_xCR1_LSBFIRST)

+

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Block_Clock_Strobing SAI Block Clock Strobing

+  * @{

+  */

+#define SAI_CLOCKSTROBING_FALLINGEDGE     ((uint32_t)0x00000000)

+#define SAI_CLOCKSTROBING_RISINGEDGE      ((uint32_t)SAI_xCR1_CKSTR)

+

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Block_Synchronization SAI Block Synchronization

+  * @{

+  */

+#define SAI_ASYNCHRONOUS                  ((uint32_t)0x00000000)

+#define SAI_SYNCHRONOUS                   ((uint32_t)SAI_xCR1_SYNCEN_0)

+#define SAI_SYNCHRONOUS_EXT               ((uint32_t)SAI_xCR1_SYNCEN_1) 

+

+/**

+  * @}

+  */ 

+

+/** @defgroup SAI_Block_Output_Drive SAI Block Output Drive 

+  * @{

+  */

+#define SAI_OUTPUTDRIVE_DISABLE          ((uint32_t)0x00000000)

+#define SAI_OUTPUTDRIVE_ENABLE           ((uint32_t)SAI_xCR1_OUTDRIV)

+

+/**

+  * @}

+  */ 

+

+/** @defgroup SAI_Block_NoDivider SAI Block NoDivider

+  * @{

+  */

+#define SAI_MASTERDIVIDER_ENABLE         ((uint32_t)0x00000000)

+#define SAI_MASTERDIVIDER_DISABLE        ((uint32_t)SAI_xCR1_NODIV)

+

+/**

+  * @}

+  */

+  

+

+/** @defgroup SAI_Block_FS_Definition SAI Block FS Definition

+  * @{

+  */

+#define SAI_FS_STARTFRAME                 ((uint32_t)0x00000000)

+#define SAI_FS_CHANNEL_IDENTIFICATION     ((uint32_t)SAI_xFRCR_FSDEF)

+

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Block_FS_Polarity SAI Block FS Polarity 

+  * @{

+  */

+#define SAI_FS_ACTIVE_LOW                  ((uint32_t)0x00000000)

+#define SAI_FS_ACTIVE_HIGH                 ((uint32_t)SAI_xFRCR_FSPO)

+

+/**

+  * @}

+  */

+            

+/** @defgroup SAI_Block_FS_Offset SAI Block FS Offset 

+  * @{

+  */

+#define SAI_FS_FIRSTBIT                   ((uint32_t)0x00000000)

+#define SAI_FS_BEFOREFIRSTBIT             ((uint32_t)SAI_xFRCR_FSOFF)

+

+/**

+  * @}

+  */

+  

+

+  /** @defgroup SAI_Block_Slot_Size SAI Block Slot Size

+  * @{

+  */

+#define SAI_SLOTSIZE_DATASIZE             ((uint32_t)0x00000000)  

+#define SAI_SLOTSIZE_16B                  ((uint32_t)SAI_xSLOTR_SLOTSZ_0)

+#define SAI_SLOTSIZE_32B                  ((uint32_t)SAI_xSLOTR_SLOTSZ_1)

+/**

+  * @}

+  */

+  

+/** @defgroup SAI_Block_Slot_Active SAI Block Slot Active

+  * @{

+  */

+#define SAI_SLOT_NOTACTIVE           ((uint32_t)0x00000000)

+#define SAI_SLOTACTIVE_0             ((uint32_t)0x00010000)

+#define SAI_SLOTACTIVE_1             ((uint32_t)0x00020000)

+#define SAI_SLOTACTIVE_2             ((uint32_t)0x00040000)

+#define SAI_SLOTACTIVE_3             ((uint32_t)0x00080000)

+#define SAI_SLOTACTIVE_4             ((uint32_t)0x00100000)

+#define SAI_SLOTACTIVE_5             ((uint32_t)0x00200000)

+#define SAI_SLOTACTIVE_6             ((uint32_t)0x00400000)

+#define SAI_SLOTACTIVE_7             ((uint32_t)0x00800000)

+#define SAI_SLOTACTIVE_8             ((uint32_t)0x01000000)

+#define SAI_SLOTACTIVE_9             ((uint32_t)0x02000000)

+#define SAI_SLOTACTIVE_10            ((uint32_t)0x04000000)

+#define SAI_SLOTACTIVE_11            ((uint32_t)0x08000000)

+#define SAI_SLOTACTIVE_12            ((uint32_t)0x10000000)

+#define SAI_SLOTACTIVE_13            ((uint32_t)0x20000000)

+#define SAI_SLOTACTIVE_14            ((uint32_t)0x40000000)

+#define SAI_SLOTACTIVE_15            ((uint32_t)0x80000000)

+#define SAI_SLOTACTIVE_ALL           ((uint32_t)0xFFFF0000)

+

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Mono_Stereo_Mode SAI Mono Stereo Mode

+  * @{

+  */

+#define SAI_STEREOMODE                    ((uint32_t)0x00000000)

+#define SAI_MONOMODE                      ((uint32_t)SAI_xCR1_MONO)

+

+/**

+  * @}

+  */

+

+/** @defgroup SAI_TRIState_Management SAI TRIState Management

+  * @{

+  */

+#define SAI_OUTPUT_NOTRELEASED              ((uint32_t)0x00000000)

+#define SAI_OUTPUT_RELEASED                 ((uint32_t)SAI_xCR2_TRIS)

+

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Block_Fifo_Threshold SAI Block Fifo Threshold 

+  * @{

+  */

+#define SAI_FIFOTHRESHOLD_EMPTY  ((uint32_t)0x00000000)

+#define SAI_FIFOTHRESHOLD_1QF    ((uint32_t)SAI_xCR2_FTH_0)

+#define SAI_FIFOTHRESHOLD_HF     ((uint32_t)SAI_xCR2_FTH_1) 

+#define SAI_FIFOTHRESHOLD_3QF    ((uint32_t)(SAI_xCR2_FTH_1 | SAI_xCR2_FTH_0))

+#define SAI_FIFOTHRESHOLD_FULL   ((uint32_t)SAI_xCR2_FTH_2)

+

+/**

+  * @}

+  */

+  

+/** @defgroup SAI_Block_Companding_Mode SAI Block Companding Mode

+  * @{

+  */

+#define SAI_NOCOMPANDING                  ((uint32_t)0x00000000)

+#define SAI_ULAW_1CPL_COMPANDING          ((uint32_t)SAI_xCR2_COMP_1)

+#define SAI_ALAW_1CPL_COMPANDING          ((uint32_t)(SAI_xCR2_COMP_1 | SAI_xCR2_COMP_0))

+#define SAI_ULAW_2CPL_COMPANDING          ((uint32_t)(SAI_xCR2_COMP_1 | SAI_xCR2_CPL))

+#define SAI_ALAW_2CPL_COMPANDING          ((uint32_t)(SAI_xCR2_COMP_1 | SAI_xCR2_COMP_0 | SAI_xCR2_CPL))

+

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Block_Mute_Value SAI Block Mute Value

+  * @{

+  */

+#define SAI_ZERO_VALUE                     ((uint32_t)0x00000000)

+#define SAI_LAST_SENT_VALUE                 ((uint32_t)SAI_xCR2_MUTEVAL)

+

+/**

+  * @}

+  */

+

+

+/** @defgroup SAI_Block_Interrupts_Definition SAI Block Interrupts Definition

+  * @{

+  */

+#define SAI_IT_OVRUDR                     ((uint32_t)SAI_xIMR_OVRUDRIE)

+#define SAI_IT_MUTEDET                    ((uint32_t)SAI_xIMR_MUTEDETIE)

+#define SAI_IT_WCKCFG                     ((uint32_t)SAI_xIMR_WCKCFGIE)

+#define SAI_IT_FREQ                       ((uint32_t)SAI_xIMR_FREQIE)

+#define SAI_IT_CNRDY                      ((uint32_t)SAI_xIMR_CNRDYIE)

+#define SAI_IT_AFSDET                     ((uint32_t)SAI_xIMR_AFSDETIE)

+#define SAI_IT_LFSDET                     ((uint32_t)SAI_xIMR_LFSDETIE)

+

+/**

+  * @}

+  */

+

+/** @defgroup SAI_Block_Flags_Definition  SAI Block Flags Definition

+  * @{

+  */

+#define SAI_FLAG_OVRUDR                   ((uint32_t)SAI_xSR_OVRUDR)

+#define SAI_FLAG_MUTEDET                  ((uint32_t)SAI_xSR_MUTEDET)

+#define SAI_FLAG_WCKCFG                   ((uint32_t)SAI_xSR_WCKCFG)

+#define SAI_FLAG_FREQ                     ((uint32_t)SAI_xSR_FREQ)

+#define SAI_FLAG_CNRDY                    ((uint32_t)SAI_xSR_CNRDY)

+#define SAI_FLAG_AFSDET                   ((uint32_t)SAI_xSR_AFSDET)

+#define SAI_FLAG_LFSDET                   ((uint32_t)SAI_xSR_LFSDET)

+

+/**

+  * @}

+  */

+  

+/** @defgroup SAI_Block_Fifo_Status_Level   SAI Block Fifo Status Level

+  * @{

+  */

+#define SAI_FIFOSTATUS_EMPTY              ((uint32_t)0x00000000)

+#define SAI_FIFOSTATUS_LESS1QUARTERFULL   ((uint32_t)0x00010000)

+#define SAI_FIFOSTATUS_1QUARTERFULL       ((uint32_t)0x00020000)

+#define SAI_FIFOSTATUS_HALFFULL           ((uint32_t)0x00030000) 

+#define SAI_FIFOSTATUS_3QUARTERFULL       ((uint32_t)0x00040000)

+#define SAI_FIFOSTATUS_FULL               ((uint32_t)0x00050000)

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+  

+/* Exported macro ------------------------------------------------------------*/

+

+/** @defgroup SAI_Exported_Macros SAI Exported Macros

+ *  @brief macros to handle interrupts and specific configurations

+ * @{

+ */

+ 

+/** @brief Reset SAI handle state

+  * @param  __HANDLE__: specifies the SAI Handle.

+  * @retval None

+  */

+#define __HAL_SAI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SAI_STATE_RESET)

+

+/** @brief  Enable or disable the specified SAI interrupts.

+  * @param  __HANDLE__: specifies the SAI Handle.

+  * @param  __INTERRUPT__: specifies the interrupt source to enable or disable.

+  *         This parameter can be one of the following values:

+  *            @arg SAI_IT_OVRUDR: Overrun underrun interrupt enable                              

+  *            @arg SAI_IT_MUTEDET: Mute detection interrupt enable                               

+  *            @arg SAI_IT_WCKCFG: Wrong Clock Configuration interrupt enable                    

+  *            @arg SAI_IT_FREQ: FIFO request interrupt enable                                  

+  *            @arg SAI_IT_CNRDY: Codec not ready interrupt enable                               

+  *            @arg SAI_IT_AFSDET: Anticipated frame synchronization detection interrupt enable   

+  *            @arg SAI_IT_LFSDET: Late frame synchronization detection interrupt enabl

+  * @retval None

+  */

+  

+#define __HAL_SAI_ENABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->IMR |= (__INTERRUPT__))

+#define __HAL_SAI_DISABLE_IT(__HANDLE__, __INTERRUPT__)  ((__HANDLE__)->Instance->IMR &= (~(__INTERRUPT__)))

+ 

+/** @brief  Check if the specified SAI interrupt source is enabled or disabled.

+  * @param  __HANDLE__: specifies the SAI Handle.

+  *         This parameter can be SAI where x: 1, 2, or 3 to select the SAI peripheral.

+  * @param  __INTERRUPT__: specifies the SAI interrupt source to check.

+  *         This parameter can be one of the following values:

+  *            @arg SAI_IT_TXE: Tx buffer empty interrupt enable.

+  *            @arg SAI_IT_RXNE: Rx buffer not empty interrupt enable.

+  *            @arg SAI_IT_ERR: Error interrupt enable.

+  * @retval The new state of __INTERRUPT__ (TRUE or FALSE).

+  */

+#define __HAL_SAI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->IMR & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

+

+/** @brief  Check whether the specified SAI flag is set or not.

+  * @param  __HANDLE__: specifies the SAI Handle.

+  * @param  __FLAG__: specifies the flag to check.

+  *         This parameter can be one of the following values:

+  *            @arg SAI_FLAG_OVRUDR: Overrun underrun flag.

+  *            @arg SAI_FLAG_MUTEDET: Mute detection flag.

+  *            @arg SAI_FLAG_WCKCFG: Wrong Clock Configuration flag.

+  *            @arg SAI_FLAG_FREQ: FIFO request flag.

+  *            @arg SAI_FLAG_CNRDY: Codec not ready flag.

+  *            @arg SAI_FLAG_AFSDET: Anticipated frame synchronization detection flag.

+  *            @arg SAI_FLAG_LFSDET: Late frame synchronization detection flag.  

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define __HAL_SAI_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

+

+/** @brief  Clears the specified SAI pending flag.

+  * @param  __HANDLE__: specifies the SAI Handle.

+  * @param  __FLAG__: specifies the flag to check.

+  *          This parameter can be any combination of the following values:

+  *            @arg SAI_FLAG_OVRUDR: Clear Overrun underrun  

+  *            @arg SAI_FLAG_MUTEDET: Clear Mute detection 

+  *            @arg SAI_FLAG_WCKCFG: Clear Wrong Clock Configuration  

+  *            @arg SAI_FLAG_FREQ: Clear FIFO request   

+  *            @arg SAI_FLAG_CNRDY: Clear Codec not ready

+  *            @arg SAI_FLAG_AFSDET: Clear Anticipated frame synchronization detection

+  *            @arg SAI_FLAG_LFSDET: Clear Late frame synchronization detection

+  *   

+  * @retval None

+  */

+#define __HAL_SAI_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->CLRFR = (__FLAG__))                                        

+

+#define __HAL_SAI_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |=  SAI_xCR1_SAIEN)

+#define __HAL_SAI_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &=  ~SAI_xCR1_SAIEN)

+ 

+ /**

+  * @}

+  */

+

+/* Include RCC SAI Extension module */

+#include "stm32f7xx_hal_sai_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+

+/** @addtogroup SAI_Exported_Functions

+  * @{

+  */

+

+/* Initialization/de-initialization functions  **********************************/

+/** @addtogroup SAI_Exported_Functions_Group1

+  * @{

+  */

+HAL_StatusTypeDef HAL_SAI_InitProtocol(SAI_HandleTypeDef *hsai, uint32_t protocol, uint32_t datasize, uint32_t nbslot);    

+HAL_StatusTypeDef HAL_SAI_Init(SAI_HandleTypeDef *hsai);

+HAL_StatusTypeDef HAL_SAI_DeInit (SAI_HandleTypeDef *hsai);

+void HAL_SAI_MspInit(SAI_HandleTypeDef *hsai);

+void HAL_SAI_MspDeInit(SAI_HandleTypeDef *hsai);

+

+/**

+  * @}

+  */

+

+/* I/O operation functions  *****************************************************/

+/** @addtogroup SAI_Exported_Functions_Group2

+  * @{

+  */

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_SAI_Transmit(SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_SAI_Receive(SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size, uint32_t Timeout);

+

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_SAI_Transmit_IT(SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_SAI_Receive_IT(SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size);

+

+/* Non-Blocking mode: DMA */

+HAL_StatusTypeDef HAL_SAI_Transmit_DMA(SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_SAI_Receive_DMA(SAI_HandleTypeDef *hsai, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_SAI_DMAPause(SAI_HandleTypeDef *hsai);

+HAL_StatusTypeDef HAL_SAI_DMAResume(SAI_HandleTypeDef *hsai);

+HAL_StatusTypeDef HAL_SAI_DMAStop(SAI_HandleTypeDef *hsai);

+

+/* Abort function */

+HAL_StatusTypeDef HAL_SAI_Abort(SAI_HandleTypeDef *hsai);

+

+/* Mute management */

+HAL_StatusTypeDef HAL_SAI_EnableTxMuteMode(SAI_HandleTypeDef *hsai, uint16_t val);

+HAL_StatusTypeDef HAL_SAI_DisableTxMuteMode(SAI_HandleTypeDef *hsai);

+HAL_StatusTypeDef HAL_SAI_EnableRxMuteMode(SAI_HandleTypeDef *hsai, SAIcallback callback, uint16_t counter);

+HAL_StatusTypeDef HAL_SAI_DisableRxMuteMode(SAI_HandleTypeDef *hsai);

+

+/* SAI IRQHandler and Callbacks used in non blocking modes (Interrupt and DMA) */

+void HAL_SAI_IRQHandler(SAI_HandleTypeDef *hsai);

+void HAL_SAI_TxHalfCpltCallback(SAI_HandleTypeDef *hsai);

+void HAL_SAI_TxCpltCallback(SAI_HandleTypeDef *hsai);

+void HAL_SAI_RxHalfCpltCallback(SAI_HandleTypeDef *hsai);

+void HAL_SAI_RxCpltCallback(SAI_HandleTypeDef *hsai);

+void HAL_SAI_ErrorCallback(SAI_HandleTypeDef *hsai);

+/**

+  * @}

+  */

+

+/** @addtogroup SAI_Exported_Functions_Group3

+  * @{

+  */

+/* Peripheral State functions  **************************************************/

+HAL_SAI_StateTypeDef HAL_SAI_GetState(SAI_HandleTypeDef *hsai);

+uint32_t HAL_SAI_GetError(SAI_HandleTypeDef *hsai);

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */

+

+/* Private types -------------------------------------------------------------*/

+/** @defgroup SAI_Private_Types SAI Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup SAI_Private_Variables SAI Private Variables

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup SAI_Private_Constants SAI Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @addtogroup SAI_Private_Macros

+  * @{

+  */

+#define IS_SAI_BLOCK_SYNCEXT(STATE)   (((STATE) == SAI_SYNCEXT_DISABLE)           ||\

+                                       ((STATE) == SAI_SYNCEXT_IN_ENABLE)         ||\

+                                       ((STATE) == SAI_SYNCEXT_OUTBLOCKA_ENABLE)  ||\

+                                       ((STATE) == SAI_SYNCEXT_OUTBLOCKB_ENABLE))

+

+#define IS_SAI_SUPPORTED_PROTOCOL(PROTOCOL)   (((PROTOCOL) == SAI_I2S_STANDARD)     ||\

+                                               ((PROTOCOL) == SAI_I2S_MSBJUSTIFIED) ||\

+                                               ((PROTOCOL) == SAI_I2S_LSBJUSTIFIED) ||\

+                                               ((PROTOCOL) == SAI_PCM_LONG)         ||\

+                                               ((PROTOCOL) == SAI_PCM_SHORT))

+

+#define IS_SAI_PROTOCOL_DATASIZE(DATASIZE)   (((DATASIZE) == SAI_PROTOCOL_DATASIZE_16BIT)         ||\

+                                              ((DATASIZE) == SAI_PROTOCOL_DATASIZE_16BITEXTENDED) ||\

+                                              ((DATASIZE) == SAI_PROTOCOL_DATASIZE_24BIT)         ||\

+                                              ((DATASIZE) == SAI_PROTOCOL_DATASIZE_32BIT))

+

+#define IS_SAI_CLK_SOURCE(SOURCE) (((SOURCE) == SAI_CLKSOURCE_PLLSAI) ||\

+                                   ((SOURCE) == SAI_CLKSOURCE_PLLI2S) ||\

+                                   ((SOURCE) == SAI_CLKSOURCE_EXT))

+

+#define IS_SAI_AUDIO_FREQUENCY(AUDIO) (((AUDIO) == SAI_AUDIO_FREQUENCY_192K) || ((AUDIO) == SAI_AUDIO_FREQUENCY_96K) || \

+                                       ((AUDIO) == SAI_AUDIO_FREQUENCY_48K)  || ((AUDIO) == SAI_AUDIO_FREQUENCY_44K) || \

+                                       ((AUDIO) == SAI_AUDIO_FREQUENCY_32K)  || ((AUDIO) == SAI_AUDIO_FREQUENCY_22K) || \

+                                       ((AUDIO) == SAI_AUDIO_FREQUENCY_16K)  || ((AUDIO) == SAI_AUDIO_FREQUENCY_11K) || \

+                                       ((AUDIO) == SAI_AUDIO_FREQUENCY_8K)   || ((AUDIO) == SAI_AUDIO_FREQUENCY_MCKDIV))

+

+#define IS_SAI_BLOCK_MODE(MODE)    (((MODE) == SAI_MODEMASTER_TX) || \

+                                    ((MODE) == SAI_MODEMASTER_RX) || \

+                                    ((MODE) == SAI_MODESLAVE_TX)  || \

+                                    ((MODE) == SAI_MODESLAVE_RX))

+

+#define IS_SAI_BLOCK_PROTOCOL(PROTOCOL) (((PROTOCOL) == SAI_FREE_PROTOCOL)  || \

+                                         ((PROTOCOL) == SAI_AC97_PROTOCOL)  || \

+                                         ((PROTOCOL) == SAI_SPDIF_PROTOCOL))

+

+#define IS_SAI_BLOCK_DATASIZE(DATASIZE) (((DATASIZE) == SAI_DATASIZE_8)  || \

+                                         ((DATASIZE) == SAI_DATASIZE_10) || \

+                                         ((DATASIZE) == SAI_DATASIZE_16) || \

+                                         ((DATASIZE) == SAI_DATASIZE_20) || \

+                                         ((DATASIZE) == SAI_DATASIZE_24) || \

+                                         ((DATASIZE) == SAI_DATASIZE_32))

+

+#define IS_SAI_BLOCK_FIRST_BIT(BIT) (((BIT) == SAI_FIRSTBIT_MSB) || \

+                                     ((BIT) == SAI_FIRSTBIT_LSB))

+

+#define IS_SAI_BLOCK_CLOCK_STROBING(CLOCK) (((CLOCK) == SAI_CLOCKSTROBING_FALLINGEDGE) || \

+                                            ((CLOCK) == SAI_CLOCKSTROBING_RISINGEDGE))

+

+#define IS_SAI_BLOCK_SYNCHRO(SYNCHRO) (((SYNCHRO) == SAI_ASYNCHRONOUS) || \

+                                       ((SYNCHRO) == SAI_SYNCHRONOUS)  || \

+                                       ((SYNCHRO) == SAI_SYNCHRONOUS_EXT))

+

+#define IS_SAI_BLOCK_OUTPUT_DRIVE(DRIVE) (((DRIVE) == SAI_OUTPUTDRIVE_DISABLE) || \

+                                          ((DRIVE) == SAI_OUTPUTDRIVE_ENABLE))

+

+#define IS_SAI_BLOCK_NODIVIDER(NODIVIDER) (((NODIVIDER) == SAI_MASTERDIVIDER_ENABLE) || \

+                                           ((NODIVIDER) == SAI_MASTERDIVIDER_DISABLE)) 

+                                           

+#define IS_SAI_BLOCK_FIFO_STATUS(STATUS) (((STATUS) == SAI_FIFOSTATUS_LESS1QUARTERFULL ) || \

+                                          ((STATUS) == SAI_FIFOSTATUS_HALFFULL)          || \

+                                          ((STATUS) == SAI_FIFOSTATUS_1QUARTERFULL)      || \

+                                          ((STATUS) == SAI_FIFOSTATUS_3QUARTERFULL)     || \

+                                          ((STATUS) == SAI_FIFOSTATUS_FULL)              || \

+                                          ((STATUS) == SAI_FIFOSTATUS_EMPTY))

+

+#define IS_SAI_BLOCK_MUTE_COUNTER(COUNTER) ((COUNTER) <= 63)

+

+#define IS_SAI_BLOCK_MUTE_VALUE(VALUE)    (((VALUE) == SAI_ZERO_VALUE)     || \

+                                           ((VALUE) == SAI_LAST_SENT_VALUE)) 

+

+#define IS_SAI_BLOCK_COMPANDING_MODE(MODE)    (((MODE) == SAI_NOCOMPANDING)         || \

+                                               ((MODE) == SAI_ULAW_1CPL_COMPANDING) || \

+                                               ((MODE) == SAI_ALAW_1CPL_COMPANDING) || \

+                                               ((MODE) == SAI_ULAW_2CPL_COMPANDING) || \

+                                               ((MODE) == SAI_ALAW_2CPL_COMPANDING)) 

+

+#define IS_SAI_BLOCK_FIFO_THRESHOLD(THRESHOLD) (((THRESHOLD) == SAI_FIFOTHRESHOLD_EMPTY)   || \

+                                                ((THRESHOLD) == SAI_FIFOTHRESHOLD_1QF)     || \

+                                                ((THRESHOLD) == SAI_FIFOTHRESHOLD_HF)      || \

+                                                ((THRESHOLD) == SAI_FIFOTHRESHOLD_3QF)     || \

+                                                ((THRESHOLD) == SAI_FIFOTHRESHOLD_FULL))  

+

+#define IS_SAI_BLOCK_TRISTATE_MANAGEMENT(STATE) (((STATE) == SAI_OUTPUT_NOTRELEASED) ||\

+                                                 ((STATE) == SAI_OUTPUT_RELEASED)) 

+

+#define IS_SAI_MONO_STEREO_MODE(MODE) (((MODE) == SAI_MONOMODE) ||\

+                                       ((MODE) == SAI_STEREOMODE)) 

+

+#define IS_SAI_SLOT_ACTIVE(ACTIVE)  ((((ACTIVE) >> 16 )  > 0) && (((ACTIVE) >> 16 )  <= (SAI_SLOTACTIVE_ALL >> 16)))

+

+#define IS_SAI_BLOCK_SLOT_NUMBER(NUMBER) ((1 <= (NUMBER)) && ((NUMBER) <= 16))  

+

+#define IS_SAI_BLOCK_SLOT_SIZE(SIZE) (((SIZE) == SAI_SLOTSIZE_DATASIZE) || \

+                                      ((SIZE) == SAI_SLOTSIZE_16B)      || \

+                                      ((SIZE) == SAI_SLOTSIZE_32B))

+

+#define IS_SAI_BLOCK_FIRSTBIT_OFFSET(OFFSET) ((OFFSET) <= 24) 

+

+#define IS_SAI_BLOCK_FS_OFFSET(OFFSET) (((OFFSET) == SAI_FS_FIRSTBIT) || \

+                                        ((OFFSET) == SAI_FS_BEFOREFIRSTBIT))

+

+#define IS_SAI_BLOCK_FS_POLARITY(POLARITY) (((POLARITY) == SAI_FS_ACTIVE_LOW) || \

+                                            ((POLARITY) == SAI_FS_ACTIVE_HIGH)) 

+

+#define IS_SAI_BLOCK_FS_DEFINITION(DEFINITION) (((DEFINITION) == SAI_FS_STARTFRAME) || \

+                                                ((DEFINITION) == SAI_FS_CHANNEL_IDENTIFICATION)) 

+                                                

+#define IS_SAI_BLOCK_MASTER_DIVIDER(DIVIDER) ((DIVIDER) <= 15)    

+

+#define IS_SAI_BLOCK_FRAME_LENGTH(LENGTH) ((8 <= (LENGTH)) && ((LENGTH) <= 256))      

+

+#define IS_SAI_BLOCK_ACTIVE_FRAME(LENGTH) ((1 <= (LENGTH)) && ((LENGTH) <= 128))  

+                                          

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup SAI_Private_Functions SAI Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_SAI_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sai_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sai_ex.h
new file mode 100644
index 0000000..531cad3
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sai_ex.h
@@ -0,0 +1,98 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_sai_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of SAI Extension HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_SAI_EX_H

+#define __STM32F7xx_HAL_SAI_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"  

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup SAIEx

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/* Exported constants --------------------------------------------------------*/    

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup SAIEx_Exported_Functions SAI Extended Exported Functions

+  * @{

+  */

+

+/** @addtogroup SAIEx_Exported_Functions_Group1 Extension features functions

+  * @{

+  */

+

+/* Extended features functions ************************************************/

+void SAI_BlockSynchroConfig(SAI_HandleTypeDef *hsai);    

+uint32_t SAI_GetInputClock(SAI_HandleTypeDef *hsai);

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/* Private macros ------------------------------------------------------------*/

+/* Private functions ---------------------------------------------------------*/

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_SAI_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sd.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sd.h
new file mode 100644
index 0000000..2aaf83c
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sd.h
@@ -0,0 +1,774 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_sd.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of SD HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_SD_H

+#define __STM32F7xx_HAL_SD_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_ll_sdmmc.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @defgroup SD SD

+  * @brief SD HAL module driver

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup SD_Exported_Types SD Exported Types

+  * @{

+  */

+

+/** @defgroup SD_Exported_Types_Group1 SD Handle Structure definition   

+  * @{

+  */

+#define SD_InitTypeDef      SDMMC_InitTypeDef 

+#define SD_TypeDef          SDMMC_TypeDef

+

+typedef struct

+{

+  SD_TypeDef                   *Instance;        /*!< SDMMC register base address                     */

+  

+  SD_InitTypeDef               Init;             /*!< SD required parameters                         */

+  

+  HAL_LockTypeDef              Lock;             /*!< SD locking object                              */

+  

+  uint32_t                     CardType;         /*!< SD card type                                   */

+  

+  uint32_t                     RCA;              /*!< SD relative card address                       */

+  

+  uint32_t                     CSD[4];           /*!< SD card specific data table                    */

+  

+  uint32_t                     CID[4];           /*!< SD card identification number table            */

+  

+  __IO uint32_t                SdTransferCplt;   /*!< SD transfer complete flag in non blocking mode */

+  

+  __IO uint32_t                SdTransferErr;    /*!< SD transfer error flag in non blocking mode    */

+  

+  __IO uint32_t                DmaTransferCplt;  /*!< SD DMA transfer complete flag                  */

+  

+  __IO uint32_t                SdOperation;      /*!< SD transfer operation (read/write)             */

+  

+  DMA_HandleTypeDef            *hdmarx;          /*!< SD Rx DMA handle parameters                    */

+  

+  DMA_HandleTypeDef            *hdmatx;          /*!< SD Tx DMA handle parameters                    */

+  

+}SD_HandleTypeDef;

+/** 

+  * @}

+  */

+

+/** @defgroup SD_Exported_Types_Group2 Card Specific Data: CSD Register 

+  * @{

+  */ 

+typedef struct

+{

+  __IO uint8_t  CSDStruct;            /*!< CSD structure                         */

+  __IO uint8_t  SysSpecVersion;       /*!< System specification version          */

+  __IO uint8_t  Reserved1;            /*!< Reserved                              */

+  __IO uint8_t  TAAC;                 /*!< Data read access time 1               */

+  __IO uint8_t  NSAC;                 /*!< Data read access time 2 in CLK cycles */

+  __IO uint8_t  MaxBusClkFrec;        /*!< Max. bus clock frequency              */

+  __IO uint16_t CardComdClasses;      /*!< Card command classes                  */

+  __IO uint8_t  RdBlockLen;           /*!< Max. read data block length           */

+  __IO uint8_t  PartBlockRead;        /*!< Partial blocks for read allowed       */

+  __IO uint8_t  WrBlockMisalign;      /*!< Write block misalignment              */

+  __IO uint8_t  RdBlockMisalign;      /*!< Read block misalignment               */

+  __IO uint8_t  DSRImpl;              /*!< DSR implemented                       */

+  __IO uint8_t  Reserved2;            /*!< Reserved                              */

+  __IO uint32_t DeviceSize;           /*!< Device Size                           */

+  __IO uint8_t  MaxRdCurrentVDDMin;   /*!< Max. read current @ VDD min           */

+  __IO uint8_t  MaxRdCurrentVDDMax;   /*!< Max. read current @ VDD max           */

+  __IO uint8_t  MaxWrCurrentVDDMin;   /*!< Max. write current @ VDD min          */

+  __IO uint8_t  MaxWrCurrentVDDMax;   /*!< Max. write current @ VDD max          */

+  __IO uint8_t  DeviceSizeMul;        /*!< Device size multiplier                */

+  __IO uint8_t  EraseGrSize;          /*!< Erase group size                      */

+  __IO uint8_t  EraseGrMul;           /*!< Erase group size multiplier           */

+  __IO uint8_t  WrProtectGrSize;      /*!< Write protect group size              */

+  __IO uint8_t  WrProtectGrEnable;    /*!< Write protect group enable            */

+  __IO uint8_t  ManDeflECC;           /*!< Manufacturer default ECC              */

+  __IO uint8_t  WrSpeedFact;          /*!< Write speed factor                    */

+  __IO uint8_t  MaxWrBlockLen;        /*!< Max. write data block length          */

+  __IO uint8_t  WriteBlockPaPartial;  /*!< Partial blocks for write allowed      */

+  __IO uint8_t  Reserved3;            /*!< Reserved                              */

+  __IO uint8_t  ContentProtectAppli;  /*!< Content protection application        */

+  __IO uint8_t  FileFormatGrouop;     /*!< File format group                     */

+  __IO uint8_t  CopyFlag;             /*!< Copy flag (OTP)                       */

+  __IO uint8_t  PermWrProtect;        /*!< Permanent write protection            */

+  __IO uint8_t  TempWrProtect;        /*!< Temporary write protection            */

+  __IO uint8_t  FileFormat;           /*!< File format                           */

+  __IO uint8_t  ECC;                  /*!< ECC code                              */

+  __IO uint8_t  CSD_CRC;              /*!< CSD CRC                               */

+  __IO uint8_t  Reserved4;            /*!< Always 1                              */

+

+}HAL_SD_CSDTypedef;

+/** 

+  * @}

+  */

+

+/** @defgroup SD_Exported_Types_Group3 Card Identification Data: CID Register

+  * @{

+  */

+typedef struct

+{

+  __IO uint8_t  ManufacturerID;  /*!< Manufacturer ID       */

+  __IO uint16_t OEM_AppliID;     /*!< OEM/Application ID    */

+  __IO uint32_t ProdName1;       /*!< Product Name part1    */

+  __IO uint8_t  ProdName2;       /*!< Product Name part2    */

+  __IO uint8_t  ProdRev;         /*!< Product Revision      */

+  __IO uint32_t ProdSN;          /*!< Product Serial Number */

+  __IO uint8_t  Reserved1;       /*!< Reserved1             */

+  __IO uint16_t ManufactDate;    /*!< Manufacturing Date    */

+  __IO uint8_t  CID_CRC;         /*!< CID CRC               */

+  __IO uint8_t  Reserved2;       /*!< Always 1              */

+

+}HAL_SD_CIDTypedef;

+/** 

+  * @}

+  */

+

+/** @defgroup SD_Exported_Types_Group4 SD Card Status returned by ACMD13 

+  * @{

+  */

+typedef struct

+{

+  __IO uint8_t  DAT_BUS_WIDTH;           /*!< Shows the currently defined data bus width                 */

+  __IO uint8_t  SECURED_MODE;            /*!< Card is in secured mode of operation                       */

+  __IO uint16_t SD_CARD_TYPE;            /*!< Carries information about card type                        */

+  __IO uint32_t SIZE_OF_PROTECTED_AREA;  /*!< Carries information about the capacity of protected area   */

+  __IO uint8_t  SPEED_CLASS;             /*!< Carries information about the speed class of the card      */

+  __IO uint8_t  PERFORMANCE_MOVE;        /*!< Carries information about the card's performance move      */

+  __IO uint8_t  AU_SIZE;                 /*!< Carries information about the card's allocation unit size  */

+  __IO uint16_t ERASE_SIZE;              /*!< Determines the number of AUs to be erased in one operation */

+  __IO uint8_t  ERASE_TIMEOUT;           /*!< Determines the timeout for any number of AU erase          */

+  __IO uint8_t  ERASE_OFFSET;            /*!< Carries information about the erase offset                 */

+

+}HAL_SD_CardStatusTypedef;

+/** 

+  * @}

+  */

+

+/** @defgroup SD_Exported_Types_Group5 SD Card information structure 

+  * @{

+  */

+typedef struct

+{

+  HAL_SD_CSDTypedef   SD_csd;         /*!< SD card specific data register         */

+  HAL_SD_CIDTypedef   SD_cid;         /*!< SD card identification number register */

+  uint64_t            CardCapacity;   /*!< Card capacity                          */

+  uint32_t            CardBlockSize;  /*!< Card block size                        */

+  uint16_t            RCA;            /*!< SD relative card address               */

+  uint8_t             CardType;       /*!< SD card type                           */

+

+}HAL_SD_CardInfoTypedef;

+/** 

+  * @}

+  */

+

+/** @defgroup SD_Exported_Types_Group6 SD Error status enumeration Structure definition 

+  * @{

+  */

+typedef enum

+{

+/** 

+  * @brief  SD specific error defines  

+  */   

+  SD_CMD_CRC_FAIL                    = (1),   /*!< Command response received (but CRC check failed)              */

+  SD_DATA_CRC_FAIL                   = (2),   /*!< Data block sent/received (CRC check failed)                   */

+  SD_CMD_RSP_TIMEOUT                 = (3),   /*!< Command response timeout                                      */

+  SD_DATA_TIMEOUT                    = (4),   /*!< Data timeout                                                  */

+  SD_TX_UNDERRUN                     = (5),   /*!< Transmit FIFO underrun                                        */

+  SD_RX_OVERRUN                      = (6),   /*!< Receive FIFO overrun                                          */

+  SD_START_BIT_ERR                   = (7),   /*!< Start bit not detected on all data signals in wide bus mode   */

+  SD_CMD_OUT_OF_RANGE                = (8),   /*!< Command's argument was out of range.                          */

+  SD_ADDR_MISALIGNED                 = (9),   /*!< Misaligned address                                            */

+  SD_BLOCK_LEN_ERR                   = (10),  /*!< Transferred block length is not allowed for the card or the number of transferred bytes does not match the block length */

+  SD_ERASE_SEQ_ERR                   = (11),  /*!< An error in the sequence of erase command occurs.            */

+  SD_BAD_ERASE_PARAM                 = (12),  /*!< An invalid selection for erase groups                        */

+  SD_WRITE_PROT_VIOLATION            = (13),  /*!< Attempt to program a write protect block                     */

+  SD_LOCK_UNLOCK_FAILED              = (14),  /*!< Sequence or password error has been detected in unlock command or if there was an attempt to access a locked card */

+  SD_COM_CRC_FAILED                  = (15),  /*!< CRC check of the previous command failed                     */

+  SD_ILLEGAL_CMD                     = (16),  /*!< Command is not legal for the card state                      */

+  SD_CARD_ECC_FAILED                 = (17),  /*!< Card internal ECC was applied but failed to correct the data */

+  SD_CC_ERROR                        = (18),  /*!< Internal card controller error                               */

+  SD_GENERAL_UNKNOWN_ERROR           = (19),  /*!< General or unknown error                                     */

+  SD_STREAM_READ_UNDERRUN            = (20),  /*!< The card could not sustain data transfer in stream read operation. */

+  SD_STREAM_WRITE_OVERRUN            = (21),  /*!< The card could not sustain data programming in stream mode   */

+  SD_CID_CSD_OVERWRITE               = (22),  /*!< CID/CSD overwrite error                                      */

+  SD_WP_ERASE_SKIP                   = (23),  /*!< Only partial address space was erased                        */

+  SD_CARD_ECC_DISABLED               = (24),  /*!< Command has been executed without using internal ECC         */

+  SD_ERASE_RESET                     = (25),  /*!< Erase sequence was cleared before executing because an out of erase sequence command was received */

+  SD_AKE_SEQ_ERROR                   = (26),  /*!< Error in sequence of authentication.                         */

+  SD_INVALID_VOLTRANGE               = (27),

+  SD_ADDR_OUT_OF_RANGE               = (28),

+  SD_SWITCH_ERROR                    = (29),

+  SD_SDMMC_DISABLED                  = (30),

+  SD_SDMMC_FUNCTION_BUSY             = (31),

+  SD_SDMMC_FUNCTION_FAILED           = (32),

+  SD_SDMMC_UNKNOWN_FUNCTION          = (33),

+

+/** 

+  * @brief  Standard error defines   

+  */ 

+  SD_INTERNAL_ERROR                  = (34),

+  SD_NOT_CONFIGURED                  = (35),

+  SD_REQUEST_PENDING                 = (36),

+  SD_REQUEST_NOT_APPLICABLE          = (37),

+  SD_INVALID_PARAMETER               = (38),

+  SD_UNSUPPORTED_FEATURE             = (39),

+  SD_UNSUPPORTED_HW                  = (40),

+  SD_ERROR                           = (41),

+  SD_OK                              = (0) 

+

+}HAL_SD_ErrorTypedef;

+/** 

+  * @}

+  */

+

+/** @defgroup SD_Exported_Types_Group7 SD Transfer state enumeration structure

+  * @{

+  */   

+typedef enum

+{

+  SD_TRANSFER_OK    = 0,  /*!< Transfer success      */

+  SD_TRANSFER_BUSY  = 1,  /*!< Transfer is occurring */

+  SD_TRANSFER_ERROR = 2   /*!< Transfer failed       */

+

+}HAL_SD_TransferStateTypedef;

+/** 

+  * @}

+  */

+

+/** @defgroup SD_Exported_Types_Group8 SD Card State enumeration structure

+  * @{

+  */   

+typedef enum

+{

+  SD_CARD_READY                  = ((uint32_t)0x00000001),  /*!< Card state is ready                     */

+  SD_CARD_IDENTIFICATION         = ((uint32_t)0x00000002),  /*!< Card is in identification state         */

+  SD_CARD_STANDBY                = ((uint32_t)0x00000003),  /*!< Card is in standby state                */

+  SD_CARD_TRANSFER               = ((uint32_t)0x00000004),  /*!< Card is in transfer state               */  

+  SD_CARD_SENDING                = ((uint32_t)0x00000005),  /*!< Card is sending an operation            */

+  SD_CARD_RECEIVING              = ((uint32_t)0x00000006),  /*!< Card is receiving operation information */

+  SD_CARD_PROGRAMMING            = ((uint32_t)0x00000007),  /*!< Card is in programming state            */

+  SD_CARD_DISCONNECTED           = ((uint32_t)0x00000008),  /*!< Card is disconnected                    */

+  SD_CARD_ERROR                  = ((uint32_t)0x000000FF)   /*!< Card is in error state                  */

+

+}HAL_SD_CardStateTypedef;

+/** 

+  * @}

+  */

+

+/** @defgroup SD_Exported_Types_Group9 SD Operation enumeration structure

+  * @{

+  */   

+typedef enum

+{

+  SD_READ_SINGLE_BLOCK    = 0,  /*!< Read single block operation      */

+  SD_READ_MULTIPLE_BLOCK  = 1,  /*!< Read multiple blocks operation   */

+  SD_WRITE_SINGLE_BLOCK   = 2,  /*!< Write single block operation     */

+  SD_WRITE_MULTIPLE_BLOCK = 3   /*!< Write multiple blocks operation  */

+

+}HAL_SD_OperationTypedef;

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup SD_Exported_Constants SD Exported Constants

+  * @{

+  */

+

+/** 

+  * @brief SD Commands Index 

+  */

+#define SD_CMD_GO_IDLE_STATE                       ((uint8_t)0)   /*!< Resets the SD memory card.                                                               */

+#define SD_CMD_SEND_OP_COND                        ((uint8_t)1)   /*!< Sends host capacity support information and activates the card's initialization process. */

+#define SD_CMD_ALL_SEND_CID                        ((uint8_t)2)   /*!< Asks any card connected to the host to send the CID numbers on the CMD line.             */

+#define SD_CMD_SET_REL_ADDR                        ((uint8_t)3)   /*!< Asks the card to publish a new relative address (RCA).                                   */

+#define SD_CMD_SET_DSR                             ((uint8_t)4)   /*!< Programs the DSR of all cards.                                                           */

+#define SD_CMD_SDMMC_SEN_OP_COND                   ((uint8_t)5)   /*!< Sends host capacity support information (HCS) and asks the accessed card to send its 

+                                                                       operating condition register (OCR) content in the response on the CMD line.              */

+#define SD_CMD_HS_SWITCH                           ((uint8_t)6)   /*!< Checks switchable function (mode 0) and switch card function (mode 1).                   */

+#define SD_CMD_SEL_DESEL_CARD                      ((uint8_t)7)   /*!< Selects the card by its own relative address and gets deselected by any other address    */

+#define SD_CMD_HS_SEND_EXT_CSD                     ((uint8_t)8)   /*!< Sends SD Memory Card interface condition, which includes host supply voltage information 

+                                                                       and asks the card whether card supports voltage.                                         */

+#define SD_CMD_SEND_CSD                            ((uint8_t)9)   /*!< Addressed card sends its card specific data (CSD) on the CMD line.                       */

+#define SD_CMD_SEND_CID                            ((uint8_t)10)  /*!< Addressed card sends its card identification (CID) on the CMD line.                      */

+#define SD_CMD_READ_DAT_UNTIL_STOP                 ((uint8_t)11)  /*!< SD card doesn't support it.                                                              */

+#define SD_CMD_STOP_TRANSMISSION                   ((uint8_t)12)  /*!< Forces the card to stop transmission.                                                    */

+#define SD_CMD_SEND_STATUS                         ((uint8_t)13)  /*!< Addressed card sends its status register.                                                */

+#define SD_CMD_HS_BUSTEST_READ                     ((uint8_t)14) 

+#define SD_CMD_GO_INACTIVE_STATE                   ((uint8_t)15)  /*!< Sends an addressed card into the inactive state.                                         */

+#define SD_CMD_SET_BLOCKLEN                        ((uint8_t)16)  /*!< Sets the block length (in bytes for SDSC) for all following block commands 

+                                                                       (read, write, lock). Default block length is fixed to 512 Bytes. Not effective 

+                                                                       for SDHS and SDXC.                                                                       */

+#define SD_CMD_READ_SINGLE_BLOCK                   ((uint8_t)17)  /*!< Reads single block of size selected by SET_BLOCKLEN in case of SDSC, and a block of 

+                                                                       fixed 512 bytes in case of SDHC and SDXC.                                                */

+#define SD_CMD_READ_MULT_BLOCK                     ((uint8_t)18)  /*!< Continuously transfers data blocks from card to host until interrupted by 

+                                                                       STOP_TRANSMISSION command.                                                               */

+#define SD_CMD_HS_BUSTEST_WRITE                    ((uint8_t)19)  /*!< 64 bytes tuning pattern is sent for SDR50 and SDR104.                                    */

+#define SD_CMD_WRITE_DAT_UNTIL_STOP                ((uint8_t)20)  /*!< Speed class control command.                                                             */

+#define SD_CMD_SET_BLOCK_COUNT                     ((uint8_t)23)  /*!< Specify block count for CMD18 and CMD25.                                                 */

+#define SD_CMD_WRITE_SINGLE_BLOCK                  ((uint8_t)24)  /*!< Writes single block of size selected by SET_BLOCKLEN in case of SDSC, and a block of 

+                                                                       fixed 512 bytes in case of SDHC and SDXC.                                                */

+#define SD_CMD_WRITE_MULT_BLOCK                    ((uint8_t)25)  /*!< Continuously writes blocks of data until a STOP_TRANSMISSION follows.                    */

+#define SD_CMD_PROG_CID                            ((uint8_t)26)  /*!< Reserved for manufacturers.                                                              */

+#define SD_CMD_PROG_CSD                            ((uint8_t)27)  /*!< Programming of the programmable bits of the CSD.                                         */

+#define SD_CMD_SET_WRITE_PROT                      ((uint8_t)28)  /*!< Sets the write protection bit of the addressed group.                                    */

+#define SD_CMD_CLR_WRITE_PROT                      ((uint8_t)29)  /*!< Clears the write protection bit of the addressed group.                                  */

+#define SD_CMD_SEND_WRITE_PROT                     ((uint8_t)30)  /*!< Asks the card to send the status of the write protection bits.                           */

+#define SD_CMD_SD_ERASE_GRP_START                  ((uint8_t)32)  /*!< Sets the address of the first write block to be erased. (For SD card only).              */

+#define SD_CMD_SD_ERASE_GRP_END                    ((uint8_t)33)  /*!< Sets the address of the last write block of the continuous range to be erased.           */

+#define SD_CMD_ERASE_GRP_START                     ((uint8_t)35)  /*!< Sets the address of the first write block to be erased. Reserved for each command 

+                                                                       system set by switch function command (CMD6).                                            */

+#define SD_CMD_ERASE_GRP_END                       ((uint8_t)36)  /*!< Sets the address of the last write block of the continuous range to be erased. 

+                                                                       Reserved for each command system set by switch function command (CMD6).                  */

+#define SD_CMD_ERASE                               ((uint8_t)38)  /*!< Reserved for SD security applications.                                                   */

+#define SD_CMD_FAST_IO                             ((uint8_t)39)  /*!< SD card doesn't support it (Reserved).                                                   */

+#define SD_CMD_GO_IRQ_STATE                        ((uint8_t)40)  /*!< SD card doesn't support it (Reserved).                                                   */

+#define SD_CMD_LOCK_UNLOCK                         ((uint8_t)42)  /*!< Sets/resets the password or lock/unlock the card. The size of the data block is set by 

+                                                                       the SET_BLOCK_LEN command.                                                               */

+#define SD_CMD_APP_CMD                             ((uint8_t)55)  /*!< Indicates to the card that the next command is an application specific command rather 

+                                                                       than a standard command.                                                                 */

+#define SD_CMD_GEN_CMD                             ((uint8_t)56)  /*!< Used either to transfer a data block to the card or to get a data block from the card 

+                                                                       for general purpose/application specific commands.                                       */

+#define SD_CMD_NO_CMD                              ((uint8_t)64) 

+

+/** 

+  * @brief Following commands are SD Card Specific commands.

+  *        SDMMC_APP_CMD should be sent before sending these commands. 

+  */

+#define SD_CMD_APP_SD_SET_BUSWIDTH                 ((uint8_t)6)   /*!< (ACMD6) Defines the data bus width to be used for data transfer. The allowed data bus 

+                                                                       widths are given in SCR register.                                                          */

+#define SD_CMD_SD_APP_STATUS                       ((uint8_t)13)  /*!< (ACMD13) Sends the SD status.                                                              */

+#define SD_CMD_SD_APP_SEND_NUM_WRITE_BLOCKS        ((uint8_t)22)  /*!< (ACMD22) Sends the number of the written (without errors) write blocks. Responds with 

+                                                                       32bit+CRC data block.                                                                      */

+#define SD_CMD_SD_APP_OP_COND                      ((uint8_t)41)  /*!< (ACMD41) Sends host capacity support information (HCS) and asks the accessed card to 

+                                                                       send its operating condition register (OCR) content in the response on the CMD line.       */

+#define SD_CMD_SD_APP_SET_CLR_CARD_DETECT          ((uint8_t)42)  /*!< (ACMD42) Connects/Disconnects the 50 KOhm pull-up resistor on CD/DAT3 (pin 1) of the card. */

+#define SD_CMD_SD_APP_SEND_SCR                     ((uint8_t)51)  /*!< Reads the SD Configuration Register (SCR).                                                 */

+#define SD_CMD_SDMMC_RW_DIRECT                     ((uint8_t)52)  /*!< For SD I/O card only, reserved for security specification.                                 */

+#define SD_CMD_SDMMC_RW_EXTENDED                   ((uint8_t)53)  /*!< For SD I/O card only, reserved for security specification.                                 */

+

+/** 

+  * @brief Following commands are SD Card Specific security commands.

+  *        SD_CMD_APP_CMD should be sent before sending these commands. 

+  */

+#define SD_CMD_SD_APP_GET_MKB                      ((uint8_t)43)  /*!< For SD card only */

+#define SD_CMD_SD_APP_GET_MID                      ((uint8_t)44)  /*!< For SD card only */

+#define SD_CMD_SD_APP_SET_CER_RN1                  ((uint8_t)45)  /*!< For SD card only */

+#define SD_CMD_SD_APP_GET_CER_RN2                  ((uint8_t)46)  /*!< For SD card only */

+#define SD_CMD_SD_APP_SET_CER_RES2                 ((uint8_t)47)  /*!< For SD card only */

+#define SD_CMD_SD_APP_GET_CER_RES1                 ((uint8_t)48)  /*!< For SD card only */

+#define SD_CMD_SD_APP_SECURE_READ_MULTIPLE_BLOCK   ((uint8_t)18)  /*!< For SD card only */

+#define SD_CMD_SD_APP_SECURE_WRITE_MULTIPLE_BLOCK  ((uint8_t)25)  /*!< For SD card only */

+#define SD_CMD_SD_APP_SECURE_ERASE                 ((uint8_t)38)  /*!< For SD card only */

+#define SD_CMD_SD_APP_CHANGE_SECURE_AREA           ((uint8_t)49)  /*!< For SD card only */

+#define SD_CMD_SD_APP_SECURE_WRITE_MKB             ((uint8_t)48)  /*!< For SD card only */

+

+/** 

+  * @brief Supported SD Memory Cards 

+  */

+#define STD_CAPACITY_SD_CARD_V1_1             ((uint32_t)0x00000000)

+#define STD_CAPACITY_SD_CARD_V2_0             ((uint32_t)0x00000001)

+#define HIGH_CAPACITY_SD_CARD                 ((uint32_t)0x00000002)

+#define MULTIMEDIA_CARD                       ((uint32_t)0x00000003)

+#define SECURE_DIGITAL_IO_CARD                ((uint32_t)0x00000004)

+#define HIGH_SPEED_MULTIMEDIA_CARD            ((uint32_t)0x00000005)

+#define SECURE_DIGITAL_IO_COMBO_CARD          ((uint32_t)0x00000006)

+#define HIGH_CAPACITY_MMC_CARD                ((uint32_t)0x00000007)

+/**

+  * @}

+  */

+  

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup SD_Exported_macros SD Exported Macros

+ *  @brief macros to handle interrupts and specific clock configurations

+ * @{

+ */

+ 

+/**

+  * @brief  Enable the SD device.

+  * @retval None

+  */ 

+#define __HAL_SD_SDMMC_ENABLE(__HANDLE__) __SDMMC_ENABLE((__HANDLE__)->Instance)

+

+/**

+  * @brief  Disable the SD device.

+  * @retval None

+  */

+#define __HAL_SD_SDMMC_DISABLE(__HANDLE__) __SDMMC_DISABLE((__HANDLE__)->Instance)

+

+/**

+  * @brief  Enable the SDMMC DMA transfer.

+  * @retval None

+  */ 

+#define __HAL_SD_SDMMC_DMA_ENABLE(__HANDLE__) __SDMMC_DMA_ENABLE((__HANDLE__)->Instance)

+

+/**

+  * @brief  Disable the SDMMC DMA transfer.

+  * @retval None

+  */

+#define __HAL_SD_SDMMC_DMA_DISABLE(__HANDLE__)  __SDMMC_DMA_DISABLE((__HANDLE__)->Instance)

+ 

+/**

+  * @brief  Enable the SD device interrupt.

+  * @param  __HANDLE__: SD Handle  

+  * @param  __INTERRUPT__: specifies the SDMMC interrupt sources to be enabled.

+  *         This parameter can be one or a combination of the following values:

+  *            @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt

+  *            @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt

+  *            @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt

+  *            @arg SDMMC_IT_RXOVERR:  Received FIFO overrun error interrupt

+  *            @arg SDMMC_IT_CMDREND:  Command response received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDSENT:  Command sent (no response required) interrupt

+  *            @arg SDMMC_IT_DATAEND:  Data end (data counter, SDIDCOUNT, is zero) interrupt

+  *            @arg SDMMC_IT_DBCKEND:  Data block sent/received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDACT:   Command transfer in progress interrupt

+  *            @arg SDMMC_IT_TXACT:    Data transmit in progress interrupt

+  *            @arg SDMMC_IT_RXACT:    Data receive in progress interrupt

+  *            @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt

+  *            @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt

+  *            @arg SDMMC_IT_TXFIFOF:  Transmit FIFO full interrupt

+  *            @arg SDMMC_IT_RXFIFOF:  Receive FIFO full interrupt

+  *            @arg SDMMC_IT_TXFIFOE:  Transmit FIFO empty interrupt

+  *            @arg SDMMC_IT_RXFIFOE:  Receive FIFO empty interrupt

+  *            @arg SDMMC_IT_TXDAVL:   Data available in transmit FIFO interrupt

+  *            @arg SDMMC_IT_RXDAVL:   Data available in receive FIFO interrupt

+  *            @arg SDMMC_IT_SDIOIT:   SD I/O interrupt received interrupt

+  * @retval None

+  */

+#define __HAL_SD_SDMMC_ENABLE_IT(__HANDLE__, __INTERRUPT__) __SDMMC_ENABLE_IT((__HANDLE__)->Instance, (__INTERRUPT__))

+

+/**

+  * @brief  Disable the SD device interrupt.

+  * @param  __HANDLE__: SD Handle   

+  * @param  __INTERRUPT__: specifies the SDMMC interrupt sources to be disabled.

+  *          This parameter can be one or a combination of the following values:

+  *            @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt

+  *            @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt

+  *            @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt

+  *            @arg SDMMC_IT_RXOVERR:  Received FIFO overrun error interrupt

+  *            @arg SDMMC_IT_CMDREND:  Command response received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDSENT:  Command sent (no response required) interrupt

+  *            @arg SDMMC_IT_DATAEND:  Data end (data counter, SDIDCOUNT, is zero) interrupt

+  *            @arg SDMMC_IT_DBCKEND:  Data block sent/received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDACT:   Command transfer in progress interrupt

+  *            @arg SDMMC_IT_TXACT:    Data transmit in progress interrupt

+  *            @arg SDMMC_IT_RXACT:    Data receive in progress interrupt

+  *            @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt

+  *            @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt

+  *            @arg SDMMC_IT_TXFIFOF:  Transmit FIFO full interrupt

+  *            @arg SDMMC_IT_RXFIFOF:  Receive FIFO full interrupt

+  *            @arg SDMMC_IT_TXFIFOE:  Transmit FIFO empty interrupt

+  *            @arg SDMMC_IT_RXFIFOE:  Receive FIFO empty interrupt

+  *            @arg SDMMC_IT_TXDAVL:   Data available in transmit FIFO interrupt

+  *            @arg SDMMC_IT_RXDAVL:   Data available in receive FIFO interrupt

+  *            @arg SDMMC_IT_SDIOIT:   SD I/O interrupt received interrupt   

+  * @retval None

+  */

+#define __HAL_SD_SDMMC_DISABLE_IT(__HANDLE__, __INTERRUPT__) __SDMMC_DISABLE_IT((__HANDLE__)->Instance, (__INTERRUPT__))

+

+/**

+  * @brief  Check whether the specified SD flag is set or not. 

+  * @param  __HANDLE__: SD Handle   

+  * @param  __FLAG__: specifies the flag to check. 

+  *          This parameter can be one of the following values:

+  *            @arg SDMMC_FLAG_CCRCFAIL: Command response received (CRC check failed)

+  *            @arg SDMMC_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)

+  *            @arg SDMMC_FLAG_CTIMEOUT: Command response timeout

+  *            @arg SDMMC_FLAG_DTIMEOUT: Data timeout

+  *            @arg SDMMC_FLAG_TXUNDERR: Transmit FIFO underrun error

+  *            @arg SDMMC_FLAG_RXOVERR:  Received FIFO overrun error

+  *            @arg SDMMC_FLAG_CMDREND:  Command response received (CRC check passed)

+  *            @arg SDMMC_FLAG_CMDSENT:  Command sent (no response required)

+  *            @arg SDMMC_FLAG_DATAEND:  Data end (data counter, SDIDCOUNT, is zero)

+  *            @arg SDMMC_FLAG_DBCKEND:  Data block sent/received (CRC check passed)

+  *            @arg SDMMC_FLAG_CMDACT:   Command transfer in progress

+  *            @arg SDMMC_FLAG_TXACT:    Data transmit in progress

+  *            @arg SDMMC_FLAG_RXACT:    Data receive in progress

+  *            @arg SDMMC_FLAG_TXFIFOHE: Transmit FIFO Half Empty

+  *            @arg SDMMC_FLAG_RXFIFOHF: Receive FIFO Half Full

+  *            @arg SDMMC_FLAG_TXFIFOF:  Transmit FIFO full

+  *            @arg SDMMC_FLAG_RXFIFOF:  Receive FIFO full

+  *            @arg SDMMC_FLAG_TXFIFOE:  Transmit FIFO empty

+  *            @arg SDMMC_FLAG_RXFIFOE:  Receive FIFO empty

+  *            @arg SDMMC_FLAG_TXDAVL:   Data available in transmit FIFO

+  *            @arg SDMMC_FLAG_RXDAVL:   Data available in receive FIFO

+  *            @arg SDMMC_FLAG_SDIOIT:   SD I/O interrupt received

+  * @retval The new state of SD FLAG (SET or RESET).

+  */

+#define __HAL_SD_SDMMC_GET_FLAG(__HANDLE__, __FLAG__) __SDMMC_GET_FLAG((__HANDLE__)->Instance, (__FLAG__))

+

+/**

+  * @brief  Clear the SD's pending flags.

+  * @param  __HANDLE__: SD Handle  

+  * @param  __FLAG__: specifies the flag to clear.  

+  *          This parameter can be one or a combination of the following values:

+  *            @arg SDMMC_FLAG_CCRCFAIL: Command response received (CRC check failed)

+  *            @arg SDMMC_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)

+  *            @arg SDMMC_FLAG_CTIMEOUT: Command response timeout

+  *            @arg SDMMC_FLAG_DTIMEOUT: Data timeout

+  *            @arg SDMMC_FLAG_TXUNDERR: Transmit FIFO underrun error

+  *            @arg SDMMC_FLAG_RXOVERR:  Received FIFO overrun error

+  *            @arg SDMMC_FLAG_CMDREND:  Command response received (CRC check passed)

+  *            @arg SDMMC_FLAG_CMDSENT:  Command sent (no response required)

+  *            @arg SDMMC_FLAG_DATAEND:  Data end (data counter, SDIDCOUNT, is zero)

+  *            @arg SDMMC_FLAG_DBCKEND:  Data block sent/received (CRC check passed)

+  *            @arg SDMMC_FLAG_SDIOIT:   SD I/O interrupt received

+  * @retval None

+  */

+#define __HAL_SD_SDMMC_CLEAR_FLAG(__HANDLE__, __FLAG__) __SDMMC_CLEAR_FLAG((__HANDLE__)->Instance, (__FLAG__))

+

+/**

+  * @brief  Check whether the specified SD interrupt has occurred or not.

+  * @param  __HANDLE__: SD Handle   

+  * @param  __INTERRUPT__: specifies the SDMMC interrupt source to check. 

+  *          This parameter can be one of the following values:

+  *            @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt

+  *            @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt

+  *            @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt

+  *            @arg SDMMC_IT_RXOVERR:  Received FIFO overrun error interrupt

+  *            @arg SDMMC_IT_CMDREND:  Command response received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDSENT:  Command sent (no response required) interrupt

+  *            @arg SDMMC_IT_DATAEND:  Data end (data counter, SDIDCOUNT, is zero) interrupt

+  *            @arg SDMMC_IT_DBCKEND:  Data block sent/received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDACT:   Command transfer in progress interrupt

+  *            @arg SDMMC_IT_TXACT:    Data transmit in progress interrupt

+  *            @arg SDMMC_IT_RXACT:    Data receive in progress interrupt

+  *            @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt

+  *            @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt

+  *            @arg SDMMC_IT_TXFIFOF:  Transmit FIFO full interrupt

+  *            @arg SDMMC_IT_RXFIFOF:  Receive FIFO full interrupt

+  *            @arg SDMMC_IT_TXFIFOE:  Transmit FIFO empty interrupt

+  *            @arg SDMMC_IT_RXFIFOE:  Receive FIFO empty interrupt

+  *            @arg SDMMC_IT_TXDAVL:   Data available in transmit FIFO interrupt

+  *            @arg SDMMC_IT_RXDAVL:   Data available in receive FIFO interrupt

+  *            @arg SDMMC_IT_SDIOIT:   SD I/O interrupt received interrupt

+  * @retval The new state of SD IT (SET or RESET).

+  */

+#define __HAL_SD_SDMMC_GET_IT(__HANDLE__, __INTERRUPT__) __SDMMC_GET_IT((__HANDLE__)->Instance, (__INTERRUPT__))

+

+/**

+  * @brief  Clear the SD's interrupt pending bits.

+  * @param  __HANDLE__ : SD Handle

+  * @param  __INTERRUPT__: specifies the interrupt pending bit to clear. 

+  *          This parameter can be one or a combination of the following values:

+  *            @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt

+  *            @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt

+  *            @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt

+  *            @arg SDMMC_IT_RXOVERR:  Received FIFO overrun error interrupt

+  *            @arg SDMMC_IT_CMDREND:  Command response received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDSENT:  Command sent (no response required) interrupt

+  *            @arg SDMMC_IT_DATAEND:  Data end (data counter, SDMMC_DCOUNT, is zero) interrupt

+  *            @arg SDMMC_IT_SDIOIT:   SD I/O interrupt received interrupt

+  * @retval None

+  */

+#define __HAL_SD_SDMMC_CLEAR_IT(__HANDLE__, __INTERRUPT__) __SDMMC_CLEAR_IT((__HANDLE__)->Instance, (__INTERRUPT__))

+/**

+  * @}

+  */

+  

+/* Exported functions --------------------------------------------------------*/

+/** @defgroup SD_Exported_Functions SD Exported Functions

+  * @{

+  */

+  

+/** @defgroup SD_Exported_Functions_Group1 Initialization and de-initialization functions

+  * @{

+  */

+HAL_SD_ErrorTypedef HAL_SD_Init(SD_HandleTypeDef *hsd, HAL_SD_CardInfoTypedef *SDCardInfo);

+HAL_StatusTypeDef   HAL_SD_DeInit (SD_HandleTypeDef *hsd);

+void HAL_SD_MspInit(SD_HandleTypeDef *hsd);

+void HAL_SD_MspDeInit(SD_HandleTypeDef *hsd);

+/**

+  * @}

+  */

+  

+/** @defgroup SD_Exported_Functions_Group2 Input and Output operation functions

+  * @{

+  */

+/* Blocking mode: Polling */

+HAL_SD_ErrorTypedef HAL_SD_ReadBlocks(SD_HandleTypeDef *hsd, uint32_t *pReadBuffer, uint64_t ReadAddr, uint32_t BlockSize, uint32_t NumberOfBlocks);

+HAL_SD_ErrorTypedef HAL_SD_WriteBlocks(SD_HandleTypeDef *hsd, uint32_t *pWriteBuffer, uint64_t WriteAddr, uint32_t BlockSize, uint32_t NumberOfBlocks);

+HAL_SD_ErrorTypedef HAL_SD_Erase(SD_HandleTypeDef *hsd, uint64_t startaddr, uint64_t endaddr);

+

+/* Non-Blocking mode: Interrupt */

+void HAL_SD_IRQHandler(SD_HandleTypeDef *hsd);

+

+/* Callback in non blocking modes (DMA) */

+void HAL_SD_DMA_RxCpltCallback(DMA_HandleTypeDef *hdma);

+void HAL_SD_DMA_RxErrorCallback(DMA_HandleTypeDef *hdma);

+void HAL_SD_DMA_TxCpltCallback(DMA_HandleTypeDef *hdma);

+void HAL_SD_DMA_TxErrorCallback(DMA_HandleTypeDef *hdma);

+void HAL_SD_XferCpltCallback(SD_HandleTypeDef *hsd);

+void HAL_SD_XferErrorCallback(SD_HandleTypeDef *hsd);

+

+/* Non-Blocking mode: DMA */

+HAL_SD_ErrorTypedef HAL_SD_ReadBlocks_DMA(SD_HandleTypeDef *hsd, uint32_t *pReadBuffer, uint64_t ReadAddr, uint32_t BlockSize, uint32_t NumberOfBlocks);

+HAL_SD_ErrorTypedef HAL_SD_WriteBlocks_DMA(SD_HandleTypeDef *hsd, uint32_t *pWriteBuffer, uint64_t WriteAddr, uint32_t BlockSize, uint32_t NumberOfBlocks);

+HAL_SD_ErrorTypedef HAL_SD_CheckWriteOperation(SD_HandleTypeDef *hsd, uint32_t Timeout);

+HAL_SD_ErrorTypedef HAL_SD_CheckReadOperation(SD_HandleTypeDef *hsd, uint32_t Timeout);

+/**

+  * @}

+  */

+  

+/** @defgroup SD_Exported_Functions_Group3 Peripheral Control functions

+  * @{

+  */

+HAL_SD_ErrorTypedef HAL_SD_Get_CardInfo(SD_HandleTypeDef *hsd, HAL_SD_CardInfoTypedef *pCardInfo);

+HAL_SD_ErrorTypedef HAL_SD_WideBusOperation_Config(SD_HandleTypeDef *hsd, uint32_t WideMode);

+HAL_SD_ErrorTypedef HAL_SD_StopTransfer(SD_HandleTypeDef *hsd);

+HAL_SD_ErrorTypedef HAL_SD_HighSpeed (SD_HandleTypeDef *hsd);

+/**

+  * @}

+  */

+  

+/* Peripheral State functions  ************************************************/

+/** @defgroup SD_Exported_Functions_Group4 Peripheral State functions

+  * @{

+  */

+HAL_SD_ErrorTypedef HAL_SD_SendSDStatus(SD_HandleTypeDef *hsd, uint32_t *pSDstatus);

+HAL_SD_ErrorTypedef HAL_SD_GetCardStatus(SD_HandleTypeDef *hsd, HAL_SD_CardStatusTypedef *pCardStatus);

+HAL_SD_TransferStateTypedef HAL_SD_GetStatus(SD_HandleTypeDef *hsd);

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */

+    

+/* Private types -------------------------------------------------------------*/

+/** @defgroup SD_Private_Types SD Private Types

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private defines -----------------------------------------------------------*/

+/** @defgroup SD_Private_Defines SD Private Defines

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+          

+/* Private variables ---------------------------------------------------------*/

+/** @defgroup SD_Private_Variables SD Private Variables

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup SD_Private_Constants SD Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup SD_Private_Macros SD Private Macros

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private functions prototypes ----------------------------------------------*/

+/** @defgroup SD_Private_Functions_Prototypes SD Private Functions Prototypes

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup SD_Private_Functions SD Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+

+#endif /* __STM32F7xx_HAL_SD_H */ 

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sdram.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sdram.h
new file mode 100644
index 0000000..71d5423
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sdram.h
@@ -0,0 +1,199 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_sdram.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of SDRAM HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_SDRAM_H

+#define __STM32F7xx_HAL_SDRAM_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_ll_fmc.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup SDRAM

+  * @{

+  */ 

+

+/* Exported typedef ----------------------------------------------------------*/   

+

+/** @defgroup SDRAM_Exported_Types SDRAM Exported Types

+  * @{

+  */

+	 

+/** 

+  * @brief  HAL SDRAM State structure definition  

+  */ 

+typedef enum

+{

+  HAL_SDRAM_STATE_RESET             = 0x00,  /*!< SDRAM not yet initialized or disabled */

+  HAL_SDRAM_STATE_READY             = 0x01,  /*!< SDRAM initialized and ready for use   */

+  HAL_SDRAM_STATE_BUSY              = 0x02,  /*!< SDRAM internal process is ongoing     */

+  HAL_SDRAM_STATE_ERROR             = 0x03,  /*!< SDRAM error state                     */

+  HAL_SDRAM_STATE_WRITE_PROTECTED   = 0x04,  /*!< SDRAM device write protected          */

+  HAL_SDRAM_STATE_PRECHARGED        = 0x05   /*!< SDRAM device precharged               */

+  

+}HAL_SDRAM_StateTypeDef;

+

+/** 

+  * @brief  SDRAM handle Structure definition  

+  */ 

+typedef struct

+{

+  FMC_SDRAM_TypeDef             *Instance;  /*!< Register base address                 */

+  

+  FMC_SDRAM_InitTypeDef         Init;       /*!< SDRAM device configuration parameters */

+  

+  __IO HAL_SDRAM_StateTypeDef   State;      /*!< SDRAM access state                    */

+  

+  HAL_LockTypeDef               Lock;       /*!< SDRAM locking object                  */ 

+

+  DMA_HandleTypeDef             *hdma;      /*!< Pointer DMA handler                   */

+  

+}SDRAM_HandleTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/* Exported macro ------------------------------------------------------------*/

+

+/** @defgroup SDRAM_Exported_Macros SDRAM Exported Macros

+  * @{

+  */

+

+/** @brief Reset SDRAM handle state

+  * @param  __HANDLE__: specifies the SDRAM handle.

+  * @retval None

+  */

+#define __HAL_SDRAM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SDRAM_STATE_RESET)

+

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+

+/** @addtogroup SDRAM_Exported_Functions SDRAM Exported Functions

+  * @{

+  */

+

+/** @addtogroup SDRAM_Exported_Functions_Group1 

+  * @{

+  */

+

+/* Initialization/de-initialization functions *********************************/

+HAL_StatusTypeDef HAL_SDRAM_Init(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_TimingTypeDef *Timing);

+HAL_StatusTypeDef HAL_SDRAM_DeInit(SDRAM_HandleTypeDef *hsdram);

+void HAL_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram);

+void HAL_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram);

+

+void HAL_SDRAM_IRQHandler(SDRAM_HandleTypeDef *hsdram);

+void HAL_SDRAM_RefreshErrorCallback(SDRAM_HandleTypeDef *hsdram);

+void HAL_SDRAM_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma);

+void HAL_SDRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma);

+

+/**

+  * @}

+  */

+

+/** @addtogroup SDRAM_Exported_Functions_Group2 

+  * @{

+  */

+/* I/O operation functions ****************************************************/

+HAL_StatusTypeDef HAL_SDRAM_Read_8b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint8_t *pDstBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SDRAM_Write_8b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint8_t *pSrcBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SDRAM_Read_16b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint16_t *pDstBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SDRAM_Write_16b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint16_t *pSrcBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SDRAM_Read_32b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SDRAM_Write_32b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize);

+

+HAL_StatusTypeDef HAL_SDRAM_Read_DMA(SDRAM_HandleTypeDef *hsdram, uint32_t * pAddress, uint32_t *pDstBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SDRAM_Write_DMA(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize);

+

+/**

+  * @}

+  */

+  

+/** @addtogroup SDRAM_Exported_Functions_Group3 

+  * @{

+  */

+/* SDRAM Control functions  *****************************************************/

+HAL_StatusTypeDef HAL_SDRAM_WriteProtection_Enable(SDRAM_HandleTypeDef *hsdram);

+HAL_StatusTypeDef HAL_SDRAM_WriteProtection_Disable(SDRAM_HandleTypeDef *hsdram);

+HAL_StatusTypeDef HAL_SDRAM_SendCommand(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout);

+HAL_StatusTypeDef HAL_SDRAM_ProgramRefreshRate(SDRAM_HandleTypeDef *hsdram, uint32_t RefreshRate);

+HAL_StatusTypeDef HAL_SDRAM_SetAutoRefreshNumber(SDRAM_HandleTypeDef *hsdram, uint32_t AutoRefreshNumber);

+uint32_t          HAL_SDRAM_GetModeStatus(SDRAM_HandleTypeDef *hsdram);

+

+/**

+  * @}

+  */

+

+/** @addtogroup SDRAM_Exported_Functions_Group4 

+  * @{

+  */

+/* SDRAM State functions ********************************************************/

+HAL_SDRAM_StateTypeDef  HAL_SDRAM_GetState(SDRAM_HandleTypeDef *hsdram);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_SDRAM_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_smartcard.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_smartcard.h
new file mode 100644
index 0000000..1dd193a
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_smartcard.h
@@ -0,0 +1,831 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_smartcard.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of SMARTCARD HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_SMARTCARD_H

+#define __STM32F7xx_HAL_SMARTCARD_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup SMARTCARD

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup SMARTCARD_Exported_Types SMARTCARD Exported Types

+  * @{

+  */

+

+/** 

+  * @brief SMARTCARD Init Structure definition

+  */

+typedef struct

+{

+  uint32_t BaudRate;                  /*!< Configures the SmartCard communication baud rate.

+                                           The baud rate register is computed using the following formula:

+                                              Baud Rate Register = ((PCLKx) / ((hsc->Init.BaudRate))) */

+                                           

+  uint32_t WordLength;                /*!< Specifies the number of data bits transmitted or received in a frame.

+                                           This parameter @ref SMARTCARD_Word_Length can only be set to 9 (8 data + 1 parity bits). */

+

+  uint32_t StopBits;                  /*!< Specifies the number of stop bits @ref SMARTCARD_Stop_Bits. 

+                                           Only 1.5 stop bits are authorized in SmartCard mode. */

+

+  uint32_t Parity;                    /*!< Specifies the parity mode.

+                                           This parameter can be a value of @ref SMARTCARD_Parity

+                                           @note The parity is enabled by default (PCE is forced to 1).

+                                                 Since the WordLength is forced to 8 bits + parity, M is

+                                                 forced to 1 and the parity bit is the 9th bit. */

+ 

+  uint32_t Mode;                      /*!< Specifies whether the Receive or Transmit mode is enabled or disabled.

+                                           This parameter can be a value of @ref SMARTCARD_Mode */

+

+  uint32_t CLKPolarity;               /*!< Specifies the steady state of the serial clock.

+                                           This parameter can be a value of @ref SMARTCARD_Clock_Polarity */

+

+  uint32_t CLKPhase;                  /*!< Specifies the clock transition on which the bit capture is made.

+                                           This parameter can be a value of @ref SMARTCARD_Clock_Phase */

+

+  uint32_t CLKLastBit;                /*!< Specifies whether the clock pulse corresponding to the last transmitted

+                                           data bit (MSB) has to be output on the SCLK pin in synchronous mode.

+                                           This parameter can be a value of @ref SMARTCARD_Last_Bit */

+                                             

+  uint32_t OneBitSampling;            /*!< Specifies  whether a single sample or three samples' majority vote is selected.

+                                           Selecting the single sample method increases the receiver tolerance to clock

+                                           deviations. This parameter can be a value of @ref SMARTCARD_OneBit_Sampling */

+

+  uint32_t  Prescaler;                 /*!< Specifies the SmartCard Prescaler */

+  

+  uint32_t  GuardTime;                 /*!< Specifies the SmartCard Guard Time */

+  

+  uint32_t NACKState;                  /*!< Specifies whether the SmartCard NACK transmission is enabled

+                                            in case of parity error.

+                                            This parameter can be a value of @ref SmartCard_NACK_State */ 

+                                           

+  uint32_t TimeOutEnable;              /*!< Specifies whether the receiver timeout is enabled. 

+                                            This parameter can be a value of @ref SMARTCARD_Timeout_Enable*/

+  

+  uint32_t TimeOutValue;               /*!< Specifies the receiver time out value in number of baud blocks: 

+                                            it is used to implement the Character Wait Time (CWT) and 

+                                            Block Wait Time (BWT). It is coded over 24 bits. */ 

+                                           

+  uint32_t BlockLength;                /*!< Specifies the SmartCard Block Length in T=1 Reception mode.

+                                            This parameter can be any value from 0x0 to 0xFF */ 

+                                           

+  uint32_t AutoRetryCount;              /*!< Specifies the SmartCard auto-retry count (number of retries in

+                                             receive and transmit mode). When set to 0, retransmission is 

+                                             disabled. Otherwise, its maximum value is 7 (before signalling

+                                             an error) */  

+

+}SMARTCARD_InitTypeDef;

+

+/** 

+  * @brief  SMARTCARD advanced features initalization structure definition  

+  */

+typedef struct

+{

+  uint32_t AdvFeatureInit;            /*!< Specifies which advanced SMARTCARD features is initialized. Several

+                                           advanced features may be initialized at the same time. This parameter 

+                                           can be a value of @ref SMARTCARD_Advanced_Features_Initialization_Type */

+

+  uint32_t TxPinLevelInvert;          /*!< Specifies whether the TX pin active level is inverted.

+                                           This parameter can be a value of @ref SMARTCARD_Tx_Inv  */

+

+  uint32_t RxPinLevelInvert;          /*!< Specifies whether the RX pin active level is inverted.

+                                           This parameter can be a value of @ref SMARTCARD_Rx_Inv  */

+

+  uint32_t DataInvert;                /*!< Specifies whether data are inverted (positive/direct logic

+                                           vs negative/inverted logic).

+                                           This parameter can be a value of @ref SMARTCARD_Data_Inv */

+

+  uint32_t Swap;                      /*!< Specifies whether TX and RX pins are swapped.   

+                                           This parameter can be a value of @ref SMARTCARD_Rx_Tx_Swap */

+

+  uint32_t OverrunDisable;            /*!< Specifies whether the reception overrun detection is disabled.   

+                                           This parameter can be a value of @ref SMARTCARD_Overrun_Disable */

+

+  uint32_t DMADisableonRxError;       /*!< Specifies whether the DMA is disabled in case of reception error.     

+                                           This parameter can be a value of @ref SMARTCARD_DMA_Disable_on_Rx_Error */

+

+  uint32_t MSBFirst;                  /*!< Specifies whether MSB is sent first on UART line.      

+                                           This parameter can be a value of @ref SMARTCARD_MSB_First */

+}SMARTCARD_AdvFeatureInitTypeDef;

+

+/** 

+  * @brief HAL State structures definition  

+  */ 

+typedef enum

+{

+  HAL_SMARTCARD_STATE_RESET             = 0x00,    /*!< Peripheral is not yet Initialized */

+  HAL_SMARTCARD_STATE_READY             = 0x01,    /*!< Peripheral Initialized and ready for use */

+  HAL_SMARTCARD_STATE_BUSY              = 0x02,    /*!< an internal process is ongoing */

+  HAL_SMARTCARD_STATE_BUSY_TX           = 0x12,    /*!< Data Transmission process is ongoing */

+  HAL_SMARTCARD_STATE_BUSY_RX           = 0x22,    /*!< Data Reception process is ongoing */

+  HAL_SMARTCARD_STATE_BUSY_TX_RX        = 0x32,    /*!< Data Transmission and Reception process is ongoing */ 

+  HAL_SMARTCARD_STATE_TIMEOUT           = 0x03,    /*!< Timeout state */

+  HAL_SMARTCARD_STATE_ERROR             = 0x04     /*!< Error */

+}HAL_SMARTCARD_StateTypeDef;

+

+

+/**

+  * @brief  SMARTCARD clock sources definition

+  */

+typedef enum

+{

+  SMARTCARD_CLOCKSOURCE_PCLK1      = 0x00,    /*!< PCLK1 clock source  */

+  SMARTCARD_CLOCKSOURCE_PCLK2      = 0x01,    /*!< PCLK2 clock source  */

+  SMARTCARD_CLOCKSOURCE_HSI        = 0x02,    /*!< HSI clock source    */

+  SMARTCARD_CLOCKSOURCE_SYSCLK     = 0x04,    /*!< SYSCLK clock source */

+  SMARTCARD_CLOCKSOURCE_LSE        = 0x08     /*!< LSE clock source    */

+}SMARTCARD_ClockSourceTypeDef;

+

+/** 

+  * @brief  SMARTCARD handle Structure definition

+  */

+typedef struct

+{

+  USART_TypeDef                       *Instance;        /* USART registers base address                          */

+

+  SMARTCARD_InitTypeDef               Init;             /* SmartCard communication parameters                    */

+

+  SMARTCARD_AdvFeatureInitTypeDef     AdvancedInit;     /* SmartCard advanced features initialization parameters */

+

+  uint8_t                             *pTxBuffPtr;      /* Pointer to SmartCard Tx transfer Buffer            */

+

+  uint16_t                            TxXferSize;       /* SmartCard Tx Transfer size                         */

+

+  uint16_t                            TxXferCount;      /* SmartCard Tx Transfer Counter                      */

+

+  uint8_t                             *pRxBuffPtr;      /* Pointer to SmartCard Rx transfer Buffer        */

+

+  uint16_t                            RxXferSize;       /* SmartCard Rx Transfer size                     */

+

+  uint16_t                            RxXferCount;      /* SmartCard Rx Transfer Counter                  */

+

+  DMA_HandleTypeDef                   *hdmatx;          /* SmartCard Tx DMA Handle parameters             */

+

+  DMA_HandleTypeDef                   *hdmarx;          /* SmartCard Rx DMA Handle parameters             */

+

+  HAL_LockTypeDef                     Lock;             /* Locking object                                 */

+

+  __IO HAL_SMARTCARD_StateTypeDef     State;            /* SmartCard communication state                  */

+

+  __IO uint32_t                       ErrorCode;        /* SmartCard Error code                           */

+

+}SMARTCARD_HandleTypeDef;

+

+/**

+  * @}

+  */

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup SMARTCARD_Exported_Constants  SMARTCARD Exported constants

+  * @{

+  */

+/** @defgroup SMARTCARD_Error_Code SMARTCARD Error Code

+  * @brief    SMARTCARD Error Code 

+  * @{

+  */ 

+#define HAL_SMARTCARD_ERROR_NONE      ((uint32_t)0x00)    /*!< No error                */

+#define HAL_SMARTCARD_ERROR_PE        ((uint32_t)0x01)    /*!< Parity error            */

+#define HAL_SMARTCARD_ERROR_NE        ((uint32_t)0x02)    /*!< Noise error             */

+#define HAL_SMARTCARD_ERROR_FE        ((uint32_t)0x04)    /*!< frame error             */

+#define HAL_SMARTCARD_ERROR_ORE       ((uint32_t)0x08)    /*!< Overrun error           */

+#define HAL_SMARTCARD_ERROR_DMA       ((uint32_t)0x10)    /*!< DMA transfer error      */

+#define HAL_SMARTCARD_ERROR_RTO       ((uint32_t)0x20)    /*!< Receiver TimeOut error  */

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Word_Length SMARTCARD Word Length

+  * @{

+  */

+#define SMARTCARD_WORDLENGTH_9B                  ((uint32_t)USART_CR1_M_0)

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Stop_Bits SMARTCARD Number of Stop Bits

+  * @{

+  */

+#define SMARTCARD_STOPBITS_1_5                   ((uint32_t)(USART_CR2_STOP))

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Parity SMARTCARD Parity

+  * @{

+  */

+#define SMARTCARD_PARITY_EVEN                    ((uint32_t)USART_CR1_PCE)

+#define SMARTCARD_PARITY_ODD                     ((uint32_t)(USART_CR1_PCE | USART_CR1_PS)) 

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Mode SMARTCARD Mode

+  * @{

+  */

+#define SMARTCARD_MODE_RX                        ((uint32_t)USART_CR1_RE)

+#define SMARTCARD_MODE_TX                        ((uint32_t)USART_CR1_TE)

+#define SMARTCARD_MODE_TX_RX                     ((uint32_t)(USART_CR1_TE |USART_CR1_RE))

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Clock_Polarity SMARTCARD Clock Polarity

+  * @{

+  */

+#define SMARTCARD_POLARITY_LOW                   ((uint32_t)0x0000)

+#define SMARTCARD_POLARITY_HIGH                  ((uint32_t)USART_CR2_CPOL)

+/**

+  * @}

+  */ 

+

+/** @defgroup SMARTCARD_Clock_Phase  SMARTCARD Clock Phase

+  * @{

+  */

+#define SMARTCARD_PHASE_1EDGE                    ((uint32_t)0x0000)

+#define SMARTCARD_PHASE_2EDGE                    ((uint32_t)USART_CR2_CPHA)

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Last_Bit  SMARTCARD Last Bit

+  * @{

+  */

+#define SMARTCARD_LASTBIT_DISABLE                ((uint32_t)0x0000)

+#define SMARTCARD_LASTBIT_ENABLE                 ((uint32_t)USART_CR2_LBCL)

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_OneBit_Sampling SMARTCARD OneBit Sampling

+  * @{

+  */

+#define SMARTCARD_ONE_BIT_SAMPLE_DISABLE   ((uint32_t)0x0000)

+#define SMARTCARD_ONE_BIT_SAMPLE_ENABLE    ((uint32_t)USART_CR3_ONEBIT)

+/**

+  * @}

+  */  

+

+

+/** @defgroup SmartCard_NACK_State  SMARTCARD NACK State

+  * @{

+  */

+#define SMARTCARD_NACK_ENABLE           ((uint32_t)USART_CR3_NACK)

+#define SMARTCARD_NACK_DISABLE          ((uint32_t)0x0000)

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Timeout_Enable SMARTCARD Timeout Enable

+  * @{

+  */

+#define SMARTCARD_TIMEOUT_DISABLE      ((uint32_t)0x00000000)

+#define SMARTCARD_TIMEOUT_ENABLE       ((uint32_t)USART_CR2_RTOEN)

+/**

+  * @}

+  */

+  

+/** @defgroup SmartCard_DMA_Requests   SMARTCARD DMA requests

+  * @{

+  */

+

+#define SMARTCARD_DMAREQ_TX                    ((uint32_t)USART_CR3_DMAT)

+#define SMARTCARD_DMAREQ_RX                    ((uint32_t)USART_CR3_DMAR)

+

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Advanced_Features_Initialization_Type SMARTCARD Advanced Features Initialization Type

+  * @{

+  */

+#define SMARTCARD_ADVFEATURE_NO_INIT                 ((uint32_t)0x00000000)

+#define SMARTCARD_ADVFEATURE_TXINVERT_INIT           ((uint32_t)0x00000001)

+#define SMARTCARD_ADVFEATURE_RXINVERT_INIT           ((uint32_t)0x00000002)

+#define SMARTCARD_ADVFEATURE_DATAINVERT_INIT         ((uint32_t)0x00000004)

+#define SMARTCARD_ADVFEATURE_SWAP_INIT               ((uint32_t)0x00000008)

+#define SMARTCARD_ADVFEATURE_RXOVERRUNDISABLE_INIT   ((uint32_t)0x00000010)

+#define SMARTCARD_ADVFEATURE_DMADISABLEONERROR_INIT  ((uint32_t)0x00000020)

+#define SMARTCARD_ADVFEATURE_MSBFIRST_INIT           ((uint32_t)0x00000080)

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Tx_Inv SMARTCARD Tx Inv

+  * @{

+  */

+#define SMARTCARD_ADVFEATURE_TXINV_DISABLE   ((uint32_t)0x00000000)

+#define SMARTCARD_ADVFEATURE_TXINV_ENABLE    ((uint32_t)USART_CR2_TXINV)

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Rx_Inv SMARTCARD Rx Inv

+  * @{

+  */

+#define SMARTCARD_ADVFEATURE_RXINV_DISABLE   ((uint32_t)0x00000000)

+#define SMARTCARD_ADVFEATURE_RXINV_ENABLE    ((uint32_t)USART_CR2_RXINV)

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Data_Inv SMARTCARD Data Inv

+  * @{

+  */

+#define SMARTCARD_ADVFEATURE_DATAINV_DISABLE     ((uint32_t)0x00000000)

+#define SMARTCARD_ADVFEATURE_DATAINV_ENABLE      ((uint32_t)USART_CR2_DATAINV)

+/**

+  * @}

+  */ 

+  

+/** @defgroup SMARTCARD_Rx_Tx_Swap SMARTCARD Rx Tx Swap

+  * @{

+  */

+#define SMARTCARD_ADVFEATURE_SWAP_DISABLE   ((uint32_t)0x00000000)

+#define SMARTCARD_ADVFEATURE_SWAP_ENABLE    ((uint32_t)USART_CR2_SWAP)

+/**

+  * @}

+  */ 

+

+/** @defgroup SMARTCARD_Overrun_Disable SMARTCARD Overrun Disable

+  * @{

+  */

+#define SMARTCARD_ADVFEATURE_OVERRUN_ENABLE   ((uint32_t)0x00000000)

+#define SMARTCARD_ADVFEATURE_OVERRUN_DISABLE  ((uint32_t)USART_CR3_OVRDIS)

+/**

+  * @}

+  */  

+

+/** @defgroup SMARTCARD_DMA_Disable_on_Rx_Error SMARTCARD DMA Disable on Rx Error

+  * @{

+  */

+#define SMARTCARD_ADVFEATURE_DMA_ENABLEONRXERROR       ((uint32_t)0x00000000)

+#define SMARTCARD_ADVFEATURE_DMA_DISABLEONRXERROR      ((uint32_t)USART_CR3_DDRE)

+/**

+  * @}

+  */  

+

+/** @defgroup SMARTCARD_MSB_First SMARTCARD MSB First

+  * @{

+  */

+#define SMARTCARD_ADVFEATURE_MSBFIRST_DISABLE      ((uint32_t)0x00000000)

+#define SMARTCARD_ADVFEATURE_MSBFIRST_ENABLE       ((uint32_t)USART_CR2_MSBFIRST)

+/**

+  * @}

+  */  

+

+/** @defgroup SmartCard_Flags SMARTCARD Flags

+  *        Elements values convention: 0xXXXX

+  *           - 0xXXXX  : Flag mask in the ISR register

+  * @{

+  */

+#define SMARTCARD_FLAG_REACK                     ((uint32_t)0x00400000)

+#define SMARTCARD_FLAG_TEACK                     ((uint32_t)0x00200000)

+#define SMARTCARD_FLAG_BUSY                      ((uint32_t)0x00010000)

+#define SMARTCARD_FLAG_EOBF                      ((uint32_t)0x00001000)

+#define SMARTCARD_FLAG_RTOF                      ((uint32_t)0x00000800)

+#define SMARTCARD_FLAG_TXE                       ((uint32_t)0x00000080)

+#define SMARTCARD_FLAG_TC                        ((uint32_t)0x00000040)

+#define SMARTCARD_FLAG_RXNE                      ((uint32_t)0x00000020)

+#define SMARTCARD_FLAG_ORE                       ((uint32_t)0x00000008)

+#define SMARTCARD_FLAG_NE                        ((uint32_t)0x00000004)

+#define SMARTCARD_FLAG_FE                        ((uint32_t)0x00000002)

+#define SMARTCARD_FLAG_PE                        ((uint32_t)0x00000001)

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Interrupt_definition SMARTCARD Interrupt definition

+  *        Elements values convention: 0000ZZZZ0XXYYYYYb

+  *           - YYYYY  : Interrupt source position in the XX register (5bits)

+  *           - XX  : Interrupt source register (2bits)

+  *                 - 01: CR1 register

+  *                 - 10: CR2 register

+  *                 - 11: CR3 register

+  *           - ZZZZ  : Flag position in the ISR register(4bits)

+  * @{

+  */

+  

+#define SMARTCARD_IT_PE                          ((uint16_t)0x0028)

+#define SMARTCARD_IT_TXE                         ((uint16_t)0x0727)

+#define SMARTCARD_IT_TC                          ((uint16_t)0x0626)

+#define SMARTCARD_IT_RXNE                        ((uint16_t)0x0525)

+

+#define SMARTCARD_IT_ERR                         ((uint16_t)0x0060)

+#define SMARTCARD_IT_ORE                         ((uint16_t)0x0300)

+#define SMARTCARD_IT_NE                          ((uint16_t)0x0200)

+#define SMARTCARD_IT_FE                          ((uint16_t)0x0100)

+

+#define SMARTCARD_IT_EOB                         ((uint16_t)0x0C3B)

+#define SMARTCARD_IT_RTO                         ((uint16_t)0x0B3A)

+/**

+  * @}

+  */ 

+

+

+/** @defgroup SMARTCARD_IT_CLEAR_Flags SMARTCARD IT CLEAR Flags

+  * @{

+  */

+#define SMARTCARD_CLEAR_PEF                       USART_ICR_PECF            /*!< Parity Error Clear Flag */          

+#define SMARTCARD_CLEAR_FEF                       USART_ICR_FECF            /*!< Framing Error Clear Flag */         

+#define SMARTCARD_CLEAR_NEF                       USART_ICR_NCF             /*!< Noise detected Clear Flag */        

+#define SMARTCARD_CLEAR_OREF                      USART_ICR_ORECF           /*!< OverRun Error Clear Flag */         

+#define SMARTCARD_CLEAR_TCF                       USART_ICR_TCCF            /*!< Transmission Complete Clear Flag */ 

+#define SMARTCARD_CLEAR_RTOF                      USART_ICR_RTOCF           /*!< Receiver Time Out Clear Flag */     

+#define SMARTCARD_CLEAR_EOBF                      USART_ICR_EOBCF           /*!< End Of Block Clear Flag */          

+/**

+  * @}

+  */

+

+/** @defgroup SMARTCARD_Request_Parameters SMARTCARD Request Parameters

+  * @{

+  */        

+#define SMARTCARD_RXDATA_FLUSH_REQUEST        ((uint32_t)USART_RQR_RXFRQ)        /*!< Receive Data flush Request */ 

+#define SMARTCARD_TXDATA_FLUSH_REQUEST        ((uint32_t)USART_RQR_TXFRQ)        /*!< Transmit data flush Request */

+/**

+  * @}

+  */

+  

+  

+/** @defgroup SMARTCARD_CR3_SCAR_CNT_LSB_POS SMARTCARD CR3 SCAR CNT LSB POS

+  * @{

+  */

+#define SMARTCARD_CR3_SCARCNT_LSB_POS            ((uint32_t) 17)

+/**

+  * @}

+  */

+  

+/** @defgroup SMARTCARD_GTPR_GT_LSBPOS SMARTCARD GTPR GT LSBPOS

+  * @{

+  */

+#define SMARTCARD_GTPR_GT_LSB_POS            ((uint32_t) 8)

+/**

+  * @}

+  */ 

+  

+/** @defgroup SMARTCARD_RTOR_BLEN_LSBPOS SMARTCARD RTOR BLEN LSBPOS

+  * @{

+  */

+#define SMARTCARD_RTOR_BLEN_LSB_POS          ((uint32_t) 24)

+/**

+  * @}

+  */    

+ 

+/** @defgroup SMARTCARD_Interruption_Mask SMARTCARD Interruption Mask

+  * @{

+  */ 

+#define SMARTCARD_IT_MASK  ((uint16_t)0x001F)  

+/**

+  * @}

+  */

+    

+/**

+  * @}

+  */    

+    

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup SMARTCARD_Exported_Macros SMARTCARD Exported Macros

+  * @{

+  */

+

+/** @brief Reset SMARTCARD handle state

+  * @param  __HANDLE__: specifies the SMARTCARD Handle.

+  *         The Handle Instance which can be USART1 or USART2

+  * @retval None

+  */

+#define __HAL_SMARTCARD_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SMARTCARD_STATE_RESET)

+

+/** @brief  Flush the Smartcard DR register 

+  * @param  __HANDLE__: specifies the SMARTCARD Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @retval None

+  */

+#define __HAL_SMARTCARD_FLUSH_DRREGISTER(__HANDLE__) (__HAL_SMARTCARD_SEND_REQ((__HANDLE__), SMARTCARD_RXDATA_FLUSH_REQUEST))

+

+/** @brief  Checks whether the specified Smartcard flag is set or not.

+  * @param  __HANDLE__: specifies the SMARTCARD Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @param  __FLAG__: specifies the flag to check.

+  *        This parameter can be one of the following values:

+  *            @arg SMARTCARD_FLAG_REACK: Receive enable acknowledge flag

+  *            @arg SMARTCARD_FLAG_TEACK: Transmit enable acknowledge flag

+  *            @arg SMARTCARD_FLAG_BUSY:  Busy flag

+  *            @arg SMARTCARD_FLAG_EOBF:  End of block flag   

+  *            @arg SMARTCARD_FLAG_RTOF:  Receiver timeout flag

+  *            @arg SMARTCARD_FLAG_TXE:   Transmit data register empty flag

+  *            @arg SMARTCARD_FLAG_TC:    Transmission Complete flag

+  *            @arg SMARTCARD_FLAG_RXNE:  Receive data register not empty flag

+  *            @arg SMARTCARD_FLAG_ORE:   OverRun Error flag

+  *            @arg SMARTCARD_FLAG_NE:    Noise Error flag

+  *            @arg SMARTCARD_FLAG_FE:    Framing Error flag

+  *            @arg SMARTCARD_FLAG_PE:    Parity Error flag

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define __HAL_SMARTCARD_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))

+

+/** @brief  Enables the specified SmartCard interrupt.

+  * @param  __HANDLE__: specifies the SMARTCARD Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @param  __INTERRUPT__: specifies the SMARTCARD interrupt to enable.

+  *          This parameter can be one of the following values:

+  *            @arg SMARTCARD_IT_EOBF: End Of Block interrupt

+  *            @arg SMARTCARD_IT_RTOF: Receive TimeOut interrupt

+  *            @arg SMARTCARD_IT_TXE:  Transmit Data Register empty interrupt

+  *            @arg SMARTCARD_IT_TC:   Transmission complete interrupt

+  *            @arg SMARTCARD_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg SMARTCARD_IT_PE:   Parity Error interrupt

+  *            @arg SMARTCARD_IT_ERR:  Error interrupt(Frame error, noise error, overrun error)

+  * @retval None

+  */

+#define __HAL_SMARTCARD_ENABLE_IT(__HANDLE__, __INTERRUPT__)   (((((uint8_t)(__INTERRUPT__)) >> 5) == 1)? ((__HANDLE__)->Instance->CR1 |= (1 << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \

+                                                        ((((uint8_t)(__INTERRUPT__)) >> 5) == 2)? ((__HANDLE__)->Instance->CR2 |= (1 << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \

+                                                        ((__HANDLE__)->Instance->CR3 |= (1 << ((__INTERRUPT__) & SMARTCARD_IT_MASK))))

+/** @brief  Disables the specified SmartCard interrupt.

+  * @param  __HANDLE__: specifies the SMARTCARD Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @param  __INTERRUPT__: specifies the SMARTCARD interrupt to enable.

+  *          This parameter can be one of the following values:

+  *            @arg SMARTCARD_IT_EOBF: End Of Block interrupt

+  *            @arg SMARTCARD_IT_RTOF: Receive TimeOut interrupt

+  *            @arg SMARTCARD_IT_TXE:  Transmit Data Register empty interrupt

+  *            @arg SMARTCARD_IT_TC:   Transmission complete interrupt

+  *            @arg SMARTCARD_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg SMARTCARD_IT_PE:   Parity Error interrupt

+  *            @arg SMARTCARD_IT_ERR:  Error interrupt(Frame error, noise error, overrun error)

+  * @retval None

+  */

+#define __HAL_SMARTCARD_DISABLE_IT(__HANDLE__, __INTERRUPT__)  (((((uint8_t)(__INTERRUPT__)) >> 5) == 1)? ((__HANDLE__)->Instance->CR1 &= ~ ((uint32_t)1 << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \

+                                                        ((((uint8_t)(__INTERRUPT__)) >> 5) == 2)? ((__HANDLE__)->Instance->CR2 &= ~ ((uint32_t)1 << ((__INTERRUPT__) & SMARTCARD_IT_MASK))): \

+                                                        ((__HANDLE__)->Instance->CR3 &= ~ ((uint32_t)1 << ((__INTERRUPT__) & SMARTCARD_IT_MASK))))

+

+/** @brief  Checks whether the specified SmartCard interrupt has occurred or not.

+  * @param  __HANDLE__: specifies the SMARTCARD Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @param  __IT__: specifies the SMARTCARD interrupt to check.

+  *          This parameter can be one of the following values:

+  *            @arg SMARTCARD_IT_EOBF: End Of Block interrupt

+  *            @arg SMARTCARD_IT_RTOF: Receive TimeOut interrupt  

+  *            @arg SMARTCARD_IT_TXE:  Transmit Data Register empty interrupt

+  *            @arg SMARTCARD_IT_TC:   Transmission complete interrupt

+  *            @arg SMARTCARD_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg SMARTCARD_IT_ORE:  OverRun Error interrupt

+  *            @arg SMARTCARD_IT_NE:   Noise Error interrupt

+  *            @arg SMARTCARD_IT_FE:   Framing Error interrupt

+  *            @arg SMARTCARD_IT_PE:   Parity Error interrupt

+  * @retval The new state of __IT__ (TRUE or FALSE).

+  */

+#define __HAL_SMARTCARD_GET_IT(__HANDLE__, __IT__) ((__HANDLE__)->Instance->ISR & ((uint32_t)1 << ((__IT__)>> 0x08))) 

+

+/** @brief  Checks whether the specified SmartCard interrupt interrupt source is enabled.

+  * @param  __HANDLE__: specifies the SMARTCARD Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @param  __IT__: specifies the SMARTCARD interrupt source to check.

+  *          This parameter can be one of the following values:

+  *            @arg SMARTCARD_IT_EOBF: End Of Block interrupt

+  *            @arg SMARTCARD_IT_RTOF: Receive TimeOut interrupt  

+  *            @arg SMARTCARD_IT_TXE:  Transmit Data Register empty interrupt

+  *            @arg SMARTCARD_IT_TC:   Transmission complete interrupt

+  *            @arg SMARTCARD_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg SMARTCARD_IT_ORE:  OverRun Error interrupt

+  *            @arg SMARTCARD_IT_NE:   Noise Error interrupt

+  *            @arg SMARTCARD_IT_FE:   Framing Error interrupt

+  *            @arg 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__)) >> 5) == 1)? (__HANDLE__)->Instance->CR1:(((((uint8_t)(__IT__)) >> 5) == 2)? \

+                                                               (__HANDLE__)->Instance->CR2 : (__HANDLE__)->Instance->CR3)) & ((uint32_t)1 << \

+                                                               (((uint16_t)(__IT__)) & SMARTCARD_IT_MASK)))

+

+

+/** @brief  Clears the specified SMARTCARD ISR flag, in setting the proper ICR register flag.

+  * @param  __HANDLE__: specifies the SMARTCARD Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @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 USART_CLEAR_PEF: Parity Error Clear Flag

+  *            @arg USART_CLEAR_FEF: Framing Error Clear Flag

+  *            @arg USART_CLEAR_NEF: Noise detected Clear Flag

+  *            @arg USART_CLEAR_OREF: OverRun Error Clear Flag

+  *            @arg USART_CLEAR_TCF: Transmission Complete Clear Flag

+  *            @arg USART_CLEAR_RTOF: Receiver Time Out Clear Flag

+  *            @arg USART_CLEAR_EOBF: End Of Block Clear Flag 

+  * @retval None

+  */

+#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.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @param  __REQ__: specifies the request flag to set

+  *          This parameter can be one of the following values:  

+  *            @arg SMARTCARD_RXDATA_FLUSH_REQUEST: Receive Data flush Request 

+  *            @arg SMARTCARD_TXDATA_FLUSH_REQUEST: Transmit data flush Request 

+  *

+  * @retval None

+  */ 

+#define __HAL_SMARTCARD_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (uint32_t)(__REQ__)) 

+

+/** @brief  Enable the USART associated to the SMARTCARD Handle

+  * @param  __HANDLE__: specifies the SMARTCARD Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @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.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @retval None

+  */

+#define __HAL_SMARTCARD_DISABLE(__HANDLE__)              ( (__HANDLE__)->Instance->CR1 &=  ~USART_CR1_UE)

+

+/** @brief  Macros to enable or disable the SmartCard DMA request.

+  * @param  __HANDLE__: specifies the SMARTCARD Handle.

+  *         The Handle Instance which can be USART1 or USART2.

+  * @param  __REQUEST__: specifies the SmartCard DMA request.

+  *          This parameter can be one of the following values:

+  *            @arg SMARTCARD_DMAREQ_TX: SmartCard DMA transmit request

+  *            @arg SMARTCARD_DMAREQ_RX: SmartCard DMA receive request

+  */

+#define __HAL_SMARTCARD_DMA_REQUEST_ENABLE(__HANDLE__, __REQUEST__)    ((__HANDLE__)->Instance->CR3 |=  (__REQUEST__))

+#define __HAL_SMARTCARD_DMA_REQUEST_DISABLE(__HANDLE__, __REQUEST__)   ((__HANDLE__)->Instance->CR3 &=  ~(__REQUEST__))

+/**

+  * @}

+  */

+

+/* Include SMARTCARD HAL Extension module */

+#include "stm32f7xx_hal_smartcard_ex.h"

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup SMARTCARD_Exported_Functions

+  * @{

+  */

+  

+/** @addtogroup SMARTCARD_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization/de-initialization functions  **********************************/

+HAL_StatusTypeDef HAL_SMARTCARD_Init(SMARTCARD_HandleTypeDef *hsc);

+HAL_StatusTypeDef HAL_SMARTCARD_DeInit(SMARTCARD_HandleTypeDef *hsc);

+void HAL_SMARTCARD_MspInit(SMARTCARD_HandleTypeDef *hsc);

+void HAL_SMARTCARD_MspDeInit(SMARTCARD_HandleTypeDef *hsc);

+/**

+  * @}

+  */

+

+/** @addtogroup SMARTCARD_Exported_Functions_Group2

+  * @{

+  */

+/* IO operation functions *******************************************************/

+HAL_StatusTypeDef HAL_SMARTCARD_Transmit(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_SMARTCARD_Receive(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_SMARTCARD_Transmit_IT(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_SMARTCARD_Receive_IT(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_SMARTCARD_Transmit_DMA(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_SMARTCARD_Receive_DMA(SMARTCARD_HandleTypeDef *hsc, uint8_t *pData, uint16_t Size);

+void HAL_SMARTCARD_IRQHandler(SMARTCARD_HandleTypeDef *hsc);

+void HAL_SMARTCARD_TxCpltCallback(SMARTCARD_HandleTypeDef *hsc);

+void HAL_SMARTCARD_RxCpltCallback(SMARTCARD_HandleTypeDef *hsc);

+void HAL_SMARTCARD_ErrorCallback(SMARTCARD_HandleTypeDef *hsc);

+/**

+  * @}

+  */

+

+/** @addtogroup SMARTCARD_Exported_Functions_Group3

+  * @{

+  */

+/* Peripheral State functions  **************************************************/

+HAL_SMARTCARD_StateTypeDef HAL_SMARTCARD_GetState(SMARTCARD_HandleTypeDef *hsc);

+uint32_t HAL_SMARTCARD_GetError(SMARTCARD_HandleTypeDef *hsc);

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup SMARTCARD_Private_Constants SMARTCARD Private Constants

+  * @{

+  */

+

+#define IS_SMARTCARD_WORD_LENGTH(__LENGTH__) ((__LENGTH__) == SMARTCARD_WORDLENGTH_9B) 

+#define IS_SMARTCARD_STOPBITS(__STOPBITS__) ((__STOPBITS__) == SMARTCARD_STOPBITS_1_5)

+#define IS_SMARTCARD_PARITY(__PARITY__) (((__PARITY__) == SMARTCARD_PARITY_EVEN) || \

+                                         ((__PARITY__) == SMARTCARD_PARITY_ODD))

+#define IS_SMARTCARD_MODE(__MODE__) ((((__MODE__) & (uint32_t)0xFFF3) == 0x00) && ((__MODE__) != (uint32_t)0x00))

+#define IS_SMARTCARD_POLARITY(__CPOL__) (((__CPOL__) == SMARTCARD_POLARITY_LOW) || ((__CPOL__) == SMARTCARD_POLARITY_HIGH))

+#define IS_SMARTCARD_PHASE(__CPHA__) (((__CPHA__) == SMARTCARD_PHASE_1EDGE) || ((__CPHA__) == SMARTCARD_PHASE_2EDGE))

+#define IS_SMARTCARD_LASTBIT(__LASTBIT__) (((__LASTBIT__) == SMARTCARD_LASTBIT_DISABLE) || \

+                                           ((__LASTBIT__) == SMARTCARD_LASTBIT_ENABLE))

+#define IS_SMARTCARD_ONE_BIT_SAMPLE(__ONEBIT__) (((__ONEBIT__) == SMARTCARD_ONE_BIT_SAMPLE_DISABLE) || \

+                                                  ((__ONEBIT__) == SMARTCARD_ONE_BIT_SAMPLE_ENABLE))

+#define IS_SMARTCARD_NACK(__NACK__) (((__NACK__) == SMARTCARD_NACK_ENABLE) || \

+                                     ((__NACK__) == SMARTCARD_NACK_DISABLE))

+#define IS_SMARTCARD_TIMEOUT(__TIMEOUT__) (((__TIMEOUT__) == SMARTCARD_TIMEOUT_DISABLE) || \

+                                           ((__TIMEOUT__) == SMARTCARD_TIMEOUT_ENABLE))

+#define IS_SMARTCARD_ADVFEATURE_INIT(INIT)           ((INIT) <= (SMARTCARD_ADVFEATURE_NO_INIT | \

+                                                            SMARTCARD_ADVFEATURE_TXINVERT_INIT | \

+                                                            SMARTCARD_ADVFEATURE_RXINVERT_INIT | \

+                                                            SMARTCARD_ADVFEATURE_DATAINVERT_INIT | \

+                                                            SMARTCARD_ADVFEATURE_SWAP_INIT | \

+                                                            SMARTCARD_ADVFEATURE_RXOVERRUNDISABLE_INIT | \

+                                                            SMARTCARD_ADVFEATURE_DMADISABLEONERROR_INIT   | \

+                                                            SMARTCARD_ADVFEATURE_MSBFIRST_INIT))  

+#define IS_SMARTCARD_ADVFEATURE_TXINV(TXINV) (((TXINV) == SMARTCARD_ADVFEATURE_TXINV_DISABLE) || \

+                                         ((TXINV) == SMARTCARD_ADVFEATURE_TXINV_ENABLE))

+#define IS_SMARTCARD_ADVFEATURE_RXINV(RXINV) (((RXINV) == SMARTCARD_ADVFEATURE_RXINV_DISABLE) || \

+                                         ((RXINV) == SMARTCARD_ADVFEATURE_RXINV_ENABLE))

+#define IS_SMARTCARD_ADVFEATURE_DATAINV(DATAINV) (((DATAINV) == SMARTCARD_ADVFEATURE_DATAINV_DISABLE) || \

+                                             ((DATAINV) == SMARTCARD_ADVFEATURE_DATAINV_ENABLE))

+#define IS_SMARTCARD_ADVFEATURE_SWAP(SWAP) (((SWAP) == SMARTCARD_ADVFEATURE_SWAP_DISABLE) || \

+                                       ((SWAP) == SMARTCARD_ADVFEATURE_SWAP_ENABLE))

+#define IS_SMARTCARD_OVERRUN(OVERRUN)         (((OVERRUN) == SMARTCARD_ADVFEATURE_OVERRUN_ENABLE) || \

+                                          ((OVERRUN) == SMARTCARD_ADVFEATURE_OVERRUN_DISABLE))

+#define IS_SMARTCARD_ADVFEATURE_DMAONRXERROR(DMA)      (((DMA) == SMARTCARD_ADVFEATURE_DMA_ENABLEONRXERROR) || \

+                                                   ((DMA) == SMARTCARD_ADVFEATURE_DMA_DISABLEONRXERROR))

+#define IS_SMARTCARD_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) < 4500001)

+#define IS_SMARTCARD_BLOCKLENGTH(__LENGTH__) ((__LENGTH__) <= 0xFF)

+#define IS_SMARTCARD_TIMEOUT_VALUE(__TIMEOUTVALUE__)    ((__TIMEOUTVALUE__) <= 0xFFFFFF)

+#define IS_SMARTCARD_AUTORETRY_COUNT(__COUNT__)         ((__COUNT__) <= 0x7)

+#define IS_SMARTCARD_ADVFEATURE_MSBFIRST(MSBFIRST) (((MSBFIRST) == SMARTCARD_ADVFEATURE_MSBFIRST_DISABLE) || \

+                                               ((MSBFIRST) == SMARTCARD_ADVFEATURE_MSBFIRST_ENABLE))

+#define IS_SMARTCARD_REQUEST_PARAMETER(PARAM) (((PARAM) == SMARTCARD_RXDATA_FLUSH_REQUEST) || \

+                                               ((PARAM) == SMARTCARD_TXDATA_FLUSH_REQUEST))   

+

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup SMARTCARD_Private_Functions SMARTCARD Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_SMARTCARD_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_smartcard_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_smartcard_ex.h
new file mode 100644
index 0000000..eb7f341
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_smartcard_ex.h
@@ -0,0 +1,175 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_smartcard_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of SMARTCARD HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_SMARTCARD_EX_H

+#define __STM32F7xx_HAL_SMARTCARD_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup SMARTCARDEx

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+/* Exported constants --------------------------------------------------------*/

+/* Exported macro ------------------------------------------------------------*/

+   

+/** @brief  Reports the SMARTCARD clock source.

+  * @param  __HANDLE__: specifies the USART Handle

+  * @param  __CLOCKSOURCE__ : output variable   

+  * @retval the USART clocking source, written in __CLOCKSOURCE__.

+  */

+#define SMARTCARD_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \

+  do {                                                             \

+    if((__HANDLE__)->Instance == USART1)                           \

+    {                                                              \

+       switch(__HAL_RCC_GET_USART1_SOURCE())                       \

+       {                                                           \

+        case RCC_USART1CLKSOURCE_PCLK2:                            \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK2;         \

+          break;                                                   \

+        case RCC_USART1CLKSOURCE_HSI:                              \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI;           \

+          break;                                                   \

+        case RCC_USART1CLKSOURCE_SYSCLK:                           \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK;        \

+          break;                                                   \

+        case RCC_USART1CLKSOURCE_LSE:                              \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE;           \

+          break;                                                   \

+        default:                                                   \

+          break;                                                   \

+       }                                                           \

+    }                                                              \

+    else if((__HANDLE__)->Instance == USART2)                      \

+    {                                                              \

+       switch(__HAL_RCC_GET_USART2_SOURCE())                       \

+       {                                                           \

+        case RCC_USART2CLKSOURCE_PCLK1:                            \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1;         \

+          break;                                                   \

+        case RCC_USART2CLKSOURCE_HSI:                              \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI;           \

+          break;                                                   \

+        case RCC_USART2CLKSOURCE_SYSCLK:                           \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK;        \

+          break;                                                   \

+        case RCC_USART2CLKSOURCE_LSE:                              \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE;           \

+          break;                                                   \

+        default:                                                   \

+          break;                                                   \

+       }                                                           \

+    }                                                              \

+    else if((__HANDLE__)->Instance == USART3)                      \

+    {                                                              \

+       switch(__HAL_RCC_GET_USART3_SOURCE())                       \

+       {                                                           \

+        case RCC_USART3CLKSOURCE_PCLK1:                            \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK1;         \

+          break;                                                   \

+        case RCC_USART3CLKSOURCE_HSI:                              \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI;           \

+          break;                                                   \

+        case RCC_USART3CLKSOURCE_SYSCLK:                           \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK;        \

+          break;                                                   \

+        case RCC_USART3CLKSOURCE_LSE:                              \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE;           \

+          break;                                                   \

+        default:                                                   \

+          break;                                                   \

+       }                                                           \

+    }                                                              \

+    else if((__HANDLE__)->Instance == USART6)                      \

+    {                                                              \

+       switch(__HAL_RCC_GET_USART6_SOURCE())                       \

+       {                                                           \

+        case RCC_USART6CLKSOURCE_PCLK2:                            \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_PCLK2;         \

+          break;                                                   \

+        case RCC_USART6CLKSOURCE_HSI:                              \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_HSI;           \

+          break;                                                   \

+        case RCC_USART6CLKSOURCE_SYSCLK:                           \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_SYSCLK;        \

+          break;                                                   \

+        case RCC_USART6CLKSOURCE_LSE:                              \

+          (__CLOCKSOURCE__) = SMARTCARD_CLOCKSOURCE_LSE;           \

+          break;                                                   \

+        default:                                                   \

+          break;                                                   \

+       }                                                           \

+    }                                                              \

+    } while(0)

+

+/* Exported functions --------------------------------------------------------*/

+/* Initialization and de-initialization functions  ****************************/

+/* IO operation functions *****************************************************/

+/* Peripheral Control functions ***********************************************/

+void HAL_SMARTCARDEx_BlockLength_Config(SMARTCARD_HandleTypeDef *hsc, uint8_t BlockLength);

+void HAL_SMARTCARDEx_TimeOut_Config(SMARTCARD_HandleTypeDef *hsc, uint32_t TimeOutValue);

+HAL_StatusTypeDef HAL_SMARTCARDEx_EnableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsc);

+HAL_StatusTypeDef HAL_SMARTCARDEx_DisableReceiverTimeOut(SMARTCARD_HandleTypeDef *hsc);

+

+/* Peripheral State and Error functions ***************************************/

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_SMARTCARD_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_spdifrx.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_spdifrx.h
new file mode 100644
index 0000000..e0bc3ef
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_spdifrx.h
@@ -0,0 +1,556 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_spdifrx.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of SPDIFRX HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_SPDIFRX_H

+#define __STM32F7xx_HAL_SPDIFRX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"  

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup SPDIFRX

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup SPDIFRX_Exported_Types SPDIFRX Exported Types

+  * @{

+  */

+

+/** 

+  * @brief SPDIFRX Init structure definition  

+  */

+typedef struct

+{

+  uint32_t InputSelection;           /*!< Specifies the SPDIF input selection.

+                                          This parameter can be a value of @ref SPDIFRX_Input_Selection */

+

+  uint32_t Retries;                  /*!< Specifies the Maximum allowed re-tries during synchronization phase.

+                                          This parameter can be a value of @ref SPDIFRX_Max_Retries */

+

+  uint32_t WaitForActivity;          /*!< Specifies the wait for activity on SPDIF selected input.

+                                          This parameter can be a value of @ref SPDIFRX_Wait_For_Activity. */

+

+  uint32_t ChannelSelection;         /*!< Specifies whether the control flow will take the channel status from channel A or B.

+                                          This parameter can be a value of @ref SPDIFRX_Channel_Selection */

+

+  uint32_t DataFormat;               /*!< Specifies the Data samples format (LSB, MSB, ...).

+                                          This parameter can be a value of @ref SPDIFRX_Data_Format */

+                                               

+  uint32_t StereoMode;               /*!< Specifies whether the peripheral is in stereo or mono mode.

+                                          This parameter can be a value of @ref SPDIFRX_Stereo_Mode */

+

+    uint32_t PreambleTypeMask;          /*!< Specifies whether The preamble type bits are copied or not into the received frame.

+                                                                                   This parameter can be a value of @ref SPDIFRX_PT_Mask */

+

+    uint32_t ChannelStatusMask;        /*!< Specifies whether the channel status and user bits are copied or not into the received frame.

+                                                                                  This parameter can be a value of @ref SPDIFRX_ChannelStatus_Mask */

+    

+    uint32_t ValidityBitMask;          /*!< Specifies whether the validity bit is copied or not into the received frame.

+                                                                                  This parameter can be a value of @ref SPDIFRX_V_Mask */                                                                                

+                                                                                

+    uint32_t ParityErrorMask;          /*!< Specifies whether the parity error bit is copied or not into the received frame.

+                                                                                  This parameter can be a value of @ref SPDIFRX_PE_Mask */

+    

+}SPDIFRX_InitTypeDef;

+

+/** 

+  * @brief SPDIFRX SetDataFormat structure definition  

+  */

+typedef struct

+{

+  uint32_t DataFormat;               /*!< Specifies the Data samples format (LSB, MSB, ...).

+                                          This parameter can be a value of @ref SPDIFRX_Data_Format */

+                                               

+  uint32_t StereoMode;               /*!< Specifies whether the peripheral is in stereo or mono mode.

+                                          This parameter can be a value of @ref SPDIFRX_Stereo_Mode */

+

+  uint32_t PreambleTypeMask;          /*!< Specifies whether The preamble type bits are copied or not into the received frame.

+                                                                                   This parameter can be a value of @ref SPDIFRX_PT_Mask */

+

+  uint32_t ChannelStatusMask;        /*!< Specifies whether the channel status and user bits are copied or not into the received frame.

+                                                                                  This parameter can be a value of @ref SPDIFRX_ChannelStatus_Mask */

+    

+  uint32_t ValidityBitMask;          /*!< Specifies whether the validity bit is copied or not into the received frame.

+                                                                                  This parameter can be a value of @ref SPDIFRX_V_Mask */                                                                                

+                                                                                

+  uint32_t ParityErrorMask;          /*!< Specifies whether the parity error bit is copied or not into the received frame.

+                                                                                  This parameter can be a value of @ref SPDIFRX_PE_Mask */

+    

+}SPDIFRX_SetDataFormatTypeDef;

+

+/** 

+  * @brief  HAL State structures definition  

+  */ 

+typedef enum

+{

+  HAL_SPDIFRX_STATE_RESET      = 0x00,  /*!< SPDIFRX not yet initialized or disabled                */

+  HAL_SPDIFRX_STATE_READY      = 0x01,  /*!< SPDIFRX initialized and ready for use                  */

+  HAL_SPDIFRX_STATE_BUSY       = 0x02,  /*!< SPDIFRX internal process is ongoing                    */ 

+  HAL_SPDIFRX_STATE_BUSY_RX    = 0x03,  /*!< SPDIFRX internal Data Flow RX process is ongoing       */  

+  HAL_SPDIFRX_STATE_BUSY_CX    = 0x04,  /*!< SPDIFRX internal Control Flow RX process is ongoing    */    

+  HAL_SPDIFRX_STATE_ERROR      = 0x07   /*!< SPDIFRX error state                                    */      

+}HAL_SPDIFRX_StateTypeDef;

+

+/** 

+  * @brief SPDIFRX handle Structure definition  

+  */

+typedef struct

+{

+  SPDIFRX_TypeDef            *Instance;    /* SPDIFRX registers base address */

+

+  SPDIFRX_InitTypeDef        Init;         /* SPDIFRX communication parameters */

+                            

+  uint32_t                   *pRxBuffPtr;  /* Pointer to SPDIFRX Rx transfer buffer */

+    

+    uint32_t                   *pCsBuffPtr;  /* Pointer to SPDIFRX Cx transfer buffer */

+  

+  __IO uint16_t              RxXferSize;   /* SPDIFRX Rx transfer size */

+  

+  __IO uint16_t              RxXferCount;  /* SPDIFRX Rx transfer counter 

+                                              (This field is initialized at the 

+                                               same value as transfer size at the 

+                                               beginning of the transfer and 

+                                               decremented when a sample is received. 

+                                               NbSamplesReceived = RxBufferSize-RxBufferCount) */

+    

+  __IO uint16_t              CsXferSize;   /* SPDIFRX Rx transfer size */

+  

+  __IO uint16_t              CsXferCount;  /* SPDIFRX Rx transfer counter 

+                                              (This field is initialized at the 

+                                               same value as transfer size at the 

+                                               beginning of the transfer and 

+                                               decremented when a sample is received. 

+                                               NbSamplesReceived = RxBufferSize-RxBufferCount) */

+                                                                                             

+  DMA_HandleTypeDef          *hdmaCsRx;    /* SPDIFRX EC60958_channel_status and user_information DMA handle parameters */

+

+  DMA_HandleTypeDef          *hdmaDrRx;    /* SPDIFRX Rx DMA handle parameters */

+  

+  __IO HAL_LockTypeDef       Lock;         /* SPDIFRX locking object */

+  

+  __IO HAL_SPDIFRX_StateTypeDef  State;    /* SPDIFRX communication state */

+

+  __IO uint32_t  ErrorCode;                /* SPDIFRX Error code                 */

+

+}SPDIFRX_HandleTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup SPDIFRX_Exported_Constants SPDIFRX Exported Constants

+  * @{

+  */

+/** @defgroup SPDIFRX_ErrorCode SPDIFRX Error Code

+  * @{

+  */ 

+#define HAL_SPDIFRX_ERROR_NONE      ((uint32_t)0x00000000)  /*!< No error           */

+#define HAL_SPDIFRX_ERROR_TIMEOUT   ((uint32_t)0x00000001)  /*!< Timeout error      */  

+#define HAL_SPDIFRX_ERROR_OVR       ((uint32_t)0x00000002)  /*!< OVR error          */

+#define HAL_SPDIFRX_ERROR_PE        ((uint32_t)0x00000004)  /*!< Parity error       */

+#define HAL_SPDIFRX_ERROR_DMA       ((uint32_t)0x00000008)  /*!< DMA transfer error */

+#define HAL_SPDIFRX_ERROR_UNKNOWN   ((uint32_t)0x00000010)  /*!< Unknown Error error */  

+/**

+  * @}

+  */

+  

+/** @defgroup SPDIFRX_Input_Selection SPDIFRX Input Selection

+  * @{

+  */

+#define SPDIFRX_INPUT_IN0               ((uint32_t)0x00000000)

+#define SPDIFRX_INPUT_IN1               ((uint32_t)0x00010000)  

+#define SPDIFRX_INPUT_IN2               ((uint32_t)0x00020000)

+#define SPDIFRX_INPUT_IN3               ((uint32_t)0x00030000)

+/**

+  * @}

+  */

+

+/** @defgroup SPDIFRX_Max_Retries SPDIFRX Maximum Retries

+  * @{

+  */

+#define SPDIFRX_MAXRETRIES_NONE            ((uint32_t)0x00000000)

+#define SPDIFRX_MAXRETRIES_3               ((uint32_t)0x00001000)  

+#define SPDIFRX_MAXRETRIES_15              ((uint32_t)0x00002000)

+#define SPDIFRX_MAXRETRIES_63              ((uint32_t)0x00003000)

+/**

+  * @}

+  */

+

+/** @defgroup SPDIFRX_Wait_For_Activity SPDIFRX Wait For Activity

+  * @{

+  */

+#define SPDIFRX_WAITFORACTIVITY_OFF                   ((uint32_t)0x00000000)

+#define SPDIFRX_WAITFORACTIVITY_ON                    ((uint32_t)SPDIFRX_CR_WFA)

+/**

+  * @}

+  */

+    

+/** @defgroup SPDIFRX_PT_Mask SPDIFRX Preamble Type Mask

+* @{

+*/

+#define SPDIFRX_PREAMBLETYPEMASK_OFF                   ((uint32_t)0x00000000)

+#define SPDIFRX_PREAMBLETYPEMASK_ON                    ((uint32_t)SPDIFRX_CR_PTMSK)

+/**

+  * @}

+  */

+

+/** @defgroup SPDIFRX_ChannelStatus_Mask  SPDIFRX Channel Status Mask

+* @{

+*/

+#define SPDIFRX_CHANNELSTATUS_OFF                 ((uint32_t)0x00000000)        /* The channel status and user bits are copied into the SPDIF_DR */

+#define SPDIFRX_CHANNELSTATUS_ON                  ((uint32_t)SPDIFRX_CR_CUMSK)  /* The channel status and user bits are not copied into the SPDIF_DR, zeros are written instead*/

+/**

+  * @}

+  */

+

+/** @defgroup SPDIFRX_V_Mask SPDIFRX Validity Mask

+* @{

+*/

+#define SPDIFRX_VALIDITYMASK_OFF                   ((uint32_t)0x00000000)

+#define SPDIFRX_VALIDITYMASK_ON                    ((uint32_t)SPDIFRX_CR_VMSK)

+/**

+  * @}

+  */

+

+/** @defgroup SPDIFRX_PE_Mask  SPDIFRX Parity Error Mask

+* @{

+*/

+#define SPDIFRX_PARITYERRORMASK_OFF                   ((uint32_t)0x00000000)

+#define SPDIFRX_PARITYERRORMASK_ON                    ((uint32_t)SPDIFRX_CR_PMSK)

+/**

+  * @}

+  */

+

+/** @defgroup SPDIFRX_Channel_Selection  SPDIFRX Channel Selection

+  * @{

+  */

+#define SPDIFRX_CHANNEL_A      ((uint32_t)0x00000000)

+#define SPDIFRX_CHANNEL_B      ((uint32_t)SPDIFRX_CR_CHSEL)

+/**

+  * @}

+  */

+

+/** @defgroup SPDIFRX_Data_Format SPDIFRX Data Format

+  * @{

+  */

+#define SPDIFRX_DATAFORMAT_LSB                   ((uint32_t)0x00000000)

+#define SPDIFRX_DATAFORMAT_MSB                   ((uint32_t)0x00000010)

+#define SPDIFRX_DATAFORMAT_32BITS                ((uint32_t)0x00000020)

+/**

+  * @}

+  */ 

+

+/** @defgroup SPDIFRX_Stereo_Mode SPDIFRX Stereo Mode

+  * @{

+  */

+#define SPDIFRX_STEREOMODE_DISABLE           ((uint32_t)0x00000000)

+#define SPDIFRX_STEREOMODE_ENABLE           ((uint32_t)SPDIFRX_CR_RXSTEO)

+/**

+  * @}

+  */ 

+

+/** @defgroup SPDIFRX_State SPDIFRX State

+  * @{

+  */

+

+#define SPDIFRX_STATE_IDLE    ((uint32_t)0xFFFFFFFC)

+#define SPDIFRX_STATE_SYNC    ((uint32_t)0x00000001)

+#define SPDIFRX_STATE_RCV     ((uint32_t)SPDIFRX_CR_SPDIFEN)

+/**

+  * @}

+  */

+    

+/** @defgroup SPDIFRX_Interrupts_Definition SPDIFRX Interrupts Definition

+  * @{

+  */

+#define SPDIFRX_IT_RXNE                       ((uint32_t)SPDIFRX_IMR_RXNEIE)

+#define SPDIFRX_IT_CSRNE                      ((uint32_t)SPDIFRX_IMR_CSRNEIE)

+#define SPDIFRX_IT_PERRIE                     ((uint32_t)SPDIFRX_IMR_PERRIE)

+#define SPDIFRX_IT_OVRIE                      ((uint32_t)SPDIFRX_IMR_OVRIE)

+#define SPDIFRX_IT_SBLKIE                     ((uint32_t)SPDIFRX_IMR_SBLKIE)

+#define SPDIFRX_IT_SYNCDIE                    ((uint32_t)SPDIFRX_IMR_SYNCDIE)

+#define SPDIFRX_IT_IFEIE                      ((uint32_t)SPDIFRX_IMR_IFEIE )

+/**

+  * @}

+  */

+    

+/** @defgroup SPDIFRX_Flags_Definition SPDIFRX Flags Definition

+  * @{

+  */

+#define SPDIFRX_FLAG_RXNE                   ((uint32_t)SPDIFRX_SR_RXNE)

+#define SPDIFRX_FLAG_CSRNE                  ((uint32_t)SPDIFRX_SR_CSRNE)

+#define SPDIFRX_FLAG_PERR                   ((uint32_t)SPDIFRX_SR_PERR)

+#define SPDIFRX_FLAG_OVR                    ((uint32_t)SPDIFRX_SR_OVR)

+#define SPDIFRX_FLAG_SBD                    ((uint32_t)SPDIFRX_SR_SBD)

+#define SPDIFRX_FLAG_SYNCD                  ((uint32_t)SPDIFRX_SR_SYNCD)

+#define SPDIFRX_FLAG_FERR                   ((uint32_t)SPDIFRX_SR_FERR)

+#define SPDIFRX_FLAG_SERR                   ((uint32_t)SPDIFRX_SR_SERR)

+#define SPDIFRX_FLAG_TERR                   ((uint32_t)SPDIFRX_SR_TERR)

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+  

+/* Exported macros -----------------------------------------------------------*/

+/** @defgroup SPDIFRX_Exported_macros SPDIFRX Exported Macros

+  * @{

+  */

+

+/** @brief  Reset SPDIFRX handle state

+  * @param  __HANDLE__: SPDIFRX handle.

+  * @retval None

+  */

+#define __HAL_SPDIFRX_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = (uint16_t)SPDIFRX_CR_SPDIFEN)

+

+/** @brief  Disable the specified SPDIFRX peripheral (IDLE State).

+  * @param  __HANDLE__: specifies the SPDIFRX Handle. 

+  * @retval None

+  */

+#define __HAL_SPDIFRX_IDLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= SPDIFRX_STATE_IDLE)

+

+/** @brief  Enable the specified SPDIFRX peripheral (SYNC State).

+  * @param  __HANDLE__: specifies the SPDIFRX Handle. 

+  * @retval None

+  */

+#define __HAL_SPDIFRX_SYNC(__HANDLE__) ((__HANDLE__)->Instance->CR |= SPDIFRX_STATE_SYNC)

+

+

+/** @brief  Enable the specified SPDIFRX peripheral (RCV State).

+  * @param  __HANDLE__: specifies the SPDIFRX Handle. 

+  * @retval None

+  */

+#define __HAL_SPDIFRX_RCV(__HANDLE__) ((__HANDLE__)->Instance->CR |= SPDIFRX_STATE_RCV)

+

+

+/** @brief  Enable or disable the specified SPDIFRX interrupts.

+  * @param  __HANDLE__: specifies the SPDIFRX Handle.

+  * @param  __INTERRUPT__: specifies the interrupt source to enable or disable.

+  *        This parameter can be one of the following values:

+  *            @arg SPDIFRX_IT_RXNE

+  *            @arg SPDIFRX_IT_CSRNE

+  *            @arg SPDIFRX_IT_PERRIE

+  *            @arg SPDIFRX_IT_OVRIE

+  *            @arg SPDIFRX_IT_SBLKIE

+  *            @arg SPDIFRX_IT_SYNCDIE

+  *            @arg SPDIFRX_IT_IFEIE

+  * @retval None

+  */  

+#define __HAL_SPDIFRX_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IMR |= (__INTERRUPT__))

+#define __HAL_SPDIFRX_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IMR &= (uint16_t)(~(__INTERRUPT__)))

+ 

+/** @brief  Checks if the specified SPDIFRX interrupt source is enabled or disabled.

+  * @param  __HANDLE__: specifies the SPDIFRX Handle.

+  * @param  __INTERRUPT__: specifies the SPDIFRX interrupt source to check.

+  *          This parameter can be one of the following values:

+  *            @arg SPDIFRX_IT_RXNE

+  *            @arg SPDIFRX_IT_CSRNE

+  *            @arg SPDIFRX_IT_PERRIE

+  *            @arg SPDIFRX_IT_OVRIE

+  *            @arg SPDIFRX_IT_SBLKIE

+  *            @arg SPDIFRX_IT_SYNCDIE

+  *            @arg SPDIFRX_IT_IFEIE

+  * @retval The new state of __IT__ (TRUE or FALSE).

+  */

+#define __HAL_SPDIFRX_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->IMR & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

+

+/** @brief  Checks whether the specified SPDIFRX flag is set or not.

+  * @param  __HANDLE__: specifies the SPDIFRX Handle.

+  * @param  __FLAG__: specifies the flag to check.

+  *        This parameter can be one of the following values:

+  *            @arg SPDIFRX_FLAG_RXNE

+  *            @arg SPDIFRX_FLAG_CSRNE

+  *            @arg SPDIFRX_FLAG_PERR

+  *            @arg SPDIFRX_FLAG_OVR

+  *            @arg SPDIFRX_FLAG_SBD

+  *            @arg SPDIFRX_FLAG_SYNCD 

+  *            @arg SPDIFRX_FLAG_FERR 

+  *            @arg SPDIFRX_FLAG_SERR 

+  *            @arg SPDIFRX_FLAG_TERR 

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define __HAL_SPDIFRX_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

+

+/** @brief  Clears the specified SPDIFRX SR flag, in setting the proper IFCR register bit.

+  * @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 SPDIFRX_FLAG_PERR

+  *            @arg SPDIFRX_FLAG_OVR

+  *            @arg SPDIFRX_SR_SBD

+  *            @arg SPDIFRX_SR_SYNCD

+  * @retval None

+  */

+#define __HAL_SPDIFRX_CLEAR_IT(__HANDLE__, __IT_CLEAR__) ((__HANDLE__)->Instance->IFCR = (uint32_t)(__IT_CLEAR__)) 

+  

+/**

+  * @}

+  */

+  

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup SPDIFRX_Exported_Functions

+  * @{

+  */

+                                                

+/** @addtogroup SPDIFRX_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization/de-initialization functions  **********************************/

+HAL_StatusTypeDef HAL_SPDIFRX_Init(SPDIFRX_HandleTypeDef *hspdif);

+HAL_StatusTypeDef HAL_SPDIFRX_DeInit (SPDIFRX_HandleTypeDef *hspdif);

+void HAL_SPDIFRX_MspInit(SPDIFRX_HandleTypeDef *hspdif);

+void HAL_SPDIFRX_MspDeInit(SPDIFRX_HandleTypeDef *hspdif);

+HAL_StatusTypeDef HAL_SPDIFRX_SetDataFormat(SPDIFRX_HandleTypeDef *hspdif, SPDIFRX_SetDataFormatTypeDef  sDataFormat);

+/**

+  * @}

+  */

+

+/** @addtogroup SPDIFRX_Exported_Functions_Group2

+  * @{

+  */

+/* I/O operation functions  ***************************************************/

+ /* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow(SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_SPDIFRX_ReceiveControlFlow(SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size, uint32_t Timeout);

+

+ /* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_SPDIFRX_ReceiveControlFlow_IT(SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow_IT(SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size);

+void HAL_SPDIFRX_IRQHandler(SPDIFRX_HandleTypeDef *hspdif);

+

+/* Non-Blocking mode: DMA */

+HAL_StatusTypeDef HAL_SPDIFRX_ReceiveControlFlow_DMA(SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_SPDIFRX_ReceiveDataFlow_DMA(SPDIFRX_HandleTypeDef *hspdif, uint32_t *pData, uint16_t Size);

+

+HAL_StatusTypeDef HAL_SPDIFRX_DMAStop(SPDIFRX_HandleTypeDef *hspdif);

+

+/* Callbacks used in non blocking modes (Interrupt and DMA) *******************/

+void HAL_SPDIFRX_RxHalfCpltCallback(SPDIFRX_HandleTypeDef *hspdif);

+void HAL_SPDIFRX_RxCpltCallback(SPDIFRX_HandleTypeDef *hspdif);

+void HAL_SPDIFRX_ErrorCallback(SPDIFRX_HandleTypeDef *hspdif);

+void HAL_SPDIFRX_CxHalfCpltCallback(SPDIFRX_HandleTypeDef *hspdif);

+void HAL_SPDIFRX_CxCpltCallback(SPDIFRX_HandleTypeDef *hspdif);

+/**

+  * @}

+  */

+

+/** @addtogroup SPDIFRX_Exported_Functions_Group3

+  * @{

+  */

+/* Peripheral Control and State functions  ************************************/

+HAL_SPDIFRX_StateTypeDef HAL_SPDIFRX_GetState(SPDIFRX_HandleTypeDef *hspdif);

+uint32_t HAL_SPDIFRX_GetError(SPDIFRX_HandleTypeDef *hspdif);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup SPDIFRX_Private_Macros SPDIFRX Private Macros

+  * @{

+  */

+#define IS_SPDIFRX_INPUT_SELECT(INPUT)  (((INPUT) == SPDIFRX_INPUT_IN1) || \

+                                         ((INPUT) == SPDIFRX_INPUT_IN2) || \

+                                         ((INPUT) == SPDIFRX_INPUT_IN3)  || \

+                                         ((INPUT) == SPDIFRX_INPUT_IN0))

+#define IS_SPDIFRX_MAX_RETRIES(RET)   (((RET) == SPDIFRX_MAXRETRIES_NONE) || \

+                                      ((RET) == SPDIFRX_MAXRETRIES_3)  || \

+                                      ((RET) == SPDIFRX_MAXRETRIES_15) || \

+                                      ((RET) == SPDIFRX_MAXRETRIES_63))

+#define IS_SPDIFRX_WAIT_FOR_ACTIVITY(VAL)    (((VAL) == SPDIFRX_WAITFORACTIVITY_ON) || \

+                                               ((VAL) == SPDIFRX_WAITFORACTIVITY_OFF))

+#define IS_PREAMBLE_TYPE_MASK(VAL)           (((VAL) == SPDIFRX_PREAMBLETYPEMASK_ON) || \

+                                             ((VAL) == SPDIFRX_PREAMBLETYPEMASK_OFF))

+#define IS_VALIDITY_MASK(VAL)               (((VAL) == SPDIFRX_VALIDITYMASK_OFF) || \

+                                             ((VAL) == SPDIFRX_VALIDITYMASK_ON))

+#define IS_PARITY_ERROR_MASK(VAL)            (((VAL) == SPDIFRX_PARITYERRORMASK_OFF) || \

+                                             ((VAL) == SPDIFRX_PARITYERRORMASK_ON))

+#define IS_SPDIFRX_CHANNEL(CHANNEL)   (((CHANNEL) == SPDIFRX_CHANNEL_A) || \

+                                       ((CHANNEL) == SPDIFRX_CHANNEL_B))

+#define IS_SPDIFRX_DATA_FORMAT(FORMAT)           (((FORMAT) == SPDIFRX_DATAFORMAT_LSB) || \

+                                                 ((FORMAT) == SPDIFRX_DATAFORMAT_MSB) || \

+                                                 ((FORMAT) == SPDIFRX_DATAFORMAT_32BITS))

+#define IS_STEREO_MODE(MODE)                 (((MODE) == SPDIFRX_STEREOMODE_DISABLE) || \

+                                             ((MODE) == SPDIFRX_STEREOMODE_ENABLE))

+                                             

+#define IS_CHANNEL_STATUS_MASK(VAL)          (((VAL) == SPDIFRX_CHANNELSTATUS_ON) || \

+                                              ((VAL) == SPDIFRX_CHANNELSTATUS_OFF))

+/**                                                                                    

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup SPDIFRX_Private_Functions SPDIFRX Private Functions

+  * @{

+  */

+/**

+  * @}

+  */

+ 

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+    

+#ifdef __cplusplus

+}

+#endif

+

+

+#endif /* __STM32F7xx_HAL_SPDIFRX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_spi.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_spi.h
new file mode 100644
index 0000000..632c9ac
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_spi.h
@@ -0,0 +1,696 @@
+ /**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_spi.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of SPI HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************  

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_SPI_H

+#define __STM32F7xx_HAL_SPI_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup SPI

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup SPI_Exported_Types SPI Exported Types

+  * @{

+  */

+

+/**

+  * @brief  SPI Configuration Structure definition

+  */

+typedef struct

+{

+  uint32_t Mode;                /*!< Specifies the SPI operating mode.

+                                     This parameter can be a value of @ref SPI_Mode */

+

+  uint32_t Direction;           /*!< Specifies the SPI bidirectional mode state.

+                                     This parameter can be a value of @ref SPI_Direction */

+

+  uint32_t DataSize;            /*!< Specifies the SPI data size.

+                                     This parameter can be a value of @ref SPI_Data_Size */

+

+  uint32_t CLKPolarity;         /*!< Specifies the serial clock steady state.

+                                     This parameter can be a value of @ref SPI_Clock_Polarity */

+

+  uint32_t CLKPhase;            /*!< Specifies the clock active edge for the bit capture.

+                                     This parameter can be a value of @ref SPI_Clock_Phase */

+

+  uint32_t NSS;                 /*!< Specifies whether the NSS signal is managed by

+                                     hardware (NSS pin) or by software using the SSI bit.

+                                     This parameter can be a value of @ref SPI_Slave_Select_management */

+

+  uint32_t BaudRatePrescaler;   /*!< Specifies the Baud Rate prescaler value which will be

+                                     used to configure the transmit and receive SCK clock.

+                                     This parameter can be a value of @ref SPI_BaudRate_Prescaler

+                                     @note The communication clock is derived from the master

+                                     clock. The slave clock does not need to be set. */

+

+  uint32_t FirstBit;            /*!< Specifies whether data transfers start from MSB or LSB bit.

+                                     This parameter can be a value of @ref SPI_MSB_LSB_transmission */

+

+  uint32_t TIMode;              /*!< Specifies if the TI mode is enabled or not .

+                                     This parameter can be a value of @ref SPI_TI_mode */

+

+  uint32_t CRCCalculation;      /*!< Specifies if the CRC calculation is enabled or not.

+                                     This parameter can be a value of @ref SPI_CRC_Calculation */

+

+  uint32_t CRCPolynomial;       /*!< Specifies the polynomial used for the CRC calculation.

+                                     This parameter must be a number between Min_Data = 0 and Max_Data = 65535 */

+

+  uint32_t CRCLength;           /*!< Specifies the CRC Length used for the CRC calculation.

+                                     CRC Length is only used with Data8 and Data16, not other data size

+                                     This parameter can be a value of @ref SPI_CRC_length */

+

+  uint32_t NSSPMode;            /*!< Specifies whether the NSSP signal is enabled or not .

+                                     This parameter can be a value of @ref SPI_NSSP_Mode

+                                     This mode is activated by the NSSP bit in the SPIx_CR2 register and

+                                     it takes effect only if the SPI interface is configured as Motorola SPI

+                                     master (FRF=0) with capture on the first edge (SPIx_CR1 CPHA = 0,

+                                     CPOL setting is ignored).. */

+} SPI_InitTypeDef;

+

+/**

+  * @brief  HAL State structures definition

+  */

+typedef enum

+{

+  HAL_SPI_STATE_RESET      = 0x00,    /*!< Peripheral not Initialized                         */

+  HAL_SPI_STATE_READY      = 0x01,    /*!< Peripheral Initialized and ready for use           */

+  HAL_SPI_STATE_BUSY       = 0x02,    /*!< an internal process is ongoing                     */

+  HAL_SPI_STATE_BUSY_TX    = 0x03,    /*!< Data Transmission process is ongoing               */

+  HAL_SPI_STATE_BUSY_RX    = 0x04,    /*!< Data Reception process is ongoing                  */

+  HAL_SPI_STATE_BUSY_TX_RX = 0x05,    /*!< Data Transmission and Reception process is ongoing*/

+  HAL_SPI_STATE_ERROR      = 0x06     /*!< SPI error state                                   */

+}HAL_SPI_StateTypeDef;

+

+/**

+  * @brief  SPI handle Structure definition

+  */

+typedef struct __SPI_HandleTypeDef

+{

+  SPI_TypeDef             *Instance;      /* SPI registers base address     */

+

+  SPI_InitTypeDef         Init;           /* SPI communication parameters   */

+

+  uint8_t                 *pTxBuffPtr;    /* Pointer to SPI Tx transfer Buffer */

+

+  uint16_t                TxXferSize;     /* SPI Tx Transfer size */

+

+  uint16_t                TxXferCount;    /* SPI Tx Transfer Counter */

+

+  uint8_t                 *pRxBuffPtr;    /* Pointer to SPI Rx transfer Buffer */

+

+  uint16_t                RxXferSize;     /* SPI Rx Transfer size */

+

+  uint16_t                RxXferCount;    /* SPI Rx Transfer Counter */

+

+  uint32_t                CRCSize;        /* SPI CRC size used for the transfer */

+

+  void (*RxISR)(struct __SPI_HandleTypeDef *hspi); /* function pointer on Rx IRQ handler   */

+

+  void (*TxISR)(struct __SPI_HandleTypeDef *hspi); /* function pointer on Tx IRQ handler   */

+

+  DMA_HandleTypeDef       *hdmatx;        /* SPI Tx DMA Handle parameters   */

+

+  DMA_HandleTypeDef       *hdmarx;        /* SPI Rx DMA Handle parameters   */

+

+  HAL_LockTypeDef         Lock;           /* Locking object                 */

+

+  HAL_SPI_StateTypeDef    State;          /* SPI communication state        */

+

+  uint32_t                ErrorCode;      /* SPI Error code                 */

+

+}SPI_HandleTypeDef;

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup SPI_Exported_Constants SPI Exported Constants

+  * @{

+  */

+

+/** @defgroup SPI_Error_Code SPI Error Code

+  * @{

+  */

+#define HAL_SPI_ERROR_NONE   (uint32_t)0x00000000  /*!< No error                          */

+#define HAL_SPI_ERROR_MODF   (uint32_t)0x00000001  /*!< MODF error                        */

+#define HAL_SPI_ERROR_CRC    (uint32_t)0x00000002  /*!< CRC error                         */

+#define HAL_SPI_ERROR_OVR    (uint32_t)0x00000004  /*!< OVR error                         */

+#define HAL_SPI_ERROR_FRE    (uint32_t)0x00000008  /*!< FRE error                         */

+#define HAL_SPI_ERROR_DMA    (uint32_t)0x00000010  /*!< DMA transfer error                */

+#define HAL_SPI_ERROR_FLAG   (uint32_t)0x00000020  /*!< Error on BSY/TXE/FTLVL/FRLVL Flag */

+#define HAL_SPI_ERROR_UNKNOW (uint32_t)0x00000040  /*!< Unknow Error error                */

+/**

+  * @}

+  */

+

+

+/** @defgroup SPI_Mode SPI Mode

+  * @{

+  */

+#define SPI_MODE_SLAVE                  ((uint32_t)0x00000000)

+#define SPI_MODE_MASTER                 (SPI_CR1_MSTR | SPI_CR1_SSI)

+/**

+  * @}

+  */

+

+/** @defgroup SPI_Direction SPI Direction Mode

+  * @{

+  */

+#define SPI_DIRECTION_2LINES            ((uint32_t)0x00000000)

+#define SPI_DIRECTION_2LINES_RXONLY     SPI_CR1_RXONLY

+#define SPI_DIRECTION_1LINE             SPI_CR1_BIDIMODE

+/**

+  * @}

+  */

+

+/** @defgroup SPI_Data_Size SPI Data Size

+  * @{

+  */

+#define SPI_DATASIZE_4BIT               ((uint32_t)0x0300)

+#define SPI_DATASIZE_5BIT               ((uint32_t)0x0400)

+#define SPI_DATASIZE_6BIT               ((uint32_t)0x0500)

+#define SPI_DATASIZE_7BIT               ((uint32_t)0x0600)

+#define SPI_DATASIZE_8BIT               ((uint32_t)0x0700)

+#define SPI_DATASIZE_9BIT               ((uint32_t)0x0800)

+#define SPI_DATASIZE_10BIT              ((uint32_t)0x0900)

+#define SPI_DATASIZE_11BIT              ((uint32_t)0x0A00)

+#define SPI_DATASIZE_12BIT              ((uint32_t)0x0B00)

+#define SPI_DATASIZE_13BIT              ((uint32_t)0x0C00)

+#define SPI_DATASIZE_14BIT              ((uint32_t)0x0D00)

+#define SPI_DATASIZE_15BIT              ((uint32_t)0x0E00)

+#define SPI_DATASIZE_16BIT              ((uint32_t)0x0F00)

+/**

+  * @}

+  */

+

+/** @defgroup SPI_Clock_Polarity SPI Clock Polarity

+  * @{

+  */

+#define SPI_POLARITY_LOW                ((uint32_t)0x00000000)

+#define SPI_POLARITY_HIGH               SPI_CR1_CPOL

+/**

+  * @}

+  */

+

+/** @defgroup SPI_Clock_Phase SPI Clock Phase

+  * @{

+  */

+#define SPI_PHASE_1EDGE                 ((uint32_t)0x00000000)

+#define SPI_PHASE_2EDGE                 SPI_CR1_CPHA

+/**

+  * @}

+  */

+

+/** @defgroup SPI_Slave_Select_management SPI Slave Select management

+  * @{

+  */

+#define SPI_NSS_SOFT                    SPI_CR1_SSM

+#define SPI_NSS_HARD_INPUT              ((uint32_t)0x00000000)

+#define SPI_NSS_HARD_OUTPUT             ((uint32_t)0x00040000)

+/**

+  * @}

+  */

+

+/** @defgroup SPI_NSSP_Mode SPI NSS Pulse Mode

+  * @{

+  */

+#define SPI_NSS_PULSE_ENABLE            SPI_CR2_NSSP

+#define SPI_NSS_PULSE_DISABLE           ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup SPI_BaudRate_Prescaler SPI BaudRate Prescaler

+  * @{

+  */

+#define SPI_BAUDRATEPRESCALER_2         ((uint32_t)0x00000000)

+#define SPI_BAUDRATEPRESCALER_4         ((uint32_t)0x00000008)

+#define SPI_BAUDRATEPRESCALER_8         ((uint32_t)0x00000010)

+#define SPI_BAUDRATEPRESCALER_16        ((uint32_t)0x00000018)

+#define SPI_BAUDRATEPRESCALER_32        ((uint32_t)0x00000020)

+#define SPI_BAUDRATEPRESCALER_64        ((uint32_t)0x00000028)

+#define SPI_BAUDRATEPRESCALER_128       ((uint32_t)0x00000030)

+#define SPI_BAUDRATEPRESCALER_256       ((uint32_t)0x00000038)

+/**

+  * @}

+  */

+

+/** @defgroup SPI_MSB_LSB_transmission SPI MSB LSB transmission

+  * @{

+  */

+#define SPI_FIRSTBIT_MSB                ((uint32_t)0x00000000)

+#define SPI_FIRSTBIT_LSB                SPI_CR1_LSBFIRST

+/**

+  * @}

+  */

+

+/** @defgroup SPI_TI_mode SPI TI mode

+  * @{

+  */

+#define SPI_TIMODE_DISABLE              ((uint32_t)0x00000000)

+#define SPI_TIMODE_ENABLE               SPI_CR2_FRF

+/**

+  * @}

+  */

+

+/** @defgroup SPI_CRC_Calculation SPI CRC Calculation

+  * @{

+  */

+#define SPI_CRCCALCULATION_DISABLE      ((uint32_t)0x00000000)

+#define SPI_CRCCALCULATION_ENABLE       SPI_CR1_CRCEN

+/**

+  * @}

+  */

+

+/** @defgroup SPI_CRC_length SPI CRC Length

+  * @{

+  * This parameter can be one of the following values:

+  *     SPI_CRC_LENGTH_DATASIZE: aligned with the data size

+  *     SPI_CRC_LENGTH_8BIT    : CRC 8bit

+  *     SPI_CRC_LENGTH_16BIT   : CRC 16bit

+  */

+#define SPI_CRC_LENGTH_DATASIZE         ((uint32_t)0x00000000)

+#define SPI_CRC_LENGTH_8BIT             ((uint32_t)0x00000001)

+#define SPI_CRC_LENGTH_16BIT            ((uint32_t)0x00000002)

+/**

+  * @}

+  */

+

+/** @defgroup SPI_FIFO_reception_threshold SPI FIFO Reception Threshold

+  * @{

+  * This parameter can be one of the following values:

+  *     SPI_RXFIFO_THRESHOLD or SPI_RXFIFO_THRESHOLD_QF :

+  *          RXNE event is generated if the FIFO

+  *          level is greater or equal to 1/2(16-bits).

+  *     SPI_RXFIFO_THRESHOLD_HF: RXNE event is generated if the FIFO

+  *          level is greater or equal to 1/4(8 bits). */

+#define SPI_RXFIFO_THRESHOLD            SPI_CR2_FRXTH

+#define SPI_RXFIFO_THRESHOLD_QF         SPI_CR2_FRXTH

+#define SPI_RXFIFO_THRESHOLD_HF         ((uint32_t)0x00000000)

+

+/**

+  * @}

+  */

+

+/** @defgroup SPI_Interrupt_configuration_definition SPI Interrupt configuration definition

+  * @brief SPI Interrupt definition

+  *        Elements values convention: 0xXXXXXXXX

+  *           - XXXXXXXX  : Interrupt control mask

+  * @{

+  */

+#define SPI_IT_TXE                      SPI_CR2_TXEIE

+#define SPI_IT_RXNE                     SPI_CR2_RXNEIE

+#define SPI_IT_ERR                      SPI_CR2_ERRIE

+/**

+  * @}

+  */

+

+

+/** @defgroup SPI_Flag_definition SPI Flag definition

+  * @brief Flag definition

+  *        Elements values convention: 0xXXXXYYYY

+  *           - XXXX  : Flag register Index

+  *           - YYYY  : Flag mask

+  * @{

+  */

+#define SPI_FLAG_RXNE                   SPI_SR_RXNE   /* SPI status flag: Rx buffer not empty flag */

+#define SPI_FLAG_TXE                    SPI_SR_TXE    /* SPI status flag: Tx buffer empty flag */

+#define SPI_FLAG_BSY                    SPI_SR_BSY    /* SPI status flag: Busy flag */

+#define SPI_FLAG_CRCERR                 SPI_SR_CRCERR /* SPI Error flag: CRC error flag */

+#define SPI_FLAG_MODF                   SPI_SR_MODF   /* SPI Error flag: Mode fault flag */

+#define SPI_FLAG_OVR                    SPI_SR_OVR    /* SPI Error flag: Overrun flag */

+#define SPI_FLAG_FRE                    SPI_SR_FRE    /* SPI Error flag: TI mode frame format error flag */

+#define SPI_FLAG_FTLVL                  SPI_SR_FTLVL  /* SPI fifo transmission level */

+#define SPI_FLAG_FRLVL                  SPI_SR_FRLVL  /* SPI fifo reception level */

+/**

+  * @}

+  */

+

+/** @defgroup SPI_transmission_fifo_status_level SPI Transmission FIFO Status Level

+  * @{

+  */

+#define SPI_FTLVL_EMPTY           ((uint32_t)0x0000)

+#define SPI_FTLVL_QUARTER_FULL    ((uint32_t)0x0800)

+#define SPI_FTLVL_HALF_FULL       ((uint32_t)0x1000)

+#define SPI_FTLVL_FULL            ((uint32_t)0x1800)

+

+/**

+  * @}

+  */

+

+/** @defgroup SPI_reception_fifo_status_level SPI Reception FIFO Status Level

+  * @{

+  */

+#define SPI_FRLVL_EMPTY           ((uint32_t)0x0000)

+#define SPI_FRLVL_QUARTER_FULL    ((uint32_t)0x0200)

+#define SPI_FRLVL_HALF_FULL       ((uint32_t)0x0400)

+#define SPI_FRLVL_FULL            ((uint32_t)0x0600)

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported macros ------------------------------------------------------------*/

+/** @defgroup SPI_Exported_Macros SPI Exported Macros

+  * @{

+  */

+

+/** @brief  Reset SPI handle state

+  * @param  __HANDLE__: SPI handle.

+  * @retval None

+  */

+#define __HAL_SPI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SPI_STATE_RESET)

+

+/** @brief  Enables or disables the specified SPI interrupts.

+  * @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 or 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

+  *            @arg SPI_IT_ERR: Error interrupt enable

+  * @retval None

+  */

+#define __HAL_SPI_ENABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->CR2 |= (__INTERRUPT__))

+#define __HAL_SPI_DISABLE_IT(__HANDLE__, __INTERRUPT__)  ((__HANDLE__)->Instance->CR2 &= (~(__INTERRUPT__)))

+

+/** @brief  Checks if the specified SPI interrupt source is enabled or disabled.

+  * @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.

+  *          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

+  *            @arg SPI_IT_ERR: Error interrupt enable

+  * @retval The new state of __IT__ (TRUE or FALSE).

+  */

+#define __HAL_SPI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

+

+/** @brief  Checks whether the specified SPI flag is set or not.

+  * @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.

+  *        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

+  *            @arg SPI_FLAG_CRCERR: CRC error flag

+  *            @arg SPI_FLAG_MODF: Mode fault flag

+  *            @arg SPI_FLAG_OVR: Overrun flag

+  *            @arg SPI_FLAG_BSY: Busy flag

+  *            @arg SPI_FLAG_FRE: Frame format error flag

+  *            @arg SPI_FLAG_FTLVL: SPI fifo transmission level

+  *            @arg SPI_FLAG_FRLVL: SPI fifo reception level

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define __HAL_SPI_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

+

+/** @brief  Clears the SPI CRCERR pending flag.

+  * @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  Clears the SPI MODF pending flag.

+  * @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_MODFFLAG(__HANDLE__)        \

+   do{                                              \

+     __IO uint32_t tmpreg;                          \

+     tmpreg = (__HANDLE__)->Instance->SR;           \

+     (__HANDLE__)->Instance->CR1 &= (~SPI_CR1_SPE); \

+     UNUSED(tmpreg);                                \

+   } while(0)

+

+/** @brief  Clears the SPI OVR pending flag.

+  * @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_OVRFLAG(__HANDLE__)         \

+   do{                                              \

+     __IO uint32_t tmpreg;                          \

+     tmpreg = (__HANDLE__)->Instance->DR;           \

+     tmpreg = (__HANDLE__)->Instance->SR;           \

+     UNUSED(tmpreg);                                \

+   } while(0)

+

+/** @brief  Clears the SPI FRE pending flag.

+  * @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_FREFLAG(__HANDLE__)         \

+   do{                                              \

+     __IO uint32_t tmpreg;                          \

+     tmpreg = (__HANDLE__)->Instance->SR;           \

+     UNUSED(tmpreg);                                \

+   } while(0)

+

+/** @brief  Enables the SPI.

+  * @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__) ((__HANDLE__)->Instance->CR1 |=  SPI_CR1_SPE)

+

+/** @brief  Disables the SPI.

+  * @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_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= (~SPI_CR1_SPE))

+

+/**

+  * @}

+  */

+

+/* Private macros --------------------------------------------------------*/

+/** @defgroup SPI_Private_Macros   SPI Private Macros

+  * @{

+  */

+

+/** @brief  Sets the SPI transmit-only mode.

+  * @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__) ((__HANDLE__)->Instance->CR1 |= SPI_CR1_BIDIOE)

+

+/** @brief  Sets the SPI receive-only mode.

+  * @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__) ((__HANDLE__)->Instance->CR1 &= (~SPI_CR1_BIDIOE))

+

+/** @brief  Resets the CRC calculation of the SPI.

+  * @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_RESET_CRC(__HANDLE__) do{(__HANDLE__)->Instance->CR1 &= (uint16_t)(~SPI_CR1_CRCEN);\

+                                     (__HANDLE__)->Instance->CR1 |= SPI_CR1_CRCEN;}while(0)

+

+#define IS_SPI_MODE(MODE) (((MODE) == SPI_MODE_SLAVE) || \

+                           ((MODE) == SPI_MODE_MASTER))

+

+#define IS_SPI_DIRECTION(MODE)   (((MODE) == SPI_DIRECTION_2LINES) || \

+                                  ((MODE) == SPI_DIRECTION_2LINES_RXONLY) ||\

+                                  ((MODE) == SPI_DIRECTION_1LINE))

+

+#define IS_SPI_DIRECTION_2LINES(MODE) ((MODE) == SPI_DIRECTION_2LINES)

+

+#define IS_SPI_DIRECTION_2LINES_OR_1LINE(MODE) (((MODE) == SPI_DIRECTION_2LINES)|| \

+                                                 ((MODE) == SPI_DIRECTION_1LINE))

+

+#define IS_SPI_DATASIZE(DATASIZE) (((DATASIZE) == SPI_DATASIZE_16BIT) || \

+                                   ((DATASIZE) == SPI_DATASIZE_15BIT) || \

+                                   ((DATASIZE) == SPI_DATASIZE_14BIT) || \

+                                   ((DATASIZE) == SPI_DATASIZE_13BIT) || \

+                                   ((DATASIZE) == SPI_DATASIZE_12BIT) || \

+                                   ((DATASIZE) == SPI_DATASIZE_11BIT) || \

+                                   ((DATASIZE) == SPI_DATASIZE_10BIT) || \

+                                   ((DATASIZE) == SPI_DATASIZE_9BIT)  || \

+                                   ((DATASIZE) == SPI_DATASIZE_8BIT)  || \

+                                   ((DATASIZE) == SPI_DATASIZE_7BIT)  || \

+                                   ((DATASIZE) == SPI_DATASIZE_6BIT)  || \

+                                   ((DATASIZE) == SPI_DATASIZE_5BIT)  || \

+                                   ((DATASIZE) == SPI_DATASIZE_4BIT))

+

+#define IS_SPI_CPOL(CPOL) (((CPOL) == SPI_POLARITY_LOW) || \

+                           ((CPOL) == SPI_POLARITY_HIGH))

+

+#define IS_SPI_CPHA(CPHA) (((CPHA) == SPI_PHASE_1EDGE) || \

+                           ((CPHA) == SPI_PHASE_2EDGE))

+

+#define IS_SPI_NSS(NSS) (((NSS) == SPI_NSS_SOFT) || \

+                         ((NSS) == SPI_NSS_HARD_INPUT) || \

+                         ((NSS) == SPI_NSS_HARD_OUTPUT))

+

+#define IS_SPI_NSSP(NSSP) (((NSSP) == SPI_NSS_PULSE_ENABLE) || \

+                           ((NSSP) == SPI_NSS_PULSE_DISABLE))

+

+#define IS_SPI_BAUDRATE_PRESCALER(PRESCALER) (((PRESCALER) == SPI_BAUDRATEPRESCALER_2) || \

+                                              ((PRESCALER) == SPI_BAUDRATEPRESCALER_4) || \

+                                              ((PRESCALER) == SPI_BAUDRATEPRESCALER_8) || \

+                                              ((PRESCALER) == SPI_BAUDRATEPRESCALER_16) || \

+                                              ((PRESCALER) == SPI_BAUDRATEPRESCALER_32) || \

+                                              ((PRESCALER) == SPI_BAUDRATEPRESCALER_64) || \

+                                              ((PRESCALER) == SPI_BAUDRATEPRESCALER_128) || \

+                                              ((PRESCALER) == SPI_BAUDRATEPRESCALER_256))

+

+#define IS_SPI_FIRST_BIT(BIT) (((BIT) == SPI_FIRSTBIT_MSB) || \

+                               ((BIT) == SPI_FIRSTBIT_LSB))

+

+#define IS_SPI_TIMODE(MODE) (((MODE) == SPI_TIMODE_DISABLE) || \

+                             ((MODE) == SPI_TIMODE_ENABLE))

+

+#define IS_SPI_CRC_CALCULATION(CALCULATION) (((CALCULATION) == SPI_CRCCALCULATION_DISABLE) || \

+                                             ((CALCULATION) == SPI_CRCCALCULATION_ENABLE))

+

+#define IS_SPI_CRC_LENGTH(LENGTH) (((LENGTH) == SPI_CRC_LENGTH_DATASIZE) ||\

+                                   ((LENGTH) == SPI_CRC_LENGTH_8BIT)  ||   \

+                                   ((LENGTH) == SPI_CRC_LENGTH_16BIT))

+

+#define IS_SPI_CRC_POLYNOMIAL(POLYNOMIAL) (((POLYNOMIAL) >= 0x1) && ((POLYNOMIAL) <= 0xFFFF))

+

+

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup SPI_Exported_Functions SPI Exported Functions

+  * @{

+  */

+

+/** @addtogroup SPI_Exported_Functions_Group1 Initialization and de-initialization functions

+  * @{

+  */

+

+/* Initialization and de-initialization functions  ****************************/

+HAL_StatusTypeDef HAL_SPI_Init(SPI_HandleTypeDef *hspi);

+HAL_StatusTypeDef HAL_SPI_DeInit (SPI_HandleTypeDef *hspi);

+void HAL_SPI_MspInit(SPI_HandleTypeDef *hspi);

+void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi);

+/**

+  * @}

+  */

+

+/** @addtogroup SPI_Exported_Functions_Group2 IO operation functions

+  * @{

+  */

+

+/* IO operation functions *****************************************************/

+HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_SPI_Receive(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_SPI_TransmitReceive(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_SPI_Transmit_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_SPI_Receive_IT(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_SPI_TransmitReceive_IT(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size);

+HAL_StatusTypeDef HAL_SPI_Transmit_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_SPI_Receive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_SPI_TransmitReceive_DMA(SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size);

+HAL_StatusTypeDef HAL_SPI_DMAPause(SPI_HandleTypeDef *hspi);

+HAL_StatusTypeDef HAL_SPI_DMAResume(SPI_HandleTypeDef *hspi);

+HAL_StatusTypeDef HAL_SPI_DMAStop(SPI_HandleTypeDef *hspi);

+

+void HAL_SPI_IRQHandler(SPI_HandleTypeDef *hspi);

+void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi);

+void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi);

+void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi);

+void HAL_SPI_TxHalfCpltCallback(SPI_HandleTypeDef *hspi);

+void HAL_SPI_RxHalfCpltCallback(SPI_HandleTypeDef *hspi);

+void HAL_SPI_TxRxHalfCpltCallback(SPI_HandleTypeDef *hspi);

+void HAL_SPI_ErrorCallback(SPI_HandleTypeDef *hspi);

+/**

+  * @}

+  */

+

+/** @addtogroup SPI_Exported_Functions_Group3 Peripheral State and Errors functions

+  * @{

+  */

+

+/* Peripheral State and Error functions ***************************************/

+HAL_SPI_StateTypeDef HAL_SPI_GetState(SPI_HandleTypeDef *hspi);

+uint32_t             HAL_SPI_GetError(SPI_HandleTypeDef *hspi);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_SPI_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sram.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sram.h
new file mode 100644
index 0000000..a6ea435
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_sram.h
@@ -0,0 +1,195 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_sram.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of SRAM HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_SRAM_H

+#define __STM32F7xx_HAL_SRAM_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_ll_fmc.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+/** @addtogroup SRAM

+  * @{

+  */ 

+

+/* Exported typedef ----------------------------------------------------------*/

+

+/** @defgroup SRAM_Exported_Types SRAM Exported Types

+  * @{

+  */

+/** 

+  * @brief  HAL SRAM State structures definition  

+  */ 

+typedef enum

+{

+  HAL_SRAM_STATE_RESET     = 0x00,  /*!< SRAM not yet initialized or disabled           */

+  HAL_SRAM_STATE_READY     = 0x01,  /*!< SRAM initialized and ready for use             */

+  HAL_SRAM_STATE_BUSY      = 0x02,  /*!< SRAM internal process is ongoing               */

+  HAL_SRAM_STATE_ERROR     = 0x03,  /*!< SRAM error state                               */

+  HAL_SRAM_STATE_PROTECTED = 0x04   /*!< SRAM peripheral NORSRAM device write protected */

+  

+}HAL_SRAM_StateTypeDef;

+

+/** 

+  * @brief  SRAM handle Structure definition  

+  */ 

+typedef struct

+{

+  FMC_NORSRAM_TypeDef           *Instance;  /*!< Register base address                        */ 

+  

+  FMC_NORSRAM_EXTENDED_TypeDef  *Extended;  /*!< Extended mode register base address          */

+  

+  FMC_NORSRAM_InitTypeDef       Init;       /*!< SRAM device control configuration parameters */

+

+  HAL_LockTypeDef               Lock;       /*!< SRAM locking object                          */ 

+  

+  __IO HAL_SRAM_StateTypeDef    State;      /*!< SRAM device access state                     */

+  

+  DMA_HandleTypeDef             *hdma;      /*!< Pointer DMA handler                          */

+  

+}SRAM_HandleTypeDef; 

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/* Exported macro ------------------------------------------------------------*/

+

+/** @defgroup SRAM_Exported_Macros SRAM Exported Macros

+ * @{

+ */

+

+/** @brief Reset SRAM handle state

+  * @param  __HANDLE__: SRAM handle

+  * @retval None

+  */

+#define __HAL_SRAM_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SRAM_STATE_RESET)

+

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup SRAM_Exported_Functions SRAM Exported Functions

+  * @{

+  */

+

+/** @addtogroup SRAM_Exported_Functions_Group1 Initialization and de-initialization functions

+ * @{

+ */

+

+/* Initialization/de-initialization functions  ********************************/

+HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FMC_NORSRAM_TimingTypeDef *Timing, FMC_NORSRAM_TimingTypeDef *ExtTiming);

+HAL_StatusTypeDef HAL_SRAM_DeInit(SRAM_HandleTypeDef *hsram);

+void HAL_SRAM_MspInit(SRAM_HandleTypeDef *hsram);

+void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef *hsram);

+

+/**

+  * @}

+  */

+

+/** @addtogroup SRAM_Exported_Functions_Group2 Input Output and memory control functions

+ * @{

+ */

+

+/* I/O operation functions  ***************************************************/

+HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pDstBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pSrcBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pDstBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pSrcBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize);

+HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize);

+

+void HAL_SRAM_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma);

+void HAL_SRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma);

+

+/**

+  * @}

+  */

+  

+/** @addtogroup SRAM_Exported_Functions_Group3 Control functions

+ * @{

+ */

+

+/* SRAM Control functions  ****************************************************/

+HAL_StatusTypeDef HAL_SRAM_WriteOperation_Enable(SRAM_HandleTypeDef *hsram);

+HAL_StatusTypeDef HAL_SRAM_WriteOperation_Disable(SRAM_HandleTypeDef *hsram);

+

+/**

+  * @}

+  */

+

+/** @addtogroup SRAM_Exported_Functions_Group4 Peripheral State functions

+ * @{

+ */

+

+/* SRAM  State functions ******************************************************/

+HAL_SRAM_StateTypeDef HAL_SRAM_GetState(SRAM_HandleTypeDef *hsram);

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_SRAM_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_tim.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_tim.h
new file mode 100644
index 0000000..a479e4e
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_tim.h
@@ -0,0 +1,1546 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_tim.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of TIM HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_TIM_H

+#define __STM32F7xx_HAL_TIM_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup TIM

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup TIM_Exported_Types TIM Exported Types

+  * @{

+  */

+  

+/** 

+  * @brief  TIM Time base Configuration Structure definition  

+  */

+typedef struct

+{

+  uint32_t Prescaler;         /*!< Specifies the prescaler value used to divide the TIM clock.

+                                   This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */

+

+  uint32_t CounterMode;       /*!< Specifies the counter mode.

+                                   This parameter can be a value of @ref TIM_Counter_Mode */

+

+  uint32_t Period;            /*!< Specifies the period value to be loaded into the active

+                                   Auto-Reload Register at the next update event.

+                                   This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF.  */

+

+  uint32_t ClockDivision;     /*!< Specifies the clock division.

+                                   This parameter can be a value of @ref TIM_ClockDivision */

+

+  uint32_t RepetitionCounter;  /*!< Specifies the repetition counter value. Each time the RCR downcounter

+                                    reaches zero, an update event is generated and counting restarts

+                                    from the RCR value (N).

+                                    This means in PWM mode that (N+1) corresponds to:

+                                        - the number of PWM periods in edge-aligned mode

+                                        - the number of half PWM period in center-aligned mode

+                                     This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. 

+                                     @note This parameter is valid only for TIM1 and TIM8. */

+} TIM_Base_InitTypeDef;

+

+/** 

+  * @brief  TIM Output Compare Configuration Structure definition  

+  */

+

+typedef struct

+{

+  uint32_t OCMode;        /*!< Specifies the TIM mode.

+                               This parameter can be a value of @ref TIMEx_Output_Compare_and_PWM_modes */

+

+  uint32_t Pulse;         /*!< Specifies the pulse value to be loaded into the Capture Compare Register. 

+                               This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */

+

+  uint32_t OCPolarity;    /*!< Specifies the output polarity.

+                               This parameter can be a value of @ref TIM_Output_Compare_Polarity */

+

+  uint32_t OCNPolarity;   /*!< Specifies the complementary output polarity.

+                               This parameter can be a value of @ref TIM_Output_Compare_N_Polarity

+                               @note This parameter is valid only for TIM1 and TIM8. */

+  

+  uint32_t OCFastMode;   /*!< Specifies the Fast mode state.

+                               This parameter can be a value of @ref TIM_Output_Fast_State

+                               @note This parameter is valid only in PWM1 and PWM2 mode. */

+

+

+  uint32_t OCIdleState;   /*!< Specifies the TIM Output Compare pin state during Idle state.

+                               This parameter can be a value of @ref TIM_Output_Compare_Idle_State

+                               @note This parameter is valid only for TIM1 and TIM8. */

+

+  uint32_t OCNIdleState;  /*!< Specifies the TIM Output Compare pin state during Idle state.

+                               This parameter can be a value of @ref TIM_Output_Compare_N_Idle_State

+                               @note This parameter is valid only for TIM1 and TIM8. */

+} TIM_OC_InitTypeDef;  

+

+/** 

+  * @brief  TIM One Pulse Mode Configuration Structure definition  

+  */

+typedef struct

+{

+  uint32_t OCMode;        /*!< Specifies the TIM mode.

+                               This parameter can be a value of @ref TIMEx_Output_Compare_and_PWM_modes */

+

+  uint32_t Pulse;         /*!< Specifies the pulse value to be loaded into the Capture Compare Register. 

+                               This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */

+

+  uint32_t OCPolarity;    /*!< Specifies the output polarity.

+                               This parameter can be a value of @ref TIM_Output_Compare_Polarity */

+

+  uint32_t OCNPolarity;   /*!< Specifies the complementary output polarity.

+                               This parameter can be a value of @ref TIM_Output_Compare_N_Polarity

+                               @note This parameter is valid only for TIM1 and TIM8. */

+

+  uint32_t OCIdleState;   /*!< Specifies the TIM Output Compare pin state during Idle state.

+                               This parameter can be a value of @ref TIM_Output_Compare_Idle_State

+                               @note This parameter is valid only for TIM1 and TIM8. */

+

+  uint32_t OCNIdleState;  /*!< Specifies the TIM Output Compare pin state during Idle state.

+                               This parameter can be a value of @ref TIM_Output_Compare_N_Idle_State

+                               @note This parameter is valid only for TIM1 and TIM8. */

+

+  uint32_t ICPolarity;    /*!< Specifies the active edge of the input signal.

+                               This parameter can be a value of @ref TIM_Input_Capture_Polarity */

+

+  uint32_t ICSelection;   /*!< Specifies the input.

+                              This parameter can be a value of @ref TIM_Input_Capture_Selection */

+

+  uint32_t ICFilter;      /*!< Specifies the input capture filter.

+                              This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */  

+} TIM_OnePulse_InitTypeDef;  

+

+

+/** 

+  * @brief  TIM Input Capture Configuration Structure definition  

+  */

+

+typedef struct

+{

+  uint32_t  ICPolarity;   /*!< Specifies the active edge of the input signal.

+                               This parameter can be a value of @ref TIM_Input_Capture_Polarity */

+

+  uint32_t ICSelection;  /*!< Specifies the input.

+                              This parameter can be a value of @ref TIM_Input_Capture_Selection */

+

+  uint32_t ICPrescaler;  /*!< Specifies the Input Capture Prescaler.

+                              This parameter can be a value of @ref TIM_Input_Capture_Prescaler */

+

+  uint32_t ICFilter;     /*!< Specifies the input capture filter.

+                              This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */

+} TIM_IC_InitTypeDef;

+

+/** 

+  * @brief  TIM Encoder Configuration Structure definition  

+  */

+

+typedef struct

+{

+  uint32_t EncoderMode;   /*!< Specifies the active edge of the input signal.

+                               This parameter can be a value of @ref TIM_Encoder_Mode */

+                                  

+  uint32_t IC1Polarity;   /*!< Specifies the active edge of the input signal.

+                               This parameter can be a value of @ref TIM_Input_Capture_Polarity */

+

+  uint32_t IC1Selection;  /*!< Specifies the input.

+                               This parameter can be a value of @ref TIM_Input_Capture_Selection */

+

+  uint32_t IC1Prescaler;  /*!< Specifies the Input Capture Prescaler.

+                               This parameter can be a value of @ref TIM_Input_Capture_Prescaler */

+

+  uint32_t IC1Filter;     /*!< Specifies the input capture filter.

+                               This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */

+                                  

+  uint32_t IC2Polarity;   /*!< Specifies the active edge of the input signal.

+                               This parameter can be a value of @ref TIM_Input_Capture_Polarity */

+

+  uint32_t IC2Selection;  /*!< Specifies the input.

+                              This parameter can be a value of @ref TIM_Input_Capture_Selection */

+

+  uint32_t IC2Prescaler;  /*!< Specifies the Input Capture Prescaler.

+                               This parameter can be a value of @ref TIM_Input_Capture_Prescaler */

+

+  uint32_t IC2Filter;     /*!< Specifies the input capture filter.

+                               This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */

+} TIM_Encoder_InitTypeDef;

+

+/** 

+  * @brief  Clock Configuration Handle Structure definition  

+  */ 

+typedef struct

+{

+  uint32_t ClockSource;     /*!< TIM clock sources. 

+                                 This parameter can be a value of @ref TIM_Clock_Source */ 

+  uint32_t ClockPolarity;   /*!< TIM clock polarity. 

+                                 This parameter can be a value of @ref TIM_Clock_Polarity */

+  uint32_t ClockPrescaler;  /*!< TIM clock prescaler. 

+                                 This parameter can be a value of @ref TIM_Clock_Prescaler */

+  uint32_t ClockFilter;    /*!< TIM clock filter. 

+                                This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */

+}TIM_ClockConfigTypeDef;

+

+/** 

+  * @brief  Clear Input Configuration Handle Structure definition  

+  */ 

+typedef struct

+{ 

+  uint32_t ClearInputState;      /*!< TIM clear Input state. 

+                                      This parameter can be ENABLE or DISABLE */  

+  uint32_t ClearInputSource;     /*!< TIM clear Input sources. 

+                                      This parameter can be a value of @ref TIMEx_ClearInput_Source */ 

+  uint32_t ClearInputPolarity;   /*!< TIM Clear Input polarity. 

+                                      This parameter can be a value of @ref TIM_ClearInput_Polarity */

+  uint32_t ClearInputPrescaler;  /*!< TIM Clear Input prescaler. 

+                                      This parameter can be a value of @ref TIM_ClearInput_Prescaler */

+  uint32_t ClearInputFilter;    /*!< TIM Clear Input filter. 

+                                     This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */

+}TIM_ClearInputConfigTypeDef;

+

+/** 

+  * @brief  TIM Slave configuration Structure definition  

+  */ 

+typedef struct {

+  uint32_t  SlaveMode;         /*!< Slave mode selection 

+                                  This parameter can be a value of @ref TIMEx_Slave_Mode */ 

+  uint32_t  InputTrigger;      /*!< Input Trigger source 

+                                  This parameter can be a value of @ref TIM_Trigger_Selection */

+  uint32_t  TriggerPolarity;   /*!< Input Trigger polarity 

+                                  This parameter can be a value of @ref TIM_Trigger_Polarity */

+  uint32_t  TriggerPrescaler;  /*!< Input trigger prescaler 

+                                  This parameter can be a value of @ref TIM_Trigger_Prescaler */

+  uint32_t  TriggerFilter;     /*!< Input trigger filter 

+                                  This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */  

+

+}TIM_SlaveConfigTypeDef;

+

+/** 

+  * @brief  HAL State structures definition  

+  */ 

+typedef enum

+{

+  HAL_TIM_STATE_RESET             = 0x00,    /*!< Peripheral not yet initialized or disabled  */

+  HAL_TIM_STATE_READY             = 0x01,    /*!< Peripheral Initialized and ready for use    */

+  HAL_TIM_STATE_BUSY              = 0x02,    /*!< An internal process is ongoing              */

+  HAL_TIM_STATE_TIMEOUT           = 0x03,    /*!< Timeout state                               */

+  HAL_TIM_STATE_ERROR             = 0x04     /*!< Reception process is ongoing                */

+}HAL_TIM_StateTypeDef;

+

+/** 

+  * @brief  HAL Active channel structures definition  

+  */ 

+typedef enum

+{

+  HAL_TIM_ACTIVE_CHANNEL_1        = 0x01,    /*!< The active channel is 1     */

+  HAL_TIM_ACTIVE_CHANNEL_2        = 0x02,    /*!< The active channel is 2     */

+  HAL_TIM_ACTIVE_CHANNEL_3        = 0x04,    /*!< The active channel is 3     */

+  HAL_TIM_ACTIVE_CHANNEL_4        = 0x08,    /*!< The active channel is 4     */

+  HAL_TIM_ACTIVE_CHANNEL_CLEARED  = 0x00     /*!< All active channels cleared */

+}HAL_TIM_ActiveChannel;

+

+/** 

+  * @brief  TIM Time Base Handle Structure definition  

+  */ 

+typedef struct

+{

+  TIM_TypeDef                 *Instance;     /*!< Register base address             */

+  TIM_Base_InitTypeDef        Init;          /*!< TIM Time Base required parameters */

+  HAL_TIM_ActiveChannel       Channel;       /*!< Active channel                    */

+  DMA_HandleTypeDef           *hdma[7];      /*!< DMA Handlers array

+                                             This array is accessed by a @ref DMA_Handle_index */

+  HAL_LockTypeDef             Lock;          /*!< Locking object                    */

+  __IO HAL_TIM_StateTypeDef   State;         /*!< TIM operation state               */

+}TIM_HandleTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup TIM_Exported_Constants  TIM Exported Constants

+  * @{

+  */

+

+/** @defgroup TIM_Input_Channel_Polarity TIM Input Channel Polarity

+  * @{

+  */

+#define  TIM_INPUTCHANNELPOLARITY_RISING      ((uint32_t)0x00000000)            /*!< Polarity for TIx source */

+#define  TIM_INPUTCHANNELPOLARITY_FALLING     (TIM_CCER_CC1P)                   /*!< Polarity for TIx source */

+#define  TIM_INPUTCHANNELPOLARITY_BOTHEDGE    (TIM_CCER_CC1P | TIM_CCER_CC1NP)  /*!< Polarity for TIx source */

+/**

+  * @}

+  */

+

+/** @defgroup TIM_ETR_Polarity  TIM ETR Polarity

+  * @{

+  */

+#define TIM_ETRPOLARITY_INVERTED              (TIM_SMCR_ETP)                    /*!< Polarity for ETR source */

+#define TIM_ETRPOLARITY_NONINVERTED           ((uint32_t)0x0000)                /*!< Polarity for ETR source */

+/**

+  * @}

+  */

+

+/** @defgroup TIM_ETR_Prescaler  TIM ETR Prescaler

+  * @{

+  */

+#define TIM_ETRPRESCALER_DIV1                 ((uint32_t)0x0000)                /*!< No prescaler is used */

+#define TIM_ETRPRESCALER_DIV2                 (TIM_SMCR_ETPS_0)                 /*!< ETR input source is divided by 2 */

+#define TIM_ETRPRESCALER_DIV4                 (TIM_SMCR_ETPS_1)                 /*!< ETR input source is divided by 4 */

+#define TIM_ETRPRESCALER_DIV8                 (TIM_SMCR_ETPS)                   /*!< ETR input source is divided by 8 */

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Counter_Mode  TIM Counter Mode

+  * @{

+  */

+#define TIM_COUNTERMODE_UP                 ((uint32_t)0x0000)

+#define TIM_COUNTERMODE_DOWN               TIM_CR1_DIR

+#define TIM_COUNTERMODE_CENTERALIGNED1     TIM_CR1_CMS_0

+#define TIM_COUNTERMODE_CENTERALIGNED2     TIM_CR1_CMS_1

+#define TIM_COUNTERMODE_CENTERALIGNED3     TIM_CR1_CMS

+/**

+  * @}

+  */

+

+/** @defgroup TIM_ClockDivision TIM Clock Division

+  * @{

+  */

+#define TIM_CLOCKDIVISION_DIV1                       ((uint32_t)0x0000)

+#define TIM_CLOCKDIVISION_DIV2                       (TIM_CR1_CKD_0)

+#define TIM_CLOCKDIVISION_DIV4                       (TIM_CR1_CKD_1)

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Output_Compare_State TIM Output Compare State

+  * @{

+  */

+#define TIM_OUTPUTSTATE_DISABLE            ((uint32_t)0x0000)

+#define TIM_OUTPUTSTATE_ENABLE             (TIM_CCER_CC1E)

+

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Output_Fast_State  TIM Output Fast State 

+  * @{

+  */

+#define TIM_OCFAST_DISABLE                ((uint32_t)0x0000)

+#define TIM_OCFAST_ENABLE                 (TIM_CCMR1_OC1FE)

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Output_Compare_N_State TIM Complementary Output Compare State

+  * @{

+  */

+#define TIM_OUTPUTNSTATE_DISABLE            ((uint32_t)0x0000)

+#define TIM_OUTPUTNSTATE_ENABLE             (TIM_CCER_CC1NE)

+/**

+  * @}

+  */ 

+

+/** @defgroup TIM_Output_Compare_Polarity TIM Output Compare Polarity 

+  * @{

+  */

+#define TIM_OCPOLARITY_HIGH                ((uint32_t)0x0000)

+#define TIM_OCPOLARITY_LOW                 (TIM_CCER_CC1P)

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Output_Compare_N_Polarity TIM Complementary Output Compare Polarity

+  * @{

+  */

+#define TIM_OCNPOLARITY_HIGH               ((uint32_t)0x0000)

+#define TIM_OCNPOLARITY_LOW                (TIM_CCER_CC1NP)

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Output_Compare_Idle_State  TIM Output Compare Idle State

+  * @{

+  */

+#define TIM_OCIDLESTATE_SET                (TIM_CR2_OIS1)

+#define TIM_OCIDLESTATE_RESET              ((uint32_t)0x0000)

+/**

+  * @}

+  */ 

+

+/** @defgroup TIM_Output_Compare_N_Idle_State  TIM Output Compare N Idle State

+  * @{

+  */

+#define TIM_OCNIDLESTATE_SET               (TIM_CR2_OIS1N)

+#define TIM_OCNIDLESTATE_RESET             ((uint32_t)0x0000)

+/**

+  * @}

+  */ 

+

+/** @defgroup TIM_Input_Capture_Polarity  TIM Input Capture Polarity 

+  * @{

+  */

+#define  TIM_ICPOLARITY_RISING             TIM_INPUTCHANNELPOLARITY_RISING

+#define  TIM_ICPOLARITY_FALLING            TIM_INPUTCHANNELPOLARITY_FALLING

+#define  TIM_ICPOLARITY_BOTHEDGE           TIM_INPUTCHANNELPOLARITY_BOTHEDGE

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Input_Capture_Selection  TIM Input Capture Selection

+  * @{

+  */

+#define TIM_ICSELECTION_DIRECTTI           (TIM_CCMR1_CC1S_0)   /*!< TIM Input 1, 2, 3 or 4 is selected to be 

+                                                                     connected to IC1, IC2, IC3 or IC4, respectively */

+#define TIM_ICSELECTION_INDIRECTTI         (TIM_CCMR1_CC1S_1)   /*!< TIM Input 1, 2, 3 or 4 is selected to be

+                                                                     connected to IC2, IC1, IC4 or IC3, respectively */

+#define TIM_ICSELECTION_TRC                (TIM_CCMR1_CC1S)     /*!< TIM Input 1, 2, 3 or 4 is selected to be connected to TRC */

+

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Input_Capture_Prescaler  TIM Input Capture Prescaler

+  * @{

+  */

+#define TIM_ICPSC_DIV1                     ((uint32_t)0x0000)       /*!< Capture performed each time an edge is detected on the capture input */

+#define TIM_ICPSC_DIV2                     (TIM_CCMR1_IC1PSC_0)     /*!< Capture performed once every 2 events */

+#define TIM_ICPSC_DIV4                     (TIM_CCMR1_IC1PSC_1)     /*!< Capture performed once every 4 events */

+#define TIM_ICPSC_DIV8                     (TIM_CCMR1_IC1PSC)       /*!< Capture performed once every 8 events */

+/**

+  * @}

+  */ 

+

+/** @defgroup TIM_One_Pulse_Mode TIM One Pulse Mode

+  * @{

+  */

+#define TIM_OPMODE_SINGLE                  (TIM_CR1_OPM)

+#define TIM_OPMODE_REPETITIVE              ((uint32_t)0x0000)

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Encoder_Mode TIM Encoder Mode

+  * @{

+  */

+#define TIM_ENCODERMODE_TI1                (TIM_SMCR_SMS_0)

+#define TIM_ENCODERMODE_TI2                (TIM_SMCR_SMS_1)

+#define TIM_ENCODERMODE_TI12               (TIM_SMCR_SMS_1 | TIM_SMCR_SMS_0)

+

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Interrupt_definition  TIM Interrupt definition

+  * @{

+  */ 

+#define TIM_IT_UPDATE           (TIM_DIER_UIE)

+#define TIM_IT_CC1              (TIM_DIER_CC1IE)

+#define TIM_IT_CC2              (TIM_DIER_CC2IE)

+#define TIM_IT_CC3              (TIM_DIER_CC3IE)

+#define TIM_IT_CC4              (TIM_DIER_CC4IE)

+#define TIM_IT_COM              (TIM_DIER_COMIE)

+#define TIM_IT_TRIGGER          (TIM_DIER_TIE)

+#define TIM_IT_BREAK            (TIM_DIER_BIE)

+/**

+  * @}

+  */

+  

+/** @defgroup TIM_Commutation_Source  TIM Commutation Source 

+  * @{

+  */  

+#define TIM_COMMUTATION_TRGI              (TIM_CR2_CCUS)

+#define TIM_COMMUTATION_SOFTWARE          ((uint32_t)0x0000)

+/**

+  * @}

+  */

+

+/** @defgroup TIM_DMA_sources  TIM DMA sources

+  * @{

+  */

+#define TIM_DMA_UPDATE                     (TIM_DIER_UDE)

+#define TIM_DMA_CC1                        (TIM_DIER_CC1DE)

+#define TIM_DMA_CC2                        (TIM_DIER_CC2DE)

+#define TIM_DMA_CC3                        (TIM_DIER_CC3DE)

+#define TIM_DMA_CC4                        (TIM_DIER_CC4DE)

+#define TIM_DMA_COM                        (TIM_DIER_COMDE)

+#define TIM_DMA_TRIGGER                    (TIM_DIER_TDE)

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Event_Source  TIM Event Source 

+  * @{

+  */

+#define TIM_EVENTSOURCE_UPDATE              TIM_EGR_UG  

+#define TIM_EVENTSOURCE_CC1                 TIM_EGR_CC1G

+#define TIM_EVENTSOURCE_CC2                 TIM_EGR_CC2G

+#define TIM_EVENTSOURCE_CC3                 TIM_EGR_CC3G

+#define TIM_EVENTSOURCE_CC4                 TIM_EGR_CC4G

+#define TIM_EVENTSOURCE_COM                 TIM_EGR_COMG

+#define TIM_EVENTSOURCE_TRIGGER             TIM_EGR_TG  

+#define TIM_EVENTSOURCE_BREAK               TIM_EGR_BG 

+#define TIM_EVENTSOURCE_BREAK2              TIM_EGR_B2G   

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Flag_definition  TIM Flag definition

+  * @{

+  */

+#define TIM_FLAG_UPDATE                    (TIM_SR_UIF)

+#define TIM_FLAG_CC1                       (TIM_SR_CC1IF)

+#define TIM_FLAG_CC2                       (TIM_SR_CC2IF)

+#define TIM_FLAG_CC3                       (TIM_SR_CC3IF)

+#define TIM_FLAG_CC4                       (TIM_SR_CC4IF)

+#define TIM_FLAG_COM                       (TIM_SR_COMIF)

+#define TIM_FLAG_TRIGGER                   (TIM_SR_TIF)

+#define TIM_FLAG_BREAK                     (TIM_SR_BIF)

+#define TIM_FLAG_BREAK2                    (TIM_SR_B2IF)

+#define TIM_FLAG_CC1OF                     (TIM_SR_CC1OF)

+#define TIM_FLAG_CC2OF                     (TIM_SR_CC2OF)

+#define TIM_FLAG_CC3OF                     (TIM_SR_CC3OF)

+#define TIM_FLAG_CC4OF                     (TIM_SR_CC4OF)

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Clock_Source  TIM Clock Source

+  * @{

+  */

+#define	TIM_CLOCKSOURCE_ETRMODE2    (TIM_SMCR_ETPS_1) 

+#define	TIM_CLOCKSOURCE_INTERNAL    (TIM_SMCR_ETPS_0) 

+#define	TIM_CLOCKSOURCE_ITR0        ((uint32_t)0x0000)

+#define	TIM_CLOCKSOURCE_ITR1        (TIM_SMCR_TS_0)

+#define	TIM_CLOCKSOURCE_ITR2        (TIM_SMCR_TS_1)

+#define	TIM_CLOCKSOURCE_ITR3        (TIM_SMCR_TS_0 | TIM_SMCR_TS_1)

+#define	TIM_CLOCKSOURCE_TI1ED       (TIM_SMCR_TS_2)

+#define	TIM_CLOCKSOURCE_TI1         (TIM_SMCR_TS_0 | TIM_SMCR_TS_2)

+#define	TIM_CLOCKSOURCE_TI2         (TIM_SMCR_TS_1 | TIM_SMCR_TS_2)

+#define	TIM_CLOCKSOURCE_ETRMODE1    (TIM_SMCR_TS)

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Clock_Polarity  TIM Clock Polarity

+  * @{

+  */

+#define TIM_CLOCKPOLARITY_INVERTED           TIM_ETRPOLARITY_INVERTED          /*!< Polarity for ETRx clock sources */ 

+#define TIM_CLOCKPOLARITY_NONINVERTED        TIM_ETRPOLARITY_NONINVERTED       /*!< Polarity for ETRx clock sources */ 

+#define TIM_CLOCKPOLARITY_RISING             TIM_INPUTCHANNELPOLARITY_RISING   /*!< Polarity for TIx clock sources */ 

+#define TIM_CLOCKPOLARITY_FALLING            TIM_INPUTCHANNELPOLARITY_FALLING   /*!< Polarity for TIx clock sources */ 

+#define TIM_CLOCKPOLARITY_BOTHEDGE           TIM_INPUTCHANNELPOLARITY_BOTHEDGE  /*!< Polarity for TIx clock sources */ 

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Clock_Prescaler  TIM Clock Prescaler

+  * @{

+  */

+#define TIM_CLOCKPRESCALER_DIV1              TIM_ETRPRESCALER_DIV1     /*!< No prescaler is used */

+#define TIM_CLOCKPRESCALER_DIV2              TIM_ETRPRESCALER_DIV2     /*!< Prescaler for External ETR Clock: Capture performed once every 2 events. */

+#define TIM_CLOCKPRESCALER_DIV4              TIM_ETRPRESCALER_DIV4     /*!< Prescaler for External ETR Clock: Capture performed once every 4 events. */

+#define TIM_CLOCKPRESCALER_DIV8              TIM_ETRPRESCALER_DIV8     /*!< Prescaler for External ETR Clock: Capture performed once every 8 events. */

+/**

+  * @}

+  */

+

+/** @defgroup TIM_ClearInput_Polarity  TIM Clear Input Polarity

+  * @{

+  */

+#define TIM_CLEARINPUTPOLARITY_INVERTED           TIM_ETRPOLARITY_INVERTED                    /*!< Polarity for ETRx pin */ 

+#define TIM_CLEARINPUTPOLARITY_NONINVERTED        TIM_ETRPOLARITY_NONINVERTED                 /*!< Polarity for ETRx pin */ 

+/**

+  * @}

+  */

+

+/** @defgroup TIM_ClearInput_Prescaler TIM Clear Input Prescaler

+  * @{

+  */

+#define TIM_CLEARINPUTPRESCALER_DIV1                    TIM_ETRPRESCALER_DIV1      /*!< No prescaler is used */

+#define TIM_CLEARINPUTPRESCALER_DIV2                    TIM_ETRPRESCALER_DIV2      /*!< Prescaler for External ETR pin: Capture performed once every 2 events. */

+#define TIM_CLEARINPUTPRESCALER_DIV4                    TIM_ETRPRESCALER_DIV4      /*!< Prescaler for External ETR pin: Capture performed once every 4 events. */

+#define TIM_CLEARINPUTPRESCALER_DIV8                    TIM_ETRPRESCALER_DIV8        /*!< Prescaler for External ETR pin: Capture performed once every 8 events. */

+/**

+  * @}

+  */

+

+/** @defgroup TIM_OSSR_Off_State_Selection_for_Run_mode_state TIM OSSR OffState Selection for Run mode state

+  * @{

+  */  

+#define TIM_OSSR_ENABLE 	      (TIM_BDTR_OSSR)

+#define TIM_OSSR_DISABLE          ((uint32_t)0x0000)

+/**

+  * @}

+  */

+  

+/** @defgroup TIM_OSSI_Off_State_Selection_for_Idle_mode_state TIM OSSI OffState Selection for Idle mode state

+  * @{

+  */

+#define TIM_OSSI_ENABLE	 	    (TIM_BDTR_OSSI)

+#define TIM_OSSI_DISABLE            ((uint32_t)0x0000)

+/**

+  * @}

+  */

+  

+/** @defgroup TIM_Lock_level  TIM Lock level

+  * @{

+  */

+#define TIM_LOCKLEVEL_OFF	   ((uint32_t)0x0000)

+#define TIM_LOCKLEVEL_1            (TIM_BDTR_LOCK_0)

+#define TIM_LOCKLEVEL_2            (TIM_BDTR_LOCK_1)

+#define TIM_LOCKLEVEL_3            (TIM_BDTR_LOCK)

+/**

+  * @}

+  */  

+/** @defgroup TIM_Break_Input_enable_disable  TIM Break Input State

+  * @{

+  */                         

+#define TIM_BREAK_ENABLE          (TIM_BDTR_BKE)

+#define TIM_BREAK_DISABLE         ((uint32_t)0x0000)

+/**

+  * @}

+  */

+  

+/** @defgroup TIM_Break_Polarity  TIM Break Polarity 

+  * @{

+  */

+#define TIM_BREAKPOLARITY_LOW        ((uint32_t)0x0000)

+#define TIM_BREAKPOLARITY_HIGH       (TIM_BDTR_BKP)

+/**

+  * @}

+  */

+  

+/** @defgroup TIM_AOE_Bit_Set_Reset  TIM AOE Bit State

+  * @{

+  */

+#define TIM_AUTOMATICOUTPUT_ENABLE           (TIM_BDTR_AOE)

+#define	TIM_AUTOMATICOUTPUT_DISABLE          ((uint32_t)0x0000)

+/**

+  * @}

+  */  

+  

+/** @defgroup TIM_Master_Mode_Selection TIM Master Mode Selection

+  * @{

+  */  

+#define	TIM_TRGO_RESET            ((uint32_t)0x0000)             

+#define	TIM_TRGO_ENABLE           (TIM_CR2_MMS_0)           

+#define	TIM_TRGO_UPDATE           (TIM_CR2_MMS_1)             

+#define	TIM_TRGO_OC1              ((TIM_CR2_MMS_1 | TIM_CR2_MMS_0))    

+#define	TIM_TRGO_OC1REF           (TIM_CR2_MMS_2)           

+#define	TIM_TRGO_OC2REF           ((TIM_CR2_MMS_2 | TIM_CR2_MMS_0))          

+#define	TIM_TRGO_OC3REF           ((TIM_CR2_MMS_2 | TIM_CR2_MMS_1))           

+#define	TIM_TRGO_OC4REF           ((TIM_CR2_MMS_2 | TIM_CR2_MMS_1 | TIM_CR2_MMS_0))   

+/**

+  * @}

+  */ 

+

+/** @defgroup TIM_Master_Slave_Mode  TIM Master Slave Mode

+  * @{

+  */

+#define TIM_MASTERSLAVEMODE_ENABLE          ((uint32_t)0x0080)

+#define TIM_MASTERSLAVEMODE_DISABLE         ((uint32_t)0x0000)

+/**

+  * @}

+  */ 

+  

+/** @defgroup TIM_Trigger_Selection  TIM Trigger Selection

+  * @{

+  */

+#define TIM_TS_ITR0                        ((uint32_t)0x0000)

+#define TIM_TS_ITR1                        ((uint32_t)0x0010)

+#define TIM_TS_ITR2                        ((uint32_t)0x0020)

+#define TIM_TS_ITR3                        ((uint32_t)0x0030)

+#define TIM_TS_TI1F_ED                     ((uint32_t)0x0040)

+#define TIM_TS_TI1FP1                      ((uint32_t)0x0050)

+#define TIM_TS_TI2FP2                      ((uint32_t)0x0060)

+#define TIM_TS_ETRF                        ((uint32_t)0x0070)

+#define TIM_TS_NONE                        ((uint32_t)0xFFFF)

+/**

+  * @}

+  */  

+

+/** @defgroup TIM_Trigger_Polarity TIM Trigger Polarity

+  * @{

+  */

+#define TIM_TRIGGERPOLARITY_INVERTED           TIM_ETRPOLARITY_INVERTED      /*!< Polarity for ETRx trigger sources */ 

+#define TIM_TRIGGERPOLARITY_NONINVERTED        TIM_ETRPOLARITY_NONINVERTED   /*!< Polarity for ETRx trigger sources */ 

+#define TIM_TRIGGERPOLARITY_RISING             TIM_INPUTCHANNELPOLARITY_RISING        /*!< Polarity for TIxFPx or TI1_ED trigger sources */ 

+#define TIM_TRIGGERPOLARITY_FALLING            TIM_INPUTCHANNELPOLARITY_FALLING       /*!< Polarity for TIxFPx or TI1_ED trigger sources */ 

+#define TIM_TRIGGERPOLARITY_BOTHEDGE           TIM_INPUTCHANNELPOLARITY_BOTHEDGE      /*!< Polarity for TIxFPx or TI1_ED trigger sources */ 

+/**

+  * @}

+  */

+

+/** @defgroup TIM_Trigger_Prescaler TIM Trigger Prescaler

+  * @{

+  */

+#define TIM_TRIGGERPRESCALER_DIV1             TIM_ETRPRESCALER_DIV1     /*!< No prescaler is used */

+#define TIM_TRIGGERPRESCALER_DIV2             TIM_ETRPRESCALER_DIV2     /*!< Prescaler for External ETR Trigger: Capture performed once every 2 events. */

+#define TIM_TRIGGERPRESCALER_DIV4             TIM_ETRPRESCALER_DIV4     /*!< Prescaler for External ETR Trigger: Capture performed once every 4 events. */

+#define TIM_TRIGGERPRESCALER_DIV8             TIM_ETRPRESCALER_DIV8     /*!< Prescaler for External ETR Trigger: Capture performed once every 8 events. */

+/**

+  * @}

+  */

+

+

+/** @defgroup TIM_TI1_Selection TIM TI1 Selection

+  * @{

+  */

+#define TIM_TI1SELECTION_CH1                ((uint32_t)0x0000)

+#define TIM_TI1SELECTION_XORCOMBINATION     (TIM_CR2_TI1S)

+/**

+  * @}

+  */ 

+

+/** @defgroup TIM_DMA_Base_address  TIM DMA Base address

+  * @{

+  */

+#define TIM_DMABASE_CR1                    (0x00000000)

+#define TIM_DMABASE_CR2                    (0x00000001)

+#define TIM_DMABASE_SMCR                   (0x00000002)

+#define TIM_DMABASE_DIER                   (0x00000003)

+#define TIM_DMABASE_SR                     (0x00000004)

+#define TIM_DMABASE_EGR                    (0x00000005)

+#define TIM_DMABASE_CCMR1                  (0x00000006)

+#define TIM_DMABASE_CCMR2                  (0x00000007)

+#define TIM_DMABASE_CCER                   (0x00000008)

+#define TIM_DMABASE_CNT                    (0x00000009)

+#define TIM_DMABASE_PSC                    (0x0000000A)

+#define TIM_DMABASE_ARR                    (0x0000000B)

+#define TIM_DMABASE_RCR                    (0x0000000C)

+#define TIM_DMABASE_CCR1                   (0x0000000D)

+#define TIM_DMABASE_CCR2                   (0x0000000E)

+#define TIM_DMABASE_CCR3                   (0x0000000F)

+#define TIM_DMABASE_CCR4                   (0x00000010)

+#define TIM_DMABASE_BDTR                   (0x00000011)

+#define TIM_DMABASE_DCR                    (0x00000012)

+#define TIM_DMABASE_OR                     (0x00000013)

+/**

+  * @}

+  */ 

+

+/** @defgroup TIM_DMA_Burst_Length  TIM DMA Burst Length 

+  * @{

+  */

+#define TIM_DMABURSTLENGTH_1TRANSFER           (0x00000000)

+#define TIM_DMABURSTLENGTH_2TRANSFERS          (0x00000100)

+#define TIM_DMABURSTLENGTH_3TRANSFERS          (0x00000200)

+#define TIM_DMABURSTLENGTH_4TRANSFERS          (0x00000300)

+#define TIM_DMABURSTLENGTH_5TRANSFERS          (0x00000400)

+#define TIM_DMABURSTLENGTH_6TRANSFERS          (0x00000500)

+#define TIM_DMABURSTLENGTH_7TRANSFERS          (0x00000600)

+#define TIM_DMABURSTLENGTH_8TRANSFERS          (0x00000700)

+#define TIM_DMABURSTLENGTH_9TRANSFERS          (0x00000800)

+#define TIM_DMABURSTLENGTH_10TRANSFERS         (0x00000900)

+#define TIM_DMABURSTLENGTH_11TRANSFERS         (0x00000A00)

+#define TIM_DMABURSTLENGTH_12TRANSFERS         (0x00000B00)

+#define TIM_DMABURSTLENGTH_13TRANSFERS         (0x00000C00)

+#define TIM_DMABURSTLENGTH_14TRANSFERS         (0x00000D00)

+#define TIM_DMABURSTLENGTH_15TRANSFERS         (0x00000E00)

+#define TIM_DMABURSTLENGTH_16TRANSFERS         (0x00000F00)

+#define TIM_DMABURSTLENGTH_17TRANSFERS         (0x00001000)

+#define TIM_DMABURSTLENGTH_18TRANSFERS         (0x00001100)

+/**

+  * @}

+  */

+

+/** @defgroup DMA_Handle_index  DMA Handle index

+  * @{

+  */

+#define TIM_DMA_ID_UPDATE                ((uint16_t) 0x0)       /*!< Index of the DMA handle used for Update DMA requests */

+#define TIM_DMA_ID_CC1                   ((uint16_t) 0x1)       /*!< Index of the DMA handle used for Capture/Compare 1 DMA requests */

+#define TIM_DMA_ID_CC2                   ((uint16_t) 0x2)       /*!< Index of the DMA handle used for Capture/Compare 2 DMA requests */

+#define TIM_DMA_ID_CC3                   ((uint16_t) 0x3)       /*!< Index of the DMA handle used for Capture/Compare 3 DMA requests */

+#define TIM_DMA_ID_CC4                   ((uint16_t) 0x4)       /*!< Index of the DMA handle used for Capture/Compare 4 DMA requests */

+#define TIM_DMA_ID_COMMUTATION           ((uint16_t) 0x5)       /*!< Index of the DMA handle used for Commutation DMA requests */

+#define TIM_DMA_ID_TRIGGER               ((uint16_t) 0x6)       /*!< Index of the DMA handle used for Trigger DMA requests */

+/**

+  * @}

+  */ 

+

+/** @defgroup Channel_CC_State  Channel CC State

+  * @{

+  */

+#define TIM_CCx_ENABLE                   ((uint32_t)0x0001)

+#define TIM_CCx_DISABLE                  ((uint32_t)0x0000)

+#define TIM_CCxN_ENABLE                  ((uint32_t)0x0004)

+#define TIM_CCxN_DISABLE                 ((uint32_t)0x0000)

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */   

+  

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup TIM_Exported_Macros TIM Exported Macros

+  * @{

+  */

+/** @brief Reset TIM handle state

+  * @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

+  * @retval None

+ */

+#define __HAL_TIM_ENABLE(__HANDLE__)                 ((__HANDLE__)->Instance->CR1|=(TIM_CR1_CEN))

+

+/**

+  * @brief  Enable the TIM update source request.

+  * @param  __HANDLE__: TIM handle

+  * @retval None

+ */

+#define __HAL_TIM_URS_ENABLE(__HANDLE__)             ((__HANDLE__)->Instance->CR1|=(TIM_CR1_URS))

+

+/**

+  * @brief  Enable the TIM main Output.

+  * @param  __HANDLE__: TIM handle

+  * @retval None

+  */

+#define __HAL_TIM_MOE_ENABLE(__HANDLE__)             ((__HANDLE__)->Instance->BDTR|=(TIM_BDTR_MOE))

+

+

+/* The counter of a timer instance is disabled only if all the CCx and CCxN

+   channels have been disabled */

+#define TIM_CCER_CCxE_MASK ((uint32_t)(TIM_CCER_CC1E | TIM_CCER_CC2E | TIM_CCER_CC3E | TIM_CCER_CC4E))

+#define TIM_CCER_CCxNE_MASK ((uint32_t)(TIM_CCER_CC1NE | TIM_CCER_CC2NE | TIM_CCER_CC3NE))

+

+/**

+  * @brief  Disable the TIM peripheral.

+  * @param  __HANDLE__: TIM handle

+  * @retval None

+  */

+#define __HAL_TIM_DISABLE(__HANDLE__) \

+                        do { \

+                          if (((__HANDLE__)->Instance->CCER & TIM_CCER_CCxE_MASK) == 0) \

+                          { \

+                            if(((__HANDLE__)->Instance->CCER & TIM_CCER_CCxNE_MASK) == 0) \

+                            { \

+                              (__HANDLE__)->Instance->CR1 &= ~(TIM_CR1_CEN); \

+                            } \

+                          } \

+                        } while(0)

+                        

+/**

+  * @brief  Disable the TIM update source request.

+  * @param  __HANDLE__: TIM handle

+  * @retval None

+ */

+#define __HAL_TIM_URS_DISABLE(__HANDLE__)            ((__HANDLE__)->Instance->CR1&=~(TIM_CR1_URS))

+

+

+/* The Main Output of a timer instance is disabled only if all the CCx and CCxN

+   channels have been disabled */

+/**

+  * @brief  Disable the TIM main Output.

+  * @param  __HANDLE__: TIM handle

+  * @retval None

+  */

+#define __HAL_TIM_MOE_DISABLE(__HANDLE__) \

+                        do { \

+                          if (((__HANDLE__)->Instance->CCER & TIM_CCER_CCxE_MASK) == 0) \

+                          { \

+                            if(((__HANDLE__)->Instance->CCER & TIM_CCER_CCxNE_MASK) == 0) \

+                            { \

+                              (__HANDLE__)->Instance->BDTR &= ~(TIM_BDTR_MOE); \

+                            } \

+                          } \

+                        } while(0)

+

+#define __HAL_TIM_ENABLE_IT(__HANDLE__, __INTERRUPT__)    ((__HANDLE__)->Instance->DIER |= (__INTERRUPT__))

+#define __HAL_TIM_ENABLE_DMA(__HANDLE__, __DMA__)         ((__HANDLE__)->Instance->DIER |= (__DMA__))

+#define __HAL_TIM_DISABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->DIER &= ~(__INTERRUPT__))

+#define __HAL_TIM_DISABLE_DMA(__HANDLE__, __DMA__)        ((__HANDLE__)->Instance->DIER &= ~(__DMA__))

+#define __HAL_TIM_GET_FLAG(__HANDLE__, __FLAG__)          (((__HANDLE__)->Instance->SR &(__FLAG__)) == (__FLAG__))

+#define __HAL_TIM_CLEAR_FLAG(__HANDLE__, __FLAG__)        ((__HANDLE__)->Instance->SR = ~(__FLAG__))

+

+#define __HAL_TIM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->DIER & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

+#define __HAL_TIM_CLEAR_IT(__HANDLE__, __INTERRUPT__)     ((__HANDLE__)->Instance->SR = ~(__INTERRUPT__))

+

+#define __HAL_TIM_IS_TIM_COUNTING_DOWN(__HANDLE__)            (((__HANDLE__)->Instance->CR1 &(TIM_CR1_DIR)) == (TIM_CR1_DIR))

+#define __HAL_TIM_SET_PRESCALER (__HANDLE__, __PRESC__)       ((__HANDLE__)->Instance->PSC = (__PRESC__))

+

+#define TIM_SET_ICPRESCALERVALUE(__HANDLE__, __CHANNEL__, __ICPSC__) \

+(((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->Instance->CCMR1 |= (__ICPSC__)) :\

+ ((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->Instance->CCMR1 |= ((__ICPSC__) << 8)) :\

+ ((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->Instance->CCMR2 |= (__ICPSC__)) :\

+ ((__HANDLE__)->Instance->CCMR2 |= ((__ICPSC__) << 8)))

+

+#define TIM_RESET_ICPRESCALERVALUE(__HANDLE__, __CHANNEL__) \

+(((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->Instance->CCMR1 &= (uint16_t)~TIM_CCMR1_IC1PSC) :\

+ ((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->Instance->CCMR1 &= (uint16_t)~TIM_CCMR1_IC2PSC) :\

+ ((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->Instance->CCMR2 &= (uint16_t)~TIM_CCMR2_IC3PSC) :\

+ ((__HANDLE__)->Instance->CCMR2 &= (uint16_t)~TIM_CCMR2_IC4PSC))

+

+#define TIM_SET_CAPTUREPOLARITY(__HANDLE__, __CHANNEL__, __POLARITY__) \

+(((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->Instance->CCER |= (__POLARITY__)) :\

+ ((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->Instance->CCER |= ((__POLARITY__) << 4)) :\

+ ((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->Instance->CCER |= ((__POLARITY__) << 8)) :\

+ ((__HANDLE__)->Instance->CCER |= (((__POLARITY__) << 12) & TIM_CCER_CC4P)))

+

+#define TIM_RESET_CAPTUREPOLARITY(__HANDLE__, __CHANNEL__) \

+(((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->Instance->CCER &= (uint16_t)~(TIM_CCER_CC1P | TIM_CCER_CC1NP)) :\

+ ((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->Instance->CCER &= (uint16_t)~(TIM_CCER_CC2P | TIM_CCER_CC2NP)) :\

+ ((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->Instance->CCER &= (uint16_t)~(TIM_CCER_CC3P | TIM_CCER_CC3NP)) :\

+ ((__HANDLE__)->Instance->CCER &= (uint16_t)~TIM_CCER_CC4P))

+ 

+/**

+  * @brief  Sets the TIM Counter Register value on runtime.

+  * @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

+  */

+#define __HAL_TIM_GET_COUNTER(__HANDLE__) ((__HANDLE__)->Instance->CNT)

+

+/**

+  * @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.

+  * @retval None

+  */

+#define __HAL_TIM_SET_AUTORELOAD(__HANDLE__, __AUTORELOAD__)                  \

+                        do{                                                  \

+                            (__HANDLE__)->Instance->ARR = (__AUTORELOAD__);  \

+                            (__HANDLE__)->Init.Period = (__AUTORELOAD__);    \

+                          } while(0)

+/**

+  * @brief  Gets the TIM Autoreload Register value on runtime

+  * @param  __HANDLE__: TIM handle.

+  * @retval None

+  */

+#define __HAL_TIM_GET_AUTORELOAD(__HANDLE__) ((__HANDLE__)->Instance->ARR)

+

+/**

+  * @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.

+  *          This parameter can be one of the following value:

+  *            @arg TIM_CLOCKDIVISION_DIV1

+  *            @arg TIM_CLOCKDIVISION_DIV2

+  *            @arg TIM_CLOCKDIVISION_DIV4

+  * @retval None

+  */

+#define __HAL_TIM_SET_CLOCKDIVISION(__HANDLE__, __CKD__) \

+                        do{                                                             \

+                              (__HANDLE__)->Instance->CR1 &= (uint16_t)(~TIM_CR1_CKD);  \

+                              (__HANDLE__)->Instance->CR1 |= (__CKD__);                 \

+                              (__HANDLE__)->Init.ClockDivision = (__CKD__);             \

+                          } while(0)

+/**

+  * @brief  Gets the TIM Clock Division value on runtime

+  * @param  __HANDLE__: TIM handle.

+  * @retval None

+  */

+#define __HAL_TIM_GET_CLOCKDIVISION(__HANDLE__) ((__HANDLE__)->Instance->CR1 & TIM_CR1_CKD)

+

+/**

+  * @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.

+  *          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.

+  *          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

+  *            @arg TIM_ICPSC_DIV4: capture is done once every 4 events

+  *            @arg TIM_ICPSC_DIV8: capture is done once every 8 events

+  * @retval None

+  */

+#define __HAL_TIM_SET_ICPRESCALER(__HANDLE__, __CHANNEL__, __ICPSC__) \

+                        do{                                                    \

+                              TIM_RESET_ICPRESCALERVALUE((__HANDLE__), (__CHANNEL__));  \

+                              TIM_SET_ICPRESCALERVALUE((__HANDLE__), (__CHANNEL__), (__ICPSC__)); \

+                          } while(0)

+

+/**

+  * @brief  Gets the TIM Input Capture prescaler on runtime

+  * @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

+  */

+#define __HAL_TIM_GET_ICPRESCALER(__HANDLE__, __CHANNEL__)  \

+  (((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->Instance->CCMR1 & TIM_CCMR1_IC1PSC) :\

+   ((__CHANNEL__) == TIM_CHANNEL_2) ? (((__HANDLE__)->Instance->CCMR1 & TIM_CCMR1_IC2PSC) >> 8) :\

+   ((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->Instance->CCMR2 & TIM_CCMR2_IC3PSC) :\

+   (((__HANDLE__)->Instance->CCMR2 & TIM_CCMR2_IC4PSC)) >> 8)

+  

+/**

+  * @brief  Sets the TIM Capture x input polarity on runtime.

+  * @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   

+  *            @arg TIM_INPUTCHANNELPOLARITY_RISING: Rising Edge

+  *            @arg TIM_INPUTCHANNELPOLARITY_FALLING: Falling Edge

+  *            @arg TIM_INPUTCHANNELPOLARITY_BOTHEDGE: Rising and Falling Edge

+  * @note  The polarity TIM_INPUTCHANNELPOLARITY_BOTHEDGE is not authorized  for TIM Channel 4.     

+  * @retval None

+  */

+#define __HAL_TIM_SET_CAPTUREPOLARITY(__HANDLE__, __CHANNEL__, __POLARITY__)                          \

+                       do{                                                                            \

+                           TIM_RESET_CAPTUREPOLARITY((__HANDLE__), (__CHANNEL__));               \

+                           TIM_SET_CAPTUREPOLARITY((__HANDLE__), (__CHANNEL__), (__POLARITY__)); \

+                         }while(0)

+											 

+/**

+  * @}

+  */

+

+/* Include TIM HAL Extension module */

+#include "stm32f7xx_hal_tim_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup TIM_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup TIM_Exported_Functions_Group1

+  * @{

+  */

+

+/* Time Base functions ********************************************************/

+HAL_StatusTypeDef HAL_TIM_Base_Init(TIM_HandleTypeDef *htim);

+HAL_StatusTypeDef HAL_TIM_Base_DeInit(TIM_HandleTypeDef *htim);

+void HAL_TIM_Base_MspInit(TIM_HandleTypeDef *htim);

+void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef *htim);

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_TIM_Base_Start(TIM_HandleTypeDef *htim);

+HAL_StatusTypeDef HAL_TIM_Base_Stop(TIM_HandleTypeDef *htim);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_TIM_Base_Start_IT(TIM_HandleTypeDef *htim);

+HAL_StatusTypeDef HAL_TIM_Base_Stop_IT(TIM_HandleTypeDef *htim);

+/* Non-Blocking mode: DMA */

+HAL_StatusTypeDef HAL_TIM_Base_Start_DMA(TIM_HandleTypeDef *htim, uint32_t *pData, uint16_t Length);

+HAL_StatusTypeDef HAL_TIM_Base_Stop_DMA(TIM_HandleTypeDef *htim);

+/**

+  * @}

+  */

+

+/** @addtogroup TIM_Exported_Functions_Group2

+  * @{

+  */

+/* Timer Output Compare functions **********************************************/

+HAL_StatusTypeDef HAL_TIM_OC_Init(TIM_HandleTypeDef *htim);

+HAL_StatusTypeDef HAL_TIM_OC_DeInit(TIM_HandleTypeDef *htim);

+void HAL_TIM_OC_MspInit(TIM_HandleTypeDef *htim);

+void HAL_TIM_OC_MspDeInit(TIM_HandleTypeDef *htim);

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_TIM_OC_Start(TIM_HandleTypeDef *htim, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIM_OC_Stop(TIM_HandleTypeDef *htim, uint32_t Channel);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_TIM_OC_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIM_OC_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);

+/* Non-Blocking mode: DMA */

+HAL_StatusTypeDef HAL_TIM_OC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length);

+HAL_StatusTypeDef HAL_TIM_OC_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);

+

+/**

+  * @}

+  */

+

+/** @addtogroup TIM_Exported_Functions_Group3

+  * @{

+  */

+/* Timer PWM functions *********************************************************/

+HAL_StatusTypeDef HAL_TIM_PWM_Init(TIM_HandleTypeDef *htim);

+HAL_StatusTypeDef HAL_TIM_PWM_DeInit(TIM_HandleTypeDef *htim);

+void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef *htim);

+void HAL_TIM_PWM_MspDeInit(TIM_HandleTypeDef *htim);

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_TIM_PWM_Start(TIM_HandleTypeDef *htim, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIM_PWM_Stop(TIM_HandleTypeDef *htim, uint32_t Channel);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_TIM_PWM_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIM_PWM_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);

+/* Non-Blocking mode: DMA */

+HAL_StatusTypeDef HAL_TIM_PWM_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length);

+HAL_StatusTypeDef HAL_TIM_PWM_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);

+

+/**

+  * @}

+  */

+

+/** @addtogroup TIM_Exported_Functions_Group4

+  * @{

+  */

+/* Timer Input Capture functions ***********************************************/

+HAL_StatusTypeDef HAL_TIM_IC_Init(TIM_HandleTypeDef *htim);

+HAL_StatusTypeDef HAL_TIM_IC_DeInit(TIM_HandleTypeDef *htim);

+void HAL_TIM_IC_MspInit(TIM_HandleTypeDef *htim);

+void HAL_TIM_IC_MspDeInit(TIM_HandleTypeDef *htim);

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_TIM_IC_Start(TIM_HandleTypeDef *htim, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIM_IC_Stop(TIM_HandleTypeDef *htim, uint32_t Channel);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_TIM_IC_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIM_IC_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);

+/* Non-Blocking mode: DMA */

+HAL_StatusTypeDef HAL_TIM_IC_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData, uint16_t Length);

+HAL_StatusTypeDef HAL_TIM_IC_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);

+

+/**

+  * @}

+  */

+

+/** @addtogroup TIM_Exported_Functions_Group5

+  * @{

+  */

+/* Timer One Pulse functions ***************************************************/

+HAL_StatusTypeDef HAL_TIM_OnePulse_Init(TIM_HandleTypeDef *htim, uint32_t OnePulseMode);

+HAL_StatusTypeDef HAL_TIM_OnePulse_DeInit(TIM_HandleTypeDef *htim);

+void HAL_TIM_OnePulse_MspInit(TIM_HandleTypeDef *htim);

+void HAL_TIM_OnePulse_MspDeInit(TIM_HandleTypeDef *htim);

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_TIM_OnePulse_Start(TIM_HandleTypeDef *htim, uint32_t OutputChannel);

+HAL_StatusTypeDef HAL_TIM_OnePulse_Stop(TIM_HandleTypeDef *htim, uint32_t OutputChannel);

+

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_TIM_OnePulse_Start_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel);

+HAL_StatusTypeDef HAL_TIM_OnePulse_Stop_IT(TIM_HandleTypeDef *htim, uint32_t OutputChannel);

+

+/**

+  * @}

+  */

+

+/** @addtogroup TIM_Exported_Functions_Group6

+  * @{

+  */

+/* Timer Encoder functions *****************************************************/

+HAL_StatusTypeDef HAL_TIM_Encoder_Init(TIM_HandleTypeDef *htim,  TIM_Encoder_InitTypeDef* sConfig);

+HAL_StatusTypeDef HAL_TIM_Encoder_DeInit(TIM_HandleTypeDef *htim);

+void HAL_TIM_Encoder_MspInit(TIM_HandleTypeDef *htim);

+void HAL_TIM_Encoder_MspDeInit(TIM_HandleTypeDef *htim);

+ /* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_TIM_Encoder_Start(TIM_HandleTypeDef *htim, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIM_Encoder_Stop(TIM_HandleTypeDef *htim, uint32_t Channel);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_TIM_Encoder_Start_IT(TIM_HandleTypeDef *htim, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIM_Encoder_Stop_IT(TIM_HandleTypeDef *htim, uint32_t Channel);

+/* Non-Blocking mode: DMA */

+HAL_StatusTypeDef HAL_TIM_Encoder_Start_DMA(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pData1, uint32_t *pData2, uint16_t Length);

+HAL_StatusTypeDef HAL_TIM_Encoder_Stop_DMA(TIM_HandleTypeDef *htim, uint32_t Channel);

+

+/**

+  * @}

+  */

+

+/** @addtogroup TIM_Exported_Functions_Group7

+  * @{

+  */

+/* Interrupt Handler functions  **********************************************/

+void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim);

+

+/**

+  * @}

+  */

+

+/** @addtogroup TIM_Exported_Functions_Group8

+  * @{

+  */

+/* Control functions  *********************************************************/

+HAL_StatusTypeDef HAL_TIM_OC_ConfigChannel(TIM_HandleTypeDef *htim, TIM_OC_InitTypeDef* sConfig, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIM_PWM_ConfigChannel(TIM_HandleTypeDef *htim, TIM_OC_InitTypeDef* sConfig, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIM_IC_ConfigChannel(TIM_HandleTypeDef *htim, TIM_IC_InitTypeDef* sConfig, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIM_OnePulse_ConfigChannel(TIM_HandleTypeDef *htim, TIM_OnePulse_InitTypeDef* sConfig, uint32_t OutputChannel,  uint32_t InputChannel);

+HAL_StatusTypeDef HAL_TIM_ConfigOCrefClear(TIM_HandleTypeDef *htim, TIM_ClearInputConfigTypeDef * sClearInputConfig, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIM_ConfigClockSource(TIM_HandleTypeDef *htim, TIM_ClockConfigTypeDef * sClockSourceConfig);    

+HAL_StatusTypeDef HAL_TIM_ConfigTI1Input(TIM_HandleTypeDef *htim, uint32_t TI1_Selection);

+HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchronization(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef * sSlaveConfig);

+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_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_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);

+

+/**

+  * @}

+  */

+

+/** @addtogroup TIM_Exported_Functions_Group9

+  * @{

+  */

+/* Callback in non blocking modes (Interrupt and DMA) *************************/

+void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim);

+void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim);

+void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim);

+void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim);

+void HAL_TIM_TriggerCallback(TIM_HandleTypeDef *htim);

+void HAL_TIM_ErrorCallback(TIM_HandleTypeDef *htim);

+

+/**

+  * @}

+  */

+

+/** @addtogroup TIM_Exported_Functions_Group10

+  * @{

+  */

+/* Peripheral State functions  **************************************************/

+HAL_TIM_StateTypeDef HAL_TIM_Base_GetState(TIM_HandleTypeDef *htim);

+HAL_TIM_StateTypeDef HAL_TIM_OC_GetState(TIM_HandleTypeDef *htim);

+HAL_TIM_StateTypeDef HAL_TIM_PWM_GetState(TIM_HandleTypeDef *htim);

+HAL_TIM_StateTypeDef HAL_TIM_IC_GetState(TIM_HandleTypeDef *htim);

+HAL_TIM_StateTypeDef HAL_TIM_OnePulse_GetState(TIM_HandleTypeDef *htim);

+HAL_TIM_StateTypeDef HAL_TIM_Encoder_GetState(TIM_HandleTypeDef *htim);

+

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */

+  

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup TIM_Private_Macros TIM Private Macros

+  * @{

+  */

+

+/** @defgroup TIM_IS_TIM_Definitions TIM Private macros to check input parameters

+  * @{

+  */

+#define IS_TIM_COUNTER_MODE(__MODE__) (((__MODE__) == TIM_COUNTERMODE_UP)              || \

+                                       ((__MODE__) == TIM_COUNTERMODE_DOWN)            || \

+                                       ((__MODE__) == TIM_COUNTERMODE_CENTERALIGNED1)  || \

+                                       ((__MODE__) == TIM_COUNTERMODE_CENTERALIGNED2)  || \

+                                       ((__MODE__) == TIM_COUNTERMODE_CENTERALIGNED3))

+

+#define IS_TIM_CLOCKDIVISION_DIV(__DIV__) (((__DIV__) == TIM_CLOCKDIVISION_DIV1) || \

+                                           ((__DIV__) == TIM_CLOCKDIVISION_DIV2) || \

+                                           ((__DIV__) == TIM_CLOCKDIVISION_DIV4))

+

+#define IS_TIM_FAST_STATE(__STATE__) (((__STATE__) == TIM_OCFAST_DISABLE) || \

+                                      ((__STATE__) == TIM_OCFAST_ENABLE))

+

+#define IS_TIM_OUTPUT_STATE(STATE) (((STATE) == TIM_OUTPUTSTATE_DISABLE) || \

+                                    ((STATE) == TIM_OUTPUTSTATE_ENABLE))

+

+#define IS_TIM_OUTPUTN_STATE(STATE) (((STATE) == TIM_OUTPUTNSTATE_DISABLE) || \

+                                     ((STATE) == TIM_OUTPUTNSTATE_ENABLE))

+

+#define IS_TIM_OC_POLARITY(__POLARITY__) (((__POLARITY__) == TIM_OCPOLARITY_HIGH) || \

+                                          ((__POLARITY__) == TIM_OCPOLARITY_LOW))

+

+#define IS_TIM_OCN_POLARITY(__POLARITY__) (((__POLARITY__) == TIM_OCNPOLARITY_HIGH) || \

+                                           ((__POLARITY__) == TIM_OCNPOLARITY_LOW))

+

+#define IS_TIM_OCIDLE_STATE(__STATE__) (((__STATE__) == TIM_OCIDLESTATE_SET) || \

+                                        ((__STATE__) == TIM_OCIDLESTATE_RESET))

+

+#define IS_TIM_OCNIDLE_STATE(__STATE__) (((__STATE__) == TIM_OCNIDLESTATE_SET) || \

+                                         ((__STATE__) == TIM_OCNIDLESTATE_RESET))

+

+#define IS_TIM_IC_POLARITY(__POLARITY__) (((__POLARITY__) == TIM_ICPOLARITY_RISING)   || \

+                                          ((__POLARITY__) == TIM_ICPOLARITY_FALLING)  || \

+                                          ((__POLARITY__) == TIM_ICPOLARITY_BOTHEDGE))

+

+#define IS_TIM_IC_SELECTION(__SELECTION__) (((__SELECTION__) == TIM_ICSELECTION_DIRECTTI) || \

+                                            ((__SELECTION__) == TIM_ICSELECTION_INDIRECTTI) || \

+                                            ((__SELECTION__) == TIM_ICSELECTION_TRC))

+

+#define IS_TIM_IC_PRESCALER(__PRESCALER__) (((__PRESCALER__) == TIM_ICPSC_DIV1) || \

+                                            ((__PRESCALER__) == TIM_ICPSC_DIV2) || \

+                                            ((__PRESCALER__) == TIM_ICPSC_DIV4) || \

+                                            ((__PRESCALER__) == TIM_ICPSC_DIV8))

+

+#define IS_TIM_OPM_MODE(__MODE__) (((__MODE__) == TIM_OPMODE_SINGLE) || \

+                                   ((__MODE__) == TIM_OPMODE_REPETITIVE))

+

+#define IS_TIM_ENCODER_MODE(__MODE__) (((__MODE__) == TIM_ENCODERMODE_TI1) || \

+                                       ((__MODE__) == TIM_ENCODERMODE_TI2) || \

+                                       ((__MODE__) == TIM_ENCODERMODE_TI12))   

+

+#define IS_TIM_IT(__IT__) ((((__IT__) & 0xFFFFFF00) == 0x00000000) && ((__IT__) != 0x00000000))

+

+

+#define IS_TIM_GET_IT(__IT__) (((__IT__) == TIM_IT_UPDATE)  || \

+                               ((__IT__) == TIM_IT_CC1)     || \

+                               ((__IT__) == TIM_IT_CC2)     || \

+                               ((__IT__) == TIM_IT_CC3)     || \

+                               ((__IT__) == TIM_IT_CC4)     || \

+                               ((__IT__) == TIM_IT_COM)     || \

+                               ((__IT__) == TIM_IT_TRIGGER) || \

+                               ((__IT__) == TIM_IT_BREAK))

+

+#define IS_TIM_DMA_SOURCE(__SOURCE__) ((((__SOURCE__) & 0xFFFF80FF) == 0x00000000) && ((__SOURCE__) != 0x00000000))

+

+#define IS_TIM_EVENT_SOURCE(__SOURCE__) ((((__SOURCE__) & 0xFFFFFE00) == 0x00000000) && ((__SOURCE__) != 0x00000000))

+

+#define IS_TIM_FLAG(__FLAG__) (((__FLAG__) == TIM_FLAG_UPDATE) || \

+                               ((__FLAG__) == TIM_FLAG_CC1)     || \

+                               ((__FLAG__) == TIM_FLAG_CC2)     || \

+                               ((__FLAG__) == TIM_FLAG_CC3)     || \

+                               ((__FLAG__) == TIM_FLAG_CC4)     || \

+                               ((__FLAG__) == TIM_FLAG_COM)     || \

+                               ((__FLAG__) == TIM_FLAG_TRIGGER) || \

+                               ((__FLAG__) == TIM_FLAG_BREAK)   || \

+                               ((__FLAG__) == TIM_FLAG_BREAK2)  || \

+                               ((__FLAG__) == TIM_FLAG_CC1OF)   || \

+                               ((__FLAG__) == TIM_FLAG_CC2OF)   || \

+                               ((__FLAG__) == TIM_FLAG_CC3OF)   || \

+                               ((__FLAG__) == TIM_FLAG_CC4OF))

+

+#define IS_TIM_CLOCKSOURCE(__CLOCK__) (((__CLOCK__) == TIM_CLOCKSOURCE_INTERNAL) || \

+                                       ((__CLOCK__) == TIM_CLOCKSOURCE_ETRMODE2) || \

+                                       ((__CLOCK__) == TIM_CLOCKSOURCE_ITR0)     || \

+                                       ((__CLOCK__) == TIM_CLOCKSOURCE_ITR1)     || \

+                                       ((__CLOCK__) == TIM_CLOCKSOURCE_ITR2)     || \

+                                       ((__CLOCK__) == TIM_CLOCKSOURCE_ITR3)     || \

+                                       ((__CLOCK__) == TIM_CLOCKSOURCE_TI1ED)    || \

+                                       ((__CLOCK__) == TIM_CLOCKSOURCE_TI1)      || \

+                                       ((__CLOCK__) == TIM_CLOCKSOURCE_TI2)      || \

+                                       ((__CLOCK__) == TIM_CLOCKSOURCE_ETRMODE1))

+

+#define IS_TIM_CLOCKPOLARITY(__POLARITY__) (((__POLARITY__) == TIM_CLOCKPOLARITY_INVERTED)    || \

+                                        ((__POLARITY__) == TIM_CLOCKPOLARITY_NONINVERTED) || \

+                                        ((__POLARITY__) == TIM_CLOCKPOLARITY_RISING)      || \

+                                        ((__POLARITY__) == TIM_CLOCKPOLARITY_FALLING)     || \

+                                        ((__POLARITY__) == TIM_CLOCKPOLARITY_BOTHEDGE))

+

+#define IS_TIM_CLOCKPRESCALER(__PRESCALER__) (((__PRESCALER__) == TIM_CLOCKPRESCALER_DIV1) || \

+                                              ((__PRESCALER__) == TIM_CLOCKPRESCALER_DIV2) || \

+                                              ((__PRESCALER__) == TIM_CLOCKPRESCALER_DIV4) || \

+                                              ((__PRESCALER__) == TIM_CLOCKPRESCALER_DIV8)) 

+

+#define IS_TIM_CLOCKFILTER(__ICFILTER__)      ((__ICFILTER__) <= 0xF) 

+

+#define IS_TIM_CLEARINPUT_POLARITY(__POLARITY__)   (((__POLARITY__) == TIM_CLEARINPUTPOLARITY_INVERTED) || \

+                                                    ((__POLARITY__) == TIM_CLEARINPUTPOLARITY_NONINVERTED))

+

+#define IS_TIM_CLEARINPUT_PRESCALER(__PRESCALER__)   (((__PRESCALER__) == TIM_CLEARINPUTPRESCALER_DIV1) || \

+                                                 ((__PRESCALER__) == TIM_CLEARINPUTPRESCALER_DIV2) || \

+                                                 ((__PRESCALER__) == TIM_CLEARINPUTPRESCALER_DIV4) || \

+                                                 ((__PRESCALER__) == TIM_CLEARINPUTPRESCALER_DIV8))

+

+#define IS_TIM_CLEARINPUT_FILTER(__ICFILTER__) ((__ICFILTER__) <= 0xF) 

+

+#define IS_TIM_OSSR_STATE(__STATE__) (((__STATE__) == TIM_OSSR_ENABLE) || \

+                                      ((__STATE__) == TIM_OSSR_DISABLE))

+

+#define IS_TIM_OSSI_STATE(__STATE__) (((__STATE__) == TIM_OSSI_ENABLE) || \

+                                      ((__STATE__) == TIM_OSSI_DISABLE))

+

+#define IS_TIM_LOCK_LEVEL(__LEVEL__) (((__LEVEL__) == TIM_LOCKLEVEL_OFF) || \

+                                      ((__LEVEL__) == TIM_LOCKLEVEL_1) || \

+                                      ((__LEVEL__) == TIM_LOCKLEVEL_2) || \

+                                      ((__LEVEL__) == TIM_LOCKLEVEL_3)) 

+

+#define IS_TIM_BREAK_STATE(__STATE__) (((__STATE__) == TIM_BREAK_ENABLE) || \

+                                       ((__STATE__) == TIM_BREAK_DISABLE))

+

+#define IS_TIM_BREAK_POLARITY(__POLARITY__) (((__POLARITY__) == TIM_BREAKPOLARITY_LOW) || \

+                                             ((__POLARITY__) == TIM_BREAKPOLARITY_HIGH))

+

+#define IS_TIM_AUTOMATIC_OUTPUT_STATE(__STATE__) (((__STATE__) == TIM_AUTOMATICOUTPUT_ENABLE) || \

+                                                  ((__STATE__) == TIM_AUTOMATICOUTPUT_DISABLE))

+

+#define IS_TIM_TRGO_SOURCE(__SOURCE__) (((__SOURCE__) == TIM_TRGO_RESET) || \

+                                        ((__SOURCE__) == TIM_TRGO_ENABLE) || \

+                                        ((__SOURCE__) == TIM_TRGO_UPDATE) || \

+                                        ((__SOURCE__) == TIM_TRGO_OC1) || \

+                                        ((__SOURCE__) == TIM_TRGO_OC1REF) || \

+                                        ((__SOURCE__) == TIM_TRGO_OC2REF) || \

+                                        ((__SOURCE__) == TIM_TRGO_OC3REF) || \

+                                        ((__SOURCE__) == TIM_TRGO_OC4REF))

+

+#define IS_TIM_MSM_STATE(__STATE__) (((__STATE__) == TIM_MASTERSLAVEMODE_ENABLE) || \

+                                     ((__STATE__) == TIM_MASTERSLAVEMODE_DISABLE))

+

+#define IS_TIM_TRIGGER_SELECTION(__SELECTION__) (((__SELECTION__) == TIM_TS_ITR0) || \

+                                                 ((__SELECTION__) == TIM_TS_ITR1) || \

+                                                 ((__SELECTION__) == TIM_TS_ITR2) || \

+                                                 ((__SELECTION__) == TIM_TS_ITR3) || \

+                                                 ((__SELECTION__) == TIM_TS_TI1F_ED) || \

+                                                 ((__SELECTION__) == TIM_TS_TI1FP1) || \

+                                                 ((__SELECTION__) == TIM_TS_TI2FP2) || \

+                                                 ((__SELECTION__) == TIM_TS_ETRF))

+

+#define IS_TIM_INTERNAL_TRIGGER_SELECTION(SELECTION) (((SELECTION) == TIM_TS_ITR0) || \

+                                                      ((SELECTION) == TIM_TS_ITR1) || \

+                                                      ((SELECTION) == TIM_TS_ITR2) || \

+                                                      ((SELECTION) == TIM_TS_ITR3))

+

+#define IS_TIM_INTERNAL_TRIGGEREVENT_SELECTION(__SELECTION__) (((__SELECTION__) == TIM_TS_ITR0) || \

+                                                               ((__SELECTION__) == TIM_TS_ITR1) || \

+                                                               ((__SELECTION__) == TIM_TS_ITR2) || \

+                                                               ((__SELECTION__) == TIM_TS_ITR3) || \

+                                                               ((__SELECTION__) == TIM_TS_NONE))

+

+#define IS_TIM_TRIGGERPOLARITY(__POLARITY__)     (((__POLARITY__) == TIM_TRIGGERPOLARITY_INVERTED   ) || \

+                                                  ((__POLARITY__) == TIM_TRIGGERPOLARITY_NONINVERTED) || \

+                                                  ((__POLARITY__) == TIM_TRIGGERPOLARITY_RISING     ) || \

+                                                  ((__POLARITY__) == TIM_TRIGGERPOLARITY_FALLING    ) || \

+                                                  ((__POLARITY__) == TIM_TRIGGERPOLARITY_BOTHEDGE   ))

+

+#define IS_TIM_TRIGGERPRESCALER(__PRESCALER__)  (((__PRESCALER__) == TIM_TRIGGERPRESCALER_DIV1) || \

+                                                 ((__PRESCALER__) == TIM_TRIGGERPRESCALER_DIV2) || \

+                                                 ((__PRESCALER__) == TIM_TRIGGERPRESCALER_DIV4) || \

+                                                 ((__PRESCALER__) == TIM_TRIGGERPRESCALER_DIV8)) 

+

+#define IS_TIM_TRIGGERFILTER(__ICFILTER__)     ((__ICFILTER__) <= 0xF) 

+

+#define IS_TIM_TI1SELECTION(__TI1SELECTION__)   (((__TI1SELECTION__) == TIM_TI1SELECTION_CH1) || \

+                                                 ((__TI1SELECTION__) == TIM_TI1SELECTION_XORCOMBINATION))

+

+#define IS_TIM_DMA_BASE(__BASE__) (((__BASE__) == TIM_DMABASE_CR1) || \

+                                   ((__BASE__) == TIM_DMABASE_CR2) || \

+                                   ((__BASE__) == TIM_DMABASE_SMCR) || \

+                                   ((__BASE__) == TIM_DMABASE_DIER) || \

+                                   ((__BASE__) == TIM_DMABASE_SR) || \

+                                   ((__BASE__) == TIM_DMABASE_EGR) || \

+                                   ((__BASE__) == TIM_DMABASE_CCMR1) || \

+                                   ((__BASE__) == TIM_DMABASE_CCMR2) || \

+                                   ((__BASE__) == TIM_DMABASE_CCER) || \

+                                   ((__BASE__) == TIM_DMABASE_CNT) || \

+                                   ((__BASE__) == TIM_DMABASE_PSC) || \

+                                   ((__BASE__) == TIM_DMABASE_ARR) || \

+                                   ((__BASE__) == TIM_DMABASE_RCR) || \

+                                   ((__BASE__) == TIM_DMABASE_CCR1) || \

+                                   ((__BASE__) == TIM_DMABASE_CCR2) || \

+                                   ((__BASE__) == TIM_DMABASE_CCR3) || \

+                                   ((__BASE__) == TIM_DMABASE_CCR4) || \

+                                   ((__BASE__) == TIM_DMABASE_BDTR) || \

+                                   ((__BASE__) == TIM_DMABASE_DCR) || \

+                                   ((__BASE__) == TIM_DMABASE_OR))

+

+#define IS_TIM_DMA_LENGTH(__LENGTH__) (((__LENGTH__) == TIM_DMABURSTLENGTH_1TRANSFER) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_2TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_3TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_4TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_5TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_6TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_7TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_8TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_9TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_10TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_11TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_12TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_13TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_14TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_15TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_16TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_17TRANSFERS) || \

+                                       ((__LENGTH__) == TIM_DMABURSTLENGTH_18TRANSFERS))

+

+#define IS_TIM_IC_FILTER(ICFILTER) ((ICFILTER) <= 0xF) 

+

+

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup TIM_Private_Functions TIM Private Functions

+  * @{

+  */

+void TIM_Base_SetConfig(TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure);

+void TIM_TI1_SetConfig(TIM_TypeDef *TIMx, uint32_t TIM_ICPolarity, uint32_t TIM_ICSelection, uint32_t TIM_ICFilter);

+void TIM_OC1_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config);

+void TIM_OC2_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config);

+void TIM_OC3_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config);

+void TIM_OC4_SetConfig(TIM_TypeDef *TIMx, TIM_OC_InitTypeDef *OC_Config);

+void TIM_ETR_SetConfig(TIM_TypeDef* TIMx, uint32_t TIM_ExtTRGPrescaler, uint32_t TIM_ExtTRGPolarity, uint32_t ExtTRGFilter);

+

+void HAL_TIM_DMADelayPulseCplt(DMA_HandleTypeDef *hdma);

+void HAL_TIM_DMAError(DMA_HandleTypeDef *hdma);

+void HAL_TIM_DMACaptureCplt(DMA_HandleTypeDef *hdma);

+void TIM_CCxChannelCmd(TIM_TypeDef* TIMx, uint32_t Channel, uint32_t ChannelState);

+/**

+  * @}

+  */ 

+     

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_TIM_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_tim_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_tim_ex.h
new file mode 100644
index 0000000..ee3fc96
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_tim_ex.h
@@ -0,0 +1,552 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_tim_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of TIM HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_TIM_EX_H

+#define __STM32F7xx_HAL_TIM_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup TIMEx

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup TIMEx_Exported_Types TIM Exported Types

+  * @{

+  */

+  

+/** 

+  * @brief  TIM Hall sensor Configuration Structure definition  

+  */

+

+typedef struct

+{

+                                  

+  uint32_t IC1Polarity;            /*!< Specifies the active edge of the input signal.

+                                        This parameter can be a value of @ref TIM_Input_Capture_Polarity */

+                                                                   

+  uint32_t IC1Prescaler;        /*!< Specifies the Input Capture Prescaler.

+                                     This parameter can be a value of @ref TIM_Input_Capture_Prescaler */

+                                  

+  uint32_t IC1Filter;           /*!< Specifies the input capture filter.

+                                     This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */  

+  uint32_t Commutation_Delay;  /*!< Specifies the pulse value to be loaded into the Capture Compare Register. 

+                                    This parameter can be a number between Min_Data = 0x0000 and Max_Data = 0xFFFF */                              

+} TIM_HallSensor_InitTypeDef;

+

+/** 

+  * @brief  TIM Master configuration Structure definition  

+  */ 

+typedef struct {

+  uint32_t  MasterOutputTrigger;   /*!< Trigger output (TRGO) selection. 

+                                      This parameter can be a value of @ref TIM_Master_Mode_Selection */ 

+  uint32_t  MasterOutputTrigger2;  /*!< Trigger output2 (TRGO2) selection 

+                                      This parameter can be a value of @ref TIMEx_Master_Mode_Selection_2 */

+  uint32_t  MasterSlaveMode;       /*!< Master/slave mode selection. 

+                                      This parameter can be a value of @ref TIM_Master_Slave_Mode */

+}TIM_MasterConfigTypeDef;

+

+/** 

+  * @brief  TIM Break input(s) and Dead time configuration Structure definition  

+  * @note   2 break inputs can be configured (BKIN and BKIN2) with configurable 

+  *        filter and polarity.

+  */ 

+typedef struct

+{

+  uint32_t OffStateRunMode;	        /*!< TIM off state in run mode.

+                                       This parameter can be a value of @ref TIM_OSSR_Off_State_Selection_for_Run_mode_state */

+  uint32_t OffStateIDLEMode;	    /*!< TIM off state in IDLE mode.

+                                       This parameter can be a value of @ref TIM_OSSI_Off_State_Selection_for_Idle_mode_state */

+  uint32_t LockLevel;	 	        /*!< TIM Lock level.

+                                       This parameter can be a value of @ref TIM_Lock_level */                             

+  uint32_t DeadTime;	 	        /*!< TIM dead Time.

+                                       This parameter can be a number between Min_Data = 0x00 and Max_Data = 0xFF */

+  uint32_t BreakState;	 	        /*!< TIM Break State.

+                                       This parameter can be a value of @ref TIM_Break_Input_enable_disable */

+  uint32_t BreakPolarity;           /*!< TIM Break input polarity.

+                                       This parameter can be a value of @ref TIM_Break_Polarity */

+  uint32_t BreakFilter;             /*!< Specifies the break input filter.

+                                       This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */  

+  uint32_t Break2State;	 	        /*!< TIM Break2 State 

+                                       This parameter can be a value of @ref TIMEx_Break2_Input_enable_disable */

+  uint32_t Break2Polarity;          /*!< TIM Break2 input polarity 

+                                       This parameter can be a value of @ref TIMEx_Break2_Polarity */

+  uint32_t Break2Filter;            /*!< TIM break2 input filter.

+                                       This parameter can be a number between Min_Data = 0x0 and Max_Data = 0xF */  

+  uint32_t AutomaticOutput;         /*!< TIM Automatic Output Enable state 

+                                       This parameter can be a value of @ref TIM_AOE_Bit_Set_Reset */           

+} TIM_BreakDeadTimeConfigTypeDef;

+

+/**

+  * @}

+  */

+  

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup TIMEx_Exported_Constants  TIMEx Exported Constants

+  * @{

+  */

+  

+/** @defgroup TIMEx_Channel TIMEx Channel

+  * @{

+  */

+

+#define TIM_CHANNEL_1                      ((uint32_t)0x0000)

+#define TIM_CHANNEL_2                      ((uint32_t)0x0004)

+#define TIM_CHANNEL_3                      ((uint32_t)0x0008)

+#define TIM_CHANNEL_4                      ((uint32_t)0x000C)

+#define TIM_CHANNEL_5                      ((uint32_t)0x0010)

+#define TIM_CHANNEL_6                      ((uint32_t)0x0014)

+#define TIM_CHANNEL_ALL                    ((uint32_t)0x003C)

+                                 

+/**

+  * @}

+  */ 

+    

+/** @defgroup TIMEx_Output_Compare_and_PWM_modes TIMEx Output Compare and PWM Modes

+  * @{

+  */

+#define TIM_OCMODE_TIMING                   ((uint32_t)0x0000)

+#define TIM_OCMODE_ACTIVE                   ((uint32_t)TIM_CCMR1_OC1M_0)

+#define TIM_OCMODE_INACTIVE                 ((uint32_t)TIM_CCMR1_OC1M_1)

+#define TIM_OCMODE_TOGGLE                   ((uint32_t)TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0)

+#define TIM_OCMODE_PWM1                     ((uint32_t)TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1)

+#define TIM_OCMODE_PWM2                     ((uint32_t)TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_0)

+#define TIM_OCMODE_FORCED_ACTIVE            ((uint32_t)TIM_CCMR1_OC1M_2 | TIM_CCMR1_OC1M_0)

+#define TIM_OCMODE_FORCED_INACTIVE          ((uint32_t)TIM_CCMR1_OC1M_2)

+

+#define TIM_OCMODE_RETRIGERRABLE_OPM1      ((uint32_t)TIM_CCMR1_OC1M_3)

+#define TIM_OCMODE_RETRIGERRABLE_OPM2      ((uint32_t)TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_0)

+#define TIM_OCMODE_COMBINED_PWM1           ((uint32_t)TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_2)

+#define TIM_OCMODE_COMBINED_PWM2           ((uint32_t)TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_0 | TIM_CCMR1_OC1M_2)

+#define TIM_OCMODE_ASSYMETRIC_PWM1         ((uint32_t)TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M_1 | TIM_CCMR1_OC1M_2)

+#define TIM_OCMODE_ASSYMETRIC_PWM2         ((uint32_t)TIM_CCMR1_OC1M_3 | TIM_CCMR1_OC1M)

+/**

+  * @}

+  */

+      

+/** @defgroup TIMEx_Remap  TIMEx Remap

+  * @{

+  */

+#define TIM_TIM2_TIM8_TRGO                     (0x00000000)

+#define TIM_TIM2_ETH_PTP                       (0x00000400)

+#define TIM_TIM2_USBFS_SOF                     (0x00000800)

+#define TIM_TIM2_USBHS_SOF                     (0x00000C00)

+#define TIM_TIM5_GPIO                          (0x00000000)

+#define TIM_TIM5_LSI                           (0x00000040)

+#define TIM_TIM5_LSE                           (0x00000080)

+#define TIM_TIM5_RTC                           (0x000000C0)

+#define TIM_TIM11_GPIO                         (0x00000000)

+#define TIM_TIM11_SPDIFRX                      (0x00000001)

+#define TIM_TIM11_HSE                          (0x00000002)

+#define TIM_TIM11_MCO1                         (0x00000003)

+/**

+  * @}

+  */	

+

+/** @defgroup TIMEx_ClearInput_Source TIMEx Clear Input Source

+  * @{

+  */

+#define TIM_CLEARINPUTSOURCE_ETR            ((uint32_t)0x0001) 

+#define TIM_CLEARINPUTSOURCE_OCREFCLR       ((uint32_t)0x0002) 

+#define TIM_CLEARINPUTSOURCE_NONE           ((uint32_t)0x0000)

+/**

+  * @}

+  */

+  

+/** @defgroup TIMEx_Break2_Input_enable_disable  TIMEx Break input 2 Enable

+  * @{

+  */                         

+#define TIM_BREAK2_DISABLE         ((uint32_t)0x00000000)

+#define TIM_BREAK2_ENABLE          ((uint32_t)TIM_BDTR_BK2E)

+/**

+  * @}

+  */

+    

+/** @defgroup TIMEx_Break2_Polarity TIMEx Break2 Polarity

+  * @{

+  */

+#define TIM_BREAK2POLARITY_LOW        ((uint32_t)0x00000000)

+#define TIM_BREAK2POLARITY_HIGH       (TIM_BDTR_BK2P)

+/**

+  * @}

+  */

+ 

+/** @defgroup TIMEx_Group_Channel5 TIMEx Group Channel 5 and Channel 1, 2 or 3

+  * @{

+  */

+#define TIM_GROUPCH5_NONE       (uint32_t)0x00000000  /* !< No effect of OC5REF on OC1REFC, OC2REFC and OC3REFC */

+#define TIM_GROUPCH5_OC1REFC    (TIM_CCR5_GC5C1)      /* !< OC1REFC is the logical AND of OC1REFC and OC5REF */

+#define TIM_GROUPCH5_OC2REFC    (TIM_CCR5_GC5C2)      /* !< OC2REFC is the logical AND of OC2REFC and OC5REF */

+#define TIM_GROUPCH5_OC3REFC    (TIM_CCR5_GC5C3)       /* !< OC3REFC is the logical AND of OC3REFC and OC5REF */

+/**

+  * @}

+  */

+	

+/** @defgroup TIMEx_Master_Mode_Selection_2 TIMEx Master Mode Selection 2 (TRGO2)

+  * @{

+  */  

+#define	TIM_TRGO2_RESET                          ((uint32_t)0x00000000)             

+#define	TIM_TRGO2_ENABLE                         ((uint32_t)(TIM_CR2_MMS2_0))          

+#define	TIM_TRGO2_UPDATE                         ((uint32_t)(TIM_CR2_MMS2_1))

+#define	TIM_TRGO2_OC1                            ((uint32_t)(TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0))   

+#define	TIM_TRGO2_OC1REF                         ((uint32_t)(TIM_CR2_MMS2_2))           

+#define	TIM_TRGO2_OC2REF                         ((uint32_t)(TIM_CR2_MMS2_2 | TIM_CR2_MMS2_0))          

+#define	TIM_TRGO2_OC3REF                         ((uint32_t)(TIM_CR2_MMS2_2 | TIM_CR2_MMS2_1))           

+#define	TIM_TRGO2_OC4REF                         ((uint32_t)(TIM_CR2_MMS2_2 | TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0))  

+#define	TIM_TRGO2_OC5REF                         ((uint32_t)(TIM_CR2_MMS2_3))   

+#define	TIM_TRGO2_OC6REF                         ((uint32_t)(TIM_CR2_MMS2_3 | TIM_CR2_MMS2_0))   

+#define	TIM_TRGO2_OC4REF_RISINGFALLING           ((uint32_t)(TIM_CR2_MMS2_3 | TIM_CR2_MMS2_1))   

+#define	TIM_TRGO2_OC6REF_RISINGFALLING           ((uint32_t)(TIM_CR2_MMS2_3 | TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0))   

+#define	TIM_TRGO2_OC4REF_RISING_OC6REF_RISING    ((uint32_t)(TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2))   

+#define	TIM_TRGO2_OC4REF_RISING_OC6REF_FALLING   ((uint32_t)(TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2 | TIM_CR2_MMS2_0))   

+#define	TIM_TRGO2_OC5REF_RISING_OC6REF_RISING    ((uint32_t)(TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2 |TIM_CR2_MMS2_1))   

+#define	TIM_TRGO2_OC5REF_RISING_OC6REF_FALLING   ((uint32_t)(TIM_CR2_MMS2_3 | TIM_CR2_MMS2_2 | TIM_CR2_MMS2_1 | TIM_CR2_MMS2_0))   

+/**

+  * @}

+  */ 

+    

+/** @defgroup TIMEx_Slave_Mode TIMEx Slave mode

+  * @{

+  */

+#define TIM_SLAVEMODE_DISABLE                ((uint32_t)0x0000)

+#define TIM_SLAVEMODE_RESET                  ((uint32_t)(TIM_SMCR_SMS_2))

+#define TIM_SLAVEMODE_GATED                  ((uint32_t)(TIM_SMCR_SMS_2 | TIM_SMCR_SMS_0))

+#define TIM_SLAVEMODE_TRIGGER                ((uint32_t)(TIM_SMCR_SMS_2 | TIM_SMCR_SMS_1))

+#define TIM_SLAVEMODE_EXTERNAL1              ((uint32_t)(TIM_SMCR_SMS_2 | TIM_SMCR_SMS_1 | TIM_SMCR_SMS_0))

+#define TIM_SLAVEMODE_COMBINED_RESETTRIGGER  ((uint32_t)(TIM_SMCR_SMS_3))

+/**

+  * @}

+  */

+/**

+  * @}

+  */

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup TIMEx_Exported_Macros TIMEx Exported Macros

+  * @{

+  */  

+

+/**

+  * @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.

+  *          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

+  *            @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.

+  * @retval None

+  */

+#define __HAL_TIM_SET_COMPARE(__HANDLE__, __CHANNEL__, __COMPARE__) \

+(((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->Instance->CCR1 = (__COMPARE__)) :\

+ ((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->Instance->CCR2 = (__COMPARE__)) :\

+ ((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->Instance->CCR3 = (__COMPARE__)) :\

+ ((__CHANNEL__) == TIM_CHANNEL_4) ? ((__HANDLE__)->Instance->CCR4 = (__COMPARE__)) :\

+ ((__CHANNEL__) == TIM_CHANNEL_5) ? ((__HANDLE__)->Instance->CCR5 = (__COMPARE__)) :\

+ ((__HANDLE__)->Instance->CCR6 |= (__COMPARE__)))

+

+/**

+  * @brief  Gets the TIM Capture Compare Register value on runtime

+  * @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

+  *            @arg TIM_CHANNEL_3: get capture/compare 3 register value

+  *            @arg TIM_CHANNEL_4: get capture/compare 4 register value

+  *            @arg TIM_CHANNEL_5: get capture/compare 5 register value

+  *            @arg TIM_CHANNEL_6: get capture/compare 6 register value

+  * @retval None

+  */

+#define __HAL_TIM_GET_COMPARE(__HANDLE__, __CHANNEL__) \

+(((__CHANNEL__) == TIM_CHANNEL_1) ? ((__HANDLE__)->Instance->CCR1) :\

+ ((__CHANNEL__) == TIM_CHANNEL_2) ? ((__HANDLE__)->Instance->CCR2) :\

+ ((__CHANNEL__) == TIM_CHANNEL_3) ? ((__HANDLE__)->Instance->CCR3) :\

+ ((__CHANNEL__) == TIM_CHANNEL_4) ? ((__HANDLE__)->Instance->CCR4) :\

+ ((__CHANNEL__) == TIM_CHANNEL_5) ? ((__HANDLE__)->Instance->CCR5) :\

+ ((__HANDLE__)->Instance->CCR6))

+

+/**

+  * @}

+  */ 

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup TIMEx_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup TIMEx_Exported_Functions_Group1

+  * @{

+  */

+/*  Timer Hall Sensor functions  **********************************************/

+HAL_StatusTypeDef HAL_TIMEx_HallSensor_Init(TIM_HandleTypeDef* htim, TIM_HallSensor_InitTypeDef* sConfig);

+HAL_StatusTypeDef HAL_TIMEx_HallSensor_DeInit(TIM_HandleTypeDef* htim);

+

+void HAL_TIMEx_HallSensor_MspInit(TIM_HandleTypeDef* htim);

+void HAL_TIMEx_HallSensor_MspDeInit(TIM_HandleTypeDef* htim);

+

+ /* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start(TIM_HandleTypeDef* htim);

+HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop(TIM_HandleTypeDef* htim);

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_IT(TIM_HandleTypeDef* htim);

+HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_IT(TIM_HandleTypeDef* htim);

+/* Non-Blocking mode: DMA */

+HAL_StatusTypeDef HAL_TIMEx_HallSensor_Start_DMA(TIM_HandleTypeDef* htim, uint32_t *pData, uint16_t Length);

+HAL_StatusTypeDef HAL_TIMEx_HallSensor_Stop_DMA(TIM_HandleTypeDef* htim);

+/**

+  * @}

+  */

+

+/** @addtogroup TIMEx_Exported_Functions_Group2

+  * @{

+  */

+/*  Timer Complementary Output Compare functions  *****************************/

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_TIMEx_OCN_Start(TIM_HandleTypeDef* htim, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIMEx_OCN_Stop(TIM_HandleTypeDef* htim, uint32_t Channel);

+

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_TIMEx_OCN_Start_IT(TIM_HandleTypeDef* htim, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_IT(TIM_HandleTypeDef* htim, uint32_t Channel);

+

+/* Non-Blocking mode: DMA */

+HAL_StatusTypeDef HAL_TIMEx_OCN_Start_DMA(TIM_HandleTypeDef* htim, uint32_t Channel, uint32_t *pData, uint16_t Length);

+HAL_StatusTypeDef HAL_TIMEx_OCN_Stop_DMA(TIM_HandleTypeDef* htim, uint32_t Channel);

+/**

+  * @}

+  */

+

+/** @addtogroup TIMEx_Exported_Functions_Group3

+  * @{

+  */

+/*  Timer Complementary PWM functions  ****************************************/

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_TIMEx_PWMN_Start(TIM_HandleTypeDef* htim, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop(TIM_HandleTypeDef* htim, uint32_t Channel);

+

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_IT(TIM_HandleTypeDef* htim, uint32_t Channel);

+HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_IT(TIM_HandleTypeDef* htim, uint32_t Channel);

+/* Non-Blocking mode: DMA */

+HAL_StatusTypeDef HAL_TIMEx_PWMN_Start_DMA(TIM_HandleTypeDef* htim, uint32_t Channel, uint32_t *pData, uint16_t Length);

+HAL_StatusTypeDef HAL_TIMEx_PWMN_Stop_DMA(TIM_HandleTypeDef* htim, uint32_t Channel);

+/**

+  * @}

+  */

+

+/** @addtogroup TIMEx_Exported_Functions_Group4

+  * @{

+  */

+/*  Timer Complementary One Pulse functions  **********************************/

+/* Blocking mode: Polling */

+HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start(TIM_HandleTypeDef* htim, uint32_t OutputChannel);

+HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop(TIM_HandleTypeDef* htim, uint32_t OutputChannel);

+

+/* Non-Blocking mode: Interrupt */

+HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Start_IT(TIM_HandleTypeDef* htim, uint32_t OutputChannel);

+HAL_StatusTypeDef HAL_TIMEx_OnePulseN_Stop_IT(TIM_HandleTypeDef* htim, uint32_t OutputChannel);

+/**

+  * @}

+  */

+

+/** @addtogroup TIMEx_Exported_Functions_Group5

+  * @{

+  */

+/* Extension Control functions  ************************************************/

+HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent(TIM_HandleTypeDef* htim, uint32_t  InputTrigger, uint32_t  CommutationSource);

+HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent_IT(TIM_HandleTypeDef* htim, uint32_t  InputTrigger, uint32_t  CommutationSource);

+HAL_StatusTypeDef HAL_TIMEx_ConfigCommutationEvent_DMA(TIM_HandleTypeDef* htim, uint32_t  InputTrigger, uint32_t  CommutationSource);

+HAL_StatusTypeDef HAL_TIMEx_MasterConfigSynchronization(TIM_HandleTypeDef* htim, TIM_MasterConfigTypeDef * sMasterConfig);

+HAL_StatusTypeDef HAL_TIMEx_ConfigBreakDeadTime(TIM_HandleTypeDef* htim, TIM_BreakDeadTimeConfigTypeDef *sBreakDeadTimeConfig);

+HAL_StatusTypeDef HAL_TIMEx_RemapConfig(TIM_HandleTypeDef* htim, uint32_t Remap);

+HAL_StatusTypeDef HAL_TIMEx_GroupChannel5(TIM_HandleTypeDef *htim, uint32_t OCRef);

+/**

+  * @}

+  */

+

+/** @addtogroup TIMEx_Exported_Functions_Group6

+  * @{

+  */ 

+/* Extension Callback *********************************************************/

+void HAL_TIMEx_CommutationCallback(TIM_HandleTypeDef* htim);

+void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef* htim);

+void HAL_TIMEx_DMACommutationCplt(DMA_HandleTypeDef *hdma);

+/**

+  * @}

+  */

+

+/** @addtogroup TIMEx_Exported_Functions_Group7

+  * @{

+  */

+/* Extension Peripheral State functions  **************************************/

+HAL_TIM_StateTypeDef HAL_TIMEx_HallSensor_GetState(TIM_HandleTypeDef* htim);

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup TIMEx_Private_Macros TIMEx Private Macros

+  * @{

+  */

+#define IS_TIM_CHANNELS(CHANNEL) (((CHANNEL) == TIM_CHANNEL_1) || \

+                                  ((CHANNEL) == TIM_CHANNEL_2) || \

+                                  ((CHANNEL) == TIM_CHANNEL_3) || \

+                                  ((CHANNEL) == TIM_CHANNEL_4) || \

+                                  ((CHANNEL) == TIM_CHANNEL_5) || \

+                                  ((CHANNEL) == TIM_CHANNEL_6) || \

+                                  ((CHANNEL) == TIM_CHANNEL_ALL))

+                                 

+#define IS_TIM_PWMI_CHANNELS(CHANNEL) (((CHANNEL) == TIM_CHANNEL_1) || \

+                                       ((CHANNEL) == TIM_CHANNEL_2))

+                                      

+#define IS_TIM_OPM_CHANNELS(CHANNEL) (((CHANNEL) == TIM_CHANNEL_1) || \

+                                      ((CHANNEL) == TIM_CHANNEL_2))                                       

+

+#define IS_TIM_COMPLEMENTARY_CHANNELS(CHANNEL) (((CHANNEL) == TIM_CHANNEL_1) || \

+                                                ((CHANNEL) == TIM_CHANNEL_2) || \

+                                                ((CHANNEL) == TIM_CHANNEL_3))

+#define IS_TIM_PWM_MODE(MODE) (((MODE) == TIM_OCMODE_PWM1)               || \

+	                       ((MODE) == TIM_OCMODE_PWM2)               || \

+                               ((MODE) == TIM_OCMODE_COMBINED_PWM1)      || \

+                               ((MODE) == TIM_OCMODE_COMBINED_PWM2)      || \

+                               ((MODE) == TIM_OCMODE_ASSYMETRIC_PWM1)    || \

+                               ((MODE) == TIM_OCMODE_ASSYMETRIC_PWM2))

+                              

+#define IS_TIM_OC_MODE(MODE) (((MODE) == TIM_OCMODE_TIMING)             || \

+                             ((MODE) == TIM_OCMODE_ACTIVE)             || \

+                             ((MODE) == TIM_OCMODE_INACTIVE)           || \

+                             ((MODE) == TIM_OCMODE_TOGGLE)             || \

+                             ((MODE) == TIM_OCMODE_FORCED_ACTIVE)      || \

+                             ((MODE) == TIM_OCMODE_FORCED_INACTIVE)    || \

+                             ((MODE) == TIM_OCMODE_RETRIGERRABLE_OPM1) || \

+                             ((MODE) == TIM_OCMODE_RETRIGERRABLE_OPM2))

+#define IS_TIM_REMAP(__TIM_REMAP__)	 (((__TIM_REMAP__) == TIM_TIM2_TIM8_TRGO)||\

+                                      ((__TIM_REMAP__) == TIM_TIM2_ETH_PTP)||\

+                                      ((__TIM_REMAP__) == TIM_TIM2_USBFS_SOF)||\

+                                      ((__TIM_REMAP__) == TIM_TIM2_USBHS_SOF)||\

+                                      ((__TIM_REMAP__) == TIM_TIM5_GPIO)||\

+                                      ((__TIM_REMAP__) == TIM_TIM5_LSI)||\

+                                      ((__TIM_REMAP__) == TIM_TIM5_LSE)||\

+                                      ((__TIM_REMAP__) == TIM_TIM5_RTC)||\

+                                      ((__TIM_REMAP__) == TIM_TIM11_GPIO)||\

+                                      ((__TIM_REMAP__) == TIM_TIM11_SPDIFRX)||\

+                                      ((__TIM_REMAP__) == TIM_TIM11_HSE)||\

+                                      ((__TIM_REMAP__) == TIM_TIM11_MCO1))  

+#define IS_TIM_DEADTIME(__DEADTIME__)      ((__DEADTIME__) <= 0xFF) 

+#define IS_TIM_BREAK_FILTER(__FILTER__) ((__FILTER__) <= 0xF)

+#define IS_TIM_CLEARINPUT_SOURCE(MODE) (((MODE) == TIM_CLEARINPUTSOURCE_ETR)      || \

+                                        ((MODE) == TIM_CLEARINPUTSOURCE_OCREFCLR)  || \

+                                        ((MODE) == TIM_CLEARINPUTSOURCE_NONE))

+#define IS_TIM_BREAK2_STATE(STATE) (((STATE) == TIM_BREAK2_ENABLE) || \

+                                    ((STATE) == TIM_BREAK2_DISABLE))

+#define IS_TIM_BREAK2_POLARITY(__POLARITY__) (((__POLARITY__) == TIM_BREAK2POLARITY_LOW) || \

+                                              ((__POLARITY__) == TIM_BREAK2POLARITY_HIGH))

+#define IS_TIM_GROUPCH5(OCREF) ((((OCREF) & 0x1FFFFFFF) == 0x00000000))

+#define IS_TIM_TRGO2_SOURCE(SOURCE) (((SOURCE) == TIM_TRGO2_RESET)                        || \

+                                     ((SOURCE) == TIM_TRGO2_ENABLE)                       || \

+                                     ((SOURCE) == TIM_TRGO2_UPDATE)                       || \

+                                     ((SOURCE) == TIM_TRGO2_OC1)                          || \

+                                     ((SOURCE) == TIM_TRGO2_OC1REF)                       || \

+                                     ((SOURCE) == TIM_TRGO2_OC2REF)                       || \

+                                     ((SOURCE) == TIM_TRGO2_OC3REF)                       || \

+                                     ((SOURCE) == TIM_TRGO2_OC3REF)                       || \

+                                     ((SOURCE) == TIM_TRGO2_OC4REF)                       || \

+                                     ((SOURCE) == TIM_TRGO2_OC5REF)                       || \

+                                     ((SOURCE) == TIM_TRGO2_OC6REF)                       || \

+                                     ((SOURCE) == TIM_TRGO2_OC4REF_RISINGFALLING)         || \

+                                     ((SOURCE) == TIM_TRGO2_OC6REF_RISINGFALLING)         || \

+                                     ((SOURCE) == TIM_TRGO2_OC4REF_RISING_OC6REF_RISING)  || \

+                                     ((SOURCE) == TIM_TRGO2_OC4REF_RISING_OC6REF_FALLING) || \

+                                     ((SOURCE) == TIM_TRGO2_OC5REF_RISING_OC6REF_RISING)  || \

+                                     ((SOURCE) == TIM_TRGO2_OC5REF_RISING_OC6REF_FALLING))

+#define IS_TIM_SLAVE_MODE(MODE) (((MODE) == TIM_SLAVEMODE_DISABLE)   || \

+                                 ((MODE) == TIM_SLAVEMODE_RESET)     || \

+                                 ((MODE) == TIM_SLAVEMODE_GATED)     || \

+                                 ((MODE) == TIM_SLAVEMODE_TRIGGER)   || \

+                                 ((MODE) == TIM_SLAVEMODE_EXTERNAL1) || \

+                                 ((MODE) == TIM_SLAVEMODE_COMBINED_RESETTRIGGER))

+

+/**

+  * @}

+  */  

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup TIMEx_Private_Functions TIMEx Private Functions

+  * @{

+  */

+  

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+    

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_TIM_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_uart.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_uart.h
new file mode 100644
index 0000000..71a052d
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_uart.h
@@ -0,0 +1,1165 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_uart.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of UART HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************  

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_UART_H

+#define __STM32F7xx_HAL_UART_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup UART

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup UART_Exported_Types UART Exported Types

+  * @{

+  */

+

+/**

+  * @brief UART Init Structure definition

+  */

+typedef struct

+{

+  uint32_t BaudRate;                  /*!< This member configures the UART communication baud rate.

+                                           The baud rate register is computed using the following formula:

+                                           - If oversampling is 16 or in LIN mode,

+                                              Baud Rate Register = ((PCLKx) / ((huart->Init.BaudRate)))

+                                           - If oversampling is 8,

+                                              Baud Rate Register[15:4] = ((2 * PCLKx) / ((huart->Init.BaudRate)))[15:4]

+                                              Baud Rate Register[3] =  0

+                                              Baud Rate Register[2:0] =  (((2 * PCLKx) / ((huart->Init.BaudRate)))[3:0]) >> 1      */

+

+  uint32_t WordLength;                /*!< Specifies the number of data bits transmitted or received in a frame.

+                                           This parameter can be a value of @ref UARTEx_Word_Length */

+

+  uint32_t StopBits;                  /*!< Specifies the number of stop bits transmitted.

+                                           This parameter can be a value of @ref UART_Stop_Bits */

+

+  uint32_t Parity;                    /*!< Specifies the parity mode.

+                                           This parameter can be a value of @ref UART_Parity

+                                           @note When parity is enabled, the computed parity is inserted

+                                                 at the MSB position of the transmitted data (9th bit when

+                                                 the word length is set to 9 data bits; 8th bit when the

+                                                 word length is set to 8 data bits). */

+

+  uint32_t Mode;                      /*!< Specifies whether the Receive or Transmit mode is enabled or disabled.

+                                           This parameter can be a value of @ref UART_Mode */

+

+  uint32_t HwFlowCtl;                 /*!< Specifies whether the hardware flow control mode is enabled

+                                           or disabled.

+                                           This parameter can be a value of @ref UART_Hardware_Flow_Control */

+

+  uint32_t OverSampling;              /*!< Specifies whether the Over sampling 8 is enabled or disabled, to achieve higher speed (up to fPCLK/8).

+                                           This parameter can be a value of @ref UART_Over_Sampling */

+

+  uint32_t OneBitSampling;            /*!< Specifies whether a single sample or three samples' majority vote is selected.

+                                           Selecting the single sample method increases the receiver tolerance to clock

+                                           deviations. This parameter can be a value of @ref UART_OneBit_Sampling */

+}UART_InitTypeDef;

+

+/**

+  * @brief  UART Advanced Features initalization structure definition

+  */

+typedef struct

+{

+  uint32_t AdvFeatureInit;        /*!< Specifies which advanced UART features is initialized. Several

+                                       Advanced Features may be initialized at the same time .

+                                       This parameter can be a value of @ref UART_Advanced_Features_Initialization_Type */

+

+  uint32_t TxPinLevelInvert;      /*!< Specifies whether the TX pin active level is inverted.

+                                       This parameter can be a value of @ref UART_Tx_Inv  */

+

+  uint32_t RxPinLevelInvert;      /*!< Specifies whether the RX pin active level is inverted.

+                                       This parameter can be a value of @ref UART_Rx_Inv  */

+

+  uint32_t DataInvert;            /*!< Specifies whether data are inverted (positive/direct logic

+                                       vs negative/inverted logic).

+                                       This parameter can be a value of @ref UART_Data_Inv */

+

+  uint32_t Swap;                  /*!< Specifies whether TX and RX pins are swapped.

+                                       This parameter can be a value of @ref UART_Rx_Tx_Swap */

+

+  uint32_t OverrunDisable;        /*!< Specifies whether the reception overrun detection is disabled.

+                                       This parameter can be a value of @ref UART_Overrun_Disable */

+

+  uint32_t DMADisableonRxError;   /*!< Specifies whether the DMA is disabled in case of reception error.

+                                       This parameter can be a value of @ref UART_DMA_Disable_on_Rx_Error */

+

+  uint32_t AutoBaudRateEnable;    /*!< Specifies whether auto Baud rate detection is enabled.

+                                       This parameter can be a value of @ref UART_AutoBaudRate_Enable */

+

+  uint32_t AutoBaudRateMode;      /*!< If auto Baud rate detection is enabled, specifies how the rate

+                                       detection is carried out.

+                                       This parameter can be a value of @ref UART_AutoBaud_Rate_Mode */

+

+  uint32_t MSBFirst;              /*!< Specifies whether MSB is sent first on UART line.

+                                       This parameter can be a value of @ref UART_MSB_First */

+} UART_AdvFeatureInitTypeDef;

+

+

+

+/**

+  * @brief HAL UART State structures definition

+  */

+typedef enum

+{

+  HAL_UART_STATE_RESET             = 0x00,    /*!< Peripheral is not initialized                      */

+  HAL_UART_STATE_READY             = 0x01,    /*!< Peripheral Initialized and ready for use           */

+  HAL_UART_STATE_BUSY              = 0x02,    /*!< an internal process is ongoing                     */

+  HAL_UART_STATE_BUSY_TX           = 0x12,    /*!< Data Transmission process is ongoing               */

+  HAL_UART_STATE_BUSY_RX           = 0x22,    /*!< Data Reception process is ongoing                  */

+  HAL_UART_STATE_BUSY_TX_RX        = 0x32,    /*!< Data Transmission and Reception process is ongoing */

+  HAL_UART_STATE_TIMEOUT           = 0x03,    /*!< Timeout state                                      */

+  HAL_UART_STATE_ERROR             = 0x04     /*!< Error                                              */

+}HAL_UART_StateTypeDef;

+

+/**

+  * @brief UART clock sources definition

+  */

+typedef enum

+{

+  UART_CLOCKSOURCE_PCLK1      = 0x00,    /*!< PCLK1 clock source  */

+  UART_CLOCKSOURCE_PCLK2      = 0x01,    /*!< PCLK2 clock source  */

+  UART_CLOCKSOURCE_HSI        = 0x02,    /*!< HSI clock source    */

+  UART_CLOCKSOURCE_SYSCLK     = 0x04,    /*!< SYSCLK clock source */

+  UART_CLOCKSOURCE_LSE        = 0x08,    /*!< LSE clock source       */

+  UART_CLOCKSOURCE_UNDEFINED  = 0x10     /*!< Undefined clock source */

+}UART_ClockSourceTypeDef;

+

+/**

+  * @brief  UART handle Structure definition

+  */

+typedef struct

+{

+  USART_TypeDef            *Instance;        /*!< UART registers base address        */

+

+  UART_InitTypeDef         Init;             /*!< UART communication parameters      */

+

+  UART_AdvFeatureInitTypeDef AdvancedInit;   /*!< UART Advanced Features initialization parameters */

+

+  uint8_t                  *pTxBuffPtr;      /*!< Pointer to UART Tx transfer Buffer */

+

+  uint16_t                 TxXferSize;       /*!< UART Tx Transfer size              */

+

+  uint16_t                 TxXferCount;      /*!< UART Tx Transfer Counter           */

+

+  uint8_t                  *pRxBuffPtr;      /*!< Pointer to UART Rx transfer Buffer */

+

+  uint16_t                 RxXferSize;       /*!< UART Rx Transfer size              */

+

+  uint16_t                 RxXferCount;      /*!< UART Rx Transfer Counter           */

+

+  uint16_t                 Mask;             /*!< UART Rx RDR register mask          */

+

+  DMA_HandleTypeDef        *hdmatx;          /*!< UART Tx DMA Handle parameters      */

+

+  DMA_HandleTypeDef        *hdmarx;          /*!< UART Rx DMA Handle parameters      */

+

+  HAL_LockTypeDef           Lock;            /*!< Locking object                     */

+

+  __IO HAL_UART_StateTypeDef    State;       /*!< UART communication state           */

+

+  __IO uint32_t             ErrorCode;   /*!< UART Error code                    */

+

+}UART_HandleTypeDef;

+

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup UART_Exported_Constants UART Exported Constants

+  * @{

+  */

+/** @defgroup UART_Error_Definition   UART Error Definition

+  * @{

+  */

+#define  HAL_UART_ERROR_NONE       ((uint32_t)0x00000000)    /*!< No error            */

+#define  HAL_UART_ERROR_PE         ((uint32_t)0x00000001)    /*!< Parity error        */

+#define  HAL_UART_ERROR_NE         ((uint32_t)0x00000002)    /*!< Noise error         */

+#define  HAL_UART_ERROR_FE         ((uint32_t)0x00000004)    /*!< frame error         */

+#define  HAL_UART_ERROR_ORE        ((uint32_t)0x00000008)    /*!< Overrun error       */

+#define  HAL_UART_ERROR_DMA        ((uint32_t)0x00000010)    /*!< DMA transfer error  */

+/**

+  * @}

+  */

+/** @defgroup UART_Stop_Bits   UART Number of Stop Bits

+  * @{

+  */

+#define UART_STOPBITS_1                     ((uint32_t)0x0000)

+#define UART_STOPBITS_2                     ((uint32_t)USART_CR2_STOP_1)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Parity  UART Parity

+  * @{

+  */

+#define UART_PARITY_NONE                    ((uint32_t)0x00000000)

+#define UART_PARITY_EVEN                    ((uint32_t)USART_CR1_PCE)

+#define UART_PARITY_ODD                     ((uint32_t)(USART_CR1_PCE | USART_CR1_PS))

+/**

+  * @}

+  */

+

+/** @defgroup UART_Hardware_Flow_Control UART Hardware Flow Control

+  * @{

+  */

+#define UART_HWCONTROL_NONE                  ((uint32_t)0x00000000)

+#define UART_HWCONTROL_RTS                   ((uint32_t)USART_CR3_RTSE)

+#define UART_HWCONTROL_CTS                   ((uint32_t)USART_CR3_CTSE)

+#define UART_HWCONTROL_RTS_CTS               ((uint32_t)(USART_CR3_RTSE | USART_CR3_CTSE))

+/**

+  * @}

+  */

+

+/** @defgroup UART_Mode UART Transfer Mode

+  * @{

+  */

+#define UART_MODE_RX                        ((uint32_t)USART_CR1_RE)

+#define UART_MODE_TX                        ((uint32_t)USART_CR1_TE)

+#define UART_MODE_TX_RX                     ((uint32_t)(USART_CR1_TE |USART_CR1_RE))

+/**

+  * @}

+  */

+

+ /** @defgroup UART_State  UART State

+  * @{

+  */

+#define UART_STATE_DISABLE                  ((uint32_t)0x00000000)

+#define UART_STATE_ENABLE                   ((uint32_t)USART_CR1_UE)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Over_Sampling UART Over Sampling

+  * @{

+  */

+#define UART_OVERSAMPLING_16                ((uint32_t)0x00000000)

+#define UART_OVERSAMPLING_8                 ((uint32_t)USART_CR1_OVER8)

+/**

+  * @}

+  */

+

+/** @defgroup UART_OneBit_Sampling UART One Bit Sampling Method

+  * @{

+  */

+#define UART_ONE_BIT_SAMPLE_DISABLE         ((uint32_t)0x00000000)

+#define UART_ONE_BIT_SAMPLE_ENABLE          ((uint32_t)USART_CR3_ONEBIT)

+/**

+  * @}

+  */

+

+/** @defgroup UART_AutoBaud_Rate_Mode    UART Advanced Feature AutoBaud Rate Mode

+  * @{

+  */

+#define UART_ADVFEATURE_AUTOBAUDRATE_ONSTARTBIT    ((uint32_t)0x0000)

+#define UART_ADVFEATURE_AUTOBAUDRATE_ONFALLINGEDGE ((uint32_t)USART_CR2_ABRMODE_0)

+#define UART_ADVFEATURE_AUTOBAUDRATE_ON0X7FFRAME   ((uint32_t)USART_CR2_ABRMODE_1)

+#define UART_ADVFEATURE_AUTOBAUDRATE_ON0X55FRAME   ((uint32_t)USART_CR2_ABRMODE)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Receiver_TimeOut UART Receiver TimeOut

+  * @{

+  */

+#define UART_RECEIVER_TIMEOUT_DISABLE       ((uint32_t)0x00000000)

+#define UART_RECEIVER_TIMEOUT_ENABLE        ((uint32_t)USART_CR2_RTOEN)

+/**

+  * @}

+  */

+

+/** @defgroup UART_LIN    UART Local Interconnection Network mode

+  * @{

+  */

+#define UART_LIN_DISABLE                    ((uint32_t)0x00000000)

+#define UART_LIN_ENABLE                     ((uint32_t)USART_CR2_LINEN)

+/**

+  * @}

+  */

+

+/** @defgroup UART_LIN_Break_Detection  UART LIN Break Detection

+  * @{

+  */

+#define UART_LINBREAKDETECTLENGTH_10B       ((uint32_t)0x00000000)

+#define UART_LINBREAKDETECTLENGTH_11B       ((uint32_t)USART_CR2_LBDL)

+/**

+  * @}

+  */

+

+/** @defgroup UART_DMA_Tx    UART DMA Tx

+  * @{

+  */

+#define UART_DMA_TX_DISABLE                 ((uint32_t)0x00000000)

+#define UART_DMA_TX_ENABLE                  ((uint32_t)USART_CR3_DMAT)

+/**

+  * @}

+  */

+

+/** @defgroup UART_DMA_Rx   UART DMA Rx

+  * @{

+  */

+#define UART_DMA_RX_DISABLE                 ((uint32_t)0x0000)

+#define UART_DMA_RX_ENABLE                  ((uint32_t)USART_CR3_DMAR)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Half_Duplex_Selection  UART Half Duplex Selection

+  * @{

+  */

+#define UART_HALF_DUPLEX_DISABLE            ((uint32_t)0x0000)

+#define UART_HALF_DUPLEX_ENABLE             ((uint32_t)USART_CR3_HDSEL)

+/**

+  * @}

+  */

+

+/** @defgroup UART_WakeUp_Methods   UART WakeUp Methods

+  * @{

+  */

+#define UART_WAKEUPMETHOD_IDLELINE          ((uint32_t)0x00000000)

+#define UART_WAKEUPMETHOD_ADDRESSMARK       ((uint32_t)USART_CR1_WAKE)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Request_Parameters UART Request Parameters

+  * @{

+  */

+#define UART_AUTOBAUD_REQUEST               ((uint32_t)USART_RQR_ABRRQ)        /*!< Auto-Baud Rate Request */

+#define UART_SENDBREAK_REQUEST              ((uint32_t)USART_RQR_SBKRQ)        /*!< Send Break Request */

+#define UART_MUTE_MODE_REQUEST              ((uint32_t)USART_RQR_MMRQ)         /*!< Mute Mode Request */

+#define UART_RXDATA_FLUSH_REQUEST           ((uint32_t)USART_RQR_RXFRQ)        /*!< Receive Data flush Request */

+#define UART_TXDATA_FLUSH_REQUEST           ((uint32_t)USART_RQR_TXFRQ)        /*!< Transmit data flush Request */

+/**

+  * @}

+  */

+

+/** @defgroup UART_Advanced_Features_Initialization_Type  UART Advanced Feature Initialization Type

+  * @{

+  */

+#define UART_ADVFEATURE_NO_INIT                 ((uint32_t)0x00000000)

+#define UART_ADVFEATURE_TXINVERT_INIT           ((uint32_t)0x00000001)

+#define UART_ADVFEATURE_RXINVERT_INIT           ((uint32_t)0x00000002)

+#define UART_ADVFEATURE_DATAINVERT_INIT         ((uint32_t)0x00000004)

+#define UART_ADVFEATURE_SWAP_INIT               ((uint32_t)0x00000008)

+#define UART_ADVFEATURE_RXOVERRUNDISABLE_INIT   ((uint32_t)0x00000010)

+#define UART_ADVFEATURE_DMADISABLEONERROR_INIT  ((uint32_t)0x00000020)

+#define UART_ADVFEATURE_AUTOBAUDRATE_INIT       ((uint32_t)0x00000040)

+#define UART_ADVFEATURE_MSBFIRST_INIT           ((uint32_t)0x00000080)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Tx_Inv UART Advanced Feature TX Pin Active Level Inversion

+  * @{

+  */

+#define UART_ADVFEATURE_TXINV_DISABLE       ((uint32_t)0x00000000)

+#define UART_ADVFEATURE_TXINV_ENABLE        ((uint32_t)USART_CR2_TXINV)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Rx_Inv UART Advanced Feature RX Pin Active Level Inversion

+  * @{

+  */

+#define UART_ADVFEATURE_RXINV_DISABLE       ((uint32_t)0x00000000)

+#define UART_ADVFEATURE_RXINV_ENABLE        ((uint32_t)USART_CR2_RXINV)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Data_Inv  UART Advanced Feature Binary Data Inversion

+  * @{

+  */

+#define UART_ADVFEATURE_DATAINV_DISABLE     ((uint32_t)0x00000000)

+#define UART_ADVFEATURE_DATAINV_ENABLE      ((uint32_t)USART_CR2_DATAINV)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Rx_Tx_Swap UART Advanced Feature RX TX Pins Swap

+  * @{

+  */

+#define UART_ADVFEATURE_SWAP_DISABLE        ((uint32_t)0x00000000)

+#define UART_ADVFEATURE_SWAP_ENABLE         ((uint32_t)USART_CR2_SWAP)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Overrun_Disable  UART Advanced Feature Overrun Disable

+  * @{

+  */

+#define UART_ADVFEATURE_OVERRUN_ENABLE      ((uint32_t)0x00000000)

+#define UART_ADVFEATURE_OVERRUN_DISABLE     ((uint32_t)USART_CR3_OVRDIS)

+/**

+  * @}

+  */

+

+/** @defgroup UART_AutoBaudRate_Enable  UART Advanced Feature Auto BaudRate Enable

+  * @{

+  */

+#define UART_ADVFEATURE_AUTOBAUDRATE_DISABLE   ((uint32_t)0x00000000)

+#define UART_ADVFEATURE_AUTOBAUDRATE_ENABLE    ((uint32_t)USART_CR2_ABREN)

+/**

+  * @}

+  */

+

+/** @defgroup UART_DMA_Disable_on_Rx_Error   UART Advanced Feature DMA Disable On Rx Error

+  * @{

+  */

+#define UART_ADVFEATURE_DMA_ENABLEONRXERROR    ((uint32_t)0x00000000)

+#define UART_ADVFEATURE_DMA_DISABLEONRXERROR   ((uint32_t)USART_CR3_DDRE)

+/**

+  * @}

+  */

+

+/** @defgroup UART_MSB_First   UART Advanced Feature MSB First

+  * @{

+  */

+#define UART_ADVFEATURE_MSBFIRST_DISABLE    ((uint32_t)0x00000000)

+#define UART_ADVFEATURE_MSBFIRST_ENABLE     ((uint32_t)USART_CR2_MSBFIRST)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Mute_Mode   UART Advanced Feature Mute Mode Enable

+  * @{

+  */

+#define UART_ADVFEATURE_MUTEMODE_DISABLE    ((uint32_t)0x00000000)

+#define UART_ADVFEATURE_MUTEMODE_ENABLE     ((uint32_t)USART_CR1_MME)

+/**

+  * @}

+  */

+

+/** @defgroup UART_CR2_ADDRESS_LSB_POS    UART Address-matching LSB Position In CR2 Register

+  * @{

+  */

+#define UART_CR2_ADDRESS_LSB_POS            ((uint32_t) 24)

+/**

+  * @}

+  */

+

+/** @defgroup UART_DriverEnable_Polarity      UART DriverEnable Polarity

+  * @{

+  */

+#define UART_DE_POLARITY_HIGH               ((uint32_t)0x00000000)

+#define UART_DE_POLARITY_LOW                ((uint32_t)USART_CR3_DEP)

+/**

+  * @}

+  */

+

+/** @defgroup UART_CR1_DEAT_ADDRESS_LSB_POS    UART Driver Enable Assertion Time LSB Position In CR1 Register

+  * @{

+  */

+#define UART_CR1_DEAT_ADDRESS_LSB_POS       ((uint32_t) 21)

+/**

+  * @}

+  */

+

+/** @defgroup UART_CR1_DEDT_ADDRESS_LSB_POS    UART Driver Enable DeAssertion Time LSB Position In CR1 Register

+  * @{

+  */

+#define UART_CR1_DEDT_ADDRESS_LSB_POS       ((uint32_t) 16)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Interruption_Mask    UART Interruptions Flag Mask

+  * @{

+  */

+#define UART_IT_MASK                        ((uint32_t)0x001F)

+/**

+  * @}

+  */

+

+/** @defgroup UART_TimeOut_Value    UART polling-based communications time-out value

+  * @{

+  */

+#define HAL_UART_TIMEOUT_VALUE              0x1FFFFFF

+/**

+  * @}

+  */

+

+/** @defgroup UART_Flags     UART Status Flags

+  *        Elements values convention: 0xXXXX

+  *           - 0xXXXX  : Flag mask in the ISR register

+  * @{

+  */

+#define UART_FLAG_TEACK                     ((uint32_t)0x00200000)

+#define UART_FLAG_SBKF                      ((uint32_t)0x00040000

+#define UART_FLAG_CMF                       ((uint32_t)0x00020000)

+#define UART_FLAG_BUSY                      ((uint32_t)0x00010000)

+#define UART_FLAG_ABRF                      ((uint32_t)0x00008000)

+#define UART_FLAG_ABRE                      ((uint32_t)0x00004000)

+#define UART_FLAG_EOBF                      ((uint32_t)0x00001000)

+#define UART_FLAG_RTOF                      ((uint32_t)0x00000800)

+#define UART_FLAG_CTS                       ((uint32_t)0x00000400)

+#define UART_FLAG_CTSIF                     ((uint32_t)0x00000200)

+#define UART_FLAG_LBDF                      ((uint32_t)0x00000100)

+#define UART_FLAG_TXE                       ((uint32_t)0x00000080)

+#define UART_FLAG_TC                        ((uint32_t)0x00000040)

+#define UART_FLAG_RXNE                      ((uint32_t)0x00000020)

+#define UART_FLAG_IDLE                      ((uint32_t)0x00000010)

+#define UART_FLAG_ORE                       ((uint32_t)0x00000008)

+#define UART_FLAG_NE                        ((uint32_t)0x00000004)

+#define UART_FLAG_FE                        ((uint32_t)0x00000002)

+#define UART_FLAG_PE                        ((uint32_t)0x00000001)

+/**

+  * @}

+  */

+

+/** @defgroup UART_Interrupt_definition   UART Interrupts Definition

+  *        Elements values convention: 0000ZZZZ0XXYYYYYb

+  *           - YYYYY  : Interrupt source position in the XX register (5bits)

+  *           - XX  : Interrupt source register (2bits)

+  *                 - 01: CR1 register

+  *                 - 10: CR2 register

+  *                 - 11: CR3 register

+  *           - ZZZZ  : Flag position in the ISR register(4bits)

+  * @{

+  */

+#define UART_IT_PE                          ((uint32_t)0x0028)

+#define UART_IT_TXE                         ((uint32_t)0x0727)

+#define UART_IT_TC                          ((uint32_t)0x0626)

+#define UART_IT_RXNE                        ((uint32_t)0x0525)

+#define UART_IT_IDLE                        ((uint32_t)0x0424)

+#define UART_IT_LBD                         ((uint32_t)0x0846)

+#define UART_IT_CTS                         ((uint32_t)0x096A)

+#define UART_IT_CM                          ((uint32_t)0x112E)

+

+/**       Elements values convention: 000000000XXYYYYYb

+  *           - YYYYY  : Interrupt source position in the XX register (5bits)

+  *           - XX  : Interrupt source register (2bits)

+  *                 - 01: CR1 register

+  *                 - 10: CR2 register

+  *                 - 11: CR3 register

+  */

+#define UART_IT_ERR                         ((uint32_t)0x0060)

+

+/**       Elements values convention: 0000ZZZZ00000000b

+  *           - ZZZZ  : Flag position in the ISR register(4bits)

+  */

+#define UART_IT_ORE                         ((uint32_t)0x0300)

+#define UART_IT_NE                          ((uint32_t)0x0200)

+#define UART_IT_FE                          ((uint32_t)0x0100)

+/**

+  * @}

+  */

+

+/** @defgroup UART_IT_CLEAR_Flags  UART Interruption Clear Flags

+  * @{

+  */

+#define UART_CLEAR_PEF                       USART_ICR_PECF            /*!< Parity Error Clear Flag */

+#define UART_CLEAR_FEF                       USART_ICR_FECF            /*!< Framing Error Clear Flag */

+#define UART_CLEAR_NEF                       USART_ICR_NCF             /*!< Noise detected Clear Flag */

+#define UART_CLEAR_OREF                      USART_ICR_ORECF           /*!< OverRun Error Clear Flag */

+#define UART_CLEAR_IDLEF                     USART_ICR_IDLECF          /*!< IDLE line detected Clear Flag */

+#define UART_CLEAR_TCF                       USART_ICR_TCCF            /*!< Transmission Complete Clear Flag */

+#define UART_CLEAR_LBDF                      USART_ICR_LBDCF           /*!< LIN Break Detection Clear Flag */

+#define UART_CLEAR_CTSF                      USART_ICR_CTSCF           /*!< CTS Interrupt Clear Flag */

+#define UART_CLEAR_RTOF                      USART_ICR_RTOCF           /*!< Receiver Time Out Clear Flag */

+#define UART_CLEAR_EOBF                      USART_ICR_EOBCF           /*!< End Of Block Clear Flag */

+#define UART_CLEAR_CMF                       USART_ICR_CMCF            /*!< Character Match Clear Flag */

+/**

+  * @}

+  */

+

+

+/**

+  * @}

+  */

+

+/* Exported macros -----------------------------------------------------------*/

+/** @defgroup UART_Exported_Macros UART Exported Macros

+  * @{

+  */

+

+/** @brief Reset UART handle state

+  * @param  __HANDLE__: UART handle.

+  * @retval None

+  */

+#define __HAL_UART_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_UART_STATE_RESET)

+

+/** @brief  Flush the UART Data registers

+  * @param  __HANDLE__: specifies the UART Handle.

+  */

+#define __HAL_UART_FLUSH_DRREGISTER(__HANDLE__)  \

+  do{                \

+      SET_BIT((__HANDLE__)->Instance->RQR, UART_RXDATA_FLUSH_REQUEST); \

+      SET_BIT((__HANDLE__)->Instance->RQR, UART_TXDATA_FLUSH_REQUEST); \

+    }  while(0)

+

+/** @brief  Clears the specified UART ISR flag, in setting the proper ICR register flag.

+  * @param  __HANDLE__: specifies the UART Handle.

+  * @param  __FLAG__: 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 UART_CLEAR_PEF: Parity Error Clear Flag

+  *            @arg UART_CLEAR_FEF: Framing Error Clear Flag

+  *            @arg UART_CLEAR_NEF: Noise detected Clear Flag

+  *            @arg UART_CLEAR_OREF: OverRun Error Clear Flag

+  *            @arg UART_CLEAR_IDLEF: IDLE line detected Clear Flag

+  *            @arg UART_CLEAR_TCF: Transmission Complete Clear Flag

+  *            @arg UART_CLEAR_LBDF: LIN Break Detection Clear Flag

+  *            @arg UART_CLEAR_CTSF: CTS Interrupt Clear Flag

+  *            @arg UART_CLEAR_RTOF: Receiver Time Out Clear Flag

+  *            @arg UART_CLEAR_EOBF: End Of Block Clear Flag

+  *            @arg UART_CLEAR_CMF: Character Match Clear Flag

+  * @retval None

+  */

+#define __HAL_UART_CLEAR_IT(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = ~(__FLAG__))

+

+/** @brief  Clear the UART PE pending flag.

+  * @param  __HANDLE__: specifies the UART Handle.

+  * @retval None

+  */

+#define __HAL_UART_CLEAR_PEFLAG(__HANDLE__)   __HAL_UART_CLEAR_IT((__HANDLE__),UART_CLEAR_PEF)

+

+/** @brief  Clear the UART FE pending flag.

+  * @param  __HANDLE__: specifies the UART Handle.

+  * @retval None

+  */

+#define __HAL_UART_CLEAR_FEFLAG(__HANDLE__)   __HAL_UART_CLEAR_IT((__HANDLE__),UART_CLEAR_FEF)

+

+/** @brief  Clear the UART NE pending flag.

+  * @param  __HANDLE__: specifies the UART Handle.

+  * @retval None

+  */

+#define __HAL_UART_CLEAR_NEFLAG(__HANDLE__)  __HAL_UART_CLEAR_IT((__HANDLE__),UART_CLEAR_NEF)

+

+/** @brief  Clear the UART ORE pending flag.

+  * @param  __HANDLE__: specifies the UART Handle.

+  * @retval None

+  */

+#define __HAL_UART_CLEAR_OREFLAG(__HANDLE__)   __HAL_UART_CLEAR_IT((__HANDLE__),UART_CLEAR_OREF)

+

+/** @brief  Clear the UART IDLE pending flag.

+  * @param  __HANDLE__: specifies the UART Handle.

+  * @retval None

+  */

+#define __HAL_UART_CLEAR_IDLEFLAG(__HANDLE__)   __HAL_UART_CLEAR_IT((__HANDLE__),UART_CLEAR_IDLEF)

+

+/** @brief  Checks whether the specified UART flag is set or not.

+  * @param  __HANDLE__: specifies the UART Handle.

+  * @param  __FLAG__: specifies the flag to check.

+  *        This parameter can be one of the following values:

+  *            @arg UART_FLAG_REACK: Receive enable acknowledge flag

+  *            @arg UART_FLAG_TEACK: Transmit enable acknowledge flag

+  *            @arg UART_FLAG_WUF:   Wake up from stop mode flag

+  *            @arg UART_FLAG_RWU:   Receiver wake up flag (is the UART in mute mode)

+  *            @arg UART_FLAG_SBKF:  Send Break flag

+  *            @arg UART_FLAG_CMF:   Character match flag

+  *            @arg UART_FLAG_BUSY:  Busy flag

+  *            @arg UART_FLAG_ABRF:  Auto Baud rate detection flag

+  *            @arg UART_FLAG_ABRE:  Auto Baud rate detection error flag

+  *            @arg UART_FLAG_EOBF:  End of block flag

+  *            @arg UART_FLAG_RTOF:  Receiver timeout flag

+  *            @arg UART_FLAG_CTS:   CTS Change flag (not available for UART4 and UART5)

+  *            @arg UART_FLAG_LBD:   LIN Break detection flag

+  *            @arg UART_FLAG_TXE:   Transmit data register empty flag

+  *            @arg UART_FLAG_TC:    Transmission Complete flag

+  *            @arg UART_FLAG_RXNE:  Receive data register not empty flag

+  *            @arg UART_FLAG_IDLE:  Idle Line detection flag

+  *            @arg UART_FLAG_ORE:   OverRun Error flag

+  *            @arg UART_FLAG_NE:    Noise Error flag

+  *            @arg UART_FLAG_FE:    Framing Error flag

+  *            @arg UART_FLAG_PE:    Parity Error flag

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define __HAL_UART_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))

+

+/** @brief  Enables the specified UART interrupt.

+  * @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 UART_IT_WUF:  Wakeup from stop mode interrupt

+  *            @arg UART_IT_CM:   Character match interrupt

+  *            @arg UART_IT_CTS:  CTS change interrupt

+  *            @arg UART_IT_LBD:  LIN Break detection interrupt

+  *            @arg UART_IT_TXE:  Transmit Data Register empty interrupt

+  *            @arg UART_IT_TC:   Transmission complete interrupt

+  *            @arg UART_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg UART_IT_IDLE: Idle line detection interrupt

+  *            @arg UART_IT_PE:   Parity Error interrupt

+  *            @arg UART_IT_ERR:  Error interrupt(Frame error, noise error, overrun error)

+  * @retval None

+  */

+#define __HAL_UART_ENABLE_IT(__HANDLE__, __INTERRUPT__)   (((((uint8_t)(__INTERRUPT__)) >> 5U) == 1)? ((__HANDLE__)->Instance->CR1 |= (1U << ((__INTERRUPT__) & UART_IT_MASK))): \

+                                                           ((((uint8_t)(__INTERRUPT__)) >> 5U) == 2)? ((__HANDLE__)->Instance->CR2 |= (1U << ((__INTERRUPT__) & UART_IT_MASK))): \

+                                                           ((__HANDLE__)->Instance->CR3 |= (1U << ((__INTERRUPT__) & UART_IT_MASK))))

+

+

+/** @brief  Disables the specified UART interrupt.

+  * @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 UART_IT_CM:   Character match interrupt

+  *            @arg UART_IT_CTS:  CTS change interrupt

+  *            @arg UART_IT_LBD:  LIN Break detection interrupt

+  *            @arg UART_IT_TXE:  Transmit Data Register empty interrupt

+  *            @arg UART_IT_TC:   Transmission complete interrupt

+  *            @arg UART_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg UART_IT_IDLE: Idle line detection interrupt

+  *            @arg UART_IT_PE:   Parity Error interrupt

+  *            @arg UART_IT_ERR:  Error interrupt(Frame error, noise error, overrun error)

+  * @retval None

+  */

+#define __HAL_UART_DISABLE_IT(__HANDLE__, __INTERRUPT__)  (((((uint8_t)(__INTERRUPT__)) >> 5U) == 1)? ((__HANDLE__)->Instance->CR1 &= ~ (1U << ((__INTERRUPT__) & UART_IT_MASK))): \

+                                                           ((((uint8_t)(__INTERRUPT__)) >> 5U) == 2)? ((__HANDLE__)->Instance->CR2 &= ~ (1U << ((__INTERRUPT__) & UART_IT_MASK))): \

+                                                           ((__HANDLE__)->Instance->CR3 &= ~ (1U << ((__INTERRUPT__) & UART_IT_MASK))))

+

+/** @brief  Checks whether the specified UART interrupt has occurred or not.

+  * @param  __HANDLE__: specifies the UART Handle.

+  * @param  __IT__: specifies the UART interrupt to check.

+  *          This parameter can be one of the following values:

+  *            @arg UART_IT_CM:   Character match interrupt

+  *            @arg UART_IT_CTS:  CTS change interrupt (not available for UART4 and UART5)

+  *            @arg UART_IT_LBD:  LIN Break detection interrupt

+  *            @arg UART_IT_TXE:  Transmit Data Register empty interrupt

+  *            @arg UART_IT_TC:   Transmission complete interrupt

+  *            @arg UART_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg UART_IT_IDLE: Idle line detection interrupt

+  *            @arg UART_IT_ORE:  OverRun Error interrupt

+  *            @arg UART_IT_NE:   Noise Error interrupt

+  *            @arg UART_IT_FE:   Framing Error interrupt

+  *            @arg UART_IT_PE:   Parity Error interrupt

+  * @retval The new state of __IT__ (TRUE or FALSE).

+  */

+#define __HAL_UART_GET_IT(__HANDLE__, __IT__) ((__HANDLE__)->Instance->ISR & ((uint32_t)1 << ((__IT__)>> 0x08)))

+

+/** @brief  Checks whether the specified UART interrupt source is enabled.

+  * @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 UART_IT_CTS: CTS change interrupt (not available for UART4 and UART5)

+  *            @arg UART_IT_LBD: LIN Break detection interrupt

+  *            @arg UART_IT_TXE: Transmit Data Register empty interrupt

+  *            @arg UART_IT_TC:  Transmission complete interrupt

+  *            @arg UART_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg UART_IT_IDLE: Idle line detection interrupt

+  *            @arg UART_IT_ORE: OverRun Error interrupt

+  *            @arg UART_IT_NE: Noise Error interrupt

+  *            @arg UART_IT_FE: Framing Error interrupt

+  *            @arg UART_IT_PE: Parity Error interrupt

+  * @retval The new state of __IT__ (TRUE or FALSE).

+  */

+#define __HAL_UART_GET_IT_SOURCE(__HANDLE__, __IT__) ((((((uint8_t)(__IT__)) >> 5U) == 1)? (__HANDLE__)->Instance->CR1:(((((uint8_t)(__IT__)) >> 5U) == 2)? \

+                                                       (__HANDLE__)->Instance->CR2 : (__HANDLE__)->Instance->CR3)) & ((uint32_t)1 << (((uint16_t)(__IT__)) & UART_IT_MASK)))

+

+/** @brief  Set a specific UART request flag.

+  * @param  __HANDLE__: specifies the UART Handle.

+  * @param  __REQ__: specifies the request flag to set

+  *          This parameter can be one of the following values:

+  *            @arg UART_AUTOBAUD_REQUEST: Auto-Baud Rate Request

+  *            @arg UART_SENDBREAK_REQUEST: Send Break Request

+  *            @arg UART_MUTE_MODE_REQUEST: Mute Mode Request

+  *            @arg UART_RXDATA_FLUSH_REQUEST: Receive Data flush Request

+  *            @arg UART_TXDATA_FLUSH_REQUEST: Transmit data flush Request

+  * @retval None

+  */

+#define __HAL_UART_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (uint32_t)(__REQ__))

+

+/** @brief  Enables the UART one bit sample method

+  * @param  __HANDLE__: specifies the UART Handle.  

+  * @retval None

+  */     

+#define __HAL_UART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)

+

+/** @brief  Disables the UART one bit sample method

+  * @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.

+  * @retval None

+  */

+#define __HAL_UART_ENABLE(__HANDLE__)                   ((__HANDLE__)->Instance->CR1 |=  USART_CR1_UE)

+

+/** @brief  Disable UART

+  * @param  __HANDLE__: specifies the UART Handle.

+  * @retval None

+  */

+#define __HAL_UART_DISABLE(__HANDLE__)                  ((__HANDLE__)->Instance->CR1 &=  ~USART_CR1_UE)

+

+/** @brief  Enable CTS flow control 

+  *         This macro allows to enable CTS hardware flow control for a given UART instance, 

+  *         without need to call HAL_UART_Init() function.

+  *         As involving direct access to UART registers, usage of this macro should be fully endorsed by user.

+  * @note   As macro is expected to be used for modifying CTS Hw flow control feature activation, without need

+  *         for USART instance Deinit/Init, following conditions for macro call should be fulfilled :

+  *           - 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.

+  *         The Handle Instance can be USART1, USART2 or LPUART.

+  * @retval None

+  */

+#define __HAL_UART_HWCONTROL_CTS_ENABLE(__HANDLE__)        \

+  do{                                                      \

+    SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE);  \

+    (__HANDLE__)->Init.HwFlowCtl |= USART_CR3_CTSE;        \

+  } while(0)

+

+/** @brief  Disable CTS flow control 

+  *         This macro allows to disable CTS hardware flow control for a given UART instance, 

+  *         without need to call HAL_UART_Init() function.

+  *         As involving direct access to UART registers, usage of this macro should be fully endorsed by user.

+  * @note   As macro is expected to be used for modifying CTS Hw flow control feature activation, without need

+  *         for USART instance Deinit/Init, following conditions for macro call should be fulfilled :

+  *           - 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.

+  *         The Handle Instance can be USART1, USART2 or LPUART.

+  * @retval None

+  */

+#define __HAL_UART_HWCONTROL_CTS_DISABLE(__HANDLE__)        \

+  do{                                                       \

+    CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \

+    (__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_CTSE);      \

+  } while(0)

+

+/** @brief  Enable RTS flow control 

+  *         This macro allows to enable RTS hardware flow control for a given UART instance, 

+  *         without need to call HAL_UART_Init() function.

+  *         As involving direct access to UART registers, usage of this macro should be fully endorsed by user.

+  * @note   As macro is expected to be used for modifying RTS Hw flow control feature activation, without need

+  *         for USART instance Deinit/Init, following conditions for macro call should be fulfilled :

+  *           - 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.

+  *         The Handle Instance can be USART1, USART2 or LPUART.

+  * @retval None

+  */

+#define __HAL_UART_HWCONTROL_RTS_ENABLE(__HANDLE__)       \

+  do{                                                     \

+    SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE); \

+    (__HANDLE__)->Init.HwFlowCtl |= USART_CR3_RTSE;       \

+  } while(0)

+

+/** @brief  Disable RTS flow control 

+  *         This macro allows to disable RTS hardware flow control for a given UART instance, 

+  *         without need to call HAL_UART_Init() function.

+  *         As involving direct access to UART registers, usage of this macro should be fully endorsed by user.

+  * @note   As macro is expected to be used for modifying RTS Hw flow control feature activation, without need

+  *         for USART instance Deinit/Init, following conditions for macro call should be fulfilled :

+  *           - 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.

+  *         The Handle Instance can be USART1, USART2 or LPUART.

+  * @retval None

+  */

+#define __HAL_UART_HWCONTROL_RTS_DISABLE(__HANDLE__)       \

+  do{                                                      \

+    CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE);\

+    (__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_RTSE);     \

+  } while(0)

+

+/**

+  * @}

+  */

+

+/* Private macros --------------------------------------------------------*/

+/** @defgroup UART_Private_Macros   UART Private Macros

+  * @{

+  */

+/** @brief  BRR division operation to set BRR register with LPUART

+  * @param  _PCLK_: LPUART clock

+  * @param  _BAUD_: Baud rate set by the user

+  * @retval Division result

+  */

+#define UART_DIV_LPUART(_PCLK_, _BAUD_)                (((_PCLK_)*256)/((_BAUD_)))

+

+/** @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

+  * @retval Division result

+  */

+#define UART_DIV_SAMPLING8(_PCLK_, _BAUD_)             (((_PCLK_)*2)/((_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

+  * @retval Division result

+  */

+#define UART_DIV_SAMPLING16(_PCLK_, _BAUD_)             (((_PCLK_))/((_BAUD_)))

+

+/** @brief  Check UART Baud rate

+  * @param  BAUDRATE: Baudrate specified by the user

+  *         The maximum Baud Rate is derived from the maximum clock on F7 (i.e. 216 MHz)

+  *         divided by the smallest oversampling used on the USART (i.e. 8)

+  * @retval Test result (TRUE or FALSE).

+  */

+#define IS_UART_BAUDRATE(BAUDRATE) ((BAUDRATE) < 9000001)

+

+/** @brief  Check UART assertion time

+  * @param  TIME: 5-bit value assertion time

+  * @retval Test result (TRUE or FALSE).

+  */

+#define IS_UART_ASSERTIONTIME(TIME)    ((TIME) <= 0x1F)

+

+/** @brief  Check UART deassertion time

+  * @param  TIME: 5-bit value deassertion time

+  * @retval Test result (TRUE or FALSE).

+  */

+#define IS_UART_DEASSERTIONTIME(TIME) ((TIME) <= 0x1F)

+

+#define IS_UART_STOPBITS(STOPBITS) (((STOPBITS) == UART_STOPBITS_1) || \

+                                    ((STOPBITS) == UART_STOPBITS_2))

+

+#define IS_UART_PARITY(PARITY) (((PARITY) == UART_PARITY_NONE) || \

+                                ((PARITY) == UART_PARITY_EVEN) || \

+                                ((PARITY) == UART_PARITY_ODD))

+

+#define IS_UART_HARDWARE_FLOW_CONTROL(CONTROL)\

+                              (((CONTROL) == UART_HWCONTROL_NONE) || \

+                               ((CONTROL) == UART_HWCONTROL_RTS) || \

+                               ((CONTROL) == UART_HWCONTROL_CTS) || \

+                               ((CONTROL) == UART_HWCONTROL_RTS_CTS))

+

+#define IS_UART_MODE(MODE) ((((MODE) & (~((uint32_t)(UART_MODE_TX_RX)))) == (uint32_t)0x00) && ((MODE) != (uint32_t)0x00))

+

+#define IS_UART_STATE(STATE) (((STATE) == UART_STATE_DISABLE) || \

+                              ((STATE) == UART_STATE_ENABLE))

+

+#define IS_UART_OVERSAMPLING(SAMPLING) (((SAMPLING) == UART_OVERSAMPLING_16) || \

+                                        ((SAMPLING) == UART_OVERSAMPLING_8))

+

+#define IS_UART_ONE_BIT_SAMPLE(ONEBIT) (((ONEBIT) == UART_ONE_BIT_SAMPLE_DISABLE) || \

+                                        ((ONEBIT) == UART_ONE_BIT_SAMPLE_ENABLE))

+

+#define IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(MODE)  (((MODE) == UART_ADVFEATURE_AUTOBAUDRATE_ONSTARTBIT) || \

+                                                    ((MODE) == UART_ADVFEATURE_AUTOBAUDRATE_ONFALLINGEDGE) || \

+                                                    ((MODE) == UART_ADVFEATURE_AUTOBAUDRATE_ON0X7FFRAME) || \

+                                                    ((MODE) == UART_ADVFEATURE_AUTOBAUDRATE_ON0X55FRAME))

+

+#define IS_UART_RECEIVER_TIMEOUT(TIMEOUT) (((TIMEOUT) == UART_RECEIVER_TIMEOUT_DISABLE) || \

+                                           ((TIMEOUT) == UART_RECEIVER_TIMEOUT_ENABLE))

+

+#define IS_UART_LIN(LIN)            (((LIN) == UART_LIN_DISABLE) || \

+                                     ((LIN) == UART_LIN_ENABLE))

+

+#define IS_UART_WAKEUPMETHOD(WAKEUP) (((WAKEUP) == UART_WAKEUPMETHOD_IDLELINE) || \

+                                      ((WAKEUP) == UART_WAKEUPMETHOD_ADDRESSMARK))

+

+#define IS_UART_LIN_BREAK_DETECT_LENGTH(LENGTH) (((LENGTH) == UART_LINBREAKDETECTLENGTH_10B) || \

+                                                 ((LENGTH) == UART_LINBREAKDETECTLENGTH_11B))

+

+#define IS_UART_DMA_TX(DMATX)         (((DMATX) == UART_DMA_TX_DISABLE) || \

+                                       ((DMATX) == UART_DMA_TX_ENABLE))

+

+#define IS_UART_DMA_RX(DMARX)         (((DMARX) == UART_DMA_RX_DISABLE) || \

+                                       ((DMARX) == UART_DMA_RX_ENABLE))

+

+#define IS_UART_HALF_DUPLEX(HDSEL)         (((HDSEL) == UART_HALF_DUPLEX_DISABLE) || \

+                                            ((HDSEL) == UART_HALF_DUPLEX_ENABLE))

+

+#define IS_UART_REQUEST_PARAMETER(PARAM) (((PARAM) == UART_AUTOBAUD_REQUEST) || \

+                                          ((PARAM) == UART_SENDBREAK_REQUEST) || \

+                                          ((PARAM) == UART_MUTE_MODE_REQUEST) || \

+                                          ((PARAM) == UART_RXDATA_FLUSH_REQUEST) || \

+                                          ((PARAM) == UART_TXDATA_FLUSH_REQUEST))

+

+#define IS_UART_ADVFEATURE_INIT(INIT)           ((INIT) <= (UART_ADVFEATURE_NO_INIT | \

+                                                            UART_ADVFEATURE_TXINVERT_INIT | \

+                                                            UART_ADVFEATURE_RXINVERT_INIT | \

+                                                            UART_ADVFEATURE_DATAINVERT_INIT | \

+                                                            UART_ADVFEATURE_SWAP_INIT | \

+                                                            UART_ADVFEATURE_RXOVERRUNDISABLE_INIT | \

+                                                            UART_ADVFEATURE_DMADISABLEONERROR_INIT   | \

+                                                            UART_ADVFEATURE_AUTOBAUDRATE_INIT | \

+                                                            UART_ADVFEATURE_MSBFIRST_INIT))

+

+#define IS_UART_ADVFEATURE_TXINV(TXINV) (((TXINV) == UART_ADVFEATURE_TXINV_DISABLE) || \

+                                         ((TXINV) == UART_ADVFEATURE_TXINV_ENABLE))

+

+#define IS_UART_ADVFEATURE_RXINV(RXINV) (((RXINV) == UART_ADVFEATURE_RXINV_DISABLE) || \

+                                         ((RXINV) == UART_ADVFEATURE_RXINV_ENABLE))

+

+#define IS_UART_ADVFEATURE_DATAINV(DATAINV) (((DATAINV) == UART_ADVFEATURE_DATAINV_DISABLE) || \

+                                             ((DATAINV) == UART_ADVFEATURE_DATAINV_ENABLE))

+

+#define IS_UART_ADVFEATURE_SWAP(SWAP) (((SWAP) == UART_ADVFEATURE_SWAP_DISABLE) || \

+                                       ((SWAP) == UART_ADVFEATURE_SWAP_ENABLE))

+

+#define IS_UART_OVERRUN(OVERRUN)         (((OVERRUN) == UART_ADVFEATURE_OVERRUN_ENABLE) || \

+                                          ((OVERRUN) == UART_ADVFEATURE_OVERRUN_DISABLE))

+

+#define IS_UART_ADVFEATURE_AUTOBAUDRATE(AUTOBAUDRATE)  (((AUTOBAUDRATE) == UART_ADVFEATURE_AUTOBAUDRATE_DISABLE) || \

+                                                        ((AUTOBAUDRATE) == UART_ADVFEATURE_AUTOBAUDRATE_ENABLE))

+

+#define IS_UART_ADVFEATURE_DMAONRXERROR(DMA)      (((DMA) == UART_ADVFEATURE_DMA_ENABLEONRXERROR) || \

+                                                   ((DMA) == UART_ADVFEATURE_DMA_DISABLEONRXERROR))

+

+#define IS_UART_ADVFEATURE_MSBFIRST(MSBFIRST) (((MSBFIRST) == UART_ADVFEATURE_MSBFIRST_DISABLE) || \

+                                               ((MSBFIRST) == UART_ADVFEATURE_MSBFIRST_ENABLE))

+

+#define IS_UART_MUTE_MODE(MUTE)           (((MUTE) == UART_ADVFEATURE_MUTEMODE_DISABLE) || \

+                                           ((MUTE) == UART_ADVFEATURE_MUTEMODE_ENABLE))

+

+#define IS_UART_DE_POLARITY(POLARITY)    (((POLARITY) == UART_DE_POLARITY_HIGH) || \

+                                          ((POLARITY) == UART_DE_POLARITY_LOW))

+

+/**

+  * @}

+  */

+/* Include UART HAL Extension module */

+#include "stm32f7xx_hal_uart_ex.h"

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup UART_Exported_Functions UART Exported Functions

+  * @{

+  */

+

+/** @addtogroup UART_Exported_Functions_Group1 Initialization and de-initialization functions

+  * @{

+  */

+

+/* Initialization and de-initialization functions  ****************************/

+HAL_StatusTypeDef HAL_UART_Init(UART_HandleTypeDef *huart);

+HAL_StatusTypeDef HAL_HalfDuplex_Init(UART_HandleTypeDef *huart);

+HAL_StatusTypeDef HAL_LIN_Init(UART_HandleTypeDef *huart, uint32_t BreakDetectLength);

+HAL_StatusTypeDef HAL_MultiProcessor_Init(UART_HandleTypeDef *huart, uint8_t Address, uint32_t WakeUpMethod);

+HAL_StatusTypeDef HAL_UART_DeInit (UART_HandleTypeDef *huart);

+void HAL_UART_MspInit(UART_HandleTypeDef *huart);

+void HAL_UART_MspDeInit(UART_HandleTypeDef *huart);

+

+/**

+  * @}

+  */

+

+/** @addtogroup UART_Exported_Functions_Group2 IO operation functions

+  * @{

+  */

+

+/* IO operation functions *****************************************************/

+HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_UART_Transmit_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_UART_Transmit_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_UART_Receive_DMA(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);

+HAL_StatusTypeDef HAL_UART_DMAPause(UART_HandleTypeDef *huart);

+HAL_StatusTypeDef HAL_UART_DMAResume(UART_HandleTypeDef *huart);

+HAL_StatusTypeDef HAL_UART_DMAStop(UART_HandleTypeDef *huart);

+void HAL_UART_IRQHandler(UART_HandleTypeDef *huart);

+void HAL_UART_TxHalfCpltCallback(UART_HandleTypeDef *huart);

+void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart);

+void HAL_UART_RxHalfCpltCallback(UART_HandleTypeDef *huart);

+void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart);

+void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart);

+

+/**

+  * @}

+  */

+

+/** @addtogroup UART_Exported_Functions_Group3 Peripheral Control functions

+  * @{

+  */

+

+/* Peripheral Control functions  ************************************************/

+HAL_StatusTypeDef HAL_LIN_SendBreak(UART_HandleTypeDef *huart);

+HAL_StatusTypeDef HAL_MultiProcessor_EnableMuteMode(UART_HandleTypeDef *huart);

+HAL_StatusTypeDef HAL_MultiProcessor_DisableMuteMode(UART_HandleTypeDef *huart);

+void HAL_MultiProcessor_EnterMuteMode(UART_HandleTypeDef *huart);

+HAL_StatusTypeDef HAL_HalfDuplex_EnableTransmitter(UART_HandleTypeDef *huart);

+HAL_StatusTypeDef HAL_HalfDuplex_EnableReceiver(UART_HandleTypeDef *huart);

+

+/**

+  * @}

+  */

+

+/** @addtogroup UART_Exported_Functions_Group4 Peripheral State and Error functions

+  * @{

+  */

+

+/* Peripheral State and Errors functions  **************************************************/

+HAL_UART_StateTypeDef HAL_UART_GetState(UART_HandleTypeDef *huart);

+uint32_t HAL_UART_GetError(UART_HandleTypeDef *huart);

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private functions -----------------------------------------------------------*/

+/** @addtogroup UART_Private_Functions UART Private Functions

+  * @{

+  */

+

+HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart);

+HAL_StatusTypeDef UART_CheckIdleState(UART_HandleTypeDef *huart);

+HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status, uint32_t Timeout);

+void UART_AdvFeatureConfig(UART_HandleTypeDef *huart);

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_UART_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_uart_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_uart_ex.h
new file mode 100644
index 0000000..2e41fc8
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_uart_ex.h
@@ -0,0 +1,335 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_uart_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of UART HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************  

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_UART_EX_H

+#define __STM32F7xx_HAL_UART_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup UARTEx

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup UARTEx_Exported_Constants UARTEx Exported Constants

+  * @{

+  */

+  

+/** @defgroup UARTEx_Word_Length UARTEx Word Length

+  * @{

+  */

+#define UART_WORDLENGTH_7B                  ((uint32_t)USART_CR1_M_1)

+#define UART_WORDLENGTH_8B                  ((uint32_t)0x0000)

+#define UART_WORDLENGTH_9B                  ((uint32_t)USART_CR1_M_0)

+#define IS_UART_WORD_LENGTH(__LENGTH__) (((__LENGTH__) == UART_WORDLENGTH_7B) || \

+                                         ((__LENGTH__) == UART_WORDLENGTH_8B) || \

+                                         ((__LENGTH__) == UART_WORDLENGTH_9B))

+#define IS_LIN_WORD_LENGTH(LENGTH) (((LENGTH) == UART_WORDLENGTH_8B))																				 

+/**

+  * @}

+  */

+

+  

+/** @defgroup UARTEx_WakeUp_Address_Length UARTEx WakeUp Address Length

+  * @{

+  */

+#define UART_ADDRESS_DETECT_4B                ((uint32_t)0x00000000)

+#define UART_ADDRESS_DETECT_7B                ((uint32_t)USART_CR2_ADDM7)

+#define IS_UART_ADDRESSLENGTH_DETECT(__ADDRESS__) (((__ADDRESS__) == UART_ADDRESS_DETECT_4B) || \

+                                                   ((__ADDRESS__) == UART_ADDRESS_DETECT_7B))

+/**

+  * @}

+  */  

+

+  

+/**

+  * @}

+  */  

+  

+/* Exported macro ------------------------------------------------------------*/

+

+/** @defgroup UARTEx_Exported_Macros UARTEx Exported Macros

+  * @{

+  */

+           

+/** @brief  Reports the UART clock source.

+  * @param  __HANDLE__: specifies the UART Handle

+  * @param  __CLOCKSOURCE__ : output variable   

+  * @retval UART clocking source, written in __CLOCKSOURCE__.

+  */

+#define UART_GETCLOCKSOURCE(__HANDLE__,__CLOCKSOURCE__) \

+  do {                                                        \

+    if((__HANDLE__)->Instance == USART1)                      \

+    {                                                         \

+       switch(__HAL_RCC_GET_USART1_SOURCE())                  \

+       {                                                      \

+        case RCC_USART1CLKSOURCE_PCLK2:                       \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK2;         \

+          break;                                              \

+        case RCC_USART1CLKSOURCE_HSI:                         \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI;           \

+          break;                                              \

+        case RCC_USART1CLKSOURCE_SYSCLK:                      \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK;        \

+          break;                                              \

+        case RCC_USART1CLKSOURCE_LSE:                         \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE;           \

+          break;                                              \

+        default:                                              \

+          break;                                              \

+       }                                                      \

+    }                                                         \

+    else if((__HANDLE__)->Instance == USART2)                 \

+    {                                                         \

+       switch(__HAL_RCC_GET_USART2_SOURCE())                  \

+       {                                                      \

+        case RCC_USART2CLKSOURCE_PCLK1:                       \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1;         \

+          break;                                              \

+        case RCC_USART2CLKSOURCE_HSI:                         \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI;           \

+          break;                                              \

+        case RCC_USART2CLKSOURCE_SYSCLK:                      \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK;        \

+          break;                                              \

+        case RCC_USART2CLKSOURCE_LSE:                         \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE;           \

+          break;                                              \

+        default:                                              \

+          break;                                              \

+       }                                                      \

+    }                                                         \

+    else if((__HANDLE__)->Instance == USART3)                 \

+    {                                                         \

+       switch(__HAL_RCC_GET_USART3_SOURCE())                  \

+       {                                                      \

+        case RCC_USART3CLKSOURCE_PCLK1:                       \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1;         \

+          break;                                              \

+        case RCC_USART3CLKSOURCE_HSI:                         \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI;           \

+          break;                                              \

+        case RCC_USART3CLKSOURCE_SYSCLK:                      \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK;        \

+          break;                                              \

+        case RCC_USART3CLKSOURCE_LSE:                         \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE;           \

+          break;                                              \

+        default:                                              \

+          break;                                              \

+       }                                                      \

+    }                                                         \

+    else if((__HANDLE__)->Instance == UART4)                  \

+    {                                                         \

+       switch(__HAL_RCC_GET_UART4_SOURCE())                   \

+       {                                                      \

+        case RCC_UART4CLKSOURCE_PCLK1:                        \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1;         \

+          break;                                              \

+        case RCC_UART4CLKSOURCE_HSI:                          \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI;           \

+          break;                                              \

+        case RCC_UART4CLKSOURCE_SYSCLK:                       \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK;        \

+          break;                                              \

+        case RCC_UART4CLKSOURCE_LSE:                          \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE;           \

+          break;                                              \

+        default:                                              \

+          break;                                              \

+       }                                                      \

+    }                                                         \

+    else if ((__HANDLE__)->Instance == UART5)                 \

+    {                                                         \

+       switch(__HAL_RCC_GET_UART5_SOURCE())                   \

+       {                                                      \

+        case RCC_UART5CLKSOURCE_PCLK1:                        \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1;         \

+          break;                                              \

+        case RCC_UART5CLKSOURCE_HSI:                          \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI;           \

+          break;                                              \

+        case RCC_UART5CLKSOURCE_SYSCLK:                       \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK;        \

+          break;                                              \

+        case RCC_UART5CLKSOURCE_LSE:                          \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE;           \

+          break;                                              \

+        default:                                              \

+          break;                                              \

+       }                                                      \

+    }                                                         \

+    else if((__HANDLE__)->Instance == USART6)                 \

+    {                                                         \

+       switch(__HAL_RCC_GET_USART6_SOURCE())                  \

+       {                                                      \

+        case RCC_USART6CLKSOURCE_PCLK2:                       \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK2;         \

+          break;                                              \

+        case RCC_USART6CLKSOURCE_HSI:                         \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI;           \

+          break;                                              \

+        case RCC_USART6CLKSOURCE_SYSCLK:                      \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK;        \

+          break;                                              \

+        case RCC_USART6CLKSOURCE_LSE:                         \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE;           \

+          break;                                              \

+        default:                                              \

+          break;                                              \

+       }                                                      \

+    }                                                         \

+    else if ((__HANDLE__)->Instance == UART7)                 \

+    {                                                         \

+       switch(__HAL_RCC_GET_UART7_SOURCE())                   \

+       {                                                      \

+        case RCC_UART7CLKSOURCE_PCLK1:                        \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1;         \

+          break;                                              \

+        case RCC_UART7CLKSOURCE_HSI:                          \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI;           \

+          break;                                              \

+        case RCC_UART7CLKSOURCE_SYSCLK:                       \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK;        \

+          break;                                              \

+        case RCC_UART7CLKSOURCE_LSE:                          \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE;           \

+          break;                                              \

+        default:                                              \

+          break;                                              \

+       }                                                      \

+    } 																												\

+    else if ((__HANDLE__)->Instance == UART8)                 \

+    {                                                         \

+       switch(__HAL_RCC_GET_UART8_SOURCE())                   \

+       {                                                      \

+        case RCC_UART8CLKSOURCE_PCLK1:                        \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_PCLK1;         \

+          break;                                              \

+        case RCC_UART8CLKSOURCE_HSI:                          \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_HSI;           \

+          break;                                              \

+        case RCC_UART8CLKSOURCE_SYSCLK:                       \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_SYSCLK;        \

+          break;                                              \

+        case RCC_UART8CLKSOURCE_LSE:                          \

+          (__CLOCKSOURCE__) = UART_CLOCKSOURCE_LSE;           \

+          break;                                              \

+        default:                                              \

+          break;                                              \

+       }                                                      \

+    } 																												\

+  } while(0)

+

+/** @brief  Reports the UART mask to apply to retrieve the received data

+  *         according to the word length and to the parity bits activation.

+  *         If PCE = 1, the parity bit is not included in the data extracted

+  *         by the reception API().

+  *         This masking operation is not carried out in the case of

+  *         DMA transfers.        

+  * @param  __HANDLE__: specifies the UART Handle

+  * @retval mask to apply to UART RDR register value.

+  */

+#define UART_MASK_COMPUTATION(__HANDLE__)                       \

+  do {                                                                \

+  if ((__HANDLE__)->Init.WordLength == UART_WORDLENGTH_9B)            \

+  {                                                                   \

+     if ((__HANDLE__)->Init.Parity == UART_PARITY_NONE)               \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x01FF ;                                 \

+     }                                                                \

+     else                                                             \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x00FF ;                                 \

+     }                                                                \

+  }                                                                   \

+  else if ((__HANDLE__)->Init.WordLength == UART_WORDLENGTH_8B)       \

+  {                                                                   \

+     if ((__HANDLE__)->Init.Parity == UART_PARITY_NONE)               \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x00FF ;                                 \

+     }                                                                \

+     else                                                             \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x007F ;                                 \

+     }                                                                \

+  }                                                                   \

+  else if ((__HANDLE__)->Init.WordLength == UART_WORDLENGTH_7B)       \

+  {                                                                   \

+     if ((__HANDLE__)->Init.Parity == UART_PARITY_NONE)               \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x007F ;                                 \

+     }                                                                \

+     else                                                             \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x003F ;                                 \

+     }                                                                \

+  }                                                                   \

+} while(0)

+

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_UART_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_usart.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_usart.h
new file mode 100644
index 0000000..7b80e14
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_usart.h
@@ -0,0 +1,696 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_usart.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of USART HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_USART_H

+#define __STM32F7xx_HAL_USART_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup USART

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup USART_Exported_Types USART Exported Types

+  * @{

+  */

+

+/**

+  * @brief USART Init Structure definition

+  */

+typedef struct

+{

+  uint32_t BaudRate;                  /*!< This member configures the Usart communication baud rate.

+                                           The baud rate is computed using the following formula:

+                                              Baud Rate Register = ((PCLKx) / ((huart->Init.BaudRate))) */

+

+  uint32_t WordLength;                /*!< Specifies the number of data bits transmitted or received in a frame.

+                                           This parameter can be a value of @ref USARTEx_Word_Length */

+

+  uint32_t StopBits;                  /*!< Specifies the number of stop bits transmitted.

+                                           This parameter can be a value of @ref USART_Stop_Bits */

+

+  uint32_t Parity;                   /*!< Specifies the parity mode.

+                                           This parameter can be a value of @ref USART_Parity

+                                           @note When parity is enabled, the computed parity is inserted

+                                                 at the MSB position of the transmitted data (9th bit when

+                                                 the word length is set to 9 data bits; 8th bit when the

+                                                 word length is set to 8 data bits). */

+

+  uint32_t Mode;                      /*!< Specifies whether the Receive or Transmit mode is enabled or disabled.

+                                           This parameter can be a value of @ref USART_Mode */

+

+  uint32_t OverSampling;              /*!< Specifies whether the Over sampling 8 is enabled or disabled, to achieve higher speed (up to fPCLK/8).

+                                           This parameter can be a value of @ref USART_Over_Sampling */                                                                                        

+

+  uint32_t CLKPolarity;               /*!< Specifies the steady state of the serial clock.

+                                           This parameter can be a value of @ref USART_Clock_Polarity */

+

+  uint32_t CLKPhase;                  /*!< Specifies the clock transition on which the bit capture is made.

+                                           This parameter can be a value of @ref USART_Clock_Phase */

+

+  uint32_t CLKLastBit;                /*!< Specifies whether the clock pulse corresponding to the last transmitted

+                                           data bit (MSB) has to be output on the SCLK pin in synchronous mode.

+                                           This parameter can be a value of @ref USART_Last_Bit */

+}USART_InitTypeDef;

+

+/**

+  * @brief HAL USART State structures definition

+  */

+typedef enum

+{

+  HAL_USART_STATE_RESET             = 0x00,    /*!< Peripheral is not initialized   */

+  HAL_USART_STATE_READY             = 0x01,    /*!< Peripheral Initialized and ready for use */

+  HAL_USART_STATE_BUSY              = 0x02,    /*!< an internal process is ongoing */

+  HAL_USART_STATE_BUSY_TX           = 0x12,    /*!< Data Transmission process is ongoing */

+  HAL_USART_STATE_BUSY_RX           = 0x22,    /*!< Data Reception process is ongoing */

+  HAL_USART_STATE_BUSY_TX_RX        = 0x32,    /*!< Data Transmission Reception process is ongoing */

+  HAL_USART_STATE_TIMEOUT           = 0x03,    /*!< Timeout state */

+  HAL_USART_STATE_ERROR             = 0x04     /*!< Error */

+}HAL_USART_StateTypeDef;

+

+

+/**

+  * @brief  USART clock sources definitions

+  */

+typedef enum

+{

+  USART_CLOCKSOURCE_PCLK1      = 0x00,    /*!< PCLK1 clock source  */

+  USART_CLOCKSOURCE_PCLK2      = 0x01,    /*!< PCLK2 clock source  */

+  USART_CLOCKSOURCE_HSI        = 0x02,    /*!< HSI clock source    */

+  USART_CLOCKSOURCE_SYSCLK     = 0x04,    /*!< SYSCLK clock source */

+  USART_CLOCKSOURCE_LSE        = 0x08,    /*!< LSE clock source       */

+  USART_CLOCKSOURCE_UNDEFINED  = 0x10     /*!< Undefined clock source */

+}USART_ClockSourceTypeDef;

+

+

+/**

+  * @brief  USART handle Structure definition

+  */

+typedef struct

+{

+  USART_TypeDef                 *Instance;        /*!<  USART registers base address        */

+

+  USART_InitTypeDef             Init;             /*!< USART communication parameters      */

+

+  uint8_t                       *pTxBuffPtr;      /*!< Pointer to USART Tx transfer Buffer */

+

+  uint16_t                      TxXferSize;       /*!< USART Tx Transfer size              */

+

+  uint16_t                      TxXferCount;      /*!< USART Tx Transfer Counter           */

+

+  uint8_t                       *pRxBuffPtr;      /*!< Pointer to USART Rx transfer Buffer */

+

+  uint16_t                      RxXferSize;       /*!< USART Rx Transfer size              */

+

+  uint16_t                      RxXferCount;      /*!< USART Rx Transfer Counter           */

+

+  uint16_t                      Mask;             /*!< USART Rx RDR register mask          */

+

+  DMA_HandleTypeDef             *hdmatx;          /*!< USART Tx DMA Handle parameters      */

+

+  DMA_HandleTypeDef             *hdmarx;          /*!< USART Rx DMA Handle parameters      */

+

+  HAL_LockTypeDef               Lock;            /*!<  Locking object                      */

+

+  HAL_USART_StateTypeDef        State;           /*!< USART communication state           */

+

+  __IO uint32_t                 ErrorCode;       /*!< USART Error code                    */

+

+}USART_HandleTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup USART_Exported_Constants USART Exported Constants

+  * @{

+  */

+

+/** @defgroup USART_Error_Code USART Error Code

+  * @brief    USART Error Code 

+  * @{

+  */ 

+#define HAL_USART_ERROR_NONE         ((uint32_t)0x00000000)   /*!< No error            */

+#define HAL_USART_ERROR_PE           ((uint32_t)0x00000001)   /*!< Parity error        */

+#define HAL_USART_ERROR_NE           ((uint32_t)0x00000002)   /*!< Noise error         */

+#define HAL_USART_ERROR_FE           ((uint32_t)0x00000004)   /*!< Frame error         */

+#define HAL_USART_ERROR_ORE          ((uint32_t)0x00000008)   /*!< Overrun error       */

+#define HAL_USART_ERROR_DMA          ((uint32_t)0x00000010)   /*!< DMA transfer error  */

+/**

+  * @}

+  */

+

+/** @defgroup USART_Stop_Bits  USART Number of Stop Bits

+  * @{

+  */

+#define USART_STOPBITS_1                     ((uint32_t)0x0000)

+#define USART_STOPBITS_2                     ((uint32_t)USART_CR2_STOP_1)

+#define USART_STOPBITS_1_5                   ((uint32_t)(USART_CR2_STOP_0 | USART_CR2_STOP_1))

+/**

+  * @}

+  */

+

+/** @defgroup USART_Parity    USART Parity

+  * @{

+  */

+#define USART_PARITY_NONE                   ((uint32_t)0x0000)

+#define USART_PARITY_EVEN                   ((uint32_t)USART_CR1_PCE)

+#define USART_PARITY_ODD                    ((uint32_t)(USART_CR1_PCE | USART_CR1_PS))

+/**

+  * @}

+  */

+

+/** @defgroup USART_Mode   USART Mode

+  * @{

+  */

+#define USART_MODE_RX                       ((uint32_t)USART_CR1_RE)

+#define USART_MODE_TX                       ((uint32_t)USART_CR1_TE)

+#define USART_MODE_TX_RX                    ((uint32_t)(USART_CR1_TE |USART_CR1_RE))

+/**

+  * @}

+  */

+

+/** @defgroup USART_Over_Sampling USART Over Sampling

+  * @{

+  */

+#define USART_OVERSAMPLING_16               ((uint32_t)0x0000)

+#define USART_OVERSAMPLING_8                ((uint32_t)USART_CR1_OVER8)

+/**

+  * @}

+  */

+/** @defgroup USART_Clock  USART Clock

+  * @{

+  */

+#define USART_CLOCK_DISABLE                 ((uint32_t)0x0000)

+#define USART_CLOCK_ENABLE                  ((uint32_t)USART_CR2_CLKEN)

+/**

+  * @}

+  */

+

+/** @defgroup USART_Clock_Polarity  USART Clock Polarity

+  * @{

+  */

+#define USART_POLARITY_LOW                  ((uint32_t)0x0000)

+#define USART_POLARITY_HIGH                 ((uint32_t)USART_CR2_CPOL)

+/**

+  * @}

+  */

+

+/** @defgroup USART_Clock_Phase   USART Clock Phase

+  * @{

+  */

+#define USART_PHASE_1EDGE                   ((uint32_t)0x0000)

+#define USART_PHASE_2EDGE                   ((uint32_t)USART_CR2_CPHA)

+/**

+  * @}

+  */

+

+/** @defgroup USART_Last_Bit  USART Last Bit

+  * @{

+  */

+#define USART_LASTBIT_DISABLE               ((uint32_t)0x0000)

+#define USART_LASTBIT_ENABLE                ((uint32_t)USART_CR2_LBCL)

+/**

+  * @}

+  */

+

+/** @defgroup USART_Request_Parameters  USART Request Parameters

+  * @{

+  */

+#define USART_RXDATA_FLUSH_REQUEST        ((uint32_t)USART_RQR_RXFRQ)        /*!< Receive Data flush Request */ 

+#define USART_TXDATA_FLUSH_REQUEST        ((uint32_t)USART_RQR_TXFRQ)        /*!< Transmit data flush Request */

+/**

+  * @}

+  */

+

+/** @defgroup USART_Flags      USART Flags

+  *        Elements values convention: 0xXXXX

+  *           - 0xXXXX  : Flag mask in the ISR register

+  * @{

+  */

+#define USART_FLAG_REACK                     ((uint32_t)0x00400000)

+#define USART_FLAG_TEACK                     ((uint32_t)0x00200000)  

+#define USART_FLAG_BUSY                      ((uint32_t)0x00010000)

+#define USART_FLAG_CTS                       ((uint32_t)0x00000400)

+#define USART_FLAG_CTSIF                     ((uint32_t)0x00000200)

+#define USART_FLAG_LBDF                      ((uint32_t)0x00000100)

+#define USART_FLAG_TXE                       ((uint32_t)0x00000080)

+#define USART_FLAG_TC                        ((uint32_t)0x00000040)

+#define USART_FLAG_RXNE                      ((uint32_t)0x00000020)

+#define USART_FLAG_IDLE                      ((uint32_t)0x00000010)

+#define USART_FLAG_ORE                       ((uint32_t)0x00000008)

+#define USART_FLAG_NE                        ((uint32_t)0x00000004)

+#define USART_FLAG_FE                        ((uint32_t)0x00000002)

+#define USART_FLAG_PE                        ((uint32_t)0x00000001)

+/**

+  * @}

+  */

+

+/** @defgroup USART_Interrupt_definition USART Interrupts Definition

+  *        Elements values convention: 0000ZZZZ0XXYYYYYb

+  *           - YYYYY  : Interrupt source position in the XX register (5bits)

+  *           - XX  : Interrupt source register (2bits)

+  *                 - 01: CR1 register

+  *                 - 10: CR2 register

+  *                 - 11: CR3 register

+  *           - ZZZZ  : Flag position in the ISR register(4bits)

+  * @{

+  */

+

+#define USART_IT_PE                          ((uint16_t)0x0028)

+#define USART_IT_TXE                         ((uint16_t)0x0727)

+#define USART_IT_TC                          ((uint16_t)0x0626)

+#define USART_IT_RXNE                        ((uint16_t)0x0525)

+#define USART_IT_IDLE                        ((uint16_t)0x0424)

+#define USART_IT_ERR                         ((uint16_t)0x0060)

+

+#define USART_IT_ORE                         ((uint16_t)0x0300)

+#define USART_IT_NE                          ((uint16_t)0x0200)

+#define USART_IT_FE                          ((uint16_t)0x0100)

+/**

+  * @}

+  */

+

+/** @defgroup USART_IT_CLEAR_Flags    USART Interruption Clear Flags

+  * @{

+  */

+#define USART_CLEAR_PEF                       USART_ICR_PECF            /*!< Parity Error Clear Flag */

+#define USART_CLEAR_FEF                       USART_ICR_FECF            /*!< Framing Error Clear Flag */

+#define USART_CLEAR_NEF                       USART_ICR_NCF             /*!< Noise detected Clear Flag */

+#define USART_CLEAR_OREF                      USART_ICR_ORECF           /*!< OverRun Error Clear Flag */

+#define USART_CLEAR_IDLEF                     USART_ICR_IDLECF          /*!< IDLE line detected Clear Flag */

+#define USART_CLEAR_TCF                       USART_ICR_TCCF            /*!< Transmission Complete Clear Flag */

+#define USART_CLEAR_CTSF                      USART_ICR_CTSCF           /*!< CTS Interrupt Clear Flag */

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported macros -----------------------------------------------------------*/

+/** @defgroup USART_Exported_Macros USART Exported Macros

+  * @{

+  */

+

+/** @brief Reset USART handle state

+  * @param  __HANDLE__: USART handle.

+  * @retval None

+  */

+#define __HAL_USART_RESET_HANDLE_STATE(__HANDLE__)  ((__HANDLE__)->State = HAL_USART_STATE_RESET)

+

+/** @brief  Checks whether the specified USART flag is set or not.

+  * @param  __HANDLE__: specifies the USART Handle

+  * @param  __FLAG__: specifies the flag to check.

+  *        This parameter can be one of the following values:

+  *            @arg USART_FLAG_REACK: Receive enable acknowledge flag

+  *            @arg USART_FLAG_TEACK: Transmit enable acknowledge flag

+  *            @arg USART_FLAG_BUSY:  Busy flag

+  *            @arg USART_FLAG_CTS:   CTS Change flag

+  *            @arg USART_FLAG_TXE:   Transmit data register empty flag

+  *            @arg USART_FLAG_TC:    Transmission Complete flag

+  *            @arg USART_FLAG_RXNE:  Receive data register not empty flag

+  *            @arg USART_FLAG_IDLE:  Idle Line detection flag

+  *            @arg USART_FLAG_ORE:   OverRun Error flag

+  *            @arg USART_FLAG_NE:    Noise Error flag

+  *            @arg USART_FLAG_FE:    Framing Error flag

+  *            @arg USART_FLAG_PE:    Parity Error flag

+  * @retval The new state of __FLAG__ (TRUE or FALSE).

+  */

+#define __HAL_USART_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))

+

+

+/** @brief  Enables the specified USART interrupt.

+  * @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 USART_IT_TXE:  Transmit Data Register empty interrupt

+  *            @arg USART_IT_TC:   Transmission complete interrupt

+  *            @arg USART_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg USART_IT_IDLE: Idle line detection interrupt

+  *            @arg USART_IT_PE:   Parity Error interrupt

+  *            @arg USART_IT_ERR:  Error interrupt(Frame error, noise error, overrun error)

+  * @retval None

+  */

+#define __HAL_USART_ENABLE_IT(__HANDLE__, __INTERRUPT__)   (((((uint8_t)(__INTERRUPT__)) >> 5U) == 1)? ((__HANDLE__)->Instance->CR1 |= (1U << ((__INTERRUPT__) & USART_IT_MASK))): \

+                                                            ((((uint8_t)(__INTERRUPT__)) >> 5U) == 2)? ((__HANDLE__)->Instance->CR2 |= (1U << ((__INTERRUPT__) & USART_IT_MASK))): \

+                                                            ((__HANDLE__)->Instance->CR3 |= (1U << ((__INTERRUPT__) & USART_IT_MASK))))

+

+/** @brief  Disables the specified USART interrupt.

+  * @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 USART_IT_TXE:  Transmit Data Register empty interrupt

+  *            @arg USART_IT_TC:   Transmission complete interrupt

+  *            @arg USART_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg USART_IT_IDLE: Idle line detection interrupt

+  *            @arg USART_IT_PE:   Parity Error interrupt

+  *            @arg USART_IT_ERR:  Error interrupt(Frame error, noise error, overrun error)

+  * @retval None

+  */

+#define __HAL_USART_DISABLE_IT(__HANDLE__, __INTERRUPT__)  (((((uint8_t)(__INTERRUPT__)) >> 5U) == 1)? ((__HANDLE__)->Instance->CR1 &= ~ (1U << ((__INTERRUPT__) & USART_IT_MASK))): \

+                                                            ((((uint8_t)(__INTERRUPT__)) >> 5U) == 2)? ((__HANDLE__)->Instance->CR2 &= ~ (1U << ((__INTERRUPT__) & USART_IT_MASK))): \

+                                                            ((__HANDLE__)->Instance->CR3 &= ~ (1U << ((__INTERRUPT__) & USART_IT_MASK))))

+

+

+/** @brief  Checks whether the specified USART interrupt has occurred or not.

+  * @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 USART_IT_TXE: Transmit Data Register empty interrupt

+  *            @arg USART_IT_TC:  Transmission complete interrupt

+  *            @arg USART_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg USART_IT_IDLE: Idle line detection interrupt

+  *            @arg USART_IT_ORE: OverRun Error interrupt

+  *            @arg USART_IT_NE: Noise Error interrupt

+  *            @arg USART_IT_FE: Framing Error interrupt

+  *            @arg USART_IT_PE: Parity Error interrupt

+  * @retval The new state of __IT__ (TRUE or FALSE).

+  */

+#define __HAL_USART_GET_IT(__HANDLE__, __IT__) ((__HANDLE__)->Instance->ISR & ((uint32_t)1 << ((__IT__)>> 0x08)))

+

+/** @brief  Checks whether the specified USART interrupt source is enabled.

+  * @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 USART_IT_TXE: Transmit Data Register empty interrupt

+  *            @arg USART_IT_TC:  Transmission complete interrupt

+  *            @arg USART_IT_RXNE: Receive Data register not empty interrupt

+  *            @arg USART_IT_IDLE: Idle line detection interrupt

+  *            @arg USART_IT_ORE: OverRun Error interrupt

+  *            @arg USART_IT_NE: Noise Error interrupt

+  *            @arg USART_IT_FE: Framing Error interrupt

+  *            @arg USART_IT_PE: Parity Error interrupt

+  * @retval The new state of __IT__ (TRUE or FALSE).

+  */

+#define __HAL_USART_GET_IT_SOURCE(__HANDLE__, __IT__) ((((((uint8_t)(__IT__)) >> 5) == 1)? (__HANDLE__)->Instance->CR1:(((((uint8_t)(__IT__)) >> 5) == 2)? \

+                                                   (__HANDLE__)->Instance->CR2 : (__HANDLE__)->Instance->CR3)) & ((uint32_t)1 << \

+                                                   (((uint16_t)(__IT__)) & USART_IT_MASK)))

+

+

+/** @brief  Clears 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

+  *                       to clear the corresponding interrupt

+  *          This parameter can be one of the following values:

+  *            @arg USART_CLEAR_PEF: Parity Error Clear Flag

+  *            @arg USART_CLEAR_FEF: Framing Error Clear Flag

+  *            @arg USART_CLEAR_NEF: Noise detected Clear Flag

+  *            @arg USART_CLEAR_OREF: OverRun Error Clear Flag

+  *            @arg USART_CLEAR_IDLEF: IDLE line detected Clear Flag

+  *            @arg USART_CLEAR_TCF: Transmission Complete Clear Flag

+  *            @arg USART_CLEAR_CTSF: CTS Interrupt Clear Flag

+  * @retval None

+  */

+#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

+  *          This parameter can be one of the following values:

+  *            @arg USART_RXDATA_FLUSH_REQUEST: Receive Data flush Request

+  *            @arg USART_TXDATA_FLUSH_REQUEST: Transmit data flush Request

+  *

+  * @retval None

+  */

+#define __HAL_USART_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (uint16_t)(__REQ__)) 

+

+/** @brief  Enable USART

+  * @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.

+  * @retval None

+  */

+#define __HAL_USART_DISABLE(__HANDLE__)                ((__HANDLE__)->Instance->CR1 &=  ~USART_CR1_UE)

+

+/**

+  * @}

+  */

+/* Include UART HAL Extension module */

+#include "stm32f7xx_hal_usart_ex.h"

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup USART_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup USART_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization/de-initialization functions  **********************************/

+HAL_StatusTypeDef HAL_USART_Init(USART_HandleTypeDef *husart);

+HAL_StatusTypeDef HAL_USART_DeInit(USART_HandleTypeDef *husart);

+void HAL_USART_MspInit(USART_HandleTypeDef *husart);

+void HAL_USART_MspDeInit(USART_HandleTypeDef *husart);

+HAL_StatusTypeDef HAL_USART_CheckIdleState(USART_HandleTypeDef *husart);

+/**

+  * @}

+  */

+

+/** @addtogroup USART_Exported_Functions_Group2

+  * @{

+  */

+/* IO operation functions *******************************************************/

+HAL_StatusTypeDef HAL_USART_Transmit(USART_HandleTypeDef *husart, uint8_t *pTxData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_USART_Receive(USART_HandleTypeDef *husart, uint8_t *pRxData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_USART_TransmitReceive(USART_HandleTypeDef *husart, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size, uint32_t Timeout);

+HAL_StatusTypeDef HAL_USART_Transmit_IT(USART_HandleTypeDef *husart, uint8_t *pTxData, uint16_t Size);

+HAL_StatusTypeDef HAL_USART_Receive_IT(USART_HandleTypeDef *husart, uint8_t *pRxData, uint16_t Size);

+HAL_StatusTypeDef HAL_USART_TransmitReceive_IT(USART_HandleTypeDef *husart, uint8_t *pTxData, uint8_t *pRxData,  uint16_t Size);

+HAL_StatusTypeDef HAL_USART_Transmit_DMA(USART_HandleTypeDef *husart, uint8_t *pTxData, uint16_t Size);

+HAL_StatusTypeDef HAL_USART_Receive_DMA(USART_HandleTypeDef *husart, uint8_t *pRxData, uint16_t Size);

+HAL_StatusTypeDef HAL_USART_TransmitReceive_DMA(USART_HandleTypeDef *husart, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size);

+HAL_StatusTypeDef HAL_USART_DMAPause(USART_HandleTypeDef *husart);

+HAL_StatusTypeDef HAL_USART_DMAResume(USART_HandleTypeDef *husart);

+HAL_StatusTypeDef HAL_USART_DMAStop(USART_HandleTypeDef *husart);

+void HAL_USART_IRQHandler(USART_HandleTypeDef *husart);

+void HAL_USART_TxHalfCpltCallback(USART_HandleTypeDef *husart);

+void HAL_USART_TxCpltCallback(USART_HandleTypeDef *husart);

+void HAL_USART_RxCpltCallback(USART_HandleTypeDef *husart);

+void HAL_USART_RxHalfCpltCallback(USART_HandleTypeDef *husart);

+void HAL_USART_TxRxCpltCallback(USART_HandleTypeDef *husart);

+void HAL_USART_ErrorCallback(USART_HandleTypeDef *husart);

+

+/**

+  * @}

+  */ 

+

+/** @addtogroup USART_Exported_Functions_Group3

+  * @{

+  */

+/* Peripheral State functions  ************************************************/

+HAL_USART_StateTypeDef HAL_USART_GetState(USART_HandleTypeDef *husart);

+uint32_t               HAL_USART_GetError(USART_HandleTypeDef *husart);

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup USART_Private_Constants USART Private Constants

+  * @{

+  */

+/** @brief USART interruptions flag mask

+  * 

+  */ 

+#define USART_IT_MASK                             ((uint16_t)0x001F)

+

+/**

+  * @}

+  */

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup USART_Private_Macros USART Private Macros

+  * @{

+  */

+/** @brief  Reports the USART clock source.

+  * @param  __HANDLE__: specifies the USART Handle

+  * @param  __CLOCKSOURCE__ : output variable

+  * @retval the USART clocking source, written in __CLOCKSOURCE__.

+  */

+#define USART_GETCLOCKSOURCE(__HANDLE__, __CLOCKSOURCE__)\

+  do {                                                         \

+    if((__HANDLE__)->Instance == USART1)                       \

+    {                                                          \

+       switch(__HAL_RCC_GET_USART1_SOURCE())                   \

+       {                                                       \

+        case RCC_USART1CLKSOURCE_PCLK2:                        \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_PCLK2;         \

+          break;                                               \

+        case RCC_USART1CLKSOURCE_HSI:                          \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_HSI;           \

+          break;                                               \

+        case RCC_USART1CLKSOURCE_SYSCLK:                       \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_SYSCLK;        \

+          break;                                               \

+        case RCC_USART1CLKSOURCE_LSE:                          \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_LSE;           \

+          break;                                               \

+        default:                                               \

+          break;                                               \

+       }                                                       \

+    }                                                          \

+    else if((__HANDLE__)->Instance == USART2)                  \

+    {                                                          \

+       switch(__HAL_RCC_GET_USART2_SOURCE())                   \

+       {                                                       \

+        case RCC_USART2CLKSOURCE_PCLK1:                        \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_PCLK1;         \

+          break;                                               \

+        case RCC_USART2CLKSOURCE_HSI:                          \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_HSI;           \

+          break;                                               \

+        case RCC_USART2CLKSOURCE_SYSCLK:                       \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_SYSCLK;        \

+          break;                                               \

+        case RCC_USART2CLKSOURCE_LSE:                          \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_LSE;           \

+          break;                                               \

+        default:                                               \

+          break;                                               \

+       }                                                       \

+    }                                                          \

+    else if((__HANDLE__)->Instance == USART3)                  \

+    {                                                          \

+       switch(__HAL_RCC_GET_USART3_SOURCE())                   \

+       {                                                       \

+        case RCC_USART3CLKSOURCE_PCLK1:                        \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_PCLK1;         \

+          break;                                               \

+        case RCC_USART3CLKSOURCE_HSI:                          \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_HSI;           \

+          break;                                               \

+        case RCC_USART3CLKSOURCE_SYSCLK:                       \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_SYSCLK;        \

+          break;                                               \

+        case RCC_USART3CLKSOURCE_LSE:                          \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_LSE;           \

+          break;                                               \

+        default:                                               \

+          break;                                               \

+       }                                                       \

+    }                                                          \

+    else if((__HANDLE__)->Instance == USART6)                  \

+    {                                                          \

+       switch(__HAL_RCC_GET_USART6_SOURCE())                   \

+       {                                                       \

+        case RCC_USART6CLKSOURCE_PCLK2:                        \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_PCLK2;         \

+          break;                                               \

+        case RCC_USART6CLKSOURCE_HSI:                          \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_HSI;           \

+          break;                                               \

+        case RCC_USART6CLKSOURCE_SYSCLK:                       \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_SYSCLK;        \

+          break;                                               \

+        case RCC_USART6CLKSOURCE_LSE:                          \

+          (__CLOCKSOURCE__) = USART_CLOCKSOURCE_LSE;           \

+          break;                                               \

+        default:                                               \

+          break;                                               \

+       }                                                       \

+    }                                                          \

+ } while(0)

+  

+

+#define IS_USART_STOPBITS(__STOPBITS__) (((__STOPBITS__) == USART_STOPBITS_1) || \

+                                         ((__STOPBITS__) == USART_STOPBITS_1_5) || \

+                                         ((__STOPBITS__) == USART_STOPBITS_2))

+#define IS_USART_PARITY(__PARITY__) (((__PARITY__) == USART_PARITY_NONE) || \

+                                     ((__PARITY__) == USART_PARITY_EVEN) || \

+                                     ((__PARITY__) == USART_PARITY_ODD))

+#define IS_USART_MODE(__MODE__) ((((__MODE__) & (uint32_t)0xFFFFFFF3) == 0x00) && ((__MODE__) != (uint32_t)0x00))

+#define IS_USART_OVERSAMPLING(__SAMPLING__) (((__SAMPLING__) == USART_OVERSAMPLING_16) || \

+                                             ((__SAMPLING__) == USART_OVERSAMPLING_8))

+#define IS_USART_CLOCK(__CLOCK__)     (((__CLOCK__)== USART_CLOCK_DISABLE) || \

+                                       ((__CLOCK__)== USART_CLOCK_ENABLE))

+#define IS_USART_POLARITY(__CPOL__) (((__CPOL__) == USART_POLARITY_LOW) || ((__CPOL__) == USART_POLARITY_HIGH))

+#define IS_USART_PHASE(__CPHA__) (((__CPHA__) == USART_PHASE_1EDGE) || ((__CPHA__) == USART_PHASE_2EDGE))

+#define IS_USART_LASTBIT(__LASTBIT__) (((__LASTBIT__) == USART_LASTBIT_DISABLE) || \

+                                       ((__LASTBIT__) == USART_LASTBIT_ENABLE))

+#define IS_USART_REQUEST_PARAMETER(__PARAM__) (((__PARAM__) == USART_RXDATA_FLUSH_REQUEST) || \

+                                               ((__PARAM__) == USART_TXDATA_FLUSH_REQUEST))   

+#define IS_USART_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) < 9000001)

+

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup USART_Private_Functions USART Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_USART_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_usart_ex.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_usart_ex.h
new file mode 100644
index 0000000..0f4a393
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_usart_ex.h
@@ -0,0 +1,158 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_usart_ex.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of USART HAL Extension module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_USART_EX_H

+#define __STM32F7xx_HAL_USART_EX_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup USARTEx

+  * @{

+  */

+

+/* Exported types ------------------------------------------------------------*/

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup USARTEx_Exported_Constants USARTEx Exported Constants

+  * @{

+  */

+

+/** @defgroup USARTEx_Word_Length USARTEx Word Length

+  * @{

+  */

+#define USART_WORDLENGTH_7B                  ((uint32_t)USART_CR1_M_1)

+#define USART_WORDLENGTH_8B                  ((uint32_t)0x00000000)

+#define USART_WORDLENGTH_9B                  ((uint32_t)USART_CR1_M_0)

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup USARTEx_Private_Macros USARTEx Private Macros

+  * @{

+  */

+

+/** @brief  Computes the USART mask to apply to retrieve the received data

+  *         according to the word length and to the parity bits activation.

+  *         If PCE = 1, the parity bit is not included in the data extracted

+  *         by the reception API().

+  *         This masking operation is not carried out in the case of

+  *         DMA transfers.

+  * @param  __HANDLE__: specifies the USART Handle

+  * @retval none

+  */

+#define __HAL_USART_MASK_COMPUTATION(__HANDLE__)                      \

+  do {                                                                \

+  if ((__HANDLE__)->Init.WordLength == USART_WORDLENGTH_9B)           \

+  {                                                                   \

+     if ((__HANDLE__)->Init.Parity == USART_PARITY_NONE)              \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x01FF ;                                 \

+     }                                                                \

+     else                                                             \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x00FF ;                                 \

+     }                                                                \

+  }                                                                   \

+  else if ((__HANDLE__)->Init.WordLength == USART_WORDLENGTH_8B)      \

+  {                                                                   \

+     if ((__HANDLE__)->Init.Parity == USART_PARITY_NONE)              \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x00FF ;                                 \

+     }                                                                \

+     else                                                             \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x007F ;                                 \

+     }                                                                \

+  }                                                                   \

+  else if ((__HANDLE__)->Init.WordLength == USART_WORDLENGTH_7B)      \

+  {                                                                   \

+     if ((__HANDLE__)->Init.Parity == USART_PARITY_NONE)              \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x007F ;                                 \

+     }                                                                \

+     else                                                             \

+     {                                                                \

+        (__HANDLE__)->Mask = 0x003F ;                                 \

+     }                                                                \

+  }                                                                   \

+} while(0)

+

+#define IS_USART_WORD_LENGTH(__LENGTH__) (((__LENGTH__) == USART_WORDLENGTH_7B) || \

+                                          ((__LENGTH__) == USART_WORDLENGTH_8B) || \

+                                          ((__LENGTH__) == USART_WORDLENGTH_9B))                                 

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/* Initialization/de-initialization methods  **********************************/

+/* IO operation methods *******************************************************/

+/* Peripheral Control methods  ************************************************/

+/* Peripheral State methods  **************************************************/

+

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_USART_EX_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_wwdg.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_wwdg.h
new file mode 100644
index 0000000..ffa999d
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_wwdg.h
@@ -0,0 +1,337 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_hal_wwdg.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of WWDG HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_HAL_WWDG_H

+#define __STM32F7xx_HAL_WWDG_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup WWDG

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/

+/** @defgroup WWDG_Exported_Types WWDG Exported Types

+  * @{

+  */

+   

+/**

+  * @brief  WWDG HAL State Structure definition

+  */

+typedef enum

+{

+  HAL_WWDG_STATE_RESET     = 0x00,  /*!< WWDG not yet initialized or disabled */

+  HAL_WWDG_STATE_READY     = 0x01,  /*!< WWDG initialized and ready for use   */

+  HAL_WWDG_STATE_BUSY      = 0x02,  /*!< WWDG internal process is ongoing     */

+  HAL_WWDG_STATE_TIMEOUT   = 0x03,  /*!< WWDG timeout state                   */

+  HAL_WWDG_STATE_ERROR     = 0x04   /*!< WWDG error state                     */

+}HAL_WWDG_StateTypeDef;

+

+/** 

+  * @brief  WWDG Init structure definition  

+  */ 

+typedef struct

+{

+  uint32_t Prescaler;  /*!< Specifies the prescaler value of the WWDG.

+                            This parameter can be a value of @ref WWDG_Prescaler */

+  

+  uint32_t Window;     /*!< Specifies the WWDG window value to be compared to the downcounter.

+                            This parameter must be a number lower than Max_Data = 0x80 */ 

+  

+  uint32_t Counter;    /*!< Specifies the WWDG free-running downcounter value.

+                            This parameter must be a number between Min_Data = 0x40 and Max_Data = 0x7F */

+

+}WWDG_InitTypeDef;

+

+/** 

+  * @brief  WWDG handle Structure definition  

+  */ 

+typedef struct

+{

+  WWDG_TypeDef                 *Instance;  /*!< Register base address    */

+  

+  WWDG_InitTypeDef             Init;       /*!< WWDG required parameters */

+  

+  HAL_LockTypeDef              Lock;       /*!< WWDG locking object      */

+  

+  __IO HAL_WWDG_StateTypeDef   State;      /*!< WWDG communication state */

+  

+}WWDG_HandleTypeDef;

+/**

+  * @}

+  */ 

+

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup WWDG_Exported_Constants WWDG Exported Constants

+  * @{

+  */

+

+/** @defgroup WWDG_Interrupt_definition WWDG Interrupt definition

+  * @{

+  */ 

+#define WWDG_IT_EWI                       WWDG_CFR_EWI  /*!< Early wakeup interrupt */

+/**

+  * @}

+  */

+

+/** @defgroup WWDG_Flag_definition WWDG Flag definition

+  * @brief WWDG Flag definition

+  * @{

+  */ 

+#define WWDG_FLAG_EWIF                    WWDG_SR_EWIF  /*!< Early wakeup interrupt flag */

+/**

+  * @}

+  */

+

+/** @defgroup WWDG_Prescaler WWDG Prescaler

+  * @{

+  */ 

+#define WWDG_PRESCALER_1                 ((uint32_t)0x00000000)  /*!< WWDG counter clock = (PCLK1/4096)/1 */

+#define WWDG_PRESCALER_2                  WWDG_CFR_WDGTB0  /*!< WWDG counter clock = (PCLK1/4096)/2 */

+#define WWDG_PRESCALER_4                  WWDG_CFR_WDGTB1  /*!< WWDG counter clock = (PCLK1/4096)/4 */

+#define WWDG_PRESCALER_8                  WWDG_CFR_WDGTB  /*!< WWDG counter clock = (PCLK1/4096)/8 */

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */ 

+

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup WWDG_Exported_Macros WWDG Exported Macros

+  * @{

+  */

+

+/** @brief Reset WWDG handle state

+  * @param  __HANDLE__: WWDG handle

+  * @retval None

+  */

+#define __HAL_WWDG_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_WWDG_STATE_RESET)

+

+/**

+  * @brief  Enables the WWDG peripheral.

+  * @param  __HANDLE__: WWDG handle

+  * @retval None

+  */

+#define __HAL_WWDG_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, WWDG_CR_WDGA)

+

+/**

+  * @brief  Disables the WWDG peripheral.

+  * @param  __HANDLE__: WWDG handle

+  * @note   WARNING: This is a dummy macro for HAL code alignment.

+  *         Once enable, WWDG Peripheral cannot be disabled except by a system reset.

+  * @retval None

+  */

+#define __HAL_WWDG_DISABLE(__HANDLE__)                      /* dummy  macro */

+

+/**

+  * @brief  Gets the selected WWDG's it status.

+  * @param  __HANDLE__: WWDG handle

+  * @param  __INTERRUPT__: specifies the it to check.

+  *        This parameter can be one of the following values:

+  *            @arg WWDG_FLAG_EWIF: Early wakeup interrupt IT

+  * @retval The new state of WWDG_FLAG (SET or RESET).

+  */

+#define __HAL_WWDG_GET_IT(__HANDLE__, __INTERRUPT__)       __HAL_WWDG_GET_FLAG((__HANDLE__),(__INTERRUPT__))

+

+/** @brief  Clear the WWDG's interrupt pending bits

+  *         bits to clear the selected interrupt pending bits.

+  * @param  __HANDLE__: WWDG handle

+  * @param  __INTERRUPT__: specifies the interrupt pending bit to clear.

+  *         This parameter can be one of the following values:

+  *            @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag

+  */

+#define __HAL_WWDG_CLEAR_IT(__HANDLE__, __INTERRUPT__)     __HAL_WWDG_CLEAR_FLAG((__HANDLE__), (__INTERRUPT__))

+

+/**

+  * @brief  Enables the WWDG early wakeup interrupt.

+  * @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

+  * @note   Once enabled this interrupt cannot be disabled except by a system reset.

+  * @retval None

+  */

+#define __HAL_WWDG_ENABLE_IT(__HANDLE__, __INTERRUPT__) SET_BIT((__HANDLE__)->Instance->CFR, (__INTERRUPT__))

+    

+/**

+  * @brief  Disables the WWDG early wakeup interrupt.

+  * @param  __HANDLE__: WWDG handle

+  * @param  __INTERRUPT__: specifies the interrupt to disable.

+  *         This parameter can be one of the following values:

+  *            @arg WWDG_IT_EWI: Early wakeup interrupt

+  * @note   WARNING: This is a dummy macro for HAL code alignment. 

+  *         Once enabled this interrupt cannot be disabled except by a system reset.

+  * @retval None

+  */

+#define __HAL_WWDG_DISABLE_IT(__HANDLE__, __INTERRUPT__)                   /* dummy  macro */

+    

+/**

+  * @brief  Gets the selected WWDG's flag status.

+  * @param  __HANDLE__: WWDG handle

+  * @param  __FLAG__: specifies the flag to check.

+  *         This parameter can be one of the following values:

+  *            @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag

+  * @retval The new state of WWDG_FLAG (SET or RESET).

+  */

+#define __HAL_WWDG_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))

+

+/**

+  * @brief  Clears the WWDG's pending flags.

+  * @param  __HANDLE__: WWDG handle

+  * @param  __FLAG__: specifies the flag to clear.

+  *         This parameter can be one of the following values:

+  *            @arg WWDG_FLAG_EWIF: Early wakeup interrupt flag

+  * @retval None

+  */

+#define __HAL_WWDG_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR) = ~(__FLAG__))

+

+/** @brief  Checks if the specified WWDG interrupt source is enabled or disabled.

+  * @param  __HANDLE__: WWDG Handle.

+  * @param  __INTERRUPT__: specifies the WWDG interrupt source to check.

+  *          This parameter can be one of the following values:

+  *            @arg WWDG_IT_EWI: Early Wakeup Interrupt

+  * @retval state of __INTERRUPT__ (TRUE or FALSE).

+  */

+#define __HAL_WWDG_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CFR & (__INTERRUPT__)) == (__INTERRUPT__))

+

+/**

+  * @}

+  */

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup WWDG_Exported_Functions

+  * @{

+  */

+

+/** @addtogroup WWDG_Exported_Functions_Group1

+  * @{

+  */

+/* Initialization/de-initialization functions  **********************************/

+HAL_StatusTypeDef HAL_WWDG_Init(WWDG_HandleTypeDef *hwwdg);

+HAL_StatusTypeDef HAL_WWDG_DeInit(WWDG_HandleTypeDef *hwwdg);

+void HAL_WWDG_MspInit(WWDG_HandleTypeDef *hwwdg);

+void HAL_WWDG_MspDeInit(WWDG_HandleTypeDef *hwwdg);

+void HAL_WWDG_WakeupCallback(WWDG_HandleTypeDef* hwwdg);

+/**

+  * @}

+  */

+

+/** @addtogroup WWDG_Exported_Functions_Group2

+  * @{

+  */

+/* I/O operation functions ******************************************************/

+HAL_StatusTypeDef HAL_WWDG_Start(WWDG_HandleTypeDef *hwwdg);

+HAL_StatusTypeDef HAL_WWDG_Start_IT(WWDG_HandleTypeDef *hwwdg);

+HAL_StatusTypeDef HAL_WWDG_Refresh(WWDG_HandleTypeDef *hwwdg, uint32_t Counter);

+void HAL_WWDG_IRQHandler(WWDG_HandleTypeDef *hwwdg);

+/**

+  * @}

+  */

+

+/** @addtogroup WWDG_Exported_Functions_Group3

+  * @{

+  */

+/* Peripheral State functions  **************************************************/

+HAL_WWDG_StateTypeDef HAL_WWDG_GetState(WWDG_HandleTypeDef *hwwdg);

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+/* Private types -------------------------------------------------------------*/

+/* Private variables ---------------------------------------------------------*/

+/* Private constants ---------------------------------------------------------*/

+/** @defgroup WWDG_Private_Constants WWDG Private Constants

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/* Private macros ------------------------------------------------------------*/

+/** @defgroup WWDG_Private_Macros WWDG Private Macros

+  * @{

+  */

+#define IS_WWDG_PRESCALER(__PRESCALER__) (((__PRESCALER__) == WWDG_PRESCALER_1) || \

+                                          ((__PRESCALER__) == WWDG_PRESCALER_2) || \

+                                          ((__PRESCALER__) == WWDG_PRESCALER_4) || \

+                                          ((__PRESCALER__) == WWDG_PRESCALER_8))

+#define IS_WWDG_WINDOW(__WINDOW__) ((__WINDOW__) <= 0x7F)

+#define IS_WWDG_COUNTER(__COUNTER__) (((__COUNTER__) >= 0x40) && ((__COUNTER__) <= 0x7F))

+/**

+  * @}

+  */

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup WWDG_Private_Functions WWDG Private Functions

+  * @{

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_HAL_WWDG_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_ll_fmc.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_ll_fmc.h
new file mode 100644
index 0000000..071c55e
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_ll_fmc.h
@@ -0,0 +1,1337 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_ll_fmc.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of FMC HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_LL_FMC_H

+#define __STM32F7xx_LL_FMC_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL_Driver

+  * @{

+  */

+

+/** @addtogroup FMC_LL

+  * @{

+  */

+

+/** @addtogroup FMC_LL_Private_Macros

+  * @{

+  */

+#define IS_FMC_NORSRAM_BANK(BANK) (((BANK) == FMC_NORSRAM_BANK1) || \

+                                   ((BANK) == FMC_NORSRAM_BANK2) || \

+                                   ((BANK) == FMC_NORSRAM_BANK3) || \

+                                   ((BANK) == FMC_NORSRAM_BANK4))

+

+#define IS_FMC_MUX(__MUX__) (((__MUX__) == FMC_DATA_ADDRESS_MUX_DISABLE) || \

+                              ((__MUX__) == FMC_DATA_ADDRESS_MUX_ENABLE))

+

+#define IS_FMC_MEMORY(__MEMORY__) (((__MEMORY__) == FMC_MEMORY_TYPE_SRAM) || \

+                                    ((__MEMORY__) == FMC_MEMORY_TYPE_PSRAM)|| \

+                                    ((__MEMORY__) == FMC_MEMORY_TYPE_NOR))

+

+#define IS_FMC_NORSRAM_MEMORY_WIDTH(__WIDTH__) (((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_8)  || \

+                                                 ((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_16) || \

+                                                 ((__WIDTH__) == FMC_NORSRAM_MEM_BUS_WIDTH_32))

+

+#define IS_FMC_ACCESS_MODE(__MODE__) (((__MODE__) == FMC_ACCESS_MODE_A) || \

+                                       ((__MODE__) == FMC_ACCESS_MODE_B) || \

+                                       ((__MODE__) == FMC_ACCESS_MODE_C) || \

+                                       ((__MODE__) == FMC_ACCESS_MODE_D))

+

+#define IS_FMC_NAND_BANK(BANK) ((BANK) == FMC_NAND_BANK3)

+

+#define IS_FMC_WAIT_FEATURE(FEATURE) (((FEATURE) == FMC_NAND_WAIT_FEATURE_DISABLE) || \

+                                      ((FEATURE) == FMC_NAND_WAIT_FEATURE_ENABLE))

+

+#define IS_FMC_NAND_MEMORY_WIDTH(WIDTH) (((WIDTH) == FMC_NAND_MEM_BUS_WIDTH_8) || \

+                                         ((WIDTH) == FMC_NAND_MEM_BUS_WIDTH_16))

+

+#define IS_FMC_ECC_STATE(STATE) (((STATE) == FMC_NAND_ECC_DISABLE) || \

+                                 ((STATE) == FMC_NAND_ECC_ENABLE))

+

+#define IS_FMC_ECCPAGE_SIZE(SIZE) (((SIZE) == FMC_NAND_ECC_PAGE_SIZE_256BYTE)  || \

+                                   ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_512BYTE)  || \

+                                   ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_1024BYTE) || \

+                                   ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_2048BYTE) || \

+                                   ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_4096BYTE) || \

+                                   ((SIZE) == FMC_NAND_ECC_PAGE_SIZE_8192BYTE))

+								   

+#define IS_FMC_SDMEMORY_WIDTH(WIDTH) (((WIDTH) == FMC_SDRAM_MEM_BUS_WIDTH_8)  || \

+                                      ((WIDTH) == FMC_SDRAM_MEM_BUS_WIDTH_16) || \

+                                      ((WIDTH) == FMC_SDRAM_MEM_BUS_WIDTH_32))

+

+#define IS_FMC_WRITE_PROTECTION(__WRITE__) (((__WRITE__) == FMC_SDRAM_WRITE_PROTECTION_DISABLE) || \

+                                            ((__WRITE__) == FMC_SDRAM_WRITE_PROTECTION_ENABLE))									  

+

+#define IS_FMC_SDCLOCK_PERIOD(__PERIOD__) (((__PERIOD__) == FMC_SDRAM_CLOCK_DISABLE)  || \

+                                           ((__PERIOD__) == FMC_SDRAM_CLOCK_PERIOD_2) || \

+                                           ((__PERIOD__) == FMC_SDRAM_CLOCK_PERIOD_3))

+										   

+#define IS_FMC_READ_BURST(__RBURST__) (((__RBURST__) == FMC_SDRAM_RBURST_DISABLE) || \

+                                       ((__RBURST__) == FMC_SDRAM_RBURST_ENABLE))

+									   

+#define IS_FMC_READPIPE_DELAY(__DELAY__) (((__DELAY__) == FMC_SDRAM_RPIPE_DELAY_0) || \

+                                          ((__DELAY__) == FMC_SDRAM_RPIPE_DELAY_1) || \

+                                          ((__DELAY__) == FMC_SDRAM_RPIPE_DELAY_2))

+

+#define IS_FMC_COMMAND_MODE(__COMMAND__) (((__COMMAND__) == FMC_SDRAM_CMD_NORMAL_MODE)      || \

+                                          ((__COMMAND__) == FMC_SDRAM_CMD_CLK_ENABLE)       || \

+                                          ((__COMMAND__) == FMC_SDRAM_CMD_PALL)             || \

+                                          ((__COMMAND__) == FMC_SDRAM_CMD_AUTOREFRESH_MODE) || \

+                                          ((__COMMAND__) == FMC_SDRAM_CMD_LOAD_MODE)        || \

+                                          ((__COMMAND__) == FMC_SDRAM_CMD_SELFREFRESH_MODE) || \

+                                          ((__COMMAND__) == FMC_SDRAM_CMD_POWERDOWN_MODE))

+

+#define IS_FMC_COMMAND_TARGET(__TARGET__) (((__TARGET__) == FMC_SDRAM_CMD_TARGET_BANK1) || \

+                                           ((__TARGET__) == FMC_SDRAM_CMD_TARGET_BANK2) || \

+                                           ((__TARGET__) == FMC_SDRAM_CMD_TARGET_BANK1_2)) 										  

+						   

+/** @defgroup FMC_TCLR_Setup_Time FMC TCLR Setup Time

+  * @{

+  */

+#define IS_FMC_TCLR_TIME(__TIME__) ((__TIME__) <= 255)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_TAR_Setup_Time FMC TAR Setup Time 

+  * @{

+  */

+#define IS_FMC_TAR_TIME(TIME) ((TIME) <= 255)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Setup_Time FMC Setup Time 

+  * @{

+  */

+#define IS_FMC_SETUP_TIME(TIME) ((TIME) <= 255)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Wait_Setup_Time FMC Wait Setup Time 

+  * @{

+  */

+#define IS_FMC_WAIT_TIME(TIME) ((TIME) <= 255)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Hold_Setup_Time FMC Hold Setup Time 

+  * @{

+  */

+#define IS_FMC_HOLD_TIME(TIME) ((TIME) <= 255)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_HiZ_Setup_Time FMC HiZ Setup Time 

+  * @{

+  */

+#define IS_FMC_HIZ_TIME(TIME) ((TIME) <= 255)

+/**

+  * @}

+  */

+

+#define IS_FMC_BURSTMODE(__STATE__) (((__STATE__) == FMC_BURST_ACCESS_MODE_DISABLE) || \

+                                      ((__STATE__) == FMC_BURST_ACCESS_MODE_ENABLE))

+

+#define IS_FMC_WAIT_POLARITY(__POLARITY__) (((__POLARITY__) == FMC_WAIT_SIGNAL_POLARITY_LOW) || \

+                                             ((__POLARITY__) == FMC_WAIT_SIGNAL_POLARITY_HIGH))

+

+#define IS_FMC_WAIT_SIGNAL_ACTIVE(__ACTIVE__) (((__ACTIVE__) == FMC_WAIT_TIMING_BEFORE_WS) || \

+                                                ((__ACTIVE__) == FMC_WAIT_TIMING_DURING_WS)) 

+

+#define IS_FMC_WRITE_OPERATION(__OPERATION__) (((__OPERATION__) == FMC_WRITE_OPERATION_DISABLE) || \

+                                                ((__OPERATION__) == FMC_WRITE_OPERATION_ENABLE))

+

+#define IS_FMC_WAITE_SIGNAL(__SIGNAL__) (((__SIGNAL__) == FMC_WAIT_SIGNAL_DISABLE) || \

+                                          ((__SIGNAL__) == FMC_WAIT_SIGNAL_ENABLE))

+

+#define IS_FMC_EXTENDED_MODE(__MODE__) (((__MODE__) == FMC_EXTENDED_MODE_DISABLE) || \

+                                         ((__MODE__) == FMC_EXTENDED_MODE_ENABLE))

+

+#define IS_FMC_ASYNWAIT(__STATE__) (((__STATE__) == FMC_ASYNCHRONOUS_WAIT_DISABLE) || \

+                                     ((__STATE__) == FMC_ASYNCHRONOUS_WAIT_ENABLE))

+

+/** @defgroup FMC_Data_Latency FMC Data Latency 

+  * @{

+  */

+#define IS_FMC_DATA_LATENCY(__LATENCY__) (((__LATENCY__) > 1) && ((__LATENCY__) <= 17))

+/**

+  * @}

+  */

+

+#define IS_FMC_WRITE_BURST(__BURST__) (((__BURST__) == FMC_WRITE_BURST_DISABLE) || \

+                                        ((__BURST__) == FMC_WRITE_BURST_ENABLE))

+

+#define IS_FMC_CONTINOUS_CLOCK(CCLOCK) (((CCLOCK) == FMC_CONTINUOUS_CLOCK_SYNC_ONLY) || \

+                                        ((CCLOCK) == FMC_CONTINUOUS_CLOCK_SYNC_ASYNC))

+

+

+/** @defgroup FMC_Address_Setup_Time FMC Address Setup Time

+  * @{

+  */

+#define IS_FMC_ADDRESS_SETUP_TIME(__TIME__) ((__TIME__) <= 15)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Address_Hold_Time FMC Address Hold Time

+  * @{

+  */

+#define IS_FMC_ADDRESS_HOLD_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 15))

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Data_Setup_Time FMC Data Setup Time

+  * @{

+  */

+#define IS_FMC_DATASETUP_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 255))

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Bus_Turn_around_Duration FMC Bus Turn around Duration

+  * @{

+  */

+#define IS_FMC_TURNAROUND_TIME(__TIME__) ((__TIME__) <= 15)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_CLK_Division FMC CLK Division 

+  * @{

+  */

+#define IS_FMC_CLK_DIV(DIV) (((DIV) > 1) && ((DIV) <= 16))

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_LoadToActive_Delay FMC SDRAM LoadToActive Delay

+  * @{

+  */

+#define IS_FMC_LOADTOACTIVE_DELAY(__DELAY__) (((__DELAY__) > 0) && ((__DELAY__) <= 16))

+/**

+  * @}

+  */

+  

+/** @defgroup FMC_SDRAM_ExitSelfRefresh_Delay FMC SDRAM ExitSelfRefresh Delay

+  * @{

+  */

+#define IS_FMC_EXITSELFREFRESH_DELAY(__DELAY__) (((__DELAY__) > 0) && ((__DELAY__) <= 16))

+/**

+  * @}

+  */ 

+     

+/** @defgroup FMC_SDRAM_SelfRefresh_Time FMC SDRAM SelfRefresh Time

+  * @{

+  */  

+#define IS_FMC_SELFREFRESH_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 16))

+/**

+  * @}

+  */

+  

+/** @defgroup FMC_SDRAM_RowCycle_Delay FMC SDRAM RowCycle Delay

+  * @{

+  */  

+#define IS_FMC_ROWCYCLE_DELAY(__DELAY__) (((__DELAY__) > 0) && ((__DELAY__) <= 16))

+/**

+  * @}

+  */  

+  

+/** @defgroup FMC_SDRAM_Write_Recovery_Time FMC SDRAM Write Recovery Time

+  * @{

+  */  

+#define IS_FMC_WRITE_RECOVERY_TIME(__TIME__) (((__TIME__) > 0) && ((__TIME__) <= 16))

+/**

+  * @}

+  */         

+  

+/** @defgroup FMC_SDRAM_RP_Delay FMC SDRAM RP Delay

+  * @{

+  */  

+#define IS_FMC_RP_DELAY(__DELAY__) (((__DELAY__) > 0) && ((__DELAY__) <= 16))

+/**

+  * @}

+  */ 

+  

+/** @defgroup FMC_SDRAM_RCD_Delay FMC SDRAM RCD Delay

+  * @{

+  */  

+#define IS_FMC_RCD_DELAY(__DELAY__) (((__DELAY__) > 0) && ((__DELAY__) <= 16))

+/**

+  * @}

+  */

+  

+/** @defgroup FMC_SDRAM_AutoRefresh_Number FMC SDRAM AutoRefresh Number

+  * @{

+  */  

+#define IS_FMC_AUTOREFRESH_NUMBER(__NUMBER__) (((__NUMBER__) > 0) && ((__NUMBER__) <= 16))

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_ModeRegister_Definition FMC SDRAM ModeRegister Definition

+  * @{

+  */

+#define IS_FMC_MODE_REGISTER(__CONTENT__) ((__CONTENT__) <= 8191)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_Refresh_rate FMC SDRAM Refresh rate

+  * @{

+  */

+#define IS_FMC_REFRESH_RATE(__RATE__) ((__RATE__) <= 8191)

+/**

+  * @}

+  */

+  

+/** @defgroup FMC_NORSRAM_Device_Instance FMC NORSRAM Device Instance

+  * @{

+  */

+#define IS_FMC_NORSRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NORSRAM_DEVICE)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_NORSRAM_EXTENDED_Device_Instance FMC NORSRAM EXTENDED Device Instance

+  * @{

+  */

+#define IS_FMC_NORSRAM_EXTENDED_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NORSRAM_EXTENDED_DEVICE)

+/**

+  * @}

+  */

+  

+/** @defgroup FMC_NAND_Device_Instance FMC NAND Device Instance

+  * @{

+  */

+#define IS_FMC_NAND_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_NAND_DEVICE)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_Device_Instance FMC SDRAM Device Instance

+  * @{

+  */

+#define IS_FMC_SDRAM_DEVICE(__INSTANCE__) ((__INSTANCE__) == FMC_SDRAM_DEVICE)

+/**

+  * @}

+  */

+

+#define IS_FMC_SDRAM_BANK(BANK) (((BANK) == FMC_SDRAM_BANK1) || \

+                                 ((BANK) == FMC_SDRAM_BANK2))

+

+#define IS_FMC_COLUMNBITS_NUMBER(COLUMN) (((COLUMN) == FMC_SDRAM_COLUMN_BITS_NUM_8)  || \

+                                          ((COLUMN) == FMC_SDRAM_COLUMN_BITS_NUM_9)  || \

+                                          ((COLUMN) == FMC_SDRAM_COLUMN_BITS_NUM_10) || \

+                                          ((COLUMN) == FMC_SDRAM_COLUMN_BITS_NUM_11))

+

+#define IS_FMC_ROWBITS_NUMBER(ROW) (((ROW) == FMC_SDRAM_ROW_BITS_NUM_11) || \

+                                    ((ROW) == FMC_SDRAM_ROW_BITS_NUM_12) || \

+                                    ((ROW) == FMC_SDRAM_ROW_BITS_NUM_13))

+

+#define IS_FMC_INTERNALBANK_NUMBER(NUMBER) (((NUMBER) == FMC_SDRAM_INTERN_BANKS_NUM_2) || \

+                                            ((NUMBER) == FMC_SDRAM_INTERN_BANKS_NUM_4))

+

+

+#define IS_FMC_CAS_LATENCY(LATENCY) (((LATENCY) == FMC_SDRAM_CAS_LATENCY_1) || \

+                                     ((LATENCY) == FMC_SDRAM_CAS_LATENCY_2) || \

+                                     ((LATENCY) == FMC_SDRAM_CAS_LATENCY_3))

+

+#define IS_FMC_PAGESIZE(__SIZE__) (((__SIZE__) == FMC_PAGE_SIZE_NONE) || \

+                                   ((__SIZE__) == FMC_PAGE_SIZE_128) || \

+                                   ((__SIZE__) == FMC_PAGE_SIZE_256) || \

+                                   ((__SIZE__) == FMC_PAGE_SIZE_1024))

+

+#define IS_FMC_WRITE_FIFO(__FIFO__) (((__FIFO__) == FMC_WRITE_FIFO_DISABLE) || \

+                                     ((__FIFO__) == FMC_WRITE_FIFO_ENABLE))

+/**

+  * @}

+  */

+

+/* Exported typedef ----------------------------------------------------------*/

+/** @defgroup FMC_Exported_typedef FMC Low Layer Exported Types

+  * @{

+  */

+#define FMC_NORSRAM_TypeDef            FMC_Bank1_TypeDef

+#define FMC_NORSRAM_EXTENDED_TypeDef   FMC_Bank1E_TypeDef

+#define FMC_NAND_TypeDef               FMC_Bank3_TypeDef

+#define FMC_SDRAM_TypeDef              FMC_Bank5_6_TypeDef

+

+#define FMC_NORSRAM_DEVICE             FMC_Bank1

+#define FMC_NORSRAM_EXTENDED_DEVICE    FMC_Bank1E

+#define FMC_NAND_DEVICE                FMC_Bank3

+#define FMC_SDRAM_DEVICE               FMC_Bank5_6

+

+/** 

+  * @brief  FMC NORSRAM Configuration Structure definition

+  */ 

+typedef struct

+{

+  uint32_t NSBank;                       /*!< Specifies the NORSRAM memory device that will be used.

+                                              This parameter can be a value of @ref FMC_NORSRAM_Bank                     */

+

+  uint32_t DataAddressMux;               /*!< Specifies whether the address and data values are

+                                              multiplexed on the data bus or not. 

+                                              This parameter can be a value of @ref FMC_Data_Address_Bus_Multiplexing    */

+

+  uint32_t MemoryType;                   /*!< Specifies the type of external memory attached to

+                                              the corresponding memory device.

+                                              This parameter can be a value of @ref FMC_Memory_Type                      */

+

+  uint32_t MemoryDataWidth;              /*!< Specifies the external memory device width.

+                                              This parameter can be a value of @ref FMC_NORSRAM_Data_Width               */

+

+  uint32_t BurstAccessMode;              /*!< Enables or disables the burst access mode for Flash memory,

+                                              valid only with synchronous burst Flash memories.

+                                              This parameter can be a value of @ref FMC_Burst_Access_Mode                */

+

+  uint32_t WaitSignalPolarity;           /*!< Specifies the wait signal polarity, valid only when accessing

+                                              the Flash memory in burst mode.

+                                              This parameter can be a value of @ref FMC_Wait_Signal_Polarity             */

+

+  uint32_t WaitSignalActive;             /*!< Specifies if the wait signal is asserted by the memory one

+                                              clock cycle before the wait state or during the wait state,

+                                              valid only when accessing memories in burst mode. 

+                                              This parameter can be a value of @ref FMC_Wait_Timing                      */

+

+  uint32_t WriteOperation;               /*!< Enables or disables the write operation in the selected device by the FMC. 

+                                              This parameter can be a value of @ref FMC_Write_Operation                  */

+

+  uint32_t WaitSignal;                   /*!< Enables or disables the wait state insertion via wait

+                                              signal, valid for Flash memory access in burst mode. 

+                                              This parameter can be a value of @ref FMC_Wait_Signal                      */

+

+  uint32_t ExtendedMode;                 /*!< Enables or disables the extended mode.

+                                              This parameter can be a value of @ref FMC_Extended_Mode                    */

+

+  uint32_t AsynchronousWait;             /*!< Enables or disables wait signal during asynchronous transfers,

+                                              valid only with asynchronous Flash memories.

+                                              This parameter can be a value of @ref FMC_AsynchronousWait                 */

+

+  uint32_t WriteBurst;                   /*!< Enables or disables the write burst operation.

+                                              This parameter can be a value of @ref FMC_Write_Burst                      */

+

+  uint32_t ContinuousClock;              /*!< Enables or disables the FMC clock output to external memory devices.

+                                              This parameter is only enabled through the FMC_BCR1 register, and don't care 

+                                              through FMC_BCR2..4 registers.

+                                              This parameter can be a value of @ref FMC_Continous_Clock                  */

+

+  uint32_t WriteFifo;                    /*!< Enables or disables the write FIFO used by the FMC controller.

+                                              This parameter is only enabled through the FMC_BCR1 register, and don't care 

+                                              through FMC_BCR2..4 registers.

+                                              This parameter can be a value of @ref FMC_Write_FIFO                      */

+

+  uint32_t PageSize;                     /*!< Specifies the memory page size.

+                                              This parameter can be a value of @ref FMC_Page_Size                        */

+

+}FMC_NORSRAM_InitTypeDef;

+

+/** 

+  * @brief  FMC NORSRAM Timing parameters structure definition  

+  */

+typedef struct

+{

+  uint32_t AddressSetupTime;             /*!< Defines the number of HCLK cycles to configure

+                                              the duration of the address setup time. 

+                                              This parameter can be a value between Min_Data = 0 and Max_Data = 15.

+                                              @note This parameter is not used with synchronous NOR Flash memories.      */

+

+  uint32_t AddressHoldTime;              /*!< Defines the number of HCLK cycles to configure

+                                              the duration of the address hold time.

+                                              This parameter can be a value between Min_Data = 1 and Max_Data = 15. 

+                                              @note This parameter is not used with synchronous NOR Flash memories.      */

+

+  uint32_t DataSetupTime;                /*!< Defines the number of HCLK cycles to configure

+                                              the duration of the data setup time.

+                                              This parameter can be a value between Min_Data = 1 and Max_Data = 255.

+                                              @note This parameter is used for SRAMs, ROMs and asynchronous multiplexed 

+                                              NOR Flash memories.                                                        */

+

+  uint32_t BusTurnAroundDuration;        /*!< Defines the number of HCLK cycles to configure

+                                              the duration of the bus turnaround.

+                                              This parameter can be a value between Min_Data = 0 and Max_Data = 15.

+                                              @note This parameter is only used for multiplexed NOR Flash memories.      */

+

+  uint32_t CLKDivision;                  /*!< Defines the period of CLK clock output signal, expressed in number of 

+                                              HCLK cycles. This parameter can be a value between Min_Data = 2 and Max_Data = 16.

+                                              @note This parameter is not used for asynchronous NOR Flash, SRAM or ROM 

+                                              accesses.                                                                  */

+

+  uint32_t DataLatency;                  /*!< Defines the number of memory clock cycles to issue

+                                              to the memory before getting the first data.

+                                              The parameter value depends on the memory type as shown below:

+                                              - It must be set to 0 in case of a CRAM

+                                              - It is don't care in asynchronous NOR, SRAM or ROM accesses

+                                              - It may assume a value between Min_Data = 2 and Max_Data = 17 in NOR Flash memories

+                                                with synchronous burst mode enable                                       */

+

+  uint32_t AccessMode;                   /*!< Specifies the asynchronous access mode. 

+                                              This parameter can be a value of @ref FMC_Access_Mode                      */

+}FMC_NORSRAM_TimingTypeDef;

+

+/** 

+  * @brief  FMC NAND Configuration Structure definition  

+  */ 

+typedef struct

+{

+  uint32_t NandBank;               /*!< Specifies the NAND memory device that will be used.

+                                        This parameter can be a value of @ref FMC_NAND_Bank                    */

+

+  uint32_t Waitfeature;            /*!< Enables or disables the Wait feature for the NAND Memory device.

+                                        This parameter can be any value of @ref FMC_Wait_feature               */

+

+  uint32_t MemoryDataWidth;        /*!< Specifies the external memory device width.

+                                        This parameter can be any value of @ref FMC_NAND_Data_Width            */

+

+  uint32_t EccComputation;         /*!< Enables or disables the ECC computation.

+                                        This parameter can be any value of @ref FMC_ECC                        */

+

+  uint32_t ECCPageSize;            /*!< Defines the page size for the extended ECC.

+                                        This parameter can be any value of @ref FMC_ECC_Page_Size              */

+

+  uint32_t TCLRSetupTime;          /*!< Defines the number of HCLK cycles to configure the

+                                        delay between CLE low and RE low.

+                                        This parameter can be a value between Min_Data = 0 and Max_Data = 255  */

+

+  uint32_t TARSetupTime;           /*!< Defines the number of HCLK cycles to configure the

+                                        delay between ALE low and RE low.

+                                        This parameter can be a number between Min_Data = 0 and Max_Data = 255 */

+}FMC_NAND_InitTypeDef;

+

+/** 

+  * @brief  FMC NAND Timing parameters structure definition

+  */

+typedef struct

+{

+  uint32_t SetupTime;            /*!< Defines the number of HCLK cycles to setup address before

+                                      the command assertion for NAND-Flash read or write access

+                                      to common/Attribute or I/O memory space (depending on

+                                      the memory space timing to be configured).

+                                      This parameter can be a value between Min_Data = 0 and Max_Data = 255    */

+

+  uint32_t WaitSetupTime;        /*!< Defines the minimum number of HCLK cycles to assert the

+                                      command for NAND-Flash read or write access to

+                                      common/Attribute or I/O memory space (depending on the

+                                      memory space timing to be configured). 

+                                      This parameter can be a number between Min_Data = 0 and Max_Data = 255   */

+

+  uint32_t HoldSetupTime;        /*!< Defines the number of HCLK clock cycles to hold address

+                                      (and data for write access) after the command de-assertion

+                                      for NAND-Flash read or write access to common/Attribute

+                                      or I/O memory space (depending on the memory space timing

+                                      to be configured).

+                                      This parameter can be a number between Min_Data = 0 and Max_Data = 255   */

+

+  uint32_t HiZSetupTime;         /*!< Defines the number of HCLK clock cycles during which the

+                                      data bus is kept in HiZ after the start of a NAND-Flash

+                                      write access to common/Attribute or I/O memory space (depending

+                                      on the memory space timing to be configured).

+                                      This parameter can be a number between Min_Data = 0 and Max_Data = 255   */

+}FMC_NAND_PCC_TimingTypeDef;

+

+/** 

+  * @brief  FMC SDRAM Configuration Structure definition  

+  */  

+typedef struct

+{

+  uint32_t SDBank;                      /*!< Specifies the SDRAM memory device that will be used.

+                                             This parameter can be a value of @ref FMC_SDRAM_Bank                */

+

+  uint32_t ColumnBitsNumber;            /*!< Defines the number of bits of column address.

+                                             This parameter can be a value of @ref FMC_SDRAM_Column_Bits_number. */

+

+  uint32_t RowBitsNumber;               /*!< Defines the number of bits of column address.

+                                             This parameter can be a value of @ref FMC_SDRAM_Row_Bits_number.    */

+

+  uint32_t MemoryDataWidth;             /*!< Defines the memory device width.

+                                             This parameter can be a value of @ref FMC_SDRAM_Memory_Bus_Width.   */

+

+  uint32_t InternalBankNumber;          /*!< Defines the number of the device's internal banks.

+                                             This parameter can be of @ref FMC_SDRAM_Internal_Banks_Number.      */

+

+  uint32_t CASLatency;                  /*!< Defines the SDRAM CAS latency in number of memory clock cycles.

+                                             This parameter can be a value of @ref FMC_SDRAM_CAS_Latency.        */

+

+  uint32_t WriteProtection;             /*!< Enables the SDRAM device to be accessed in write mode.

+                                             This parameter can be a value of @ref FMC_SDRAM_Write_Protection.   */

+

+  uint32_t SDClockPeriod;               /*!< Define the SDRAM Clock Period for both SDRAM devices and they allow 

+                                             to disable the clock before changing frequency.

+                                             This parameter can be a value of @ref FMC_SDRAM_Clock_Period.       */

+

+  uint32_t ReadBurst;                   /*!< This bit enable the SDRAM controller to anticipate the next read 

+                                             commands during the CAS latency and stores data in the Read FIFO.

+                                             This parameter can be a value of @ref FMC_SDRAM_Read_Burst.         */

+

+  uint32_t ReadPipeDelay;               /*!< Define the delay in system clock cycles on read data path.

+                                             This parameter can be a value of @ref FMC_SDRAM_Read_Pipe_Delay.    */

+}FMC_SDRAM_InitTypeDef;

+

+/** 

+  * @brief FMC SDRAM Timing parameters structure definition

+  */

+typedef struct

+{

+  uint32_t LoadToActiveDelay;            /*!< Defines the delay between a Load Mode Register command and 

+                                              an active or Refresh command in number of memory clock cycles.

+                                              This parameter can be a value between Min_Data = 1 and Max_Data = 16  */

+

+  uint32_t ExitSelfRefreshDelay;         /*!< Defines the delay from releasing the self refresh command to 

+                                              issuing the Activate command in number of memory clock cycles.

+                                              This parameter can be a value between Min_Data = 1 and Max_Data = 16  */

+

+  uint32_t SelfRefreshTime;              /*!< Defines the minimum Self Refresh period in number of memory clock 

+                                              cycles.

+                                              This parameter can be a value between Min_Data = 1 and Max_Data = 16  */

+

+  uint32_t RowCycleDelay;                /*!< Defines the delay between the Refresh command and the Activate command

+                                              and the delay between two consecutive Refresh commands in number of 

+                                              memory clock cycles.

+                                              This parameter can be a value between Min_Data = 1 and Max_Data = 16  */

+

+  uint32_t WriteRecoveryTime;            /*!< Defines the Write recovery Time in number of memory clock cycles.

+                                              This parameter can be a value between Min_Data = 1 and Max_Data = 16  */

+

+  uint32_t RPDelay;                      /*!< Defines the delay between a Precharge Command and an other command 

+                                              in number of memory clock cycles.

+                                              This parameter can be a value between Min_Data = 1 and Max_Data = 16  */

+

+  uint32_t RCDDelay;                     /*!< Defines the delay between the Activate Command and a Read/Write 

+                                              command in number of memory clock cycles.

+                                              This parameter can be a value between Min_Data = 1 and Max_Data = 16  */ 

+}FMC_SDRAM_TimingTypeDef;

+

+/** 

+  * @brief SDRAM command parameters structure definition

+  */

+typedef struct

+{

+  uint32_t CommandMode;                  /*!< Defines the command issued to the SDRAM device.

+                                              This parameter can be a value of @ref FMC_SDRAM_Command_Mode.          */

+

+  uint32_t CommandTarget;                /*!< Defines which device (1 or 2) the command will be issued to.

+                                              This parameter can be a value of @ref FMC_SDRAM_Command_Target.        */

+

+  uint32_t AutoRefreshNumber;            /*!< Defines the number of consecutive auto refresh command issued

+                                              in auto refresh mode.

+                                              This parameter can be a value between Min_Data = 1 and Max_Data = 16   */

+  uint32_t ModeRegisterDefinition;       /*!< Defines the SDRAM Mode register content                                */

+}FMC_SDRAM_CommandTypeDef;

+/**

+  * @}

+  */

+

+/* Exported constants --------------------------------------------------------*/

+/** @addtogroup FMC_LL_Exported_Constants FMC Low Layer Exported Constants

+  * @{

+  */

+

+/** @defgroup FMC_LL_NOR_SRAM_Controller FMC NOR/SRAM Controller 

+  * @{

+  */

+

+/** @defgroup FMC_NORSRAM_Bank FMC NOR/SRAM Bank

+  * @{

+  */

+#define FMC_NORSRAM_BANK1                       ((uint32_t)0x00000000)

+#define FMC_NORSRAM_BANK2                       ((uint32_t)0x00000002)

+#define FMC_NORSRAM_BANK3                       ((uint32_t)0x00000004)

+#define FMC_NORSRAM_BANK4                       ((uint32_t)0x00000006)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Data_Address_Bus_Multiplexing FMC Data Address Bus Multiplexing

+  * @{

+  */

+#define FMC_DATA_ADDRESS_MUX_DISABLE            ((uint32_t)0x00000000)

+#define FMC_DATA_ADDRESS_MUX_ENABLE             ((uint32_t)0x00000002)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Memory_Type FMC Memory Type

+  * @{

+  */

+#define FMC_MEMORY_TYPE_SRAM                    ((uint32_t)0x00000000)

+#define FMC_MEMORY_TYPE_PSRAM                   ((uint32_t)0x00000004)

+#define FMC_MEMORY_TYPE_NOR                     ((uint32_t)0x00000008)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_NORSRAM_Data_Width FMC NORSRAM Data Width

+  * @{

+  */

+#define FMC_NORSRAM_MEM_BUS_WIDTH_8             ((uint32_t)0x00000000)

+#define FMC_NORSRAM_MEM_BUS_WIDTH_16            ((uint32_t)0x00000010)

+#define FMC_NORSRAM_MEM_BUS_WIDTH_32            ((uint32_t)0x00000020)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_NORSRAM_Flash_Access FMC NOR/SRAM Flash Access

+  * @{

+  */

+#define FMC_NORSRAM_FLASH_ACCESS_ENABLE         ((uint32_t)0x00000040)

+#define FMC_NORSRAM_FLASH_ACCESS_DISABLE        ((uint32_t)0x00000000)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Burst_Access_Mode FMC Burst Access Mode

+  * @{

+  */

+#define FMC_BURST_ACCESS_MODE_DISABLE           ((uint32_t)0x00000000) 

+#define FMC_BURST_ACCESS_MODE_ENABLE            ((uint32_t)0x00000100)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Wait_Signal_Polarity FMC Wait Signal Polarity

+  * @{

+  */

+#define FMC_WAIT_SIGNAL_POLARITY_LOW            ((uint32_t)0x00000000)

+#define FMC_WAIT_SIGNAL_POLARITY_HIGH           ((uint32_t)0x00000200)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Wait_Timing FMC Wait Timing

+  * @{

+  */

+#define FMC_WAIT_TIMING_BEFORE_WS               ((uint32_t)0x00000000)

+#define FMC_WAIT_TIMING_DURING_WS               ((uint32_t)0x00000800) 

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Write_Operation FMC Write Operation

+  * @{

+  */

+#define FMC_WRITE_OPERATION_DISABLE             ((uint32_t)0x00000000)

+#define FMC_WRITE_OPERATION_ENABLE              ((uint32_t)0x00001000)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Wait_Signal FMC Wait Signal

+  * @{

+  */

+#define FMC_WAIT_SIGNAL_DISABLE                 ((uint32_t)0x00000000)

+#define FMC_WAIT_SIGNAL_ENABLE                  ((uint32_t)0x00002000)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Extended_Mode FMC Extended Mode

+  * @{

+  */

+#define FMC_EXTENDED_MODE_DISABLE               ((uint32_t)0x00000000)

+#define FMC_EXTENDED_MODE_ENABLE                ((uint32_t)0x00004000)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_AsynchronousWait FMC Asynchronous Wait

+  * @{

+  */

+#define FMC_ASYNCHRONOUS_WAIT_DISABLE           ((uint32_t)0x00000000)

+#define FMC_ASYNCHRONOUS_WAIT_ENABLE            ((uint32_t)0x00008000)

+/**

+  * @}

+  */  

+

+/** @defgroup FMC_Page_Size FMC Page Size

+  * @{

+  */

+#define FMC_PAGE_SIZE_NONE           ((uint32_t)0x00000000)

+#define FMC_PAGE_SIZE_128            ((uint32_t)FMC_BCR1_CPSIZE_0)

+#define FMC_PAGE_SIZE_256            ((uint32_t)FMC_BCR1_CPSIZE_1)

+#define FMC_PAGE_SIZE_1024           ((uint32_t)FMC_BCR1_CPSIZE_2)

+/**

+  * @}

+  */  

+

+/** @defgroup FMC_Write_Burst FMC Write Burst

+  * @{

+  */

+#define FMC_WRITE_BURST_DISABLE                 ((uint32_t)0x00000000)

+#define FMC_WRITE_BURST_ENABLE                  ((uint32_t)0x00080000) 

+/**

+  * @}

+  */

+  

+/** @defgroup FMC_Continous_Clock FMC Continuous Clock

+  * @{

+  */

+#define FMC_CONTINUOUS_CLOCK_SYNC_ONLY          ((uint32_t)0x00000000)

+#define FMC_CONTINUOUS_CLOCK_SYNC_ASYNC         ((uint32_t)0x00100000)

+/**

+  * @}

+  */ 

+

+/** @defgroup FMC_Write_FIFO FMC Write FIFO 

+  * @{

+  */

+#define FMC_WRITE_FIFO_DISABLE           ((uint32_t)0x00000000)

+#define FMC_WRITE_FIFO_ENABLE            ((uint32_t)FMC_BCR1_WFDIS)

+/**

+  * @}

+  */

+	

+/** @defgroup FMC_Access_Mode FMC Access Mode 

+  * @{

+  */

+#define FMC_ACCESS_MODE_A                        ((uint32_t)0x00000000)

+#define FMC_ACCESS_MODE_B                        ((uint32_t)0x10000000) 

+#define FMC_ACCESS_MODE_C                        ((uint32_t)0x20000000)

+#define FMC_ACCESS_MODE_D                        ((uint32_t)0x30000000)

+/**

+  * @}

+  */

+    

+/**

+  * @}

+  */ 

+

+/** @defgroup FMC_LL_NAND_Controller FMC NAND Controller 

+  * @{

+  */

+/** @defgroup FMC_NAND_Bank FMC NAND Bank 

+  * @{

+  */

+#define FMC_NAND_BANK3                          ((uint32_t)0x00000100) 

+/**

+  * @}

+  */

+

+/** @defgroup FMC_Wait_feature FMC Wait feature

+  * @{

+  */

+#define FMC_NAND_WAIT_FEATURE_DISABLE           ((uint32_t)0x00000000)

+#define FMC_NAND_WAIT_FEATURE_ENABLE            ((uint32_t)0x00000002)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_PCR_Memory_Type FMC PCR Memory Type 

+  * @{

+  */

+#define FMC_PCR_MEMORY_TYPE_NAND          ((uint32_t)0x00000008)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_NAND_Data_Width FMC NAND Data Width 

+  * @{

+  */

+#define FMC_NAND_MEM_BUS_WIDTH_8                ((uint32_t)0x00000000)

+#define FMC_NAND_MEM_BUS_WIDTH_16               ((uint32_t)0x00000010)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_ECC FMC ECC 

+  * @{

+  */

+#define FMC_NAND_ECC_DISABLE                    ((uint32_t)0x00000000)

+#define FMC_NAND_ECC_ENABLE                     ((uint32_t)0x00000040)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_ECC_Page_Size FMC ECC Page Size 

+  * @{

+  */

+#define FMC_NAND_ECC_PAGE_SIZE_256BYTE          ((uint32_t)0x00000000)

+#define FMC_NAND_ECC_PAGE_SIZE_512BYTE          ((uint32_t)0x00020000)

+#define FMC_NAND_ECC_PAGE_SIZE_1024BYTE         ((uint32_t)0x00040000)

+#define FMC_NAND_ECC_PAGE_SIZE_2048BYTE         ((uint32_t)0x00060000)

+#define FMC_NAND_ECC_PAGE_SIZE_4096BYTE         ((uint32_t)0x00080000)

+#define FMC_NAND_ECC_PAGE_SIZE_8192BYTE         ((uint32_t)0x000A0000)

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */ 

+

+/** @defgroup FMC_LL_SDRAM_Controller FMC SDRAM Controller 

+  * @{

+  */

+/** @defgroup FMC_SDRAM_Bank FMC SDRAM Bank

+  * @{

+  */

+#define FMC_SDRAM_BANK1                       ((uint32_t)0x00000000)

+#define FMC_SDRAM_BANK2                       ((uint32_t)0x00000001)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_Column_Bits_number FMC SDRAM Column Bits number 

+  * @{

+  */

+#define FMC_SDRAM_COLUMN_BITS_NUM_8           ((uint32_t)0x00000000)

+#define FMC_SDRAM_COLUMN_BITS_NUM_9           ((uint32_t)0x00000001)

+#define FMC_SDRAM_COLUMN_BITS_NUM_10          ((uint32_t)0x00000002)

+#define FMC_SDRAM_COLUMN_BITS_NUM_11          ((uint32_t)0x00000003)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_Row_Bits_number FMC SDRAM Row Bits number

+  * @{

+  */

+#define FMC_SDRAM_ROW_BITS_NUM_11             ((uint32_t)0x00000000)

+#define FMC_SDRAM_ROW_BITS_NUM_12             ((uint32_t)0x00000004)

+#define FMC_SDRAM_ROW_BITS_NUM_13             ((uint32_t)0x00000008)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_Memory_Bus_Width FMC SDRAM Memory Bus Width

+  * @{

+  */

+#define FMC_SDRAM_MEM_BUS_WIDTH_8             ((uint32_t)0x00000000)

+#define FMC_SDRAM_MEM_BUS_WIDTH_16            ((uint32_t)0x00000010)

+#define FMC_SDRAM_MEM_BUS_WIDTH_32            ((uint32_t)0x00000020)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_Internal_Banks_Number FMC SDRAM Internal Banks Number

+  * @{

+  */

+#define FMC_SDRAM_INTERN_BANKS_NUM_2          ((uint32_t)0x00000000)

+#define FMC_SDRAM_INTERN_BANKS_NUM_4          ((uint32_t)0x00000040)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_CAS_Latency FMC SDRAM CAS Latency

+  * @{

+  */

+#define FMC_SDRAM_CAS_LATENCY_1               ((uint32_t)0x00000080)

+#define FMC_SDRAM_CAS_LATENCY_2               ((uint32_t)0x00000100)

+#define FMC_SDRAM_CAS_LATENCY_3               ((uint32_t)0x00000180)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_Write_Protection FMC SDRAM Write Protection

+  * @{

+  */

+#define FMC_SDRAM_WRITE_PROTECTION_DISABLE    ((uint32_t)0x00000000)

+#define FMC_SDRAM_WRITE_PROTECTION_ENABLE     ((uint32_t)0x00000200)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_Clock_Period FMC SDRAM Clock Period

+  * @{

+  */

+#define FMC_SDRAM_CLOCK_DISABLE               ((uint32_t)0x00000000)

+#define FMC_SDRAM_CLOCK_PERIOD_2              ((uint32_t)0x00000800)

+#define FMC_SDRAM_CLOCK_PERIOD_3              ((uint32_t)0x00000C00)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_Read_Burst FMC SDRAM Read Burst

+  * @{

+  */

+#define FMC_SDRAM_RBURST_DISABLE              ((uint32_t)0x00000000)

+#define FMC_SDRAM_RBURST_ENABLE               ((uint32_t)0x00001000)

+/**

+  * @}

+  */

+  

+/** @defgroup FMC_SDRAM_Read_Pipe_Delay FMC SDRAM Read Pipe Delay

+  * @{

+  */

+#define FMC_SDRAM_RPIPE_DELAY_0               ((uint32_t)0x00000000)

+#define FMC_SDRAM_RPIPE_DELAY_1               ((uint32_t)0x00002000)

+#define FMC_SDRAM_RPIPE_DELAY_2               ((uint32_t)0x00004000)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_Command_Mode FMC SDRAM Command Mode

+  * @{

+  */

+#define FMC_SDRAM_CMD_NORMAL_MODE             ((uint32_t)0x00000000)

+#define FMC_SDRAM_CMD_CLK_ENABLE              ((uint32_t)0x00000001)

+#define FMC_SDRAM_CMD_PALL                    ((uint32_t)0x00000002)

+#define FMC_SDRAM_CMD_AUTOREFRESH_MODE        ((uint32_t)0x00000003)

+#define FMC_SDRAM_CMD_LOAD_MODE               ((uint32_t)0x00000004)

+#define FMC_SDRAM_CMD_SELFREFRESH_MODE        ((uint32_t)0x00000005)

+#define FMC_SDRAM_CMD_POWERDOWN_MODE          ((uint32_t)0x00000006)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_Command_Target FMC SDRAM Command Target

+  * @{

+  */

+#define FMC_SDRAM_CMD_TARGET_BANK2            FMC_SDCMR_CTB2

+#define FMC_SDRAM_CMD_TARGET_BANK1            FMC_SDCMR_CTB1

+#define FMC_SDRAM_CMD_TARGET_BANK1_2          ((uint32_t)0x00000018)

+/**

+  * @}

+  */

+

+/** @defgroup FMC_SDRAM_Mode_Status FMC SDRAM Mode Status 

+  * @{

+  */

+#define FMC_SDRAM_NORMAL_MODE                     ((uint32_t)0x00000000)

+#define FMC_SDRAM_SELF_REFRESH_MODE               FMC_SDSR_MODES1_0

+#define FMC_SDRAM_POWER_DOWN_MODE                 FMC_SDSR_MODES1_1

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/** @defgroup FMC_LL_Interrupt_definition FMC Low Layer Interrupt definition  

+  * @{

+  */  

+#define FMC_IT_RISING_EDGE                ((uint32_t)0x00000008)

+#define FMC_IT_LEVEL                      ((uint32_t)0x00000010)

+#define FMC_IT_FALLING_EDGE               ((uint32_t)0x00000020)

+#define FMC_IT_REFRESH_ERROR              ((uint32_t)0x00004000)

+/**

+  * @}

+  */

+    

+/** @defgroup FMC_LL_Flag_definition FMC Low Layer Flag definition 

+  * @{

+  */ 

+#define FMC_FLAG_RISING_EDGE                    ((uint32_t)0x00000001)

+#define FMC_FLAG_LEVEL                          ((uint32_t)0x00000002)

+#define FMC_FLAG_FALLING_EDGE                   ((uint32_t)0x00000004)

+#define FMC_FLAG_FEMPT                          ((uint32_t)0x00000040)

+#define FMC_SDRAM_FLAG_REFRESH_IT               FMC_SDSR_RE

+#define FMC_SDRAM_FLAG_BUSY                     FMC_SDSR_BUSY

+#define FMC_SDRAM_FLAG_REFRESH_ERROR            FMC_SDRTR_CRE

+/**

+  * @}

+  */

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/* Private macro -------------------------------------------------------------*/

+/** @defgroup FMC_LL_Private_Macros FMC_LL  Private Macros

+  * @{

+  */

+

+/** @defgroup FMC_LL_NOR_Macros FMC NOR/SRAM Macros

+ *  @brief macros to handle NOR device enable/disable and read/write operations

+ *  @{

+ */

+ 

+/**

+  * @brief  Enable the NORSRAM device access.

+  * @param  __INSTANCE__: FMC_NORSRAM Instance

+  * @param  __BANK__: FMC_NORSRAM Bank     

+  * @retval None

+  */ 

+#define __FMC_NORSRAM_ENABLE(__INSTANCE__, __BANK__)  ((__INSTANCE__)->BTCR[(__BANK__)] |= FMC_BCR1_MBKEN)

+

+/**

+  * @brief  Disable the NORSRAM device access.

+  * @param  __INSTANCE__: FMC_NORSRAM Instance

+  * @param  __BANK__: FMC_NORSRAM Bank   

+  * @retval None

+  */ 

+#define __FMC_NORSRAM_DISABLE(__INSTANCE__, __BANK__) ((__INSTANCE__)->BTCR[(__BANK__)] &= ~FMC_BCR1_MBKEN)  

+

+/**

+  * @}

+  */ 

+

+/** @defgroup FMC_LL_NAND_Macros FMC NAND Macros

+ *  @brief macros to handle NAND device enable/disable

+ *  @{

+ */

+ 

+/**

+  * @brief  Enable the NAND device access.

+  * @param  __INSTANCE__: FMC_NAND Instance    

+  * @retval None

+  */  

+#define __FMC_NAND_ENABLE(__INSTANCE__)  ((__INSTANCE__)->PCR |= FMC_PCR_PBKEN)

+

+/**

+  * @brief  Disable the NAND device access.

+  * @param  __INSTANCE__: FMC_NAND Instance  

+  * @retval None

+  */

+#define __FMC_NAND_DISABLE(__INSTANCE__) ((__INSTANCE__)->PCR &= ~FMC_PCR_PBKEN)

+

+/**

+  * @}

+  */ 

+    

+/** @defgroup FMC_Interrupt FMC Interrupt

+ *  @brief macros to handle FMC interrupts

+ * @{

+ */ 

+

+/**

+  * @brief  Enable the NAND device interrupt.

+  * @param  __INSTANCE__:  FMC_NAND instance     

+  * @param  __INTERRUPT__: FMC_NAND interrupt 

+  *         This parameter can be any combination of the following values:

+  *            @arg FMC_IT_RISING_EDGE: Interrupt rising edge.

+  *            @arg FMC_IT_LEVEL: Interrupt level.

+  *            @arg FMC_IT_FALLING_EDGE: Interrupt falling edge.       

+  * @retval None

+  */  

+#define __FMC_NAND_ENABLE_IT(__INSTANCE__, __INTERRUPT__)  ((__INSTANCE__)->SR |= (__INTERRUPT__))

+

+/**

+  * @brief  Disable the NAND device interrupt.

+  * @param  __INSTANCE__:  FMC_NAND Instance

+  * @param  __INTERRUPT__: FMC_NAND interrupt

+  *         This parameter can be any combination of the following values:

+  *            @arg FMC_IT_RISING_EDGE: Interrupt rising edge.

+  *            @arg FMC_IT_LEVEL: Interrupt level.

+  *            @arg FMC_IT_FALLING_EDGE: Interrupt falling edge.   

+  * @retval None

+  */

+#define __FMC_NAND_DISABLE_IT(__INSTANCE__, __INTERRUPT__)  ((__INSTANCE__)->SR &= ~(__INTERRUPT__))

+                                                                                                                           

+/**

+  * @brief  Get flag status of the NAND device.

+  * @param  __INSTANCE__: FMC_NAND Instance

+  * @param  __BANK__:     FMC_NAND Bank     

+  * @param  __FLAG__: FMC_NAND flag

+  *         This parameter can be any combination of the following values:

+  *            @arg FMC_FLAG_RISING_EDGE: Interrupt rising edge flag.

+  *            @arg FMC_FLAG_LEVEL: Interrupt level edge flag.

+  *            @arg FMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.

+  *            @arg FMC_FLAG_FEMPT: FIFO empty flag.   

+  * @retval The state of FLAG (SET or RESET).

+  */

+#define __FMC_NAND_GET_FLAG(__INSTANCE__, __BANK__, __FLAG__)  (((__INSTANCE__)->SR &(__FLAG__)) == (__FLAG__))

+

+/**

+  * @brief  Clear flag status of the NAND device.

+  * @param  __INSTANCE__: FMC_NAND Instance   

+  * @param  __FLAG__: FMC_NAND flag

+  *         This parameter can be any combination of the following values:

+  *            @arg FMC_FLAG_RISING_EDGE: Interrupt rising edge flag.

+  *            @arg FMC_FLAG_LEVEL: Interrupt level edge flag.

+  *            @arg FMC_FLAG_FALLING_EDGE: Interrupt falling edge flag.

+  *            @arg FMC_FLAG_FEMPT: FIFO empty flag.   

+  * @retval None

+  */

+#define __FMC_NAND_CLEAR_FLAG(__INSTANCE__, __FLAG__)  ((__INSTANCE__)->SR &= ~(__FLAG__))  

+

+/**

+  * @brief  Enable the SDRAM device interrupt.

+  * @param  __INSTANCE__: FMC_SDRAM instance  

+  * @param  __INTERRUPT__: FMC_SDRAM interrupt 

+  *         This parameter can be any combination of the following values:

+  *            @arg FMC_IT_REFRESH_ERROR: Interrupt refresh error      

+  * @retval None

+  */

+#define __FMC_SDRAM_ENABLE_IT(__INSTANCE__, __INTERRUPT__)  ((__INSTANCE__)->SDRTR |= (__INTERRUPT__))

+

+/**

+  * @brief  Disable the SDRAM device interrupt.

+  * @param  __INSTANCE__: FMC_SDRAM instance  

+  * @param  __INTERRUPT__: FMC_SDRAM interrupt 

+  *         This parameter can be any combination of the following values:

+  *            @arg FMC_IT_REFRESH_ERROR: Interrupt refresh error      

+  * @retval None

+  */

+#define __FMC_SDRAM_DISABLE_IT(__INSTANCE__, __INTERRUPT__)  ((__INSTANCE__)->SDRTR &= ~(__INTERRUPT__))

+

+/**

+  * @brief  Get flag status of the SDRAM device.

+  * @param  __INSTANCE__: FMC_SDRAM instance  

+  * @param  __FLAG__: FMC_SDRAM flag

+  *         This parameter can be any combination of the following values:

+  *            @arg FMC_SDRAM_FLAG_REFRESH_IT: Interrupt refresh error.

+  *            @arg FMC_SDRAM_FLAG_BUSY: SDRAM busy flag.

+  *            @arg FMC_SDRAM_FLAG_REFRESH_ERROR: Refresh error flag.

+  * @retval The state of FLAG (SET or RESET).

+  */

+#define __FMC_SDRAM_GET_FLAG(__INSTANCE__, __FLAG__)  (((__INSTANCE__)->SDSR &(__FLAG__)) == (__FLAG__))

+

+/**

+  * @brief  Clear flag status of the SDRAM device.

+  * @param  __INSTANCE__: FMC_SDRAM instance  

+  * @param  __FLAG__: FMC_SDRAM flag

+  *         This parameter can be any combination of the following values:

+  *           @arg FMC_SDRAM_FLAG_REFRESH_ERROR

+  * @retval None

+  */

+#define __FMC_SDRAM_CLEAR_FLAG(__INSTANCE__, __FLAG__)  ((__INSTANCE__)->SDRTR |= (__FLAG__))

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */ 

+

+/* Private functions ---------------------------------------------------------*/

+/** @defgroup FMC_LL_Private_Functions FMC LL Private Functions

+  *  @{

+  */

+

+/** @defgroup FMC_LL_NORSRAM  NOR SRAM

+  *  @{

+  */

+/** @defgroup FMC_LL_NORSRAM_Private_Functions_Group1 NOR SRAM Initialization/de-initialization functions 

+  *  @{

+  */

+HAL_StatusTypeDef  FMC_NORSRAM_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_InitTypeDef *Init);

+HAL_StatusTypeDef  FMC_NORSRAM_Timing_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank);

+HAL_StatusTypeDef  FMC_NORSRAM_Extended_Timing_Init(FMC_NORSRAM_EXTENDED_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode);

+HAL_StatusTypeDef  FMC_NORSRAM_DeInit(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank);

+/**

+  * @}

+  */ 

+

+/** @defgroup FMC_LL_NORSRAM_Private_Functions_Group2 NOR SRAM Control functions 

+  *  @{

+  */

+HAL_StatusTypeDef  FMC_NORSRAM_WriteOperation_Enable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank);

+HAL_StatusTypeDef  FMC_NORSRAM_WriteOperation_Disable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank);

+/**

+  * @}

+  */

+/**

+  * @}

+  */

+

+/** @defgroup FMC_LL_NAND NAND

+  *  @{

+  */

+/** @defgroup FMC_LL_NAND_Private_Functions_Group1 NAND Initialization/de-initialization functions 

+  *  @{

+  */

+HAL_StatusTypeDef  FMC_NAND_Init(FMC_NAND_TypeDef *Device, FMC_NAND_InitTypeDef *Init);

+HAL_StatusTypeDef  FMC_NAND_CommonSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);

+HAL_StatusTypeDef  FMC_NAND_AttributeSpace_Timing_Init(FMC_NAND_TypeDef *Device, FMC_NAND_PCC_TimingTypeDef *Timing, uint32_t Bank);

+HAL_StatusTypeDef  FMC_NAND_DeInit(FMC_NAND_TypeDef *Device, uint32_t Bank);

+/**

+  * @}

+  */

+

+/** @defgroup FMC_LL_NAND_Private_Functions_Group2 NAND Control functions 

+  *  @{

+  */

+HAL_StatusTypeDef  FMC_NAND_ECC_Enable(FMC_NAND_TypeDef *Device, uint32_t Bank);

+HAL_StatusTypeDef  FMC_NAND_ECC_Disable(FMC_NAND_TypeDef *Device, uint32_t Bank);

+HAL_StatusTypeDef  FMC_NAND_GetECC(FMC_NAND_TypeDef *Device, uint32_t *ECCval, uint32_t Bank, uint32_t Timeout);

+/**

+  * @}

+  */

+

+/** @defgroup FMC_LL_SDRAM SDRAM

+  *  @{

+  */

+/** @defgroup FMC_LL_SDRAM_Private_Functions_Group1 SDRAM Initialization/de-initialization functions 

+  *  @{

+  */

+HAL_StatusTypeDef  FMC_SDRAM_Init(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_InitTypeDef *Init);

+HAL_StatusTypeDef  FMC_SDRAM_Timing_Init(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_TimingTypeDef *Timing, uint32_t Bank);

+HAL_StatusTypeDef  FMC_SDRAM_DeInit(FMC_SDRAM_TypeDef *Device, uint32_t Bank);

+

+/**

+  * @}

+  */

+

+/** @defgroup FMC_LL_SDRAM_Private_Functions_Group2 SDRAM Control functions 

+  *  @{

+  */

+HAL_StatusTypeDef  FMC_SDRAM_WriteProtection_Enable(FMC_SDRAM_TypeDef *Device, uint32_t Bank);

+HAL_StatusTypeDef  FMC_SDRAM_WriteProtection_Disable(FMC_SDRAM_TypeDef *Device, uint32_t Bank);

+HAL_StatusTypeDef  FMC_SDRAM_SendCommand(FMC_SDRAM_TypeDef *Device, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout);

+HAL_StatusTypeDef  FMC_SDRAM_ProgramRefreshRate(FMC_SDRAM_TypeDef *Device, uint32_t RefreshRate);

+HAL_StatusTypeDef  FMC_SDRAM_SetAutoRefreshNumber(FMC_SDRAM_TypeDef *Device, uint32_t AutoRefreshNumber);

+uint32_t           FMC_SDRAM_GetModeStatus(FMC_SDRAM_TypeDef *Device, uint32_t Bank);

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_LL_FMC_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_ll_sdmmc.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_ll_sdmmc.h
new file mode 100644
index 0000000..c851729
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_ll_sdmmc.h
@@ -0,0 +1,804 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_ll_sdmmc.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of SDMMC HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_LL_SDMMC_H

+#define __STM32F7xx_LL_SDMMC_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_Driver

+  * @{

+  */

+

+/** @addtogroup SDMMC_LL

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+/** @defgroup SDMMC_LL_Exported_Types SDMMC_LL Exported Types

+  * @{

+  */

+  

+/** 

+  * @brief  SDMMC Configuration Structure definition  

+  */

+typedef struct

+{

+  uint32_t ClockEdge;            /*!< Specifies the clock transition on which the bit capture is made.

+                                      This parameter can be a value of @ref SDMMC_LL_Clock_Edge                 */

+

+  uint32_t ClockBypass;          /*!< Specifies whether the SDMMC Clock divider bypass is

+                                      enabled or disabled.

+                                      This parameter can be a value of @ref SDMMC_LL_Clock_Bypass               */

+

+  uint32_t ClockPowerSave;       /*!< Specifies whether SDMMC Clock output is enabled or

+                                      disabled when the bus is idle.

+                                      This parameter can be a value of @ref SDMMC_LL_Clock_Power_Save           */

+

+  uint32_t BusWide;              /*!< Specifies the SDMMC bus width.

+                                      This parameter can be a value of @ref SDMMC_LL_Bus_Wide                   */

+

+  uint32_t HardwareFlowControl;  /*!< Specifies whether the SDMMC hardware flow control is enabled or disabled.

+                                      This parameter can be a value of @ref SDMMC_LL_Hardware_Flow_Control      */

+

+  uint32_t ClockDiv;             /*!< Specifies the clock frequency of the SDMMC controller.

+                                      This parameter can be a value between Min_Data = 0 and Max_Data = 255 */  

+  

+}SDMMC_InitTypeDef;

+  

+

+/** 

+  * @brief  SDMMC Command Control structure 

+  */

+typedef struct                                                                                            

+{

+  uint32_t Argument;            /*!< Specifies the SDMMC command argument which is sent

+                                     to a card as part of a command message. If a command

+                                     contains an argument, it must be loaded into this register

+                                     before writing the command to the command register.              */

+

+  uint32_t CmdIndex;            /*!< Specifies the SDMMC command index. It must be Min_Data = 0 and 

+                                     Max_Data = 64                                                    */

+

+  uint32_t Response;            /*!< Specifies the SDMMC response type.

+                                     This parameter can be a value of @ref SDMMC_LL_Response_Type         */

+

+  uint32_t WaitForInterrupt;    /*!< Specifies whether SDMMC wait for interrupt request is 

+                                     enabled or disabled.

+                                     This parameter can be a value of @ref SDMMC_LL_Wait_Interrupt_State  */

+

+  uint32_t CPSM;                /*!< Specifies whether SDMMC Command path state machine (CPSM)

+                                     is enabled or disabled.

+                                     This parameter can be a value of @ref SDMMC_LL_CPSM_State            */

+}SDMMC_CmdInitTypeDef;

+

+

+/** 

+  * @brief  SDMMC Data Control structure 

+  */

+typedef struct

+{

+  uint32_t DataTimeOut;         /*!< Specifies the data timeout period in card bus clock periods.  */

+

+  uint32_t DataLength;          /*!< Specifies the number of data bytes to be transferred.         */

+ 

+  uint32_t DataBlockSize;       /*!< Specifies the data block size for block transfer.

+                                     This parameter can be a value of @ref SDMMC_LL_Data_Block_Size    */

+ 

+  uint32_t TransferDir;         /*!< Specifies the data transfer direction, whether the transfer

+                                     is a read or write.

+                                     This parameter can be a value of @ref SDMMC_LL_Transfer_Direction */

+ 

+  uint32_t TransferMode;        /*!< Specifies whether data transfer is in stream or block mode.

+                                     This parameter can be a value of @ref SDMMC_LL_Transfer_Type      */

+ 

+  uint32_t DPSM;                /*!< Specifies whether SDMMC Data path state machine (DPSM)

+                                     is enabled or disabled.

+                                     This parameter can be a value of @ref SDMMC_LL_DPSM_State         */

+}SDMMC_DataInitTypeDef;

+

+/**

+  * @}

+  */

+  

+/* Exported constants --------------------------------------------------------*/

+/** @defgroup SDMMC_LL_Exported_Constants SDMMC_LL Exported Constants

+  * @{

+  */

+

+/** @defgroup SDMMC_LL_Clock_Edge Clock Edge

+  * @{

+  */

+#define SDMMC_CLOCK_EDGE_RISING               ((uint32_t)0x00000000)

+#define SDMMC_CLOCK_EDGE_FALLING              SDMMC_CLKCR_NEGEDGE

+

+#define IS_SDMMC_CLOCK_EDGE(EDGE) (((EDGE) == SDMMC_CLOCK_EDGE_RISING) || \

+                                  ((EDGE) == SDMMC_CLOCK_EDGE_FALLING))

+/**

+  * @}

+  */

+

+/** @defgroup SDMMC_LL_Clock_Bypass Clock Bypass

+  * @{

+  */

+#define SDMMC_CLOCK_BYPASS_DISABLE             ((uint32_t)0x00000000)

+#define SDMMC_CLOCK_BYPASS_ENABLE              SDMMC_CLKCR_BYPASS   

+

+#define IS_SDMMC_CLOCK_BYPASS(BYPASS) (((BYPASS) == SDMMC_CLOCK_BYPASS_DISABLE) || \

+                                      ((BYPASS) == SDMMC_CLOCK_BYPASS_ENABLE))

+/**

+  * @}

+  */ 

+

+/** @defgroup SDMMC_LL_Clock_Power_Save Clock Power Saving

+  * @{

+  */

+#define SDMMC_CLOCK_POWER_SAVE_DISABLE         ((uint32_t)0x00000000)

+#define SDMMC_CLOCK_POWER_SAVE_ENABLE          SDMMC_CLKCR_PWRSAV

+

+#define IS_SDMMC_CLOCK_POWER_SAVE(SAVE) (((SAVE) == SDMMC_CLOCK_POWER_SAVE_DISABLE) || \

+                                        ((SAVE) == SDMMC_CLOCK_POWER_SAVE_ENABLE))

+/**

+  * @}

+  */

+

+/** @defgroup SDMMC_LL_Bus_Wide Bus Width

+  * @{

+  */

+#define SDMMC_BUS_WIDE_1B                      ((uint32_t)0x00000000)

+#define SDMMC_BUS_WIDE_4B                      SDMMC_CLKCR_WIDBUS_0

+#define SDMMC_BUS_WIDE_8B                      SDMMC_CLKCR_WIDBUS_1

+

+#define IS_SDMMC_BUS_WIDE(WIDE) (((WIDE) == SDMMC_BUS_WIDE_1B) || \

+                                ((WIDE) == SDMMC_BUS_WIDE_4B) || \

+                                ((WIDE) == SDMMC_BUS_WIDE_8B))

+/**

+  * @}

+  */

+

+/** @defgroup SDMMC_LL_Hardware_Flow_Control Hardware Flow Control

+  * @{

+  */

+#define SDMMC_HARDWARE_FLOW_CONTROL_DISABLE    ((uint32_t)0x00000000)

+#define SDMMC_HARDWARE_FLOW_CONTROL_ENABLE     SDMMC_CLKCR_HWFC_EN

+

+#define IS_SDMMC_HARDWARE_FLOW_CONTROL(CONTROL) (((CONTROL) == SDMMC_HARDWARE_FLOW_CONTROL_DISABLE) || \

+                                                ((CONTROL) == SDMMC_HARDWARE_FLOW_CONTROL_ENABLE))

+/**

+  * @}

+  */

+  

+/** @defgroup SDMMC_LL_Clock_Division Clock Division

+  * @{

+  */

+#define IS_SDMMC_CLKDIV(DIV)   ((DIV) <= 0xFF)

+/**

+  * @}

+  */  

+    

+/** @defgroup SDMMC_LL_Command_Index Command Index

+  * @{

+  */

+#define IS_SDMMC_CMD_INDEX(INDEX)            ((INDEX) < 0x40)

+/**

+  * @}

+  */

+

+/** @defgroup SDMMC_LL_Response_Type Response Type

+  * @{

+  */

+#define SDMMC_RESPONSE_NO                    ((uint32_t)0x00000000)

+#define SDMMC_RESPONSE_SHORT                 SDMMC_CMD_WAITRESP_0

+#define SDMMC_RESPONSE_LONG                  SDMMC_CMD_WAITRESP

+

+#define IS_SDMMC_RESPONSE(RESPONSE) (((RESPONSE) == SDMMC_RESPONSE_NO)    || \

+                                    ((RESPONSE) == SDMMC_RESPONSE_SHORT) || \

+                                    ((RESPONSE) == SDMMC_RESPONSE_LONG))

+/**

+  * @}

+  */

+

+/** @defgroup SDMMC_LL_Wait_Interrupt_State Wait Interrupt

+  * @{

+  */

+#define SDMMC_WAIT_NO                        ((uint32_t)0x00000000)

+#define SDMMC_WAIT_IT                        SDMMC_CMD_WAITINT 

+#define SDMMC_WAIT_PEND                      SDMMC_CMD_WAITPEND

+

+#define IS_SDMMC_WAIT(WAIT) (((WAIT) == SDMMC_WAIT_NO) || \

+                            ((WAIT) == SDMMC_WAIT_IT) || \

+                            ((WAIT) == SDMMC_WAIT_PEND))

+/**

+  * @}

+  */

+

+/** @defgroup SDMMC_LL_CPSM_State CPSM State

+  * @{

+  */

+#define SDMMC_CPSM_DISABLE                   ((uint32_t)0x00000000)

+#define SDMMC_CPSM_ENABLE                    SDMMC_CMD_CPSMEN

+

+#define IS_SDMMC_CPSM(CPSM) (((CPSM) == SDMMC_CPSM_DISABLE) || \

+                            ((CPSM) == SDMMC_CPSM_ENABLE))

+/**

+  * @}

+  */  

+

+/** @defgroup SDMMC_LL_Response_Registers Response Register

+  * @{

+  */

+#define SDMMC_RESP1                          ((uint32_t)0x00000000)

+#define SDMMC_RESP2                          ((uint32_t)0x00000004)

+#define SDMMC_RESP3                          ((uint32_t)0x00000008)

+#define SDMMC_RESP4                          ((uint32_t)0x0000000C)

+

+#define IS_SDMMC_RESP(RESP) (((RESP) == SDMMC_RESP1) || \

+                            ((RESP) == SDMMC_RESP2) || \

+                            ((RESP) == SDMMC_RESP3) || \

+                            ((RESP) == SDMMC_RESP4))

+/**

+  * @}

+  */

+

+/** @defgroup SDMMC_LL_Data_Length Data Lenght

+  * @{

+  */

+#define IS_SDMMC_DATA_LENGTH(LENGTH) ((LENGTH) <= 0x01FFFFFF)

+/**

+  * @}

+  */

+

+/** @defgroup SDMMC_LL_Data_Block_Size  Data Block Size

+  * @{

+  */

+#define SDMMC_DATABLOCK_SIZE_1B               ((uint32_t)0x00000000)

+#define SDMMC_DATABLOCK_SIZE_2B               SDMMC_DCTRL_DBLOCKSIZE_0

+#define SDMMC_DATABLOCK_SIZE_4B               SDMMC_DCTRL_DBLOCKSIZE_1

+#define SDMMC_DATABLOCK_SIZE_8B               (SDMMC_DCTRL_DBLOCKSIZE_0|SDMMC_DCTRL_DBLOCKSIZE_1)

+#define SDMMC_DATABLOCK_SIZE_16B              SDMMC_DCTRL_DBLOCKSIZE_2

+#define SDMMC_DATABLOCK_SIZE_32B              (SDMMC_DCTRL_DBLOCKSIZE_0|SDMMC_DCTRL_DBLOCKSIZE_2)

+#define SDMMC_DATABLOCK_SIZE_64B              (SDMMC_DCTRL_DBLOCKSIZE_1|SDMMC_DCTRL_DBLOCKSIZE_2)

+#define SDMMC_DATABLOCK_SIZE_128B             (SDMMC_DCTRL_DBLOCKSIZE_0|SDMMC_DCTRL_DBLOCKSIZE_1|SDMMC_DCTRL_DBLOCKSIZE_2)

+#define SDMMC_DATABLOCK_SIZE_256B             SDMMC_DCTRL_DBLOCKSIZE_3

+#define SDMMC_DATABLOCK_SIZE_512B             (SDMMC_DCTRL_DBLOCKSIZE_0|SDMMC_DCTRL_DBLOCKSIZE_3)

+#define SDMMC_DATABLOCK_SIZE_1024B            (SDMMC_DCTRL_DBLOCKSIZE_1|SDMMC_DCTRL_DBLOCKSIZE_3)

+#define SDMMC_DATABLOCK_SIZE_2048B            (SDMMC_DCTRL_DBLOCKSIZE_0|SDMMC_DCTRL_DBLOCKSIZE_1|SDMMC_DCTRL_DBLOCKSIZE_3) 

+#define SDMMC_DATABLOCK_SIZE_4096B            (SDMMC_DCTRL_DBLOCKSIZE_2|SDMMC_DCTRL_DBLOCKSIZE_3)

+#define SDMMC_DATABLOCK_SIZE_8192B            (SDMMC_DCTRL_DBLOCKSIZE_0|SDMMC_DCTRL_DBLOCKSIZE_2|SDMMC_DCTRL_DBLOCKSIZE_3)

+#define SDMMC_DATABLOCK_SIZE_16384B           (SDMMC_DCTRL_DBLOCKSIZE_1|SDMMC_DCTRL_DBLOCKSIZE_2|SDMMC_DCTRL_DBLOCKSIZE_3)

+

+#define IS_SDMMC_BLOCK_SIZE(SIZE) (((SIZE) == SDMMC_DATABLOCK_SIZE_1B)    || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_2B)    || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_4B)    || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_8B)    || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_16B)   || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_32B)   || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_64B)   || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_128B)  || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_256B)  || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_512B)  || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_1024B) || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_2048B) || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_4096B) || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_8192B) || \

+                                  ((SIZE) == SDMMC_DATABLOCK_SIZE_16384B)) 

+/**

+  * @}

+  */

+

+/** @defgroup SDMMC_LL_Transfer_Direction Transfer Direction

+  * @{

+  */

+#define SDMMC_TRANSFER_DIR_TO_CARD            ((uint32_t)0x00000000)

+#define SDMMC_TRANSFER_DIR_TO_SDMMC            SDMMC_DCTRL_DTDIR

+

+#define IS_SDMMC_TRANSFER_DIR(DIR) (((DIR) == SDMMC_TRANSFER_DIR_TO_CARD) || \

+                                   ((DIR) == SDMMC_TRANSFER_DIR_TO_SDMMC))

+/**

+  * @}

+  */

+

+/** @defgroup SDMMC_LL_Transfer_Type Transfer Type

+  * @{

+  */

+#define SDMMC_TRANSFER_MODE_BLOCK             ((uint32_t)0x00000000)

+#define SDMMC_TRANSFER_MODE_STREAM            SDMMC_DCTRL_DTMODE

+

+#define IS_SDMMC_TRANSFER_MODE(MODE) (((MODE) == SDMMC_TRANSFER_MODE_BLOCK) || \

+                                     ((MODE) == SDMMC_TRANSFER_MODE_STREAM))

+/**

+  * @}

+  */

+

+/** @defgroup SDMMC_LL_DPSM_State DPSM State

+  * @{

+  */

+#define SDMMC_DPSM_DISABLE                    ((uint32_t)0x00000000)

+#define SDMMC_DPSM_ENABLE                     SDMMC_DCTRL_DTEN

+

+#define IS_SDMMC_DPSM(DPSM) (((DPSM) == SDMMC_DPSM_DISABLE) ||\

+                            ((DPSM) == SDMMC_DPSM_ENABLE))

+/**

+  * @}

+  */

+  

+/** @defgroup SDMMC_LL_Read_Wait_Mode Read Wait Mode

+  * @{

+  */

+#define SDMMC_READ_WAIT_MODE_DATA2                ((uint32_t)0x00000000)

+#define SDMMC_READ_WAIT_MODE_CLK                  (SDMMC_DCTRL_RWMOD)

+

+#define IS_SDMMC_READWAIT_MODE(MODE) (((MODE) == SDMMC_READ_WAIT_MODE_CLK) || \

+                                     ((MODE) == SDMMC_READ_WAIT_MODE_DATA2))

+/**

+  * @}

+  */  

+

+/** @defgroup SDMMC_LL_Interrupt_sources Interrupt Sources

+  * @{

+  */

+#define SDMMC_IT_CCRCFAIL                    SDMMC_STA_CCRCFAIL

+#define SDMMC_IT_DCRCFAIL                    SDMMC_STA_DCRCFAIL

+#define SDMMC_IT_CTIMEOUT                    SDMMC_STA_CTIMEOUT

+#define SDMMC_IT_DTIMEOUT                    SDMMC_STA_DTIMEOUT

+#define SDMMC_IT_TXUNDERR                    SDMMC_STA_TXUNDERR

+#define SDMMC_IT_RXOVERR                     SDMMC_STA_RXOVERR

+#define SDMMC_IT_CMDREND                     SDMMC_STA_CMDREND

+#define SDMMC_IT_CMDSENT                     SDMMC_STA_CMDSENT

+#define SDMMC_IT_DATAEND                     SDMMC_STA_DATAEND

+#define SDMMC_IT_DBCKEND                     SDMMC_STA_DBCKEND

+#define SDMMC_IT_CMDACT                      SDMMC_STA_CMDACT

+#define SDMMC_IT_TXACT                       SDMMC_STA_TXACT

+#define SDMMC_IT_RXACT                       SDMMC_STA_RXACT

+#define SDMMC_IT_TXFIFOHE                    SDMMC_STA_TXFIFOHE

+#define SDMMC_IT_RXFIFOHF                    SDMMC_STA_RXFIFOHF

+#define SDMMC_IT_TXFIFOF                     SDMMC_STA_TXFIFOF

+#define SDMMC_IT_RXFIFOF                     SDMMC_STA_RXFIFOF

+#define SDMMC_IT_TXFIFOE                     SDMMC_STA_TXFIFOE

+#define SDMMC_IT_RXFIFOE                     SDMMC_STA_RXFIFOE

+#define SDMMC_IT_TXDAVL                      SDMMC_STA_TXDAVL

+#define SDMMC_IT_RXDAVL                      SDMMC_STA_RXDAVL

+#define SDMMC_IT_SDIOIT                      SDMMC_STA_SDIOIT

+/**

+  * @}

+  */ 

+

+/** @defgroup SDMMC_LL_Flags Flags

+  * @{

+  */

+#define SDMMC_FLAG_CCRCFAIL                  SDMMC_STA_CCRCFAIL

+#define SDMMC_FLAG_DCRCFAIL                  SDMMC_STA_DCRCFAIL

+#define SDMMC_FLAG_CTIMEOUT                  SDMMC_STA_CTIMEOUT

+#define SDMMC_FLAG_DTIMEOUT                  SDMMC_STA_DTIMEOUT

+#define SDMMC_FLAG_TXUNDERR                  SDMMC_STA_TXUNDERR

+#define SDMMC_FLAG_RXOVERR                   SDMMC_STA_RXOVERR

+#define SDMMC_FLAG_CMDREND                   SDMMC_STA_CMDREND

+#define SDMMC_FLAG_CMDSENT                   SDMMC_STA_CMDSENT

+#define SDMMC_FLAG_DATAEND                   SDMMC_STA_DATAEND

+#define SDMMC_FLAG_DBCKEND                   SDMMC_STA_DBCKEND

+#define SDMMC_FLAG_CMDACT                    SDMMC_STA_CMDACT

+#define SDMMC_FLAG_TXACT                     SDMMC_STA_TXACT

+#define SDMMC_FLAG_RXACT                     SDMMC_STA_RXACT

+#define SDMMC_FLAG_TXFIFOHE                  SDMMC_STA_TXFIFOHE

+#define SDMMC_FLAG_RXFIFOHF                  SDMMC_STA_RXFIFOHF

+#define SDMMC_FLAG_TXFIFOF                   SDMMC_STA_TXFIFOF

+#define SDMMC_FLAG_RXFIFOF                   SDMMC_STA_RXFIFOF

+#define SDMMC_FLAG_TXFIFOE                   SDMMC_STA_TXFIFOE

+#define SDMMC_FLAG_RXFIFOE                   SDMMC_STA_RXFIFOE

+#define SDMMC_FLAG_TXDAVL                    SDMMC_STA_TXDAVL

+#define SDMMC_FLAG_RXDAVL                    SDMMC_STA_RXDAVL

+#define SDMMC_FLAG_SDIOIT                    SDMMC_STA_SDIOIT

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */

+  

+/* Exported macro ------------------------------------------------------------*/

+/** @defgroup SDMMC_LL_Exported_macros SDMMC_LL Exported Macros

+  * @{

+  */

+  

+/** @defgroup SDMMC_LL_Register Bits And Addresses Definitions

+  * @brief SDMMC_LL registers bit address in the alias region

+  * @{

+  */

+/* ---------------------- SDMMC registers bit mask --------------------------- */

+/* --- CLKCR Register ---*/

+/* CLKCR register clear mask */ 

+#define CLKCR_CLEAR_MASK         ((uint32_t)(SDMMC_CLKCR_CLKDIV  | SDMMC_CLKCR_PWRSAV |\

+                                             SDMMC_CLKCR_BYPASS  | SDMMC_CLKCR_WIDBUS |\

+                                             SDMMC_CLKCR_NEGEDGE | SDMMC_CLKCR_HWFC_EN))

+

+/* --- DCTRL Register ---*/

+/* SDMMC DCTRL Clear Mask */

+#define DCTRL_CLEAR_MASK         ((uint32_t)(SDMMC_DCTRL_DTEN    | SDMMC_DCTRL_DTDIR |\

+                                             SDMMC_DCTRL_DTMODE  | SDMMC_DCTRL_DBLOCKSIZE))

+

+/* --- CMD Register ---*/

+/* CMD Register clear mask */

+#define CMD_CLEAR_MASK           ((uint32_t)(SDMMC_CMD_CMDINDEX | SDMMC_CMD_WAITRESP |\

+                                             SDMMC_CMD_WAITINT  | SDMMC_CMD_WAITPEND |\

+                                             SDMMC_CMD_CPSMEN   | SDMMC_CMD_SDIOSUSPEND))

+

+/* SDMMC Initialization Frequency (400KHz max) */

+#define SDMMC_INIT_CLK_DIV ((uint8_t)0x76)

+

+/* SDMMC Data Transfer Frequency (25MHz max) */

+#define SDMMC_TRANSFER_CLK_DIV ((uint8_t)0x0)

+

+/**

+  * @}

+  */

+

+/** @defgroup SDMMC_LL_Interrupt_Clock Interrupt And Clock Configuration

+ *  @brief macros to handle interrupts and specific clock configurations

+ * @{

+ */

+ 

+/**

+  * @brief  Enable the SDMMC device.

+  * @param  __INSTANCE__: SDMMC Instance  

+  * @retval None

+  */ 

+#define __SDMMC_ENABLE(__INSTANCE__)  ((__INSTANCE__)->CLKCR |= SDMMC_CLKCR_CLKEN)

+

+/**

+  * @brief  Disable the SDMMC device.

+  * @param  __INSTANCE__: SDMMC Instance  

+  * @retval None

+  */

+#define __SDMMC_DISABLE(__INSTANCE__)  ((__INSTANCE__)->CLKCR &= ~SDMMC_CLKCR_CLKEN)

+

+/**

+  * @brief  Enable the SDMMC DMA transfer.

+  * @param  __INSTANCE__: SDMMC Instance  

+  * @retval None

+  */ 

+#define __SDMMC_DMA_ENABLE(__INSTANCE__)  ((__INSTANCE__)->DCTRL |= SDMMC_DCTRL_DMAEN)

+/**

+  * @brief  Disable the SDMMC DMA transfer.

+  * @param  __INSTANCE__: SDMMC Instance   

+  * @retval None

+  */

+#define __SDMMC_DMA_DISABLE(__INSTANCE__)  ((__INSTANCE__)->DCTRL &= ~SDMMC_DCTRL_DMAEN)

+ 

+/**

+  * @brief  Enable the SDMMC device interrupt.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base  

+  * @param  __INTERRUPT__ : specifies the SDMMC interrupt sources to be enabled.

+  *         This parameter can be one or a combination of the following values:

+  *            @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt

+  *            @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt

+  *            @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt

+  *            @arg SDMMC_IT_RXOVERR:  Received FIFO overrun error interrupt

+  *            @arg SDMMC_IT_CMDREND:  Command response received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDSENT:  Command sent (no response required) interrupt

+  *            @arg SDMMC_IT_DATAEND:  Data end (data counter, SDIDCOUNT, is zero) interrupt

+  *            @arg SDMMC_IT_DBCKEND:  Data block sent/received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDACT:   Command transfer in progress interrupt

+  *            @arg SDMMC_IT_TXACT:    Data transmit in progress interrupt

+  *            @arg SDMMC_IT_RXACT:    Data receive in progress interrupt

+  *            @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt

+  *            @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt

+  *            @arg SDMMC_IT_TXFIFOF:  Transmit FIFO full interrupt

+  *            @arg SDMMC_IT_RXFIFOF:  Receive FIFO full interrupt

+  *            @arg SDMMC_IT_TXFIFOE:  Transmit FIFO empty interrupt

+  *            @arg SDMMC_IT_RXFIFOE:  Receive FIFO empty interrupt

+  *            @arg SDMMC_IT_TXDAVL:   Data available in transmit FIFO interrupt

+  *            @arg SDMMC_IT_RXDAVL:   Data available in receive FIFO interrupt

+  *            @arg SDMMC_IT_SDIOIT:   SD I/O interrupt received interrupt   

+  * @retval None

+  */

+#define __SDMMC_ENABLE_IT(__INSTANCE__, __INTERRUPT__)  ((__INSTANCE__)->MASK |= (__INTERRUPT__))

+

+/**

+  * @brief  Disable the SDMMC device interrupt.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base   

+  * @param  __INTERRUPT__ : specifies the SDMMC interrupt sources to be disabled.

+  *          This parameter can be one or a combination of the following values:

+  *            @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt

+  *            @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt

+  *            @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt

+  *            @arg SDMMC_IT_RXOVERR:  Received FIFO overrun error interrupt

+  *            @arg SDMMC_IT_CMDREND:  Command response received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDSENT:  Command sent (no response required) interrupt

+  *            @arg SDMMC_IT_DATAEND:  Data end (data counter, SDIDCOUNT, is zero) interrupt

+  *            @arg SDMMC_IT_DBCKEND:  Data block sent/received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDACT:   Command transfer in progress interrupt

+  *            @arg SDMMC_IT_TXACT:    Data transmit in progress interrupt

+  *            @arg SDMMC_IT_RXACT:    Data receive in progress interrupt

+  *            @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt

+  *            @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt

+  *            @arg SDMMC_IT_TXFIFOF:  Transmit FIFO full interrupt

+  *            @arg SDMMC_IT_RXFIFOF:  Receive FIFO full interrupt

+  *            @arg SDMMC_IT_TXFIFOE:  Transmit FIFO empty interrupt

+  *            @arg SDMMC_IT_RXFIFOE:  Receive FIFO empty interrupt

+  *            @arg SDMMC_IT_TXDAVL:   Data available in transmit FIFO interrupt

+  *            @arg SDMMC_IT_RXDAVL:   Data available in receive FIFO interrupt

+  *            @arg SDMMC_IT_SDIOIT:   SD I/O interrupt received interrupt   

+  * @retval None

+  */

+#define __SDMMC_DISABLE_IT(__INSTANCE__, __INTERRUPT__)  ((__INSTANCE__)->MASK &= ~(__INTERRUPT__))

+

+/**

+  * @brief  Checks whether the specified SDMMC flag is set or not. 

+  * @param  __INSTANCE__ : Pointer to SDMMC register base   

+  * @param  __FLAG__: specifies the flag to check. 

+  *          This parameter can be one of the following values:

+  *            @arg SDMMC_FLAG_CCRCFAIL: Command response received (CRC check failed)

+  *            @arg SDMMC_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)

+  *            @arg SDMMC_FLAG_CTIMEOUT: Command response timeout

+  *            @arg SDMMC_FLAG_DTIMEOUT: Data timeout

+  *            @arg SDMMC_FLAG_TXUNDERR: Transmit FIFO underrun error

+  *            @arg SDMMC_FLAG_RXOVERR:  Received FIFO overrun error

+  *            @arg SDMMC_FLAG_CMDREND:  Command response received (CRC check passed)

+  *            @arg SDMMC_FLAG_CMDSENT:  Command sent (no response required)

+  *            @arg SDMMC_FLAG_DATAEND:  Data end (data counter, SDIDCOUNT, is zero)

+  *            @arg SDMMC_FLAG_DBCKEND:  Data block sent/received (CRC check passed)

+  *            @arg SDMMC_FLAG_CMDACT:   Command transfer in progress

+  *            @arg SDMMC_FLAG_TXACT:    Data transmit in progress

+  *            @arg SDMMC_FLAG_RXACT:    Data receive in progress

+  *            @arg SDMMC_FLAG_TXFIFOHE: Transmit FIFO Half Empty

+  *            @arg SDMMC_FLAG_RXFIFOHF: Receive FIFO Half Full

+  *            @arg SDMMC_FLAG_TXFIFOF:  Transmit FIFO full

+  *            @arg SDMMC_FLAG_RXFIFOF:  Receive FIFO full

+  *            @arg SDMMC_FLAG_TXFIFOE:  Transmit FIFO empty

+  *            @arg SDMMC_FLAG_RXFIFOE:  Receive FIFO empty

+  *            @arg SDMMC_FLAG_TXDAVL:   Data available in transmit FIFO

+  *            @arg SDMMC_FLAG_RXDAVL:   Data available in receive FIFO

+  *            @arg SDMMC_FLAG_SDMMCIT:   SD I/O interrupt received

+  * @retval The new state of SDMMC_FLAG (SET or RESET).

+  */

+#define __SDMMC_GET_FLAG(__INSTANCE__, __FLAG__)  (((__INSTANCE__)->STA &(__FLAG__)) != RESET)

+

+

+/**

+  * @brief  Clears the SDMMC pending flags.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base  

+  * @param  __FLAG__: specifies the flag to clear.  

+  *          This parameter can be one or a combination of the following values:

+  *            @arg SDMMC_FLAG_CCRCFAIL: Command response received (CRC check failed)

+  *            @arg SDMMC_FLAG_DCRCFAIL: Data block sent/received (CRC check failed)

+  *            @arg SDMMC_FLAG_CTIMEOUT: Command response timeout

+  *            @arg SDMMC_FLAG_DTIMEOUT: Data timeout

+  *            @arg SDMMC_FLAG_TXUNDERR: Transmit FIFO underrun error

+  *            @arg SDMMC_FLAG_RXOVERR:  Received FIFO overrun error

+  *            @arg SDMMC_FLAG_CMDREND:  Command response received (CRC check passed)

+  *            @arg SDMMC_FLAG_CMDSENT:  Command sent (no response required)

+  *            @arg SDMMC_FLAG_DATAEND:  Data end (data counter, SDIDCOUNT, is zero)

+  *            @arg SDMMC_FLAG_DBCKEND:  Data block sent/received (CRC check passed)

+  *            @arg SDMMC_FLAG_SDMMCIT:   SD I/O interrupt received

+  * @retval None

+  */

+#define __SDMMC_CLEAR_FLAG(__INSTANCE__, __FLAG__)  ((__INSTANCE__)->ICR = (__FLAG__))

+

+/**

+  * @brief  Checks whether the specified SDMMC interrupt has occurred or not.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base   

+  * @param  __INTERRUPT__: specifies the SDMMC interrupt source to check. 

+  *          This parameter can be one of the following values:

+  *            @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt

+  *            @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt

+  *            @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt

+  *            @arg SDMMC_IT_RXOVERR:  Received FIFO overrun error interrupt

+  *            @arg SDMMC_IT_CMDREND:  Command response received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDSENT:  Command sent (no response required) interrupt

+  *            @arg SDMMC_IT_DATAEND:  Data end (data counter, SDIDCOUNT, is zero) interrupt

+  *            @arg SDMMC_IT_DBCKEND:  Data block sent/received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDACT:   Command transfer in progress interrupt

+  *            @arg SDMMC_IT_TXACT:    Data transmit in progress interrupt

+  *            @arg SDMMC_IT_RXACT:    Data receive in progress interrupt

+  *            @arg SDMMC_IT_TXFIFOHE: Transmit FIFO Half Empty interrupt

+  *            @arg SDMMC_IT_RXFIFOHF: Receive FIFO Half Full interrupt

+  *            @arg SDMMC_IT_TXFIFOF:  Transmit FIFO full interrupt

+  *            @arg SDMMC_IT_RXFIFOF:  Receive FIFO full interrupt

+  *            @arg SDMMC_IT_TXFIFOE:  Transmit FIFO empty interrupt

+  *            @arg SDMMC_IT_RXFIFOE:  Receive FIFO empty interrupt

+  *            @arg SDMMC_IT_TXDAVL:   Data available in transmit FIFO interrupt

+  *            @arg SDMMC_IT_RXDAVL:   Data available in receive FIFO interrupt

+  *            @arg SDMMC_IT_SDIOIT:   SD I/O interrupt received interrupt

+  * @retval The new state of SDMMC_IT (SET or RESET).

+  */

+#define __SDMMC_GET_IT  (__INSTANCE__, __INTERRUPT__)  (((__INSTANCE__)->STA &(__INTERRUPT__)) == (__INTERRUPT__))

+

+/**

+  * @brief  Clears the SDMMC's interrupt pending bits.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base 

+  * @param  __INTERRUPT__: specifies the interrupt pending bit to clear. 

+  *          This parameter can be one or a combination of the following values:

+  *            @arg SDMMC_IT_CCRCFAIL: Command response received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_DCRCFAIL: Data block sent/received (CRC check failed) interrupt

+  *            @arg SDMMC_IT_CTIMEOUT: Command response timeout interrupt

+  *            @arg SDMMC_IT_DTIMEOUT: Data timeout interrupt

+  *            @arg SDMMC_IT_TXUNDERR: Transmit FIFO underrun error interrupt

+  *            @arg SDMMC_IT_RXOVERR:  Received FIFO overrun error interrupt

+  *            @arg SDMMC_IT_CMDREND:  Command response received (CRC check passed) interrupt

+  *            @arg SDMMC_IT_CMDSENT:  Command sent (no response required) interrupt

+  *            @arg SDMMC_IT_DATAEND:  Data end (data counter, SDMMC_DCOUNT, is zero) interrupt

+  *            @arg SDMMC_IT_SDIOIT:   SD I/O interrupt received interrupt

+  * @retval None

+  */

+#define __SDMMC_CLEAR_IT(__INSTANCE__, __INTERRUPT__)  ((__INSTANCE__)->ICR = (__INTERRUPT__))

+

+/**

+  * @brief  Enable Start the SD I/O Read Wait operation.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base  

+  * @retval None

+  */  

+#define __SDMMC_START_READWAIT_ENABLE(__INSTANCE__)  ((__INSTANCE__)->DCTRL |= SDMMC_DCTRL_RWSTART)

+

+/**

+  * @brief  Disable Start the SD I/O Read Wait operations.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base   

+  * @retval None

+  */  

+#define __SDMMC_START_READWAIT_DISABLE(__INSTANCE__)  ((__INSTANCE__)->DCTRL &= ~SDMMC_DCTRL_RWSTART)

+

+/**

+  * @brief  Enable Start the SD I/O Read Wait operation.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base   

+  * @retval None

+  */  

+#define __SDMMC_STOP_READWAIT_ENABLE(__INSTANCE__)  ((__INSTANCE__)->DCTRL |= SDMMC_DCTRL_RWSTOP)

+

+/**

+  * @brief  Disable Stop the SD I/O Read Wait operations.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base  

+  * @retval None

+  */  

+#define __SDMMC_STOP_READWAIT_DISABLE(__INSTANCE__)  ((__INSTANCE__)->DCTRL &= ~SDMMC_DCTRL_RWSTOP)

+

+/**

+  * @brief  Enable the SD I/O Mode Operation.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base   

+  * @retval None

+  */  

+#define __SDMMC_OPERATION_ENABLE(__INSTANCE__)  ((__INSTANCE__)->DCTRL |= SDMMC_DCTRL_SDIOEN) 

+

+/**

+  * @brief  Disable the SD I/O Mode Operation.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base 

+  * @retval None

+  */  

+#define __SDMMC_OPERATION_DISABLE(__INSTANCE__)  ((__INSTANCE__)->DCTRL &= ~SDMMC_DCTRL_SDIOEN) 

+

+/**

+  * @brief  Enable the SD I/O Suspend command sending.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base  

+  * @retval None

+  */  

+#define __SDMMC_SUSPEND_CMD_ENABLE(__INSTANCE__)  ((__INSTANCE__)->CMD |= SDMMC_CMD_SDIOSUSPEND) 

+

+/**

+  * @brief  Disable the SD I/O Suspend command sending.

+  * @param  __INSTANCE__ : Pointer to SDMMC register base  

+  * @retval None

+  */  

+#define __SDMMC_SUSPEND_CMD_DISABLE(__INSTANCE__)  ((__INSTANCE__)->CMD &= ~SDMMC_CMD_SDIOSUSPEND) 

+      

+/**

+  * @}

+  */

+

+/**

+  * @}

+  */  

+

+/* Exported functions --------------------------------------------------------*/

+/** @addtogroup SDMMC_LL_Exported_Functions

+  * @{

+  */

+  

+/* Initialization/de-initialization functions  **********************************/

+/** @addtogroup HAL_SDMMC_LL_Group1

+  * @{

+  */

+HAL_StatusTypeDef SDMMC_Init(SDMMC_TypeDef *SDMMCx, SDMMC_InitTypeDef Init);

+/**

+  * @}

+  */

+  

+/* I/O operation functions  *****************************************************/

+/** @addtogroup HAL_SDMMC_LL_Group2

+  * @{

+  */

+/* Blocking mode: Polling */

+uint32_t          SDMMC_ReadFIFO(SDMMC_TypeDef *SDMMCx);

+HAL_StatusTypeDef SDMMC_WriteFIFO(SDMMC_TypeDef *SDMMCx, uint32_t *pWriteData);

+/**

+  * @}

+  */

+  

+/* Peripheral Control functions  ************************************************/

+/** @addtogroup HAL_SDMMC_LL_Group3

+  * @{

+  */

+HAL_StatusTypeDef SDMMC_PowerState_ON(SDMMC_TypeDef *SDMMCx);

+HAL_StatusTypeDef SDMMC_PowerState_OFF(SDMMC_TypeDef *SDMMCx);

+uint32_t          SDMMC_GetPowerState(SDMMC_TypeDef *SDMMCx);

+

+/* Command path state machine (CPSM) management functions */

+HAL_StatusTypeDef SDMMC_SendCommand(SDMMC_TypeDef *SDMMCx, SDMMC_CmdInitTypeDef *Command);

+uint8_t           SDMMC_GetCommandResponse(SDMMC_TypeDef *SDMMCx);

+uint32_t          SDMMC_GetResponse(SDMMC_TypeDef *SDMMCx, uint32_t Response);

+

+/* Data path state machine (DPSM) management functions */

+HAL_StatusTypeDef SDMMC_DataConfig(SDMMC_TypeDef *SDMMCx, SDMMC_DataInitTypeDef* Data);

+uint32_t          SDMMC_GetDataCounter(SDMMC_TypeDef *SDMMCx);

+uint32_t          SDMMC_GetFIFOCount(SDMMC_TypeDef *SDMMCx);

+

+/* SDMMC Cards mode management functions */

+HAL_StatusTypeDef SDMMC_SetSDMMCReadWaitMode(SDMMC_TypeDef *SDMMCx, uint32_t SDMMC_ReadWaitMode);

+

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */

+  

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+

+#ifdef __cplusplus

+}

+#endif

+

+#endif /* __STM32F7xx_LL_SDMMC_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

diff --git a/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_ll_usb.h b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_ll_usb.h
new file mode 100644
index 0000000..36e5129
--- /dev/null
+++ b/190725_FreeRTOS_IoT_Libs_Task_Pool_and_MQTT_Preview/FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_ll_usb.h
@@ -0,0 +1,463 @@
+/**

+  ******************************************************************************

+  * @file    stm32f7xx_ll_usb.h

+  * @author  MCD Application Team

+  * @version V1.0.0

+  * @date    12-May-2015

+  * @brief   Header file of USB Core HAL module.

+  ******************************************************************************

+  * @attention

+  *

+  * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>

+  *

+  * Redistribution and use in source and binary forms, with or without modification,

+  * are permitted provided that the following conditions are met:

+  *   1. Redistributions of source code must retain the above copyright notice,

+  *      this list of conditions and the following disclaimer.

+  *   2. Redistributions in binary form must reproduce the above copyright notice,

+  *      this list of conditions and the following disclaimer in the documentation

+  *      and/or other materials provided with the distribution.

+  *   3. Neither the name of STMicroelectronics nor the names of its contributors

+  *      may be used to endorse or promote products derived from this software

+  *      without specific prior written permission.

+  *

+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

+  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

+  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

+  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+  *

+  ******************************************************************************

+  */ 

+

+/* Define to prevent recursive inclusion -------------------------------------*/

+#ifndef __STM32F7xx_LL_USB_H

+#define __STM32F7xx_LL_USB_H

+

+#ifdef __cplusplus

+ extern "C" {

+#endif

+

+/* Includes ------------------------------------------------------------------*/

+#include "stm32f7xx_hal_def.h"

+

+/** @addtogroup STM32F7xx_HAL

+  * @{

+  */

+

+/** @addtogroup USB_Core

+  * @{

+  */ 

+

+/* Exported types ------------------------------------------------------------*/ 

+

+/** 

+  * @brief  USB Mode definition  

+  */  

+typedef enum 

+{

+   USB_OTG_DEVICE_MODE  = 0,

+   USB_OTG_HOST_MODE    = 1,

+   USB_OTG_DRD_MODE     = 2

+   

+}USB_OTG_ModeTypeDef;

+

+/** 

+  * @brief  URB States definition  

+  */ 

+typedef enum {

+  URB_IDLE = 0,

+  URB_DONE,

+  URB_NOTREADY,

+  URB_NYET,

+  URB_ERROR,

+  URB_STALL

+    

+}USB_OTG_URBStateTypeDef;

+

+/** 

+  * @brief  Host channel States  definition  

+  */ 

+typedef enum {

+  HC_IDLE = 0,

+  HC_XFRC,

+  HC_HALTED,

+  HC_NAK,

+  HC_NYET,

+  HC_STALL,

+  HC_XACTERR,  

+  HC_BBLERR,   

+  HC_DATATGLERR

+    

+}USB_OTG_HCStateTypeDef;

+

+/** 

+  * @brief  PCD Initialization Structure definition  

+  */

+typedef struct

+{

+  uint32_t dev_endpoints;        /*!< Device Endpoints number.

+                                      This parameter depends on the used USB core.   

+                                      This parameter must be a number between Min_Data = 1 and Max_Data = 15 */    

+  

+  uint32_t Host_channels;        /*!< Host Channels number.

+                                      This parameter Depends on the used USB core.   

+                                      This parameter must be a number between Min_Data = 1 and Max_Data = 15 */       

+

+  uint32_t speed;                /*!< USB Core speed.

+                                      This parameter can be any value of @ref USB_Core_Speed_                */        

+                               

+  uint32_t dma_enable;           /*!< Enable or disable of the USB embedded DMA.                             */            

+

+  uint32_t ep0_mps;              /*!< Set the Endpoint 0 Max Packet size. 

+                                      This parameter can be any value of @ref USB_EP0_MPS_                   */              

+                       

+  uint32_t phy_itface;           /*!< Select the used PHY interface.

+                                      This parameter can be any value of @ref USB_Core_PHY_                  */ 

+                                

+  uint32_t Sof_enable;           /*!< Enable or disable the output of the SOF signal.                        */     

+                               

+  uint32_t low_power_enable;     /*!< Enable or disable the low power mode.                                  */

+  

+  uint32_t lpm_enable;           /*!< Enable or disable Link Power Management.                               */

+                          

+  uint32_t vbus_sensing_enable;  /*!< Enable or disable the VBUS Sensing feature.                            */ 

+

+  uint32_t use_dedicated_ep1;    /*!< Enable or disable the use of the dedicated EP1 interrupt.              */      

+  

+  uint32_t use_external_vbus;    /*!< Enable or disable the use of the external VBUS.                        */   

+  

+}USB_OTG_CfgTypeDef;

+

+typedef struct

+{

+  uint8_t   num;            /*!< Endpoint number

+                                This parameter must be a number between Min_Data = 1 and Max_Data = 15    */ 

+                                

+  uint8_t   is_in;          /*!< Endpoint direction

+                                This parameter must be a number between Min_Data = 0 and Max_Data = 1     */ 

+  

+  uint8_t   is_stall;       /*!< Endpoint stall condition

+                                This parameter must be a number between Min_Data = 0 and Max_Data = 1     */ 

+  

+  uint8_t   type;           /*!< Endpoint type

+                                 This parameter can be any value of @ref USB_EP_Type_                     */ 

+                                

+  uint8_t   data_pid_start; /*!< Initial data PID

+                                This parameter must be a number between Min_Data = 0 and Max_Data = 1     */

+                                

+  uint8_t   even_odd_frame; /*!< IFrame parity

+                                 This parameter must be a number between Min_Data = 0 and Max_Data = 1    */

+                                

+  uint16_t  tx_fifo_num;    /*!< Transmission FIFO number

+                                 This parameter must be a number between Min_Data = 1 and Max_Data = 15   */

+                                

+  uint32_t  maxpacket;      /*!< Endpoint Max packet size

+                                 This parameter must be a number between Min_Data = 0 and Max_Data = 64KB */

+

+  uint8_t   *xfer_buff;     /*!< Pointer to transfer buffer                                               */

+                                

+  uint32_t  dma_addr;       /*!< 32 bits aligned transfer buffer address                                  */

+  

+  uint32_t  xfer_len;       /*!< Current transfer length                                                  */

+  

+  uint32_t  xfer_count;     /*!< Partial transfer length in case of multi packet transfer                 */

+

+}USB_OTG_EPTypeDef;

+

+typedef struct

+{

+  uint8_t   dev_addr ;     /*!< USB device address.

+                                This parameter must be a number between Min_Data = 1 and Max_Data = 255    */ 

+

+  uint8_t   ch_num;        /*!< Host channel number.

+                                This parameter must be a number between Min_Data = 1 and Max_Data = 15     */ 

+                                

+  uint8_t   ep_num;        /*!< Endpoint number.

+                                This parameter must be a number between Min_Data = 1 and Max_Data = 15     */ 

+                                

+  uint8_t   ep_is_in;      /*!< Endpoint direction

+                                This parameter must be a number between Min_Data = 0 and Max_Data = 1      */ 

+                                

+  uint8_t   speed;         /*!< USB Host speed.

+                                This parameter can be any value of @ref USB_Core_Speed_                    */

+                                

+  uint8_t   do_ping;       /*!< Enable or disable the use of the PING protocol for HS mode.                */

+  

+  uint8_t   process_ping;  /*!< Execute the PING protocol for HS mode.                                     */

+

+  uint8_t   ep_type;       /*!< Endpoint Type.

+                                This parameter can be any value of @ref USB_EP_Type_                       */

+                                

+  uint16_t  max_packet;    /*!< Endpoint Max packet size.

+                                This parameter must be a number between Min_Data = 0 and Max_Data = 64KB   */

+                                

+  uint8_t   data_pid;      /*!< Initial data PID.

+                                This parameter must be a number between Min_Data = 0 and Max_Data = 1      */

+                                

+  uint8_t   *xfer_buff;    /*!< Pointer to transfer buffer.                                                */

+  

+  uint32_t  xfer_len;      /*!< Current transfer length.                                                   */

+  

+  uint32_t  xfer_count;    /*!< Partial transfer length in case of multi packet transfer.                  */

+  

+  uint8_t   toggle_in;     /*!< IN transfer current toggle flag.

+                                This parameter must be a number between Min_Data = 0 and Max_Data = 1      */

+                                

+  uint8_t   toggle_out;    /*!< OUT transfer current toggle flag

+                                This parameter must be a number between Min_Data = 0 and Max_Data = 1      */

+  

+  uint32_t  dma_addr;      /*!< 32 bits aligned transfer buffer address.                                   */

+  

+  uint32_t  ErrCnt;        /*!< Host channel error count.*/

+  

+  USB_OTG_URBStateTypeDef  urb_state;  /*!< URB state. 

+                                           This parameter can be any value of @ref USB_OTG_URBStateTypeDef */ 

+  

+  USB_OTG_HCStateTypeDef   state;     /*!< Host Channel state. 

+                                           This parameter can be any value of @ref USB_OTG_HCStateTypeDef  */ 

+                                             

+}USB_OTG_HCTypeDef;

+  

+/* Exported constants --------------------------------------------------------*/

+

+/** @defgroup PCD_Exported_Constants PCD Exported Constants

+  * @{

+  */

+

+/** @defgroup USB_Core_Mode_ USB Core Mode

+  * @{

+  */

+#define USB_OTG_MODE_DEVICE                    0

+#define USB_OTG_MODE_HOST                      1

+#define USB_OTG_MODE_DRD                       2

+/**

+  * @}

+  */

+

+/** @defgroup USB_Core_Speed_   USB Core Speed

+  * @{

+  */  

+#define USB_OTG_SPEED_HIGH                     0

+#define USB_OTG_SPEED_HIGH_IN_FULL             1

+#define USB_OTG_SPEED_LOW                      2  

+#define USB_OTG_SPEED_FULL                     3

+/**

+  * @}

+  */

+  

+/** @defgroup USB_Core_PHY_   USB Core PHY

+  * @{

+  */   

+#define USB_OTG_ULPI_PHY                       1

+#define USB_OTG_EMBEDDED_PHY                   2

+/**

+  * @}

+  */

+  

+/** @defgroup USB_Core_MPS_   USB Core MPS

+  * @{

+  */

+#define USB_OTG_HS_MAX_PACKET_SIZE           512

+#define USB_OTG_FS_MAX_PACKET_SIZE           64

+#define USB_OTG_MAX_EP0_SIZE                 64

+/**

+  * @}

+  */

+

+/** @defgroup USB_Core_Phy_Frequency_   USB Core Phy Frequency

+  * @{

+  */

+#define DSTS_ENUMSPD_HS_PHY_30MHZ_OR_60MHZ     (0 << 1)

+#define DSTS_ENUMSPD_FS_PHY_30MHZ_OR_60MHZ     (1 << 1)

+#define DSTS_ENUMSPD_LS_PHY_6MHZ               (2 << 1)

+#define DSTS_ENUMSPD_FS_PHY_48MHZ              (3 << 1)

+/**

+  * @}

+  */

+  

+/** @defgroup USB_CORE_Frame_Interval_   USB CORE Frame Interval

+  * @{

+  */  

+#define DCFG_FRAME_INTERVAL_80                 0

+#define DCFG_FRAME_INTERVAL_85                 1

+#define DCFG_FRAME_INTERVAL_90                 2

+#define DCFG_FRAME_INTERVAL_95                 3

+/**

+  * @}

+  */

+

+/** @defgroup USB_EP0_MPS_  USB EP0 MPS

+  * @{

+  */

+#define DEP0CTL_MPS_64                         0

+#define DEP0CTL_MPS_32                         1

+#define DEP0CTL_MPS_16                         2

+#define DEP0CTL_MPS_8                          3

+/**

+  * @}

+  */

+

+/** @defgroup USB_EP_Speed_  USB EP Speed

+  * @{

+  */

+#define EP_SPEED_LOW                           0

+#define EP_SPEED_FULL                          1

+#define EP_SPEED_HIGH                          2

+/**

+  * @}

+  */

+

+/** @defgroup USB_EP_Type_  USB EP Type

+  * @{

+  */

+#define EP_TYPE_CTRL                           0

+#define EP_TYPE_ISOC                           1

+#define EP_TYPE_BULK                           2

+#define EP_TYPE_INTR                           3

+#define EP_TYPE_MSK                            3

+/**

+  * @}

+  */

+

+/** @defgroup USB_STS_Defines_   USB STS Defines

+  * @{

+  */

+#define STS_GOUT_NAK                           1

+#define STS_DATA_UPDT                          2

+#define STS_XFER_COMP                          3

+#define STS_SETUP_COMP                         4

+#define STS_SETUP_UPDT                         6

+/**

+  * @}

+  */

+

+/** @defgroup HCFG_SPEED_Defines_   HCFG SPEED Defines

+  * @{

+  */  

+#define HCFG_30_60_MHZ                         0

+#define HCFG_48_MHZ                            1

+#define HCFG_6_MHZ                             2

+/**

+  * @}

+  */

+    

+/** @defgroup HPRT0_PRTSPD_SPEED_Defines_  HPRT0 PRTSPD SPEED Defines

+  * @{

+  */    

+#define HPRT0_PRTSPD_HIGH_SPEED                0

+#define HPRT0_PRTSPD_FULL_SPEED                1

+#define HPRT0_PRTSPD_LOW_SPEED                 2

+/**

+  * @}

+  */  

+   

+#define HCCHAR_CTRL                            0

+#define HCCHAR_ISOC                            1

+#define HCCHAR_BULK                            2

+#define HCCHAR_INTR                            3

+       

+#define HC_PID_DATA0                           0

+#define HC_PID_DATA2                           1

+#define HC_PID_DATA1                           2

+#define HC_PID_SETUP                           3

+

+#define GRXSTS_PKTSTS_IN                       2

+#define GRXSTS_PKTSTS_IN_XFER_COMP             3

+#define GRXSTS_PKTSTS_DATA_TOGGLE_ERR          5

+#define GRXSTS_PKTSTS_CH_HALTED                7

+    

+#define USBx_PCGCCTL    *(__IO uint32_t *)((uint32_t)USBx + USB_OTG_PCGCCTL_BASE)

+#define USBx_HPRT0      *(__IO uint32_t *)((uint32_t)USBx + USB_OTG_HOST_PORT_BASE)

+

+#define USBx_DEVICE     ((USB_OTG_DeviceTypeDef *)((uint32_t )USBx + USB_OTG_DEVICE_BASE)) 

+#define USBx_INEP(i)    ((USB_OTG_INEndpointTypeDef *)((uint32_t)USBx + USB_OTG_IN_ENDPOINT_BASE + (i)*USB_OTG_EP_REG_SIZE))        

+#define USBx_OUTEP(i)   ((USB_OTG_OUTEndpointTypeDef *)((uint32_t)USBx + USB_OTG_OUT_ENDPOINT_BASE + (i)*USB_OTG_EP_REG_SIZE))        

+#define USBx_DFIFO(i)   *(__IO uint32_t *)((uint32_t)USBx + USB_OTG_FIFO_BASE + (i) * USB_OTG_FIFO_SIZE)

+

+#define USBx_HOST       ((USB_OTG_HostTypeDef *)((uint32_t )USBx + USB_OTG_HOST_BASE))  

+#define USBx_HC(i)      ((USB_OTG_HostChannelTypeDef *)((uint32_t)USBx + USB_OTG_HOST_CHANNEL_BASE + (i)*USB_OTG_HOST_CHANNEL_SIZE))

+/**

+  * @}

+  */

+/* Exported macro ------------------------------------------------------------*/

+#define USB_MASK_INTERRUPT(__INSTANCE__, __INTERRUPT__)     ((__INSTANCE__)->GINTMSK &= ~(__INTERRUPT__))

+#define USB_UNMASK_INTERRUPT(__INSTANCE__, __INTERRUPT__)   ((__INSTANCE__)->GINTMSK |= (__INTERRUPT__))

+    

+#define CLEAR_IN_EP_INTR(__EPNUM__, __INTERRUPT__)          (USBx_INEP(__EPNUM__)->DIEPINT = (__INTERRUPT__))

+#define CLEAR_OUT_EP_INTR(__EPNUM__, __INTERRUPT__)         (USBx_OUTEP(__EPNUM__)->DOEPINT = (__INTERRUPT__))  

+

+/* Exported functions --------------------------------------------------------*/

+HAL_StatusTypeDef USB_CoreInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef Init);

+HAL_StatusTypeDef USB_DevInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef Init);

+HAL_StatusTypeDef USB_EnableGlobalInt(USB_OTG_GlobalTypeDef *USBx);

+HAL_StatusTypeDef USB_DisableGlobalInt(USB_OTG_GlobalTypeDef *USBx);

+HAL_StatusTypeDef USB_SetCurrentMode(USB_OTG_GlobalTypeDef *USBx , USB_OTG_ModeTypeDef mode);

+HAL_StatusTypeDef USB_SetDevSpeed(USB_OTG_GlobalTypeDef *USBx , uint8_t speed);

+HAL_StatusTypeDef USB_FlushRxFifo (USB_OTG_GlobalTypeDef *USBx);

+HAL_StatusTypeDef USB_FlushTxFifo (USB_OTG_GlobalTypeDef *USBx, uint32_t num );

+HAL_StatusTypeDef USB_ActivateEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep);

+HAL_StatusTypeDef USB_DeactivateEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep);

+HAL_StatusTypeDef USB_ActivateDedicatedEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep);

+HAL_StatusTypeDef USB_DeactivateDedicatedEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep);

+HAL_StatusTypeDef USB_EPStartXfer(USB_OTG_GlobalTypeDef *USBx , USB_OTG_EPTypeDef *ep, uint8_t dma);

+HAL_StatusTypeDef USB_EP0StartXfer(USB_OTG_GlobalTypeDef *USBx , USB_OTG_EPTypeDef *ep, uint8_t dma);

+HAL_StatusTypeDef USB_WritePacket(USB_OTG_GlobalTypeDef *USBx, uint8_t *src, uint8_t ch_ep_num, uint16_t len, uint8_t dma);

+void *            USB_ReadPacket(USB_OTG_GlobalTypeDef *USBx, uint8_t *dest, uint16_t len);

+HAL_StatusTypeDef USB_EPSetStall(USB_OTG_GlobalTypeDef *USBx , USB_OTG_EPTypeDef *ep);

+HAL_StatusTypeDef USB_EPClearStall(USB_OTG_GlobalTypeDef *USBx , USB_OTG_EPTypeDef *ep);

+HAL_StatusTypeDef USB_SetDevAddress (USB_OTG_GlobalTypeDef *USBx, uint8_t address);

+HAL_StatusTypeDef USB_DevConnect (USB_OTG_GlobalTypeDef *USBx);

+HAL_StatusTypeDef USB_DevDisconnect (USB_OTG_GlobalTypeDef *USBx);

+HAL_StatusTypeDef USB_StopDevice(USB_OTG_GlobalTypeDef *USBx);

+HAL_StatusTypeDef USB_ActivateSetup (USB_OTG_GlobalTypeDef *USBx);

+HAL_StatusTypeDef USB_EP0_OutStart(USB_OTG_GlobalTypeDef *USBx, uint8_t dma, uint8_t *psetup);

+uint8_t           USB_GetDevSpeed(USB_OTG_GlobalTypeDef *USBx);

+uint32_t          USB_GetMode(USB_OTG_GlobalTypeDef *USBx);

+uint32_t          USB_ReadInterrupts (USB_OTG_GlobalTypeDef *USBx);

+uint32_t          USB_ReadDevAllOutEpInterrupt (USB_OTG_GlobalTypeDef *USBx);

+uint32_t          USB_ReadDevOutEPInterrupt (USB_OTG_GlobalTypeDef *USBx , uint8_t epnum);

+uint32_t          USB_ReadDevAllInEpInterrupt (USB_OTG_GlobalTypeDef *USBx);

+uint32_t          USB_ReadDevInEPInterrupt (USB_OTG_GlobalTypeDef *USBx , uint8_t epnum);

+void              USB_ClearInterrupts (USB_OTG_GlobalTypeDef *USBx, uint32_t interrupt);

+

+HAL_StatusTypeDef USB_HostInit (USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg);

+HAL_StatusTypeDef USB_InitFSLSPClkSel(USB_OTG_GlobalTypeDef *USBx , uint8_t freq);

+HAL_StatusTypeDef USB_ResetPort(USB_OTG_GlobalTypeDef *USBx);

+HAL_StatusTypeDef USB_DriveVbus (USB_OTG_GlobalTypeDef *USBx, uint8_t state);

+uint32_t          USB_GetHostSpeed (USB_OTG_GlobalTypeDef *USBx);

+uint32_t          USB_GetCurrentFrame (USB_OTG_GlobalTypeDef *USBx);

+HAL_StatusTypeDef USB_HC_Init(USB_OTG_GlobalTypeDef *USBx,  

+                                  uint8_t ch_num,

+                                  uint8_t epnum,

+                                  uint8_t dev_address,

+                                  uint8_t speed,

+                                  uint8_t ep_type,

+                                  uint16_t mps);

+HAL_StatusTypeDef USB_HC_StartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_HCTypeDef *hc, uint8_t dma);

+uint32_t          USB_HC_ReadInterrupt (USB_OTG_GlobalTypeDef *USBx);

+HAL_StatusTypeDef USB_HC_Halt(USB_OTG_GlobalTypeDef *USBx , uint8_t hc_num);

+HAL_StatusTypeDef USB_DoPing(USB_OTG_GlobalTypeDef *USBx , uint8_t ch_num);

+HAL_StatusTypeDef USB_StopHost(USB_OTG_GlobalTypeDef *USBx);

+

+/**

+  * @}

+  */ 

+

+/**

+  * @}

+  */

+  

+#ifdef __cplusplus

+}

+#endif

+

+

+#endif /* __STM32F7xx_LL_USB_H */

+

+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/