fix compiler warnings #1802
This commit is contained in:
parent
9636bc994b
commit
595b34d6dc
|
@ -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_SendCmd(u8x8, 0x13); /* col */
|
||||||
u8x8_cad_SendArg(u8x8, x);
|
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
|
u8x8_cad_SendCmd(u8x8, 0x1D ); //Data Write
|
||||||
|
|
||||||
c = ((u8x8_tile_t *)arg_ptr)->cnt;
|
c = ((u8x8_tile_t *)arg_ptr)->cnt;
|
||||||
|
|
|
@ -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 */
|
/* 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[] = {
|
static const uint8_t u8x8_d_ssd1320_cs1_160x132_init_seq[] = {
|
||||||
|
|
||||||
U8X8_DLY(1),
|
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_TRANSFER(), /* disable chip */
|
||||||
U8X8_END() /* end of sequence */
|
U8X8_END() /* end of sequence */
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
OLED_WR_Byte(0xae,OLED_CMD);//Display OFF
|
OLED_WR_Byte(0xae,OLED_CMD);//Display OFF
|
||||||
|
|
|
@ -84,6 +84,8 @@ static const uint8_t u8x8_d_st75256_256x128_powersave1_seq[] = {
|
||||||
U8X8_END() /* end of sequence */
|
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[] = {
|
static const uint8_t u8x8_d_st75256_jlx256128_flip0_seq[] = {
|
||||||
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
|
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
|
||||||
U8X8_C( 0x030 ), /* select 00 commands */
|
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_TRANSFER(), /* disable chip */
|
||||||
U8X8_END() /* end of sequence */
|
U8X8_END() /* end of sequence */
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static const uint8_t u8x8_d_st75256_jlx172104_flip0_seq[] = {
|
static const uint8_t u8x8_d_st75256_jlx172104_flip0_seq[] = {
|
||||||
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
|
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 */
|
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[] = {
|
static const uint8_t u8x8_d_st75256_jlx256160_flip0_seq[] = {
|
||||||
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
|
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
|
||||||
U8X8_C( 0x030 ), /* select 00 commands */
|
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_TRANSFER(), /* disable chip */
|
||||||
U8X8_END() /* end of sequence */
|
U8X8_END() /* end of sequence */
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*=============================================*/
|
/*=============================================*/
|
||||||
|
|
|
@ -174,7 +174,7 @@ static u8x8_display_info_t u8x8_bitmap_info =
|
||||||
|
|
||||||
/* allocate bitmap */
|
/* allocate bitmap */
|
||||||
/* will be called by u8x8_SetupBitmap or u8g2_SetupBitmap */
|
/* 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 */
|
/* update the global bitmap object, allocate the bitmap */
|
||||||
if ( u8x8_bitmap_SetSize(&u8x8_bitmap, pixel_width, pixel_height) == 0 )
|
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 */
|
/* 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);
|
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);
|
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);
|
u8x8_bitmap_SaveTGA(&u8x8_bitmap, filename);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 debounce_cnt = 0;
|
||||||
static int curr_msg = 0;
|
static int curr_msg = 0;
|
||||||
|
|
|
@ -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 )
|
SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) $(shell ls ../../bitmap/common/*.c ) $(shell ls *.c )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue