digiio  2.1.0.0
Modules | Functions
DIGI IO Click Driver

API for configuring and manipulating DIGI IO Click driver. More...

Modules

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

Functions

void digiio_cfg_setup (digiio_cfg_t *cfg)
 DIGI IO configuration object setup function. More...
 
err_t digiio_init (digiio_t *ctx, digiio_cfg_t *cfg)
 DIGI IO initialization function. More...
 
err_t digiio_default_cfg (digiio_t *ctx)
 DIGI IO default configuration function. More...
 
void digiio_set_address (digiio_t *ctx, uint8_t device_address)
 DIGI IO set address function. More...
 
err_t digiio_write_reg (digiio_t *ctx, uint8_t reg, uint8_t data_in)
 DIGI IO write reg function. More...
 
err_t digiio_read_reg (digiio_t *ctx, uint8_t reg, uint8_t *data_out)
 DIGI IO read reg function. More...
 
void digiio_enable_output (digiio_t *ctx)
 DIGI IO enable output function. More...
 
void digiio_disable_output (digiio_t *ctx)
 DIGI IO disable output function. More...
 
void digiio_sync_io (digiio_t *ctx)
 DIGI IO sync io function. More...
 
void digiio_set_sync_pin (digiio_t *ctx, uint8_t state)
 DIGI IO set sync pin function. More...
 
uint8_t digiio_get_ready_pin (digiio_t *ctx)
 DIGI IO get ready pin function. More...
 
uint8_t digiio_get_fault_pin (digiio_t *ctx)
 DIGI IO get fault pin function. More...
 

Detailed Description

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

◆ digiio_cfg_setup()

void digiio_cfg_setup ( digiio_cfg_t cfg)

DIGI IO configuration object setup function.

This function initializes Click configuration structure to initial values.

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

◆ digiio_default_cfg()

err_t digiio_default_cfg ( digiio_t ctx)

DIGI IO default configuration function.

This function executes a default configuration of DIGI IO Click board.

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

◆ digiio_disable_output()

void digiio_disable_output ( digiio_t ctx)

DIGI IO disable output function.

This function disables output by setting the EN pin to low logic state.

Parameters
[in]ctx: Click context object. See digiio_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ digiio_enable_output()

void digiio_enable_output ( digiio_t ctx)

DIGI IO enable output function.

This function enables output by setting the EN pin to high logic state.

Parameters
[in]ctx: Click context object. See digiio_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ digiio_get_fault_pin()

uint8_t digiio_get_fault_pin ( digiio_t ctx)

DIGI IO get fault pin function.

This function returns the FAULT pin logic state.

Parameters
[in]ctx: Click context object. See digiio_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ digiio_get_ready_pin()

uint8_t digiio_get_ready_pin ( digiio_t ctx)

DIGI IO get ready pin function.

This function returns the READY pin logic state.

Parameters
[in]ctx: Click context object. See digiio_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ digiio_init()

err_t digiio_init ( digiio_t ctx,
digiio_cfg_t cfg 
)

DIGI IO initialization function.

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

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

◆ digiio_read_reg()

err_t digiio_read_reg ( digiio_t ctx,
uint8_t  reg,
uint8_t *  data_out 
)

DIGI IO read reg function.

This function reads data from the selected register by using SPI serial interface.

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

◆ digiio_set_address()

void digiio_set_address ( digiio_t ctx,
uint8_t  device_address 
)

DIGI IO set address function.

This function sets the device address.

Parameters
[in]ctx: Click context object. See digiio_t object definition for detailed explanation.
[in]device_address: Selected device address.
Returns
None.
Note
None.

◆ digiio_set_sync_pin()

void digiio_set_sync_pin ( digiio_t ctx,
uint8_t  state 
)

DIGI IO set sync pin function.

This function sets the SYNC pin logic state.

Parameters
[in]ctx: Click context object. See digiio_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.

◆ digiio_sync_io()

void digiio_sync_io ( digiio_t ctx)

DIGI IO sync io function.

This function synchronizes registers by toggling the SYNC pin logic state.

Parameters
[in]ctx: Click context object. See digiio_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ digiio_write_reg()

err_t digiio_write_reg ( digiio_t ctx,
uint8_t  reg,
uint8_t  data_in 
)

DIGI IO write reg function.

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

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