flash4 2.0.0.0
|
Functions | |
void | flash4_cfg_setup (flash4_cfg_t *cfg) |
Config Object Initialization function. | |
FLASH4_RETVAL | flash4_init (flash4_t *ctx, flash4_cfg_t *cfg) |
Initialization function. *. | |
void | flash4_generic_transfer (flash4_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | flash4_read_manufacturer_id (flash4_t *ctx, uint8_t *device_id) |
Read Manufacturer ID function. | |
void | flash4_read_identification (flash4_t *ctx, uint8_t *out_data, uint8_t n_data) |
Read Identification function. | |
uint8_t | flash4_read_electronic_id (flash4_t *ctx) |
Read Electronic Signature function. | |
void | flash4_read_serial_flash_parameters (flash4_t *ctx, uint8_t *out_params, uint8_t c) |
Read Serial Flash Discoverable Parameters function. | |
uint8_t | flash4_read_byte (flash4_t *ctx, uint8_t reg) |
Read byte from register function. | |
void | flash4_write_byte (flash4_t *ctx, uint8_t reg, uint8_t data_buff) |
Write one byte to register function. | |
void | flash4_write_command (flash4_t *ctx, uint8_t cmd) |
Write command function. | |
void | flash4_write_reg (flash4_t *ctx, uint8_t status, uint8_t config) |
Write data to register function. | |
void | flash4_read_ecc (flash4_t *ctx, uint8_t *out_ecc, uint8_t n_dummy) |
Read ECC Status Register function. | |
void | flash4_read_auto_boot (flash4_t *ctx, uint8_t *out_ab) |
Read AutoBoot Register function. | |
void | flash4_read_flash (flash4_t *ctx, uint8_t *out_data, uint32_t addr, uint8_t n_data) |
Read Flash function. | |
void | flash4_read_flash_4 (flash4_t *ctx, uint8_t *out_data, uint32_t addr, uint8_t n_data) |
Read Flash with 4 byte address function. | |
void | flash4_fast_read_flash (flash4_t *ctx, uint8_t *out_data, uint32_t addr, uint8_t n_data_dummy) |
Fast read Flash function. | |
void | flash4_fast_read_flash_4 (flash4_t *ctx, uint8_t *out_data, uint8_t addr, uint8_t n_data) |
Fast read Flash with 4 byte address function. | |
void | flash4_page_program_4 (flash4_t *ctx, uint8_t *in_data, uint32_t addr, uint8_t n_data) |
Write data to address with 4 byte address function. | |
void | flash4_sector_erase (flash4_t *ctx, uint32_t addr) |
Sector Erase function. | |
void | flash4_sector_erase_4 (flash4_t *ctx, uint32_t addr) |
Sector Erase for 4 bytes address function. | |
uint8_t | flash4_check_wip (flash4_t *ctx) |
Function for wip. | |
uint8_t | flash4_check_wel (flash4_t *ctx) |
Function for wel. | |
uint8_t | flash4_check_ps (flash4_t *ctx) |
Function for ps. | |
uint8_t | flash4_check_es (flash4_t *ctx) |
Function for es. | |
void | flash4_reset (flash4_t *ctx) |
Function for reset. | |
void flash4_cfg_setup | ( | flash4_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t flash4_check_es | ( | flash4_t * | ctx | ) |
Function for es.
ctx | Click object. |
@description This function checks es.
uint8_t flash4_check_ps | ( | flash4_t * | ctx | ) |
Function for ps.
ctx | Click object. |
@description This function checks ps.
uint8_t flash4_check_wel | ( | flash4_t * | ctx | ) |
Function for wel.
ctx | Click object. |
@description This function checks wel.
uint8_t flash4_check_wip | ( | flash4_t * | ctx | ) |
Function for wip.
ctx | Click object. |
@description This function checks wip.
void flash4_fast_read_flash | ( | flash4_t * | ctx, |
uint8_t * | out_data, | ||
uint32_t | addr, | ||
uint8_t | n_data_dummy ) |
Fast read Flash function.
ctx | Click object. |
out_data | Data output. |
addr | Start address. |
n_data_dummy | Number of data. |
@description This function reads flash performing fast read feature.
void flash4_fast_read_flash_4 | ( | flash4_t * | ctx, |
uint8_t * | out_data, | ||
uint8_t | addr, | ||
uint8_t | n_data ) |
Fast read Flash with 4 byte address function.
ctx | Click object. |
out_data | Data output. |
addr | Start address. |
n_data | Number of data. |
@description This function reads flash performing fast read Flash with 4 byte address feature.
void flash4_generic_transfer | ( | flash4_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
FLASH4_RETVAL flash4_init | ( | flash4_t * | ctx, |
flash4_cfg_t * | cfg ) |
Initialization function. *.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void flash4_page_program_4 | ( | flash4_t * | ctx, |
uint8_t * | in_data, | ||
uint32_t | addr, | ||
uint8_t | n_data ) |
Write data to address with 4 byte address function.
ctx | Click object. |
in_data | Data output. |
addr | Start address. |
n_data | Number of data. |
@description This function writes data to address with 4 byte address.
void flash4_read_auto_boot | ( | flash4_t * | ctx, |
uint8_t * | out_ab ) |
Read AutoBoot Register function.
ctx | Click object. |
out_ab | Data output. |
@description This function reads AutoBoot Register.
uint8_t flash4_read_byte | ( | flash4_t * | ctx, |
uint8_t | reg ) |
Read byte from register function.
ctx | Click object. |
reg | Register which will be read. |
@description This function reads a single byte from register.
void flash4_read_ecc | ( | flash4_t * | ctx, |
uint8_t * | out_ecc, | ||
uint8_t | n_dummy ) |
Read ECC Status Register function.
ctx | Click object. |
out_ecc | Data output. |
n_dummy | Number of data(max 200 byte). |
@description This function reads ECC Status Register.
uint8_t flash4_read_electronic_id | ( | flash4_t * | ctx | ) |
Read Electronic Signature function.
ctx | Click object. |
@description This function reads Electronic Signature.
void flash4_read_flash | ( | flash4_t * | ctx, |
uint8_t * | out_data, | ||
uint32_t | addr, | ||
uint8_t | n_data ) |
Read Flash function.
ctx | Click object. |
out_data | Data output. |
addr | Start address. |
n_data | Number of data. |
@description This function reads Flash.
void flash4_read_flash_4 | ( | flash4_t * | ctx, |
uint8_t * | out_data, | ||
uint32_t | addr, | ||
uint8_t | n_data ) |
Read Flash with 4 byte address function.
ctx | Click object. |
out_data | Data output. |
addr | Start address. |
n_data | Number of data. |
@description This function reads Flash with 4 byte address.
void flash4_read_identification | ( | flash4_t * | ctx, |
uint8_t * | out_data, | ||
uint8_t | n_data ) |
Read Identification function.
ctx | Click object. |
out_data | Data output. |
n_data | Number of data. |
@description This function reads Identification.
void flash4_read_manufacturer_id | ( | flash4_t * | ctx, |
uint8_t * | device_id ) |
Read Manufacturer ID function.
ctx | Click object. |
device_id | [ 0 ] - Manufacturer ID and [ 1 ] - Device ID (hex). |
@description Read manufacturer id.
void flash4_read_serial_flash_parameters | ( | flash4_t * | ctx, |
uint8_t * | out_params, | ||
uint8_t | c ) |
Read Serial Flash Discoverable Parameters function.
ctx | Click object. |
out_params | Data output. |
n_data | Number of data. |
@description This function reads Serial Flash Discoverable Parameters.
void flash4_reset | ( | flash4_t * | ctx | ) |
Function for reset.
ctx | Click object. |
@description This function resets the device.
void flash4_sector_erase | ( | flash4_t * | ctx, |
uint32_t | addr ) |
Sector Erase function.
ctx | Click object. |
addr | Start address. |
@description This function erases sector.
void flash4_sector_erase_4 | ( | flash4_t * | ctx, |
uint32_t | addr ) |
Sector Erase for 4 bytes address function.
ctx | Click object. |
addr | Start address. |
@description This function erases sector for 4 bytes address.
void flash4_write_byte | ( | flash4_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_buff ) |
Write one byte to register function.
ctx | Click object. |
reg | Register in which the data will be written. |
data_buff | Data which be written in the register. |
@description This function writes one byte to register.
void flash4_write_command | ( | flash4_t * | ctx, |
uint8_t | cmd ) |
Write command function.
ctx | Click object. |
cmd | Command. |
@description This function writes command.
void flash4_write_reg | ( | flash4_t * | ctx, |
uint8_t | status, | ||
uint8_t | config ) |
Write data to register function.
ctx | Click object. |
status | Command. |
config | Config. |
@description This function writes data to register.