eeram5v 2.0.0.0
EERAM 5V Click Driver

API for configuring and manipulating EERAM 5V Click driver. More...

Topics

 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.
 
err_t eeram5v_init (eeram5v_t *ctx, eeram5v_cfg_t *cfg)
 EERAM 5V initialization function.
 
void eeram5v_generic_write (eeram5v_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 EERAM 5V I2C writing function.
 
void eeram5v_generic_read (eeram5v_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 EERAM 5V I2C reading function.
 
void eeram5v_status_write (eeram5v_t *ctx, uint8_t command)
 EERAM 5V Click Status Write.
 
uint8_t eeram5v_status_read (eeram5v_t *ctx)
 EERAM 5V Click Status Read.
 
void eeram5v_read (eeram5v_t *ctx, uint16_t address, uint8_t *data_out, uint8_t count_out)
 EERAM 5V Click SRAM Read.
 
void eeram5v_write (eeram5v_t *ctx, uint16_t address, uint8_t *data_in, uint8_t count_in)
 EERAM 5V Click SRAM Write.
 

Detailed Description

API for configuring and manipulating EERAM 5V 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

◆ eeram5v_cfg_setup()

void eeram5v_cfg_setup ( eeram5v_cfg_t * cfg)

EERAM 5V configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ eeram5v_generic_read()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ eeram5v_generic_write()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ eeram5v_init()

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.

Parameters
[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.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ eeram5v_read()

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.

Parameters
ctxClick object.
addressSRAM 16 bit address.
data_outData buffer to be filled with read data.
count_outNumber of bytes to read.
Returns
  • 0 - Success,
  • -1 - Error.
Note
None.

◆ eeram5v_status_read()

uint8_t eeram5v_status_read ( eeram5v_t * ctx)

EERAM 5V Click Status Read.

Returns the state of the status register.

Parameters
ctxClick object.
Returns
Value of the Status register.
Note
None.

◆ eeram5v_status_write()

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.

Parameters
ctxClick object.
commandSettings to be written to Status register.
Returns
Nothing.
Note
None.

◆ eeram5v_write()

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.

Parameters
ctxClick object.
addressSRAM 16 bit address.
data_inWrite data.
count_inNumber of bytes to write.
Returns
Nothing.
Note
None.