Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2345VOR
rt-thread
提交
cd50a40f
R
rt-thread
项目概览
2345VOR
/
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,发现更多精彩内容 >>
未验证
提交
cd50a40f
编写于
12月 09, 2019
作者:
B
Bernard Xiong
提交者:
GitHub
12月 09, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3238 from qiyongzhong0/stm32_HAL_Drivers
修改stm32驱动库
上级
8e7be2e7
5c15fd61
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
17 addition
and
1 deletion
+17
-1
bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c
bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c
+1
-1
bsp/stm32/libraries/HAL_Drivers/drv_usbd.c
bsp/stm32/libraries/HAL_Drivers/drv_usbd.c
+16
-0
未找到文件。
bsp/stm32/libraries/HAL_Drivers/drv_flash/drv_flash_l4.c
浏览文件 @
cd50a40f
...
@@ -270,7 +270,7 @@ static int fal_flash_read(long offset, rt_uint8_t *buf, size_t size);
...
@@ -270,7 +270,7 @@ static int fal_flash_read(long offset, rt_uint8_t *buf, size_t size);
static
int
fal_flash_write
(
long
offset
,
const
rt_uint8_t
*
buf
,
size_t
size
);
static
int
fal_flash_write
(
long
offset
,
const
rt_uint8_t
*
buf
,
size_t
size
);
static
int
fal_flash_erase
(
long
offset
,
size_t
size
);
static
int
fal_flash_erase
(
long
offset
,
size_t
size
);
const
struct
fal_flash_dev
stm32_onchip_flash
=
{
"onchip_flash"
,
STM32_FLASH_START_ADRESS
,
STM32_FLASH_SIZE
,
2048
,
{
NULL
,
fal_flash_read
,
fal_flash_write
,
fal_flash_erase
}
};
const
struct
fal_flash_dev
stm32_onchip_flash
=
{
"onchip_flash"
,
STM32_FLASH_START_ADRESS
,
STM32_FLASH_SIZE
,
FLASH_PAGE_SIZE
,
{
NULL
,
fal_flash_read
,
fal_flash_write
,
fal_flash_erase
}
};
static
int
fal_flash_read
(
long
offset
,
rt_uint8_t
*
buf
,
size_t
size
)
static
int
fal_flash_read
(
long
offset
,
rt_uint8_t
*
buf
,
size_t
size
)
{
{
...
...
bsp/stm32/libraries/HAL_Drivers/drv_usbd.c
浏览文件 @
cd50a40f
...
@@ -239,11 +239,27 @@ const static struct udcd_ops _udc_ops =
...
@@ -239,11 +239,27 @@ const static struct udcd_ops _udc_ops =
_wakeup
,
_wakeup
,
};
};
#ifdef RT_USING_DEVICE_OPS
const
static
struct
rt_device_ops
_ops
=
{
_init
,
RT_NULL
,
RT_NULL
,
RT_NULL
,
RT_NULL
,
RT_NULL
,
};
#endif
int
stm_usbd_register
(
void
)
int
stm_usbd_register
(
void
)
{
{
rt_memset
((
void
*
)
&
_stm_udc
,
0
,
sizeof
(
struct
udcd
));
rt_memset
((
void
*
)
&
_stm_udc
,
0
,
sizeof
(
struct
udcd
));
_stm_udc
.
parent
.
type
=
RT_Device_Class_USBDevice
;
_stm_udc
.
parent
.
type
=
RT_Device_Class_USBDevice
;
#ifdef RT_USING_DEVICE_OPS
_stm_udc
.
parent
.
ops
=
&
_ops
;
#else
_stm_udc
.
parent
.
init
=
_init
;
_stm_udc
.
parent
.
init
=
_init
;
#endif
_stm_udc
.
parent
.
user_data
=
&
_stm_pcd
;
_stm_udc
.
parent
.
user_data
=
&
_stm_pcd
;
_stm_udc
.
ops
=
&
_udc_ops
;
_stm_udc
.
ops
=
&
_udc_ops
;
/* Register endpoint infomation */
/* Register endpoint infomation */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录