i2c1wire 2.0.0.0
i2c1wire.h File Reference

This file contains API for I2C 1 Wire 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  i2c1wire_t
 Click ctx object definition. More...
 
struct  i2c1wire_cfg_t
 Click configuration structure definition. More...
 

Macros

#define I2C1WIRE_MAP_MIKROBUS(cfg, mikrobus)
 
#define I2C1WIRE_OK   0
 
#define I2C1WIRE_ERROR   -1
 
#define I2C1WIRE_RESULT_ERROR   0x00
 
#define I2C1WIRE_RESULT_OK   0x01
 
#define I2C1WIRE_WIRE_RESULT_OK   0xFF
 
#define I2C1WIRE_I2C_ADDRESS_0   0x18
 
#define I2C1WIRE_I2C_ADDRESS_1   0x19
 
#define I2C1WIRE_I2C_ADDRESS_2   0x1A
 
#define I2C1WIRE_I2C_ADDRESS_3   0x1B
 
#define I2C1WIRE_I2C_ADDRESS_4   0x1C
 
#define I2C1WIRE_I2C_ADDRESS_5   0x1D
 
#define I2C1WIRE_I2C_ADDRESS_6   0x1E
 
#define I2C1WIRE_I2C_ADDRESS_7   0x1F
 
#define I2C1WIRE_COMMAND_RESET   0xF0
 
#define I2C1WIRE_COMMAND_SRP   0xE1
 
#define I2C1WIRE_POINTER_STATUS   0xF0
 
#define I2C1WIRE_STATUS_BUSY   0x01
 
#define I2C1WIRE_STATUS_PPD   0x02
 
#define I2C1WIRE_STATUS_SD   0x04
 
#define I2C1WIRE_STATUS_LL   0x08
 
#define I2C1WIRE_STATUS_RST   0x10
 
#define I2C1WIRE_STATUS_SBR   0x20
 
#define I2C1WIRE_STATUS_TSB   0x40
 
#define I2C1WIRE_STATUS_DIR   0x80
 
#define I2C1WIRE_POINTER_DATA   0xE1
 
#define I2C1WIRE_POINTER_CONFIG   0xC3
 
#define I2C1WIRE_CONFIG_APU_HIGH   0x30
 
#define I2C1WIRE_CONFIG_APU_LOW   0x01
 
#define I2C1WIRE_CONFIG_SPU_HIGH   0x60
 
#define I2C1WIRE_CONFIG_SPU_LOW   0x04
 
#define I2C1WIRE_CONFIG_1WS_HIGH   0xA0
 
#define I2C1WIRE_CONFIG_1WS_LOW   0x08
 
#define I2C1WIRE_COMMAND_WRITECONFIG   0xD2
 
#define I2C1WIRE_COMMAND_RESETWIRE   0xB4
 
#define I2C1WIRE_COMMAND_WRITEBYTE   0xA5
 
#define I2C1WIRE_COMMAND_READBYTE   0x96
 
#define I2C1WIRE_COMMAND_SINGLEBIT   0x87
 
#define I2C1WIRE_COMMAND_TRIPLET   0x78
 
#define I2C1WIRE_WIRE_COMMAND_SKIP   0xCC
 
#define I2C1WIRE_WIRE_COMMAND_SELECT   0x55
 
#define I2C1WIRE_WIRE_COMMAND_READ_ROM   0x33
 
#define I2C1WIRE_WIRE_COMMAND_SEARCH   0xF0
 
#define I2C1WIRE_ERROR_TIMEOUT   0x01
 
#define I2C1WIRE_ERROR_SHORT   0x02
 
#define I2C1WIRE_ERROR_CONFIG   0x04
 
#define I2C1WIRE_CMD_CHSL   0xC3
 
#define I2C1WIRE_CH_IO0   0xF0
 
#define I2C1WIRE_CH_IO1   0xE1
 
#define I2C1WIRE_CH_IO2   0xD2
 
#define I2C1WIRE_CH_IO3   0xC3
 
#define I2C1WIRE_CH_IO4   0xB4
 
#define I2C1WIRE_CH_IO5   0xA5
 
#define I2C1WIRE_CH_IO6   0x96
 
#define I2C1WIRE_CH_IO7   0x87
 
#define I2C1WIRE_RCH_IO0   0xB8
 
#define I2C1WIRE_RCH_IO1   0xB1
 
#define I2C1WIRE_RCH_IO2   0xAA
 
#define I2C1WIRE_RCH_IO3   0xA3
 
#define I2C1WIRE_RCH_IO4   0x9C
 
#define I2C1WIRE_RCH_IO5   0x95
 
#define I2C1WIRE_RCH_IO6   0x8E
 
#define I2C1WIRE_RCH_IO7   0x87
 

Functions

void i2c1wire_cfg_setup (i2c1wire_cfg_t *cfg)
 Config Object Initialization function.
 
err_t i2c1wire_init (i2c1wire_t *ctx, i2c1wire_cfg_t *cfg)
 Initialization function.
 
err_t i2c1wire_generic_write (i2c1wire_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Generic write function.
 
err_t i2c1wire_generic_read (i2c1wire_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Generic read function.
 
void i2c1wire_soft_reset (i2c1wire_t *ctx)
 Software reset function.
 
uint8_t i2c1wire_set_config (i2c1wire_t *ctx, uint8_t cfg)
 Set configuration function.
 
uint8_t i2c1wire_set_channel (i2c1wire_t *ctx, uint8_t chan)
 Set channel function.
 
void i2c1wire_set_read_pointer (i2c1wire_t *ctx, uint8_t ptr)
 Set read pointer function.
 
void i2c1wire_one_wire_reset (i2c1wire_t *ctx)
 Reset function.
 
void i2c1wire_write_byte_one_wire (i2c1wire_t *ctx, uint8_t input)
 Write byte function.
 
uint8_t i2c1wire_read_byte_one_wire (i2c1wire_t *ctx)
 Read byte function.
 

Detailed Description

This file contains API for I2C 1 Wire Click driver.