mux5 2.1.0.0
|
This file contains API for MUX 5 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"
Go to the source code of this file.
Data Structures | |
struct | mux5_s |
MUX 5 Click context object. More... | |
struct | mux5_cfg_t |
MUX 5 Click configuration object. More... | |
Macros | |
#define | MUX5_REG_DIR0 0x00 |
MUX 5 I2C registers list. | |
#define | MUX5_REG_DIR1 0x01 |
#define | MUX5_REG_DIR2 0x02 |
#define | MUX5_REG_DIR3 0x03 |
#define | MUX5_REG_SHDW0 0x10 |
#define | MUX5_REG_SHDW1 0x11 |
#define | MUX5_REG_SHDW2 0x12 |
#define | MUX5_REG_SHDW3 0x13 |
#define | MUX5_REG_CMD_A 0x14 |
#define | MUX5_REG_CMD_B 0x15 |
#define | MUX5_I2C_DRIVER 0 |
MUX 5 driver interface selection setting. | |
#define | MUX5_SPI_DRIVER 1 |
#define | MUX5_DRIVER_SEL MUX5_I2C_DRIVER |
#define | MUX5_CHANNEL_1 0x0001 |
MUX 5 channel selection macros. | |
#define | MUX5_CHANNEL_2 0x0002 |
#define | MUX5_CHANNEL_3 0x0004 |
#define | MUX5_CHANNEL_4 0x0008 |
#define | MUX5_CHANNEL_5 0x0010 |
#define | MUX5_CHANNEL_6 0x0020 |
#define | MUX5_CHANNEL_7 0x0040 |
#define | MUX5_CHANNEL_8 0x0080 |
#define | MUX5_CHANNEL_9 0x0100 |
#define | MUX5_CHANNEL_10 0x0200 |
#define | MUX5_CHANNEL_11 0x0400 |
#define | MUX5_CHANNEL_12 0x0800 |
#define | MUX5_CHANNEL_13 0x1000 |
#define | MUX5_CHANNEL_14 0x2000 |
#define | MUX5_CHANNEL_15 0x4000 |
#define | MUX5_CHANNEL_16 0x8000 |
#define | MUX5_CHANNEL_ALL 0xFFFF |
#define | MUX5_CHANNEL_STATE_HIGH_Z 0 |
MUX 5 channel state macros. | |
#define | MUX5_CHANNEL_STATE_COM_A 1 |
#define | MUX5_CHANNEL_STATE_COM_B 2 |
#define | MUX5_CHANNEL_STATE_COM_AB 3 |
#define | MUX5_DEVICE_ADDRESS_0 0x4C |
MUX 5 device address setting. | |
#define | MUX5_DEVICE_ADDRESS_1 0x4D |
#define | MUX5_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE |
Data sample selection. | |
#define | MUX5_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE |
#define | MUX5_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Typedefs | |
typedef struct mux5_s | mux5_t |
MUX 5 Click context object. | |
Enumerations | |
enum | mux5_return_value_t { MUX5_OK = 0 , MUX5_ERROR = -1 } |
MUX 5 Click return value data. More... | |
Functions | |
void | mux5_cfg_setup (mux5_cfg_t *cfg) |
MUX 5 configuration object setup function. | |
err_t | mux5_init (mux5_t *ctx, mux5_cfg_t *cfg) |
MUX 5 initialization function. | |
err_t | mux5_default_cfg (mux5_t *ctx) |
MUX 5 default configuration function. | |
err_t | mux5_i2c_write_register (mux5_t *ctx, uint8_t reg, uint8_t data_in) |
MUX 5 I2C write register function. | |
err_t | mux5_i2c_read_register (mux5_t *ctx, uint8_t reg, uint8_t *data_out) |
MUX 5 I2C read register function. | |
err_t | mux5_set_channels_state (mux5_t *ctx, uint16_t ch_mask, uint8_t ch_state) |
MUX 5 set channels state function. | |
void | mux5_enable_device (mux5_t *ctx) |
MUX 5 enable device function. | |
void | mux5_disable_device (mux5_t *ctx) |
MUX 5 disable device function. | |
uint8_t | mux5_get_com_a_pin (mux5_t *ctx) |
MUX 5 get com a pin function. | |
uint8_t | mux5_get_com_b_pin (mux5_t *ctx) |
MUX 5 get com b pin function. | |
This file contains API for MUX 5 Click Driver.
MUX 5 Click context object.
Context object definition of MUX 5 Click driver.
enum mux5_return_value_t |