fix error
This commit is contained in:
parent
d1787b7520
commit
2ec3b73b89
@ -179,7 +179,7 @@ typedef struct rt_serial_device rt_serial_t;
|
||||
*/
|
||||
struct rt_uart_ops
|
||||
{
|
||||
int (*init)(struct rt_serial_device *serial);
|
||||
rt_err_t (*init)(struct rt_serial_device *serial);
|
||||
|
||||
rt_err_t (*configure)(struct rt_serial_device *serial, struct serial_configure *cfg);
|
||||
rt_err_t (*control)(struct rt_serial_device *serial, int cmd, void *arg);
|
||||
|
@ -1403,9 +1403,10 @@ rt_err_t rt_hw_serial_register(struct rt_serial_device *serial,
|
||||
rt_err_t ret;
|
||||
struct rt_device *device;
|
||||
RT_ASSERT(serial != RT_NULL);
|
||||
struct serial_configure uart_conf = RT_SERIAL_CONFIG_DEFAULT;
|
||||
|
||||
serial->config = RT_SERIAL_CONFIG_DEFAULT;
|
||||
serial->bufsz = RT_SERIAL_FIFO_BUFSZ;
|
||||
rt_memcpy(&serial->config, &uart_conf, sizeof(uart_conf));
|
||||
serial->bufsz = uart_conf.bufsz;
|
||||
|
||||
device = &(serial->parent);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user