XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
device.h
浏览该文件的文档.
1
27#ifndef __xwcd_peripheral_spi_flash_w25qxx_device_h__
28#define __xwcd_peripheral_spi_flash_w25qxx_device_h__
29
30#include <xwos/standard.h>
32
39#define XWDS_W25QXX_CMD_MAX_PAYLOAD 256U
40
47
54
58
60
65
68
72
75
78
81
83};
84
95};
96
105};
106
119};
132};
133
146};
147
157};
158
167};
168
175 /* attributes */
177 const struct xwds_w25qxx_cmd * cmdtbl;
179 /* private */
182};
183
184void xwds_w25qxx_construct(struct xwds_w25qxx * w25qxx);
185void xwds_w25qxx_destruct(struct xwds_w25qxx * w25qxx);
186
193static __xwds_inline
195{
196 return xwds_spip_grab(&w25qxx->spip);
197}
198
205static __xwds_inline
207{
208 return xwds_spip_put(&w25qxx->spip);
209}
210
215#endif /* xwcd/peripheral/spi/flash/w25qxx/device.h */
xwer_t xwds_spip_grab(struct xwds_spip *spip)
XWDS API:增加对象的引用计数
Definition peripheral.c:70
xwer_t xwds_spip_put(struct xwds_spip *spip)
XWDS API:减少对象的引用计数
Definition peripheral.c:76
#define __xwds_inline
Definition standard.h:34
xwds_w25qxx_sr_idx_em
W25QXX Flash SR寄存器序号
Definition device.h:100
xwds_w25qxx_sr1_bit_em
W25QXX Flash SR1 位枚举
Definition device.h:110
static xwer_t xwds_w25qxx_grab(struct xwds_w25qxx *w25qxx)
W25QXX API:增加对象的引用计数
Definition device.h:194
void xwds_w25qxx_construct(struct xwds_w25qxx *w25qxx)
Definition device.c:24
static xwer_t xwds_w25qxx_put(struct xwds_w25qxx *w25qxx)
W25QXX API:减少对象的引用计数
Definition device.h:206
#define XWDS_W25QXX_CMD_MAX_PAYLOAD
Definition device.h:39
xwds_w25qxx_cmd_em
W25QXX Flash 指令枚举
Definition device.h:44
w25q_mid_em
W25QXX Flash MID 枚举
Definition device.h:88
void xwds_w25qxx_destruct(struct xwds_w25qxx *w25qxx)
Definition device.c:30
xwds_w25qxx_sr3_bit_em
W25QXX Flash SR3 位枚举
Definition device.h:137
xwds_w25qxx_sr2_bit_em
W25QXX Flash SR2 位枚举
Definition device.h:123
@ XWDS_W25QXX_SR_2
Definition device.h:102
@ XWDS_W25QXX_SR_3
Definition device.h:103
@ XWDS_W25QXX_SR_NUM
Definition device.h:104
@ XWDS_W25QXX_SR_1
Definition device.h:101
@ XWDS_W25QXX_SR1_BP1
Definition device.h:114
@ XWDS_W25QXX_SR1_WEL
Definition device.h:112
@ XWDS_W25QXX_SR1_SEC
Definition device.h:117
@ XWDS_W25QXX_SR1_BUSY
Definition device.h:111
@ XWDS_W25QXX_SR1_BP2
Definition device.h:115
@ XWDS_W25QXX_SR1_SRP
Definition device.h:118
@ XWDS_W25QXX_SR1_BP0
Definition device.h:113
@ XWDS_W25QXX_SR1_TB
Definition device.h:116
@ XWDS_W25QXX_CMD_64KBLOCK_ERASE
Definition device.h:62
@ XWDS_W25QXX_CMD_WRITE_STATUS_REG_1
Definition device.h:51
@ XWDS_W25QXX_CMD_READ_STATUS_REG_2
Definition device.h:49
@ XWDS_W25QXX_CMD_CHIP_ERASE
Definition device.h:64
@ XWDS_W25QXX_CMD_UNIQUE_ID
Definition device.h:69
@ XWDS_W25QXX_CMD_RESET
Definition device.h:80
@ XWDS_W25QXX_CMD_WRITE_STATUS_REG_3
Definition device.h:53
@ XWDS_W25QXX_CMD_ENABLE_RESET
Definition device.h:79
@ XWDS_W25QXX_CMD_EXIT_QPI_MODE
Definition device.h:77
@ XWDS_W25QXX_CMD_PAGE_PROGRAM
Definition device.h:59
@ XWDS_W25QXX_CMD_WRITE_DISABLE
Definition device.h:45
@ XWDS_W25QXX_CMD_MANUFACTURER_DEVICE_ID
Definition device.h:70
@ XWDS_W25QXX_CMD_EXIT_4BYTE_ADDR_MODE
Definition device.h:74
@ XWDS_W25QXX_CMD_READ_STATUS_REG_1
Definition device.h:48
@ XWDS_W25QXX_CMD_ENTER_QPI_MODE
Definition device.h:76
@ XWDS_W25QXX_CMD_POWER_DOWN
Definition device.h:66
@ XWDS_W25QXX_CMD_READ_DATA
Definition device.h:55
@ XWDS_W25QXX_CMD_READ_STATUS_REG_3
Definition device.h:50
@ XWDS_W25QXX_CMD_WRITE_STATUS_REG_2
Definition device.h:52
@ XWDS_W25QXX_CMD_NUM
Definition device.h:82
@ XWDS_W25QXX_CMD_32KBLOCK_ERASE
Definition device.h:61
@ XWDS_W25QXX_CMD_SET_READ_PARAMETERS
Definition device.h:57
@ XWDS_W25QXX_CMD_RELEASE_POWER_DOWN
Definition device.h:67
@ XWDS_W25QXX_CMD_SECTOR_ERASE
Definition device.h:63
@ XWDS_W25QXX_CMD_WRITE_ENABLE
Definition device.h:46
@ XWDS_W25QXX_CMD_ENTER_4BYTE_ADDR_MODE
Definition device.h:73
@ XWDS_W25QXX_CMD_JEDEC_DEVICE_ID
Definition device.h:71
@ XWDS_W25QXX_CMD_FAST_READ_DATA
Definition device.h:56
@ XWDS_W25Q128_MID
Definition device.h:93
@ XWDS_W25Q64_MID
Definition device.h:92
@ XWDS_W25Q80_MID
Definition device.h:89
@ XWDS_W25Q32_MID
Definition device.h:91
@ XWDS_W25Q256_MID
Definition device.h:94
@ XWDS_W25Q16_MID
Definition device.h:90
@ XWDS_W25QXX_SR3_R1
Definition device.h:139
@ XWDS_W25QXX_SR3_DRV0
Definition device.h:143
@ XWDS_W25QXX_SR3_DRV1
Definition device.h:144
@ XWDS_W25QXX_SR3_R0
Definition device.h:138
@ XWDS_W25QXX_SR3_R4
Definition device.h:142
@ XWDS_W25QXX_SR3_HR
Definition device.h:145
@ XWDS_W25QXX_SR3_WPS
Definition device.h:140
@ XWDS_W25QXX_SR3_R3
Definition device.h:141
@ XWDS_W25QXX_SR2_QE
Definition device.h:125
@ XWDS_W25QXX_SR2_SRL
Definition device.h:124
@ XWDS_W25QXX_SR2_R2
Definition device.h:126
@ XWDS_W25QXX_SR2_LB3
Definition device.h:129
@ XWDS_W25QXX_SR2_LB1
Definition device.h:127
@ XWDS_W25QXX_SR2_CMP
Definition device.h:130
@ XWDS_W25QXX_SR2_LB2
Definition device.h:128
@ XWDS_W25QXX_SR2_SUS
Definition device.h:131
signed long xwer_t
Definition type.h:554
uint8_t xwu8_t
Definition type.h:194
uint64_t xwu64_t
Definition type.h:303
uint16_t xwu16_t
Definition type.h:230
uint32_t xwu32_t
Definition type.h:266
玄武设备栈:SPI:外设
SPI外设控制器
Definition peripheral.h:47
W25QXX Flash 命令
Definition device.h:151
xwu32_t dummy_cycles
Definition device.h:156
xwu32_t address
Definition device.h:155
xwu8_t existing
Definition device.h:152
xwu8_t instruction
Definition device.h:153
xwu8_t address_size
Definition device.h:154
W25QXX Flash 参数
Definition device.h:162
W25QXX Flash 设备
Definition device.h:172
struct xwds_spip spip
Definition device.h:173
struct xwds_w25qxx_parameter parameter
Definition device.h:176
xwu8_t rxq[256U+16]
Definition device.h:181
const struct xwds_w25qxx_cmd * cmdtbl
Definition device.h:177
xwu8_t txq[256U+16]
Definition device.h:180
XWOS的标准头文件