This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 1fa0aac nrf52: support configuring no console/serial
1fa0aac is described below
commit 1fa0aac36b7378751dc2ffdb5f3b49327debfc37
Author: Matias N <[email protected]>
AuthorDate: Fri Oct 30 18:20:04 2020 -0300
nrf52: support configuring no console/serial
---
arch/arm/src/nrf52/nrf52_lowputc.c | 8 ++++++++
arch/arm/src/nrf52/nrf52_lowputc.h | 2 ++
2 files changed, 10 insertions(+)
diff --git a/arch/arm/src/nrf52/nrf52_lowputc.c
b/arch/arm/src/nrf52/nrf52_lowputc.c
index 06ea3b9..6d64add 100644
--- a/arch/arm/src/nrf52/nrf52_lowputc.c
+++ b/arch/arm/src/nrf52/nrf52_lowputc.c
@@ -113,6 +113,7 @@ static const struct uart_config_s g_console_config =
*
****************************************************************************/
+#ifdef HAVE_UART_DEVICE
static void nrf52_setbaud(uintptr_t base, const struct uart_config_s *config)
{
uint32_t br = 0;
@@ -234,11 +235,13 @@ static void nrf52_setbaud(uintptr_t base, const struct
uart_config_s *config)
putreg32(br, base + NRF52_UART_BAUDRATE_OFFSET);
}
+#endif
/****************************************************************************
* Name: nrf52_setparity
****************************************************************************/
+#ifdef HAVE_UART_DEVICE
static void nrf52_setparity(uintptr_t base,
const struct uart_config_s *config)
{
@@ -261,6 +264,7 @@ static void nrf52_setparity(uintptr_t base,
putreg32(regval, base + NRF52_UART_CONFIG_OFFSET);
}
+#endif
/****************************************************************************
* Name: nrf52_setstops
@@ -291,11 +295,13 @@ static void nrf52_setstops(uintptr_t base,
* Name: nrf52_sethwflow
****************************************************************************/
+#ifdef HAVE_UART_DEVICE
static void nrf52_sethwflow(uintptr_t base,
const struct uart_config_s *config)
{
/* TODO */
}
+#endif
/****************************************************************************
* Public Functions
@@ -442,6 +448,7 @@ void arm_lowputc(char ch)
*
****************************************************************************/
+#ifdef HAVE_UART_DEVICE
void nrf52_usart_setformat(uintptr_t base,
FAR const struct uart_config_s *config)
{
@@ -463,3 +470,4 @@ void nrf52_usart_setformat(uintptr_t base,
nrf52_sethwflow(base, config);
}
+#endif
diff --git a/arch/arm/src/nrf52/nrf52_lowputc.h
b/arch/arm/src/nrf52/nrf52_lowputc.h
index b708846..1977ca9 100644
--- a/arch/arm/src/nrf52/nrf52_lowputc.h
+++ b/arch/arm/src/nrf52/nrf52_lowputc.h
@@ -123,7 +123,9 @@ void nrf52_usart_disable(uintptr_t base,
*
****************************************************************************/
+#ifdef HAVE_UART_DEVICE
void nrf52_usart_setformat(uintptr_t base,
FAR const struct uart_config_s *config);
+#endif
#endif /* __ARCH_ARM_SRC_NRF52_NRF52_LOWPUTC_H */