mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 09:49:21 +08:00
misc/rpmsgdev: get battery info by rpmsgdev
read battery info register by other core Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
22c4a82fa3
commit
190fdd18e2
1 changed files with 5 additions and 0 deletions
|
@ -42,6 +42,7 @@
|
|||
#include <nuttx/rptun/openamp.h>
|
||||
#include <nuttx/net/ioctl.h>
|
||||
#include <nuttx/drivers/rpmsgdev.h>
|
||||
#include <nuttx/power/battery_ioctl.h>
|
||||
|
||||
#include "rpmsgdev.h"
|
||||
|
||||
|
@ -622,12 +623,16 @@ static ssize_t rpmsgdev_ioctl_arglen(int cmd)
|
|||
case FIONSPACE:
|
||||
case FBIOSET_POWER:
|
||||
case FBIOGET_POWER:
|
||||
case BATIOC_STATE:
|
||||
return sizeof(int);
|
||||
case TUNSETIFF:
|
||||
case TUNGETIFF:
|
||||
return sizeof(struct ifreq);
|
||||
case FIOC_FILEPATH:
|
||||
return PATH_MAX;
|
||||
case BATIOC_GET_PROTOCOL:
|
||||
case BATIOC_OPERATE:
|
||||
return sizeof(struct batio_operate_msg_s);
|
||||
default:
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue