digipot14 2.1.0.0
DIGI POT 14 Click Driver

API for configuring and manipulating DIGI POT 14 Click driver. More...

Topics

 DIGI POT 14 Registers List
 List of registers of DIGI POT 14 Click driver.
 
 DIGI POT 14 Registers Settings
 Settings for registers of DIGI POT 14 Click driver.
 
 DIGI POT 14 MikroBUS Map
 MikroBUS pin mapping of DIGI POT 14 Click driver.
 

Functions

void digipot14_cfg_setup (digipot14_cfg_t *cfg)
 DIGI POT 14 configuration object setup function.
 
err_t digipot14_init (digipot14_t *ctx, digipot14_cfg_t *cfg)
 DIGI POT 14 initialization function.
 
err_t digipot14_default_cfg (digipot14_t *ctx)
 DIGI POT 14 default configuration function.
 
err_t digipot14_generic_write (digipot14_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 DIGI POT 14 I2C writing function.
 
err_t digipot14_generic_read (digipot14_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 DIGI POT 14 I2C reading function.
 
err_t digipot14_reg_write (digipot14_t *ctx, uint8_t reg, uint8_t data_in)
 DIGI POT 14 register write function.
 
err_t digipot14_reg_read (digipot14_t *ctx, uint8_t reg, uint8_t *data_out)
 DIGI POT 14 register reading function.
 
err_t digipot14_set_pot_a_wiper (digipot14_t *ctx, uint8_t wiper_pos)
 DIGI POT 14 set the wiper position of potentiometer A function.
 
err_t digipot14_set_pot_b_wiper (digipot14_t *ctx, uint8_t wiper_pos)
 DIGI POT 14 set the wiper position of potentiometer B function.
 

Detailed Description

API for configuring and manipulating DIGI POT 14 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ digipot14_cfg_setup()

void digipot14_cfg_setup ( digipot14_cfg_t * cfg)

DIGI POT 14 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See digipot14_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ digipot14_default_cfg()

err_t digipot14_default_cfg ( digipot14_t * ctx)

DIGI POT 14 default configuration function.

This function executes a default configuration of DIGI POT 14 click board.

Parameters
[in]ctx: Click context object. See digipot14_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ digipot14_generic_read()

err_t digipot14_generic_read ( digipot14_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

DIGI POT 14 I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See digipot14_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ digipot14_generic_write()

err_t digipot14_generic_write ( digipot14_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

DIGI POT 14 I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See digipot14_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ digipot14_init()

err_t digipot14_init ( digipot14_t * ctx,
digipot14_cfg_t * cfg )

DIGI POT 14 initialization function.

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

Parameters
[out]ctx: Click context object. See digipot14_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See digipot14_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ digipot14_reg_read()

err_t digipot14_reg_read ( digipot14_t * ctx,
uint8_t reg,
uint8_t * data_out )

DIGI POT 14 register reading function.

This function reads a data byte from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See digipot14_t object definition for detailed explanation.
[in]reg: Register address.
[out]data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ digipot14_reg_write()

err_t digipot14_reg_write ( digipot14_t * ctx,
uint8_t reg,
uint8_t data_in )

DIGI POT 14 register write function.

This function writes a data byte into the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See digipot14_t object definition for detailed explanation.
[in]reg: Register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ digipot14_set_pot_a_wiper()

err_t digipot14_set_pot_a_wiper ( digipot14_t * ctx,
uint8_t wiper_pos )

DIGI POT 14 set the wiper position of potentiometer A function.

This function sets the wiper position of the A potentiometer.

Parameters
[in]ctx: Click context object. See digipot14_t object definition for detailed explanation.
[in]ctx: Click context object. See digipot14_t object definition for detailed explanation.
[in]wiper_pos: Wiper position.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ digipot14_set_pot_b_wiper()

err_t digipot14_set_pot_b_wiper ( digipot14_t * ctx,
uint8_t wiper_pos )

DIGI POT 14 set the wiper position of potentiometer B function.

This function sets the wiper position of the B potentiometer.

Parameters
[in]ctx: Click context object. See digipot14_t object definition for detailed explanation.
[in]ctx: Click context object. See digipot14_t object definition for detailed explanation.
[in]wiper_pos: Wiper position.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.