sram  2.0.0.0
Functions
Public function

Functions

void sram_cfg_setup (sram_cfg_t *cfg)
 Config Object Initialization function. More...
 
SRAM_RETVAL sram_init (sram_t *ctx, sram_cfg_t *cfg)
 Initialization function. More...
 
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. More...
 
void sram_write_byte (sram_t *ctx, uint32_t reg_address, uint8_t write_data)
 Generic write byte of data funcion. More...
 
uint8_t sram_read_byte (sram_t *ctx, uint32_t reg_address)
 Generic read byte of data funcion. More...
 
void sram_write_mode_reg_ins (sram_t *ctx, uint8_t ins_data)
 Write mode register instruction funcion. More...
 
uint8_t sram_read_mode_reg_ins (sram_t *ctx)
 Read mode register instruction funcion. More...
 
void sram_soft_reset (sram_t *ctx)
 Soft reset funcion. More...
 
void sram_hold_transmission (sram_t *ctx)
 Suspend transmission funcion. More...
 

Detailed Description

Function Documentation

◆ sram_cfg_setup()

void sram_cfg_setup ( sram_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

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

Generic SPI transfer, for sending and receiving packages

◆ sram_hold_transmission()

void sram_hold_transmission ( sram_t ctx)

Suspend transmission funcion.

Parameters
ctxClick object.

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.

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.

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.

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.

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.

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.

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