usbtoi2c2 2.0.0.0
usbtoi2c2.h File Reference

This file contains API for USB to I2C 2 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  usbtoi2c2_t
 USB to I2C 2 Click context object. More...
 
struct  usbtoi2c2_cfg_t
 USB to I2C 2 Click configuration object. More...
 

Macros

#define USBTOI2C2_CMD_SOFT_RESET   0x06
 USB to I2C 2 commands list.
 
#define USBTOI2C2_CMD_FLUSH_DATA   0x0E
 
#define USBTOI2C2_GENERAL_CALL_ADDRESS   0x00
 USB to I2C 2 device address setting.
 
#define USBTOI2C2_DEVICE_SLAVE_ADDRESS   0x22
 
#define USBTOI2C2_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  usbtoi2c2_return_value_t { USBTOI2C2_OK = 0 , USBTOI2C2_ERROR = -1 }
 USB to I2C 2 Click return value data. More...
 

Functions

void usbtoi2c2_cfg_setup (usbtoi2c2_cfg_t *cfg)
 USB to I2C 2 configuration object setup function.
 
err_t usbtoi2c2_init (usbtoi2c2_t *ctx, usbtoi2c2_cfg_t *cfg)
 USB to I2C 2 initialization function.
 
err_t usbtoi2c2_default_cfg (usbtoi2c2_t *ctx)
 USB to I2C 2 default configuration function.
 
err_t usbtoi2c2_write_data (usbtoi2c2_t *ctx, uint8_t *tx_buf, uint8_t tx_len)
 USB to I2C 2 write data function.
 
err_t usbtoi2c2_read_data (usbtoi2c2_t *ctx, uint8_t *rx_buf, uint8_t rx_len)
 USB to I2C 2 read data function.
 
void usbtoi2c2_reset_device (usbtoi2c2_t *ctx)
 USB to I2C 2 reset device function.
 
err_t usbtoi2c2_soft_reset (usbtoi2c2_t *ctx)
 USB to I2C 2 soft reset function.
 
err_t usbtoi2c2_flush_data (usbtoi2c2_t *ctx)
 USB to I2C 2 flush data function.
 

Detailed Description

This file contains API for USB to I2C 2 Click Driver.

Enumeration Type Documentation

◆ usbtoi2c2_return_value_t

USB to I2C 2 Click return value data.

Predefined enum values for driver return values.

Enumerator
USBTOI2C2_OK 
USBTOI2C2_ERROR