excelonultra 2.0.0.0
Excelon-Ultra Click Driver

API for configuring and manipulating Excelon-Ultra Click driver. More...

Topics

 Excelon-Ultra Command List
 List of commands of Excelon-Ultra Click driver.
 
 Excelon-Ultra Registers Settings
 Settings for registers of Excelon-Ultra Click driver.
 
 Excelon-Ultra MikroBUS Map
 MikroBUS pin mapping of Excelon-Ultra Click driver.
 

Functions

void excelonultra_cfg_setup (excelonultra_cfg_t *cfg)
 Excelon-Ultra configuration object setup function.
 
err_t excelonultra_init (excelonultra_t *ctx, excelonultra_cfg_t *cfg)
 Excelon-Ultra initialization function.
 
err_t excelonultra_default_cfg (excelonultra_t *ctx)
 Excelon-Ultra default configuration function.
 
err_t excelonultra_send_cmd (excelonultra_t *ctx, uint8_t cmd)
 Send command.
 
err_t excelonultra_generic_transfer (excelonultra_t *ctx, uint8_t *data_in, uint32_t len_in, uint8_t *data_out, uint32_t len_out)
 Write-Read function.
 
err_t excelonultra_generic_write (excelonultra_t *ctx, uint8_t *data_in, uint32_t len_in)
 Excelon-Ultra data writing function.
 
err_t excelonultra_get_device_identification (excelonultra_t *ctx)
 Get device IDs.
 
err_t excelonultra_write_byte_to_memory (excelonultra_t *ctx, uint32_t mem_adr, uint8_t mem_data)
 Write byte of data to specified memory address.
 
err_t excelonultra_write_data_to_memory (excelonultra_t *ctx, uint32_t mem_adr, uint8_t *mem_data, uint32_t mem_data_len)
 Write data starting from specified memory address.
 
err_t excelonultra_read_byte_from_memory (excelonultra_t *ctx, uint32_t mem_adr, uint8_t *mem_data)
 Read byte of data from specified memory address.
 
err_t excelonultra_read_data_from_memory (excelonultra_t *ctx, uint32_t mem_adr, uint8_t *mem_data, uint32_t mem_data_len)
 Read data starting from specified memory address.
 
err_t excelonultra_clear_byte_from_memory (excelonultra_t *ctx, uint32_t mem_adr)
 Clear byte of data from specified memory address.
 
err_t excelonultra_clear_data_from_memory (excelonultra_t *ctx, uint32_t mem_adr, uint32_t mem_data_len)
 Clears data starting from specified memory address.
 
void excelonultra_set_rst_pin (excelonultra_t *ctx, uint8_t state)
 Set reset pin state.
 
void excelonultra_set_wp_pin (excelonultra_t *ctx, uint8_t state)
 Set write protect pin state.
 
void excelonultra_hw_reset (excelonultra_t *ctx)
 Reset device.
 

Detailed Description

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

◆ excelonultra_cfg_setup()

void excelonultra_cfg_setup ( excelonultra_cfg_t * cfg)

Excelon-Ultra configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ excelonultra_clear_byte_from_memory()

err_t excelonultra_clear_byte_from_memory ( excelonultra_t * ctx,
uint32_t mem_adr )

Clear byte of data from specified memory address.

This function clears a byte of data to selected memory address.

Parameters
[in]ctx: Click context object. See excelonultra_t object definition for detailed explanation.
[in]mem_adr: Memory address to clear data from.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ excelonultra_clear_data_from_memory()

err_t excelonultra_clear_data_from_memory ( excelonultra_t * ctx,
uint32_t mem_adr,
uint32_t mem_data_len )

Clears data starting from specified memory address.

This function clears a data starting from selected memory address.

Parameters
[in]ctx: Click context object. See excelonultra_t object definition for detailed explanation.
[in]mem_adr: Memory address to start clearing data from.
[in]mem_data_len: Number of bytes to clear starting from selected memory address.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ excelonultra_default_cfg()

err_t excelonultra_default_cfg ( excelonultra_t * ctx)

Excelon-Ultra default configuration function.

This function executes a default configuration of Excelon-Ultra click board.

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

◆ excelonultra_generic_transfer()

err_t excelonultra_generic_transfer ( excelonultra_t * ctx,
uint8_t * data_in,
uint32_t len_in,
uint8_t * data_out,
uint32_t len_out )

