drivers: serial: stm32: store USART instance

Instead of using "generic" uart_device_config fields, store the right
pointer to avoid unnecessary casts. This change makes code simpler and
more idiomatic.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-01-25 16:14:12 +01:00 committed by Anas Nashif
commit 32a3a028f2
2 changed files with 137 additions and 140 deletions

View file

@ -14,8 +14,12 @@
#include <drivers/pinctrl.h>
#include <stm32_ll_usart.h>
/* device config */
struct uart_stm32_config {
/* USART instance */
USART_TypeDef *usart;
struct uart_device_config uconf;
/* clock subsystem driving this peripheral */
struct stm32_pclken pclken;