main.h 991 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* Define to prevent recursive inclusion -------------------------------------*/
  2. #ifndef __MAIN_H
  3. #define __MAIN_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /* Includes ------------------------------------------------------------------*/
  8. #include "stm32l1xx_hal.h"
  9. #include <stdint.h>
  10. #include <stdbool.h>
  11. #include "core/config.h" // CONFIG_REBOOT_FEATURE
  12. /* Exported functions prototypes ---------------------------------------------*/
  13. void Error_Handler(void);
  14. #ifdef __cplusplus
  15. }
  16. #endif
  17. void HAL_Wait_us( size_t n );
  18. void HAL_Wait_1us( size_t n );
  19. void HAL_Wait_10us( size_t n );
  20. void HAL_Wait_100us( size_t n );
  21. bool SystemClock_HSI( bool state );
  22. #if CONFIG_NOIRQ_SNPRINTF
  23. int _snprintf( char * buffer, size_t szBuffer, const char * format, ... );
  24. #else
  25. #define _snprintf(...) snprintf(__VA_ARGS__)
  26. #endif
  27. #if CONFIG_REBOOT_FEATURE
  28. void RebootRequest();
  29. #endif
  30. #endif /* __MAIN_H */
  31. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/