Developer World
Spresense SDK Library v3.2.0-ebc0364
battery_ioctl.h
1/****************************************************************************
2 * arch/arm/include/cxd56xx/battery_ioctl.h
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one or more
5 * contributor license agreements. See the NOTICE file distributed with
6 * this work for additional information regarding copyright ownership. The
7 * ASF licenses this file to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance with the
9 * License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 * License for the specific language governing permissions and limitations
17 * under the License.
18 *
19 ****************************************************************************/
20
21#ifndef __ARCH_ARM_INCLUDE_CXD56XX_BATTERY_IOCTL_H
22#define __ARCH_ARM_INCLUDE_CXD56XX_BATTERY_IOCTL_H
23
24/****************************************************************************
25 * Included Files
26 ****************************************************************************/
27
28#include <nuttx/fs/ioctl.h>
29
30/****************************************************************************
31 * Pre-processor Prototypes
32 ****************************************************************************/
33
34/* ioctl commands */
35
36#define BATIOC_GET_CHGVOLTAGE _BATIOC(0x0020)
37#define BATIOC_GET_CHGCURRENT _BATIOC(0x0021)
38#define BATIOC_GET_RECHARGEVOL _BATIOC(0x0022)
39#define BATIOC_SET_RECHARGEVOL _BATIOC(0x0023)
40#define BATIOC_GET_COMPCURRENT _BATIOC(0x0024)
41#define BATIOC_SET_COMPCURRENT _BATIOC(0x0025)
42#define BATIOC_GET_TEMPTABLE _BATIOC(0x0026)
43#define BATIOC_SET_TEMPTABLE _BATIOC(0x0027)
44#define BATIOC_GET_CURRENT _BATIOC(0x0028)
45
46#define BATIOC_MONITOR_ENABLE _BATIOC(0x0030)
47#define BATIOC_MONITOR_STATUS _BATIOC(0x0031)
48#define BATIOC_MONITOR_SET _BATIOC(0x0032)
49#define BATIOC_MONITOR_GET _BATIOC(0x0033)
50
51#define BATIOC_DEBUG _BATIOC(0x00db)
52
53/****************************************************************************
54 * Public Types
55 ****************************************************************************/
56
58{
59 int T60; /* 60 degree C */
60 int T45; /* 45 degree C */
61 int T10; /* 10 degree C */
62 int T00; /* 0 degree C */
63};
64
66{
67 int on;
68 int interval;
69 int threshold_volt;
70 int threshold_current;
71};
72
74{
75 int run;
76 int index;
77 int latest;
78 int totalwatt;
79 int totaltime;
80};
81
83{
84 int clearbuf;
85 int clearsum;
86};
87
89{
90 uint16_t index;
91 uint16_t timestamp;
92 uint16_t voltage;
93 int16_t current;
94};
95
97{
98 struct bat_monitor_rec_s *rec;
99 int index;
100 int size;
101};
102
103#endif /* __ARCH_ARM_INCLUDE_CXD56XX_BATTERY_IOCTL_H */
Definition: battery_ioctl.h:66
Definition: battery_ioctl.h:97
Definition: battery_ioctl.h:89
Definition: battery_ioctl.h:83
Definition: battery_ioctl.h:74
Definition: battery_ioctl.h:58