TB2026-YDS Firmware
Loading...
Searching...
No Matches
gpio_expander.h File Reference

PI4IOE5V9554A 8-bit I2C GPIO expander (PCA9554A-compatible) at 0x38. More...

#include "esp_err.h"
#include "driver/i2c_master.h"
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Functions

esp_err_t gpio_expander_init (i2c_master_bus_handle_t bus)
 Attach the expander to the shared I2C bus and set pin directions.
esp_err_t gpio_expander_set (uint8_t channel, bool level)
 Drive one output channel (read-modify-write of the cached output port).
esp_err_t gpio_expander_get (uint8_t channel, bool *level)
 Read one input channel's logic level.
esp_err_t gpio_expander_read_all (uint8_t *inputs)
 Read all 8 input-port levels in one transaction.

Detailed Description

PI4IOE5V9554A 8-bit I2C GPIO expander (PCA9554A-compatible) at 0x38.

Channels are the EXP_* bit positions in board_pins.h. IO0/IO1 are outputs (DAC mute, amp shutdown), IO2..IO7 are inputs (buttons, charger INOKB).

Note
Développé avec l'assistance de Claude Opus 4.8 (Anthropic), sous la direction de Y. Dos Santos : spécification, revue et validation sur cible par l'auteur.