Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
void usart1_init(TComm *comm_dev,UART_InitTypeDef *conf,UART_AdvFeatureInitTypeDef *adv_conf,TUSART_IRQ_Priorities *priorities); 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_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_priorities(TComm *comm_dev,TUSART_IRQ_Priorities *priorities);
void usart1_set_baudrate(TComm *comm_dev,unsigned int baudrate);
/* IRQ functions */ /* IRQ functions */
unsigned char usart1_send_irq(unsigned char first_byte); unsigned char usart1_send_irq(unsigned char first_byte);
unsigned char usart1_enable_tx_irq(void); unsigned char usart1_enable_tx_irq(void);
......
...@@ -281,6 +281,12 @@ void usart1_set_priorities(TComm *comm_dev,TUSART_IRQ_Priorities *priorities) ...@@ -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 */ /* IRQ functions */
unsigned char usart1_send_irq(unsigned char first_byte) unsigned char usart1_send_irq(unsigned char first_byte)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment