flash 2.0.0.0
|
This file contains API for Flash Click driver. More...
#include "drv_digital_out.h"
#include "drv_spi_master.h"
Go to the source code of this file.
Data Structures | |
struct | flash_t |
Click context object definition. More... | |
struct | flash_cfg_t |
Click configuration structure definition. More... | |
Enumerations | |
enum | flash_err_t { FLASH_OK = 0x0 , FLASH_ERR_INIT_DRV = 0xFD , FLASH_ERR_MEM_ADDR , FLASH_ERR_NDATA } |
Click error code definition. More... | |
enum | flash_pin_state_t { FLASH_PIN_STATE_LOW = 0 , FLASH_PIN_STATE_HIGH } |
Click pin states. More... | |
Functions | |
void | flash_cfg_setup (flash_cfg_t *cfg) |
Config Object Setup function. | |
flash_err_t | flash_init (flash_t *ctx, flash_cfg_t *cfg) |
Click Initialization function. | |
void | flash_default_cfg (flash_t *ctx) |
Click Default Configuration function. | |
void | flash_reset (flash_t *ctx) |
Reset function. | |
void | flash_write_enable (flash_t *ctx) |
Write Enable function. | |
void | flash_write_disable (flash_t *ctx) |
Write Disable function. | |
void | flash_write_status (flash_t *ctx, uint8_t data_tx) |
Status Write function. | |
uint8_t | flash_read_status (flash_t *ctx) |
Status Read function. | |
void | flash_read_id (flash_t *ctx, uint8_t *manufact_id, uint16_t *dev_id) |
ID Read function. | |
flash_err_t | flash_write_byte (flash_t *ctx, uint32_t mem_addr, uint8_t data_tx) |
Byte Write function. | |
flash_err_t | flash_read_byte (flash_t *ctx, uint32_t mem_addr, uint8_t *data_rx) |
Byte Read function. | |
flash_err_t | flash_write_page (flash_t *ctx, uint32_t mem_addr, uint8_t *data_tx, uint16_t n_data) |
Page Write function. | |
flash_err_t | flash_read_page (flash_t *ctx, uint32_t mem_addr, uint8_t *data_rx, uint16_t n_data) |
Page Read function. | |
void | flash_erase_chip (flash_t *ctx) |
Chip Erase function. | |
flash_err_t | flash_erase_block (flash_t *ctx, uint32_t mem_addr) |
Block Erase function. | |
flash_err_t | flash_erase_half_block (flash_t *ctx, uint32_t mem_addr) |
Half Block Erase function. | |
flash_err_t | flash_erase_sector (flash_t *ctx, uint32_t mem_addr) |
Sector Erase function. | |
void | flash_set_write_protect_pin (flash_t *ctx, flash_pin_state_t state) |
WP Pin Set function. | |
void | flash_set_hold_pin (flash_t *ctx, flash_pin_state_t state) |
HLD Pin Set function. | |
This file contains API for Flash Click driver.