flash11 2.1.0.0
|
This file contains API for Flash 11 Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"
#include "spi_specifics.h"
Go to the source code of this file.
Data Structures | |
struct | flash11_t |
Flash 11 Click context object. More... | |
struct | flash11_cfg_t |
Flash 11 Click configuration object. More... | |
Macros | |
#define | FLASH11_CMD_ENABLE_RESET 0x66 |
Flash 11 description system commands. | |
#define | FLASH11_CMD_RESET_DEVICE 0x99 |
#define | FLASH11_CMD_DEEP_POWER_DOWN 0xB9 |
#define | FLASH11_CMD_RESUME_FROM_DPD 0xAB |
#define | FLASH11_CMD_READ_ARRAY 0x03 |
Flash 11 description read commands. | |
#define | FLASH11_CMD_FAST_READ_ARRAY 0x0B |
#define | FLASH11_CMD_WRITE_ENABLE 0x06 |
Flash 11 description read commands. | |
#define | FLASH11_CMD_VOLATILE_SR_WR_EN 0x50 |
#define | FLASH11_CMD_WRITE_DISABLE 0x04 |
#define | FLASH11_CMD_BYTE_PAGE_PROGRAM 0x02 |
Flash 11 description program commands. | |
#define | FLASH11_CMD_BLOCK_ERASE_4KB 0x20 |
Flash 11 description erase commands. | |
#define | FLASH11_CMD_BLOCK_ERASE_32KB 0x52 |
#define | FLASH11_CMD_BLOCK_ERASE_64KB 0xD8 |
#define | FLASH11_CMD_CHIP_ERASE 0x60 |
#define | FLASH11_CMD_ERASE_PROGRAM_SUSPEND 0x75 |
Flash 11 description suspend/resume commands. | |
#define | FLASH11_CMD_ERASE_PROGRAM_RESUME 0x7A |
#define | FLASH11_CMD_READ_STATUS_1 0x05 |
Flash 11 description status register commands. | |
#define | FLASH11_CMD_READ_STATUS_2 0x35 |
#define | FLASH11_CMD_READ_STATUS_3 0x15 |
#define | FLASH11_CMD_WRITE_STATUS_1 0x01 |
#define | FLASH11_CMD_WRITE_STATUS_2 0x31 |
#define | FLASH11_CMD_WRITE_STATUS_3 0x11 |
#define | FLASH11_CMD_MANUFACTURER_ID 0x90 |
Flash 11 description device information commands. | |
#define | FLASH11_CMD_READ_JEDEC_ID 0x9F |
#define | FLASH11_CMD_READ_SERIAL_FLASH_DP 0x5A |
#define | FLASH11_CMD_ERASE_SECURITY_REG 0x44 |
Flash 11 description OTP commands. | |
#define | FLASH11_CMD_PROGRAM_SECURITY_REG 0x42 |
#define | FLASH11_CMD_READ_SECURITY_REG 0x48 |
#define | FLASH11_CMD_READ_UNIQUE_ID_NUM 0x4B |
#define | FLASH11_STATUS1_SRP0_BIT_MASK 0x80 |
Flash 11 description status register 1 bit assignments. | |
#define | FLASH11_STATUS1_BP4_BIT_MASK 0x40 |
#define | FLASH11_STATUS1_BP3_BIT_MASK 0x20 |
#define | FLASH11_STATUS1_BP2_BIT_MASK 0x10 |
#define | FLASH11_STATUS1_BP1_BIT_MASK 0x08 |
#define | FLASH11_STATUS1_BP0_BIT_MASK 0x04 |
#define | FLASH11_STATUS1_WEL_EN 0x02 |
#define | FLASH11_STATUS1_WEL_DIS 0x00 |
#define | FLASH11_STATUS1_BSY 0x01 |
#define | FLASH11_STATUS1_RDY 0x00 |
#define | FLASH11_MANUFACTURER_ID 0x1F |
Flash 11 description manufacturer and device ID. | |
#define | FLASH11_DEVICE_ID_0 0x87 |
#define | FLASH11_DEVICE_ID_1 0x01 |
#define | FLASH11_MIN_ADDRESS 0x000000 |
Flash 11 description status register 1 bit assignments. | |
#define | FLASH11_MAX_ADDRESS 0x3FFFFFul |
#define | FLASH11_PAGE_SIZE 256 |
#define | FLASH11_WRITE_PROTECT_ENABLE 0 |
Flash 11 description of the write-protection pin logic state. | |
#define | FLASH11_WRITE_PROTECT_DISABLE 1 |
#define | FLASH11_HOLD_ENABLE 0 |
Flash 11 description of the hold pin logic state. | |
#define | FLASH11_HOLD_DISABLE 1 |
#define | FLASH11_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE |
Data sample selection. | |
#define | FLASH11_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE |
#define | FLASH11_MAP_MIKROBUS(cfg, mikrobus) |
MikroBUS pin mapping. | |
Enumerations | |
enum | flash11_return_value_t { FLASH11_OK = 0 , FLASH11_ERROR = -1 } |
Flash 11 Click return value data. More... | |
Functions | |
void | flash11_cfg_setup (flash11_cfg_t *cfg) |
Flash 11 configuration object setup function. | |
err_t | flash11_init (flash11_t *ctx, flash11_cfg_t *cfg) |
Flash 11 initialization function. | |
err_t | flash11_default_cfg (flash11_t *ctx) |
Flash 11 default configuration function. | |
err_t | flash11_generic_write (flash11_t *ctx, uint8_t opcode, uint8_t *data_in, uint8_t len) |
Flash 11 data writing function. | |
err_t | flash11_generic_read (flash11_t *ctx, uint8_t opcode, uint8_t *data_out, uint8_t len) |
Flash 11 data reading function. | |
err_t | flash11_set_cmd (flash11_t *ctx, uint8_t opcode) |
Flash 11 set the command function. | |
err_t | flash11_write_cmd_addr_data (flash11_t *ctx, uint8_t opcode, uint32_t mem_addr, uint8_t *data_in, uint32_t len) |
Flash 11 write command adress data function. | |
err_t | flash11_read_cmd_addr_data (flash11_t *ctx, uint8_t opcode, uint32_t mem_addr, uint8_t *data_out, uint32_t len) |
Flash 11 read command adress data function. | |
err_t | flash11_sw_reset (flash11_t *ctx) |
Flash 11 sw reset function. | |
err_t | flash11_memory_write (flash11_t *ctx, uint32_t mem_addr, uint8_t *data_in, uint32_t len) |
Flash 11 memory write function. | |
err_t | flash11_memory_read (flash11_t *ctx, uint32_t mem_addr, uint8_t *data_out, uint32_t len) |
Flash 11 memory read function. | |
err_t | flash11_write_enable (flash11_t *ctx) |
Flash 11 write enable function. | |
err_t | flash11_write_disable (flash11_t *ctx) |
Flash 11 write disable function. | |
err_t | flash11_block_erase (flash11_t *ctx, uint8_t cmd_block_erase, uint32_t mem_addr) |
Flash 11 block erase function. | |
err_t | flash11_chip_erase (flash11_t *ctx) |
Flash 11 chip erase function. | |
err_t | flash11_set_status (flash11_t *ctx, uint8_t status_reg, uint8_t status) |
Flash 11 set status function. | |
err_t | flash11_get_status (flash11_t *ctx, uint8_t status_reg, uint8_t *status) |
Flash 11 gets the status function. | |
err_t | flash11_get_device_id (flash11_t *ctx, uint8_t *device_id) |
Flash 11 gets the device ID function. | |
void | flash11_hw_write_protect (flash11_t *ctx, uint8_t en_wp) |
Flash 11 hardware write protect function. | |
void | flash11_en_hold (flash11_t *ctx, uint8_t en_hold) |
Flash 11 enable hold function. | |
This file contains API for Flash 11 Click Driver.