mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
feature: charge: Add battery operate
Signed-off-by: liangdongdong<liangdongdong@xiaomi.com>
This commit is contained in:
committed by
Xiang Xiao
parent
5a796dfbff
commit
5238f2c200
@@ -354,6 +354,16 @@ static int bat_gauge_ioctl(FAR struct file *filep,
|
||||
}
|
||||
break;
|
||||
|
||||
case BATIOC_OPERATE:
|
||||
{
|
||||
FAR int *ptr = (FAR int *)((uintptr_t)arg);
|
||||
if (ptr)
|
||||
{
|
||||
ret = dev->ops->operate(dev, ptr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
_err("ERROR: Unrecognized cmd: %d\n", cmd);
|
||||
ret = -ENOTTY;
|
||||
|
||||
Reference in New Issue
Block a user