drivers: serial: esp32_usb: clean-up
The struct serial_esp32_usb_pin, the uart_reg.h header and the two defines are not used or required. Signed-off-by: Martin Jäger <martin@libre.solar>
This commit is contained in:
parent
014f878e88
commit
e8250ea17b
1 changed files with 2 additions and 12 deletions
|
@ -8,23 +8,15 @@
|
||||||
|
|
||||||
#include <hal/usb_serial_jtag_ll.h>
|
#include <hal/usb_serial_jtag_ll.h>
|
||||||
|
|
||||||
#include <soc/uart_reg.h>
|
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <soc.h>
|
#include <soc.h>
|
||||||
#include <zephyr/drivers/uart.h>
|
#include <zephyr/drivers/uart.h>
|
||||||
#include <zephyr/drivers/interrupt_controller/intc_esp32c3.h>
|
#include <zephyr/drivers/interrupt_controller/intc_esp32c3.h>
|
||||||
#include <zephyr/drivers/clock_control.h>
|
#include <zephyr/drivers/clock_control.h>
|
||||||
#include <errno.h>
|
|
||||||
#include <zephyr/sys/util.h>
|
#include <zephyr/sys/util.h>
|
||||||
#include <esp_attr.h>
|
#include <esp_attr.h>
|
||||||
|
|
||||||
#define ISR_HANDLER isr_handler_t
|
|
||||||
|
|
||||||
struct serial_esp32_usb_pin {
|
|
||||||
const char *gpio_name;
|
|
||||||
int pin;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct serial_esp32_usb_config {
|
struct serial_esp32_usb_config {
|
||||||
const struct device *clock_dev;
|
const struct device *clock_dev;
|
||||||
const clock_control_subsys_t clock_subsys;
|
const clock_control_subsys_t clock_subsys;
|
||||||
|
@ -40,8 +32,6 @@ struct serial_esp32_usb_data {
|
||||||
int irq_line;
|
int irq_line;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SERIAL_FIFO_LIMIT (USB_SERIAL_JTAG_PACKET_SZ_BYTES)
|
|
||||||
|
|
||||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||||
static void serial_esp32_usb_isr(void *arg);
|
static void serial_esp32_usb_isr(void *arg);
|
||||||
#endif
|
#endif
|
||||||
|
@ -106,7 +96,7 @@ static int serial_esp32_usb_init(const struct device *dev)
|
||||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||||
const struct serial_esp32_usb_config *config = dev->config;
|
const struct serial_esp32_usb_config *config = dev->config;
|
||||||
|
|
||||||
data->irq_line = esp_intr_alloc(config->irq_source, 0, (ISR_HANDLER)serial_esp32_usb_isr,
|
data->irq_line = esp_intr_alloc(config->irq_source, 0, (isr_handler_t)serial_esp32_usb_isr,
|
||||||
(void *)dev, NULL);
|
(void *)dev, NULL);
|
||||||
#endif
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue