Skip to content

Commit 218cdbc

Browse files
tfx2001mysterywolf
authored andcommitted
add assert for serial v2
1 parent 405e0da commit 218cdbc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/drivers/serial/serial_v2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,7 @@ static rt_err_t rt_serial_init(struct rt_device *dev)
897897

898898
RT_ASSERT(dev != RT_NULL);
899899
serial = (struct rt_serial_device *)dev;
900+
RT_ASSERT(serial->ops->transmit != RT_NULL);
900901

901902
/* initialize rx/tx */
902903
serial->serial_rx = RT_NULL;

0 commit comments

Comments
 (0)