From 0f1bd6e4a7036bacfd62fb82cb55e42c9dec17d0 Mon Sep 17 00:00:00 2001 From: AnHardt Date: Mon, 30 Mar 2015 01:40:58 +0200 Subject: [PATCH] In ST7920_SWSPI_SND_8BIT(uint8_t val) parameter is unsigned therefor in macro ST7920_WRITE_BYTE(a) cast a to uint8_t to make the compiler happy. --- Marlin/ultralcd_st7920_u8glib_rrd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/ultralcd_st7920_u8glib_rrd.h b/Marlin/ultralcd_st7920_u8glib_rrd.h index 6b6c005ad..fbf010982 100644 --- a/Marlin/ultralcd_st7920_u8glib_rrd.h +++ b/Marlin/ultralcd_st7920_u8glib_rrd.h @@ -43,7 +43,7 @@ static void ST7920_SWSPI_SND_8BIT(uint8_t val) #define ST7920_NCS() {WRITE(ST7920_CS_PIN,0);} #define ST7920_SET_CMD() {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();} #define ST7920_SET_DAT() {ST7920_SWSPI_SND_8BIT(0xfa);u8g_10MicroDelay();} -#define ST7920_WRITE_BYTE(a) {ST7920_SWSPI_SND_8BIT((a)&0xf0);ST7920_SWSPI_SND_8BIT((a)<<4);u8g_10MicroDelay();} +#define ST7920_WRITE_BYTE(a) {ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xf0u));ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4u));u8g_10MicroDelay();} #define ST7920_WRITE_BYTES(p,l) {uint8_t i;for(i=0;i