usart.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**
  2. ******************************************************************************
  3. * @file usart.h
  4. * @brief This file contains all the function prototypes for
  5. * the usart.c file
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
  10. * All rights reserved.</center></h2>
  11. *
  12. * This software component is licensed by ST under BSD 3-Clause license,
  13. * the "License"; You may not use this file except in compliance with the
  14. * License. You may obtain a copy of the License at:
  15. * opensource.org/licenses/BSD-3-Clause
  16. *
  17. ******************************************************************************
  18. */
  19. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef __USART_H__
  21. #define __USART_H__
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "main.h"
  27. /* USER CODE BEGIN Includes */
  28. /* USER CODE END Includes */
  29. extern UART_HandleTypeDef huart4;
  30. extern UART_HandleTypeDef huart5;
  31. extern UART_HandleTypeDef huart1;
  32. extern UART_HandleTypeDef huart2;
  33. extern UART_HandleTypeDef huart3;
  34. /* USER CODE BEGIN Private defines */
  35. #define BUFFER_SIZE 100
  36. extern uint8_t rx_buffer1[BUFFER_SIZE];
  37. extern uint8_t rx_buffer2[BUFFER_SIZE];
  38. extern uint8_t rx_buffer3[BUFFER_SIZE];
  39. extern uint8_t rx_buffer4[BUFFER_SIZE];
  40. extern volatile uint8_t rx_len;
  41. /* USER CODE END Private defines */
  42. void MX_UART4_Init(void);
  43. void MX_UART5_Init(void);
  44. void MX_USART1_UART_Init(void);
  45. void MX_USART2_UART_Init(void);
  46. void MX_USART3_UART_Init(void);
  47. /* USER CODE BEGIN Prototypes */
  48. /* USER CODE END Prototypes */
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52. #endif /* __USART_H__ */
  53. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/