|
MAX22200 Driver
API reference
|
Board/scale configuration for unit-based APIs. More...
#include <max22200_types.hpp>
Public Member Functions | |
| BoardConfig () | |
| BoardConfig (float rref_kohm, bool hfs) | |
| Construct BoardConfig from RREF resistor value. | |
| bool | hasMaxCurrentLimit () const |
| True if a max current limit is configured (0 = no limit) | |
| bool | hasMaxDutyLimit () const |
| True if a max duty limit is configured (0 = no limit) | |
| bool | hasIfsConfigured () const |
| True if IFS is configured (non-zero) | |
| uint32_t | getFullScaleCurrentMa () const |
| Full-scale current in mA (IFS from RREF) | |
| uint32_t | getMaxCurrentLimitMa () const |
| Max current limit in mA (0 = no limit) | |
| uint8_t | getMaxDutyLimitPercent () const |
| Max duty limit in percent (0 = no limit) | |
Public Attributes | |
| uint32_t | full_scale_current_ma |
| Full-scale current in mA (from RREF: IFS = KFS×1000/RREF) | |
| uint32_t | max_current_ma |
| Max current limit in mA (0 = no limit, applies to all channels) | |
| uint8_t | max_duty_percent |
| Max duty limit in percent (0 = no limit, applies to VDR mode) | |
Board/scale configuration for unit-based APIs.
Stores the full-scale current (IFS) and optional safety limits for current and duty cycle. Used by convenience APIs that work in real units (mA, A, percent) instead of raw register values.
The IFS is determined by the external resistor RREF on the IREF pin:
|
inline |
|
inline |
Construct BoardConfig from RREF resistor value.
IFS = KFS × 1000 / RREF (KFS = 15 kΩ full-scale, 7.5 kΩ half-scale).
| rref_kohm | RREF resistor value in kΩ (e.g., 15.0 for 15kΩ) |
| hfs | true if HFS=1 (half-scale), false if HFS=0 (full-scale) |
|
inline |
Full-scale current in mA (IFS from RREF)
|
inline |
Max current limit in mA (0 = no limit)
|
inline |
Max duty limit in percent (0 = no limit)
|
inline |
True if IFS is configured (non-zero)
|
inline |
True if a max current limit is configured (0 = no limit)
|
inline |
True if a max duty limit is configured (0 = no limit)
| uint32_t max22200::BoardConfig::full_scale_current_ma |
Full-scale current in mA (from RREF: IFS = KFS×1000/RREF)
| uint32_t max22200::BoardConfig::max_current_ma |
Max current limit in mA (0 = no limit, applies to all channels)
| uint8_t max22200::BoardConfig::max_duty_percent |
Max duty limit in percent (0 = no limit, applies to VDR mode)