Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wwsmg1
rt-thread
提交
8a85ff4e
R
rt-thread
项目概览
wwsmg1
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
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,发现更多精彩内容 >>
提交
8a85ff4e
编写于
11月 30, 2021
作者:
G
greedyhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp/bluetrum] formatting code
上级
26310fe2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
31 addition
and
17 deletion
+31
-17
bsp/bluetrum/ab32vg1-ab-prougen/applications/blehr_app.c
bsp/bluetrum/ab32vg1-ab-prougen/applications/blehr_app.c
+2
-1
bsp/bluetrum/ab32vg1-ab-prougen/applications/mnt.c
bsp/bluetrum/ab32vg1-ab-prougen/applications/mnt.c
+1
-1
bsp/bluetrum/ab32vg1-ab-prougen/board/board.c
bsp/bluetrum/ab32vg1-ab-prougen/board/board.c
+10
-6
bsp/bluetrum/libraries/hal_drivers/drv_flash.c
bsp/bluetrum/libraries/hal_drivers/drv_flash.c
+14
-7
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/libhal.a
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/libhal.a
+0
-0
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal.c
.../libraries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal.c
+4
-2
未找到文件。
bsp/bluetrum/ab32vg1-ab-prougen/applications/blehr_app.c
浏览文件 @
8a85ff4e
...
...
@@ -64,7 +64,8 @@ static int blehr_sample(void)
15
,
1
);
if
(
tid
!=
RT_NULL
)
{
if
(
tid
!=
RT_NULL
)
{
rt_thread_startup
(
tid
);
}
}
...
...
bsp/bluetrum/ab32vg1-ab-prougen/applications/mnt.c
浏览文件 @
8a85ff4e
...
...
@@ -26,7 +26,7 @@ void sd_mount(void *parameter)
while
(
1
)
{
rt_thread_mdelay
(
500
);
if
(
rt_device_find
(
"sd0"
)
!=
RT_NULL
)
if
(
rt_device_find
(
"sd0"
)
!=
RT_NULL
)
{
if
(
dfs_mount
(
"sd0"
,
"/"
,
"elm"
,
0
,
0
)
==
RT_EOK
)
{
...
...
bsp/bluetrum/ab32vg1-ab-prougen/board/board.c
浏览文件 @
8a85ff4e
...
...
@@ -182,7 +182,7 @@ void rt_hw_systick_init(void)
timer0_init
();
hal_set_tick_hook
(
timer0_cfg
);
hal_set_ticks
(
get_sysclk_nhz
()
/
RT_TICK_PER_SECOND
);
hal_set_ticks
(
get_sysclk_nhz
()
/
RT_TICK_PER_SECOND
);
PICCON
|=
0x10002
;
}
...
...
@@ -224,7 +224,8 @@ void cache_init(void)
RT_SECTION
(
".irq.cache"
)
void
os_spiflash_lock
(
void
)
{
if
((
rt_thread_self
()
!=
RT_NULL
)
&&
(
rt_interrupt_nest
==
0
))
{
if
((
rt_thread_self
()
!=
RT_NULL
)
&&
(
rt_interrupt_nest
==
0
))
{
rt_mutex_take
(
&
mutex_spiflash
,
RT_WAITING_FOREVER
);
}
}
...
...
@@ -232,7 +233,8 @@ void os_spiflash_lock(void)
RT_SECTION
(
".irq.cache"
)
void
os_spiflash_unlock
(
void
)
{
if
((
rt_thread_self
()
!=
RT_NULL
)
&&
(
rt_interrupt_nest
==
0
))
{
if
((
rt_thread_self
()
!=
RT_NULL
)
&&
(
rt_interrupt_nest
==
0
))
{
rt_mutex_release
(
&
mutex_spiflash
);
}
}
...
...
@@ -240,7 +242,8 @@ void os_spiflash_unlock(void)
RT_SECTION
(
".irq.cache"
)
void
os_cache_lock
(
void
)
{
if
((
rt_thread_self
()
!=
RT_NULL
)
&&
(
rt_interrupt_nest
==
0
))
{
if
((
rt_thread_self
()
!=
RT_NULL
)
&&
(
rt_interrupt_nest
==
0
))
{
rt_mutex_take
(
&
mutex_cache
,
RT_WAITING_FOREVER
);
}
}
...
...
@@ -248,7 +251,8 @@ void os_cache_lock(void)
RT_SECTION
(
".irq.cache"
)
void
os_cache_unlock
(
void
)
{
if
((
rt_thread_self
()
!=
RT_NULL
)
&&
(
rt_interrupt_nest
==
0
))
{
if
((
rt_thread_self
()
!=
RT_NULL
)
&&
(
rt_interrupt_nest
==
0
))
{
rt_mutex_release
(
&
mutex_cache
);
}
}
...
...
@@ -280,5 +284,5 @@ void exception_isr(void)
rt_kprintf
(
stack_info
,
rt_thread_self
()
->
sp
,
rt_thread_self
()
->
name
);
#endif
while
(
1
);
while
(
1
);
}
bsp/bluetrum/libraries/hal_drivers/drv_flash.c
浏览文件 @
8a85ff4e
...
...
@@ -31,13 +31,14 @@ 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_erase
(
long
offset
,
size_t
size
);
const
struct
fal_flash_dev
ab32_onchip_flash
=
{
const
struct
fal_flash_dev
ab32_onchip_flash
=
{
"onchip_flash"
,
AB32_FLASH_START_ADDRESS
,
AB32_FLASH_SIZE
,
AB32_FLASH_PAGE_SIZE
,
{
NULL
,
fal_flash_read
,
fal_flash_write
,
fal_flash_erase
},
256
*
8
256
*
8
};
static
int
fal_flash_read
(
long
offset
,
rt_uint8_t
*
buf
,
size_t
size
)
...
...
@@ -47,7 +48,8 @@ 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
)
{
if
(
size
%
256
)
{
if
(
size
%
256
)
{
rt_kprintf
(
"Flash write requires 256 byte alignment
\n
"
);
return
-
1
;
}
...
...
@@ -57,11 +59,13 @@ 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
)
{
if
(
size
%
4096
)
{
if
(
size
%
4096
)
{
rt_kprintf
(
"Flash erase requires 4096 byte alignment
\n
"
);
return
-
1
;
}
while
(
size
>
0
)
{
while
(
size
>
0
)
{
os_spiflash_erase
(
offset
);
offset
+=
4096
;
size
-=
4096
;
...
...
@@ -78,7 +82,8 @@ int fal_ops_test(void)
int
size
=
256
;
int
addr
=
0
;
for
(
int
i
=
0
;
i
<
256
;
i
++
)
{
for
(
int
i
=
0
;
i
<
256
;
i
++
)
{
data
[
i
]
=
i
;
}
...
...
@@ -108,9 +113,11 @@ int fal_ops_test(void)
}
result
=
fal_partition_erase
(
part_dev
,
0
,
4096
);
if
(
result
>=
0
)
{
if
(
result
>=
0
)
{
rt_kprintf
(
"Erase data success.
\n
"
);
}
rt_memset
(
data
,
0
,
256
);
result
=
fal_partition_read
(
part_dev
,
0
,
data
,
256
);
if
(
result
>=
0
)
...
...
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/libhal.a
已删除
100644 → 0
浏览文件 @
26310fe2
文件已删除
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal.c
浏览文件 @
8a85ff4e
...
...
@@ -11,10 +11,12 @@ void hal_set_tick_hook(void (*hook)(uint32_t ticks))
void
hal_set_ticks
(
uint32_t
ticks
)
{
if
(
ticks
!=
hw_ticks
)
{
if
(
ticks
!=
hw_ticks
)
{
hw_ticks
=
ticks
;
}
if
(
tick_cfg_hook
!=
HAL_NULL
)
{
if
(
tick_cfg_hook
!=
HAL_NULL
)
{
tick_cfg_hook
(
hw_ticks
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录