main.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /**
  2. ******************************************************************************
  3. * @file Project/STM32F4xx_StdPeriph_Templates/main.h
  4. * @author MCD Application Team
  5. * @version V1.8.0
  6. * @date 04-November-2016
  7. * @brief Header for main.c module
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; COPYRIGHT 2016 STMicroelectronics</center></h2>
  12. *
  13. * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  14. * You may not use this file except in compliance with the License.
  15. * You may obtain a copy of the License at:
  16. *
  17. * http://www.st.com/software_license_agreement_liberty_v2
  18. *
  19. * Unless required by applicable law or agreed to in writing, software
  20. * distributed under the License is distributed on an "AS IS" BASIS,
  21. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22. * See the License for the specific language governing permissions and
  23. * limitations under the License.
  24. *
  25. ******************************************************************************
  26. */
  27. /* Define to prevent recursive inclusion -------------------------------------*/
  28. #ifndef __MAIN_H
  29. #define __MAIN_H
  30. /* Includes ------------------------------------------------------------------*/
  31. #include "stm32f4xx.h"
  32. #include <math.h>
  33. #include "foc_define_parameter.h"
  34. #include "arm_math.h"
  35. #include "board_config.h"
  36. #include "exti.h"
  37. #include "foc_algorithm.h"
  38. #include "adc.h"
  39. #include "hall_sensor.h"
  40. //#include "communication.h"
  41. #include "low_task.h"
  42. #include "speed_pid.h"
  43. #include "uart_communication.h"
  44. #include "openloop.h"
  45. /* Exported types ------------------------------------------------------------*/
  46. /**
  47. * @brief 布尔类型定义
  48. */
  49. typedef enum
  50. {
  51. FALSE = 0, TRUE = !FALSE
  52. }
  53. bool;
  54. /* Exported constants --------------------------------------------------------*/
  55. /* Exported macro ------------------------------------------------------------*/
  56. /* Exported functions ------------------------------------------------------- */
  57. /**
  58. * @brief 延时计数器递减函数
  59. * @param 无
  60. * @retval 无
  61. * @note 在SysTick中断中调用
  62. */
  63. void TimingDelay_Decrement(void);
  64. /**
  65. * @brief 延时函数
  66. * @param nTime: 延时时间(毫秒)
  67. * @retval 无
  68. */
  69. extern void Delay(__IO uint32_t nTime);
  70. #endif /* __MAIN_H */
  71. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/