digiisolator 2.1.0.0
digiisolator.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  digiisolator_t
 DIGI Isolator Click context object. More...
 
struct  digiisolator_cfg_t
 DIGI Isolator Click configuration object. More...
 

Macros

#define DIGIISOLATOR_VREF_3V3   3.3
 DIGI Isolator ADC setting.
 
#define DIGIISOLATOR_VREF_5V   5.0
 
#define DIGIISOLATOR_TX_DRV_BUFFER_SIZE   100
 DIGI Isolator driver buffer size.
 
#define DIGIISOLATOR_RX_DRV_BUFFER_SIZE   300
 
#define DIGIISOLATOR_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define DIGIISOLATOR_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define DIGIISOLATOR_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  digiisolator_return_value_t { DIGIISOLATOR_OK = 0 , DIGIISOLATOR_ERROR = -1 }
 DIGI Isolator Click return value data. More...
 

Functions

void digiisolator_cfg_setup (digiisolator_cfg_t *cfg)
 DIGI Isolator configuration object setup function.
 
err_t digiisolator_init (digiisolator_t *ctx, digiisolator_cfg_t *cfg)
 DIGI Isolator initialization function.
 
err_t digiisolator_spi_write (digiisolator_t *ctx, uint8_t *data_in, uint8_t len)
 DIGI Isolator SPI data writing function.
 
err_t digiisolator_spi_read (digiisolator_t *ctx, uint8_t *data_out, uint8_t len)
 DIGI Isolator SPI data reading function.
 
err_t digiisolator_spi_write_read (digiisolator_t *ctx, uint8_t *data_in, uint8_t len_in, uint8_t *data_out, uint8_t len_out)
 DIGI Isolator SPI write then read function.
 
err_t digiisolator_spi_transfer (digiisolator_t *ctx, uint8_t *data_in, uint8_t *data_out, uint8_t len)
 DIGI Isolator SPI transfer function.
 
err_t digiisolator_uart_write (digiisolator_t *ctx, char *data_in, uint16_t len)
 DIGI Isolator UART data writing function.
 
err_t digiisolator_uart_read (digiisolator_t *ctx, char *data_out, uint16_t len)
 DIGI Isolator UART data reading function.
 
err_t digiisolator_get_d1_pin_value (digiisolator_t *ctx, uint16_t *data_out)
 DIGI Isolator read D1 pin value function.
 
err_t digiisolator_get_d1_pin_voltage (digiisolator_t *ctx, float *data_out)
 DIGI Isolator read D1 pin voltage level function.
 
uint8_t digiisolator_get_d2 (digiisolator_t *ctx)
 DIGI Isolator get D2 function.
 

Detailed Description

This file contains API for DIGI Isolator Click Driver.

Enumeration Type Documentation

◆ digiisolator_return_value_t

DIGI Isolator Click return value data.

Predefined enum values for driver return values.

Enumerator
DIGIISOLATOR_OK 
DIGIISOLATOR_ERROR