mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 07:03:33 +08:00
Update to the STM32 ADC and CAN drivers
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4215 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -274,8 +274,12 @@ static ssize_t adc_read(FAR struct file *filep, FAR char *buffer, size_t buflen)
|
||||
|
||||
/* Will the next message in the FIFO fit into the user buffer? */
|
||||
|
||||
if (ret + msglen > buflen)
|
||||
if (nread + msglen > buflen)
|
||||
{
|
||||
/* No.. break out of the loop now with nread equal to the actual
|
||||
* number of bytes transferred.
|
||||
*/
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -417,4 +421,3 @@ int adc_register(FAR const char *path, FAR struct adc_dev_s *dev)
|
||||
|
||||
return register_driver(path, &adc_fops, 0444, dev);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user