|
236 | 236 | #define DAC_WAVEGENERATION_NOISE DAC_WAVE_NOISE
|
237 | 237 | #define DAC_WAVEGENERATION_TRIANGLE DAC_WAVE_TRIANGLE
|
238 | 238 |
|
| 239 | +#if defined(STM32G4) |
| 240 | +#define DAC_CHIPCONNECT_DISABLE (DAC_CHIPCONNECT_EXTERNAL | DAC_CHIPCONNECT_BOTH) |
| 241 | +#define DAC_CHIPCONNECT_ENABLE (DAC_CHIPCONNECT_INTERNAL | DAC_CHIPCONNECT_BOTH) |
| 242 | +#endif |
| 243 | + |
| 244 | +#if defined(STM32L1) || defined(STM32L4) || defined(STM32G0) |
| 245 | +#define HAL_DAC_MSP_INIT_CB_ID HAL_DAC_MSPINIT_CB_ID |
| 246 | +#define HAL_DAC_MSP_DEINIT_CB_ID HAL_DAC_MSPDEINIT_CB_ID |
| 247 | +#endif |
239 | 248 |
|
240 | 249 | /**
|
241 | 250 | * @}
|
|
487 | 496 | #define HAL_SYSCFG_FASTMODEPLUS_I2C1 I2C_FASTMODEPLUS_I2C1
|
488 | 497 | #define HAL_SYSCFG_FASTMODEPLUS_I2C2 I2C_FASTMODEPLUS_I2C2
|
489 | 498 | #define HAL_SYSCFG_FASTMODEPLUS_I2C3 I2C_FASTMODEPLUS_I2C3
|
| 499 | +#if defined(STM32G4) |
| 500 | + |
| 501 | +#define HAL_SYSCFG_EnableIOAnalogSwitchBooster HAL_SYSCFG_EnableIOSwitchBooster |
| 502 | +#define HAL_SYSCFG_DisableIOAnalogSwitchBooster HAL_SYSCFG_DisableIOSwitchBooster |
| 503 | +#define HAL_SYSCFG_EnableIOAnalogSwitchVDD HAL_SYSCFG_EnableIOSwitchVDD |
| 504 | +#define HAL_SYSCFG_DisableIOAnalogSwitchVDD HAL_SYSCFG_DisableIOSwitchVDD |
| 505 | +#endif /* STM32G4 */ |
490 | 506 | /**
|
491 | 507 | * @}
|
492 | 508 | */
|
|
495 | 511 | /** @defgroup LL_FMC_Aliased_Defines LL FMC Aliased Defines maintained for compatibility purpose
|
496 | 512 | * @{
|
497 | 513 | */
|
498 |
| -#if defined(STM32L4) || defined(STM32F7) || defined(STM32H7) |
| 514 | +#if defined(STM32L4) || defined(STM32F7) || defined(STM32H7) || defined(STM32G4) |
499 | 515 | #define FMC_NAND_PCC_WAIT_FEATURE_DISABLE FMC_NAND_WAIT_FEATURE_DISABLE
|
500 | 516 | #define FMC_NAND_PCC_WAIT_FEATURE_ENABLE FMC_NAND_WAIT_FEATURE_ENABLE
|
501 | 517 | #define FMC_NAND_PCC_MEM_BUS_WIDTH_8 FMC_NAND_MEM_BUS_WIDTH_8
|
|
554 | 570 | #define GPIO_AF1_LPTIM GPIO_AF1_LPTIM1
|
555 | 571 | #define GPIO_AF2_LPTIM GPIO_AF2_LPTIM1
|
556 | 572 |
|
557 |
| -#if defined(STM32L0) || defined(STM32L4) || defined(STM32F4) || defined(STM32F2) || defined(STM32F7) || defined(STM32H7) |
| 573 | +#if defined(STM32L0) || defined(STM32L4) || defined(STM32F4) || defined(STM32F2) || defined(STM32F7) || defined(STM32G4) || defined(STM32H7) |
558 | 574 | #define GPIO_SPEED_LOW GPIO_SPEED_FREQ_LOW
|
559 | 575 | #define GPIO_SPEED_MEDIUM GPIO_SPEED_FREQ_MEDIUM
|
560 | 576 | #define GPIO_SPEED_FAST GPIO_SPEED_FREQ_HIGH
|
561 | 577 | #define GPIO_SPEED_HIGH GPIO_SPEED_FREQ_VERY_HIGH
|
562 |
| -#endif /* STM32L0 || STM32L4 || STM32F4 || STM32F2 || STM32F7 || STM32H7*/ |
| 578 | +#endif /* STM32L0 || STM32L4 || STM32F4 || STM32F2 || STM32F7 || STM32G4 || STM32H7*/ |
563 | 579 |
|
564 | 580 | #if defined(STM32L1)
|
565 | 581 | #define GPIO_SPEED_VERY_LOW GPIO_SPEED_FREQ_LOW
|
|
600 | 616 | #define __HAL_HRTIM_GetClockPrescaler __HAL_HRTIM_GETCLOCKPRESCALER
|
601 | 617 | #define __HAL_HRTIM_SetCompare __HAL_HRTIM_SETCOMPARE
|
602 | 618 | #define __HAL_HRTIM_GetCompare __HAL_HRTIM_GETCOMPARE
|
| 619 | + |
| 620 | +#if defined(STM32G4) |
| 621 | +#define HAL_HRTIM_ExternalEventCounterConfig HAL_HRTIM_ExtEventCounterConfig |
| 622 | +#define HAL_HRTIM_ExternalEventCounterEnable HAL_HRTIM_ExtEventCounterEnable |
| 623 | +#define HAL_HRTIM_ExternalEventCounterDisable HAL_HRTIM_ExtEventCounterDisable |
| 624 | +#define HAL_HRTIM_ExternalEventCounterReset HAL_HRTIM_ExtEventCounterReset |
| 625 | +#endif /* STM32G4 */ |
603 | 626 | /**
|
604 | 627 | * @}
|
605 | 628 | */
|
|
739 | 762 | #define OPAMP_PGACONNECT_VM0 OPAMP_PGA_CONNECT_INVERTINGINPUT_IO0
|
740 | 763 | #define OPAMP_PGACONNECT_VM1 OPAMP_PGA_CONNECT_INVERTINGINPUT_IO1
|
741 | 764 |
|
| 765 | +#if defined(STM32L1) || defined(STM32L4) |
| 766 | +#define HAL_OPAMP_MSP_INIT_CB_ID HAL_OPAMP_MSPINIT_CB_ID |
| 767 | +#define HAL_OPAMP_MSP_DEINIT_CB_ID HAL_OPAMP_MSPDEINIT_CB_ID |
| 768 | +#endif |
| 769 | + |
| 770 | + |
742 | 771 | /**
|
743 | 772 | * @}
|
744 | 773 | */
|
|
754 | 783 |
|
755 | 784 | #define I2S_FLAG_TXE I2S_FLAG_TXP
|
756 | 785 | #define I2S_FLAG_RXNE I2S_FLAG_RXP
|
757 |
| - #define I2S_FLAG_FRE I2S_FLAG_TIFRE |
758 | 786 | #endif
|
759 | 787 |
|
760 | 788 | #if defined(STM32F7)
|
|
972 | 1000 | #define IS_TIM_HALL_INTERFACE_INSTANCE IS_TIM_HALL_SENSOR_INTERFACE_INSTANCE
|
973 | 1001 | #endif
|
974 | 1002 |
|
| 1003 | +#if defined(STM32H7) |
| 1004 | +#define TIM_TIM1_ETR_COMP1_OUT TIM_TIM1_ETR_COMP1 |
| 1005 | +#define TIM_TIM1_ETR_COMP2_OUT TIM_TIM1_ETR_COMP2 |
| 1006 | +#define TIM_TIM8_ETR_COMP1_OUT TIM_TIM8_ETR_COMP1 |
| 1007 | +#define TIM_TIM8_ETR_COMP2_OUT TIM_TIM8_ETR_COMP2 |
| 1008 | +#define TIM_TIM2_ETR_COMP1_OUT TIM_TIM2_ETR_COMP1 |
| 1009 | +#define TIM_TIM2_ETR_COMP2_OUT TIM_TIM2_ETR_COMP2 |
| 1010 | +#define TIM_TIM3_ETR_COMP1_OUT TIM_TIM3_ETR_COMP1 |
| 1011 | +#define TIM_TIM1_TI1_COMP1_OUT TIM_TIM1_TI1_COMP1 |
| 1012 | +#define TIM_TIM8_TI1_COMP2_OUT TIM_TIM8_TI1_COMP2 |
| 1013 | +#define TIM_TIM2_TI4_COMP1_OUT TIM_TIM2_TI4_COMP1 |
| 1014 | +#define TIM_TIM2_TI4_COMP2_OUT TIM_TIM2_TI4_COMP2 |
| 1015 | +#define TIM_TIM2_TI4_COMP1COMP2_OUT TIM_TIM2_TI4_COMP1_COMP2 |
| 1016 | +#define TIM_TIM3_TI1_COMP1_OUT TIM_TIM3_TI1_COMP1 |
| 1017 | +#define TIM_TIM3_TI1_COMP2_OUT TIM_TIM3_TI1_COMP2 |
| 1018 | +#define TIM_TIM3_TI1_COMP1COMP2_OUT TIM_TIM3_TI1_COMP1_COMP2 |
| 1019 | +#endif |
| 1020 | + |
975 | 1021 | /**
|
976 | 1022 | * @}
|
977 | 1023 | */
|
|
1251 | 1297 |
|
1252 | 1298 | #define HAL_I2CFastModePlusConfig(SYSCFG_I2CFastModePlus, cmd) (((cmd)==ENABLE)? HAL_I2CEx_EnableFastModePlus(SYSCFG_I2CFastModePlus): HAL_I2CEx_DisableFastModePlus(SYSCFG_I2CFastModePlus))
|
1253 | 1299 |
|
1254 |
| -#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F4) || defined(STM32F7) |
| 1300 | +#if defined(STM32H7) || defined(STM32WB) || defined(STM32G0) || defined(STM32F4) || defined(STM32F7) || defined(STM32L0) || defined(STM32L4) |
1255 | 1301 | #define HAL_I2C_Master_Sequential_Transmit_IT HAL_I2C_Master_Seq_Transmit_IT
|
1256 | 1302 | #define HAL_I2C_Master_Sequential_Receive_IT HAL_I2C_Master_Seq_Receive_IT
|
1257 | 1303 | #define HAL_I2C_Slave_Sequential_Transmit_IT HAL_I2C_Slave_Seq_Transmit_IT
|
|
1260 | 1306 | #define HAL_I2C_Master_Sequential_Receive_DMA HAL_I2C_Master_Seq_Receive_DMA
|
1261 | 1307 | #define HAL_I2C_Slave_Sequential_Transmit_DMA HAL_I2C_Slave_Seq_Transmit_DMA
|
1262 | 1308 | #define HAL_I2C_Slave_Sequential_Receive_DMA HAL_I2C_Slave_Seq_Receive_DMA
|
1263 |
| -#endif /* STM32H7 || STM32WB || STM32G0 || STM32F4 || STM32F7 */ |
| 1309 | +#endif /* STM32H7 || STM32WB || STM32G0 || STM32F4 || STM32F7 || STM32L0 || STM32L4 */ |
1264 | 1310 |
|
1265 | 1311 | #if defined(STM32F4)
|
1266 | 1312 | #define HAL_FMPI2C_Master_Sequential_Transmit_IT HAL_FMPI2C_Master_Seq_Transmit_IT
|
|
2477 | 2523 | #define __USB_OTG_FS_CLK_DISABLE __HAL_RCC_USB_OTG_FS_CLK_DISABLE
|
2478 | 2524 | #define __USB_OTG_FS_CLK_ENABLE __HAL_RCC_USB_OTG_FS_CLK_ENABLE
|
2479 | 2525 | #define __USB_RELEASE_RESET __HAL_RCC_USB_RELEASE_RESET
|
| 2526 | + |
| 2527 | +#if defined(STM32H7) |
| 2528 | +#define __HAL_RCC_WWDG_CLK_DISABLE __HAL_RCC_WWDG1_CLK_DISABLE |
| 2529 | +#define __HAL_RCC_WWDG_CLK_ENABLE __HAL_RCC_WWDG1_CLK_ENABLE |
| 2530 | +#define __HAL_RCC_WWDG_CLK_SLEEP_DISABLE __HAL_RCC_WWDG1_CLK_SLEEP_DISABLE |
| 2531 | +#define __HAL_RCC_WWDG_CLK_SLEEP_ENABLE __HAL_RCC_WWDG1_CLK_SLEEP_ENABLE |
| 2532 | + |
| 2533 | +#define __HAL_RCC_WWDG_FORCE_RESET ((void)0U) /* Not available on the STM32H7*/ |
| 2534 | +#define __HAL_RCC_WWDG_RELEASE_RESET ((void)0U) /* Not available on the STM32H7*/ |
| 2535 | + |
| 2536 | + |
| 2537 | +#define __HAL_RCC_WWDG_IS_CLK_ENABLED __HAL_RCC_WWDG1_IS_CLK_ENABLED |
| 2538 | +#define __HAL_RCC_WWDG_IS_CLK_DISABLED __HAL_RCC_WWDG1_IS_CLK_DISABLED |
| 2539 | +#endif |
| 2540 | + |
2480 | 2541 | #define __WWDG_CLK_DISABLE __HAL_RCC_WWDG_CLK_DISABLE
|
2481 | 2542 | #define __WWDG_CLK_ENABLE __HAL_RCC_WWDG_CLK_ENABLE
|
2482 | 2543 | #define __WWDG_CLK_SLEEP_DISABLE __HAL_RCC_WWDG_CLK_SLEEP_DISABLE
|
2483 | 2544 | #define __WWDG_CLK_SLEEP_ENABLE __HAL_RCC_WWDG_CLK_SLEEP_ENABLE
|
2484 | 2545 | #define __WWDG_FORCE_RESET __HAL_RCC_WWDG_FORCE_RESET
|
2485 | 2546 | #define __WWDG_RELEASE_RESET __HAL_RCC_WWDG_RELEASE_RESET
|
| 2547 | + |
2486 | 2548 | #define __TIM21_CLK_ENABLE __HAL_RCC_TIM21_CLK_ENABLE
|
2487 | 2549 | #define __TIM21_CLK_DISABLE __HAL_RCC_TIM21_CLK_DISABLE
|
2488 | 2550 | #define __TIM21_FORCE_RESET __HAL_RCC_TIM21_FORCE_RESET
|
|
2815 | 2877 | #define __WWDG_IS_CLK_ENABLED __HAL_RCC_WWDG_IS_CLK_ENABLED
|
2816 | 2878 | #define __WWDG_IS_CLK_DISABLED __HAL_RCC_WWDG_IS_CLK_DISABLED
|
2817 | 2879 |
|
| 2880 | +#if defined(STM32L1) |
| 2881 | +#define __HAL_RCC_CRYP_CLK_DISABLE __HAL_RCC_AES_CLK_DISABLE |
| 2882 | +#define __HAL_RCC_CRYP_CLK_ENABLE __HAL_RCC_AES_CLK_ENABLE |
| 2883 | +#define __HAL_RCC_CRYP_CLK_SLEEP_DISABLE __HAL_RCC_AES_CLK_SLEEP_DISABLE |
| 2884 | +#define __HAL_RCC_CRYP_CLK_SLEEP_ENABLE __HAL_RCC_AES_CLK_SLEEP_ENABLE |
| 2885 | +#define __HAL_RCC_CRYP_FORCE_RESET __HAL_RCC_AES_FORCE_RESET |
| 2886 | +#define __HAL_RCC_CRYP_RELEASE_RESET __HAL_RCC_AES_RELEASE_RESET |
| 2887 | +#endif /* STM32L1 */ |
| 2888 | + |
2818 | 2889 | #if defined(STM32F4)
|
2819 | 2890 | #define __HAL_RCC_SDMMC1_FORCE_RESET __HAL_RCC_SDIO_FORCE_RESET
|
2820 | 2891 | #define __HAL_RCC_SDMMC1_RELEASE_RESET __HAL_RCC_SDIO_RELEASE_RESET
|
|
2931 | 3002 |
|
2932 | 3003 | #if defined(STM32L4)
|
2933 | 3004 | #define RCC_RTCCLKSOURCE_NO_CLK RCC_RTCCLKSOURCE_NONE
|
2934 |
| -#elif defined(STM32WB) || defined(STM32G0) |
| 3005 | +#elif defined(STM32WB) || defined(STM32G0) || defined(STM32G4) |
2935 | 3006 | #else
|
2936 | 3007 | #define RCC_RTCCLKSOURCE_NONE RCC_RTCCLKSOURCE_NO_CLK
|
2937 | 3008 | #endif
|
|
3059 | 3130 | /** @defgroup HAL_RTC_Aliased_Macros HAL RTC Aliased Macros maintained for legacy purpose
|
3060 | 3131 | * @{
|
3061 | 3132 | */
|
3062 |
| -#if defined (STM32G0) || defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32L4P5xx) || defined STM32L4Q5xx |
| 3133 | +#if defined (STM32G0) || defined (STM32L412xx) || defined (STM32L422xx) || defined (STM32G4) |
3063 | 3134 | #else
|
3064 | 3135 | #define __HAL_RTC_CLEAR_FLAG __HAL_RTC_EXTI_CLEAR_FLAG
|
3065 | 3136 | #endif
|
|
3175 | 3246 | #define SDIO_IRQHandler SDMMC1_IRQHandler
|
3176 | 3247 | #endif
|
3177 | 3248 |
|
3178 |
| -#if defined(STM32F7) || defined(STM32F4) || defined(STM32F2) |
| 3249 | +#if defined(STM32F7) || defined(STM32F4) || defined(STM32F2) || defined(STM32L4) |
3179 | 3250 | #define HAL_SD_CardCIDTypedef HAL_SD_CardCIDTypeDef
|
3180 | 3251 | #define HAL_SD_CardCSDTypedef HAL_SD_CardCSDTypeDef
|
3181 | 3252 | #define HAL_SD_CardStatusTypedef HAL_SD_CardStatusTypeDef
|
|
3422 | 3493 | /** @defgroup HAL_HRTIM_Aliased_Functions HAL HRTIM Aliased Functions maintained for legacy purpose
|
3423 | 3494 | * @{
|
3424 | 3495 | */
|
3425 |
| -#if defined (STM32H7) || defined (STM32F3) |
| 3496 | +#if defined (STM32H7) || defined (STM32G4) || defined (STM32F3) |
3426 | 3497 | #define HAL_HRTIM_WaveformCounterStart_IT HAL_HRTIM_WaveformCountStart_IT
|
3427 | 3498 | #define HAL_HRTIM_WaveformCounterStart_DMA HAL_HRTIM_WaveformCountStart_DMA
|
3428 | 3499 | #define HAL_HRTIM_WaveformCounterStart HAL_HRTIM_WaveformCountStart
|
|
3434 | 3505 | * @}
|
3435 | 3506 | */
|
3436 | 3507 |
|
| 3508 | +/** @defgroup HAL_QSPI_Aliased_Macros HAL QSPI Aliased Macros maintained for legacy purpose |
| 3509 | + * @{ |
| 3510 | + */ |
| 3511 | +#if defined (STM32L4) |
| 3512 | +#define HAL_QPSI_TIMEOUT_DEFAULT_VALUE HAL_QSPI_TIMEOUT_DEFAULT_VALUE |
| 3513 | +#endif |
| 3514 | +/** |
| 3515 | + * @} |
| 3516 | + */ |
| 3517 | + |
3437 | 3518 | /** @defgroup HAL_PPP_Aliased_Macros HAL PPP Aliased Macros maintained for legacy purpose
|
3438 | 3519 | * @{
|
3439 | 3520 | */
|
|
0 commit comments