/*!
 * @file        bsp_usart.h
 *
 * @brief       Header for bsp_usart.c module
 *
 * @version     V1.0.1
 *
 * @date        2023-03-31
 *
 * @attention
 *
 *  Copyright (C) 2023 Geehy Semiconductor
 *
 *  You may not use this file except in compliance with the
 *  GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
 *
 *  The program is only for reference, which is distributed in the hope
 *  that it will be useful and instructional for customers to develop
 *  their software. Unless required by applicable law or agreed to in
 *  writing, the program is distributed on an "AS IS" BASIS, WITHOUT
 *  ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
 *  and limitations under the License.
 */

/* Define to prevent recursive inclusion */
#ifndef __BSP_USART_H
#define __BSP_USART_H

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

/** @addtogroup Examples
  @{
*/

/** @addtogroup BootLoader
  @{
*/

/** @addtogroup BSP_USART
  @{
*/

/** @defgroup BSP_USART_Macros Macros
  @{
*/

#define DEBUG_USART                         USART1
#define DEBUG_USART_CLK                     RCM_PERIPH_USART1
#define DEBUG_USART_BAUDRATE                115200

/**@} end of group BSP_USART_Macros */

/** @defgroup BSP_USART_Functions Functions
  @{
*/

/* function declaration */
void USART_Init(uint32_t baudRate);
void USART_SendByte(USART_T *usart,uint8_t data);
uint8_t USART_ReceiveByte(USART_T *usart);

/**@} end of group BSP_USART_Functions */
/**@} end of group BSP_USART */
/**@} end of group BootLoader */
/**@} end of group Examples */

#endif
