/Projects/STM32F429ZI-Nucleo/Examples_LL/DAC/DAC_GenerateConstantSignal_TriggerSW/Inc/main.h

https://github.com/STMicroelectronics/STM32CubeF4 · C Header · 82 lines · 36 code · 11 blank · 35 comment · 1 complexity · 22339f048840c7b6ff982b46d08abcc4 MD5 · raw file

  1. /**
  2. ******************************************************************************
  3. * @file Examples_LL/DAC/DAC_GenerateConstantSignal_TriggerSW/Inc/main.h
  4. * @author MCD Application Team
  5. * @brief Header for main.c module
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef __MAIN_H
  21. #define __MAIN_H
  22. /* Includes ------------------------------------------------------------------*/
  23. #include "stm32f4xx_ll_bus.h"
  24. #include "stm32f4xx_ll_rcc.h"
  25. #include "stm32f4xx_ll_system.h"
  26. #include "stm32f4xx_ll_utils.h"
  27. #include "stm32f4xx_ll_gpio.h"
  28. #include "stm32f4xx_ll_exti.h"
  29. #include "stm32f4xx_ll_dma.h"
  30. #include "stm32f4xx_ll_tim.h"
  31. #include "stm32f4xx_ll_dac.h"
  32. #include "stm32f4xx_ll_pwr.h"
  33. #if defined(USE_FULL_ASSERT)
  34. #include "stm32_assert.h"
  35. #endif /* USE_FULL_ASSERT */
  36. /* Exported types ------------------------------------------------------------*/
  37. /* Exported constants --------------------------------------------------------*/
  38. /**
  39. * @brief LED1
  40. */
  41. #define LED1_PIN LL_GPIO_PIN_0
  42. #define LED1_GPIO_PORT GPIOB
  43. #define LED1_GPIO_CLK_ENABLE() LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOB)
  44. /**
  45. * @brief Toggle periods for various blinking modes
  46. */
  47. #define LED_BLINK_FAST 200
  48. #define LED_BLINK_SLOW 500
  49. #define LED_BLINK_ERROR 1000
  50. /**
  51. * @brief Key push-button
  52. */
  53. #define USER_BUTTON_PIN LL_GPIO_PIN_13
  54. #define USER_BUTTON_GPIO_PORT GPIOC
  55. #define USER_BUTTON_GPIO_CLK_ENABLE() LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOC)
  56. #define USER_BUTTON_EXTI_LINE LL_EXTI_LINE_13
  57. #define USER_BUTTON_EXTI_IRQn EXTI15_10_IRQn
  58. #define USER_BUTTON_EXTI_LINE_ENABLE() LL_EXTI_EnableIT_0_31(USER_BUTTON_EXTI_LINE)
  59. #define USER_BUTTON_EXTI_FALLING_TRIG_ENABLE() LL_EXTI_EnableFallingTrig_0_31(USER_BUTTON_EXTI_LINE)
  60. #define USER_BUTTON_SYSCFG_SET_EXTI() do { \
  61. LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SYSCFG); \
  62. LL_SYSCFG_SetEXTISource(LL_SYSCFG_EXTI_PORTC, LL_SYSCFG_EXTI_LINE13); \
  63. } while(0)
  64. #define USER_BUTTON_IRQHANDLER EXTI15_10_IRQHandler
  65. /* Exported macro ------------------------------------------------------------*/
  66. /* Exported functions ------------------------------------------------------- */
  67. /* IRQ Handler treatment */
  68. void UserButton_Callback(void);
  69. void DacUnderrunError_Callback(void);
  70. #endif /* __MAIN_H */
  71. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/