Merge pull request #2047 from zhangxiaosen88/master

Update adc.c
This commit is contained in:
Bernard Xiong 2018-12-10 09:25:10 +08:00 committed by GitHub
commit d43fcbcd80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ static rt_err_t _adc_control(rt_device_t dev, int cmd, void *args)
rt_err_t result = RT_EOK;
rt_adc_device_t adc = (struct rt_adc_device *)dev;
if (adc->ops->enabled != RT_NULL)
if (adc->ops->enabled == RT_NULL)
{
return -RT_ENOSYS;
}