excelonultra 2.0.0.0
|
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. | |
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.
void excelonultra_cfg_setup | ( | excelonultra_cfg_t * | cfg | ) |
Excelon-Ultra configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See excelonultra_cfg_t object definition for detailed explanation. |
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.
[in] | ctx | : Click context object. See excelonultra_t object definition for detailed explanation. |
[in] | mem_adr | : Memory address to clear data from. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.err_t excelonultra_default_cfg | ( | excelonultra_t * | ctx | ) |
Excelon-Ultra default configuration function.
This function executes a default configuration of Excelon-Ultra click board.
[in] | ctx | : Click context object. See excelonultra_t object definition for detailed explanation. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.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.
[in] | ctx | : Click context object. See excelonultra_t object definition for detailed explanation. |
0
- Success, -1
- Error.void excelonultra_hw_reset | ( | excelonultra_t * | ctx | ) |
Reset device.
This function resets device by toggling rst pin.
[in] | ctx | : Click context object. See excelonultra_t object definition for detailed explanation. |
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.
[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. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.err_t excelonultra_send_cmd | ( | excelonultra_t * | ctx, |
uint8_t | cmd ) |
Send command.
This function writes a byte by using SPI serial interface.
[in] | ctx | : Click context object. See excelonultra_t object definition for detailed explanation. |
[in] | cmd | : Byte to send. |
0
- Success, -1
- Error.void excelonultra_set_rst_pin | ( | excelonultra_t * | ctx, |
uint8_t | state ) |
Set reset pin state.
This function sets reset pin to selected state.
[in] | ctx | : Click context object. See excelonultra_t object definition for detailed explanation. |
[in] | state | : Pin state to set. |
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.
[in] | ctx | : Click context object. See excelonultra_t object definition for detailed explanation. |
[in] | state | : Pin state to set. |
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.
[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. |
0
- Success, -1
- Error.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.
[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. |
0
- Success, -1
- Error.