123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- #include "main.h"
- #ifndef HSEM_ID_0
- #define HSEM_ID_0 (0U)
- #endif
- static void MX_GPIO_Init(void);
- int main(void)
- {
-
-
-
- __HAL_RCC_HSEM_CLK_ENABLE();
- while((__HAL_HSEM_GET_FLAG(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0))) == 0);
- __HAL_HSEM_CLEAR_FLAG(__HAL_HSEM_SEMID_TO_MASK(HSEM_ID_0));
-
-
- HAL_Init();
-
-
-
-
-
- MX_GPIO_Init();
-
-
-
-
- while (1)
- {
-
-
- }
-
- }
- static void MX_GPIO_Init(void)
- {
- GPIO_InitTypeDef GPIO_InitStruct = {0};
-
- __HAL_RCC_GPIOE_CLK_ENABLE();
-
- GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_4;
- GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
- GPIO_InitStruct.Alternate = GPIO_AF10_SAI4;
- HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
- }
- void Error_Handler(void)
- {
-
-
- __disable_irq();
- while (1)
- {
- }
-
- }
- #ifdef USE_FULL_ASSERT
- void assert_failed(uint8_t *file, uint32_t line)
- {
-
-
-
- }
- #endif
|