spiisolator2 2.0.0.0
spiisolator2.h File Reference

This file contains API for SPI Isolator 2 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  spiisolator2_t
 SPI Isolator 2 Click context object. More...
 
struct  spiisolator2_cfg_t
 SPI Isolator 2 Click configuration object. More...
 

Macros

#define SPIISOLATOR2_EEPROM5_CMD_WREN   0x06
 SPI Isolator 2 description setting.
 
#define SPIISOLATOR2_EEPROM5_CMD_WRDI   0x04
 
#define SPIISOLATOR2_EEPROM5_CMD_RDSR   0x05
 
#define SPIISOLATOR2_EEPROM5_CMD_WRSR   0x01
 
#define SPIISOLATOR2_EEPROM5_CMD_READ   0x03
 
#define SPIISOLATOR2_EEPROM5_CMD_WRITE   0x02
 
#define SPIISOLATOR2_EEPROM5_CMD_READ_ID   0x83
 
#define SPIISOLATOR2_EEPROM5_CMD_WRITE_ID   0x82
 
#define SPIISOLATOR2_EEPROM5_CMD_READ_LOCK_STATUS   0x83
 
#define SPIISOLATOR2_EEPROM5_CMD_LOCK_ID   0x82
 
#define SPIISOLATOR2_OUT_DISABLE   0x00
 
#define SPIISOLATOR2_OUT_ENABLE   0x01
 
#define SPIISOLATOR2_DUMMY   0x00
 
#define SPIISOLATOR2_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  spiisolator2_return_value_t { SPIISOLATOR2_OK = 0 , SPIISOLATOR2_ERROR = -1 }
 SPI Isolator 2 Click return value data. More...
 

Functions

void spiisolator2_cfg_setup (spiisolator2_cfg_t *cfg)
 SPI Isolator 2 configuration object setup function.
 
err_t spiisolator2_init (spiisolator2_t *ctx, spiisolator2_cfg_t *cfg)
 SPI Isolator 2 initialization function.
 
err_t spiisolator2_generic_write (spiisolator2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 SPI Isolator 2 data writing function.
 
err_t spiisolator2_generic_read (spiisolator2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 SPI Isolator 2 data reading function.
 
void spiisolator2_output_enable (spiisolator2_t *ctx, uint8_t en_out)
 SPI Isolator 2 output enable function.
 
void spiisolator2_set_cmd (spiisolator2_t *ctx, uint8_t cmd)
 SPI Isolator 2 send command function.
 
void spiisolator2_write_byte (spiisolator2_t *ctx, uint8_t reg, uint8_t tx_data)
 SPI Isolator 2 write the byte of data function.
 
uint8_t spiisolator2_read_byte (spiisolator2_t *ctx, uint8_t reg)
 SPI Isolator 2 read the byte of data function.
 
void spiisolator2_burst_write (spiisolator2_t *ctx, uint8_t reg, uint8_t *p_tx_data, uint8_t n_bytes)
 SPI Isolator 2 burst write function.
 
void spiisolator2_burst_read (spiisolator2_t *ctx, uint8_t reg, uint8_t *p_rx_data, uint8_t n_bytes)
 SPI Isolator 2 burst read function.
 
void spiisolator2_multi_write (spiisolator2_t *ctx, uint32_t addr, uint8_t addr_n_bytes, uint8_t *p_tx_data, uint8_t tx_data_n_bytes)
 SPI Isolator 2 multi write function.
 
void spiisolator2_multi_read (spiisolator2_t *ctx, uint32_t addr, uint8_t addr_n_bytes, uint8_t *p_rx_data, uint8_t tx_data_n_bytes)
 SPI Isolator 2 multi read function.
 

Detailed Description

This file contains API for SPI Isolator 2 Click Driver.

Enumeration Type Documentation

◆ spiisolator2_return_value_t

SPI Isolator 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
SPIISOLATOR2_OK 
SPIISOLATOR2_ERROR