OpenBIC
OpenSource Bridge-IC
flash_shell.h File Reference
#include <stdlib.h>
#include <shell/shell.h>
#include <drivers/spi_nor.h>
#include <drivers/flash.h>
Include dependency graph for flash_shell.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SPI_DEVICE_PREFIX   "spi"
 
#define MAX_SFDP_BUFF_SIZE   256
 

Functions

void cmd_flash_re_init (const struct shell *shell, size_t argc, char **argv)
 
void cmd_flash_sfdp_read (const struct shell *shell, size_t argc, char **argv)
 
void device_spi_name_get (size_t idx, struct shell_static_entry *entry)
 
 SHELL_DYNAMIC_CMD_CREATE (spi_device_name, device_spi_name_get)
 
 SHELL_STATIC_SUBCMD_SET_CREATE (sub_flash_cmds, SHELL_CMD(re_init, &spi_device_name, "Re-init spi config", cmd_flash_re_init), SHELL_CMD(sfpd_read, &spi_device_name, "SFPD read", cmd_flash_sfdp_read), SHELL_SUBCMD_SET_END)
 

Macro Definition Documentation

◆ MAX_SFDP_BUFF_SIZE

#define MAX_SFDP_BUFF_SIZE   256

◆ SPI_DEVICE_PREFIX

#define SPI_DEVICE_PREFIX   "spi"

Function Documentation

◆ cmd_flash_re_init()

void cmd_flash_re_init ( const struct shell *  shell,
size_t  argc,
char **  argv 
)

◆ cmd_flash_sfdp_read()

void cmd_flash_sfdp_read ( const struct shell *  shell,
size_t  argc,
char **  argv 
)

◆ device_spi_name_get()

void device_spi_name_get ( size_t  idx,
struct shell_static_entry *  entry 
)

◆ SHELL_DYNAMIC_CMD_CREATE()

SHELL_DYNAMIC_CMD_CREATE ( spi_device_name  ,
device_spi_name_get   
)

◆ SHELL_STATIC_SUBCMD_SET_CREATE()

SHELL_STATIC_SUBCMD_SET_CREATE ( sub_flash_cmds  ,
SHELL_CMD(re_init, &spi_device_name, "Re-init spi config", cmd_flash_re_init)  ,
SHELL_CMD(sfpd_read, &spi_device_name, "SFPD read", cmd_flash_sfdp_read)  ,
SHELL_SUBCMD_SET_END   
)