eeram3v3 2.0.0.0
EERAM 3v3 Click Driver

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.
 

Detailed Description

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.

Function Documentation

◆ eeram3v3_cfg_setup()

void eeram3v3_cfg_setup ( eeram3v3_cfg_t * cfg)

EERAM 3v3 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ eeram3v3_generic_read()

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.

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

◆ eeram3v3_generic_write()

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.

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

◆ eeram3v3_init()

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.

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

◆ eeram3v3_read()

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.

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.

◆ eeram3v3_status_read()

uint8_t eeram3v3_status_read ( eeram3v3_t * ctx)

EERAM Click Status Read.

Returns the state of the status register.

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

◆ eeram3v3_status_write()

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.

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

◆ eeram3v3_write()

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.

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