32 #ifndef SIF_PI4IOE5V6408_H
33 #define SIF_PI4IOE5V6408_H
42 #define SIF_PI4IOE5V6408_I2C_ADDR 0x43
45 #define SIF_PI4IOE5V6408_INT_PIN 31
48 #define SIF_PI4IOE5V6408_DATALEN 1
50 #define SIF_PI4IOE5V6408_ADDLEN 1
53 #define SIF_PI4IOE5V6408_REG_ID_CTRL 0x01
54 #define SIF_PI4IOE5V6408_REG_IO_DIR 0x03
55 #define SIF_PI4IOE5V6408_REG_OUT_STATE 0x05
56 #define SIF_PI4IOE5V6408_REG_OUT_HIGHZ 0x07
57 #define SIF_PI4IOE5V6408_REG_INP_DEFAULT 0x09
58 #define SIF_PI4IOE5V6408_REG_PUP_ENABLE 0x0B
59 #define SIF_PI4IOE5V6408_REG_PUP_DOWNB 0x0D
60 #define SIF_PI4IOE5V6408_REG_INP_STATUS 0x0F
61 #define SIF_PI4IOE5V6408_REG_IRQ_MASK 0x11
62 #define SIF_PI4IOE5V6408_REG_IRQ_STATUS 0x13
65 #define SIF_PI4IOE5V6408_T_RESET 1
68 #define SIF_PI4IOE5V6408_STATE_LO 0
69 #define SIF_PI4IOE5V6408_STATE_HI 1
72 #define SIF_PI4IOE5V6408_PUP_OFF 0
73 #define SIF_PI4IOE5V6408_PUP_EN 1
76 #define SIF_PI4IOE5V6408_IRQ_OFF 0
77 #define SIF_PI4IOE5V6408_IRQ_ON 1
80 #define SIF_PI4IOE5V6408_CTRL_RESET 0x01
81 #define SIF_PI4IOE5V6408_CTRL_IRQRST 0x02
82 #define SIF_PI4IOE5V6408_ID_FW_REV 0x1C
83 #define SIF_PI4IOE5V6408_ID_DEV_ID 0xE0
84 #define SIF_PI4IOE5V6408_ID_FW_REV_SHR 2
85 #define SIF_PI4IOE5V6408_ID_DEV_ID_SHR 5
bool SIF_PI4IOE5V6408_IsInterruptActive(void)
Device initialisation.
Definition: sif_pi4ioe5v6408.c:55
uint8_t SIF_PI4IOE5V6408_ConfigureOutput(uint8_t io)
configure output
Definition: sif_pi4ioe5v6408.c:369
uint8_t SIF_PI4IOE5V6408_SenseInput(uint8_t io, uint8_t *val)
sense specific input
Definition: sif_pi4ioe5v6408.c:264
uint8_t SIF_PI4IOE5V6408_Initialise(void)
Device initialisation.
Definition: sif_pi4ioe5v6408.c:217
uint8_t SIF_PI4IOE5V6408_ReadDeviceId(uint8_t *chip_id, uint8_t *rev_id)
Read chip id and revision id.
Definition: sif_pi4ioe5v6408.c:248
pi4ioe5v6408_status
Definition: sif_pi4ioe5v6408.h:89
@ SIF_PI4IOE5V6408_ST_OK
Definition: sif_pi4ioe5v6408.h:90
@ SIF_PI4IOE5V6408_ST_UNAVAILABLE
Definition: sif_pi4ioe5v6408.h:92
@ SIF_PI4IOE5V6408_ST_FAIL
Definition: sif_pi4ioe5v6408.h:91
uint8_t SIF_PI4IOE5V6408_ConfigureInput(uint8_t io, uint8_t irq_on, uint8_t pullup_on)
configure input
Definition: sif_pi4ioe5v6408.c:337
uint8_t SIF_PI4IOE5V6408_SetOutput(uint8_t io, uint8_t val)
set specific output
Definition: sif_pi4ioe5v6408.c:319
uint8_t SIF_PI4IOE5V6408_SenseAllInputs(uint8_t *port)
sense all inputs (0-7) for port
Definition: sif_pi4ioe5v6408.c:304
uint8_t SIF_PI4IOE5V6408_SenseOutput(uint8_t io, uint8_t *val)
sense specific output
Definition: sif_pi4ioe5v6408.c:286