1 /** 2 ****************************************************************************** 3 * @file stm32f0xx_hal_usart_ex.c 4 * @author MCD Application Team 5 * @brief Extended USART HAL module driver. 6 * This file provides firmware functions to manage the following extended 7 * functionalities of the Universal Synchronous Receiver Transmitter Peripheral (USART). 8 * + Peripheral Control functions 9 * 10 * 11 ****************************************************************************** 12 * @attention 13 * 14 * Copyright (c) 2016 STMicroelectronics. 15 * All rights reserved. 16 * 17 * This software is licensed under terms that can be found in the LICENSE file 18 * in the root directory of this software component. 19 * If no LICENSE file comes with this software, it is provided AS-IS. 20 * 21 ****************************************************************************** 22 @verbatim 23 ============================================================================== 24 ##### USART peripheral extended features ##### 25 ============================================================================== 26 27 (#) FIFO mode enabling/disabling and RX/TX FIFO threshold programming. 28 29 -@- When USART operates in FIFO mode, FIFO mode must be enabled prior 30 starting RX/TX transfers. Also RX/TX FIFO thresholds must be 31 configured prior starting RX/TX transfers. 32 33 (#) Slave mode enabling/disabling and NSS pin configuration. 34 35 -@- When USART operates in Slave mode, Slave mode must be enabled prior 36 starting RX/TX transfers. 37 38 @endverbatim 39 ****************************************************************************** 40 */ 41 42 /* Includes ------------------------------------------------------------------*/ 43 #include "stm32f0xx_hal.h" 44 45 /** @addtogroup STM32F0xx_HAL_Driver 46 * @{ 47 */ 48 49 /** @defgroup USARTEx USARTEx 50 * @brief USART Extended HAL module driver 51 * @{ 52 */ 53 54 #ifdef HAL_USART_MODULE_ENABLED 55 56 /* Private typedef -----------------------------------------------------------*/ 57 /* Private define ------------------------------------------------------------*/ 58 /* Private macros ------------------------------------------------------------*/ 59 /* Private variables ---------------------------------------------------------*/ 60 /* Private function prototypes -----------------------------------------------*/ 61 62 /* Exported functions --------------------------------------------------------*/ 63 64 /** @defgroup USARTEx_Exported_Functions USARTEx Exported Functions 65 * @{ 66 */ 67 68 /** @defgroup USARTEx_Exported_Functions_Group1 IO operation functions 69 * @brief Extended USART Transmit/Receive functions 70 * 71 @verbatim 72 =============================================================================== 73 ##### IO operation functions ##### 74 =============================================================================== 75 This subsection provides a set of FIFO mode related callback functions. 76 77 (#) TX/RX Fifos Callbacks: 78 (+) HAL_USARTEx_RxFifoFullCallback() 79 (+) HAL_USARTEx_TxFifoEmptyCallback() 80 81 @endverbatim 82 * @{ 83 */ 84 85 86 /** 87 * @} 88 */ 89 90 /** @defgroup USARTEx_Exported_Functions_Group2 Peripheral Control functions 91 * @brief Extended Peripheral Control functions 92 * 93 @verbatim 94 =============================================================================== 95 ##### Peripheral Control functions ##### 96 =============================================================================== 97 [..] This section provides the following functions: 98 (+) HAL_USARTEx_EnableSPISlaveMode() API enables the SPI slave mode 99 (+) HAL_USARTEx_DisableSPISlaveMode() API disables the SPI slave mode 100 (+) HAL_USARTEx_ConfigNSS API configures the Slave Select input pin (NSS) 101 (+) HAL_USARTEx_EnableFifoMode() API enables the FIFO mode 102 (+) HAL_USARTEx_DisableFifoMode() API disables the FIFO mode 103 (+) HAL_USARTEx_SetTxFifoThreshold() API sets the TX FIFO threshold 104 (+) HAL_USARTEx_SetRxFifoThreshold() API sets the RX FIFO threshold 105 106 107 @endverbatim 108 * @{ 109 */ 110 111 112 /** 113 * @} 114 */ 115 116 /** 117 * @} 118 */ 119 120 /** @addtogroup USARTEx_Private_Functions 121 * @{ 122 */ 123 124 /** 125 * @} 126 */ 127 128 #endif /* HAL_USART_MODULE_ENABLED */ 129 130 /** 131 * @} 132 */ 133 134 /** 135 * @} 136 */ 137 138