sram 2.0.0.0
Public function

Functions

void sram_cfg_setup (sram_cfg_t *cfg)
 Config Object Initialization function.
 
SRAM_RETVAL sram_init (sram_t *ctx, sram_cfg_t *cfg)
 Initialization function.
 
void sram_generic_transfer (sram_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void sram_generic_write (sram_t *ctx, uint8_t *wr_buf, uint16_t wr_len)
 Generic write function.
 
void sram_write_byte (sram_t *ctx, uint32_t reg_address, uint8_t write_data)
 Generic write byte of data funcion.
 
uint8_t sram_read_byte (sram_t *ctx, uint32_t reg_address)
 Generic read byte of data funcion.
 
void sram_write_mode_reg_ins (sram_t *ctx, uint8_t ins_data)
 Write mode register instruction funcion.
 
uint8_t sram_read_mode_reg_ins (sram_t *ctx)
 Read mode register instruction funcion.
 
void sram_soft_reset (sram_t *ctx)
 Soft reset funcion.
 
void sram_hold_transmission (sram_t *ctx)
 Suspend transmission funcion.
 

Detailed Description

Function Documentation

◆ sram_cfg_setup()

void sram_cfg_setup ( sram_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ sram_generic_transfer()

void sram_generic_transfer ( sram_t * ctx,
uint8_t * wr_buf,
uint16_t wr_len,
uint8_t * rd_buf,
uint16_t rd_len )

Generic transfer function.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ sram_generic_write()

void sram_generic_write ( sram_t * ctx,
uint8_t * wr_buf,
uint16_t wr_len )

Generic write function.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer

@description Generic SPI write, for sending packages

◆ sram_hold_transmission()

void sram_hold_transmission ( sram_t * ctx)

Suspend transmission funcion.

Parameters
ctxClick object.

@description Thisfuncion sets RST pin in low state.

◆ sram_init()

SRAM_RETVAL sram_init ( sram_t * ctx,
sram_cfg_t * cfg )

Initialization function.

Parameters
sramClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ sram_read_byte()

uint8_t sram_read_byte ( sram_t * ctx,
uint32_t reg_address )

Generic read byte of data funcion.

Parameters
ctxClick object.
reg_address24-bit register address.

@description Function read the 8-bit data to the target 24-bit register address of 23LC1024 chip.

◆ sram_read_mode_reg_ins()

uint8_t sram_read_mode_reg_ins ( sram_t * ctx)

Read mode register instruction funcion.

Parameters
ctxClick object.

@description Function read the 8-bit instruction data to the target MODE register address of 23LC1024 chip.

◆ sram_soft_reset()

void sram_soft_reset ( sram_t * ctx)

Soft reset funcion.

Parameters
ctxClick object.

@description This function writing reset instruction on the target RSTIO register.

◆ sram_write_byte()

void sram_write_byte ( sram_t * ctx,
uint32_t reg_address,
uint8_t write_data )

Generic write byte of data funcion.

Parameters
ctxClick object.
reg_address24-bit register address.
write_data8-bit data to write.

@description Function write the 8-bit data to the target 24-bit register address of 23LC1024 chip.

◆ sram_write_mode_reg_ins()

void sram_write_mode_reg_ins ( sram_t * ctx,
uint8_t ins_data )

Write mode register instruction funcion.

Parameters
ctxClick object.
ins_data8-bit instruction data.

@description Function write the 8-bit instruction data to the target MODE register address of 23LC1024 chip.