#include <stdint.h>
Go to the source code of this file.
◆ SIF_PI4IOE5V6408_ADDLEN
#define SIF_PI4IOE5V6408_ADDLEN 1 |
◆ SIF_PI4IOE5V6408_CTRL_IRQRST
#define SIF_PI4IOE5V6408_CTRL_IRQRST 0x02 /* reset interrupt */ |
◆ SIF_PI4IOE5V6408_CTRL_RESET
#define SIF_PI4IOE5V6408_CTRL_RESET 0x01 /* software reset */ |
◆ SIF_PI4IOE5V6408_DATALEN
#define SIF_PI4IOE5V6408_DATALEN 1 |
◆ SIF_PI4IOE5V6408_I2C_ADDR
#define SIF_PI4IOE5V6408_I2C_ADDR 0x43 |
◆ SIF_PI4IOE5V6408_ID_DEV_ID
#define SIF_PI4IOE5V6408_ID_DEV_ID 0xE0 /* device id */ |
◆ SIF_PI4IOE5V6408_ID_DEV_ID_SHR
#define SIF_PI4IOE5V6408_ID_DEV_ID_SHR 5 /* shift for devie id */ |
◆ SIF_PI4IOE5V6408_ID_FW_REV
#define SIF_PI4IOE5V6408_ID_FW_REV 0x1C /* firmware revision */ |
◆ SIF_PI4IOE5V6408_ID_FW_REV_SHR
#define SIF_PI4IOE5V6408_ID_FW_REV_SHR 2 /* shift for firmware revision */ |
◆ SIF_PI4IOE5V6408_INT_PIN
#define SIF_PI4IOE5V6408_INT_PIN 31 |
◆ SIF_PI4IOE5V6408_IRQ_OFF
#define SIF_PI4IOE5V6408_IRQ_OFF 0 /* irq off (masked) for specific i/o */ |
◆ SIF_PI4IOE5V6408_IRQ_ON
#define SIF_PI4IOE5V6408_IRQ_ON 1 /* irq on for specific i/o */ |
◆ SIF_PI4IOE5V6408_PUP_EN
#define SIF_PI4IOE5V6408_PUP_EN 1 /* pull-up enabled */ |
◆ SIF_PI4IOE5V6408_PUP_OFF
#define SIF_PI4IOE5V6408_PUP_OFF 0 /* no pull-up */ |
◆ SIF_PI4IOE5V6408_REG_ID_CTRL
#define SIF_PI4IOE5V6408_REG_ID_CTRL 0x01 /* device id and control */ |
◆ SIF_PI4IOE5V6408_REG_INP_DEFAULT
#define SIF_PI4IOE5V6408_REG_INP_DEFAULT 0x09 /* input default state */ |
◆ SIF_PI4IOE5V6408_REG_INP_STATUS
#define SIF_PI4IOE5V6408_REG_INP_STATUS 0x0F /* input status */ |
◆ SIF_PI4IOE5V6408_REG_IO_DIR
#define SIF_PI4IOE5V6408_REG_IO_DIR 0x03 /* i/o direction */ |
◆ SIF_PI4IOE5V6408_REG_IRQ_MASK
#define SIF_PI4IOE5V6408_REG_IRQ_MASK 0x11 /* interrupt mask */ |
◆ SIF_PI4IOE5V6408_REG_IRQ_STATUS
#define SIF_PI4IOE5V6408_REG_IRQ_STATUS 0x13 /* interrupt status */ |
◆ SIF_PI4IOE5V6408_REG_OUT_HIGHZ
#define SIF_PI4IOE5V6408_REG_OUT_HIGHZ 0x07 /* output high impedance */ |
◆ SIF_PI4IOE5V6408_REG_OUT_STATE
#define SIF_PI4IOE5V6408_REG_OUT_STATE 0x05 /* output state */ |
◆ SIF_PI4IOE5V6408_REG_PUP_DOWNB
#define SIF_PI4IOE5V6408_REG_PUP_DOWNB 0x0D /* pullup / pulldown select */ |
◆ SIF_PI4IOE5V6408_REG_PUP_ENABLE
#define SIF_PI4IOE5V6408_REG_PUP_ENABLE 0x0B /* pullup / pulldown enable */ |
◆ SIF_PI4IOE5V6408_STATE_HI
#define SIF_PI4IOE5V6408_STATE_HI 1 /* high */ |
◆ SIF_PI4IOE5V6408_STATE_LO
#define SIF_PI4IOE5V6408_STATE_LO 0 /* low */ |
◆ SIF_PI4IOE5V6408_T_RESET
#define SIF_PI4IOE5V6408_T_RESET 1 /* startup time after power-up */ |
◆ pi4ioe5v6408_status
Enumerator |
---|
SIF_PI4IOE5V6408_ST_OK | |
SIF_PI4IOE5V6408_ST_FAIL | |
SIF_PI4IOE5V6408_ST_UNAVAILABLE | |
◆ SIF_PI4IOE5V6408_ConfigureInput()
uint8_t SIF_PI4IOE5V6408_ConfigureInput |
( |
uint8_t |
io, |
|
|
uint8_t |
irq_on, |
|
|
uint8_t |
pullup_on |
|
) |
| |
configure input
- Parameters
-
io | - port bit number (0-7) |
irq_on | - irq enabled when (1) |
pullup_on | - pull-up enabled when (1) |
- Returns
- pi4ioe5v6408_status
◆ SIF_PI4IOE5V6408_ConfigureOutput()
uint8_t SIF_PI4IOE5V6408_ConfigureOutput |
( |
uint8_t |
io | ) |
|
configure output
- Parameters
-
io | - port bit number (0-7) |
- Returns
- pi4ioe5v6408_status
◆ SIF_PI4IOE5V6408_Initialise()
uint8_t SIF_PI4IOE5V6408_Initialise |
( |
void |
| ) |
|
Device initialisation.
- Returns
- pi4ioe5v6408_status
◆ SIF_PI4IOE5V6408_IsInterruptActive()
bool SIF_PI4IOE5V6408_IsInterruptActive |
( |
void |
| ) |
|
Device initialisation.
- Returns
- true if active, false if not
◆ SIF_PI4IOE5V6408_ReadDeviceId()
uint8_t SIF_PI4IOE5V6408_ReadDeviceId |
( |
uint8_t * |
chip_id, |
|
|
uint8_t * |
rev_id |
|
) |
| |
Read chip id and revision id.
- Parameters
-
chip_id | - device id code |
rev_id | - firmware revision |
- Returns
- pi4ioe5v6408_status
◆ SIF_PI4IOE5V6408_SenseAllInputs()
uint8_t SIF_PI4IOE5V6408_SenseAllInputs |
( |
uint8_t * |
port | ) |
|
sense all inputs (0-7) for port
- Parameters
-
port | - returned i/o states |
- Returns
- pi4ioe5v6408_status
◆ SIF_PI4IOE5V6408_SenseInput()
uint8_t SIF_PI4IOE5V6408_SenseInput |
( |
uint8_t |
io, |
|
|
uint8_t * |
val |
|
) |
| |
sense specific input
- Parameters
-
io | - port bit number (0-7) |
val | - returned i/o state |
- Returns
- pi4ioe5v6408_status
◆ SIF_PI4IOE5V6408_SenseOutput()
uint8_t SIF_PI4IOE5V6408_SenseOutput |
( |
uint8_t |
io, |
|
|
uint8_t * |
val |
|
) |
| |
sense specific output
- Parameters
-
io | - port bit number (0-7) |
val | - returned i/o state |
- Returns
- pi4ioe5v6408_status
◆ SIF_PI4IOE5V6408_SetOutput()
uint8_t SIF_PI4IOE5V6408_SetOutput |
( |
uint8_t |
io, |
|
|
uint8_t |
val |
|
) |
| |
set specific output
- Parameters
-
io | - port bit number (0-7) |
val | - i/o state |
- Returns
- pi4ioe5v6408_status