Zephyr API Documentation
4.1.99
A Scalable Open Source RTOS
4.1.99
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
▼
Zephyr API Documentation
►
Introduction
Deprecated List
►
Topics
►
Data Structures
▼
Files
▼
File List
►
doc
►
kernel
►
lib
►
subsys
▼
zephyr
►
acpi
►
app_memory
►
arch
►
audio
►
bluetooth
►
canbus
►
console
►
crypto
►
data
►
debug
►
devicetree
►
dfu
►
display
►
drivers
►
dsp
▼
dt-bindings
►
acpi
►
adc
►
battery
►
clock
►
comparator
►
dac
►
dai
►
display
►
dma
►
espi
►
ethernet
►
flash_controller
►
gnss
►
gpio
►
i2c
►
input
►
inputmux
►
interrupt-controller
►
ipc_service
►
led
►
lora
►
lvgl
►
memory-attr
►
memory-controller
►
mfd
►
mipi_dbi
►
mipi_dsi
►
misc
►
pcie
►
pinctrl
►
power
►
pwm
►
qspi
►
rdc
►
regulator
►
reserved-memory
►
reset
▼
sensor
►
adxl345.h
►
adxl362.h
►
adxl367.h
►
adxl372.h
►
apds9253.h
►
bq274xx.h
►
icm42688.h
►
icm45686.h
►
iis2dlpc.h
►
iis2iclx.h
►
ina226.h
►
ina230.h
►
ina237.h
►
ism330dhcx.h
►
it51xxx_tach.h
►
it8xxx2_tach.h
►
it8xxx2_vcmp.h
►
lis2de12.h
►
lis2dh.h
►
lis2ds12.h
►
lis2du12.h
►
lis2dux12.h
►
lis2dw12.h
►
lps22hh.h
►
lps2xdf.h
►
lsm6dso.h
►
lsm6dso16is.h
►
lsm6dsv16x.h
►
lsm9ds1.h
►
mc3419.h
►
npcx_tach.h
►
qdec_nxp_s32.h
►
qdec_stm32.h
►
rm3100.h
►
stts22h.h
►
tmag5273.h
►
tmp114.h
►
tmp11x.h
►
spi
►
timer
►
usb
►
usb-c
►
video
dt-util.h
►
fs
►
input
►
internal
►
ipc
►
kernel
►
linker
►
llext
►
logging
►
lorawan
►
math
►
mem_mgmt
►
mgmt
►
misc
►
modbus
►
modem
►
multi_heap
►
net
►
platform
►
pm
►
pmci
►
portability
►
posix
►
psa
►
random
►
retention
►
rtio
►
sd
►
sensing
►
settings
►
shell
►
sip_svc
►
stats
►
storage
►
sys
►
task_wdt
►
timing
►
toolchain
►
tracing
►
usb
►
usb_c
►
xen
►
zbus
►
zvfs
►
bindesc.h
►
cache.h
►
device.h
►
devicetree.h
►
fatal.h
►
fatal_types.h
►
init.h
►
irq.h
►
irq_multilevel.h
►
irq_nextlevel.h
►
irq_offload.h
►
kernel.h
kernel_includes.h
►
kernel_structs.h
►
kernel_version.h
►
net_buf.h
►
shared_irq.h
►
smf.h
►
spinlock.h
►
sw_isr_table.h
►
sys_clock.h
►
syscall.h
►
toolchain.h
types.h
►
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
ina237.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2021 Grinn
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_INA237_H_
7
#define ZEPHYR_INCLUDE_DT_BINDINGS_INA237_H_
8
9
#include <
zephyr/dt-bindings/dt-util.h
>
10
11
/* Operating Mode */
12
#define INA237_CFG_HIGH_PRECISION BIT(4)
13
#define INA237_OPER_MODE_SHUTDOWN 0x00
14
#define INA237_OPER_MODE_BUS_VOLTAGE_TRIG 0x01
15
#define INA237_OPER_MODE_SHUNT_VOLTAGE_TRIG 0x02
16
#define INA237_OPER_MODE_SHUNT_BUS_VOLTAGE_TRIG 0x03
17
#define INA237_OPER_MODE_TEMP_TRIG 0x04
18
#define INA237_OPER_MODE_TEMP_BUS_VOLTAGE_TRIG 0x05
19
#define INA237_OPER_MODE_TEMP_SHUNT_VOLTAGE_TRIG 0x06
20
#define INA237_OPER_MODE_BUS_SHUNT_VOLTAGE_TEMP_TRIG 0x07
21
#define INA237_OPER_MODE_BUS_VOLTAGE_CONT 0x09
22
#define INA237_OPER_MODE_SHUNT_VOLTAGE_CONT 0x0A
23
#define INA237_OPER_MODE_SHUNT_BUS_VOLTAGE_CONT 0x0B
24
#define INA237_OPER_MODE_TEMP_CONT 0x0C
25
#define INA237_OPER_MODE_BUS_VOLTAGE_TEMP_CONT 0x0D
26
#define INA237_OPER_MODE_TEMP_SHUNT_VOLTAGE_CONT 0x0E
27
#define INA237_OPER_MODE_BUS_SHUNT_VOLTAGE_TEMP_CONT 0x0F
28
29
/* Conversion time for bus, shunt and temp in micro-seconds */
30
#define INA237_CONV_TIME_50 0x00
31
#define INA237_CONV_TIME_84 0x01
32
#define INA237_CONV_TIME_150 0x02
33
#define INA237_CONV_TIME_280 0x03
34
#define INA237_CONV_TIME_540 0x04
35
#define INA237_CONV_TIME_1052 0x05
36
#define INA237_CONV_TIME_2074 0x06
37
#define INA237_CONV_TIME_4120 0x07
38
39
/* Averaging Mode */
40
#define INA237_AVG_MODE_1 0x00
41
#define INA237_AVG_MODE_4 0x01
42
#define INA237_AVG_MODE_16 0x02
43
#define INA237_AVG_MODE_64 0x03
44
#define INA237_AVG_MODE_128 0x04
45
#define INA237_AVG_MODE_256 0x05
46
#define INA237_AVG_MODE_512 0x06
47
#define INA237_AVG_MODE_1024 0x07
48
49
/* Reset Mode */
50
#define INA237_RST_NORMAL_OPERATION 0x00
51
#define INA237_RST_SYSTEM_RESET 0x01
52
53
/* Delay for initial ADC conversion in steps of 2 ms */
54
#define INA237_INIT_ADC_DELAY_0_S 0x00
55
#define INA237_INIT_ADC_DELAY_2_MS 0x01
56
#define INA237_INIT_ADC_DELAY_510_MS 0xFF
57
58
/* Shunt full scale range selection across IN+ and IN–. */
59
#define INA237_ADC_RANGE_163_84 0x00
60
#define INA237_ADC_RANGE_40_96 0x01
61
70
#define INA237_CONFIG(rst_mode, \
71
convdly, \
72
adc_range) \
73
(((rst_mode) << 15) | ((convdly) << 6) | ((adc_range) << 4))
74
84
#define INA237_ADC_CONFIG(mode, \
85
vshct, \
86
vbusct, \
87
vtct, \
88
avg) \
89
(((mode) << 12) | ((vbusct) << 9) | ((vshct) << 6) | ((vtct) << 3) | (avg))
90
91
#endif
/* ZEPHYR_INCLUDE_DT_BINDINGS_INA237_H_ */
dt-util.h
zephyr
dt-bindings
sensor
ina237.h
Generated on Sat May 17 2025 21:06:22 for Zephyr API Documentation by
1.12.0