arch/arm/src/samv7/sam_lowputc.c: Fix undefined variable when using USART1 for other purposes than UART (e.g. SPI).

This commit is contained in:
Frank Benkert 2018-01-26 07:52:18 -06:00 committed by Gregory Nutt
parent 2bc4967c0f
commit e15fc0b65a
2 changed files with 9 additions and 22 deletions

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/samv7/sam-config.h
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Copyright (C) 2015, 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -144,7 +144,11 @@
# undef CONFIG_SAMV7_USART2
#endif
/* Are any USARTs enabled? */
/* Are any USARTs enabled?
*
* REVISIT: Setting HAVE_UART_DEVICE only makes sense of the USART is being
* used as a UART.
*/
#if defined(CONFIG_SAMV7_USART0) || defined(CONFIG_SAMV7_USART1) || \
defined(CONFIG_SAMV7_USART2)

View File

@ -172,26 +172,6 @@
#endif /* HAVE_SERIAL_CONSOLE */
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
/****************************************************************************
* Public Data
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
@ -277,6 +257,9 @@ void sam_lowsetup(void)
uint64_t divb3;
uint32_t intpart;
uint32_t fracpart;
#endif
#if (defined(HAVE_SERIAL_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG)) || \
defined(CONFIG_SAMV7_USART1)
uint32_t regval;
#endif