eeram3v3 2.0.0.0
|
API for configuring and manipulating EERAM 3v3 Click driver. More...
Topics | |
EERAM 3v3 Const | |
List of Constants of EERAM 3v3 Click driver. | |
EERAM 3v3 MikroBUS Map | |
MikroBUS pin mapping of EERAM 3v3 Click driver. | |
Functions | |
void | eeram3v3_cfg_setup (eeram3v3_cfg_t *cfg) |
EERAM 3v3 configuration object setup function. | |
err_t | eeram3v3_init (eeram3v3_t *ctx, eeram3v3_cfg_t *cfg) |
EERAM 3v3 initialization function. | |
void | eeram3v3_generic_write (eeram3v3_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
EERAM 3v3 I2C writing function. | |
void | eeram3v3_generic_read (eeram3v3_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
EERAM 3v3 I2C reading function. | |
void | eeram3v3_status_write (eeram3v3_t *ctx, uint8_t command) |
EERAM 3v3 Click Status Write. | |
uint8_t | eeram3v3_status_read (eeram3v3_t *ctx) |
EERAM Click Status Read. | |
void | eeram3v3_read (eeram3v3_t *ctx, uint16_t address, uint8_t *data_out, uint8_t count_out) |
EERAM Click SRAM Read. | |
void | eeram3v3_write (eeram3v3_t *ctx, uint16_t address, uint8_t *data_in, uint8_t count_in) |
EERAM Click SRAM Write. | |
API for configuring and manipulating EERAM 3v3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void eeram3v3_cfg_setup | ( | eeram3v3_cfg_t * | cfg | ) |
EERAM 3v3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See eeram3v3_cfg_t object definition for detailed explanation. |
void eeram3v3_generic_read | ( | eeram3v3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
EERAM 3v3 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 eeram3v3_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 eeram3v3_generic_write | ( | eeram3v3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
EERAM 3v3 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 eeram3v3_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 eeram3v3_init | ( | eeram3v3_t * | ctx, |
eeram3v3_cfg_t * | cfg ) |
EERAM 3v3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See eeram3v3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See eeram3v3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void eeram3v3_read | ( | eeram3v3_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_out, | ||
uint8_t | count_out ) |
EERAM 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 eeram3v3_status_read | ( | eeram3v3_t * | ctx | ) |
EERAM Click Status Read.
Returns the state of the status register.
ctx | Click object. |
void eeram3v3_status_write | ( | eeram3v3_t * | ctx, |
uint8_t | command ) |
EERAM 3v3 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 eeram3v3_write | ( | eeram3v3_t * | ctx, |
uint16_t | address, | ||
uint8_t * | data_in, | ||
uint8_t | count_in ) |
EERAM 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. |