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.
This commit is contained in:
parent
a22efc5f11
commit
0f1bd6e4a7
@ -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<l;i++){ST7920_SWSPI_SND_8BIT(*p&0xf0);ST7920_SWSPI_SND_8BIT(*p<<4);p++;}u8g_10MicroDelay();}
|
||||
|
||||
uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg)
|
||||
|
Loading…
Reference in New Issue
Block a user