diff --git a/csrc/u8x8_d_s1d15721.c b/csrc/u8x8_d_s1d15721.c index 4ba87521..c75f604a 100644 --- a/csrc/u8x8_d_s1d15721.c +++ b/csrc/u8x8_d_s1d15721.c @@ -87,6 +87,10 @@ uint8_t u8x8_d_s1d15721_common(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void u8x8_cad_SendCmd(u8x8, 0x13); /* col */ u8x8_cad_SendArg(u8x8, x); + /* 4 Mar 2022: added the missing page address, issue 1802 */ + u8x8_cad_SendCmd(u8x8, 0xb1); /* page address */ + u8x8_cad_SendArg(u8x8, y); + u8x8_cad_SendCmd(u8x8, 0x1D ); //Data Write c = ((u8x8_tile_t *)arg_ptr)->cnt; diff --git a/csrc/u8x8_d_ssd1320.c b/csrc/u8x8_d_ssd1320.c index 0e99f618..0ab91a84 100644 --- a/csrc/u8x8_d_ssd1320.c +++ b/csrc/u8x8_d_ssd1320.c @@ -336,6 +336,8 @@ static const u8x8_display_info_t u8x8_d_ssd1320_cs1_160x132_display_info = /* the following sequence will work, but requires contrast to be very high */ +/* added #ifdef to avoid compiler warning, issue 1802 */ +#ifdef NOT_USED static const uint8_t u8x8_d_ssd1320_cs1_160x132_init_seq[] = { U8X8_DLY(1), @@ -372,6 +374,7 @@ static const uint8_t u8x8_d_ssd1320_cs1_160x132_init_seq[] = { U8X8_END_TRANSFER(), /* disable chip */ U8X8_END() /* end of sequence */ }; +#endif /* OLED_WR_Byte(0xae,OLED_CMD);//Display OFF diff --git a/csrc/u8x8_d_st75160.c b/csrc/u8x8_d_st75160.c index 241677f2..59731f4f 100644 --- a/csrc/u8x8_d_st75160.c +++ b/csrc/u8x8_d_st75160.c @@ -84,6 +84,8 @@ static const uint8_t u8x8_d_st75256_256x128_powersave1_seq[] = { U8X8_END() /* end of sequence */ }; +/* marked as unused to avoid compiler warning, issue 1802 */ +#ifdef NOT_USED static const uint8_t u8x8_d_st75256_jlx256128_flip0_seq[] = { U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */ U8X8_C( 0x030 ), /* select 00 commands */ @@ -107,6 +109,7 @@ static const uint8_t u8x8_d_st75256_jlx256128_flip1_seq[] = { U8X8_END_TRANSFER(), /* disable chip */ U8X8_END() /* end of sequence */ }; +#endif static const uint8_t u8x8_d_st75256_jlx172104_flip0_seq[] = { U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */ @@ -132,6 +135,8 @@ static const uint8_t u8x8_d_st75256_jlx172104_flip1_seq[] = { U8X8_END() /* end of sequence */ }; +/* marked as unused to avoid compiler warning, issue 1802 */ +#ifdef NOT_USED static const uint8_t u8x8_d_st75256_jlx256160_flip0_seq[] = { U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */ U8X8_C( 0x030 ), /* select 00 commands */ @@ -155,7 +160,7 @@ static const uint8_t u8x8_d_st75256_jlx256160_flip1_seq[] = { U8X8_END_TRANSFER(), /* disable chip */ U8X8_END() /* end of sequence */ }; - +#endif /*=============================================*/ diff --git a/sys/bitmap/common/u8x8_d_bitmap.c b/sys/bitmap/common/u8x8_d_bitmap.c index a6941500..5fad80d5 100644 --- a/sys/bitmap/common/u8x8_d_bitmap.c +++ b/sys/bitmap/common/u8x8_d_bitmap.c @@ -174,7 +174,7 @@ static u8x8_display_info_t u8x8_bitmap_info = /* allocate bitmap */ /* will be called by u8x8_SetupBitmap or u8g2_SetupBitmap */ -static uint8_t u8x8_SetBitmapDeviceSize(u8x8_t *u8x8, uint16_t pixel_width, uint16_t pixel_height) +static uint8_t u8x8_SetBitmapDeviceSize(U8X8_UNUSED u8x8_t *u8x8, uint16_t pixel_width, uint16_t pixel_height) { /* update the global bitmap object, allocate the bitmap */ if ( u8x8_bitmap_SetSize(&u8x8_bitmap, pixel_width, pixel_height) == 0 ) @@ -189,17 +189,17 @@ static uint8_t u8x8_SetBitmapDeviceSize(u8x8_t *u8x8, uint16_t pixel_width, uint } /* draw tiles to the bitmap, called by the device procedure */ -static void u8x8_DrawBitmapTiles(u8x8_t *u8x8, uint16_t tx, uint16_t ty, uint8_t tile_cnt, uint8_t *tile_ptr) +static void u8x8_DrawBitmapTiles(U8X8_UNUSED u8x8_t *u8x8, uint16_t tx, uint16_t ty, uint8_t tile_cnt, uint8_t *tile_ptr) { u8x8_bitmap_DrawTiles(&u8x8_bitmap, tx, ty, tile_cnt, tile_ptr); } -uint8_t u8x8_GetBitmapPixel(u8x8_t *u8x8, uint16_t x, uint16_t y) +uint8_t u8x8_GetBitmapPixel(U8X8_UNUSED u8x8_t *u8x8, uint16_t x, uint16_t y) { return u8x8_bitmap_GetPixel(&u8x8_bitmap, x, y); } -void u8x8_SaveBitmapTGA(u8x8_t *u8x8, const char *filename) +void u8x8_SaveBitmapTGA(U8X8_UNUSED u8x8_t *u8x8, const char *filename) { u8x8_bitmap_SaveTGA(&u8x8_bitmap, filename); } diff --git a/sys/sdl/common/u8x8_d_sdl_128x64.c b/sys/sdl/common/u8x8_d_sdl_128x64.c index 4b07f7c7..a0ee3388 100644 --- a/sys/sdl/common/u8x8_d_sdl_128x64.c +++ b/sys/sdl/common/u8x8_d_sdl_128x64.c @@ -207,7 +207,7 @@ static const u8x8_display_info_t u8x8_sdl_240x160_info = }; -static uint8_t u8x8_d_sdl_gpio(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr) +static uint8_t u8x8_d_sdl_gpio(u8x8_t *u8x8, uint8_t msg, U8X8_UNUSED uint8_t arg_int, U8X8_UNUSED void *arg_ptr) { static int debounce_cnt = 0; static int curr_msg = 0; diff --git a/sys/sdl/mui_all/Makefile b/sys/sdl/mui_all/Makefile index 5030fe50..d24459b6 100644 --- a/sys/sdl/mui_all/Makefile +++ b/sys/sdl/mui_all/Makefile @@ -1,4 +1,4 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` +CFLAGS = -g -Wall -Wextra -Wuninitialized -Wunused -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) $(shell ls ../../bitmap/common/*.c ) $(shell ls *.c )