digipot8 2.0.0.0
DIGI POT 8 Click Driver

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

Topics

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

Functions

void digipot8_cfg_setup (digipot8_cfg_t *cfg)
 DIGI POT 8 configuration object setup function.
 
err_t digipot8_init (digipot8_t *ctx, digipot8_cfg_t *cfg)
 DIGI POT 8 initialization function.
 
err_t digipot8_write_data (digipot8_t *ctx, uint8_t reg, uint8_t data_in)
 DIGI POT 8 write data function.
 
err_t digipot8_set_wiper_1 (digipot8_t *ctx, uint8_t data_in)
 DIGI POT 8 set wiper 1 function.
 
err_t digipot8_set_wiper_2 (digipot8_t *ctx, uint8_t data_in)
 DIGI POT 8 set wiper 2 function.
 
err_t digipot8_set_wiper_3 (digipot8_t *ctx, uint8_t data_in)
 DIGI POT 8 set wiper 3 function.
 
err_t digipot8_set_wiper_4 (digipot8_t *ctx, uint8_t data_in)
 DIGI POT 8 set wiper 4 function.
 
err_t digipot8_set_wiper_5 (digipot8_t *ctx, uint8_t data_in)
 DIGI POT 8 set wiper 5 function.
 
err_t digipot8_set_wiper_6 (digipot8_t *ctx, uint8_t data_in)
 DIGI POT 8 set wiper 6 function.
 
uint16_t digipot8_generic_read (digipot8_t *ctx)
 Generic read function.
 
float digipot8_read_voltage (digipot8_t *ctx)
 Generic read function.
 

Detailed Description

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

◆ digipot8_cfg_setup()

void digipot8_cfg_setup ( digipot8_cfg_t * cfg)

DIGI POT 8 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ digipot8_generic_read()

uint16_t digipot8_generic_read ( digipot8_t * ctx)

Generic read function.

Parameters
ctxClick object.
Returns
ADC data result.

@description This function read ADC data.

◆ digipot8_init()

err_t digipot8_init ( digipot8_t * ctx,
digipot8_cfg_t * cfg )

DIGI POT 8 initialization function.

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

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

◆ digipot8_read_voltage()

float digipot8_read_voltage ( digipot8_t * ctx)

Generic read function.

Parameters
ctxClick object.
Returns
ADC data result.

@description This function read ADC data.

◆ digipot8_set_wiper_1()

err_t digipot8_set_wiper_1 ( digipot8_t * ctx,
uint8_t data_in )

DIGI POT 8 set wiper 1 function.

This function sets wiper 1 to desired value.

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

◆ digipot8_set_wiper_2()

err_t digipot8_set_wiper_2 ( digipot8_t * ctx,
uint8_t data_in )

DIGI POT 8 set wiper 2 function.

This function sets wiper 2 to desired value.

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

◆ digipot8_set_wiper_3()

err_t digipot8_set_wiper_3 ( digipot8_t * ctx,
uint8_t data_in )

DIGI POT 8 set wiper 3 function.

This function sets wiper 3 to desired value.

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

◆ digipot8_set_wiper_4()

err_t digipot8_set_wiper_4 ( digipot8_t * ctx,
uint8_t data_in )

DIGI POT 8 set wiper 4 function.

This function sets wiper 4 to desired value.

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

◆ digipot8_set_wiper_5()

err_t digipot8_set_wiper_5 ( digipot8_t * ctx,
uint8_t data_in )

DIGI POT 8 set wiper 5 function.

This function sets wiper 5 to desired value.

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

◆ digipot8_set_wiper_6()

err_t digipot8_set_wiper_6 ( digipot8_t * ctx,
uint8_t data_in )

DIGI POT 8 set wiper 6 function.

This function sets wiper 6 to desired value.

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

◆ digipot8_write_data()

err_t digipot8_write_data ( digipot8_t * ctx,
uint8_t reg,
uint8_t data_in )

DIGI POT 8 write data function.

This function writes a data byte to the selected register by using SPI serial interface.

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