From 4c9b77ded6232051f966453d4863ad4eeffd5bad Mon Sep 17 00:00:00 2001 From: armink Date: Wed, 11 May 2016 13:34:18 +0800 Subject: [PATCH] [DeviceDrivers]Fix dma_transmit callback parameter type error. #628 --- components/drivers/include/drivers/serial.h | 23 ++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/components/drivers/include/drivers/serial.h b/components/drivers/include/drivers/serial.h index 3b0a00907..46c94547f 100644 --- a/components/drivers/include/drivers/serial.h +++ b/components/drivers/include/drivers/serial.h @@ -106,7 +106,7 @@ struct serial_configure rt_uint32_t parity :2; rt_uint32_t bit_order :1; rt_uint32_t invert :1; - rt_uint32_t bufsz :16; + rt_uint32_t bufsz :16; rt_uint32_t reserved :4; }; @@ -115,15 +115,15 @@ struct serial_configure */ struct rt_serial_rx_fifo { - /* software fifo */ - rt_uint8_t *buffer; + /* software fifo */ + rt_uint8_t *buffer; - rt_uint16_t put_index, get_index; + rt_uint16_t put_index, get_index; }; struct rt_serial_tx_fifo { - struct rt_completion completion; + struct rt_completion completion; }; /* @@ -131,13 +131,13 @@ struct rt_serial_tx_fifo */ struct rt_serial_rx_dma { - rt_bool_t activated; + rt_bool_t activated; }; struct rt_serial_tx_dma { - rt_bool_t activated; - struct rt_data_queue data_queue; + rt_bool_t activated; + struct rt_data_queue data_queue; }; struct rt_serial_device @@ -147,8 +147,8 @@ struct rt_serial_device const struct rt_uart_ops *ops; struct serial_configure config; - void *serial_rx; - void *serial_tx; + void *serial_rx; + void *serial_tx; }; typedef struct rt_serial_device rt_serial_t; @@ -163,7 +163,7 @@ struct rt_uart_ops int (*putc)(struct rt_serial_device *serial, char c); int (*getc)(struct rt_serial_device *serial); - rt_size_t (*dma_transmit)(struct rt_serial_device *serial, const rt_uint8_t *buf, rt_size_t size, int direction); + rt_size_t (*dma_transmit)(struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size, int direction); }; void rt_hw_serial_isr(struct rt_serial_device *serial, int event); @@ -174,4 +174,3 @@ rt_err_t rt_hw_serial_register(struct rt_serial_device *serial, void *data); #endif - -- GitLab