|
MAX22200 Driver 0.1.0
API reference
|
One channel's CFG_CHn register, as codes (Table 11). ChannelConfig{} is the reset value: CDR, low side, every code 0 (no current), 25 kHz, every diagnostic off.
More...
#include <max22200_types.hpp>
Public Attributes | |
| DriveMode | drive {DriveMode::Cdr} |
| VDRnCDR. Changes only with every channel off. | |
| Side | side {Side::Low} |
| uint8_t | hit {0} |
| uint8_t | hold {0} |
HOLD[6:0], as hit. Can change on the fly (SetHoldCode()). | |
| uint8_t | hit_time {0} |
HIT_T[7:0]: 0 none, 1 to 254 (HitTimeUs()), 255 continuous (Table 5). | |
| ChopDivider | chop {ChopDivider::Div4} |
| FREQ_CFG. | |
| bool | half_scale {false} |
| HFS: IFS halved, RON doubled; low side only. | |
| bool | trigger_pin {false} |
| TRGnSPI: switched by TRIGA (even) or TRIGB (odd), not ONCH. | |
| bool | slew_rate_control {false} |
| SRC: low side, fCHOP below 50 kHz only. | |
| bool | open_load_detect {false} |
| OL_EN. | |
| bool | plunger_detect {false} |
DPM_EN: low side only; settings in DpmConfig. | |
| bool | hit_current_check {false} |
| HHF_EN: CDR only. | |
Friends | |
| constexpr bool | operator== (const ChannelConfig &lhs, const ChannelConfig &rhs) noexcept=default |
One channel's CFG_CHn register, as codes (Table 11). ChannelConfig{} is the reset value: CDR, low side, every code 0 (no current), 25 kHz, every diagnostic off.
The codes are the datasheet's, so nothing is rounded behind your back; the conversions below (CurrentCode(), HitTimeCode()) turn milliamps and microseconds into them and refuse what the chip cannot do.
|
friend |
| lhs | The first value. |
| rhs | The value to compare it with. |
lhs equals rhs's. | uint8_t max22200::ChannelConfig::hit {0} |
HIT[6:0]. CDR: peak current code/128 x IFS, 1 to kMaxCdrCode, 0 = no current (Table 4). VDR: duty cycle in percent, 0 to kMaxVdrCode; the chip raises 1 to δMIN-1 to δMIN and lowers δMAX+1 to 99 to δMAX (Tables 2, 3).