format code (#5699)
This commit is contained in:
parent
19f0f9e610
commit
ba6f78bd8e
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4)
|
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4)
|
||||||
#error "Please define at least one BSP_USING_I2Cx"
|
#error "Please define at least one BSP_USING_I2Cx"
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct at32_soft_i2c_config soft_i2c_config[] =
|
static const struct at32_soft_i2c_config soft_i2c_config[] =
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#if !defined(BSP_USING_UART1) && !defined(BSP_USING_UART2) && \
|
#if !defined(BSP_USING_UART1) && !defined(BSP_USING_UART2) && \
|
||||||
!defined(BSP_USING_UART3)
|
!defined(BSP_USING_UART3)
|
||||||
#error "Please define at least one BSP_USING_UARTx"
|
#error "Please define at least one BSP_USING_UARTx"
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct at32_usart {
|
struct at32_usart {
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4)
|
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4)
|
||||||
#error "Please define at least one BSP_USING_I2Cx"
|
#error "Please define at least one BSP_USING_I2Cx"
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct ab32_soft_i2c_config soft_i2c_config[] =
|
static const struct ab32_soft_i2c_config soft_i2c_config[] =
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
#if !defined(BSP_USING_I2C0) && !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3)
|
#if !defined(BSP_USING_I2C0) && !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3)
|
||||||
#error "Please define at least one BSP_USING_I2Cx"
|
#error "Please define at least one BSP_USING_I2Cx"
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct gd32_soft_i2c_config soft_i2c_config[] =
|
static const struct gd32_soft_i2c_config soft_i2c_config[] =
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#if !defined(BSP_USING_UART0) && !defined(BSP_USING_UART1) && !defined(BSP_USING_UART2) \
|
#if !defined(BSP_USING_UART0) && !defined(BSP_USING_UART1) && !defined(BSP_USING_UART2) \
|
||||||
&& !defined(BSP_USING_UART3) && !defined(BSP_USING_UART4) && !defined(BSP_USING_UART5)
|
&& !defined(BSP_USING_UART3) && !defined(BSP_USING_UART4) && !defined(BSP_USING_UART5)
|
||||||
#error "Please define at least one BSP_USING_UARTx"
|
#error "Please define at least one BSP_USING_UARTx"
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct gd32_usart {
|
struct gd32_usart {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4)
|
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4)
|
||||||
#error "Please define at least one BSP_USING_I2Cx"
|
#error "Please define at least one BSP_USING_I2Cx"
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct hk32_soft_i2c_config soft_i2c_config[] =
|
static const struct hk32_soft_i2c_config soft_i2c_config[] =
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#ifdef RT_USING_SERIAL
|
#ifdef RT_USING_SERIAL
|
||||||
#if !defined(BSP_USING_UART1) && !defined(BSP_USING_UART2)
|
#if !defined(BSP_USING_UART1) && !defined(BSP_USING_UART2)
|
||||||
#error "Please define at least one BSP_USING_UARTx"
|
#error "Please define at least one BSP_USING_UARTx"
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct hk32_usart
|
struct hk32_usart
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4)
|
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4)
|
||||||
#error "Please define at least one BSP_USING_I2Cx"
|
#error "Please define at least one BSP_USING_I2Cx"
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct n32_soft_i2c_config soft_i2c_config[] =
|
static const struct n32_soft_i2c_config soft_i2c_config[] =
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#if !defined(BSP_USING_I2C0) && !defined(BSP_USING_I2C1)
|
#if !defined(BSP_USING_I2C0) && !defined(BSP_USING_I2C1)
|
||||||
#error "Please define at least one BSP_USING_I2Cx"
|
#error "Please define at least one BSP_USING_I2Cx"
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct ra_soft_i2c_config soft_i2c_config[] =
|
static const struct ra_soft_i2c_config soft_i2c_config[] =
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#if !defined(BSP_USING_PULSE_ENCODER1) && !defined(BSP_USING_PULSE_ENCODER2) && !defined(BSP_USING_PULSE_ENCODER3) \
|
#if !defined(BSP_USING_PULSE_ENCODER1) && !defined(BSP_USING_PULSE_ENCODER2) && !defined(BSP_USING_PULSE_ENCODER3) \
|
||||||
&& !defined(BSP_USING_PULSE_ENCODER4) && !defined(BSP_USING_PULSE_ENCODER5) && !defined(BSP_USING_PULSE_ENCODER6)
|
&& !defined(BSP_USING_PULSE_ENCODER4) && !defined(BSP_USING_PULSE_ENCODER5) && !defined(BSP_USING_PULSE_ENCODER6)
|
||||||
#error "Please define at least one BSP_USING_PULSE_ENCODERx"
|
#error "Please define at least one BSP_USING_PULSE_ENCODERx"
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define AUTO_RELOAD_VALUE 0x7FFF
|
#define AUTO_RELOAD_VALUE 0x7FFF
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4)
|
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4)
|
||||||
#error "Please define at least one BSP_USING_I2Cx"
|
#error "Please define at least one BSP_USING_I2Cx"
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const struct stm32_soft_i2c_config soft_i2c_config[] =
|
static const struct stm32_soft_i2c_config soft_i2c_config[] =
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#define TOUCH_SLAVE_ADDR 0x38U
|
#define TOUCH_SLAVE_ADDR 0x38U
|
||||||
#else
|
#else
|
||||||
#error "Please define at least one TOUCH DEVICE"
|
#error "Please define at least one TOUCH DEVICE"
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct rt_i2c_bus_device *ft_i2c_bus;
|
static struct rt_i2c_bus_device *ft_i2c_bus;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifdef RT_USING_SPI
|
#ifdef RT_USING_SPI
|
||||||
|
|
||||||
#if defined(BSP_USING_SPI0) || defined(BSP_USING_SPI1) || defined(BSP_USING_SPI2) || defined(BSP_USING_SPI3)
|
#if defined(BSP_USING_SPI0) || defined(BSP_USING_SPI1) || defined(BSP_USING_SPI2) || defined(BSP_USING_SPI3)
|
||||||
/* this driver can be disabled at menuconfig → RT-Thread Components → Device Drivers */
|
/* this driver can be disabled at menuconfig -> RT-Thread Components -> Device Drivers */
|
||||||
#include "tm4c123_config.h"
|
#include "tm4c123_config.h"
|
||||||
#include "spi_config.h"
|
#include "spi_config.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*
|
*
|
||||||
|
@ -32,7 +32,7 @@ struct rt_spi_bit_ops
|
||||||
void (*const dir_miso)(void *data, rt_int32_t state);
|
void (*const dir_miso)(void *data, rt_int32_t state);
|
||||||
|
|
||||||
void (*const udelay)(rt_uint32_t us);
|
void (*const udelay)(rt_uint32_t us);
|
||||||
rt_uint32_t delay_us; /* sclk、mosi and miso line delay */
|
rt_uint32_t delay_us; /* sclk, mosi and miso line delay */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rt_spi_bit_obj
|
struct rt_spi_bit_obj
|
||||||
|
@ -42,7 +42,7 @@ struct rt_spi_bit_obj
|
||||||
struct rt_spi_configuration config;
|
struct rt_spi_configuration config;
|
||||||
};
|
};
|
||||||
|
|
||||||
rt_err_t rt_spi_bit_add_bus(struct rt_spi_bit_obj *obj,
|
rt_err_t rt_spi_bit_add_bus(struct rt_spi_bit_obj *obj,
|
||||||
const char *bus_name,
|
const char *bus_name,
|
||||||
struct rt_spi_bit_ops *ops);
|
struct rt_spi_bit_ops *ops);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue