drivers: uart_xmc4xxx: Use consistent struct name
Use consistent struct names for data and config. Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
This commit is contained in:
parent
9e18d19269
commit
9b7e5b3696
|
@ -11,7 +11,7 @@
|
|||
#include <zephyr/drivers/pinctrl.h>
|
||||
#include <zephyr/drivers/uart.h>
|
||||
|
||||
struct uart_xmc4xx_config {
|
||||
struct uart_xmc4xxx_config {
|
||||
XMC_USIC_CH_t *uart;
|
||||
const struct pinctrl_dev_config *pcfg;
|
||||
uint8_t input_src;
|
||||
|
@ -23,7 +23,7 @@ struct uart_xmc4xxx_data {
|
|||
|
||||
static int uart_xmc4xxx_poll_in(const struct device *dev, unsigned char *c)
|
||||
{
|
||||
const struct uart_xmc4xx_config *config = dev->config;
|
||||
const struct uart_xmc4xxx_config *config = dev->config;
|
||||
|
||||
if (!XMC_USIC_CH_GetReceiveBufferStatus(config->uart)) {
|
||||
return -1;
|
||||
|
@ -36,7 +36,7 @@ static int uart_xmc4xxx_poll_in(const struct device *dev, unsigned char *c)
|
|||
|
||||
static void uart_xmc4xxx_poll_out(const struct device *dev, unsigned char c)
|
||||
{
|
||||
const struct uart_xmc4xx_config *config = dev->config;
|
||||
const struct uart_xmc4xxx_config *config = dev->config;
|
||||
|
||||
XMC_UART_CH_Transmit(config->uart, c);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ static void uart_xmc4xxx_poll_out(const struct device *dev, unsigned char c)
|
|||
static int uart_xmc4xxx_init(const struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
const struct uart_xmc4xx_config *config = dev->config;
|
||||
const struct uart_xmc4xxx_config *config = dev->config;
|
||||
struct uart_xmc4xxx_data *data = dev->data;
|
||||
|
||||
data->config.data_bits = 8U;
|
||||
|
@ -81,7 +81,7 @@ static struct uart_xmc4xxx_data xmc4xxx_data_##index = { \
|
|||
.config.baudrate = DT_INST_PROP(index, current_speed) \
|
||||
}; \
|
||||
\
|
||||
static const struct uart_xmc4xx_config xmc4xxx_config_##index = { \
|
||||
static const struct uart_xmc4xxx_config xmc4xxx_config_##index = { \
|
||||
.uart = (XMC_USIC_CH_t *)DT_INST_REG_ADDR(index), \
|
||||
.pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(index), \
|
||||
.input_src = DT_INST_ENUM_IDX(index, input_src), \
|
||||
|
|
Loading…
Reference in a new issue