Commit c078fa11 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Updated the implementation of the usart1 module for the L0 family.

parent 0a4a91c0
......@@ -9,6 +9,7 @@
void usart1_init(TComm *comm_dev,UART_InitTypeDef *conf,UART_AdvFeatureInitTypeDef *adv_conf,TUSART_IRQ_Priorities *priorities);
void usart1_config(TComm *comm_dev,UART_InitTypeDef *conf,UART_AdvFeatureInitTypeDef *adv_conf);
void usart1_set_priorities(TComm *comm_dev,TUSART_IRQ_Priorities *priorities);
void usart1_set_baudrate(TComm *comm_dev,unsigned int baudrate);
/* IRQ functions */
unsigned char usart1_send_irq(unsigned char first_byte);
unsigned char usart1_enable_tx_irq(void);
......
......@@ -281,6 +281,12 @@ void usart1_set_priorities(TComm *comm_dev,TUSART_IRQ_Priorities *priorities)
}
}
void usart1_set_baudrate(TComm *comm_dev,unsigned int baudrate)
{
UartHandle.Init.BaudRate = baudrate;
HAL_UART_Init(&UartHandle);
}
/* IRQ functions */
unsigned char usart1_send_irq(unsigned char first_byte)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment