stm32f3_hal.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef STM32F3_HAL_H
  2. #define STM32F3_HAL_H
  3. #include <stdint.h>
  4. //You probably don't need this from rest of code
  5. //#include "stm32f4_hal_lowlevel.h"
  6. #ifdef USE_FULL_ASSERT
  7. /**
  8. * @brief The assert_param macro is used for function's parameters check.
  9. * @param expr: If expr is false, it calls assert_failed function
  10. * which reports the name of the source file and the source
  11. * line number of the call that failed.
  12. * If expr is true, it returns no value.
  13. * @retval None
  14. */
  15. #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
  16. /* Exported functions ------------------------------------------------------- */
  17. void assert_failed(uint8_t* file, uint32_t line);
  18. #else
  19. //#define assert_param(expr) ((void)0)
  20. #endif /* USE_FULL_ASSERT */
  21. void init_uart(void);
  22. void putch(char c);
  23. char getch(void);
  24. void trigger_setup(void);
  25. void trigger_low(void);
  26. void trigger_high(void);
  27. #if (PLATFORM==CWLITEARM)
  28. void change_err_led(int x);
  29. void change_ok_led(int x);
  30. #define led_error(X) (change_err_led(X))
  31. #define led_ok(X) (change_ok_led(X))
  32. #endif
  33. #endif // STM32F3_HAL_H