digipot13 2.1.0.0
DIGI POT 13 Click Driver

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

Topics

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

Functions

void digipot13_cfg_setup (digipot13_cfg_t *cfg)
 DIGI POT 13 configuration object setup function.
 
err_t digipot13_init (digipot13_t *ctx, digipot13_cfg_t *cfg)
 DIGI POT 13 initialization function.
 
err_t digipot13_default_cfg (digipot13_t *ctx)
 DIGI POT 13 default configuration function.
 
err_t digipot13_write_data (digipot13_t *ctx, uint8_t cmd, uint8_t data_in)
 DIGI POT 13 write data function.
 
err_t digipot13_set_wiper_pos (digipot13_t *ctx, uint8_t wiper_pos)
 DIGI POT 13 set the wiper position function.
 
err_t digipot13_set_resistance (digipot13_t *ctx, digipot13_cfg_res_t cfg_res, float res_kohm)
 DIGI POT 13 set the resistance function.
 
err_t digipot13_switch_v_to_nv (digipot13_t *ctx)
 DIGI POT 13 data transfers volatile to nonvolatile function.
 
err_t digipot13_switch_nv_to_v (digipot13_t *ctx)
 DIGI POT 13 data transfers nonvolatile to volatile function.
 

Detailed Description

API for configuring and manipulating DIGI POT 13 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

◆ digipot13_cfg_setup()

void digipot13_cfg_setup ( digipot13_cfg_t * cfg)

DIGI POT 13 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ digipot13_default_cfg()

err_t digipot13_default_cfg ( digipot13_t * ctx)

DIGI POT 13 default configuration function.

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

Parameters
[in]ctx: Click context object. See digipot13_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.

◆ digipot13_init()

err_t digipot13_init ( digipot13_t * ctx,
digipot13_cfg_t * cfg )

DIGI POT 13 initialization function.

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

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

◆ digipot13_set_resistance()

err_t digipot13_set_resistance ( digipot13_t * ctx,
digipot13_cfg_res_t cfg_res,
float res_kohm )

DIGI POT 13 set the resistance function.

This function sets the resistance of the MAX5419LETA+T, 256-Tap, Nonvolatile, I2C-Interface, Digital Potentiometers on the DIGI POT 13 Click board™.

Parameters
[in]ctx: Click context object. See digipot13_t object definition for detailed explanation.
[in]cfg_res: Resistance configuration. See digipot13_cfg_res_t definition for detailed explanation.
[in]res_kohm: Resistance from 0.0 to 200.0 [kOhm].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ digipot13_set_wiper_pos()

err_t digipot13_set_wiper_pos ( digipot13_t * ctx,
uint8_t wiper_pos )

DIGI POT 13 set the wiper position function.

This function sets the position of the wiper of the MAX5419LETA+T, 256-Tap, Nonvolatile, I2C-Interface, Digital Potentiometers on the DIGI POT 13 Click board™.

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

◆ digipot13_switch_nv_to_v()

err_t digipot13_switch_nv_to_v ( digipot13_t * ctx)

DIGI POT 13 data transfers nonvolatile to volatile function.

This function gets the value stored in the non-volatile memory and writes in the volatile memory of the MAX5419LETA+T, 256-Tap, Nonvolatile, I2C-Interface, Digital Potentiometers on the DIGI POT 13 Click board™.

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

◆ digipot13_switch_v_to_nv()

err_t digipot13_switch_v_to_nv ( digipot13_t * ctx)

DIGI POT 13 data transfers volatile to nonvolatile function.

This function gets the value stored in the volatile memory and writes in the non-volatile memory of the MAX5419LETA+T, 256-Tap, Nonvolatile, I2C-Interface, Digital Potentiometers on the DIGI POT 13 Click board™.

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

◆ digipot13_write_data()

err_t digipot13_write_data ( digipot13_t * ctx,
uint8_t cmd,
uint8_t data_in )

DIGI POT 13 write data function.

This function writes a data bytes by using a desired command of the MAX5419LETA+T, 256-Tap, Nonvolatile, I2C-Interface, Digital Potentiometers on the DIGI POT 13 Click board™.

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