|
PCAL9555 Driver 0.1.0
API reference
|
The PCA9555 / PCAL9555A register map. More...
Functions | |
| constexpr bool | IsImplemented (uint8_t command, bool agile) noexcept |
| Whether a part implements a command byte (table 4): 0x00 to 0x07 on both parts, and on the PCAL9555A also 0x40 to 0x4D and 0x4F. The PCA9555 data sheet does not define its answer to any other command byte, so the driver never sends one. | |
Variables | |
| constexpr uint8_t | kInputPort0 = 0x00 |
| Input port 0 (R): pin levels; 0x01 is port 1. | |
| constexpr uint8_t | kOutputPort0 = 0x02 |
| Output port 0 (R/W); 0x03 is port 1. | |
| constexpr uint8_t | kPolarityPort0 = 0x04 |
| Polarity inversion 0 (R/W); 0x05 is port 1. | |
| constexpr uint8_t | kConfigPort0 = 0x06 |
| Configuration 0 (R/W): 1 = input; 0x07 port 1. | |
| constexpr uint8_t | kDriveStrength0 = 0x40 |
| Drive strength 0 (R/W): P0_0-3; 0x41 P0_4-7. | |
| constexpr uint8_t | kDriveStrength2 = 0x42 |
| Drive strength 2 (R/W): P1_0-3; 0x43 P1_4-7. | |
| constexpr uint8_t | kInputLatch0 = 0x44 |
| Input latch 0 (R/W): 1 = latched; 0x45 port 1. | |
| constexpr uint8_t | kPullEnable0 = 0x46 |
| Pull-up/pull-down enable 0 (R/W); 0x47 port 1. | |
| constexpr uint8_t | kPullSelect0 = 0x48 |
| Pull-up/pull-down selection 0 (R/W): 1 = pull-up. | |
| constexpr uint8_t | kInterruptMask0 = 0x4A |
| Interrupt mask 0 (R/W): 1 = masked. | |
| constexpr uint8_t | kInterruptStatus0 = 0x4C |
| Interrupt status 0 (R); 0x4D is port 1. | |
| constexpr uint8_t | kOutputPortConfig = 0x4F |
| Output port configuration (R/W). | |
| constexpr uint8_t | kOutputConfigOden0 = 1U << 0 |
| 0x4F ODEN0: port 0 open-drain. | |
| constexpr uint8_t | kOutputConfigOden1 = 1U << 1 |
| constexpr uint16_t | kIdentityPattern = 0x55AA |
| constexpr uint8_t | kOutputConfigReservedMask = 0xFC |
| 0x4F bits 7..2 are reserved and read 0 (PCAL9555A table 27). | |
| constexpr uint32_t | kDriveBitsPerPin = 2U |
| Bits per pin in the drive strength registers: pin n of a port uses bits 2(n%4)+1..2(n%4). | |
| constexpr uint32_t | kDriveCodeMask = 0x3 |
| Mask of one pin's drive strength code. | |
| constexpr uint16_t | kOutputReset = 0xFFFF |
| Output ports: every pin high. | |
| constexpr uint16_t | kPolarityReset = 0x0000 |
| Polarity inversion: none. | |
| constexpr uint16_t | kConfigReset = 0xFFFF |
| constexpr uint32_t | kDriveStrengthReset = 0xFFFF'FFFFU |
| Drive strength: full on every pin (0x40 to 0x43 all 0xFF). | |
| constexpr uint16_t | kInputLatchReset = 0x0000 |
| Input latch: off. | |
| constexpr uint16_t | kPullEnableReset = 0xFFFF |
| Pull resistors: enabled. | |
| constexpr uint16_t | kPullSelectReset = 0xFFFF |
| Pull resistors: pull-up. | |
| constexpr uint16_t | kInterruptMaskReset = 0xFFFF |
| Interrupts: every pin masked. | |
| constexpr uint8_t | kOutputPortConfigReset = 0x00 |
| Both ports push-pull. | |
The PCA9555 / PCAL9555A register map.