i2c1wire 2.0.0.0

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

Function Documentation

◆ i2c1wire_cfg_setup()

void i2c1wire_cfg_setup ( i2c1wire_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ i2c1wire_generic_read()

err_t i2c1wire_generic_read ( i2c1wire_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_outOutput data buf
lenNumber of the bytes to be read

This function reads data from the desired register.

◆ i2c1wire_generic_write()

err_t i2c1wire_generic_write ( i2c1wire_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_inData buf to be written.
lenNumber of the bytes in data buf.

This function writes data to the desired register.

◆ i2c1wire_init()

err_t i2c1wire_init ( i2c1wire_t * ctx,
i2c1wire_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

This function initializes all necessary pins and peripherals used for this click.

◆ i2c1wire_one_wire_reset()

void i2c1wire_one_wire_reset ( i2c1wire_t * ctx)

Reset function.

Parameters
ctxClick object.

This function does a hardware reset of the click module.

◆ i2c1wire_read_byte_one_wire()

uint8_t i2c1wire_read_byte_one_wire ( i2c1wire_t * ctx)

Read byte function.

Parameters
ctxClick object.

This function reads one byte from the click module.

◆ i2c1wire_set_channel()

uint8_t i2c1wire_set_channel ( i2c1wire_t * ctx,
uint8_t chan )

Set channel function.

Parameters
ctxClick object.
chanChannel.

This function configures the click module using the specified settings.

◆ i2c1wire_set_config()

uint8_t i2c1wire_set_config ( i2c1wire_t * ctx,
uint8_t cfg )

Set configuration function.

Parameters
ctxClick object.
cfgConfiguration.

This function configures the click module using the specified settings.

◆ i2c1wire_set_read_pointer()

void i2c1wire_set_read_pointer ( i2c1wire_t * ctx,
uint8_t ptr )

Set read pointer function.

Parameters
ctxClick object.
ptrPointer.

This function sets the read pointer for the click module.

◆ i2c1wire_soft_reset()

void i2c1wire_soft_reset ( i2c1wire_t * ctx)

Software reset function.

Parameters
ctxClick object.

This function does a software reset of the click module.

◆ i2c1wire_write_byte_one_wire()

void i2c1wire_write_byte_one_wire ( i2c1wire_t * ctx,
uint8_t input )

Write byte function.

Parameters
ctxClick object.
inputWrite data.

This function writes one byte to the click module.