|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The INA3221 map's helpers. More...
Functions | |
| void | sense_i3221_one (sense_i3221_cfg_t *m, bool en, uint8_t addr, uint32_t shunt_uohm, uint8_t channels) |
One INA3221 as the SENSE page sets it up before protocol 4.25: the part at addr fitted when en and addr lies in 0x40 to 0x43, each channel in channels (bit 0 CH1) on shunt_uohm, FAST its CH1 when CH1 is one of them. | |
The INA3221 map's helpers.
See sense_sched.h. A file of its own so the SENSE page links them without the schedule.
SPDX-License-Identifier: MIT
| void sense_i3221_one | ( | sense_i3221_cfg_t * | m, |
| bool | en, | ||
| uint8_t | addr, | ||
| uint32_t | shunt_uohm, | ||
| uint8_t | channels ) |
One INA3221 as the SENSE page sets it up before protocol 4.25: the part at addr fitted when en and addr lies in 0x40 to 0x43, each channel in channels (bit 0 CH1) on shunt_uohm, FAST its CH1 when CH1 is one of them.
Anything else in m is cleared.
| m | The map entry to fill. |
| en | true when the part is fitted. |
| addr | I2C address of the part. |
| shunt_uohm | Shunt resistance, in µΩ, for each channel it has. |
| channels | Channels to read, bit 0 CH1. |