|
PCAL9555 Driver 0.1.0
API reference
|
Everything EnsureInitialized() and ApplyConfig() write to the chip.
More...
#include <pcal9555_types.hpp>
Public Attributes | |
| Variant | variant {Variant::Pca9555} |
Driver side: which part is fitted. The Agile I/O calls need Variant::Pcal9555a. | |
| uint16_t | output_high_mask {0xFFFF} |
| Output ports: 1 = drive high. Power-up: all high. | |
| uint16_t | polarity_invert_mask {0} |
| Polarity inversion: 1 = input reads inverted. | |
| uint16_t | input_mask {0xFFFF} |
| Configuration: 1 = input, 0 = output. Power-up: inputs. | |
| uint32_t | drive_strength_codes {0xFFFF'FFFFU} |
PCAL9555A: drive strength codes (DriveStrength), two bits per pin, pin n at bits 2n+1..2n. | |
| uint16_t | input_latch_mask {0} |
| PCAL9555A: 1 = input change latched until read. | |
| uint16_t | pull_enable_mask {0xFFFF} |
| PCAL9555A: 1 = pull resistor connected. | |
| uint16_t | pull_up_mask {0xFFFF} |
| PCAL9555A: 1 = pull-up, 0 = pull-down. | |
| uint16_t | interrupt_mask {0xFFFF} |
| PCAL9555A: 1 = the pin raises no interrupt. | |
| OutputMode | port0_mode {OutputMode::PushPull} |
| PCAL9555A: output stage of port 0 (ODEN0). | |
| OutputMode | port1_mode {OutputMode::PushPull} |
| PCAL9555A: output stage of port 1 (ODEN1). | |
Friends | |
| constexpr bool | operator== (const Config &lhs, const Config &rhs) noexcept=default |
| Field by field; every field is an integer or an enumeration, so equality is exact. | |
Everything EnsureInitialized() and ApplyConfig() write to the chip.
Bit n of each mask is pin n. The defaults are the power-up values of the registers, so Config{} changes nothing on a freshly powered chip. The fields below variant marked "PCAL9555A" must keep their default when variant is Variant::Pca9555 (Validate() returns Unsupported otherwise).
Field by field; every field is an integer or an enumeration, so equality is exact.
| lhs | The first configuration. |
| rhs | The configuration to compare with. |