semperflash 2.0.0.0

Functions

void semperflash_cfg_setup (semperflash_cfg_t *cfg)
 Config Object Initialization function.
 
SEMPERFLASH_RETVAL semperflash_init (semperflash_t *ctx, semperflash_cfg_t *cfg)
 Initialization function.
 
void semperflash_default_cfg (semperflash_t *ctx)
 Click Default Configuration function.
 
void semperflash_send_cmd (semperflash_t *ctx, uint8_t cmd)
 Send command function.
 
void semperflash_transfer_data (semperflash_t *ctx, uint8_t *write_buf, uint16_t wbuf_size, uint8_t *read_buf, uint16_t rbuf_size)
 Transfer data function.
 
void semperflash_generic_write (semperflash_t *ctx, uint8_t *write_buf, uint16_t buf_size)
 Writing data function.
 
void semperflash_write_config (semperflash_t *ctx, semperflash_config_t *cfg_data)
 Write configuration function.
 
uint8_t semperflash_read_memory (semperflash_t *ctx, uint32_t addr, uint8_t *data_buf, uint16_t buf_size)
 Read memory function.
 
uint8_t semperflash_write_memory (semperflash_t *ctx, uint32_t addr, uint8_t *data_buf, uint16_t buf_size)
 Write memory function.
 
void semperflash_erase_memory (semperflash_t *ctx, uint32_t addr)
 Erase memory function.
 
uint8_t semperflash_get_device_id (semperflash_t *ctx, uint8_t *id_buf)
 Get device ID function.
 
uint8_t semperflash_check_manufacturer_id (semperflash_t *ctx)
 Check manufacturer ID function.
 
uint8_t semperflash_check_status_reg_1 (semperflash_t *ctx)
 Check status register function.
 

Detailed Description

Function Documentation

◆ semperflash_cfg_setup()

void semperflash_cfg_setup ( semperflash_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.

◆ semperflash_check_manufacturer_id()

uint8_t semperflash_check_manufacturer_id ( semperflash_t * ctx)

Check manufacturer ID function.

Parameters
ctxClick object.

@description This function checks if the manufacturer ID is OK or not.

◆ semperflash_check_status_reg_1()

uint8_t semperflash_check_status_reg_1 ( semperflash_t * ctx)

Check status register function.

Parameters
ctxClick object.

@description This function checks the status register on the click module.

◆ semperflash_default_cfg()

void semperflash_default_cfg ( semperflash_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Semper Flash click.

◆ semperflash_erase_memory()

void semperflash_erase_memory ( semperflash_t * ctx,
uint32_t addr )

Erase memory function.

Parameters
ctxClick object.
addrMemory address.

@description This function erases data from the flash memory.

◆ semperflash_generic_write()

void semperflash_generic_write ( semperflash_t * ctx,
uint8_t * write_buf,
uint16_t buf_size )

Writing data function.

Parameters
ctxClick object.
write_bufWrite data.
buf_sizeBuffer size.

@description This function transfers data to the click module.

◆ semperflash_get_device_id()

uint8_t semperflash_get_device_id ( semperflash_t * ctx,
uint8_t * id_buf )

Get device ID function.

Parameters
ctxClick object.
id_bufID buffer.

@description This function stores the device ID in the specified buffer.

◆ semperflash_init()

SEMPERFLASH_RETVAL semperflash_init ( semperflash_t * ctx,
semperflash_cfg_t * cfg )

Initialization function.

Parameters
semperflashClick object.
cfgClick configuration structure.

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

◆ semperflash_read_memory()

uint8_t semperflash_read_memory ( semperflash_t * ctx,
uint32_t addr,
uint8_t * data_buf,
uint16_t buf_size )

Read memory function.

Parameters
ctxClick object.
addrMemory address.
data_bufData buffer.
buf_sizeBuffer size.

@description This function reads data from the flash memory.

◆ semperflash_send_cmd()

void semperflash_send_cmd ( semperflash_t * ctx,
uint8_t cmd )

Send command function.

Parameters
ctxClick object.
cmdCommand variable.

@description This function sends the specified command to the click module.

◆ semperflash_transfer_data()

void semperflash_transfer_data ( semperflash_t * ctx,
uint8_t * write_buf,
uint16_t wbuf_size,
uint8_t * read_buf,
uint16_t rbuf_size )

Transfer data function.

Parameters
ctxClick object.
write_bufWrite data.
wbuf_sizeBuffer size.
read_bufRead buffer.
rbuf_sizeBuffer size.

@description This function transfers data to/from the click module.

◆ semperflash_write_config()

void semperflash_write_config ( semperflash_t * ctx,
semperflash_config_t * cfg_data )

Write configuration function.

Parameters
ctxClick object.
cfg_dataConfiguration data buffer.

@description This function sends a set of configuration parameters to the click module.

◆ semperflash_write_memory()

uint8_t semperflash_write_memory ( semperflash_t * ctx,
uint32_t addr,
uint8_t * data_buf,
uint16_t buf_size )

Write memory function.

Parameters
ctxClick object.
addrMemory address.
data_bufData buffer.
buf_sizeBuffer size.

@description This function writes data to the flash memory.