Merge pull request #630 from armink/master
[DeviceDrivers]Fix dma_transmit callback parameter type error. #628
This commit is contained in:
commit
4d45dc45bd
|
@ -106,7 +106,7 @@ struct serial_configure
|
||||||
rt_uint32_t parity :2;
|
rt_uint32_t parity :2;
|
||||||
rt_uint32_t bit_order :1;
|
rt_uint32_t bit_order :1;
|
||||||
rt_uint32_t invert :1;
|
rt_uint32_t invert :1;
|
||||||
rt_uint32_t bufsz :16;
|
rt_uint32_t bufsz :16;
|
||||||
rt_uint32_t reserved :4;
|
rt_uint32_t reserved :4;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -115,15 +115,15 @@ struct serial_configure
|
||||||
*/
|
*/
|
||||||
struct rt_serial_rx_fifo
|
struct rt_serial_rx_fifo
|
||||||
{
|
{
|
||||||
/* software fifo */
|
/* software fifo */
|
||||||
rt_uint8_t *buffer;
|
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_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
|
struct rt_serial_rx_dma
|
||||||
{
|
{
|
||||||
rt_bool_t activated;
|
rt_bool_t activated;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rt_serial_tx_dma
|
struct rt_serial_tx_dma
|
||||||
{
|
{
|
||||||
rt_bool_t activated;
|
rt_bool_t activated;
|
||||||
struct rt_data_queue data_queue;
|
struct rt_data_queue data_queue;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rt_serial_device
|
struct rt_serial_device
|
||||||
|
@ -147,8 +147,8 @@ struct rt_serial_device
|
||||||
const struct rt_uart_ops *ops;
|
const struct rt_uart_ops *ops;
|
||||||
struct serial_configure config;
|
struct serial_configure config;
|
||||||
|
|
||||||
void *serial_rx;
|
void *serial_rx;
|
||||||
void *serial_tx;
|
void *serial_tx;
|
||||||
};
|
};
|
||||||
typedef struct rt_serial_device rt_serial_t;
|
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 (*putc)(struct rt_serial_device *serial, char c);
|
||||||
int (*getc)(struct rt_serial_device *serial);
|
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);
|
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);
|
void *data);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue