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. | |
void semperflash_cfg_setup | ( | semperflash_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t semperflash_check_manufacturer_id | ( | semperflash_t * | ctx | ) |
Check manufacturer ID function.
ctx | Click object. |
@description This function checks if the manufacturer ID is OK or not.
uint8_t semperflash_check_status_reg_1 | ( | semperflash_t * | ctx | ) |
Check status register function.
ctx | Click object. |
@description This function checks the status register on the click module.
void semperflash_default_cfg | ( | semperflash_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Semper Flash click.
void semperflash_erase_memory | ( | semperflash_t * | ctx, |
uint32_t | addr ) |
Erase memory function.
ctx | Click object. |
addr | Memory address. |
@description This function erases data from the flash memory.
void semperflash_generic_write | ( | semperflash_t * | ctx, |
uint8_t * | write_buf, | ||
uint16_t | buf_size ) |
Writing data function.
ctx | Click object. |
write_buf | Write data. |
buf_size | Buffer size. |
@description This function transfers data to the click module.
uint8_t semperflash_get_device_id | ( | semperflash_t * | ctx, |
uint8_t * | id_buf ) |
Get device ID function.
ctx | Click object. |
id_buf | ID buffer. |
@description This function stores the device ID in the specified buffer.
SEMPERFLASH_RETVAL semperflash_init | ( | semperflash_t * | ctx, |
semperflash_cfg_t * | cfg ) |
Initialization function.
semperflash | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t semperflash_read_memory | ( | semperflash_t * | ctx, |
uint32_t | addr, | ||
uint8_t * | data_buf, | ||
uint16_t | buf_size ) |
Read memory function.
ctx | Click object. |
addr | Memory address. |
data_buf | Data buffer. |
buf_size | Buffer size. |
@description This function reads data from the flash memory.
void semperflash_send_cmd | ( | semperflash_t * | ctx, |
uint8_t | cmd ) |
Send command function.
ctx | Click object. |
cmd | Command variable. |
@description This function sends the specified command to the click module.
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.
ctx | Click object. |
write_buf | Write data. |
wbuf_size | Buffer size. |
read_buf | Read buffer. |
rbuf_size | Buffer size. |
@description This function transfers data to/from the click module.
void semperflash_write_config | ( | semperflash_t * | ctx, |
semperflash_config_t * | cfg_data ) |
Write configuration function.
ctx | Click object. |
cfg_data | Configuration data buffer. |
@description This function sends a set of configuration parameters to the click module.
uint8_t semperflash_write_memory | ( | semperflash_t * | ctx, |
uint32_t | addr, | ||
uint8_t * | data_buf, | ||
uint16_t | buf_size ) |
Write memory function.
ctx | Click object. |
addr | Memory address. |
data_buf | Data buffer. |
buf_size | Buffer size. |
@description This function writes data to the flash memory.