main.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file : main.h
  5. * @brief : Header for main.c file.
  6. * This file contains the common defines of the application.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * Copyright (c) 2025 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 __MAIN_H
  22. #define __MAIN_H
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. /* Includes ------------------------------------------------------------------*/
  27. #include "stm32f1xx_hal.h"
  28. /* Private includes ----------------------------------------------------------*/
  29. /* USER CODE BEGIN Includes */
  30. /* USER CODE END Includes */
  31. /* Exported types ------------------------------------------------------------*/
  32. /* USER CODE BEGIN ET */
  33. /* USER CODE END ET */
  34. /* Exported constants --------------------------------------------------------*/
  35. /* USER CODE BEGIN EC */
  36. /* USER CODE END EC */
  37. /* Exported macro ------------------------------------------------------------*/
  38. /* USER CODE BEGIN EM */
  39. /* USER CODE END EM */
  40. /* Exported functions prototypes ---------------------------------------------*/
  41. void Error_Handler(void);
  42. /* USER CODE BEGIN EFP */
  43. /* USER CODE END EFP */
  44. /* Private defines -----------------------------------------------------------*/
  45. /* USER CODE BEGIN Private defines */
  46. extern uint8_t rx_buf[100];
  47. extern uint8_t rx_buf_uart2[100];
  48. extern uint8_t loraSendNextDataFlag;
  49. // extern uint8_t loraDataErrorCount;
  50. extern uint8_t totalData[120][50];
  51. extern uint8_t workMode; // 0: 接收蓝牙数据 1: 使用lora发生数据。
  52. extern uint8_t receiveBlDataCount;
  53. extern UART_HandleTypeDef huart1;
  54. extern UART_HandleTypeDef huart2;
  55. extern UART_HandleTypeDef huart3;
  56. extern DMA_HandleTypeDef hdma_usart2_rx;
  57. /* USER CODE END Private defines */
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif /* __MAIN_H */