digiio  2.1.0.0
Data Structures | Macros | Enumerations | Functions
digiio.h File Reference

This file contains API for DIGI IO Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"

Go to the source code of this file.

Data Structures

struct  digiio_t
 DIGI IO Click context object. More...
 
struct  digiio_cfg_t
 DIGI IO Click configuration object. More...
 

Macros

#define DIGIIO_REG_SET_OUT   0x00
 DIGI IO register list. More...
 
#define DIGIIO_REG_SET_LED   0x01
 
#define DIGIIO_REG_DOI_LEVEL   0x02
 
#define DIGIIO_REG_INTERRUPT   0x03
 
#define DIGIIO_REG_OVR_LD_CH_F   0x04
 
#define DIGIIO_REG_OPN_WIR_CH_F   0x05
 
#define DIGIIO_REG_SHT_VDD_CH_F   0x06
 
#define DIGIIO_REG_GLOBAL_ERR   0x07
 
#define DIGIIO_REG_OPN_WR_EN   0x08
 
#define DIGIIO_REG_SHT_VDD_EN   0x09
 
#define DIGIIO_REG_CONFIG_1   0x0A
 
#define DIGIIO_REG_CONFIG_2   0x0B
 
#define DIGIIO_REG_CONFIG_DI   0x0C
 
#define DIGIIO_REG_CONFIG_DO   0x0D
 
#define DIGIIO_REG_CURR_LIM   0x0E
 
#define DIGIIO_REG_MASK   0x0F
 
#define DIGIIO_SET_OUT_SET_DI4_OUTPUT   0x00
 DIGI IO SET_OUT register setting. More...
 
#define DIGIIO_SET_OUT_SET_DI4_INPUT   0x80
 
#define DIGIIO_SET_OUT_SET_DI4_MASK   0x80
 
#define DIGIIO_SET_OUT_SET_DI3_OUTPUT   0x00
 
#define DIGIIO_SET_OUT_SET_DI3_INPUT   0x40
 
#define DIGIIO_SET_OUT_SET_DI3_MASK   0x40
 
#define DIGIIO_SET_OUT_SET_DI2_OUTPUT   0x00
 
#define DIGIIO_SET_OUT_SET_DI2_INPUT   0x20
 
#define DIGIIO_SET_OUT_SET_DI2_MASK   0x20
 
#define DIGIIO_SET_OUT_SET_DI1_OUTPUT   0x00
 
#define DIGIIO_SET_OUT_SET_DI1_INPUT   0x10
 
#define DIGIIO_SET_OUT_SET_DI1_MASK   0x10
 
#define DIGIIO_SET_OUT_HIGH_O4_LOW   0x00
 
#define DIGIIO_SET_OUT_HIGH_O4_HIGH   0x08
 
#define DIGIIO_SET_OUT_HIGH_O4_MASK   0x08
 
#define DIGIIO_SET_OUT_HIGH_O3_LOW   0x00
 
#define DIGIIO_SET_OUT_HIGH_O3_HIGH   0x04
 
#define DIGIIO_SET_OUT_HIGH_O3_MASK   0x04
 
#define DIGIIO_SET_OUT_HIGH_O2_LOW   0x00
 
#define DIGIIO_SET_OUT_HIGH_O2_HIGH   0x02
 
#define DIGIIO_SET_OUT_HIGH_O2_MASK   0x02
 
#define DIGIIO_SET_OUT_HIGH_O1_LOW   0x00
 
#define DIGIIO_SET_OUT_HIGH_O1_HIGH   0x01
 
#define DIGIIO_SET_OUT_HIGH_O1_MASK   0x01
 
#define DIGIIO_SET_LED_SLED4_OFF   0x00
 DIGI IO SET_LED register setting. More...
 
#define DIGIIO_SET_LED_SLED4_ON   0x80
 
#define DIGIIO_SET_LED_SLED4_MASK   0x80
 
#define DIGIIO_SET_LED_SLED3_OFF   0x00
 
#define DIGIIO_SET_LED_SLED3_ON   0x40
 
#define DIGIIO_SET_LED_SLED3_MASK   0x40
 
#define DIGIIO_SET_LED_SLED2_OFF   0x00
 
#define DIGIIO_SET_LED_SLED2_ON   0x20
 
#define DIGIIO_SET_LED_SLED2_MASK   0x20
 
#define DIGIIO_SET_LED_SLED1_OFF   0x00
 
#define DIGIIO_SET_LED_SLED1_ON   0x10
 
#define DIGIIO_SET_LED_SLED1_MASK   0x10
 
#define DIGIIO_SET_LED_FLED4_OFF   0x00
 
#define DIGIIO_SET_LED_FLED4_ON   0x08
 
#define DIGIIO_SET_LED_FLED4_MASK   0x08
 
#define DIGIIO_SET_LED_FLED3_OFF   0x00
 
#define DIGIIO_SET_LED_FLED3_ON   0x04
 
#define DIGIIO_SET_LED_FLED3_MASK   0x04
 
#define DIGIIO_SET_LED_FLED2_OFF   0x00
 
#define DIGIIO_SET_LED_FLED2_ON   0x02
 
#define DIGIIO_SET_LED_FLED2_MASK   0x02
 
#define DIGIIO_SET_LED_FLED1_OFF   0x00
 
#define DIGIIO_SET_LED_FLED1_ON   0x01
 
#define DIGIIO_SET_LED_FLED1_MASK   0x01
 
#define DIGIIO_DOI_LEVEL_SAFE_DEMAG_F4   0x80
 DIGI IO DOI_LEVEL register setting. More...
 
#define DIGIIO_DOI_LEVEL_SAFE_DEMAG_F3   0x40
 
#define DIGIIO_DOI_LEVEL_SAFE_DEMAG_F2   0x20
 
#define DIGIIO_DOI_LEVEL_SAFE_DEMAG_F1   0x10
 
#define DIGIIO_DOI_LEVEL_DOI4   0x08
 
#define DIGIIO_DOI_LEVEL_DOI3   0x04
 
#define DIGIIO_DOI_LEVEL_DOI2   0x02
 
#define DIGIIO_DOI_LEVEL_DOI1   0x01
 
#define DIGIIO_INTERRUPT_COMM_ERR   0x80
 DIGI IO INTERRUPT register setting. More...
 
#define DIGIIO_INTERRUPT_SUPPLY_ERR   0x40
 
#define DIGIIO_INTERRUPT_DEMAG_FAULT   0x20
 
#define DIGIIO_INTERRUPT_SHT_VDD_FAULT   0x10
 
#define DIGIIO_INTERRUPT_ABOVE_VDD_FAULT   0x08
 
#define DIGIIO_INTERRUPT_OW_OFF_FAULT   0x04
 
#define DIGIIO_INTERRUPT_CURR_LIM   0x02
 
#define DIGIIO_INTERRUPT_OVER_LD_FAULT   0x01
 
#define DIGIIO_OVR_LD_CH_F_CL4   0x80
 DIGI IO OVR_LD_CH_F register setting. More...
 
#define DIGIIO_OVR_LD_CH_F_CL3   0x40
 
#define DIGIIO_OVR_LD_CH_F_CL2   0x20
 
#define DIGIIO_OVR_LD_CH_F_CL1   0x10
 
#define DIGIIO_OVR_LD_CH_F_OVL4   0x08
 
#define DIGIIO_OVR_LD_CH_F_OVL3   0x04
 
#define DIGIIO_OVR_LD_CH_F_OVL2   0x02
 
#define DIGIIO_OVR_LD_CH_F_OVL1   0x01
 
#define DIGIIO_OPN_WIR_CH_F_ABOVE_VDD4   0x80
 DIGI IO OPN_WIR_CH_F register setting. More...
 
#define DIGIIO_OPN_WIR_CH_F_ABOVE_VDD3   0x40
 
#define DIGIIO_OPN_WIR_CH_F_ABOVE_VDD2   0x20
 
#define DIGIIO_OPN_WIR_CH_F_ABOVE_VDD1   0x10
 
#define DIGIIO_OPN_WIR_CH_F_OW_OFF4   0x08
 
#define DIGIIO_OPN_WIR_CH_F_OW_OFF3   0x04
 
#define DIGIIO_OPN_WIR_CH_F_OW_OFF2   0x02
 
#define DIGIIO_OPN_WIR_CH_F_OW_OFF1   0x01
 
#define DIGIIO_SHT_VDD_CH_F_VDD_OV4   0x80
 DIGI IO SHT_VDD_CH_F register setting. More...
 
#define DIGIIO_SHT_VDD_CH_F_VDD_OV3   0x40
 
#define DIGIIO_SHT_VDD_CH_F_VDD_OV2   0x20
 
#define DIGIIO_SHT_VDD_CH_F_VDD_OV1   0x10
 
#define DIGIIO_SHT_VDD_CH_F_SH_VDD4   0x08
 
#define DIGIIO_SHT_VDD_CH_F_SH_VDD3   0x04
 
#define DIGIIO_SHT_VDD_CH_F_SH_VDD2   0x02
 
#define DIGIIO_SHT_VDD_CH_F_SH_VDD1   0x01
 
#define DIGIIO_GLOBAL_ERR_W_DOG_ERR   0x80
 DIGI IO GLOBAL_ERR register setting. More...
 
#define DIGIIO_GLOBAL_ERR_LOSS_GND   0x40
 
#define DIGIIO_GLOBAL_ERR_THRM_SHUTD   0x20
 
#define DIGIIO_GLOBAL_ERR_VDD_UVLO   0x10
 
#define DIGIIO_GLOBAL_ERR_VDD_WARN   0x08
 
#define DIGIIO_GLOBAL_ERR_VDD_LOW   0x04
 
#define DIGIIO_GLOBAL_ERR_V5_UVLO   0x02
 
#define DIGIIO_GLOBAL_ERR_VINT_UV   0x01
 
#define DIGIIO_OPN_WR_EN_G_DRV_EN4_OFF   0x00
 DIGI IO OPN_WR_EN register setting. More...
 
#define DIGIIO_OPN_WR_EN_G_DRV_EN4_ON   0x80
 
#define DIGIIO_OPN_WR_EN_G_DRV_EN4_MASK   0x80
 
#define DIGIIO_OPN_WR_EN_G_DRV_EN3_OFF   0x00
 
#define DIGIIO_OPN_WR_EN_G_DRV_EN3_ON   0x40
 
#define DIGIIO_OPN_WR_EN_G_DRV_EN3_MASK   0x40
 
#define DIGIIO_OPN_WR_EN_G_DRV_EN2_OFF   0x00
 
#define DIGIIO_OPN_WR_EN_G_DRV_EN2_ON   0x20
 
#define DIGIIO_OPN_WR_EN_G_DRV_EN2_MASK   0x20
 
#define DIGIIO_OPN_WR_EN_G_DRV_EN1_OFF   0x00
 
#define DIGIIO_OPN_WR_EN_G_DRV_EN1_ON   0x10
 
#define DIGIIO_OPN_WR_EN_G_DRV_EN1_MASK   0x10
 
#define DIGIIO_OPN_WR_EN_OW_OFF_EN4_OFF   0x00
 
#define DIGIIO_OPN_WR_EN_OW_OFF_EN4_ON   0x08
 
#define DIGIIO_OPN_WR_EN_OW_OFF_EN4_MASK   0x08
 
#define DIGIIO_OPN_WR_EN_OW_OFF_EN3_OFF   0x00
 
#define DIGIIO_OPN_WR_EN_OW_OFF_EN3_ON   0x04
 
#define DIGIIO_OPN_WR_EN_OW_OFF_EN3_MASK   0x04
 
#define DIGIIO_OPN_WR_EN_OW_OFF_EN2_OFF   0x00
 
#define DIGIIO_OPN_WR_EN_OW_OFF_EN2_ON   0x02
 
#define DIGIIO_OPN_WR_EN_OW_OFF_EN2_MASK   0x02
 
#define DIGIIO_OPN_WR_EN_OW_OFF_EN1_OFF   0x00
 
#define DIGIIO_OPN_WR_EN_OW_OFF_EN1_ON   0x01
 
#define DIGIIO_OPN_WR_EN_OW_OFF_EN1_MASK   0x01
 
#define DIGIIO_SHT_VDD_EN_VDD_OV_EN4_OFF   0x00
 DIGI IO SHT_VDD_EN register setting. More...
 
#define DIGIIO_SHT_VDD_EN_VDD_OV_EN4_ON   0x80
 
#define DIGIIO_SHT_VDD_EN_VDD_OV_EN4_MASK   0x80
 
#define DIGIIO_SHT_VDD_EN_VDD_OV_EN3_OFF   0x00
 
#define DIGIIO_SHT_VDD_EN_VDD_OV_EN3_ON   0x40
 
#define DIGIIO_SHT_VDD_EN_VDD_OV_EN3_MASK   0x40
 
#define DIGIIO_SHT_VDD_EN_VDD_OV_EN2_OFF   0x00
 
#define DIGIIO_SHT_VDD_EN_VDD_OV_EN2_ON   0x20
 
#define DIGIIO_SHT_VDD_EN_VDD_OV_EN2_MASK   0x20
 
#define DIGIIO_SHT_VDD_EN_VDD_OV_EN1_OFF   0x00
 
#define DIGIIO_SHT_VDD_EN_VDD_OV_EN1_ON   0x10
 
#define DIGIIO_SHT_VDD_EN_VDD_OV_EN1_MASK   0x10
 
#define DIGIIO_SHT_VDD_EN_SH_VDD_EN4_OFF   0x00
 
#define DIGIIO_SHT_VDD_EN_SH_VDD_EN4_ON   0x08
 
#define DIGIIO_SHT_VDD_EN_SH_VDD_EN4_MASK   0x08
 
#define DIGIIO_SHT_VDD_EN_SH_VDD_EN3_OFF   0x00
 
#define DIGIIO_SHT_VDD_EN_SH_VDD_EN3_ON   0x04
 
#define DIGIIO_SHT_VDD_EN_SH_VDD_EN3_MASK   0x04
 
#define DIGIIO_SHT_VDD_EN_SH_VDD_EN2_OFF   0x00
 
#define DIGIIO_SHT_VDD_EN_SH_VDD_EN2_ON   0x02
 
#define DIGIIO_SHT_VDD_EN_SH_VDD_EN2_MASK   0x02
 
#define DIGIIO_SHT_VDD_EN_SH_VDD_EN1_OFF   0x00
 
#define DIGIIO_SHT_VDD_EN_SH_VDD_EN1_ON   0x01
 
#define DIGIIO_SHT_VDD_EN_SH_VDD_EN1_MASK   0x01
 
#define DIGIIO_CONFIG_1_LED_CURR_LIM_OFF   0x00
 DIGI IO CONFIG_1 register setting. More...
 
#define DIGIIO_CONFIG_1_LED_CURR_LIM_ON   0x80
 
#define DIGIIO_CONFIG_1_LED_CURR_LIM_MASK   0x80
 
#define DIGIIO_CONFIG_1_FLATCH_EN_OFF   0x00
 
#define DIGIIO_CONFIG_1_FLATCH_EN_ON   0x40
 
#define DIGIIO_CONFIG_1_FLATCH_EN_MASK   0x40
 
#define DIGIIO_CONFIG_1_FILTER_LONG_4_MS   0x00
 
#define DIGIIO_CONFIG_1_FILTER_LONG_8_MS   0x20
 
#define DIGIIO_CONFIG_1_FILTER_LONG_MASK   0x20
 
#define DIGIIO_CONFIG_1_FFILTER_EN_OFF   0x00
 
#define DIGIIO_CONFIG_1_FFILTER_EN_ON   0x10
 
