flash3 2.0.0.0
|
Functions | |
void | flash3_cfg_setup (flash3_cfg_t *cfg) |
Config Object Initialization function. | |
FLASH3_RETVAL | flash3_init (flash3_t *ctx, flash3_cfg_t *cfg) |
Initialization function. | |
void | flash3_generic_transfer (flash3_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | flash3_pause (flash3_t *ctx) |
Pause function. | |
void | flash3_unpause (flash3_t *ctx) |
Unpause function. | |
void | flash3_wr_prot_enable (flash3_t *ctx) |
Write Protect enable function. | |
void | flash3_wr_prot_disable (flash3_t *ctx) |
Disable write function. | |
void | flash3_setting (flash3_t *ctx) |
Initialisation function. | |
void | flash3_write_enable (flash3_t *ctx) |
Enable write function. | |
void | flash3_write_disable (flash3_t *ctx) |
Enable write function. | |
void | flash3_write_cmd (flash3_t *ctx, uint8_t cmd) |
Write command function. | |
void | flash3_write_adv_cmd (flash3_t *ctx, uint8_t cmd, uint8_t *arg, uint32_t cnt) |
Flash 3 Command Advanced function. | |
uint8_t | flash3_rd_stat_reg (flash3_t *ctx) |
Reads Status Register function. | |
void | flash3_wr_stat_reg (flash3_t *ctx, uint8_t status) |
Write Status Register function. | |
uint8_t | flash3_rd_func_reg (flash3_t *ctx) |
Reads Function Register function. | |
void | flash3_wr_func_reg (flash3_t *ctx, uint8_t function) |
Reads Function Register function. | |
void | flash3_normal_read (flash3_t *ctx, uint32_t addr, uint8_t *buff, uint32_t cnt) |
Normal data read function. | |
void | flash3_fast_read (flash3_t *ctx, uint32_t addr, uint8_t *buff, uint32_t cnt) |
Fast data read function. | |
void | flash3_write (flash3_t *ctx, uint32_t addr, uint8_t *buff, uint32_t cnt) |
Fast data read function. | |
void | flash3_chip_erase (flash3_t *ctx) |
Chip erase function. | |
void | flash3_sector_erase (flash3_t *ctx, uint32_t address) |
Sector erase function. | |
void | flash3_block32_erase (flash3_t *ctx, uint32_t address) |
Block 32 erase function. | |
void | flash3_block64_erase (flash3_t *ctx, uint32_t address) |
Block 64 erase function. | |
void flash3_block32_erase | ( | flash3_t * | ctx, |
uint32_t | address ) |
Block 32 erase function.
ctx | Click object. |
address | Function writes 8-bit data into function register. |
@description This function can take as long as 750 milliseconds to finish erasing chosen block.
void flash3_block64_erase | ( | flash3_t * | ctx, |
uint32_t | address ) |
Block 64 erase function.
ctx | Click object. |
address | Function writes 8-bit data into function register. |
@description This function can take as long as 1.5 seconds to finish erasing chosen block.
void flash3_cfg_setup | ( | flash3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void flash3_chip_erase | ( | flash3_t * | ctx | ) |
Chip erase function.
ctx | Click object. |
@description This function is used to erase the entire memory array of a Flash 3 device.
void flash3_fast_read | ( | flash3_t * | ctx, |
uint32_t | addr, | ||
uint8_t * | buff, | ||
uint32_t | cnt ) |
Fast data read function.
ctx | Click object. |
addr | Function writes 8-bit data into function register. |
buff | data array read from memory. |
cnt | 32-bit data representing number of bytes user wants to read. |
@description This function is used to read memory contents at a maximum frequency of 133MHz.
void flash3_generic_transfer | ( | flash3_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
FLASH3_RETVAL flash3_init | ( | flash3_t * | ctx, |
flash3_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 flash3_normal_read | ( | flash3_t * | ctx, |
uint32_t | addr, | ||
uint8_t * | buff, | ||
uint32_t | cnt ) |
Normal data read function.
ctx | Click object. |
addr | Function writes 8-bit data into function register. |
buff | data array read from memory. |
cnt | 32-bit data representing number of bytes user wants to read. |
@description This function is used to read memory contents at a maximum frequency of 50MHz.
void flash3_pause | ( | flash3_t * | ctx | ) |
Pause function.
ctx | Click object. |
@description This function pauses serial communication, without resetting the serial sequence.
uint8_t flash3_rd_func_reg | ( | flash3_t * | ctx | ) |
Reads Function Register function.
ctx | Click object. |
@description This function is used to read function register.
uint8_t flash3_rd_stat_reg | ( | flash3_t * | ctx | ) |
Reads Status Register function.
ctx | Click object. |
@description This function is used to read status register.
void flash3_sector_erase | ( | flash3_t * | ctx, |
uint32_t | address ) |
Sector erase function.
ctx | Click object. |
addr | Function writes 8-bit data into function register. |
@description This function is used to erase a chosen 4 Kbyte sector.
void flash3_setting | ( | flash3_t * | ctx | ) |
Initialisation function.
ctx | Click object. |
@description This function is used to set needed values to default.
void flash3_unpause | ( | flash3_t * | ctx | ) |
Unpause function.
ctx | Click object. |
@description This function unpauses serial communication.
void flash3_wr_func_reg | ( | flash3_t * | ctx, |
uint8_t | function ) |
Reads Function Register function.
ctx | Click object. |
function | Function writes 8-bit data into function register. |
@description This function writes 8-bit data into function register.
void flash3_wr_prot_disable | ( | flash3_t * | ctx | ) |
Disable write function.
ctx | Click object. |
@description This function is used to to disable write function.
void flash3_wr_prot_enable | ( | flash3_t * | ctx | ) |
Write Protect enable function.
ctx | Click object. |
@description This function is used to enable write protect.
void flash3_wr_stat_reg | ( | flash3_t * | ctx, |
uint8_t | status ) |
Write Status Register function.
ctx | Click object. |
@description This function writes 8-bit data into status register.
void flash3_write | ( | flash3_t * | ctx, |
uint32_t | addr, | ||
uint8_t * | buff, | ||
uint32_t | cnt ) |
Fast data read function.
ctx | Click object. |
addr | Function writes 8-bit data into function register. |
buff | data array read from memory. |
cnt | 32-bit data representing number of bytes user wants to read. |
@description This function is used to read memory contents at a maximum frequency of 133MHz.
void flash3_write_adv_cmd | ( | flash3_t * | ctx, |
uint8_t | cmd, | ||
uint8_t * | arg, | ||
uint32_t | cnt ) |
Flash 3 Command Advanced function.
ctx | Click object. |
cmd | 8-bit data representing command. |
arg | data representing required arguments. |
cnt | 32-bit data representing number of bytes used for arguments. |
@description This function is used to executes various commands that requires arguments.
void flash3_write_cmd | ( | flash3_t * | ctx, |
uint8_t | cmd ) |
Write command function.
ctx | Click object. |
cmd | 8-bit data representing command. |
@description This function is used to executes various commands.
void flash3_write_disable | ( | flash3_t * | ctx | ) |
Enable write function.
ctx | Click object. |
@description This function is used to to enable write function.
void flash3_write_enable | ( | flash3_t * | ctx | ) |
Enable write function.
ctx | Click object. |
@description This function is used to to enable write function.