eeram5v 2.0.0.0
|
API for configuring and manipulating EERAM 5V Click driver. More...
Modules | |
EERAM 5V Const | |
List of Constants of EERAM 5V Click driver. | |
EERAM 5V MikroBUS Map | |
MikroBUS pin mapping of EERAM 5V Click driver. | |
Functions | |
void | eeram5v_cfg_setup (eeram5v_cfg_t *cfg) |
EERAM 5V configuration object setup function. More... | |
err_t | eeram5v_init (eeram5v_t *ctx, eeram5v_cfg_t *cfg) |
EERAM 5V initialization function. More... | |
void | eeram5v_generic_write (eeram5v_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
EERAM 5V I2C writing function. More... | |
void | eeram5v_generic_read (eeram5v_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
EERAM 5V I2C reading function. More... | |
void | eeram5v_status_write (eeram5v_t *ctx, uint8_t command) |
EERAM 5V Click Status Write. More... | |
uint8_t | eeram5v_status_read (eeram5v_t *ctx) |
EERAM 5V Click Status Read. More... | |
void | eeram5v_read (eeram5v_t *ctx, uint16_t address, uint8_t *data_out, uint8_t count_out) |
EERAM 5V Click SRAM Read. More... | |
void | eeram5v_write (eeram5v_t *ctx, uint16_t address, uint8_t *data_in, uint8_t count_in) |
EERAM 5V Click SRAM Write. More... | |
API for configuring and manipulating EERAM 5V Click driver.
void eeram5v_cfg_setup | ( | eeram5v_cfg_t * | cfg | ) |
EERAM 5V configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See eeram5v_cfg_t object definition for detailed explanation. |
void eeram5v_generic_read | ( | eeram5v_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len | ||
) |
EERAM 5V I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See eeram5v_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.void eeram5v_generic_write | ( | eeram5v_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len | ||
) |
EERAM 5V I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See eeram5v_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t eeram5v_init | ( | eeram5v_t * | ctx, |
eeram5v_cfg_t * | cfg | ||
) |
EERAM 5V initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See eeram5v_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See eeram5v_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void eeram5v_read | ( | eeram5v_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_out, | ||
uint8_t | count_out | ||
) |
EERAM 5V Click SRAM Read.
Reads the data from the selected SRAM address onwards.
ctx | Click object. |
address | SRAM 16 bit address. |
data_out | Data buffer to be filled with read data. |
count_out | Number of bytes to read. |
0
- Success, -1
- Error. uint8_t eeram5v_status_read | ( | eeram5v_t * | ctx | ) |
EERAM 5V Click Status Read.
Returns the state of the status register.
ctx | Click object. |
void eeram5v_status_write | ( | eeram5v_t * | ctx, |
uint8_t | command | ||
) |
EERAM 5V Click Status Write.
Status register contains settings for write protection and auto-store function. Use this function to configure them.
ctx | Click object. |
command | Settings to be written to Status register. |
void eeram5v_write | ( | eeram5v_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_in, | ||
uint8_t | count_in | ||
) |
EERAM 5V Click SRAM Write.
Writes the data to SRAM memory array.
ctx | Click object. |
address | SRAM 16 bit address. |
data_in | Write data. |
count_in | Number of bytes to write. |