#define DIGIIO_CONFIG_1_FFILTER_EN_MASK   0x10
 
#define DIGIIO_CONFIG_1_FLED_STRETCH_OFF   0x00
 
#define DIGIIO_CONFIG_1_FLED_STRETCH_1_S   0x04
 
#define DIGIIO_CONFIG_1_FLED_STRETCH_2_S   0x08
 
#define DIGIIO_CONFIG_1_FLED_STRETCH_3_S   0x0C
 
#define DIGIIO_CONFIG_1_FLED_STRETCH_MASK   0x0C
 
#define DIGIIO_CONFIG_1_SLED_SET_DOI   0x00
 
#define DIGIIO_CONFIG_1_SLED_SET_REG   0x02
 
#define DIGIIO_CONFIG_1_SLED_SET_MASK   0x02
 
#define DIGIIO_CONFIG_1_FLED_SET_DOI   0x00
 
#define DIGIIO_CONFIG_1_FLED_SET_REG   0x01
 
#define DIGIIO_CONFIG_1_FLED_SET_MASK   0x01
 
#define DIGIIO_CONFIG_2_WDTO_OFF   0x00
 DIGI IO CONFIG_2 register setting. More...
 
#define DIGIIO_CONFIG_2_WDTO_200_MS   0x40
 
#define DIGIIO_CONFIG_2_WDTO_600_MS   0x80
 
#define DIGIIO_CONFIG_2_WDTO_1200_MS   0xC0
 
#define DIGIIO_CONFIG_2_WDTO_MASK   0xC0
 
#define DIGIIO_CONFIG_2_OW_OFF_C_S_60_UA   0x00
 
#define DIGIIO_CONFIG_2_OW_OFF_C_S_100_UA   0x10
 
#define DIGIIO_CONFIG_2_OW_OFF_C_S_300_UA   0x20
 
#define DIGIIO_CONFIG_2_OW_OFF_C_S_600_UA   0x30
 
#define DIGIIO_CONFIG_2_OW_OFF_C_S_MASK   0x30
 
#define DIGIIO_CONFIG_2_SHT_VDD_THR_9_V   0x00
 
#define DIGIIO_CONFIG_2_SHT_VDD_THR_10_V   0x04
 
#define DIGIIO_CONFIG_2_SHT_VDD_THR_12_V   0x08
 
#define DIGIIO_CONFIG_2_SHT_VDD_THR_14_V   0x0C
 
#define DIGIIO_CONFIG_2_SHT_VDD_THR_MASK   0x0C
 
#define DIGIIO_CONFIG_2_SYNCH_WD_EN_OFF   0x00
 
#define DIGIIO_CONFIG_2_SYNCH_WD_EN_ON   0x02
 
#define DIGIIO_CONFIG_2_SYNCH_WD_EN_MASK   0x02
 
#define DIGIIO_CONFIG_2_VDD_ON_THR_OFF   0x00
 
#define DIGIIO_CONFIG_2_VDD_ON_THR_ON   0x01
 
#define DIGIIO_CONFIG_2_VDD_ON_THR_MASK   0x01
 
#define DIGIIO_CONFIG_DI_TYP_2_DI_TYPE_1_3   0x00
 DIGI IO CONFIG_DI register setting. More...
 
#define DIGIIO_CONFIG_DI_TYP_2_DI_TYPE_2   0x80
 
#define DIGIIO_CONFIG_DI_TYP_2_DI_MASK   0x80
 
#define DIGIIO_CONFIG_DI_VDD_FAULT_DIS_OFF   0x00
 
#define DIGIIO_CONFIG_DI_VDD_FAULT_DIS_ON   0x20
 
#define DIGIIO_CONFIG_DI_VDD_FAULT_DIS_MASK   0x20
 
#define DIGIIO_CONFIG_DI_VDD_FAULT_SEL_DOI   0x00
 
#define DIGIIO_CONFIG_DI_VDD_FAULT_SEL_VDDOK   0x10
 
