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:
patacongo
2011-12-22 21:55:54 +00:00
parent e2ef959d92
commit 60006bab7a
11 changed files with 276 additions and 92 deletions
+5 -2
View File
@@ -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);
}