Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wmsofts
rt-thread
提交
87c57f86
R
rt-thread
项目概览
wmsofts
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
87c57f86
编写于
3月 20, 2023
作者:
哈哈哈可是开电脑
提交者:
mysterywolf
3月 20, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[device]修改mtd_nor读写函数返回类型为rt_ssize_t
上级
7f03e2b5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
13 deletion
+13
-13
components/drivers/include/drivers/mtd_nor.h
components/drivers/include/drivers/mtd_nor.h
+8
-8
components/drivers/mtd/mtd_nor.c
components/drivers/mtd/mtd_nor.c
+5
-5
未找到文件。
components/drivers/include/drivers/mtd_nor.h
浏览文件 @
87c57f86
/*
* COPYRIGHT (C) 2011-202
1
, Real-Thread Information Technology Ltd
* COPYRIGHT (C) 2011-202
3
, Real-Thread Information Technology Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -32,18 +32,18 @@ struct rt_mtd_nor_driver_ops
{
rt_err_t
(
*
read_id
)
(
struct
rt_mtd_nor_device
*
device
);
rt_s
ize_t
(
*
read
)
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
rt_uint8_t
*
data
,
rt_uint32
_t
length
);
rt_s
ize_t
(
*
write
)
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
const
rt_uint8_t
*
data
,
rt_uint32
_t
length
);
rt_s
size_t
(
*
read
)
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
rt_uint8_t
*
data
,
rt_size
_t
length
);
rt_s
size_t
(
*
write
)
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
const
rt_uint8_t
*
data
,
rt_size
_t
length
);
rt_err_t
(
*
erase_block
)(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
rt_
uint32
_t
length
);
rt_err_t
(
*
erase_block
)(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
rt_
size
_t
length
);
};
rt_err_t
rt_mtd_nor_register_device
(
const
char
*
name
,
struct
rt_mtd_nor_device
*
device
);
rt_uint32_t
rt_mtd_nor_read_id
(
struct
rt_mtd_nor_device
*
device
);
rt_size_t
rt_mtd_nor_read
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
rt_uint8_t
*
data
,
rt_
uint32
_t
length
);
rt_size_t
rt_mtd_nor_write
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
const
rt_uint8_t
*
data
,
rt_
uint32
_t
length
);
rt_s
s
ize_t
rt_mtd_nor_read
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
rt_uint8_t
*
data
,
rt_
size
_t
length
);
rt_s
s
ize_t
rt_mtd_nor_write
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
const
rt_uint8_t
*
data
,
rt_
size
_t
length
);
rt_err_t
rt_mtd_nor_erase_block
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
rt_size_t
length
);
...
...
components/drivers/mtd/mtd_nor.c
浏览文件 @
87c57f86
/*
* COPYRIGHT (C) 2011-202
1
, Real-Thread Information Technology Ltd
* COPYRIGHT (C) 2011-202
3
, Real-Thread Information Technology Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -96,14 +96,14 @@ rt_uint32_t rt_mtd_nor_read_id(struct rt_mtd_nor_device* device)
return
device
->
ops
->
read_id
(
device
);
}
rt_size_t
rt_mtd_nor_read
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
rt_uint8_t
*
data
,
rt_
uint32
_t
length
)
rt_s
s
ize_t
rt_mtd_nor_read
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
rt_uint8_t
*
data
,
rt_
size
_t
length
)
{
return
device
->
ops
->
read
(
device
,
offset
,
data
,
length
);
}
rt_size_t
rt_mtd_nor_write
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
const
rt_uint8_t
*
data
,
rt_
uint32
_t
length
)
rt_s
s
ize_t
rt_mtd_nor_write
(
struct
rt_mtd_nor_device
*
device
,
rt_off_t
offset
,
const
rt_uint8_t
*
data
,
rt_
size
_t
length
)
{
return
device
->
ops
->
write
(
device
,
offset
,
data
,
length
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录