#define DIGIIO_CONFIG_DI_VDD_FAULT_SEL_MASK   0x10
 
#define DIGIIO_CONFIG_DI_ABOVE_VDD_PROT_EN_OFF   0x00
 
#define DIGIIO_CONFIG_DI_ABOVE_VDD_PROT_EN_ON   0x08
 
#define DIGIIO_CONFIG_DI_ABOVE_VDD_PROT_EN_MASK   0x08
 
#define DIGIIO_CONFIG_DI_OVL_STRETCH_EN_OFF   0x00
 
#define DIGIIO_CONFIG_DI_OVL_STRETCH_EN_ON   0x04
 
#define DIGIIO_CONFIG_DI_OVL_STRETCH_EN_MASK   0x04
 
#define DIGIIO_CONFIG_DI_OVL_BLANK_OFF   0x00
 
#define DIGIIO_CONFIG_DI_OVL_BLANK_8_MS   0x01
 
#define DIGIIO_CONFIG_DI_OVL_BLANK_50_MS   0x02
 
#define DIGIIO_CONFIG_DI_OVL_BLANK_300_MS   0x03
 
#define DIGIIO_CONFIG_DI_OVL_BLANK_MASK   0x03
 
#define DIGIIO_CONFIG_DO_MODE4_HIGH_SIDE   0x00
 DIGI IO CONFIG_DO register setting. More...
 
#define DIGIIO_CONFIG_DO_MODE4_HIGH_SIDE_2X   0x40
 
#define DIGIIO_CONFIG_DO_MODE4_ACTIVE_CLAMP_PP   0x80
 
#define DIGIIO_CONFIG_DO_MODE4_SIMPLE_PP   0xC0
 
#define DIGIIO_CONFIG_DO_MODE4_MASK   0xC0
 
#define DIGIIO_CONFIG_DO_MODE3_HIGH_SIDE   0x00
 
#define DIGIIO_CONFIG_DO_MODE3_HIGH_SIDE_2X   0x10
 
#define DIGIIO_CONFIG_DO_MODE3_ACTIVE_CLAMP_PP   0x20
 
#define DIGIIO_CONFIG_DO_MODE3_SIMPLE_PP   0x30
 
#define DIGIIO_CONFIG_DO_MODE3_MASK   0x30
 
#define DIGIIO_CONFIG_DO_MODE2_HIGH_SIDE   0x00
 
#define DIGIIO_CONFIG_DO_MODE2_HIGH_SIDE_2X   0x04
 
#define DIGIIO_CONFIG_DO_MODE2_ACTIVE_CLAMP_PP   0x08
 
#define DIGIIO_CONFIG_DO_MODE2_SIMPLE_PP   0x0C
 
#define DIGIIO_CONFIG_DO_MODE2_MASK   0x0C
 
#define DIGIIO_CONFIG_DO_MODE1_HIGH_SIDE   0x00
 
#define DIGIIO_CONFIG_DO_MODE1_HIGH_SIDE_2X   0x01
 
#define DIGIIO_CONFIG_DO_MODE1_ACTIVE_CLAMP_PP   0x02
 
#define DIGIIO_CONFIG_DO_MODE1_SIMPLE_PP   0x03
 
#define DIGIIO_CONFIG_DO_MODE1_MASK   0x03
 
#define DIGIIO_CURR_LIM_CL4_600_MA   0x00
 DIGI IO CURR_LIM register setting. More...
 
#define DIGIIO_CURR_LIM_CL4_130_MA   0x40
 
#define DIGIIO_CURR_LIM_CL4_300_MA   0x80
 
#define DIGIIO_CURR_LIM_CL4_1200_MA   0xC0
 
#define DIGIIO_CURR_LIM_CL4_MASK   0xC0
 
#define DIGIIO_CURR_LIM_CL3_600_MA   0x00
 
#define DIGIIO_CURR_LIM_CL3_130_MA   0x10
 
#define DIGIIO_CURR_LIM_CL3_300_MA   0x20
 
#define DIGIIO_CURR_LIM_CL3_1200_MA   0x30
 
