proximity14 2.0.0.0
Proximity 14 Click Driver

API for configuring and manipulating Proximity 14 Click driver. More...

Topics

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

Functions

void proximity14_cfg_setup (proximity14_cfg_t *cfg)
 Proximity 14 configuration object setup function.
 
err_t proximity14_init (proximity14_t *ctx, proximity14_cfg_t *cfg)
 Proximity 14 initialization function.
 
err_t proximity14_default_cfg (proximity14_t *ctx)
 Proximity 14 default configuration function.
 
err_t proximity14_generic_write (proximity14_t *ctx, uint8_t reg, uint16_t tx_data)
 Writing function.
 
err_t proximity14_generic_read (proximity14_t *ctx, uint8_t reg, uint16_t *rx_data)
 Reading function.
 
uint8_t proximity14_get_int (proximity14_t *ctx)
 Get INT pin state.
 

Detailed Description

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

◆ proximity14_cfg_setup()

void proximity14_cfg_setup ( proximity14_cfg_t * cfg)

Proximity 14 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ proximity14_default_cfg()

err_t proximity14_default_cfg ( proximity14_t * ctx)

Proximity 14 default configuration function.

This function executes a default configuration of Proximity 14 click board.

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

◆ proximity14_generic_read()

err_t proximity14_generic_read ( proximity14_t * ctx,
uint8_t reg,
uint16_t * rx_data )

Reading function.

This function reads a data to the selected register.

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

◆ proximity14_generic_write()

err_t proximity14_generic_write ( proximity14_t * ctx,
uint8_t reg,
uint16_t tx_data )

Writing function.

This function writes a data to the selected register.

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

◆ proximity14_get_int()

uint8_t proximity14_get_int ( proximity14_t * ctx)

Get INT pin state.

This function reads logic state of interrupt pin.

Parameters
[in]ctx: Click context object. See proximity14_t object definition for detailed explanation.
Returns
Logic state pin

◆ proximity14_init()

err_t proximity14_init ( proximity14_t * ctx,
proximity14_cfg_t * cfg )

Proximity 14 initialization function.

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

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