semperflash2 2.0.0.0
|
Functions | |
void | semperflash2_cfg_setup (semperflash2_cfg_t *cfg) |
Config Object Initialization function. | |
SEMPERFLASH2_RETVAL | semperflash2_init (semperflash2_t *ctx, semperflash2_cfg_t *cfg) |
Initialization function. | |
void | semperflash2_default_cfg (semperflash2_t *ctx) |
Click Default Configuration function. | |
void | semperflash2_send_cmd (semperflash2_t *ctx, uint8_t cmd) |
Send command function. | |
void | semperflash2_transfer_data (semperflash2_t *ctx, uint8_t *write_buf, uint16_t wbuf_size, uint8_t *read_buf, uint16_t rbuf_size) |
Transfer data function. | |
void | semperflash2_generic_write (semperflash2_t *ctx, uint8_t *write_buf, uint16_t buf_size) |
Writing data function. | |
void | semperflash2_write_config (semperflash2_t *ctx, semperflash2_config_t *cfg_data) |
Write configuration function. | |
uint8_t | semperflash2_read_memory (semperflash2_t *ctx, uint32_t addr, uint8_t *data_buf, uint16_t buf_size) |
Read memory function. | |
uint8_t | semperflash2_write_memory (semperflash2_t *ctx, uint32_t addr, uint8_t *data_buf, uint16_t buf_size) |
Write memory function. | |
void | semperflash2_erase_memory (semperflash2_t *ctx, uint32_t addr) |
Erase memory function. | |
uint8_t | semperflash2_get_device_id (semperflash2_t *ctx, uint8_t *id_buf) |
Get device ID function. | |
uint8_t | semperflash2_check_manufacturer_id (semperflash2_t *ctx) |
Check manufacturer ID function. | |
uint8_t | semperflash2_check_status_reg_1 (semperflash2_t *ctx) |
Check status register function. | |
void semperflash2_cfg_setup | ( | semperflash2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t semperflash2_check_manufacturer_id | ( | semperflash2_t * | ctx | ) |
Check manufacturer ID function.
ctx | Click object. |
@description This function checks if the manufacturer ID is OK or not.
uint8_t semperflash2_check_status_reg_1 | ( | semperflash2_t * | ctx | ) |
Check status register function.
ctx | Click object. |
@description This function checks the status register on the click module.
void semperflash2_default_cfg | ( | semperflash2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Semper Flash click.
void semperflash2_erase_memory | ( | semperflash2_t * | ctx, |
uint32_t | addr ) |
Erase memory function.
ctx | Click object. |
addr | Memory address. |
@description This function erases data from the flash memory.
void semperflash2_generic_write | ( | semperflash2_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 semperflash2_get_device_id | ( | semperflash2_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.
SEMPERFLASH2_RETVAL semperflash2_init | ( | semperflash2_t * | ctx, |
semperflash2_cfg_t * | cfg ) |
Initialization function.
semperflash2 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t semperflash2_read_memory | ( | semperflash2_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 semperflash2_send_cmd | ( | semperflash2_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 semperflash2_transfer_data | ( | semperflash2_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 semperflash2_write_config | ( | semperflash2_t * | ctx, |
semperflash2_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 semperflash2_write_memory | ( | semperflash2_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.