#define DIGIIO_CURR_LIM_CL3_MASK   0x30
 
#define DIGIIO_CURR_LIM_CL2_600_MA   0x00
 
#define DIGIIO_CURR_LIM_CL2_130_MA   0x04
 
#define DIGIIO_CURR_LIM_CL2_300_MA   0x08
 
#define DIGIIO_CURR_LIM_CL2_1200_MA   0x0C
 
#define DIGIIO_CURR_LIM_CL2_MASK   0x0C
 
#define DIGIIO_CURR_LIM_CL1_600_MA   0x00
 
#define DIGIIO_CURR_LIM_CL1_130_MA   0x01
 
#define DIGIIO_CURR_LIM_CL1_300_MA   0x02
 
#define DIGIIO_CURR_LIM_CL1_1200_MA   0x03
 
#define DIGIIO_CURR_LIM_CL1_MASK   0x03
 
#define DIGIIO_MASK_COMM_ERR_M   0x80
 DIGI IO MASK register setting. More...
 
#define DIGIIO_MASK_SUPPLY_ERR_M   0x40
 
#define DIGIIO_MASK_VDD_OK_M   0x20
 
#define DIGIIO_MASK_SHT_VDD_M   0x10
 
#define DIGIIO_MASK_ABOVE_VDD_M   0x08
 
#define DIGIIO_MASK_OW_OFF_M   0x04
 
#define DIGIIO_MASK_CURR_LIM_M   0x02
 
#define DIGIIO_MASK_OVER_LD_M   0x01
 
#define DIGIIO_CRC_ENABLED   0x01
 DIGI IO CRC Settings setting. More...
 
#define DIGIIO_CRC_DISABLED   0x00
 
#define DIGIIO_DEVICE_ADDRESS_0   0x00
 DIGI IO chip address setting. More...
 
#define DIGIIO_DEVICE_ADDRESS_1   0x40
 
#define DIGIIO_DEVICE_ADDRESS_2   0x80
 
#define DIGIIO_DEVICE_ADDRESS_3   0xC0
 
#define DIGIIO_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection. More...
 
#define DIGIIO_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define DIGIIO_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  digiio_return_value_t { DIGIIO_OK = 0, DIGIIO_ERROR = -1 }
 DIGI IO Click return value data. More...
 

Functions

void digiio_cfg_setup (digiio_cfg_t *cfg)
 DIGI IO configuration object setup function. More...
 
err_t digiio_init (digiio_t *ctx, digiio_cfg_t *cfg)
 DIGI IO initialization function. More...
 
err_t digiio_default_cfg (digiio_t *ctx)
 DIGI IO default configuration function. More...
 
void digiio_set_address (digiio_t *ctx, uint8_t device_address)
 DIGI IO set address function. More...
 
err_t digiio_write_reg (digiio_t *ctx, uint8_t reg, uint8_t data_in)
 DIGI IO write reg function. More...
 
err_t digiio_read_reg (digiio_t *ctx, uint8_t reg, uint8_t *data_out)
 DIGI IO read reg function. More...
 
void digiio_enable_output (digiio_t *ctx)
 DIGI IO enable output function. More...
 
void digiio_disable_output (digiio_t *ctx)
 DIGI IO disable output function. More...
 
void digiio_sync_io (digiio_t *ctx)
 DIGI IO sync io function. More...
 
void digiio_set_sync_pin (digiio_t *ctx, uint8_t state)
 DIGI IO set sync pin function. More...
 
uint8_t digiio_get_ready_pin (digiio_t *ctx)
 DIGI IO get ready pin function. More...
 
uint8_t digiio_get_fault_pin (digiio_t *ctx)
 DIGI IO get fault pin function. More...
 

Detailed Description

This file contains API for DIGI IO Click Driver.

Enumeration Type Documentation

◆ digiio_return_value_t

DIGI IO Click return value data.

Predefined enum values for driver return values.

Enumerator
DIGIIO_OK 
DIGIIO_ERROR