void
MX_USART1_UART_Init(void)
{
UART1_Handler.Instance = USART1;
UART1_Handler.Init.BaudRate = 115200;
UART1_Handler.Init.WordLength = UART_WORDLENGTH_8B;
UART1_Handler.Init.StopBits = UART_STOPBITS_1;
UART1_Handler.Init.Parity = UART_PARITY_NONE;
UART1_Handler.Init.Mode = UART_MODE_TX_RX;
UART1_Handler.Init.HwFlowCtl = UART_HWCONTROL_NONE;
UART1_Handler.Init.OverSampling = UART_OVERSAMPLING_16;
UART1_Handler.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
// Advanced initialization options for the serial port, the mask is off by default
// UART1_Handler.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT|UART_ADVFEATURE_RXINVERT_INIT
// |UART_ADVFEATURE_DATAINVERT_INIT|UART_ADVFEATURE_SWAP_INIT;
// UART1_Handler.AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE;
// UART1_Handler.AdvancedInit.RxPinLevelInvert = UART_ADVFEATURE_RXINV_ENABLE;
// UART1_Handler.AdvancedInit.DataInvert = UART_ADVFEATURE_DATAINV_DISABLE;
//// UART1_Handler.AdvancedInit.Swap = UART_ADVFEATURE_SWAP_ENABLE;
HAL_UART_Init(&UART1_Handler);
}
void
MX_USART1_UART_Init2(void)
{
UART1_Handler.Instance = USART1;
UART1_Handler.Init.BaudRate = 115200;
UART1_Handler.Init.WordLength = UART_WORDLENGTH_8B;
UART1_Handler.Init.StopBits = UART_STOPBITS_1;
UART1_Handler.Init.Parity = UART_PARITY_NONE;
UART1_Handler.Init.Mode = UART_MODE_TX_RX;
UART1_Handler.Init.HwFlowCtl = UART_HWCONTROL_NONE;
UART1_Handler.Init.OverSampling = UART_OVERSAMPLING_16;
UART1_Handler.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
// Advanced initialization options for the serial port, the mask is off by default
UART1_Handler.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT|UART_ADVFEATURE_RXINVERT_INIT
|UART_ADVFEATURE_DATAINVERT_INIT|UART_ADVFEATURE_SWAP_INIT;
UART1_Handler.AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE;
UART1_Handler.AdvancedInit.RxPinLevelInvert = UART_ADVFEATURE_RXINV_ENABLE;
UART1_Handler.AdvancedInit.DataInvert = UART_ADVFEATURE_DATAINV_DISABLE;
//UART1_Handler.AdvancedInit.Swap = UART_ADVFEATURE_SWAP_ENABLE;
HAL_UART_Init(&UART1_Handler);
}