Write-Read function.

This function writes selected number of bytes and then reads selected number of bytes by using SPI serial interface.

Parameters
[in]ctx: Click context object. See excelonultra_t object definition for detailed explanation.
[in]data_in: Input write data.
[in]len_in: Number of bytes to be write.
[out]data_out: Output read data.
[in]len_out: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ excelonultra_generic_write()

err_t excelonultra_generic_write ( excelonultra_t * ctx,
uint8_t * data_in,
uint32_t len_in )

Excelon-Ultra data writing function.

This function writes a desired number of data bytes by using SPI serial interface.

Parameters
[in]ctx: Click context object. See excelonultra_t object definition for detailed explanation.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ excelonultra_get_device_identification()

err_t excelonultra_get_device_identification ( excelonultra_t * ctx)

Get device IDs.

This function reads Device ID and Unique ID and places data in context object.

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

◆ excelonultra_hw_reset()

void excelonultra_hw_reset ( excelonultra_t * ctx)

Reset device.

This function resets device by toggling rst pin.

Parameters
[in]ctx: Click context object. See excelonultra_t object definition for detailed explanation.
Returns
Nothing

◆ excelonultra_init()

err_t excelonultra_init ( excelonultra_t * ctx,
excelonultra_cfg_t * cfg )

Excelon-Ultra initialization function.

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

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

◆ excelonultra_read_byte_from_memory()

err_t excelonultra_read_byte_from_memory ( excelonultra_t * ctx,
uint32_t mem_adr,
uint8_t * mem_data )

Read byte of data from specified memory address.

This function read a byte of data from selected memory address.

Parameters
[in]ctx: Click context object. See excelonultra_t object definition for detailed explanation.
[in]mem_adr: Memory address to read data from.
[out]mem_data: Read byte of data from memory address.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ excelonultra_read_data_from_memory()

err_t excelonultra_read_data_from_memory ( excelonultra_t * ctx,
uint32_t mem_adr,
uint8_t * mem_data,
uint32_t mem_data_len )

Read data starting from specified memory address.

This function reads a data starting from selected memory address.

Parameters
[in]ctx: Click context object. See excelonultra_t object definition for detailed explanation.
[in]mem_adr: Memory address to start reading data from.
[out]mem_data: Read data.
[in]mem_data_len: Number of bytes to read starting from selected memory address.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ excelonultra_send_cmd()

err_t excelonultra_send_cmd ( excelonultra_t * ctx,
uint8_t cmd )

Send command.

This function writes a byte by using SPI serial interface.

Parameters
[in]ctx: Click context object. See excelonultra_t object definition for detailed explanation.
[in]cmd: Byte to send.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ excelonultra_set_rst_pin()

void excelonultra_set_rst_pin ( excelonultra_t * ctx,
uint8_t state )

Set reset pin state.

This function sets reset pin to selected state.

Parameters
[in]ctx: Click context object. See excelonultra_t object definition for detailed explanation.
[in]state: Pin state to set.
Returns
Nothing

◆ excelonultra_set_wp_pin()

void excelonultra_set_wp_pin ( excelonultra_t * ctx,
uint8_t state )

Set write protect pin state.

This function sets write protect pin to selected state.

Parameters
[in]ctx: Click context object. See excelonultra_t object definition for detailed explanation.
[in]state: Pin state to set.
Returns
Nothing

◆ excelonultra_write_byte_to_memory()

err_t excelonultra_write_byte_to_memory ( excelonultra_t * ctx,
uint32_t mem_adr,
uint8_t mem_data )

Write byte of data to specified memory address.

This function writes a byte of data to selected memory address.

Parameters
[in]ctx: Click context object. See excelonultra_t object definition for detailed explanation.
[in]mem_adr: Memory address to write data to.
[in]mem_data: Byte to write to memory address.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.

◆ excelonultra_write_data_to_memory()

err_t excelonultra_write_data_to_memory ( excelonultra_t * ctx,
uint32_t mem_adr,
uint8_t * mem_data,
uint32_t mem_data_len )

Write data starting from specified memory address.

This function writes a data starting from selected memory address.

Parameters
[in]ctx: Click context object. See excelonultra_t object definition for detailed explanation.
[in]mem_adr: Memory address to start writeing data to.
[in]mem_data: Data to write.
[in]mem_data_len: Number of bytes to write starting from selected memory address.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.