12 #ifndef _CI130X_SPIFLASH_H_ 13 #define _CI130X_SPIFLASH_H_ 29 #define SPI0FIFO_BASE 0x60000000 96 uint32_t buf,uint32_t addr,uint32_t size);
98 uint32_t buf,uint32_t addr,uint32_t size);
Definition: ci130x_spiflash.h:74
Definition: ci130x_spiflash.h:57
int32_t spic_erase_security_reg(spic_base_t spic, spic_security_reg_t reg)
擦除FLASH安全寄存器
Definition: ci130x_spiflash.c:561
Definition: ci130x_spiflash.h:49
Definition: ci130x_spiflash.h:71
Definition: ci130x_spiflash.h:50
int32_t flash_clk_div_init(spic_base_t spic)
FLASH时钟初始化
Definition: ci130x_spiflash.c:929
Definition: ci130x_spiflash.h:59
Definition: ci130x_spiflash.h:77
Definition: ci130x_spiflash.h:53
Definition: ci130x_spiflash.h:78
Definition: ci130x_spiflash.h:58
Definition: ci130x_spiflash.h:75
Definition: ci130x_spiflash.h:88
Definition: ci130x_spiflash.h:60
Definition: ci130x_spiflash.h:86
Definition: ci130x_spiflash.h:65
Definition: ci130x_spiflash.h:61
Definition: ci130x_spiflash.h:73
Definition: ci130x_spiflash.h:52
Definition: ci130x_spiflash.h:69
int32_t flash_init(spic_base_t spic)
FLASH普通模式初始化
Definition: ci130x_spiflash.c:949
#define HAL_DTRFLASH_BASE
Definition: ci130x_system.h:479
Definition: ci130x_spiflash.h:64
Definition: ci130x_spiflash.h:67
int32_t spic_xipconfig(spic_base_t spic)
FLASH的XIP模式初始化
Definition: ci130x_spiflash.c:894
int32_t spic_write_security_reg(spic_base_t spic, spic_security_reg_t reg, uint32_t buf, uint32_t addr, uint32_t size)
写FLASH的安全寄存器
Definition: ci130x_spiflash.c:605
int32_t spic_protect(spic_base_t spic, FunctionalState cmd)
FLASH保护设置
Definition: ci130x_spiflash.c:468
Definition: ci130x_spiflash.h:56
Definition: ci130x_spiflash.h:66
int32_t spic_read_unique_id(spic_base_t spic, uint8_t *unique)
读取Unique ID
Definition: ci130x_spiflash.c:304
Definition: ci130x_spiflash.h:39
Definition: ci130x_spiflash.h:63
Definition: ci130x_spiflash.h:87
int32_t spic_security_reg_lock(spic_base_t spic, spic_security_reg_t reg)
FLASH的安全寄存器上锁,慎用:上锁之后将导致该安全寄存器不可再次编程
Definition: ci130x_spiflash.c:690
spic_base_t
SPI控制器定义
Definition: ci130x_spiflash.h:37
int32_t flash_write(spic_base_t spic, uint32_t addr, uint32_t buf, uint32_t size)
写FLASH,兼容32M以上Flash
Definition: ci130x_spiflash.c:1384
spic_security_reg_t
FLASH安全寄存器定义
Definition: ci130x_spiflash.h:84
int32_t spic_read_jedec_id(spic_base_t spic, uint8_t *jedec)
读取Jedec ID
Definition: ci130x_spiflash.c:327
Definition: ci130x_spiflash.h:62
int32_t flash_erase(spic_base_t spic, uint32_t addr, uint32_t size)
FLASH擦除,兼容32M以上Flash
Definition: ci130x_spiflash.c:1353
Definition: ci130x_spiflash.h:70
FunctionalState
Definition: ci130x_system.h:86
Definition: ci130x_spiflash.h:47
int32_t spic_read_security_reg(spic_base_t spic, spic_security_reg_t reg, uint32_t buf, uint32_t addr, uint32_t size)
读FLASH的安全寄存器
Definition: ci130x_spiflash.c:650
Definition: ci130x_spiflash.h:51
int32_t flash_read(spic_base_t spic, uint32_t buf, uint32_t addr, uint32_t size)
读FLASH,兼容32M以上Flash
Definition: ci130x_spiflash.c:1470
Definition: ci130x_spiflash.h:55
Definition: ci130x_spiflash.h:48
Definition: ci130x_spiflash.h:76
Definition: ci130x_spiflash.h:68
spic_cmd_code_t
FLASH命令定义
Definition: ci130x_spiflash.h:45
Definition: ci130x_spiflash.h:54
Definition: ci130x_spiflash.h:72