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

This file contains API for Expand 19 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  expand19_t
 Expand 19 Click context object. More...
 
struct  expand19_cfg_t
 Expand 19 Click configuration object. More...
 

Macros

#define EXPAND19_REG_INPUT_PORT   0x00
 Expand 19 register list. More...
 
#define EXPAND19_REG_OUTPUT_PORT   0x01
 
#define EXPAND19_REG_POLARITY_INV   0x02
 
#define EXPAND19_REG_CONFIG   0x03
 
#define EXPAND19_REG_OUTPUT_DRIVE_0   0x40
 
#define EXPAND19_REG_OUTPUT_DRIVE_1   0x41
 
#define EXPAND19_REG_INPUT_LATCH   0x42
 
#define EXPAND19_REG_PULL_ENABLE   0x43
 
#define EXPAND19_REG_PULL_SELECTION   0x44
 
#define EXPAND19_REG_INT_MASK   0x45
 
#define EXPAND19_REG_INT_STATUS   0x46
 
#define EXPAND19_REG_OUTPUT_PORT_CONFIG   0x4F
 
#define EXPAND19_NO_PIN_MASK   0x00
 Expand 19 pin mask values. More...
 
#define EXPAND19_PIN_0_MASK   0x01
 
#define EXPAND19_PIN_1_MASK   0x02
 
#define EXPAND19_PIN_2_MASK   0x04
 
#define EXPAND19_PIN_3_MASK   0x08
 
#define EXPAND19_PIN_4_MASK   0x10
 
#define EXPAND19_PIN_5_MASK   0x20
 
#define EXPAND19_PIN_6_MASK   0x40
 
#define EXPAND19_PIN_7_MASK   0x80
 
#define EXPAND19_ALL_PINS_MASK   0xFF
 
#define EXPAND19_OUTPUT_DIRECTION   0x00
 Expand 19 pin direction values. More...
 
#define EXPAND19_INPUT_DIRECTION   0x01
 
#define EXPAND19_PIN_LOW_LEVEL   0x00
 Expand 19 pin logic level values. More...
 
#define EXPAND19_PIN_HIGH_LEVEL   0x01
 
#define EXPAND19_DEVICE_ADDRESS_A1A0_00   0x70
 Expand 19 device address setting. More...
 
#define EXPAND19_DEVICE_ADDRESS_A1A0_01   0x71
 
#define EXPAND19_DEVICE_ADDRESS_A1A0_10   0x72
 
#define EXPAND19_DEVICE_ADDRESS_A1A0_11   0x73
 
#define EXPAND19_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  expand19_return_value_t { EXPAND19_OK = 0, EXPAND19_ERROR = -1 }
 Expand 19 Click return value data. More...
 

Functions

void expand19_cfg_setup (expand19_cfg_t *cfg)
 Expand 19 configuration object setup function. More...
 
err_t expand19_init (expand19_t *ctx, expand19_cfg_t *cfg)
 Expand 19 initialization function. More...
 
err_t expand19_default_cfg (expand19_t *ctx)
 Expand 19 default configuration function. More...
 
err_t expand19_write_register (expand19_t *ctx, uint8_t reg, uint8_t data_in)
 Expand 19 write register function. More...
 
err_t expand19_read_register (expand19_t *ctx, uint8_t reg, uint8_t *data_out)
 Expand 19 read register function. More...
 
void expand19_set_rst_pin (expand19_t *ctx, uint8_t state)
 Expand 19 set RST pin function. More...
 
void expand19_reset_device (expand19_t *ctx)
 Expand 19 reset device function. More...
 
uint8_t expand19_get_int_pin (expand19_t *ctx)
 Expand 19 get INT pin function. More...
 
err_t expand19_set_pin_direction (expand19_t *ctx, uint8_t direction, uint8_t pin_mask)
 Expand 19 set pin direction function. More...
 
err_t expand19_set_all_pins_direction (expand19_t *ctx, uint8_t direction)
 Expand 19 set all pins direction function. More...
 
err_t expand19_set_all_pins_value (expand19_t *ctx, uint8_t set_mask)
 Expand 19 set all pins value function. More...
 
err_t expand19_set_pin_value (expand19_t *ctx, uint8_t clr_mask, uint8_t set_mask)
 Expand 19 set pin value function. More...
 
err_t expand19_read_port_value (expand19_t *ctx, uint8_t *data_out)
 Expand 19 read port value function. More...
 

Detailed Description

This file contains API for Expand 19 Click Driver.

Enumeration Type Documentation

◆ expand19_return_value_t

Expand 19 Click return value data.

Predefined enum values for driver return values.

Enumerator
EXPAND19_OK 
EXPAND19_ERROR