add assert for serial v2
This commit is contained in:
parent
405e0da093
commit
218cdbce4e
|
@ -897,6 +897,7 @@ static rt_err_t rt_serial_init(struct rt_device *dev)
|
|||
|
||||
RT_ASSERT(dev != RT_NULL);
|
||||
serial = (struct rt_serial_device *)dev;
|
||||
RT_ASSERT(serial->ops->transmit != RT_NULL);
|
||||
|
||||
/* initialize rx/tx */
|
||||
serial->serial_rx = RT_NULL;
|
||||
|
|
Loading…
Reference in New Issue