STM32L443xx HAL User Manual
stm32l4xx_ll_usart.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l4xx_ll_usart.c
00004   * @author  MCD Application Team
00005   * @brief   USART LL module driver.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.
00011   *
00012   * This software is licensed under terms that can be found in the LICENSE file
00013   * in the root directory of this software component.
00014   * If no LICENSE file comes with this software, it is provided AS-IS.
00015   *
00016   ******************************************************************************
00017   */
00018 #if defined(USE_FULL_LL_DRIVER)
00019 
00020 /* Includes ------------------------------------------------------------------*/
00021 #include "stm32l4xx_ll_usart.h"
00022 #include "stm32l4xx_ll_rcc.h"
00023 #include "stm32l4xx_ll_bus.h"
00024 #ifdef USE_FULL_ASSERT
00025 #include "stm32_assert.h"
00026 #else
00027 #define assert_param(expr) ((void)0U)
00028 #endif /* USE_FULL_ASSERT */
00029 
00030 /** @addtogroup STM32L4xx_LL_Driver
00031   * @{
00032   */
00033 
00034 #if defined (USART1) || defined (USART2) || defined (USART3) || defined (UART4) || defined (UART5)
00035 
00036 /** @addtogroup USART_LL
00037   * @{
00038   */
00039 
00040 /* Private types -------------------------------------------------------------*/
00041 /* Private variables ---------------------------------------------------------*/
00042 /* Private constants ---------------------------------------------------------*/
00043 /* Private macros ------------------------------------------------------------*/
00044 /** @addtogroup USART_LL_Private_Macros
00045   * @{
00046   */
00047 
00048 #if defined(USART_PRESC_PRESCALER)
00049 #define IS_LL_USART_PRESCALER(__VALUE__)  (((__VALUE__) == LL_USART_PRESCALER_DIV1) \
00050                                            || ((__VALUE__) == LL_USART_PRESCALER_DIV2) \
00051                                            || ((__VALUE__) == LL_USART_PRESCALER_DIV4) \
00052                                            || ((__VALUE__) == LL_USART_PRESCALER_DIV6) \
00053                                            || ((__VALUE__) == LL_USART_PRESCALER_DIV8) \
00054                                            || ((__VALUE__) == LL_USART_PRESCALER_DIV10) \
00055                                            || ((__VALUE__) == LL_USART_PRESCALER_DIV12) \
00056                                            || ((__VALUE__) == LL_USART_PRESCALER_DIV16) \
00057                                            || ((__VALUE__) == LL_USART_PRESCALER_DIV32) \
00058                                            || ((__VALUE__) == LL_USART_PRESCALER_DIV64) \
00059                                            || ((__VALUE__) == LL_USART_PRESCALER_DIV128) \
00060                                            || ((__VALUE__) == LL_USART_PRESCALER_DIV256))
00061 
00062 #endif /* USART_PRESC_PRESCALER */
00063 /* __BAUDRATE__ The maximum Baud Rate is derived from the maximum clock available
00064  *              divided by the smallest oversampling used on the USART (i.e. 8)    */
00065 #if defined(STM32L4R5xx) || defined(STM32L4R7xx) || defined(STM32L4R9xx) || defined(STM32L4S5xx) || defined(STM32L4S7xx) || defined(STM32L4S9xx)
00066 #define IS_LL_USART_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) <= 15000000U)
00067 #else
00068 #define IS_LL_USART_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) <= 10000000U)
00069 #endif /* STM32L4R5xx || STM32L4R7xx || STM32L4R9xx || STM32L4S5xx || STM32L4S7xx || STM32L4S9xx */
00070 
00071 /* __VALUE__ In case of oversampling by 16 and 8, BRR content must be greater than or equal to 16d. */
00072 #define IS_LL_USART_BRR_MIN(__VALUE__) ((__VALUE__) >= 16U)
00073 
00074 #define IS_LL_USART_DIRECTION(__VALUE__) (((__VALUE__) == LL_USART_DIRECTION_NONE) \
00075                                           || ((__VALUE__) == LL_USART_DIRECTION_RX) \
00076                                           || ((__VALUE__) == LL_USART_DIRECTION_TX) \
00077                                           || ((__VALUE__) == LL_USART_DIRECTION_TX_RX))
00078 
00079 #define IS_LL_USART_PARITY(__VALUE__) (((__VALUE__) == LL_USART_PARITY_NONE) \
00080                                        || ((__VALUE__) == LL_USART_PARITY_EVEN) \
00081                                        || ((__VALUE__) == LL_USART_PARITY_ODD))
00082 
00083 #define IS_LL_USART_DATAWIDTH(__VALUE__) (((__VALUE__) == LL_USART_DATAWIDTH_7B) \
00084                                           || ((__VALUE__) == LL_USART_DATAWIDTH_8B) \
00085                                           || ((__VALUE__) == LL_USART_DATAWIDTH_9B))
00086 
00087 #define IS_LL_USART_OVERSAMPLING(__VALUE__) (((__VALUE__) == LL_USART_OVERSAMPLING_16) \
00088                                              || ((__VALUE__) == LL_USART_OVERSAMPLING_8))
00089 
00090 #define IS_LL_USART_LASTBITCLKOUTPUT(__VALUE__) (((__VALUE__) == LL_USART_LASTCLKPULSE_NO_OUTPUT) \
00091                                                  || ((__VALUE__) == LL_USART_LASTCLKPULSE_OUTPUT))
00092 
00093 #define IS_LL_USART_CLOCKPHASE(__VALUE__) (((__VALUE__) == LL_USART_PHASE_1EDGE) \
00094                                            || ((__VALUE__) == LL_USART_PHASE_2EDGE))
00095 
00096 #define IS_LL_USART_CLOCKPOLARITY(__VALUE__) (((__VALUE__) == LL_USART_POLARITY_LOW) \
00097                                               || ((__VALUE__) == LL_USART_POLARITY_HIGH))
00098 
00099 #define IS_LL_USART_CLOCKOUTPUT(__VALUE__) (((__VALUE__) == LL_USART_CLOCK_DISABLE) \
00100                                             || ((__VALUE__) == LL_USART_CLOCK_ENABLE))
00101 
00102 #define IS_LL_USART_STOPBITS(__VALUE__) (((__VALUE__) == LL_USART_STOPBITS_0_5) \
00103                                          || ((__VALUE__) == LL_USART_STOPBITS_1) \
00104                                          || ((__VALUE__) == LL_USART_STOPBITS_1_5) \
00105                                          || ((__VALUE__) == LL_USART_STOPBITS_2))
00106 
00107 #define IS_LL_USART_HWCONTROL(__VALUE__) (((__VALUE__) == LL_USART_HWCONTROL_NONE) \
00108                                           || ((__VALUE__) == LL_USART_HWCONTROL_RTS) \
00109                                           || ((__VALUE__) == LL_USART_HWCONTROL_CTS) \
00110                                           || ((__VALUE__) == LL_USART_HWCONTROL_RTS_CTS))
00111 
00112 /**
00113   * @}
00114   */
00115 
00116 /* Private function prototypes -----------------------------------------------*/
00117 
00118 /* Exported functions --------------------------------------------------------*/
00119 /** @addtogroup USART_LL_Exported_Functions
00120   * @{
00121   */
00122 
00123 /** @addtogroup USART_LL_EF_Init
00124   * @{
00125   */
00126 
00127 /**
00128   * @brief  De-initialize USART registers (Registers restored to their default values).
00129   * @param  USARTx USART Instance
00130   * @retval An ErrorStatus enumeration value:
00131   *          - SUCCESS: USART registers are de-initialized
00132   *          - ERROR: USART registers are not de-initialized
00133   */
00134 ErrorStatus LL_USART_DeInit(USART_TypeDef *USARTx)
00135 {
00136   ErrorStatus status = SUCCESS;
00137 
00138   /* Check the parameters */
00139   assert_param(IS_UART_INSTANCE(USARTx));
00140 
00141   if (USARTx == USART1)
00142   {
00143     /* Force reset of USART clock */
00144     LL_APB2_GRP1_ForceReset(LL_APB2_GRP1_PERIPH_USART1);
00145 
00146     /* Release reset of USART clock */
00147     LL_APB2_GRP1_ReleaseReset(LL_APB2_GRP1_PERIPH_USART1);
00148   }
00149   else if (USARTx == USART2)
00150   {
00151     /* Force reset of USART clock */
00152     LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_USART2);
00153 
00154     /* Release reset of USART clock */
00155     LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_USART2);
00156   }
00157 #if defined(USART3)
00158   else if (USARTx == USART3)
00159   {
00160     /* Force reset of USART clock */
00161     LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_USART3);
00162 
00163     /* Release reset of USART clock */
00164     LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_USART3);
00165   }
00166 #endif /* USART3 */
00167 #if defined(UART4)
00168   else if (USARTx == UART4)
00169   {
00170     /* Force reset of UART clock */
00171     LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_UART4);
00172 
00173     /* Release reset of UART clock */
00174     LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_UART4);
00175   }
00176 #endif /* UART4 */
00177 #if defined(UART5)
00178   else if (USARTx == UART5)
00179   {
00180     /* Force reset of UART clock */
00181     LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_UART5);
00182 
00183     /* Release reset of UART clock */
00184     LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_UART5);
00185   }
00186 #endif /* UART5 */
00187   else
00188   {
00189     status = ERROR;
00190   }
00191 
00192   return (status);
00193 }
00194 
00195 /**
00196   * @brief  Initialize USART registers according to the specified
00197   *         parameters in USART_InitStruct.
00198   * @note   As some bits in USART configuration registers can only be written when
00199   *         the USART is disabled (USART_CR1_UE bit =0), USART Peripheral should be in disabled state prior calling
00200   *         this function. Otherwise, ERROR result will be returned.
00201   * @note   Baud rate value stored in USART_InitStruct BaudRate field, should be valid (different from 0).
00202   * @param  USARTx USART Instance
00203   * @param  USART_InitStruct pointer to a LL_USART_InitTypeDef structure
00204   *         that contains the configuration information for the specified USART peripheral.
00205   * @retval An ErrorStatus enumeration value:
00206   *          - SUCCESS: USART registers are initialized according to USART_InitStruct content
00207   *          - ERROR: Problem occurred during USART Registers initialization
00208   */
00209 ErrorStatus LL_USART_Init(USART_TypeDef *USARTx, LL_USART_InitTypeDef *USART_InitStruct)
00210 {
00211   ErrorStatus status = ERROR;
00212   uint32_t periphclk = LL_RCC_PERIPH_FREQUENCY_NO;
00213 
00214   /* Check the parameters */
00215   assert_param(IS_UART_INSTANCE(USARTx));
00216 #if defined(USART_PRESC_PRESCALER)
00217   assert_param(IS_LL_USART_PRESCALER(USART_InitStruct->PrescalerValue));
00218 #endif /* USART_PRESC_PRESCALER */
00219   assert_param(IS_LL_USART_BAUDRATE(USART_InitStruct->BaudRate));
00220   assert_param(IS_LL_USART_DATAWIDTH(USART_InitStruct->DataWidth));
00221   assert_param(IS_LL_USART_STOPBITS(USART_InitStruct->StopBits));
00222   assert_param(IS_LL_USART_PARITY(USART_InitStruct->Parity));
00223   assert_param(IS_LL_USART_DIRECTION(USART_InitStruct->TransferDirection));
00224   assert_param(IS_LL_USART_HWCONTROL(USART_InitStruct->HardwareFlowControl));
00225   assert_param(IS_LL_USART_OVERSAMPLING(USART_InitStruct->OverSampling));
00226 
00227   /* USART needs to be in disabled state, in order to be able to configure some bits in
00228      CRx registers */
00229   if (LL_USART_IsEnabled(USARTx) == 0U)
00230   {
00231     /*---------------------------- USART CR1 Configuration ---------------------
00232      * Configure USARTx CR1 (USART Word Length, Parity, Mode and Oversampling bits) with parameters:
00233      * - DataWidth:          USART_CR1_M bits according to USART_InitStruct->DataWidth value
00234      * - Parity:             USART_CR1_PCE, USART_CR1_PS bits according to USART_InitStruct->Parity value
00235      * - TransferDirection:  USART_CR1_TE, USART_CR1_RE bits according to USART_InitStruct->TransferDirection value
00236      * - Oversampling:       USART_CR1_OVER8 bit according to USART_InitStruct->OverSampling value.
00237      */
00238     MODIFY_REG(USARTx->CR1,
00239                (USART_CR1_M | USART_CR1_PCE | USART_CR1_PS |
00240                 USART_CR1_TE | USART_CR1_RE | USART_CR1_OVER8),
00241                (USART_InitStruct->DataWidth | USART_InitStruct->Parity |
00242                 USART_InitStruct->TransferDirection | USART_InitStruct->OverSampling));
00243 
00244     /*---------------------------- USART CR2 Configuration ---------------------
00245      * Configure USARTx CR2 (Stop bits) with parameters:
00246      * - Stop Bits:          USART_CR2_STOP bits according to USART_InitStruct->StopBits value.
00247      * - CLKEN, CPOL, CPHA and LBCL bits are to be configured using LL_USART_ClockInit().
00248      */
00249     LL_USART_SetStopBitsLength(USARTx, USART_InitStruct->StopBits);
00250 
00251     /*---------------------------- USART CR3 Configuration ---------------------
00252      * Configure USARTx CR3 (Hardware Flow Control) with parameters:
00253      * - HardwareFlowControl: USART_CR3_RTSE, USART_CR3_CTSE bits according to
00254      *   USART_InitStruct->HardwareFlowControl value.
00255      */
00256     LL_USART_SetHWFlowCtrl(USARTx, USART_InitStruct->HardwareFlowControl);
00257 
00258     /*---------------------------- USART BRR Configuration ---------------------
00259      * Retrieve Clock frequency used for USART Peripheral
00260      */
00261     if (USARTx == USART1)
00262     {
00263       periphclk = LL_RCC_GetUSARTClockFreq(LL_RCC_USART1_CLKSOURCE);
00264     }
00265     else if (USARTx == USART2)
00266     {
00267       periphclk = LL_RCC_GetUSARTClockFreq(LL_RCC_USART2_CLKSOURCE);
00268     }
00269 #if defined(USART3)
00270     else if (USARTx == USART3)
00271     {
00272       periphclk = LL_RCC_GetUSARTClockFreq(LL_RCC_USART3_CLKSOURCE);
00273     }
00274 #endif /* USART3 */
00275 #if defined(UART4)
00276     else if (USARTx == UART4)
00277     {
00278       periphclk = LL_RCC_GetUARTClockFreq(LL_RCC_UART4_CLKSOURCE);
00279     }
00280 #endif /* UART4 */
00281 #if defined(UART5)
00282     else if (USARTx == UART5)
00283     {
00284       periphclk = LL_RCC_GetUARTClockFreq(LL_RCC_UART5_CLKSOURCE);
00285     }
00286 #endif /* UART5 */
00287     else
00288     {
00289       /* Nothing to do, as error code is already assigned to ERROR value */
00290     }
00291 
00292     /* Configure the USART Baud Rate :
00293 #if defined(USART_PRESC_PRESCALER)
00294        - prescaler value is required
00295 #endif
00296        - valid baud rate value (different from 0) is required
00297        - Peripheral clock as returned by RCC service, should be valid (different from 0).
00298     */
00299     if ((periphclk != LL_RCC_PERIPH_FREQUENCY_NO)
00300         && (USART_InitStruct->BaudRate != 0U))
00301     {
00302       status = SUCCESS;
00303       LL_USART_SetBaudRate(USARTx,
00304                            periphclk,
00305 #if defined(USART_PRESC_PRESCALER)
00306                            USART_InitStruct->PrescalerValue,
00307 #endif /* USART_PRESC_PRESCALER */
00308                            USART_InitStruct->OverSampling,
00309                            USART_InitStruct->BaudRate);
00310 
00311       /* Check BRR is greater than or equal to 16d */
00312       assert_param(IS_LL_USART_BRR_MIN(USARTx->BRR));
00313     }
00314 #if defined(USART_PRESC_PRESCALER)
00315 
00316     /*---------------------------- USART PRESC Configuration -----------------------
00317      * Configure USARTx PRESC (Prescaler) with parameters:
00318      * - PrescalerValue: USART_PRESC_PRESCALER bits according to USART_InitStruct->PrescalerValue value.
00319      */
00320     LL_USART_SetPrescaler(USARTx, USART_InitStruct->PrescalerValue);
00321 #endif /* USART_PRESC_PRESCALER */
00322   }
00323   /* Endif (=> USART not in Disabled state => return ERROR) */
00324 
00325   return (status);
00326 }
00327 
00328 /**
00329   * @brief Set each @ref LL_USART_InitTypeDef field to default value.
00330   * @param USART_InitStruct pointer to a @ref LL_USART_InitTypeDef structure
00331   *                         whose fields will be set to default values.
00332   * @retval None
00333   */
00334 
00335 void LL_USART_StructInit(LL_USART_InitTypeDef *USART_InitStruct)
00336 {
00337   /* Set USART_InitStruct fields to default values */
00338 #if defined(USART_PRESC_PRESCALER)
00339   USART_InitStruct->PrescalerValue      = LL_USART_PRESCALER_DIV1;
00340 #endif /* USART_PRESC_PRESCALER */
00341   USART_InitStruct->BaudRate            = 9600U;
00342   USART_InitStruct->DataWidth           = LL_USART_DATAWIDTH_8B;
00343   USART_InitStruct->StopBits            = LL_USART_STOPBITS_1;
00344   USART_InitStruct->Parity              = LL_USART_PARITY_NONE ;
00345   USART_InitStruct->TransferDirection   = LL_USART_DIRECTION_TX_RX;
00346   USART_InitStruct->HardwareFlowControl = LL_USART_HWCONTROL_NONE;
00347   USART_InitStruct->OverSampling        = LL_USART_OVERSAMPLING_16;
00348 }
00349 
00350 /**
00351   * @brief  Initialize USART Clock related settings according to the
00352   *         specified parameters in the USART_ClockInitStruct.
00353   * @note   As some bits in USART configuration registers can only be written when
00354   *         the USART is disabled (USART_CR1_UE bit =0), USART Peripheral should be in disabled state prior calling
00355   *         this function. Otherwise, ERROR result will be returned.
00356   * @param  USARTx USART Instance
00357   * @param  USART_ClockInitStruct pointer to a @ref LL_USART_ClockInitTypeDef structure
00358   *         that contains the Clock configuration information for the specified USART peripheral.
00359   * @retval An ErrorStatus enumeration value:
00360   *          - SUCCESS: USART registers related to Clock settings are initialized according
00361   *                     to USART_ClockInitStruct content
00362   *          - ERROR: Problem occurred during USART Registers initialization
00363   */
00364 ErrorStatus LL_USART_ClockInit(USART_TypeDef *USARTx, LL_USART_ClockInitTypeDef *USART_ClockInitStruct)
00365 {
00366   ErrorStatus status = SUCCESS;
00367 
00368   /* Check USART Instance and Clock signal output parameters */
00369   assert_param(IS_UART_INSTANCE(USARTx));
00370   assert_param(IS_LL_USART_CLOCKOUTPUT(USART_ClockInitStruct->ClockOutput));
00371 
00372   /* USART needs to be in disabled state, in order to be able to configure some bits in
00373      CRx registers */
00374   if (LL_USART_IsEnabled(USARTx) == 0U)
00375   {
00376 #if  defined(USART_CR2_SLVEN)
00377     /* Ensure USART instance is USART capable */
00378     assert_param(IS_USART_INSTANCE(USARTx));
00379 
00380     /* Check clock related parameters */
00381     assert_param(IS_LL_USART_CLOCKPOLARITY(USART_ClockInitStruct->ClockPolarity));
00382     assert_param(IS_LL_USART_CLOCKPHASE(USART_ClockInitStruct->ClockPhase));
00383     assert_param(IS_LL_USART_LASTBITCLKOUTPUT(USART_ClockInitStruct->LastBitClockPulse));
00384 
00385     /*---------------------------- USART CR2 Configuration -----------------------
00386      * Configure USARTx CR2 (Clock signal related bits) with parameters:
00387      * - Clock Output:                USART_CR2_CLKEN bit according to USART_ClockInitStruct->ClockOutput value
00388      * - Clock Polarity:              USART_CR2_CPOL bit according to USART_ClockInitStruct->ClockPolarity value
00389      * - Clock Phase:                 USART_CR2_CPHA bit according to USART_ClockInitStruct->ClockPhase value
00390      * - Last Bit Clock Pulse Output: USART_CR2_LBCL bit according to USART_ClockInitStruct->LastBitClockPulse value.
00391      */
00392     MODIFY_REG(USARTx->CR2,
00393                USART_CR2_CLKEN | USART_CR2_CPHA | USART_CR2_CPOL | USART_CR2_LBCL,
00394                USART_ClockInitStruct->ClockOutput | USART_ClockInitStruct->ClockPolarity |
00395                USART_ClockInitStruct->ClockPhase | USART_ClockInitStruct->LastBitClockPulse);
00396 #else
00397     /* If USART Clock signal is disabled */
00398     if (USART_ClockInitStruct->ClockOutput == LL_USART_CLOCK_DISABLE)
00399     {
00400       /* Deactivate Clock signal delivery :
00401        * - Disable Clock Output:        USART_CR2_CLKEN cleared
00402        */
00403       LL_USART_DisableSCLKOutput(USARTx);
00404     }
00405     else
00406     {
00407       /* Ensure USART instance is USART capable */
00408       assert_param(IS_USART_INSTANCE(USARTx));
00409 
00410       /* Check clock related parameters */
00411       assert_param(IS_LL_USART_CLOCKPOLARITY(USART_ClockInitStruct->ClockPolarity));
00412       assert_param(IS_LL_USART_CLOCKPHASE(USART_ClockInitStruct->ClockPhase));
00413       assert_param(IS_LL_USART_LASTBITCLKOUTPUT(USART_ClockInitStruct->LastBitClockPulse));
00414 
00415       /*---------------------------- USART CR2 Configuration -----------------------
00416        * Configure USARTx CR2 (Clock signal related bits) with parameters:
00417        * - Enable Clock Output:         USART_CR2_CLKEN set
00418        * - Clock Polarity:              USART_CR2_CPOL bit according to USART_ClockInitStruct->ClockPolarity value
00419        * - Clock Phase:                 USART_CR2_CPHA bit according to USART_ClockInitStruct->ClockPhase value
00420        * - Last Bit Clock Pulse Output: USART_CR2_LBCL bit according to USART_ClockInitStruct->LastBitClockPulse value.
00421        */
00422       MODIFY_REG(USARTx->CR2,
00423                  USART_CR2_CLKEN | USART_CR2_CPHA | USART_CR2_CPOL | USART_CR2_LBCL,
00424                  USART_CR2_CLKEN | USART_ClockInitStruct->ClockPolarity |
00425                  USART_ClockInitStruct->ClockPhase | USART_ClockInitStruct->LastBitClockPulse);
00426     }
00427 #endif /* USART_CR2_SLVEN */
00428   }
00429   /* Else (USART not in Disabled state => return ERROR */
00430   else
00431   {
00432     status = ERROR;
00433   }
00434 
00435   return (status);
00436 }
00437 
00438 /**
00439   * @brief Set each field of a @ref LL_USART_ClockInitTypeDef type structure to default value.
00440   * @param USART_ClockInitStruct pointer to a @ref LL_USART_ClockInitTypeDef structure
00441   *                              whose fields will be set to default values.
00442   * @retval None
00443   */
00444 void LL_USART_ClockStructInit(LL_USART_ClockInitTypeDef *USART_ClockInitStruct)
00445 {
00446   /* Set LL_USART_ClockInitStruct fields with default values */
00447   USART_ClockInitStruct->ClockOutput       = LL_USART_CLOCK_DISABLE;
00448   USART_ClockInitStruct->ClockPolarity     = LL_USART_POLARITY_LOW;            /* Not relevant when ClockOutput =
00449                                                                                   LL_USART_CLOCK_DISABLE */
00450   USART_ClockInitStruct->ClockPhase        = LL_USART_PHASE_1EDGE;             /* Not relevant when ClockOutput =
00451                                                                                   LL_USART_CLOCK_DISABLE */
00452   USART_ClockInitStruct->LastBitClockPulse = LL_USART_LASTCLKPULSE_NO_OUTPUT;  /* Not relevant when ClockOutput =
00453                                                                                   LL_USART_CLOCK_DISABLE */
00454 }
00455 
00456 /**
00457   * @}
00458   */
00459 
00460 /**
00461   * @}
00462   */
00463 
00464 /**
00465   * @}
00466   */
00467 
00468 #endif /* USART1 || USART2 || USART3 || UART4 || UART5 */
00469 
00470 /**
00471   * @}
00472   */
00473 
00474 #endif /* USE_FULL_LL_DRIVER */
00475 
00476