flash6 2.0.0.0
|
Functions | |
void | flash6_cfg_setup (flash6_cfg_t *cfg) |
Config Object Initialization function. | |
FLASH6_RETVAL | flash6_init (flash6_t *ctx, flash6_cfg_t *cfg) |
Initialization function. | |
void | flash6_generic_transfer (flash6_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | flash6_read_data (flash6_t *ctx, uint8_t reg_addr, uint8_t *data_buf, uint16_t len) |
Generic funcion for reading. | |
void | flash6_write_data (flash6_t *ctx, uint8_t reg_addr, uint8_t *data_buf, uint8_t len) |
Generic funcion for writing. | |
void | flash6_send_cmd (flash6_t *ctx, uint8_t cmd_data) |
Function for sending one Byte od data. | |
uint8_t | flash6_get_manufacture_device_id (flash6_t *ctx, uint8_t *manufacture_id, uint8_t *device_id) |
Funcion for checking manufacture and device id. | |
void | flash6_erase_memory_segment (flash6_t *ctx, uint8_t segment, uint32_t start_addr) |
Function for eraseing segment. | |
uint8_t | flash6_read_status_reg (flash6_t *ctx, uint8_t status_cmd) |
Function for reading status register. | |
void | flash6_write_status_reg (flash6_t *ctx, uint8_t status_cmd, uint8_t status_data) |
Function for writing status register. | |
void | flash6_write_memory_data (flash6_t *ctx, uint32_t addr, uint8_t *data_buf, uint16_t buf_size) |
Function used for writing in memory. | |
void | flash6_read_memory_data (flash6_t *ctx, uint32_t addr, uint8_t *data_buf, uint16_t buf_size) |
Function used for reading from memory. | |
void | flash6_software_reset (flash6_t *ctx) |
Function for reseting device. | |
void flash6_cfg_setup | ( | flash6_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void flash6_erase_memory_segment | ( | flash6_t * | ctx, |
uint8_t | segment, | ||
uint32_t | start_addr ) |
Function for eraseing segment.
ctx | Click object. |
segment | Segment to be deleted |
page_addr | Address for start erase |
void flash6_generic_transfer | ( | flash6_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
block | Transfer block structure. |
@description Generic SPI transfer, for sending and receiving packages
uint8_t flash6_get_manufacture_device_id | ( | flash6_t * | ctx, |
uint8_t * | manufacture_id, | ||
uint8_t * | device_id ) |
Funcion for checking manufacture and device id.
ctx | Click object. |
manufacture_id | |
device_id |
FLASH6_RETVAL flash6_init | ( | flash6_t * | ctx, |
flash6_cfg_t * | cfg ) |
Initialization function.
flash6 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void flash6_read_data | ( | flash6_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | data_buf, | ||
uint16_t | len ) |
Generic funcion for reading.
ctx | Click object. |
reg_addr | Registar of reading buf |
data_buf | Pointer to array of output data |
len | Size of array of output data |
void flash6_read_memory_data | ( | flash6_t * | ctx, |
uint32_t | addr, | ||
uint8_t * | data_buf, | ||
uint16_t | buf_size ) |
Function used for reading from memory.
ctx | Click object. |
addr | Address from which data will be read |
data_buf | Pointer to output array |
buf_size | Size of intput array |
uint8_t flash6_read_status_reg | ( | flash6_t * | ctx, |
uint8_t | status_cmd ) |
Function for reading status register.
ctx | Click object. |
status_cmd | Command status |
void flash6_send_cmd | ( | flash6_t * | ctx, |
uint8_t | cmd_data ) |
Function for sending one Byte od data.
cmd_data | Byte to be sent |
void flash6_software_reset | ( | flash6_t * | ctx | ) |
Function for reseting device.
ctx | Click object. |
void flash6_write_data | ( | flash6_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic funcion for writing.
ctx | Click object. |
reg_addr | Registar of writing buf |
data_buf | Pointer to array of input data |
len | Size of array of input data |
void flash6_write_memory_data | ( | flash6_t * | ctx, |
uint32_t | addr, | ||
uint8_t * | data_buf, | ||
uint16_t | buf_size ) |
Function used for writing in memory.
ctx | Click object. |
addr | Address from which data will be written |
data_buf | Pointer to input array |
buf_size | Size of iutput array |
void flash6_write_status_reg | ( | flash6_t * | ctx, |
uint8_t | status_cmd, | ||
uint8_t | status_data ) |
Function for writing status register.
ctx | Click object. |
status_cmd | Command status |
status_data | Input status |