Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
4cbcf598
R
rt-thread
项目概览
BaiXuePrincess
/
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,发现更多精彩内容 >>
提交
4cbcf598
编写于
10月 10, 2021
作者:
Thomas_Fly
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp][lpc55] fix the console, add the us_delay,fix sdio to filesystem
上级
b691ff38
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
168 addition
and
9 deletion
+168
-9
bsp/lpc55sxx/Libraries/drivers/drv_uart.c
bsp/lpc55sxx/Libraries/drivers/drv_uart.c
+1
-1
bsp/lpc55sxx/lpc55s69_nxp_evk/.config
bsp/lpc55sxx/lpc55s69_nxp_evk/.config
+61
-6
bsp/lpc55sxx/lpc55s69_nxp_evk/applications/SConscript
bsp/lpc55sxx/lpc55s69_nxp_evk/applications/SConscript
+4
-1
bsp/lpc55sxx/lpc55s69_nxp_evk/applications/mnt.c
bsp/lpc55sxx/lpc55s69_nxp_evk/applications/mnt.c
+32
-0
bsp/lpc55sxx/lpc55s69_nxp_evk/board/Kconfig
bsp/lpc55sxx/lpc55s69_nxp_evk/board/Kconfig
+4
-0
bsp/lpc55sxx/lpc55s69_nxp_evk/board/board.c
bsp/lpc55sxx/lpc55s69_nxp_evk/board/board.c
+30
-0
bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.h
bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.h
+36
-1
未找到文件。
bsp/lpc55sxx/Libraries/drivers/drv_uart.c
浏览文件 @
4cbcf598
...
...
@@ -135,7 +135,7 @@ static const struct lpc_uart uarts[] =
kCLOCK_Flexcomm0
,
&
serial0
,
"uart"
,
"uart
0
"
,
},
#endif
#ifdef BSP_USING_UART1
...
...
bsp/lpc55sxx/lpc55s69_nxp_evk/.config
浏览文件 @
4cbcf598
...
...
@@ -116,7 +116,38 @@ CONFIG_FINSH_ARG_MAX=10
#
# Device virtual file system
#
# CONFIG_RT_USING_DFS is not set
CONFIG_RT_USING_DFS
=
y
CONFIG_DFS_USING_WORKDIR
=
y
CONFIG_DFS_FILESYSTEMS_MAX
=
4
CONFIG_DFS_FILESYSTEM_TYPES_MAX
=
4
CONFIG_DFS_FD_MAX
=
16
# CONFIG_RT_USING_DFS_MNTTABLE is not set
CONFIG_RT_USING_DFS_ELMFAT
=
y
#
# elm-chan's FatFs, Generic FAT Filesystem Module
#
CONFIG_RT_DFS_ELM_CODE_PAGE
=
437
CONFIG_RT_DFS_ELM_WORD_ACCESS
=
y
# CONFIG_RT_DFS_ELM_USE_LFN_0 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_1 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_2 is not set
CONFIG_RT_DFS_ELM_USE_LFN_3
=
y
CONFIG_RT_DFS_ELM_USE_LFN
=
3
CONFIG_RT_DFS_ELM_LFN_UNICODE_0
=
y
# CONFIG_RT_DFS_ELM_LFN_UNICODE_1 is not set
# CONFIG_RT_DFS_ELM_LFN_UNICODE_2 is not set
# CONFIG_RT_DFS_ELM_LFN_UNICODE_3 is not set
CONFIG_RT_DFS_ELM_LFN_UNICODE
=
0
CONFIG_RT_DFS_ELM_MAX_LFN
=
255
CONFIG_RT_DFS_ELM_DRIVES
=
2
CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE
=
512
# CONFIG_RT_DFS_ELM_USE_ERASE is not set
CONFIG_RT_DFS_ELM_REENTRANT
=
y
CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT
=
3000
CONFIG_RT_USING_DFS_DEVFS
=
y
# CONFIG_RT_USING_DFS_ROMFS is not set
# CONFIG_RT_USING_DFS_RAMFS is not set
#
# Device Drivers
...
...
@@ -142,7 +173,13 @@ CONFIG_RT_USING_PIN=y
# CONFIG_RT_USING_MTD_NAND is not set
# CONFIG_RT_USING_PM is not set
# CONFIG_RT_USING_RTC is not set
# CONFIG_RT_USING_SDIO is not set
CONFIG_RT_USING_SDIO
=
y
CONFIG_RT_SDIO_STACK_SIZE
=
512
CONFIG_RT_SDIO_THREAD_PRIORITY
=
15
CONFIG_RT_MMCSD_STACK_SIZE
=
1024
CONFIG_RT_MMCSD_THREAD_PREORITY
=
22
CONFIG_RT_MMCSD_MAX_PARTITION
=
16
# CONFIG_RT_SDIO_DEBUG is not set
# CONFIG_RT_USING_SPI is not set
# CONFIG_RT_USING_WDT is not set
# CONFIG_RT_USING_AUDIO is not set
...
...
@@ -162,9 +199,16 @@ CONFIG_RT_USING_PIN=y
#
# POSIX layer and C standard library
#
# CONFIG_RT_USING_LIBC is not set
CONFIG_RT_USING_LIBC
=
y
# CONFIG_RT_USING_PTHREADS is not set
# CONFIG_RT_LIBC_USING_TIME is not set
CONFIG_RT_USING_POSIX
=
y
# CONFIG_RT_USING_POSIX_MMAP is not set
# CONFIG_RT_USING_POSIX_TERMIOS is not set
# CONFIG_RT_USING_POSIX_GETLINE is not set
# CONFIG_RT_USING_POSIX_AIO is not set
CONFIG_RT_LIBC_USING_TIME
=
y
# CONFIG_RT_USING_MODULE is not set
CONFIG_RT_LIBC_DEFAULT_TIMEZONE
=
8
#
# Network
...
...
@@ -297,6 +341,9 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_AGILE_FTP is not set
# CONFIG_PKG_USING_EMBEDDEDPROTO is not set
# CONFIG_PKG_USING_RT_LINK_HW is not set
# CONFIG_PKG_USING_LORA_PKT_FWD is not set
# CONFIG_PKG_USING_LORA_GW_DRIVER_LIB is not set
# CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set
# CONFIG_PKG_USING_HM is not set
#
...
...
@@ -331,6 +378,13 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_NUEMWIN is not set
# CONFIG_PKG_USING_MP3PLAYER is not set
# CONFIG_PKG_USING_TINYJPEG is not set
# CONFIG_PKG_USING_UGUI is not set
#
# U8G2: a monochrome graphic library
#
# CONFIG_PKG_USING_U8G2_OFFICIAL is not set
# CONFIG_PKG_USING_U8G2 is not set
#
# tools packages
...
...
@@ -439,7 +493,6 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_AS7341 is not set
# CONFIG_PKG_USING_STM32_SDIO is not set
# CONFIG_PKG_USING_ICM20608 is not set
# CONFIG_PKG_USING_U8G2 is not set
# CONFIG_PKG_USING_BUTTON is not set
# CONFIG_PKG_USING_PCF8574 is not set
# CONFIG_PKG_USING_SX12XX is not set
...
...
@@ -501,6 +554,8 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_MCP23008 is not set
# CONFIG_PKG_USING_BLUETRUM_SDK is not set
# CONFIG_PKG_USING_MISAKA_AT24CXX is not set
# CONFIG_PKG_USING_MISAKA_RGB_BLING is not set
# CONFIG_PKG_USING_BL_MCU_SDK is not set
#
# AI packages
...
...
@@ -588,7 +643,7 @@ CONFIG_HW_UART0_BAUDRATE_115200=y
# CONFIG_BSP_USING_I2C is not set
# CONFIG_BSP_USING_SPI is not set
# CONFIG_BSP_USING_ADC is not set
# CONFIG_BSP_USING_SDIO is not set
CONFIG_BSP_USING_SDIO
=
y
# CONFIG_BSP_USING_RTC is not set
# CONFIG_BSP_USING_WDT is not set
# CONFIG_BSP_USING_HWTIMER is not set
...
...
bsp/lpc55sxx/lpc55s69_nxp_evk/applications/SConscript
浏览文件 @
4cbcf598
...
...
@@ -10,7 +10,10 @@ if rtconfig.CROSS_TOOL == 'gcc':
CPPDEFINES
=
[
'__START=entry'
]
else
:
CPPDEFINES
=
[]
if
GetDepend
(
'BSP_USING_SDIO'
):
src
+=
[
'mnt.c'
]
group
=
DefineGroup
(
'Applications'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
,
CPPDEFINES
=
CPPDEFINES
)
Return
(
'group'
)
bsp/lpc55sxx/lpc55s69_nxp_evk/applications/mnt.c
0 → 100644
浏览文件 @
4cbcf598
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* sdio filesystem support
* Change Logs:
* Date Author Notes
* 2021-10-10 supperthomas first version
*/
#include "dfs_fs.h"
#include <rtthread.h>
#include <rtdevice.h>
#ifdef BSP_USING_SDIO
/**
* @brief SDIO filesystem init
* @param void
* @retval 0: filesystem init success, -1: filesystem init failed
*/
static
int
sdio_fs_init
(
void
)
{
int
result
=
0
;
dfs_mount
(
"sdcard0"
,
"/"
,
"elm"
,
0
,
0
);
return
result
;
}
INIT_ENV_EXPORT
(
sdio_fs_init
);
#endif
/* BSP_USING_SDIO */
bsp/lpc55sxx/lpc55s69_nxp_evk/board/Kconfig
浏览文件 @
4cbcf598
...
...
@@ -135,6 +135,10 @@ menu "On-chip Peripheral Drivers"
config BSP_USING_SDIO
bool "Enable SDIO SD Card Interface"
select RT_USING_SDIO
select RT_USING_DFS
select RT_USING_DFS_ELMFAT
select RT_USING_LIBC
select RT_LIBC_USING_TIME
default y
config BSP_USING_RTC
...
...
bsp/lpc55sxx/lpc55s69_nxp_evk/board/board.c
浏览文件 @
4cbcf598
...
...
@@ -107,3 +107,33 @@ void MemManage_Handler(void)
rt_kprintf
(
"Memory Fault!
\n
"
);
HardFault_Handler
();
}
void
rt_hw_us_delay
(
rt_uint32_t
us
)
{
rt_uint32_t
ticks
;
rt_uint32_t
told
,
tnow
,
tcnt
=
0
;
rt_uint32_t
reload
=
SysTick
->
LOAD
;
ticks
=
us
*
reload
/
(
1000000
/
RT_TICK_PER_SECOND
);
told
=
SysTick
->
VAL
;
while
(
1
)
{
tnow
=
SysTick
->
VAL
;
if
(
tnow
!=
told
)
{
if
(
tnow
<
told
)
{
tcnt
+=
told
-
tnow
;
}
else
{
tcnt
+=
reload
-
tnow
+
told
;
}
told
=
tnow
;
if
(
tcnt
>=
ticks
)
{
break
;
}
}
}
}
bsp/lpc55sxx/lpc55s69_nxp_evk/rtconfig.h
浏览文件 @
4cbcf598
...
...
@@ -45,7 +45,7 @@
#define RT_USING_DEVICE
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLE_DEVICE_NAME "uart"
#define RT_CONSOLE_DEVICE_NAME "uart
0
"
#define RT_VER_NUM 0x40004
#define ARCH_ARM_CORTEX_FPU
...
...
@@ -77,6 +77,27 @@
/* Device virtual file system */
#define RT_USING_DFS
#define DFS_USING_WORKDIR
#define DFS_FILESYSTEMS_MAX 4
#define DFS_FILESYSTEM_TYPES_MAX 4
#define DFS_FD_MAX 16
#define RT_USING_DFS_ELMFAT
/* elm-chan's FatFs, Generic FAT Filesystem Module */
#define RT_DFS_ELM_CODE_PAGE 437
#define RT_DFS_ELM_WORD_ACCESS
#define RT_DFS_ELM_USE_LFN_3
#define RT_DFS_ELM_USE_LFN 3
#define RT_DFS_ELM_LFN_UNICODE_0
#define RT_DFS_ELM_LFN_UNICODE 0
#define RT_DFS_ELM_MAX_LFN 255
#define RT_DFS_ELM_DRIVES 2
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
#define RT_DFS_ELM_REENTRANT
#define RT_DFS_ELM_MUTEX_TIMEOUT 3000
#define RT_USING_DFS_DEVFS
/* Device Drivers */
...
...
@@ -87,12 +108,22 @@
#define RT_SERIAL_USING_DMA
#define RT_SERIAL_RB_BUFSZ 64
#define RT_USING_PIN
#define RT_USING_SDIO
#define RT_SDIO_STACK_SIZE 512
#define RT_SDIO_THREAD_PRIORITY 15
#define RT_MMCSD_STACK_SIZE 1024
#define RT_MMCSD_THREAD_PREORITY 22
#define RT_MMCSD_MAX_PARTITION 16
/* Using USB */
/* POSIX layer and C standard library */
#define RT_USING_LIBC
#define RT_USING_POSIX
#define RT_LIBC_USING_TIME
#define RT_LIBC_DEFAULT_TIMEZONE 8
/* Network */
...
...
@@ -142,6 +173,9 @@
/* multimedia packages */
/* U8G2: a monochrome graphic library */
/* tools packages */
...
...
@@ -178,6 +212,7 @@
#define BSP_USING_UART
#define BSP_USING_UART0
#define HW_UART0_BAUDRATE_115200
#define BSP_USING_SDIO
/* Onboard Peripheral Drivers */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录