Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
人间散章
rt-thread
提交
c2a06c0c
R
rt-thread
项目概览
人间散章
/
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,发现更多精彩内容 >>
提交
c2a06c0c
编写于
6月 26, 2021
作者:
Thomas_Fly
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp/nrf5x] add the bsp ble_nano_33
上级
19ec36bc
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
364 addition
and
352 deletion
+364
-352
bsp/nrf5x/libraries/drivers/drv_uart.c
bsp/nrf5x/libraries/drivers/drv_uart.c
+3
-2
bsp/nrf5x/libraries/drivers/drv_uart.h
bsp/nrf5x/libraries/drivers/drv_uart.h
+0
-1
bsp/nrf5x/nrf52840/.config
bsp/nrf5x/nrf52840/.config
+51
-49
bsp/nrf5x/nrf52840/Kconfig
bsp/nrf5x/nrf52840/Kconfig
+3
-2
bsp/nrf5x/nrf52840/applications/application.c
bsp/nrf5x/nrf52840/applications/application.c
+4
-5
bsp/nrf5x/nrf52840/board/Kconfig
bsp/nrf5x/nrf52840/board/Kconfig
+14
-3
bsp/nrf5x/nrf52840/board/board.c
bsp/nrf5x/nrf52840/board/board.c
+3
-5
bsp/nrf5x/nrf52840/project.uvoptx
bsp/nrf5x/nrf52840/project.uvoptx
+129
-129
bsp/nrf5x/nrf52840/project.uvprojx
bsp/nrf5x/nrf52840/project.uvprojx
+122
-122
bsp/nrf5x/nrf52840/rtconfig.h
bsp/nrf5x/nrf52840/rtconfig.h
+35
-34
未找到文件。
bsp/nrf5x/libraries/drivers/drv_uart.c
浏览文件 @
c2a06c0c
...
...
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2020-04-28 xckhmf Modify for <nrfx>
* 2021-06-26 supperthomas fix rt_hw_uart_init
*
*/
#include <rtdevice.h>
...
...
@@ -236,7 +237,7 @@ static struct rt_uart_ops _uart_ops = {
_uart_getc
};
void
rt_hw_uart_init
(
void
)
int
rt_hw_uart_init
(
void
)
{
struct
serial_configure
config
=
RT_SERIAL_CONFIG_DEFAULT
;
...
...
@@ -249,5 +250,5 @@ void rt_hw_uart_init(void)
#endif
/* BSP_USING_UART0 */
}
INIT_BOARD_EXPORT
(
rt_hw_uart_init
);
#endif
/* BSP_USING_UART */
bsp/nrf5x/libraries/drivers/drv_uart.h
浏览文件 @
c2a06c0c
...
...
@@ -13,7 +13,6 @@
// #define USE_UART0_1 0
void
rt_hw_uart_init
(
void
);
#endif
bsp/nrf5x/nrf52840/.config
浏览文件 @
c2a06c0c
...
...
@@ -3,6 +3,57 @@
# RT-Thread Configuration
#
#
# Hardware Drivers Config
#
CONFIG_SOC_NRF52840
=
y
CONFIG_SOC_NORDIC
=
y
CONFIG_BSP_BOARD_PCA_10056
=
y
# CONFIG_BSP_BOARD_ARDUINO_NANO_33_BLE is not set
#
# Onboard Peripheral Drivers
#
CONFIG_BSP_USING_JLINK_TO_USART
=
y
CONFIG_RT_BSP_LED_PIN
=
13
# CONFIG_BSP_USING_QSPI_FLASH is not set
#
# On-chip Peripheral Drivers
#
CONFIG_BSP_USING_GPIO
=
y
CONFIG_BSP_USING_UART
=
y
CONFIG_NRFX_USING_UART
=
y
# CONFIG_NRFX_USING_UARTE is not set
CONFIG_BSP_USING_UART0
=
y
CONFIG_BSP_UART0_RX_PIN
=
8
CONFIG_BSP_UART0_TX_PIN
=
6
# CONFIG_BSP_USING_SAADC is not set
# CONFIG_BSP_USING_I2C is not set
# CONFIG_BSP_USING_SPI is not set
# CONFIG_BSP_USING_PWM is not set
# CONFIG_BSP_USING_WDT is not set
# CONFIG_BSP_USING_ONCHIP_RTC is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
#
# MCU flash config
#
CONFIG_MCU_FLASH_START_ADDRESS
=
0
x00000000
CONFIG_MCU_FLASH_SIZE_KB
=
1024
CONFIG_MCU_SRAM_START_ADDRESS
=
0
x20000000
CONFIG_MCU_SRAM_SIZE_KB
=
256
CONFIG_MCU_FLASH_PAGE_SIZE
=
0
x1000
CONFIG_BLE_STACK_USING_NULL
=
y
# CONFIG_BSP_USING_SOFTDEVICE is not set
# CONFIG_BSP_USING_NIMBLE is not set
CONFIG_NRFX_CLOCK_ENABLED
=
1
CONFIG_NRFX_CLOCK_DEFAULT_CONFIG_IRQ_PRIORITY
=
7
CONFIG_NRFX_CLOCK_CONFIG_LF_SRC
=
1
CONFIG_NRFX_UART_ENABLED
=
1
CONFIG_NRFX_UART0_ENABLED
=
1
CONFIG_NRFX_GPIOTE_ENABLED
=
1
#
# RT-Thread Kernel
#
...
...
@@ -541,52 +592,3 @@ CONFIG_PKG_NRFX_VER="latest"
# CONFIG_PKG_USING_STATE_MACHINE is not set
# CONFIG_PKG_USING_MCURSES is not set
# CONFIG_PKG_USING_COWSAY is not set
#
# Hardware Drivers Config
#
CONFIG_SOC_NRF52840
=
y
CONFIG_SOC_NORDIC
=
y
CONFIG_BSP_BOARD_PCA_10056
=
y
#
# Onboard Peripheral Drivers
#
CONFIG_BSP_USING_JLINK_TO_USART
=
y
# CONFIG_BSP_USING_QSPI_FLASH is not set
#
# On-chip Peripheral Drivers
#
CONFIG_BSP_USING_GPIO
=
y
CONFIG_BSP_USING_UART
=
y
CONFIG_NRFX_USING_UART
=
y
# CONFIG_NRFX_USING_UARTE is not set
CONFIG_BSP_USING_UART0
=
y
CONFIG_BSP_UART0_RX_PIN
=
8
CONFIG_BSP_UART0_TX_PIN
=
6
# CONFIG_BSP_USING_SAADC is not set
# CONFIG_BSP_USING_I2C is not set
# CONFIG_BSP_USING_SPI is not set
# CONFIG_BSP_USING_PWM is not set
# CONFIG_BSP_USING_WDT is not set
# CONFIG_BSP_USING_ONCHIP_RTC is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
#
# MCU flash config
#
CONFIG_MCU_FLASH_START_ADDRESS
=
0
x00000000
CONFIG_MCU_FLASH_SIZE_KB
=
1024
CONFIG_MCU_SRAM_START_ADDRESS
=
0
x20000000
CONFIG_MCU_SRAM_SIZE_KB
=
256
CONFIG_MCU_FLASH_PAGE_SIZE
=
0
x1000
CONFIG_BLE_STACK_USING_NULL
=
y
# CONFIG_BSP_USING_SOFTDEVICE is not set
# CONFIG_BSP_USING_NIMBLE is not set
CONFIG_NRFX_CLOCK_ENABLED
=
1
CONFIG_NRFX_CLOCK_DEFAULT_CONFIG_IRQ_PRIORITY
=
7
CONFIG_NRFX_CLOCK_CONFIG_LF_SRC
=
1
CONFIG_NRFX_UART_ENABLED
=
1
CONFIG_NRFX_UART0_ENABLED
=
1
CONFIG_NRFX_GPIOTE_ENABLED
=
1
bsp/nrf5x/nrf52840/Kconfig
浏览文件 @
c2a06c0c
...
...
@@ -14,8 +14,9 @@ config PKGS_DIR
string
option env="PKGS_ROOT"
default "packages"
source "board/Kconfig"
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "board/Kconfig"
bsp/nrf5x/nrf52840/applications/application.c
浏览文件 @
c2a06c0c
...
...
@@ -6,25 +6,24 @@
* Change Logs:
* Date Author Notes
* 2020-04-29 supperthomas first version
* 2021-06-26 supperthomas fix led
*
*/
#include <rtthread.h>
#include <rtdevice.h>
#define DK_BOARD_LED_1 13
#define DK_BOARD_LED_2 14
int
main
(
void
)
{
int
count
=
1
;
rt_pin_mode
(
DK_BOARD_LED_1
,
PIN_MODE_OUTPUT
);
rt_pin_mode
(
RT_BSP_LED_PIN
,
PIN_MODE_OUTPUT
);
while
(
count
++
)
{
rt_pin_write
(
DK_BOARD_LED_1
,
PIN_HIGH
);
rt_pin_write
(
RT_BSP_LED_PIN
,
PIN_HIGH
);
rt_thread_mdelay
(
500
);
rt_pin_write
(
DK_BOARD_LED_1
,
PIN_LOW
);
rt_pin_write
(
RT_BSP_LED_PIN
,
PIN_LOW
);
rt_thread_mdelay
(
500
);
}
return
RT_EOK
;
...
...
bsp/nrf5x/nrf52840/board/Kconfig
浏览文件 @
c2a06c0c
...
...
@@ -15,19 +15,32 @@ choice
default BSP_BOARD_PCA_10056
config BSP_BOARD_PCA_10056
select BSP_USING_UART
select BSP_USING_UART0
bool "NRF52840 pca10056 "
config BSP_BOARD_ARDUINO_NANO_33_BLE
bool "Arduino Nano 33 BLE (Sense)"
endchoice
menu "Onboard Peripheral Drivers"
config BSP_USING_JLINK_TO_USART
bool "Enable JLINK TO USART (uart0|RX_PIN:8|TX_PIN:6)"
default y
depends on BSP_BOARD_PCA_10056
config RT_BSP_LED_PIN
int
default 13 if BSP_BOARD_PCA_10056
default 16 if BSP_BOARD_ARDUINO_NANO_33_BLE
depends on BSP_USING_GPIO
menuconfig BSP_USING_QSPI_FLASH
select PKG_USING_FAL
bool "Enable QSPI FLASH(MX25R64 8MB)"
default n
depends on BSP_BOARD_PCA_10056
if BSP_USING_QSPI_FLASH
config NRFX_QSPI_ENABLED
...
...
@@ -89,8 +102,6 @@ menu "On-chip Peripheral Drivers"
endchoice
endif
if BSP_USING_UART&&NRFX_USING_UART
config BSP_USING_UART0
bool "Enable UART0"
default y
...
...
bsp/nrf5x/nrf52840/board/board.c
浏览文件 @
c2a06c0c
...
...
@@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2020-04-29 supperthomas first version
* 2020-04-29 supperthomas fix component init
*
*/
#include <rtthread.h>
...
...
@@ -60,17 +61,14 @@ void rt_hw_board_init(void)
rt_system_heap_init
((
void
*
)
HEAP_BEGIN
,
(
void
*
)
HEAP_END
);
#endif
#ifdef RT_USING_
SERIAL
rt_
hw_uart
_init
();
#ifdef RT_USING_
COMPONENTS_INIT
rt_
components_board
_init
();
#endif
#ifdef RT_USING_CONSOLE
rt_console_set_device
(
RT_CONSOLE_DEVICE_NAME
);
#endif
#ifdef RT_USING_COMPONENTS_INIT
rt_components_board_init
();
#endif
#ifdef BSP_USING_SOFTDEVICE
extern
uint32_t
Image
$$
RW_IRAM1
$$
Base
;
...
...
bsp/nrf5x/nrf52840/project.uvoptx
浏览文件 @
c2a06c0c
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52840/project.uvprojx
浏览文件 @
c2a06c0c
此差异已折叠。
点击以展开。
bsp/nrf5x/nrf52840/rtconfig.h
浏览文件 @
c2a06c0c
...
...
@@ -4,6 +4,41 @@
/* Automatically generated file; DO NOT EDIT. */
/* RT-Thread Configuration */
/* Hardware Drivers Config */
#define SOC_NRF52840
#define SOC_NORDIC
#define BSP_BOARD_PCA_10056
/* Onboard Peripheral Drivers */
#define BSP_USING_JLINK_TO_USART
#define RT_BSP_LED_PIN 13
/* On-chip Peripheral Drivers */
#define BSP_USING_GPIO
#define BSP_USING_UART
#define NRFX_USING_UART
#define BSP_USING_UART0
#define BSP_UART0_RX_PIN 8
#define BSP_UART0_TX_PIN 6
/* MCU flash config */
#define MCU_FLASH_START_ADDRESS 0x00000000
#define MCU_FLASH_SIZE_KB 1024
#define MCU_SRAM_START_ADDRESS 0x20000000
#define MCU_SRAM_SIZE_KB 256
#define MCU_FLASH_PAGE_SIZE 0x1000
#define BLE_STACK_USING_NULL
#define NRFX_CLOCK_ENABLED 1
#define NRFX_CLOCK_DEFAULT_CONFIG_IRQ_PRIORITY 7
#define NRFX_CLOCK_CONFIG_LF_SRC 1
#define NRFX_UART_ENABLED 1
#define NRFX_UART0_ENABLED 1
#define NRFX_GPIOTE_ENABLED 1
/* RT-Thread Kernel */
#define RT_NAME_MAX 8
...
...
@@ -160,38 +195,4 @@
/* entertainment: terminal games and other interesting software packages */
/* Hardware Drivers Config */
#define SOC_NRF52840
#define SOC_NORDIC
#define BSP_BOARD_PCA_10056
/* Onboard Peripheral Drivers */
#define BSP_USING_JLINK_TO_USART
/* On-chip Peripheral Drivers */
#define BSP_USING_GPIO
#define BSP_USING_UART
#define NRFX_USING_UART
#define BSP_USING_UART0
#define BSP_UART0_RX_PIN 8
#define BSP_UART0_TX_PIN 6
/* MCU flash config */
#define MCU_FLASH_START_ADDRESS 0x00000000
#define MCU_FLASH_SIZE_KB 1024
#define MCU_SRAM_START_ADDRESS 0x20000000
#define MCU_SRAM_SIZE_KB 256
#define MCU_FLASH_PAGE_SIZE 0x1000
#define BLE_STACK_USING_NULL
#define NRFX_CLOCK_ENABLED 1
#define NRFX_CLOCK_DEFAULT_CONFIG_IRQ_PRIORITY 7
#define NRFX_CLOCK_CONFIG_LF_SRC 1
#define NRFX_UART_ENABLED 1
#define NRFX_UART0_ENABLED 1
#define NRFX_GPIOTE_ENABLED 1
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录