XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
driver.h
浏览该文件的文档.
1
23#ifndef __xwcd_peripheral_spi_flash_w25qxx_driver_h__
24#define __xwcd_peripheral_spi_flash_w25qxx_driver_h__
25
26#include <xwos/standard.h>
28
39 xwer_t (* io)(struct xwds_w25qxx * /*w25qxx*/,
40 xwu8_t * /*txq*/, xwu8_t * /*rxq*/,
41 xwsz_t * /*size*/, xwtm_t /*to*/);
42};
43
46
47/******** ******** base driver ******** ********/
52
57#if defined(XWCDCFG_ds_PM) && (1 == XWCDCFG_ds_PM)
58
63
68#endif
69
70/******** ******** ******** APIs ******** ******** ********/
92xwer_t xwds_w25qxx_ctrl(struct xwds_w25qxx * w25qxx,
96 const xwu8_t txd[], xwu8_t * rxb, xwsz_t size,
97 xwtm_t to);
98
112xwer_t xwds_w25qxx_reset(struct xwds_w25qxx * w25qxx, xwtm_t to);
113
123
138
153
170 xwu32_t sridx, xwu8_t * srbuf,
171 xwtm_t to);
172
189
203xwer_t xwds_w25qxx_wait_idle(struct xwds_w25qxx * w25qxx, xwtm_t period,
204 xwtm_t to);
205
220xwer_t xwds_w25qxx_read_uid(struct xwds_w25qxx * w25qxx, xwu64_t * uidbuf,
221 xwtm_t to);
222
237xwer_t xwds_w25qxx_read_mid(struct xwds_w25qxx * w25qxx, xwu16_t * midbuf,
238 xwtm_t to);
239
254xwer_t xwds_w25qxx_read_jid(struct xwds_w25qxx * w25qxx, xwu32_t * jidbuf,
255 xwtm_t to);
256
276 xwu8_t * rxb, xwsz_t * size, xwtm_t to);
277
297 xwu8_t * txb, xwsz_t * size, xwtm_t to);
298
309 xwtm_t to);
310
326 xwtm_t to);
327
343 xwtm_t to);
344
359
364#endif /* xwcd/peripheral/spi/flash/w25qxx/driver.h */
@ XWDS_W25QXX_CMD_NUM
Definition device.h:82
xws64_t xwtm_t
XWOS系统时间 (有符号)
Definition type.h:742
signed long xwer_t
Definition type.h:554
unsigned long xwsz_t
Definition type.h:339
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 Flash W25Qxx Device
xwer_t xwds_w25qxx_read_uid(struct xwds_w25qxx *w25qxx, xwu64_t *uidbuf, xwtm_t to)
W25QXX API:读取W25QXX的UID
Definition driver.c:375
xwer_t xwds_w25qxx_write(struct xwds_w25qxx *w25qxx, xwu32_t address, xwu8_t *txb, xwsz_t *size, xwtm_t to)
W25QXX API:向W25QXX写入数据
Definition driver.c:500
xwer_t xwds_w25qxx_ctrl(struct xwds_w25qxx *w25qxx, xwu8_t instruction, xwu8_t address_size, xwu32_t address, xwu32_t dummy_cycles, const xwu8_t txd[], xwu8_t *rxb, xwsz_t size, xwtm_t to)
W25QXX API:向W25QXX发送指令
Definition driver.c:76
xwer_t xwds_w25qxx_read_mid(struct xwds_w25qxx *w25qxx, xwu16_t *midbuf, xwtm_t to)
W25QXX API:读取W25QXX的MID
Definition driver.c:405
xwer_t xwds_w25qxx_wait_idle(struct xwds_w25qxx *w25qxx, xwtm_t period, xwtm_t to)
W25QXX API:等待W25QXX是否空闲
Definition driver.c:355
xwer_t xwds_w25qxx_reset(struct xwds_w25qxx *w25qxx, xwtm_t to)
W25QXX API:向W25QXX发送复位命令
Definition driver.c:142
xwer_t xwds_w25qxx_write_disable(struct xwds_w25qxx *w25qxx, xwtm_t to)
W25QXX API:关闭W25QXX的写操作
Definition driver.c:268
struct xwds_w25qxx_cmd xwds_w25q64jv_cmd[XWDS_W25QXX_CMD_NUM]
Definition w25q64jv.c:25
xwer_t xwds_w25qxx_read(struct xwds_w25qxx *w25qxx, xwu32_t address, xwu8_t *rxb, xwsz_t *size, xwtm_t to)
W25QXX API:向W25QXX读取数据
Definition driver.c:466
xwer_t xwds_w25qxx_check_idle(struct xwds_w25qxx *w25qxx, xwtm_t to)
W25QXX API:检测W25QXX是否空闲
Definition driver.c:338
xwer_t xwds_w25qxx_write_enable(struct xwds_w25qxx *w25qxx, xwtm_t to)
W25QXX API:开启W25QXX的写操作
Definition driver.c:228
xwer_t xwds_w25qxx_erase_32kblk(struct xwds_w25qxx *w25qxx, xwu32_t address, xwtm_t to)
W25QXX API:擦除W25QXX的32KiB的块
Definition driver.c:584
xwer_t xwds_w25qxx_drv_start(struct xwds_device *dev)
W25QXX基本驱动:启动设备
Definition driver.c:30
xwer_t xwds_w25qxx_read_jid(struct xwds_w25qxx *w25qxx, xwu32_t *jidbuf, xwtm_t to)
W25QXX API:读取W25QXX的JID
Definition driver.c:435
struct xwds_w25qxx_cmd xwds_w25q128jv_cmd[XWDS_W25QXX_CMD_NUM]
Definition w25q128jv.c:25
xwer_t xwds_w25qxx_erase_64kblk(struct xwds_w25qxx *w25qxx, xwu32_t address, xwtm_t to)
W25QXX API:擦除W25QXX的64KiB的块
Definition driver.c:623
xwer_t xwds_w25qxx_drv_suspend(struct xwds_device *dev)
W25QXX基本驱动:继续设备
Definition driver.c:68
xwer_t xwds_w25qxx_read_sr(struct xwds_w25qxx *w25qxx, xwu32_t sridx, xwu8_t *srbuf, xwtm_t to)
W25QXX API:读取W25QXX的SR寄存器
Definition driver.c:296
xwer_t xwds_w25qxx_drv_stop(struct xwds_device *dev)
W25QXX基本驱动:停止设备
Definition driver.c:54
xwer_t xwds_w25qxx_erase_sector(struct xwds_w25qxx *w25qxx, xwu32_t address, xwtm_t to)
W25QXX API:擦除W25QXX的sector
Definition driver.c:545
xwer_t xwds_w25qxx_init_parameter(struct xwds_w25qxx *w25qxx, xwtm_t to)
W25QXX API:初始化W25QXX的参数
Definition driver.c:178
xwer_t xwds_w25qxx_drv_resume(struct xwds_device *dev)
W25QXX基本驱动:暂停设备
Definition driver.c:62
xwer_t xwds_w25qxx_erase_chip(struct xwds_w25qxx *w25qxx, xwtm_t to)
W25QXX API:擦除W25QXX的全部数据
Definition driver.c:662
设备(所有设备的基类)
Definition device.h:127
BSP中需要提供的SPI外设控制器驱动函数表
Definition peripheral.h:40
W25QXX Flash 命令
Definition device.h:151
xwu32_t dummy_cycles
Definition device.h:156
xwu32_t address
Definition device.h:155
xwu8_t instruction
Definition device.h:153
xwu8_t address_size
Definition device.h:154
W25QXX驱动函数表
Definition driver.h:37
xwer_t(* io)(struct xwds_w25qxx *, xwu8_t *, xwu8_t *, xwsz_t *, xwtm_t)
Definition driver.h:39
struct xwds_spip_driver spip
Definition driver.h:38
W25QXX Flash 设备
Definition device.h:172
XWOS的标准头文件