clickid 2.1.0.0
ClickID Driver

API for configuring and manipulating ClickID driver. More...

Topics

 ClickID Commands List
 List of commands of ClickID driver.
 
 ClickID Settings
 Settings of ClickID driver.
 
 ClickID MikroBUS Map
 MikroBUS pin mapping of ClickID driver.
 

Functions

void clickid_cfg_setup (clickid_cfg_t *cfg)
 ClickID configuration object setup function.
 
err_t clickid_init (clickid_t *ctx, clickid_cfg_t *cfg)
 ClickID initialization function.
 
void clickid_deinit (clickid_t *ctx)
 ClickID de-initialization function.
 
err_t clickid_check_communication (clickid_t *ctx)
 ClickID check communication function.
 
err_t clickid_read_memory (clickid_t *ctx, uint16_t address, uint8_t *data_out, uint16_t len)
 ClickID read memory function.
 
err_t clickid_write_memory (clickid_t *ctx, uint16_t address, uint8_t *data_in, uint16_t len)
 ClickID write memory function.
 
err_t clickid_read_information (clickid_t *ctx, clickid_information_t *info)
 ClickID read information function.
 

Detailed Description

API for configuring and manipulating ClickID driver.

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

Function Documentation

◆ clickid_cfg_setup()

void clickid_cfg_setup ( clickid_cfg_t * cfg)

ClickID configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ clickid_check_communication()

err_t clickid_check_communication ( clickid_t * ctx)

ClickID check communication function.

This function checks the communication by reading the ROM address as well as verifying family code and CRC 8.

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

◆ clickid_deinit()

void clickid_deinit ( clickid_t * ctx)

ClickID de-initialization function.

This function de-initializes One Wire driver and sets the RST pin to HIGH logic state.

Parameters
[out]ctx: context object. See clickid_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ clickid_init()

err_t clickid_init ( clickid_t * ctx,
clickid_cfg_t * cfg )

ClickID initialization function.

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

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

◆ clickid_read_information()

err_t clickid_read_information ( clickid_t * ctx,
clickid_information_t * info )

ClickID read information function.

This function reads the click board information from the permanent data memory.

Parameters
[in]ctx: context object. See clickid_t object definition for detailed explanation.
[out]info: Click board information. See clickid_information_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ clickid_read_memory()

err_t clickid_read_memory ( clickid_t * ctx,
uint16_t address,
uint8_t * data_out,
uint16_t len )

ClickID read memory function.

This function reads a desired number of data bytes starting from the selected address of the EEPROM memory using One Wire communication protocol.

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

◆ clickid_write_memory()

err_t clickid_write_memory ( clickid_t * ctx,
uint16_t address,
uint8_t * data_in,
uint16_t len )

ClickID write memory function.

This function writes a desired number of data bytes starting from the selected address of the EEPROM memory using One Wire communication protocol.

Parameters
[in]ctx: context object. See clickid_t object definition for detailed explanation.
[in]address: Starting address, must be aligned to the page start.
[in]data_in: Data input buffer.
[in]len: Number of data bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.