solidswitch3 2.0.0.0
solidswitch3.h File Reference

This file contains API for SolidSwitch 3 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  solidswitch3_t
 SolidSwitch 3 Click context object. More...
 
struct  solidswitch3_cfg_t
 SolidSwitch 3 Click configuration object. More...
 

Macros

#define SOLIDSWITCH3_CH_OUT1   0x01
 SolidSwitch3 channel selection.
 
#define SOLIDSWITCH3_CH_OUT2   0x02
 
#define SOLIDSWITCH3_CH_OUT3   0x04
 
#define SOLIDSWITCH3_CH_OUT4   0x08
 
#define SOLIDSWITCH3_CH_OUT5   0x10
 
#define SOLIDSWITCH3_CH_OUT6   0x20
 
#define SOLIDSWITCH3_CH_OUT7   0x40
 
#define SOLIDSWITCH3_CH_OUT8   0x80
 
#define SOLIDSWITCH3_ALL_CHANNELS   0xFF
 
#define SOLIDSWITCH3_DIR_MODE_SPI   0
 SolidSwitch 3 DIR mode settings.
 
#define SOLIDSWITCH3_DIR_MODE_GPIO   1
 
#define SOLIDSWITCH3_OUT_DISABLE   0u
 SolidSwitch 3 output settings.
 
#define SOLIDSWITCH3_OUT_IN_TERMINAL   1u
 
#define SOLIDSWITCH3_OUT_ENABLE   2u
 
#define SOLIDSWITCH3_OUT_BITS_MASK   3u
 
#define SOLIDSWITCH3_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define SOLIDSWITCH3_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define SOLIDSWITCH3_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  solidswitch3_return_value_t { SOLIDSWITCH3_OK = 0 , SOLIDSWITCH3_ERROR = -1 }
 SolidSwitch 3 Click return value data. More...
 

Functions

void solidswitch3_cfg_setup (solidswitch3_cfg_t *cfg)
 SolidSwitch 3 configuration object setup function.
 
err_t solidswitch3_init (solidswitch3_t *ctx, solidswitch3_cfg_t *cfg)
 SolidSwitch 3 initialization function.
 
err_t solidswitch3_default_cfg (solidswitch3_t *ctx)
 SolidSwitch 3 default configuration function.
 
err_t solidswitch3_write_data (solidswitch3_t *ctx, uint16_t data_in)
 SolidSwitch 3 write data function.
 
err_t solidswitch3_enable_output (solidswitch3_t *ctx, uint8_t channel)
 SolidSwitch 3 enable output function.
 
err_t solidswitch3_disable_output (solidswitch3_t *ctx, uint8_t channel)
 SolidSwitch 3 disable output function.
 
void solidswitch3_reset (solidswitch3_t *ctx)
 SolidSwitch 3 reset function.
 
void solidswitch3_set_dir_mode (solidswitch3_t *ctx, uint8_t dir_mode)
 SolidSwitch 3 set dir mode function.
 
void solidswitch3_set_rst_pin (solidswitch3_t *ctx, uint8_t state)
 SolidSwitch 3 set rst pin function.
 
void solidswitch3_set_in1_pin (solidswitch3_t *ctx, uint8_t state)
 SolidSwitch 3 set in1 pin function.
 
void solidswitch3_set_in2_pin (solidswitch3_t *ctx, uint8_t state)
 SolidSwitch 3 set in2 pin function.
 

Detailed Description

This file contains API for SolidSwitch 3 Click Driver.

Enumeration Type Documentation

◆ solidswitch3_return_value_t

SolidSwitch 3 Click return value data.

Predefined enum values for driver return values.

Enumerator
SOLIDSWITCH3_OK 
SOLIDSWITCH3_ERROR