Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
天中雨水
rt-thread
提交
b437478e
R
rt-thread
项目概览
天中雨水
/
rt-thread
该项目与 Fork 源项目分叉
Fork自
RT-Thread / rt-thread
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
b437478e
编写于
11月 16, 2020
作者:
B
Bernard Xiong
提交者:
GitHub
11月 16, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4025 from xckhmf/master
[bsp/nrf5x]support for uarte1
上级
065488e7
7c783d4e
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
461 addition
and
57 deletion
+461
-57
bsp/nrf5x/libraries/drivers/SConscript
bsp/nrf5x/libraries/drivers/SConscript
+4
-2
bsp/nrf5x/libraries/drivers/drv_uarte.c
bsp/nrf5x/libraries/drivers/drv_uarte.c
+281
-0
bsp/nrf5x/libraries/drivers/drv_uarte.h
bsp/nrf5x/libraries/drivers/drv_uarte.h
+33
-0
bsp/nrf5x/nrf52832/.config
bsp/nrf5x/nrf52832/.config
+16
-23
bsp/nrf5x/nrf52832/board/Kconfig
bsp/nrf5x/nrf52832/board/Kconfig
+38
-7
bsp/nrf5x/nrf52832/rtconfig.h
bsp/nrf5x/nrf52832/rtconfig.h
+8
-0
bsp/nrf5x/nrf52840/.config
bsp/nrf5x/nrf52840/.config
+19
-19
bsp/nrf5x/nrf52840/board/Kconfig
bsp/nrf5x/nrf52840/board/Kconfig
+53
-6
bsp/nrf5x/nrf52840/rtconfig.h
bsp/nrf5x/nrf52840/rtconfig.h
+9
-0
未找到文件。
bsp/nrf5x/libraries/drivers/SConscript
浏览文件 @
b437478e
...
@@ -9,8 +9,10 @@ src = Split("""
...
@@ -9,8 +9,10 @@ src = Split("""
"""
)
"""
)
if
GetDepend
([
'BSP_USING_UART'
]):
if
GetDepend
([
'BSP_USING_UART'
]):
src
+=
[
'drv_uart.c'
]
if
GetDepend
([
'NRFX_USING_UART'
]):
src
+=
[
'drv_uart.c'
]
else
:
src
+=
[
'drv_uarte.c'
]
if
GetDepend
([
'BSP_USING_ON_CHIP_FLASH'
]):
if
GetDepend
([
'BSP_USING_ON_CHIP_FLASH'
]):
src
+=
[
'drv_flash.c'
]
src
+=
[
'drv_flash.c'
]
...
...
bsp/nrf5x/libraries/drivers/drv_uarte.c
0 → 100644
浏览文件 @
b437478e
/*
* Copyright (c) 2006-2020, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-04-28 xckhmf Modify for <nrfx>
* 2020-10-31 xckhmf Support for UART1
*
*/
#include <rtdevice.h>
#include <nrfx_uarte.h>
#include "drv_uart.h"
#ifdef BSP_USING_UART
#if defined(BSP_USING_UART0) || defined(BSP_USING_UART1)
typedef
struct
{
struct
rt_serial_device
*
serial
;
nrfx_uarte_t
uarte_instance
;
uint8_t
rx_length
;
uint8_t
tx_buffer
[
1
];
uint8_t
rx_buffer
[
1
];
bool
isInit
;
uint32_t
rx_pin
;
uint32_t
tx_pin
;
}
drv_uart_cb_t
;
#ifdef BSP_USING_UART0
static
struct
rt_serial_device
m_serial_0
;
drv_uart_cb_t
m_uarte0_cb
=
{
.
uarte_instance
=
NRFX_UARTE_INSTANCE
(
0
),
.
rx_length
=
0
,
.
rx_pin
=
BSP_UART0_RX_PIN
,
.
tx_pin
=
BSP_UART0_TX_PIN
,
.
isInit
=
false
};
#endif
/* BSP_USING_UART0 */
#ifdef BSP_USING_UART1
static
struct
rt_serial_device
m_serial_1
;
drv_uart_cb_t
m_uarte1_cb
=
{
.
uarte_instance
=
NRFX_UARTE_INSTANCE
(
1
),
.
rx_length
=
0
,
.
rx_pin
=
BSP_UART1_RX_PIN
,
.
tx_pin
=
BSP_UART1_TX_PIN
,
.
isInit
=
false
};
#endif
/* BSP_USING_UART1 */
static
void
uarte_evt_handler
(
nrfx_uarte_event_t
const
*
p_event
,
void
*
p_context
)
{
drv_uart_cb_t
*
p_cb
=
RT_NULL
;
p_cb
=
(
drv_uart_cb_t
*
)
p_context
;
switch
(
p_event
->
type
)
{
case
NRFX_UARTE_EVT_RX_DONE
:
p_cb
->
rx_length
=
p_event
->
data
.
rxtx
.
bytes
;
if
(
p_cb
->
serial
->
parent
.
open_flag
&
RT_DEVICE_FLAG_INT_RX
)
{
rt_hw_serial_isr
(
p_cb
->
serial
,
RT_SERIAL_EVENT_RX_IND
);
}
(
void
)
nrfx_uarte_rx
(
&
(
p_cb
->
uarte_instance
),
p_cb
->
rx_buffer
,
1
);
break
;
case
NRFX_UARTE_EVT_ERROR
:
(
void
)
nrfx_uarte_rx
(
&
(
p_cb
->
uarte_instance
),
p_cb
->
rx_buffer
,
1
);
break
;
case
NRFX_UARTE_EVT_TX_DONE
:
if
(
p_cb
->
serial
->
parent
.
open_flag
&
RT_DEVICE_FLAG_INT_TX
)
{
rt_hw_serial_isr
(
p_cb
->
serial
,
RT_SERIAL_EVENT_TX_DONE
);
}
break
;
default:
break
;
}
}
static
rt_err_t
_uart_cfg
(
struct
rt_serial_device
*
serial
,
struct
serial_configure
*
cfg
)
{
nrfx_uarte_config_t
config
=
NRFX_UARTE_DEFAULT_CONFIG
(
NRF_UARTE_PSEL_DISCONNECTED
,
\
NRF_UARTE_PSEL_DISCONNECTED
);
drv_uart_cb_t
*
p_cb
=
RT_NULL
;
RT_ASSERT
(
serial
!=
RT_NULL
);
RT_ASSERT
(
cfg
!=
RT_NULL
);
if
(
serial
->
parent
.
user_data
==
RT_NULL
)
{
return
-
RT_ERROR
;
}
p_cb
=
(
drv_uart_cb_t
*
)
serial
->
parent
.
user_data
;
if
(
p_cb
->
isInit
)
{
nrfx_uarte_uninit
(
&
(
p_cb
->
uarte_instance
));
p_cb
->
isInit
=
false
;
}
switch
(
cfg
->
baud_rate
)
{
case
BAUD_RATE_2400
:
config
.
baudrate
=
NRF_UARTE_BAUDRATE_2400
;
break
;
case
BAUD_RATE_4800
:
config
.
baudrate
=
NRF_UARTE_BAUDRATE_4800
;
break
;
case
BAUD_RATE_9600
:
config
.
baudrate
=
NRF_UARTE_BAUDRATE_9600
;
break
;
case
BAUD_RATE_19200
:
config
.
baudrate
=
NRF_UARTE_BAUDRATE_19200
;
break
;
case
BAUD_RATE_38400
:
config
.
baudrate
=
NRF_UARTE_BAUDRATE_38400
;
break
;
case
BAUD_RATE_57600
:
config
.
baudrate
=
NRF_UARTE_BAUDRATE_57600
;
break
;
case
BAUD_RATE_115200
:
config
.
baudrate
=
NRF_UARTE_BAUDRATE_115200
;
break
;
case
BAUD_RATE_230400
:
config
.
baudrate
=
NRF_UARTE_BAUDRATE_230400
;
break
;
case
BAUD_RATE_460800
:
config
.
baudrate
=
NRF_UARTE_BAUDRATE_460800
;
break
;
case
BAUD_RATE_921600
:
config
.
baudrate
=
NRF_UARTE_BAUDRATE_921600
;
break
;
case
BAUD_RATE_2000000
:
case
BAUD_RATE_3000000
:
return
-
RT_EINVAL
;
default:
config
.
baudrate
=
NRF_UARTE_BAUDRATE_115200
;
break
;
}
config
.
hal_cfg
.
parity
=
(
cfg
->
parity
==
PARITY_NONE
)
?
\
NRF_UARTE_PARITY_EXCLUDED
:
NRF_UARTE_PARITY_INCLUDED
;
config
.
hal_cfg
.
hwfc
=
NRF_UARTE_HWFC_DISABLED
;
config
.
pselrxd
=
p_cb
->
rx_pin
;
config
.
pseltxd
=
p_cb
->
tx_pin
;
config
.
p_context
=
(
void
*
)
p_cb
;
nrfx_uarte_init
(
&
(
p_cb
->
uarte_instance
),(
nrfx_uarte_config_t
const
*
)
&
config
,
uarte_evt_handler
);
nrfx_uarte_rx
(
&
(
p_cb
->
uarte_instance
),
p_cb
->
rx_buffer
,
1
);
p_cb
->
isInit
=
true
;
return
RT_EOK
;
}
static
rt_err_t
_uart_ctrl
(
struct
rt_serial_device
*
serial
,
int
cmd
,
void
*
arg
)
{
drv_uart_cb_t
*
p_cb
=
RT_NULL
;
RT_ASSERT
(
serial
!=
RT_NULL
);
if
(
serial
->
parent
.
user_data
==
RT_NULL
)
{
return
-
RT_ERROR
;
}
p_cb
=
(
drv_uart_cb_t
*
)
serial
->
parent
.
user_data
;
switch
(
cmd
)
{
/* disable interrupt */
case
RT_DEVICE_CTRL_CLR_INT
:
break
;
/* enable interrupt */
case
RT_DEVICE_CTRL_SET_INT
:
break
;
case
RT_DEVICE_CTRL_CUSTOM
:
if
((
rt_uint32_t
)(
arg
)
==
UART_CONFIG_BAUD_RATE_9600
)
{
p_cb
->
serial
->
config
.
baud_rate
=
9600
;
}
else
if
((
rt_uint32_t
)(
arg
)
==
UART_CONFIG_BAUD_RATE_115200
)
{
p_cb
->
serial
->
config
.
baud_rate
=
115200
;
}
_uart_cfg
(
serial
,
&
(
serial
->
config
));
break
;
case
RT_DEVICE_CTRL_PIN
:
_uart_cfg
(
serial
,
&
(
serial
->
config
));
break
;
case
RT_DEVICE_POWERSAVE
:
if
(
p_cb
->
isInit
)
{
nrfx_uarte_uninit
(
&
(
p_cb
->
uarte_instance
));
p_cb
->
isInit
=
false
;
}
break
;
case
RT_DEVICE_WAKEUP
:
_uart_cfg
(
serial
,
&
(
serial
->
config
));
break
;
default:
return
-
RT_ERROR
;
}
return
RT_EOK
;
}
static
int
_uart_putc
(
struct
rt_serial_device
*
serial
,
char
c
)
{
drv_uart_cb_t
*
p_cb
=
RT_NULL
;
int
rtn
=
-
1
;
RT_ASSERT
(
serial
!=
RT_NULL
);
if
(
serial
->
parent
.
user_data
!=
RT_NULL
)
{
p_cb
=
(
drv_uart_cb_t
*
)
serial
->
parent
.
user_data
;
}
p_cb
->
tx_buffer
[
0
]
=
c
;
nrfx_uarte_tx
(
&
(
p_cb
->
uarte_instance
),
p_cb
->
tx_buffer
,
1
);
if
(
!
(
serial
->
parent
.
open_flag
&
RT_DEVICE_FLAG_INT_TX
))
{
while
(
nrfx_uarte_tx_in_progress
(
&
(
p_cb
->
uarte_instance
)))
{
}
}
return
rtn
;
}
static
int
_uart_getc
(
struct
rt_serial_device
*
serial
)
{
int
ch
=
-
1
;
drv_uart_cb_t
*
p_cb
=
RT_NULL
;
RT_ASSERT
(
serial
!=
RT_NULL
);
if
(
serial
->
parent
.
user_data
!=
RT_NULL
)
{
p_cb
=
(
drv_uart_cb_t
*
)
serial
->
parent
.
user_data
;
}
if
(
p_cb
->
rx_length
)
{
ch
=
p_cb
->
rx_buffer
[
0
];
p_cb
->
rx_length
--
;
}
return
ch
;
}
static
struct
rt_uart_ops
_uart_ops
=
{
_uart_cfg
,
_uart_ctrl
,
_uart_putc
,
_uart_getc
};
void
rt_hw_uart_init
(
void
)
{
struct
serial_configure
config
=
RT_SERIAL_CONFIG_DEFAULT
;
#ifdef BSP_USING_UART0
m_serial_0
.
config
=
config
;
m_serial_0
.
ops
=
&
_uart_ops
;
m_uarte0_cb
.
serial
=
&
m_serial_0
;
rt_hw_serial_register
(
&
m_serial_0
,
"uart0"
,
\
RT_DEVICE_FLAG_RDWR
|
RT_DEVICE_FLAG_INT_RX
,
&
m_uarte0_cb
);
#endif
/* BSP_USING_UART0 */
#ifdef BSP_USING_UART1
m_serial_1
.
config
=
config
;
m_serial_1
.
ops
=
&
_uart_ops
;
m_uarte1_cb
.
serial
=
&
m_serial_1
;
rt_hw_serial_register
(
&
m_serial_1
,
"uart1"
,
\
RT_DEVICE_FLAG_RDWR
|
RT_DEVICE_FLAG_INT_RX
|
RT_DEVICE_FLAG_INT_TX
,
&
m_uarte1_cb
);
#endif
/* BSP_USING_UART1 */
}
#endif
/* defined(BSP_USING_UART0) || defined(BSP_USING_UART1) */
#endif
/* BSP_USING_UART */
bsp/nrf5x/libraries/drivers/drv_uarte.h
0 → 100644
浏览文件 @
b437478e
/*
* Copyright (c) 2006-2020, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2020-04-28 xckhmf Modify for <nrfx>
* 2020-10-31 xckhmf Support for UART1
*
*/
#ifndef __DRV_UART_H__
#define __DRV_UART_H__
#ifdef __cplusplus
extern
"C"
{
#endif
#define RT_DEVICE_CTRL_CUSTOM 0x20
#define RT_DEVICE_CTRL_PIN 0x21
#define RT_DEVICE_POWERSAVE 0x22
#define RT_DEVICE_WAKEUP 0x23
#define UART_CONFIG_BAUD_RATE_9600 1
#define UART_CONFIG_BAUD_RATE_115200 2
void
rt_hw_uart_init
(
void
);
#ifdef __cplusplus
}
#endif
#endif
/* __DRV_UART_H__ */
bsp/nrf5x/nrf52832/.config
浏览文件 @
b437478e
...
@@ -120,6 +120,7 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64
...
@@ -120,6 +120,7 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_CPUTIME is not set
# CONFIG_RT_USING_CPUTIME is not set
# CONFIG_RT_USING_I2C is not set
# CONFIG_RT_USING_I2C is not set
# CONFIG_RT_USING_PHY is not set
CONFIG_RT_USING_PIN
=
y
CONFIG_RT_USING_PIN
=
y
# CONFIG_RT_USING_ADC is not set
# CONFIG_RT_USING_ADC is not set
# CONFIG_RT_USING_DAC is not set
# CONFIG_RT_USING_DAC is not set
...
@@ -195,15 +196,12 @@ CONFIG_RT_USING_LIBC=y
...
@@ -195,15 +196,12 @@ CONFIG_RT_USING_LIBC=y
#
#
# IoT - internet of things
# IoT - internet of things
#
#
# CONFIG_PKG_USING_LORAWAN_DRIVER is not set
# CONFIG_PKG_USING_PAHOMQTT is not set
# CONFIG_PKG_USING_PAHOMQTT is not set
# CONFIG_PKG_USING_UMQTT is not set
# CONFIG_PKG_USING_WEBCLIENT is not set
# CONFIG_PKG_USING_WEBCLIENT is not set
# CONFIG_PKG_USING_WEBNET is not set
# CONFIG_PKG_USING_WEBNET is not set
# CONFIG_PKG_USING_MONGOOSE is not set
# CONFIG_PKG_USING_MONGOOSE is not set
# CONFIG_PKG_USING_MYMQTT is not set
# CONFIG_PKG_USING_MYMQTT is not set
# CONFIG_PKG_USING_KAWAII_MQTT is not set
# CONFIG_PKG_USING_KAWAII_MQTT is not set
# CONFIG_PKG_USING_BC28_MQTT is not set
# CONFIG_PKG_USING_WEBTERMINAL is not set
# CONFIG_PKG_USING_WEBTERMINAL is not set
# CONFIG_PKG_USING_CJSON is not set
# CONFIG_PKG_USING_CJSON is not set
# CONFIG_PKG_USING_JSMN is not set
# CONFIG_PKG_USING_JSMN is not set
...
@@ -230,7 +228,6 @@ CONFIG_RT_USING_LIBC=y
...
@@ -230,7 +228,6 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NETUTILS is not set
# CONFIG_PKG_USING_NETUTILS is not set
# CONFIG_PKG_USING_CMUX is not set
# CONFIG_PKG_USING_PPP_DEVICE is not set
# CONFIG_PKG_USING_PPP_DEVICE is not set
# CONFIG_PKG_USING_AT_DEVICE is not set
# CONFIG_PKG_USING_AT_DEVICE is not set
# CONFIG_PKG_USING_ATSRV_SOCKET is not set
# CONFIG_PKG_USING_ATSRV_SOCKET is not set
...
@@ -243,7 +240,7 @@ CONFIG_RT_USING_LIBC=y
...
@@ -243,7 +240,7 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
# CONFIG_PKG_USING_ALI_IOTKIT is not set
# CONFIG_PKG_USING_ALI_IOTKIT is not set
# CONFIG_PKG_USING_AZURE is not set
# CONFIG_PKG_USING_AZURE is not set
# CONFIG_PKG_USING_TENCENT_IOT
_EXPLORER
is not set
# CONFIG_PKG_USING_TENCENT_IOT
HUB
is not set
# CONFIG_PKG_USING_JIOT-C-SDK is not set
# CONFIG_PKG_USING_JIOT-C-SDK is not set
# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set
# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set
# CONFIG_PKG_USING_JOYLINK is not set
# CONFIG_PKG_USING_JOYLINK is not set
...
@@ -265,7 +262,6 @@ CONFIG_RT_USING_LIBC=y
...
@@ -265,7 +262,6 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_CAPNP is not set
# CONFIG_PKG_USING_CAPNP is not set
# CONFIG_PKG_USING_RT_CJSON_TOOLS is not set
# CONFIG_PKG_USING_RT_CJSON_TOOLS is not set
# CONFIG_PKG_USING_AGILE_TELNET is not set
# CONFIG_PKG_USING_AGILE_TELNET is not set
# CONFIG_PKG_USING_NMEALIB is not set
#
#
# security packages
# security packages
...
@@ -274,7 +270,6 @@ CONFIG_RT_USING_LIBC=y
...
@@ -274,7 +270,6 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_libsodium is not set
# CONFIG_PKG_USING_libsodium is not set
# CONFIG_PKG_USING_TINYCRYPT is not set
# CONFIG_PKG_USING_TINYCRYPT is not set
# CONFIG_PKG_USING_TFM is not set
# CONFIG_PKG_USING_TFM is not set
# CONFIG_PKG_USING_YD_CRYPTO is not set
#
#
# language packages
# language packages
...
@@ -309,8 +304,6 @@ CONFIG_RT_USING_LIBC=y
...
@@ -309,8 +304,6 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set
# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set
# CONFIG_PKG_USING_LUNAR_CALENDAR is not set
# CONFIG_PKG_USING_LUNAR_CALENDAR is not set
# CONFIG_PKG_USING_BS8116A is not set
# CONFIG_PKG_USING_BS8116A is not set
# CONFIG_PKG_USING_GPS_RMC is not set
# CONFIG_PKG_USING_URLENCODE is not set
#
#
# system packages
# system packages
...
@@ -321,7 +314,6 @@ CONFIG_RT_USING_LIBC=y
...
@@ -321,7 +314,6 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_LWEXT4 is not set
# CONFIG_PKG_USING_LWEXT4 is not set
# CONFIG_PKG_USING_PARTITION is not set
# CONFIG_PKG_USING_PARTITION is not set
# CONFIG_PKG_USING_FAL is not set
# CONFIG_PKG_USING_FAL is not set
# CONFIG_PKG_USING_FLASHDB is not set
# CONFIG_PKG_USING_SQLITE is not set
# CONFIG_PKG_USING_SQLITE is not set
# CONFIG_PKG_USING_RTI is not set
# CONFIG_PKG_USING_RTI is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
...
@@ -334,9 +326,6 @@ CONFIG_RT_USING_LIBC=y
...
@@ -334,9 +326,6 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_SYSWATCH is not set
# CONFIG_PKG_USING_SYSWATCH is not set
# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set
# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set
# CONFIG_PKG_USING_PLCCORE is not set
# CONFIG_PKG_USING_PLCCORE is not set
# CONFIG_PKG_USING_RAMDISK is not set
# CONFIG_PKG_USING_MININI is not set
# CONFIG_PKG_USING_QBOOT is not set
#
#
# peripheral libraries and drivers
# peripheral libraries and drivers
...
@@ -378,7 +367,6 @@ CONFIG_PKG_NRFX_VER="v2.1.0"
...
@@ -378,7 +367,6 @@ CONFIG_PKG_NRFX_VER="v2.1.0"
# CONFIG_PKG_USING_RPLIDAR is not set
# CONFIG_PKG_USING_RPLIDAR is not set
# CONFIG_PKG_USING_AS608 is not set
# CONFIG_PKG_USING_AS608 is not set
# CONFIG_PKG_USING_RC522 is not set
# CONFIG_PKG_USING_RC522 is not set
# CONFIG_PKG_USING_WS2812B is not set
# CONFIG_PKG_USING_EMBARC_BSP is not set
# CONFIG_PKG_USING_EMBARC_BSP is not set
# CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set
# CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set
# CONFIG_PKG_USING_MULTI_RTIMER is not set
# CONFIG_PKG_USING_MULTI_RTIMER is not set
...
@@ -386,11 +374,6 @@ CONFIG_PKG_NRFX_VER="v2.1.0"
...
@@ -386,11 +374,6 @@ CONFIG_PKG_NRFX_VER="v2.1.0"
# CONFIG_PKG_USING_BEEP is not set
# CONFIG_PKG_USING_BEEP is not set
# CONFIG_PKG_USING_EASYBLINK is not set
# CONFIG_PKG_USING_EASYBLINK is not set
# CONFIG_PKG_USING_PMS_SERIES is not set
# CONFIG_PKG_USING_PMS_SERIES is not set
# CONFIG_PKG_USING_CAN_YMODEM is not set
# CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set
# CONFIG_PKG_USING_QLED is not set
# CONFIG_PKG_USING_PAJ7620 is not set
# CONFIG_PKG_USING_AGILE_CONSOLE is not set
#
#
# miscellaneous packages
# miscellaneous packages
...
@@ -427,31 +410,36 @@ CONFIG_PKG_NRFX_VER="v2.1.0"
...
@@ -427,31 +410,36 @@ CONFIG_PKG_NRFX_VER="v2.1.0"
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_ULAPACK is not set
# CONFIG_PKG_USING_ULAPACK is not set
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_CRCLIB is not set
#
#
# Hardware Drivers Config
# Hardware Drivers Config
#
#
CONFIG_SOC_NRF52832
=
y
CONFIG_SOC_NRF52832
=
y
CONFIG_NRFX_CLOCK_ENABLED
=
1
CONFIG_NRFX_CLOCK_DEFAULT_CONFIG_IRQ_PRIORITY
=
7
CONFIG_NRFX_CLOCK_CONFIG_LF_SRC
=
1
CONFIG_SOC_NORDIC
=
y
CONFIG_SOC_NORDIC
=
y
#
#
# Onboard Peripheral Drivers
# Onboard Peripheral Drivers
#
#
# CONFIG_BSP_USING_JLINK_TO_USART is not set
# CONFIG_BSP_USING_JLINK_TO_USART is not set
# CONFIG_BSP_USING_QSPI_FLASH is not set
#
#
# On-chip Peripheral Drivers
# On-chip Peripheral Drivers
#
#
CONFIG_BSP_USING_GPIO
=
y
CONFIG_BSP_USING_GPIO
=
y
CONFIG_NRFX_GPIOTE_ENABLED
=
1
# CONFIG_BSP_USING_SAADC is not set
# CONFIG_BSP_USING_PWM is not set
# CONFIG_BSP_USING_PWM is not set
# CONFIG_BSP_USING_SOFTDEVICE is not set
CONFIG_BSP_USING_UART
=
y
CONFIG_BSP_USING_UART
=
y
CONFIG_NRFX_USING_UART
=
y
# CONFIG_NRFX_USING_UARTE is not set
CONFIG_NRFX_UART_ENABLED
=
1
CONFIG_BSP_USING_UART0
=
y
CONFIG_BSP_USING_UART0
=
y
CONFIG_NRFX_UART0_ENABLED
=
1
CONFIG_BSP_UART0_RX_PIN
=
8
CONFIG_BSP_UART0_RX_PIN
=
8
CONFIG_BSP_UART0_TX_PIN
=
6
CONFIG_BSP_UART0_TX_PIN
=
6
# CONFIG_BSP_USING_UART1 is not set
# CONFIG_BSP_USING_SPI is not set
# CONFIG_BSP_USING_SPI is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
...
@@ -463,3 +451,8 @@ CONFIG_MCU_FLASH_SIZE_KB=1024
...
@@ -463,3 +451,8 @@ CONFIG_MCU_FLASH_SIZE_KB=1024
CONFIG_MCU_SRAM_START_ADDRESS
=
0
x20000000
CONFIG_MCU_SRAM_START_ADDRESS
=
0
x20000000
CONFIG_MCU_SRAM_SIZE_KB
=
256
CONFIG_MCU_SRAM_SIZE_KB
=
256
CONFIG_MCU_FLASH_PAGE_SIZE
=
0
x1000
CONFIG_MCU_FLASH_PAGE_SIZE
=
0
x1000
# CONFIG_BSP_USING_WDT is not set
# CONFIG_BSP_USING_ONCHIP_RTC is not set
CONFIG_BLE_STACK_USING_NULL
=
y
# CONFIG_BSP_USING_SOFTDEVICE is not set
# CONFIG_BSP_USING_NIMBLE is not set
bsp/nrf5x/nrf52832/board/Kconfig
浏览文件 @
b437478e
...
@@ -157,12 +157,24 @@ menu "On-chip Peripheral Drivers"
...
@@ -157,12 +157,24 @@ menu "On-chip Peripheral Drivers"
endif
endif
menu
config BSP_USING_UART
config BSP_USING_UART
bool "Enable UART"
bool "Enable UART"
default y
default y
select RT_USING_SERIAL
select RT_USING_SERIAL
if BSP_USING_UART
if BSP_USING_UART
choice
prompt "UART or UARTE"
default NRFX_USING_UART
help
Select the UART or UARTE
config NRFX_USING_UART
bool "UART"
config NRFX_USING_UARTE
bool "UARTE"
endchoice
endif
if BSP_USING_UART&&NRFX_USING_UART
config NRFX_UART_ENABLED
config NRFX_UART_ENABLED
int
int
default 1
default 1
...
@@ -183,9 +195,28 @@ menu "On-chip Peripheral Drivers"
...
@@ -183,9 +195,28 @@ menu "On-chip Peripheral Drivers"
range 0 31
range 0 31
default 6
default 6
endif
endif
config BSP_USING_UART1
endif
bool "Enable UART1"
if BSP_USING_UART&&NRFX_USING_UARTE
default n
config NRFX_UARTE_ENABLED
int
default 1
config BSP_USING_UART0
bool "Enable UARTE0"
default n
if BSP_USING_UART0
config NRFX_UARTE0_ENABLED
int
default 1
config BSP_UART0_RX_PIN
int "uarte0 rx pin number"
range 0 31
default 8
config BSP_UART0_TX_PIN
int "uarte0 tx pin number"
range 0 31
default 6
endif
endif
endif
config BSP_USING_SPI
config BSP_USING_SPI
...
...
bsp/nrf5x/nrf52832/rtconfig.h
浏览文件 @
b437478e
...
@@ -152,6 +152,9 @@
...
@@ -152,6 +152,9 @@
/* Hardware Drivers Config */
/* Hardware Drivers Config */
#define SOC_NRF52832
#define SOC_NRF52832
#define NRFX_CLOCK_ENABLED 1
#define NRFX_CLOCK_DEFAULT_CONFIG_IRQ_PRIORITY 7
#define NRFX_CLOCK_CONFIG_LF_SRC 1
#define SOC_NORDIC
#define SOC_NORDIC
/* Onboard Peripheral Drivers */
/* Onboard Peripheral Drivers */
...
@@ -160,8 +163,12 @@
...
@@ -160,8 +163,12 @@
/* On-chip Peripheral Drivers */
/* On-chip Peripheral Drivers */
#define BSP_USING_GPIO
#define BSP_USING_GPIO
#define NRFX_GPIOTE_ENABLED 1
#define BSP_USING_UART
#define BSP_USING_UART
#define NRFX_USING_UART
#define NRFX_UART_ENABLED 1
#define BSP_USING_UART0
#define BSP_USING_UART0
#define NRFX_UART0_ENABLED 1
#define BSP_UART0_RX_PIN 8
#define BSP_UART0_RX_PIN 8
#define BSP_UART0_TX_PIN 6
#define BSP_UART0_TX_PIN 6
...
@@ -172,5 +179,6 @@
...
@@ -172,5 +179,6 @@
#define MCU_SRAM_START_ADDRESS 0x20000000
#define MCU_SRAM_START_ADDRESS 0x20000000
#define MCU_SRAM_SIZE_KB 256
#define MCU_SRAM_SIZE_KB 256
#define MCU_FLASH_PAGE_SIZE 0x1000
#define MCU_FLASH_PAGE_SIZE 0x1000
#define BLE_STACK_USING_NULL
#endif
#endif
bsp/nrf5x/nrf52840/.config
浏览文件 @
b437478e
...
@@ -65,7 +65,7 @@ CONFIG_RT_USING_DEVICE=y
...
@@ -65,7 +65,7 @@ CONFIG_RT_USING_DEVICE=y
# CONFIG_RT_USING_INTERRUPT_INFO is not set
# CONFIG_RT_USING_INTERRUPT_INFO is not set
CONFIG_RT_USING_CONSOLE
=
y
CONFIG_RT_USING_CONSOLE
=
y
CONFIG_RT_CONSOLEBUF_SIZE
=
128
CONFIG_RT_CONSOLEBUF_SIZE
=
128
CONFIG_RT_CONSOLE_DEVICE_NAME
=
"uart
0
"
CONFIG_RT_CONSOLE_DEVICE_NAME
=
"uart
1
"
CONFIG_RT_VER_NUM
=
0
x40003
CONFIG_RT_VER_NUM
=
0
x40003
# CONFIG_RT_USING_CPU_FFS is not set
# CONFIG_RT_USING_CPU_FFS is not set
# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
...
@@ -120,6 +120,7 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64
...
@@ -120,6 +120,7 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_CPUTIME is not set
# CONFIG_RT_USING_CPUTIME is not set
# CONFIG_RT_USING_I2C is not set
# CONFIG_RT_USING_I2C is not set
# CONFIG_RT_USING_PHY is not set
CONFIG_RT_USING_PIN
=
y
CONFIG_RT_USING_PIN
=
y
# CONFIG_RT_USING_ADC is not set
# CONFIG_RT_USING_ADC is not set
# CONFIG_RT_USING_DAC is not set
# CONFIG_RT_USING_DAC is not set
...
@@ -195,15 +196,12 @@ CONFIG_RT_USING_LIBC=y
...
@@ -195,15 +196,12 @@ CONFIG_RT_USING_LIBC=y
#
#
# IoT - internet of things
# IoT - internet of things
#
#
# CONFIG_PKG_USING_LORAWAN_DRIVER is not set
# CONFIG_PKG_USING_PAHOMQTT is not set
# CONFIG_PKG_USING_PAHOMQTT is not set
# CONFIG_PKG_USING_UMQTT is not set
# CONFIG_PKG_USING_WEBCLIENT is not set
# CONFIG_PKG_USING_WEBCLIENT is not set
# CONFIG_PKG_USING_WEBNET is not set
# CONFIG_PKG_USING_WEBNET is not set
# CONFIG_PKG_USING_MONGOOSE is not set
# CONFIG_PKG_USING_MONGOOSE is not set
# CONFIG_PKG_USING_MYMQTT is not set
# CONFIG_PKG_USING_MYMQTT is not set
# CONFIG_PKG_USING_KAWAII_MQTT is not set
# CONFIG_PKG_USING_KAWAII_MQTT is not set
# CONFIG_PKG_USING_BC28_MQTT is not set
# CONFIG_PKG_USING_WEBTERMINAL is not set
# CONFIG_PKG_USING_WEBTERMINAL is not set
# CONFIG_PKG_USING_CJSON is not set
# CONFIG_PKG_USING_CJSON is not set
# CONFIG_PKG_USING_JSMN is not set
# CONFIG_PKG_USING_JSMN is not set
...
@@ -230,7 +228,6 @@ CONFIG_RT_USING_LIBC=y
...
@@ -230,7 +228,6 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NETUTILS is not set
# CONFIG_PKG_USING_NETUTILS is not set
# CONFIG_PKG_USING_CMUX is not set
# CONFIG_PKG_USING_PPP_DEVICE is not set
# CONFIG_PKG_USING_PPP_DEVICE is not set
# CONFIG_PKG_USING_AT_DEVICE is not set
# CONFIG_PKG_USING_AT_DEVICE is not set
# CONFIG_PKG_USING_ATSRV_SOCKET is not set
# CONFIG_PKG_USING_ATSRV_SOCKET is not set
...
@@ -243,7 +240,7 @@ CONFIG_RT_USING_LIBC=y
...
@@ -243,7 +240,7 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
# CONFIG_PKG_USING_ALI_IOTKIT is not set
# CONFIG_PKG_USING_ALI_IOTKIT is not set
# CONFIG_PKG_USING_AZURE is not set
# CONFIG_PKG_USING_AZURE is not set
# CONFIG_PKG_USING_TENCENT_IOT
_EXPLORER
is not set
# CONFIG_PKG_USING_TENCENT_IOT
HUB
is not set
# CONFIG_PKG_USING_JIOT-C-SDK is not set
# CONFIG_PKG_USING_JIOT-C-SDK is not set
# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set
# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set
# CONFIG_PKG_USING_JOYLINK is not set
# CONFIG_PKG_USING_JOYLINK is not set
...
@@ -273,7 +270,6 @@ CONFIG_RT_USING_LIBC=y
...
@@ -273,7 +270,6 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_libsodium is not set
# CONFIG_PKG_USING_libsodium is not set
# CONFIG_PKG_USING_TINYCRYPT is not set
# CONFIG_PKG_USING_TINYCRYPT is not set
# CONFIG_PKG_USING_TFM is not set
# CONFIG_PKG_USING_TFM is not set
# CONFIG_PKG_USING_YD_CRYPTO is not set
#
#
# language packages
# language packages
...
@@ -308,7 +304,6 @@ CONFIG_RT_USING_LIBC=y
...
@@ -308,7 +304,6 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set
# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set
# CONFIG_PKG_USING_LUNAR_CALENDAR is not set
# CONFIG_PKG_USING_LUNAR_CALENDAR is not set
# CONFIG_PKG_USING_BS8116A is not set
# CONFIG_PKG_USING_BS8116A is not set
# CONFIG_PKG_USING_URLENCODE is not set
#
#
# system packages
# system packages
...
@@ -319,7 +314,6 @@ CONFIG_RT_USING_LIBC=y
...
@@ -319,7 +314,6 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_LWEXT4 is not set
# CONFIG_PKG_USING_LWEXT4 is not set
# CONFIG_PKG_USING_PARTITION is not set
# CONFIG_PKG_USING_PARTITION is not set
# CONFIG_PKG_USING_FAL is not set
# CONFIG_PKG_USING_FAL is not set
# CONFIG_PKG_USING_FLASHDB is not set
# CONFIG_PKG_USING_SQLITE is not set
# CONFIG_PKG_USING_SQLITE is not set
# CONFIG_PKG_USING_RTI is not set
# CONFIG_PKG_USING_RTI is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
...
@@ -332,8 +326,6 @@ CONFIG_RT_USING_LIBC=y
...
@@ -332,8 +326,6 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_SYSWATCH is not set
# CONFIG_PKG_USING_SYSWATCH is not set
# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set
# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set
# CONFIG_PKG_USING_PLCCORE is not set
# CONFIG_PKG_USING_PLCCORE is not set
# CONFIG_PKG_USING_RAMDISK is not set
# CONFIG_PKG_USING_MININI is not set
#
#
# peripheral libraries and drivers
# peripheral libraries and drivers
...
@@ -353,8 +345,6 @@ CONFIG_RT_USING_LIBC=y
...
@@ -353,8 +345,6 @@ CONFIG_RT_USING_LIBC=y
# CONFIG_PKG_USING_LITTLED is not set
# CONFIG_PKG_USING_LITTLED is not set
# CONFIG_PKG_USING_LKDGUI is not set
# CONFIG_PKG_USING_LKDGUI is not set
# CONFIG_PKG_USING_NRF5X_SDK is not set
# CONFIG_PKG_USING_NRF5X_SDK is not set
# CONFIG_PKG_USING_NRF5X_SDK_V1300 is not set
# CONFIG_PKG_USING_NRF5X_SDK_LATEST_VERSION is not set
CONFIG_PKG_USING_NRFX
=
y
CONFIG_PKG_USING_NRFX
=
y
CONFIG_PKG_NRFX_PATH
=
"/packages/peripherals/nrfx"
CONFIG_PKG_NRFX_PATH
=
"/packages/peripherals/nrfx"
CONFIG_PKG_USING_NRFX_V210
=
y
CONFIG_PKG_USING_NRFX_V210
=
y
...
@@ -384,10 +374,6 @@ CONFIG_PKG_NRFX_VER="v2.1.0"
...
@@ -384,10 +374,6 @@ CONFIG_PKG_NRFX_VER="v2.1.0"
# CONFIG_PKG_USING_BEEP is not set
# CONFIG_PKG_USING_BEEP is not set
# CONFIG_PKG_USING_EASYBLINK is not set
# CONFIG_PKG_USING_EASYBLINK is not set
# CONFIG_PKG_USING_PMS_SERIES is not set
# CONFIG_PKG_USING_PMS_SERIES is not set
# CONFIG_PKG_USING_CAN_YMODEM is not set
# CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set
# CONFIG_PKG_USING_QLED is not set
# CONFIG_PKG_USING_PAJ7620 is not set
#
#
# miscellaneous packages
# miscellaneous packages
...
@@ -429,6 +415,10 @@ CONFIG_PKG_NRFX_VER="v2.1.0"
...
@@ -429,6 +415,10 @@ CONFIG_PKG_NRFX_VER="v2.1.0"
# Hardware Drivers Config
# Hardware Drivers Config
#
#
CONFIG_SOC_NRF52840
=
y
CONFIG_SOC_NRF52840
=
y
CONFIG_NRFX_CLOCK_ENABLED
=
1
CONFIG_NRFX_CLOCK_DEFAULT_CONFIG_IRQ_PRIORITY
=
7
CONFIG_NRFX_CLOCK_CONFIG_LF_SRC
=
1
CONFIG_SOC_NORDIC
=
y
#
#
# Onboard Peripheral Drivers
# Onboard Peripheral Drivers
...
@@ -440,12 +430,17 @@ CONFIG_SOC_NRF52840=y
...
@@ -440,12 +430,17 @@ CONFIG_SOC_NRF52840=y
# On-chip Peripheral Drivers
# On-chip Peripheral Drivers
#
#
CONFIG_BSP_USING_GPIO
=
y
CONFIG_BSP_USING_GPIO
=
y
# CONFIG_BSP_USING_SOFTDEVICE is not set
CONFIG_NRFX_GPIOTE_ENABLED
=
1
# CONFIG_BSP_USING_SAADC is not set
# CONFIG_BSP_USING_PWM is not set
CONFIG_BSP_USING_UART
=
y
CONFIG_BSP_USING_UART
=
y
CONFIG_NRFX_USING_UART
=
y
# CONFIG_NRFX_USING_UARTE is not set
CONFIG_NRFX_UART_ENABLED
=
1
CONFIG_BSP_USING_UART0
=
y
CONFIG_BSP_USING_UART0
=
y
CONFIG_NRFX_UART0_ENABLED
=
1
CONFIG_BSP_UART0_RX_PIN
=
8
CONFIG_BSP_UART0_RX_PIN
=
8
CONFIG_BSP_UART0_TX_PIN
=
6
CONFIG_BSP_UART0_TX_PIN
=
6
# CONFIG_BSP_USING_UART1 is not set
# CONFIG_BSP_USING_SPI is not set
# CONFIG_BSP_USING_SPI is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
# CONFIG_BSP_USING_ON_CHIP_FLASH is not set
...
@@ -457,3 +452,8 @@ CONFIG_MCU_FLASH_SIZE_KB=1024
...
@@ -457,3 +452,8 @@ CONFIG_MCU_FLASH_SIZE_KB=1024
CONFIG_MCU_SRAM_START_ADDRESS
=
0
x20000000
CONFIG_MCU_SRAM_START_ADDRESS
=
0
x20000000
CONFIG_MCU_SRAM_SIZE_KB
=
256
CONFIG_MCU_SRAM_SIZE_KB
=
256
CONFIG_MCU_FLASH_PAGE_SIZE
=
0
x1000
CONFIG_MCU_FLASH_PAGE_SIZE
=
0
x1000
# CONFIG_BSP_USING_WDT is not set
# CONFIG_BSP_USING_ONCHIP_RTC is not set
CONFIG_BLE_STACK_USING_NULL
=
y
# CONFIG_BSP_USING_SOFTDEVICE is not set
# CONFIG_BSP_USING_NIMBLE is not set
bsp/nrf5x/nrf52840/board/Kconfig
浏览文件 @
b437478e
...
@@ -194,12 +194,24 @@ menu "On-chip Peripheral Drivers"
...
@@ -194,12 +194,24 @@ menu "On-chip Peripheral Drivers"
endif
endif
menu
config BSP_USING_UART
config BSP_USING_UART
bool "Enable UART"
bool "Enable UART"
default y
default y
select RT_USING_SERIAL
select RT_USING_SERIAL
if BSP_USING_UART
if BSP_USING_UART
choice
prompt "UART or UARTE"
default NRFX_USING_UART
help
Select the UART or UARTE
config NRFX_USING_UART
bool "UART"
config NRFX_USING_UARTE
bool "UARTE"
endchoice
endif
if BSP_USING_UART&&NRFX_USING_UART
config NRFX_UART_ENABLED
config NRFX_UART_ENABLED
int
int
default 1
default 1
...
@@ -220,9 +232,44 @@ menu "On-chip Peripheral Drivers"
...
@@ -220,9 +232,44 @@ menu "On-chip Peripheral Drivers"
range 0 31
range 0 31
default 6
default 6
endif
endif
endif
if BSP_USING_UART&&NRFX_USING_UARTE
config NRFX_UARTE_ENABLED
int
default 1
config BSP_USING_UART0
bool "Enable UARTE0"
default n
if BSP_USING_UART0
config NRFX_UARTE0_ENABLED
int
default 1
config BSP_UART0_RX_PIN
int "uarte0 rx pin number"
range 0 31
default 8
config BSP_UART0_TX_PIN
int "uarte0 tx pin number"
range 0 31
default 6
endif
config BSP_USING_UART1
config BSP_USING_UART1
bool "Enable UART1"
bool "Enable UARTE1"
default n
default n
if BSP_USING_UART1
config NRFX_UARTE1_ENABLED
int
default 1
config BSP_UART1_RX_PIN
int "uarte1 rx pin number"
range 0 31
default 7
config BSP_UART1_TX_PIN
int "uarte1 tx pin number"
range 0 31
default 5
endif
endif
endif
config BSP_USING_SPI
config BSP_USING_SPI
...
...
bsp/nrf5x/nrf52840/rtconfig.h
浏览文件 @
b437478e
...
@@ -152,6 +152,10 @@
...
@@ -152,6 +152,10 @@
/* Hardware Drivers Config */
/* Hardware Drivers Config */
#define SOC_NRF52840
#define SOC_NRF52840
#define NRFX_CLOCK_ENABLED 1
#define NRFX_CLOCK_DEFAULT_CONFIG_IRQ_PRIORITY 7
#define NRFX_CLOCK_CONFIG_LF_SRC 1
#define SOC_NORDIC
/* Onboard Peripheral Drivers */
/* Onboard Peripheral Drivers */
...
@@ -159,8 +163,12 @@
...
@@ -159,8 +163,12 @@
/* On-chip Peripheral Drivers */
/* On-chip Peripheral Drivers */
#define BSP_USING_GPIO
#define BSP_USING_GPIO
#define NRFX_GPIOTE_ENABLED 1
#define BSP_USING_UART
#define BSP_USING_UART
#define NRFX_USING_UART
#define NRFX_UART_ENABLED 1
#define BSP_USING_UART0
#define BSP_USING_UART0
#define NRFX_UART0_ENABLED 1
#define BSP_UART0_RX_PIN 8
#define BSP_UART0_RX_PIN 8
#define BSP_UART0_TX_PIN 6
#define BSP_UART0_TX_PIN 6
...
@@ -171,5 +179,6 @@
...
@@ -171,5 +179,6 @@
#define MCU_SRAM_START_ADDRESS 0x20000000
#define MCU_SRAM_START_ADDRESS 0x20000000
#define MCU_SRAM_SIZE_KB 256
#define MCU_SRAM_SIZE_KB 256
#define MCU_FLASH_PAGE_SIZE 0x1000
#define MCU_FLASH_PAGE_SIZE 0x1000
#define BLE_STACK_USING_NULL
#endif
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录