You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ar...@apache.org on 2022/11/22 03:38:48 UTC

[incubator-nuttx] 02/02: Fix Error: board/stm32_ssd1289.c:310:12: error: converting the result of '<<' to a boolean always evaluates to true

This is an automated email from the ASF dual-hosted git repository.

archer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 12b3a1ae564c2de39f3f41fb2361d865d24725f9
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Nov 21 10:21:40 2022 +0800

    Fix Error: board/stm32_ssd1289.c:310:12: error: converting the result of '<<' to a boolean always evaluates to true
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 boards/arm/stm32/hymini-stm32v/src/stm32_r61505u.c      | 2 +-
 boards/arm/stm32/hymini-stm32v/src/stm32_ssd1289.c      | 2 +-
 boards/arm/stm32/viewtool-stm32f107/src/stm32_ssd1289.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_r61505u.c b/boards/arm/stm32/hymini-stm32v/src/stm32_r61505u.c
index e9d1972f1e..22510fcceb 100644
--- a/boards/arm/stm32/hymini-stm32v/src/stm32_r61505u.c
+++ b/boards/arm/stm32/hymini-stm32v/src/stm32_r61505u.c
@@ -809,7 +809,7 @@ static void lcd_backlight(void)
 
   /* Select the output polarity level == HIGH */
 
-  ccer &= !ATIM_CCER_CC2P;
+  ccer &= ~ATIM_CCER_CC2P;
 
   /* Enable channel 2 */
 
diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_ssd1289.c b/boards/arm/stm32/hymini-stm32v/src/stm32_ssd1289.c
index 788a81c3b8..ba82a96f4e 100644
--- a/boards/arm/stm32/hymini-stm32v/src/stm32_ssd1289.c
+++ b/boards/arm/stm32/hymini-stm32v/src/stm32_ssd1289.c
@@ -307,7 +307,7 @@ static void init_lcd_backlight(void)
 
   /* Select the output polarity level == HIGH */
 
-  ccer &= !ATIM_CCER_CC2P;
+  ccer &= ~ATIM_CCER_CC2P;
 
   /* Enable channel 2 */
 
diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_ssd1289.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_ssd1289.c
index 88be606edc..0e9d3cddb6 100644
--- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_ssd1289.c
+++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_ssd1289.c
@@ -375,7 +375,7 @@ static void init_lcd_backlight(void)
 
   /* Select the output polarity level == HIGH */
 
-  ccer &= !ATIM_CCER_CC2P;
+  ccer &= ~ATIM_CCER_CC2P;
 
   /* Enable channel 2 */