Merge pull request #1280 from charlown/master

fix cdc_vcom.c notify receive data.
This commit is contained in:
ZYH 2018-03-15 21:43:17 +08:00 committed by GitHub
commit 9ad0cb214d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -304,7 +304,8 @@ static rt_err_t _ep_out_handler(ufunction_t func, rt_size_t size)
data = (struct vcom*)func->user_data;
/* ensure serial is active */
if(data->serial.parent.open_flag & RT_DEVICE_FLAG_ACTIVATED)
if((data->serial.parent.flag & RT_DEVICE_FLAG_ACTIVATED)
&& (data->serial.parent.open_flag & RT_DEVICE_OFLAG_OPEN))
{
/* receive data from USB VCOM */
level = rt_hw_interrupt_disable();