tim.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file tim.h
  5. * @brief This file contains all the function prototypes for
  6. * the tim.c file
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * Copyright (c) 2026 STMicroelectronics.
  11. * All rights reserved.
  12. *
  13. * This software is licensed under terms that can be found in the LICENSE file
  14. * in the root directory of this software component.
  15. * If no LICENSE file comes with this software, it is provided AS-IS.
  16. *
  17. ******************************************************************************
  18. */
  19. /* USER CODE END Header */
  20. /* Define to prevent recursive inclusion -------------------------------------*/
  21. #ifndef __TIM_H__
  22. #define __TIM_H__
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. /* Includes ------------------------------------------------------------------*/
  27. #include "main.h"
  28. /* USER CODE BEGIN Includes */
  29. /* USER CODE END Includes */
  30. extern TIM_HandleTypeDef htim1;
  31. extern TIM_HandleTypeDef htim2;
  32. extern TIM_HandleTypeDef htim3;
  33. extern TIM_HandleTypeDef htim4;
  34. extern TIM_HandleTypeDef htim5;
  35. extern TIM_HandleTypeDef htim12;
  36. /* USER CODE BEGIN Private defines */
  37. /* USER CODE END Private defines */
  38. void MX_TIM1_Init(void);
  39. void MX_TIM2_Init(void);
  40. void MX_TIM3_Init(void);
  41. void MX_TIM4_Init(void);
  42. void MX_TIM5_Init(void);
  43. void MX_TIM12_Init(void);
  44. void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
  45. /* USER CODE BEGIN Prototypes */
  46. extern uint32_t millis(void);
  47. extern void MY_TIM_PWM_INIT(void);
  48. extern void delay_us(uint16_t us);
  49. extern void PUMP1_PWM_CONTROL(short pwm);
  50. extern void PUMP2_PWM_CONTROL(short pwm);
  51. extern void SPRAY1_PWM_CONTROL(short pwm);
  52. extern void SPRAY2_PWM_CONTROL(short pwm);
  53. /* USER CODE END Prototypes */
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57. #endif /* __TIM_H__ */