From 8aeeb1d8d37388c99e1fada6835022d33ca5b153 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 3 Dec 2018 14:49:49 -0600 Subject: [PATCH] arch/arm/src/stm32/stm32_adc.c: Eliminate a new warning found in build testing --- TODO | 11 ++++++++++- arch/arm/src/stm32/stm32_adc.c | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index d573cea02d..f2ebb391d1 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -NuttX TODO List (Last updated November 29, 2018) +NuttX TODO List (Last updated December 3, 2018) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This file summarizes known NuttX bugs, limitations, inconsistencies with @@ -1493,6 +1493,15 @@ o Network (net/, drivers/net) immediately (unless the SO_LINGER option is selected). As a result, the socket does not send the FIN and this looks like an unexpected, abnormal loss of connection to the remote peer. + + Actually, it is worse than this: The is NO logic to send + FIN in when the file is close. This is pretty easy to do, + however: + + - Wait for a TCP poll, then + - Call tcp_append with TCP_CLOSE in the flags. There is + already logic in tcp_appsend to send the FIN in this case, + it is just not being use. Status: Open Priority: Medium-Low. diff --git a/arch/arm/src/stm32/stm32_adc.c b/arch/arm/src/stm32/stm32_adc.c index 1c3ccff3ff..9d4a985c42 100644 --- a/arch/arm/src/stm32/stm32_adc.c +++ b/arch/arm/src/stm32/stm32_adc.c @@ -2527,8 +2527,6 @@ static void adc_voltreg_cfg(FAR struct stm32_dev_s *priv) static void adc_sampletime_cfg(FAR struct adc_dev_s *dev) { - FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; - /* Initialize the same sample time for each ADC. * During sample cycles channel selection bits must remain unchanged. */ @@ -2536,6 +2534,8 @@ static void adc_sampletime_cfg(FAR struct adc_dev_s *dev) #ifdef CONFIG_STM32_ADC_CHANGE_SAMPLETIME adc_sampletime_write((FAR struct stm32_adc_dev_s *)dev); #else + FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; + adc_putreg(priv, STM32_ADC_SMPR1_OFFSET, ADC_SMPR1_DEFAULT); adc_putreg(priv, STM32_ADC_SMPR2_OFFSET, ADC_SMPR2_DEFAULT); # ifdef STM32_ADC_SMPR3_OFFSET