Browse Source

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.
AnHardt 9 years ago
parent
commit
0f1bd6e4a7
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/ultralcd_st7920_u8glib_rrd.h

+ 1
- 1
Marlin/ultralcd_st7920_u8glib_rrd.h View File

@@ -43,7 +43,7 @@ static void ST7920_SWSPI_SND_8BIT(uint8_t val)
43 43
 #define ST7920_NCS()             {WRITE(ST7920_CS_PIN,0);}
44 44
 #define ST7920_SET_CMD()         {ST7920_SWSPI_SND_8BIT(0xf8);u8g_10MicroDelay();}
45 45
 #define ST7920_SET_DAT()         {ST7920_SWSPI_SND_8BIT(0xfa);u8g_10MicroDelay();}
46
-#define ST7920_WRITE_BYTE(a)     {ST7920_SWSPI_SND_8BIT((a)&0xf0);ST7920_SWSPI_SND_8BIT((a)<<4);u8g_10MicroDelay();}
46
+#define ST7920_WRITE_BYTE(a)     {ST7920_SWSPI_SND_8BIT((uint8_t)((a)&0xf0u));ST7920_SWSPI_SND_8BIT((uint8_t)((a)<<4u));u8g_10MicroDelay();}
47 47
 #define ST7920_WRITE_BYTES(p,l)  {uint8_t i;for(i=0;i<l;i++){ST7920_SWSPI_SND_8BIT(*p&0xf0);ST7920_SWSPI_SND_8BIT(*p<<4);p++;}u8g_10MicroDelay();}
48 48
 
49 49
 uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg)

Loading…
Cancel
Save