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:
parent
34339e2560
commit
32a3a028f2
2 changed files with 137 additions and 140 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue