/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file    usart.h
  * @brief   This file contains all the function prototypes for
  *          the usart.c file
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2023 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USART_H__
#define __USART_H__

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "main.h"

/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

extern UART_HandleTypeDef huart1;

extern UART_HandleTypeDef huart3;

/* USER CODE BEGIN Private defines */
#define USART_REC_LEN               200                                             /* 瀹氫箟锟??澶ф帴锟??200瀛楄妭鏁版嵁 */
#define USART_EN_RX                 1                                               /* 浣胯兘涓插彛鎺ユ敹 */
#define RXBUFFERSIZE                1                                               /* 缂撳瓨澶у皬 */

/* USER CODE END Private defines */

void MX_USART1_UART_Init(void);
void MX_USART3_UART_Init(void);

/* USER CODE BEGIN Prototypes */
extern uint8_t  g_usart_rx_buf[USART_REC_LEN];                                      /* 涓插彛缂撳啿锟?? */
extern uint16_t g_usart_rx_sta;                                                     /* 涓插彛鎺ユ敹鐘讹拷?? */
extern uint8_t g_rx_buffer[RXBUFFERSIZE];                                           /* HAL搴揢SART鎺ユ敹Buffer */



/* USER CODE END Prototypes */

#ifdef __cplusplus
}
#endif

#endif /* __USART_H__ */

