fram 2.0.0.0
Public function

Functions

void fram_cfg_setup (fram_cfg_t *cfg)
 Config Object Initialization function.
 
FRAM_RETVAL fram_init (fram_t *ctx, fram_cfg_t *cfg)
 Initialization function.
 
void fram_generic_transfer (fram_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len)
 Generic transfer function.
 
void fram_init_f (fram_t *ctx)
 Fram click init function.
 
void fram_write_enable (fram_t *ctx)
 Fram click Write Enable function.
 
void fram_write_disable (fram_t *ctx)
 Fram click Write Disable function.
 
uint8_t fram_read_status (fram_t *ctx)
 Fram click Read Status function.
 
void fram_write_status (fram_t *ctx, uint8_t value)
 Fram click Write Status function.
 
void fram_read (fram_t *ctx, uint16_t address, uint8_t *buffer, uint16_t count)
 Fram read function.
 
void fram_write (fram_t *ctx, uint16_t address, uint8_t *buffer, uint16_t count)
 Fram write function.
 
void fram_erase_all (fram_t *ctx)
 Fram erase all function.
 

Detailed Description

Function Documentation

◆ fram_cfg_setup()

void fram_cfg_setup ( fram_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.

◆ fram_erase_all()

void fram_erase_all ( fram_t * ctx)

Fram erase all function.

Parameters
ctxClick object.

@description This function flushes whole data memory and resets status reg.

◆ fram_generic_transfer()

void fram_generic_transfer ( fram_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

◆ fram_init()

FRAM_RETVAL fram_init ( fram_t * ctx,
fram_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ fram_init_f()

void fram_init_f ( fram_t * ctx)

Fram click init function.

Parameters
ctxClick object.

@description This function that initializes Fram click by setting Chip select.

◆ fram_read()

void fram_read ( fram_t * ctx,
uint16_t address,
uint8_t * buffer,
uint16_t count )

Fram read function.

Parameters
ctxClick object.
addressDesired starting address (0x0000 to FRAM_MEM_SIZE).
bufferPointer to read buffer.
countNumber of bytes to be read.

@description This function reads sequential memory locations to buffer.

◆ fram_read_status()

uint8_t fram_read_status ( fram_t * ctx)

Fram click Read Status function.

Parameters
ctxClick object.

@description This function returns content of FRAM status register.

◆ fram_write()

void fram_write ( fram_t * ctx,
uint16_t address,
uint8_t * buffer,
uint16_t count )

Fram write function.

Parameters
ctxClick object.
addressDesired starting address (0x0000 to FRAM_MEM_SIZE).
bufferPointer to read buffer.
countNumber of bytes to be read.

@description This function writes to sequential memory locations from buffer.

◆ fram_write_disable()

void fram_write_disable ( fram_t * ctx)

Fram click Write Disable function.

Parameters
ctxClick object.

@description This function that sends write disable command to the chip.

◆ fram_write_enable()

void fram_write_enable ( fram_t * ctx)

Fram click Write Enable function.

Parameters
ctxClick object.

@description This function that sends write enable command to the chip.

◆ fram_write_status()

void fram_write_status ( fram_t * ctx,
uint8_t value )

Fram click Write Status function.

Parameters
ctxClick object.

@description This function writes in FRAM status register.