staging: fbtft: fix coding style issues
Subsystems (2)
cover staging: fbtft: fix coding style issues
This patchset is concerned with fixing coding style issues in the staging driver fbtft. In general, the driver's code needs lots of work to make it compliant with the Linux kernel coding style.
Aya Mahfouz (8):
staging: fbtft: fix space prohibited before that ','
staging: fbtft: fix code indent should use tabs where possible
staging: fbtft: fix braces {} are not necessary for single statement
blocks
staging: fbtft: fix space prohibited before that ','
staging: fbtft: fix braces {} are not necessary for single statement
blocks
staging: fbtft: fix space required after that ','
staging: fbtft: fix space prohibited before that ','
staging: fbtft: fix spacing errors
drivers/staging/fbtft/fb_ili9340.c | 10 +-- drivers/staging/fbtft/fb_ili9486.c | 6 +- drivers/staging/fbtft/fb_pcd8544.c | 3 +- drivers/staging/fbtft/fb_ra8875.c | 150 +++++++++++++++++------------------ drivers/staging/fbtft/fb_ssd1331.c | 6 +- drivers/staging/fbtft/fb_st7735r.c | 8 +- drivers/staging/fbtft/fbtft-core.c | 2 +- drivers/staging/fbtft/fbtft_device.c | 88 ++++++++++++-------- 8 files changed, 148 insertions(+), 125 deletions(-)
Signature · 1 line
1.9.3
PATCH 1/8 staging: fbtft: fix space prohibited before that ','
This patch fixes the following checkpatch.pl error:
space prohibited before that ','
--- drivers/staging/fbtft/fb_ili9340.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/fbtft/fb_ili9340.c +5 -5
@@ -39,12 +39,12 @@ static int init_display(struct fbtft_par *par) par->fbtftops.reset (par);write_reg (par,0xEF ,0x03 ,0x80 ,0x02 ); -write_reg (par,0xCF ,0x00 ,0XC1 ,0X30 ); -write_reg (par,0xED ,0x64 ,0x03 ,0X12 ,0X81 ); -write_reg (par,0xE8 ,0x85 ,0x00 ,0x78 ); -write_reg (par,0xCB ,0x39 ,0x2C ,0x00 ,0x34 ,0x02 ); +write_reg (par,0xCF ,0x00 ,0XC1 ,0X30 ); +write_reg (par,0xED ,0x64 ,0x03 ,0X12 ,0X81 ); +write_reg (par,0xE8 ,0x85 ,0x00 ,0x78 ); +write_reg (par,0xCB ,0x39 ,0x2C ,0x00 ,0x34 ,0x02 );write_reg (par,0xF7 ,0x20 ); -write_reg (par,0xEA ,0x00 ,0x00 ); +write_reg (par,0xEA ,0x00 ,0x00 );/* Power Control 1 */ write_reg (par,0xC0 ,0x23 );
Signature · 1 line
1.9.3
PATCH 2/8 staging: fbtft: fix code indent should use tabs where possible
In reply to Aya MahfouzThis patch fixes the following checkpatch.pl error:
code indent should use tabs where possible
--- drivers/staging/fbtft/fb_ili9486.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fb_ili9486.c +3 -3
@@ -44,13 +44,13 @@ static int default_init_sequence[] = {-1 ,0xC5 ,0x00 ,0x00 ,0x00 ,0x00 ,/* PGAMCTRL(Positive Gamma Control) */ -1 ,0xE0 ,0x0F ,0x1F ,0x1C ,0x0C ,0x0F ,0x08 ,0x48 ,0x98 , -0x37 ,0x0A ,0x13 ,0x04 ,0x11 ,0x0D ,0x00 , +0x37 ,0x0A ,0x13 ,0x04 ,0x11 ,0x0D ,0x00 ,/* NGAMCTRL(Negative Gamma Control) */ -1 ,0xE1 ,0x0F ,0x32 ,0x2E ,0x0B ,0x0D ,0x05 ,0x47 ,0x75 , -0x37 ,0x06 ,0x10 ,0x03 ,0x24 ,0x20 ,0x00 , +0x37 ,0x06 ,0x10 ,0x03 ,0x24 ,0x20 ,0x00 ,/* Digital Gamma Control 1 */ -1 ,0xE2 ,0x0F ,0x32 ,0x2E ,0x0B ,0x0D ,0x05 ,0x47 ,0x75 , -0x37 ,0x06 ,0x10 ,0x03 ,0x24 ,0x20 ,0x00 , +0x37 ,0x06 ,0x10 ,0x03 ,0x24 ,0x20 ,0x00 ,/* Sleep OUT */ -1 ,0x11 , /* Display ON */
Signature · 1 line
1.9.3
PATCH 3/8 staging: fbtft: fix braces {} are not necessary for single statement blocks
In reply to Aya MahfouzThis patch fixes the following checkpatch.pl error:
braces {} are not necessary for single statement blocks
--- drivers/staging/fbtft/fb_pcd8544.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/fbtft/fb_pcd8544.c +1 -2
@@ -120,9 +120,8 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)for (x =0 ; x <84 ; x++) {for (y =0 ; y <6 ; y++) { *buf =0x00 ; -for (i =0 ; i <8 ; i++) { +for (i =0 ; i <8 ; i++) *buf |= (vmem16[(y*8 +i)*84 +x] ?1 :0 ) << i; - } buf++; } }
Signature · 1 line
1.9.3
PATCH 4/8 staging: fbtft: fix space prohibited before that ','
In reply to Aya MahfouzThis patch fixes the following checkpatch.pl error:
space prohibited before that ','
--- drivers/staging/fbtft/fb_ra8875.c | 150 +++++++++++++++++++------------------- 1 file changed, 75 insertions(+), 75 deletions(-)
drivers/staging/fbtft/fb_ra8875.c +75 -75
@@ -79,112 +79,112 @@ static int init_display(struct fbtft_par *par)if ((par->info->var.xres ==320 ) && (par->info->var.yres ==240 )) {/* PLL clock frequency */ -write_reg (par,0x88 ,0x0A ); -write_reg (par,0x89 ,0x02 ); +write_reg (par,0x88 ,0x0A ); +write_reg (par,0x89 ,0x02 );mdelay (10 );/* color deep / MCU Interface */ -write_reg (par,0x10 ,0x0C ); +write_reg (par,0x10 ,0x0C );/* pixel clock period */ -write_reg (par,0x04 ,0x03 ); +write_reg (par,0x04 ,0x03 );mdelay (1 );/* horizontal settings */ -write_reg (par,0x14 ,0x27 ); -write_reg (par,0x15 ,0x00 ); -write_reg (par,0x16 ,0x05 ); -write_reg (par,0x17 ,0x04 ); -write_reg (par,0x18 ,0x03 ); +write_reg (par,0x14 ,0x27 ); +write_reg (par,0x15 ,0x00 ); +write_reg (par,0x16 ,0x05 ); +write_reg (par,0x17 ,0x04 ); +write_reg (par,0x18 ,0x03 );/* vertical settings */ -write_reg (par,0x19 ,0xEF ); -write_reg (par,0x1A ,0x00 ); -write_reg (par,0x1B ,0x05 ); -write_reg (par,0x1C ,0x00 ); -write_reg (par,0x1D ,0x0E ); -write_reg (par,0x1E ,0x00 ); -write_reg (par,0x1F ,0x02 ); +write_reg (par,0x19 ,0xEF ); +write_reg (par,0x1A ,0x00 ); +write_reg (par,0x1B ,0x05 ); +write_reg (par,0x1C ,0x00 ); +write_reg (par,0x1D ,0x0E ); +write_reg (par,0x1E ,0x00 ); +write_reg (par,0x1F ,0x02 ); }else if ((par->info->var.xres ==480 ) && (par->info->var.yres ==272 )) {/* PLL clock frequency */ -write_reg (par,0x88 ,0x0A ); -write_reg (par,0x89 ,0x02 ); +write_reg (par,0x88 ,0x0A ); +write_reg (par,0x89 ,0x02 );mdelay (10 );/* color deep / MCU Interface */ -write_reg (par,0x10 ,0x0C ); +write_reg (par,0x10 ,0x0C );/* pixel clock period */ -write_reg (par,0x04 ,0x82 ); +write_reg (par,0x04 ,0x82 );mdelay (1 );/* horizontal settings */ -write_reg (par,0x14 ,0x3B ); -write_reg (par,0x15 ,0x00 ); -write_reg (par,0x16 ,0x01 ); -write_reg (par,0x17 ,0x00 ); -write_reg (par,0x18 ,0x05 ); +write_reg (par,0x14 ,0x3B ); +write_reg (par,0x15 ,0x00 ); +write_reg (par,0x16 ,0x01 ); +write_reg (par,0x17 ,0x00 ); +write_reg (par,0x18 ,0x05 );/* vertical settings */ -write_reg (par,0x19 ,0x0F ); -write_reg (par,0x1A ,0x01 ); -write_reg (par,0x1B ,0x02 ); -write_reg (par,0x1C ,0x00 ); -write_reg (par,0x1D ,0x07 ); -write_reg (par,0x1E ,0x00 ); -write_reg (par,0x1F ,0x09 ); +write_reg (par,0x19 ,0x0F ); +write_reg (par,0x1A ,0x01 ); +write_reg (par,0x1B ,0x02 ); +write_reg (par,0x1C ,0x00 ); +write_reg (par,0x1D ,0x07 ); +write_reg (par,0x1E ,0x00 ); +write_reg (par,0x1F ,0x09 ); }else if ((par->info->var.xres ==640 ) && (par->info->var.yres ==480 )) {/* PLL clock frequency */ -write_reg (par,0x88 ,0x0B ); -write_reg (par,0x89 ,0x02 ); +write_reg (par,0x88 ,0x0B ); +write_reg (par,0x89 ,0x02 );mdelay (10 );/* color deep / MCU Interface */ -write_reg (par,0x10 ,0x0C ); +write_reg (par,0x10 ,0x0C );/* pixel clock period */ -write_reg (par,0x04 ,0x01 ); +write_reg (par,0x04 ,0x01 );mdelay (1 );/* horizontal settings */ -write_reg (par,0x14 ,0x4F ); -write_reg (par,0x15 ,0x05 ); -write_reg (par,0x16 ,0x0F ); -write_reg (par,0x17 ,0x01 ); -write_reg (par,0x18 ,0x00 ); +write_reg (par,0x14 ,0x4F ); +write_reg (par,0x15 ,0x05 ); +write_reg (par,0x16 ,0x0F ); +write_reg (par,0x17 ,0x01 ); +write_reg (par,0x18 ,0x00 );/* vertical settings */ -write_reg (par,0x19 ,0xDF ); -write_reg (par,0x1A ,0x01 ); -write_reg (par,0x1B ,0x0A ); -write_reg (par,0x1C ,0x00 ); -write_reg (par,0x1D ,0x0E ); -write_reg (par,0x1E ,0x00 ); -write_reg (par,0x1F ,0x01 ); +write_reg (par,0x19 ,0xDF ); +write_reg (par,0x1A ,0x01 ); +write_reg (par,0x1B ,0x0A ); +write_reg (par,0x1C ,0x00 ); +write_reg (par,0x1D ,0x0E ); +write_reg (par,0x1E ,0x00 ); +write_reg (par,0x1F ,0x01 ); }else if ((par->info->var.xres ==800 ) && (par->info->var.yres ==480 )) {/* PLL clock frequency */ -write_reg (par,0x88 ,0x0B ); -write_reg (par,0x89 ,0x02 ); +write_reg (par,0x88 ,0x0B ); +write_reg (par,0x89 ,0x02 );mdelay (10 );/* color deep / MCU Interface */ -write_reg (par,0x10 ,0x0C ); +write_reg (par,0x10 ,0x0C );/* pixel clock period */ -write_reg (par,0x04 ,0x81 ); +write_reg (par,0x04 ,0x81 );mdelay (1 );/* horizontal settings */ -write_reg (par,0x14 ,0x63 ); -write_reg (par,0x15 ,0x03 ); -write_reg (par,0x16 ,0x03 ); -write_reg (par,0x17 ,0x02 ); -write_reg (par,0x18 ,0x00 ); +write_reg (par,0x14 ,0x63 ); +write_reg (par,0x15 ,0x03 ); +write_reg (par,0x16 ,0x03 ); +write_reg (par,0x17 ,0x02 ); +write_reg (par,0x18 ,0x00 );/* vertical settings */ -write_reg (par,0x19 ,0xDF ); -write_reg (par,0x1A ,0x01 ); -write_reg (par,0x1B ,0x14 ); -write_reg (par,0x1C ,0x00 ); -write_reg (par,0x1D ,0x06 ); -write_reg (par,0x1E ,0x00 ); -write_reg (par,0x1F ,0x01 ); +write_reg (par,0x19 ,0xDF ); +write_reg (par,0x1A ,0x01 ); +write_reg (par,0x1B ,0x14 ); +write_reg (par,0x1C ,0x00 ); +write_reg (par,0x1D ,0x06 ); +write_reg (par,0x1E ,0x00 ); +write_reg (par,0x1F ,0x01 ); }else {dev_err (par->info->device,"display size is not supported!!" );return -1 ; }/* PWM clock */ -write_reg (par,0x8a ,0x81 ); -write_reg (par,0x8b ,0xFF ); +write_reg (par,0x8a ,0x81 ); +write_reg (par,0x8b ,0xFF );mdelay (10 );/* Display ON */ -write_reg (par,0x01 ,0x80 ); +write_reg (par,0x01 ,0x80 );mdelay (10 );return 0 ;
@@ -196,14 +196,14 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) "%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe, ye);/* Set_Active_Window */ -write_reg (par,0x30 , xs &0x00FF ); -write_reg (par,0x31 , (xs &0xFF00 ) >>8 ); -write_reg (par,0x32 , ys &0x00FF ); -write_reg (par,0x33 , (ys &0xFF00 ) >>8 ); -write_reg (par,0x34 , (xs+xe) &0x00FF ); -write_reg (par,0x35 , ((xs+xe) &0xFF00 ) >>8 ); -write_reg (par,0x36 , (ys+ye) &0x00FF ); -write_reg (par,0x37 , ((ys+ye) &0xFF00 ) >>8 ); +write_reg (par,0x30 , xs &0x00FF ); +write_reg (par,0x31 , (xs &0xFF00 ) >>8 ); +write_reg (par,0x32 , ys &0x00FF ); +write_reg (par,0x33 , (ys &0xFF00 ) >>8 ); +write_reg (par,0x34 , (xs+xe) &0x00FF ); +write_reg (par,0x35 , ((xs+xe) &0xFF00 ) >>8 ); +write_reg (par,0x36 , (ys+ye) &0x00FF ); +write_reg (par,0x37 , ((ys+ye) &0xFF00 ) >>8 );/* Set_Memory_Write_Cursor */ write_reg (par,0x46 , xs &0xff );
Signature · 1 line
1.9.3
PATCH 5/8 staging: fbtft: fix braces {} are not necessary for single statement blocks
In reply to Aya MahfouzThis patch fixes the following checkpatch.pl warning:
braces {} are not necessary for single statement blocks
--- drivers/staging/fbtft/fb_ssd1331.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/fbtft/fb_ssd1331.c +2 -4
@@ -69,9 +69,8 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)if (unlikely (par->debug &DEBUG_WRITE_REGISTER )) {va_start (args, len); -for (i =0 ; i < len; i++) { +for (i =0 ; i < len; i++) buf[i] = (u8)va_arg(args, unsigned int); - }va_end (args);fbtft_par_dbg_hex (DEBUG_WRITE_REGISTER , par, par->info->device, u8, buf, len,"%s: " , __func__); }
@@ -91,9 +90,8 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)if (len) { i = len; -while (i--) { +while (i--) *buf++ = (u8)va_arg(args, unsigned int); - } ret = par->fbtftops.write (par, par->buf, len * (sizeof (u8)));if (ret <0 ) {va_end (args);
Signature · 1 line
1.9.3
PATCH 6/8 staging: fbtft: fix space required after that ','
In reply to Aya MahfouzThis patch fixes the following checkpatch.pl error:
space required after that ','
--- drivers/staging/fbtft/fb_st7735r.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/fbtft/fb_st7735r.c +4 -4
@@ -68,7 +68,7 @@ static int default_init_sequence[] = {/* PWCTR4 - Power Control BCLK/2, Opamp current small & Medium low */ --1 ,0xC3 ,0x8A ,0x2A , +-1 ,0xC3 ,0x8A ,0x2A ,/* PWCTR5 - Power Control */ -1, 0xC4, 0x8A, 0xEE,
@@ -148,21 +148,21 @@ static int set_var(struct fbtft_par *par)#define CURVE (num, idx) curves[num*par->gamma.num_values + idx]static int set_gamma (struct fbtft_par *par,unsigned long *curves) { -int i,j; +int i, j;fbtft_par_dbg (DEBUG_INIT_DISPLAY , par,"%s()\n" , __func__);/* apply mask */ for (i =0 ; i < par->gamma.num_curves; i++)for (j =0 ; j < par->gamma.num_values; j++) -CURVE (i,j) &=0b111111 ; +CURVE (i, j) &=0b111111 ;for (i =0 ; i < par->gamma.num_curves; i++)write_reg (par,0xE0 + i,CURVE (i,0 ),CURVE (i,1 ),CURVE (i,2 ),CURVE (i,3 ),CURVE (i,4 ),CURVE (i,5 ),CURVE (i,6 ),CURVE (i,7 ),CURVE (i,8 ),CURVE (i,9 ),CURVE (i,10 ),CURVE (i,11 ), -CURVE (i,12 ),CURVE (i,13 ),CURVE (i,14 ),CURVE (i,15 )); +CURVE (i,12 ),CURVE (i,13 ),CURVE (i,14 ),CURVE (i,15 ));return 0 ; }
Signature · 1 line
1.9.3
PATCH 7/8 staging: fbtft: fix space prohibited before that ','
In reply to Aya MahfouzThis patch fixes the following checkpatch.pl error:
fix space prohibited before that ','
--- drivers/staging/fbtft/fbtft-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fbtft-core.c +1 -1
@@ -49,7 +49,7 @@ extern int fbtft_gamma_parse_str(struct fbtft_par *par, unsigned long *curves, const char *str, int size);static unsigned long debug; -module_param (debug, ulong ,0 ); +module_param (debug, ulong,0 );MODULE_PARM_DESC (debug,"override device debug level" );static bool dma = true;
Signature · 1 line
1.9.3
PATCH 8/8 staging: fbtft: fix spacing errors
In reply to Aya MahfouzThis patch fixes the following checkpatch.pl errors:
space prohibited before that ','
space required after that ','
spaces required around that '='
Given that the addition of spaces triggered the line over 80 characters warning, some lines were divided into two.
--- drivers/staging/fbtft/fbtft_device.c | 88 +++++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 31 deletions(-)
drivers/staging/fbtft/fbtft_device.c +57 -31
@@ -109,7 +109,7 @@ module_param_array(init, int, &init_num, 0);MODULE_PARM_DESC (init,"Init sequence, used with the custom argument" );static unsigned long debug; -module_param (debug, ulong ,0 ); +module_param (debug, ulong,0 );MODULE_PARM_DESC (debug,"level: 0-7 (the remaining 29 bits is for advanced usage)" );
@@ -136,43 +136,69 @@ static void adafruit18_green_tab_set_addr_win(struct fbtft_par *par,"03 1d 07 06 2E 2C 29 2D 2E 2E 37 3F 00 00 02 10" static int hy28b_init_sequence[] = { --1 ,0x00e7 ,0x0010 ,-1 ,0x0000 ,0x0001 ,-1 ,0x0001 ,0x0100 ,-1 ,0x0002 ,0x0700 , --1 ,0x0003 ,0x1030 ,-1 ,0x0004 ,0x0000 ,-1 ,0x0008 ,0x0207 ,-1 ,0x0009 ,0x0000 , --1 ,0x000a ,0x0000 ,-1 ,0x000c ,0x0001 ,-1 ,0x000d ,0x0000 ,-1 ,0x000f ,0x0000 , --1 ,0x0010 ,0x0000 ,-1 ,0x0011 ,0x0007 ,-1 ,0x0012 ,0x0000 ,-1 ,0x0013 ,0x0000 , --2 ,50 ,-1 ,0x0010 ,0x1590 ,-1 ,0x0011 ,0x0227 ,-2 ,50 ,-1 ,0x0012 ,0x009c ,-2 ,50 , --1 ,0x0013 ,0x1900 ,-1 ,0x0029 ,0x0023 ,-1 ,0x002b ,0x000e ,-2 ,50 , --1 ,0x0020 ,0x0000 ,-1 ,0x0021 ,0x0000 ,-2 ,50 ,-1 ,0x0050 ,0x0000 , --1 ,0x0051 ,0x00ef ,-1 ,0x0052 ,0x0000 ,-1 ,0x0053 ,0x013f ,-1 ,0x0060 ,0xa700 , --1 ,0x0061 ,0x0001 ,-1 ,0x006a ,0x0000 ,-1 ,0x0080 ,0x0000 ,-1 ,0x0081 ,0x0000 , --1 ,0x0082 ,0x0000 ,-1 ,0x0083 ,0x0000 ,-1 ,0x0084 ,0x0000 ,-1 ,0x0085 ,0x0000 , --1 ,0x0090 ,0x0010 ,-1 ,0x0092 ,0x0000 ,-1 ,0x0093 ,0x0003 ,-1 ,0x0095 ,0x0110 , --1 ,0x0097 ,0x0000 ,-1 ,0x0098 ,0x0000 ,-1 ,0x0007 ,0x0133 ,-1 ,0x0020 ,0x0000 , - -1,0x0021,0x0000,-2,100,-3 }; +-1 ,0x00e7 ,0x0010 ,-1 ,0x0000 ,0x0001 , +-1 ,0x0001 ,0x0100 ,-1 ,0x0002 ,0x0700 , +-1 ,0x0003 ,0x1030 ,-1 ,0x0004 ,0x0000 , +-1 ,0x0008 ,0x0207 ,-1 ,0x0009 ,0x0000 , +-1 ,0x000a ,0x0000 ,-1 ,0x000c ,0x0001 , +-1 ,0x000d ,0x0000 ,-1 ,0x000f ,0x0000 , +-1 ,0x0010 ,0x0000 ,-1 ,0x0011 ,0x0007 , +-1 ,0x0012 ,0x0000 ,-1 ,0x0013 ,0x0000 , +-2 ,50 ,-1 ,0x0010 ,0x1590 ,-1 ,0x0011 , +0x0227 ,-2 ,50 ,-1 ,0x0012 ,0x009c ,-2 ,50 , +-1 ,0x0013 ,0x1900 ,-1 ,0x0029 ,0x0023 , +-1 ,0x002b ,0x000e ,-2 ,50 , +-1 ,0x0020 ,0x0000 ,-1 ,0x0021 ,0x0000 , +-2 ,50 ,-1 ,0x0050 ,0x0000 , +-1 ,0x0051 ,0x00ef ,-1 ,0x0052 ,0x0000 , +-1 ,0x0053 ,0x013f ,-1 ,0x0060 ,0xa700 , +-1 ,0x0061 ,0x0001 ,-1 ,0x006a ,0x0000 , +-1 ,0x0080 ,0x0000 ,-1 ,0x0081 ,0x0000 , +-1 ,0x0082 ,0x0000 ,-1 ,0x0083 ,0x0000 , +-1 ,0x0084 ,0x0000 ,-1 ,0x0085 ,0x0000 , +-1 ,0x0090 ,0x0010 ,-1 ,0x0092 ,0x0000 , +-1 ,0x0093 ,0x0003 ,-1 ,0x0095 ,0x0110 , +-1 ,0x0097 ,0x0000 ,-1 ,0x0098 ,0x0000 , +-1 ,0x0007 ,0x0133 ,-1 ,0x0020 ,0x0000 , + -1, 0x0021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,0x29 ,-1 ,0x2c ,-3 }; +-1 ,0xCB ,0x39 ,0x2C ,0x00 ,0x34 ,0x02 , +-1 ,0xCF ,0x00 ,0xC1 ,0x30 , +-1 ,0xE8 ,0x85 ,0x00 ,0x78 ,-1 ,0xEA ,0x00 , +0x00 ,-1 ,0xED ,0x64 ,0x03 ,0x12 ,0x81 , +-1 ,0xF7 ,0x20 ,-1 ,0xC0 ,0x23 ,-1 ,0xC1 , +0x10 ,-1 ,0xC5 ,0x3e ,0x28 ,-1 ,0xC7 ,0x86 , +-1 ,0x36 ,0x28 ,-1 ,0x3A ,0x55 ,-1 ,0xB1 ,0x00 , +0x18 ,-1 ,0xB6 ,0x08 ,0x82 ,0x27 , +-1 ,0xF2 ,0x00 ,-1 ,0x26 ,0x01 , +-1 ,0xE0 ,0x0F ,0x31 ,0x2B ,0x0C ,0x0E ,0x08 ,0x4E , +0xF1 ,0x37 ,0x07 ,0x10 ,0x03 ,0x0E ,0x09 ,0x00 , +-1 ,0xE1 ,0x00 ,0x0E ,0x14 ,0x03 ,0x11 ,0x07 ,0x31 , +0xC1 ,0x48 ,0x08 ,0x0F ,0x0C ,0x31 ,0x36 ,0x0F , +-1 ,0x11 ,-2 ,120 ,-1 ,0x29 ,-1 ,0x2c ,-3 };/* Supported displays in alphabetical order */ static struct fbtft_device_display displays[] = {
@@ -486,7 +512,7 @@ static struct fbtft_device_display displays[] = { }, .startbyte = 0b01110000, .bgr = true, - .fps= 50, + .fps = 50, .gpios = (const struct fbtft_gpio []) { {"reset" ,25 }, {"led" ,18 },
Signature · 1 line
1.9.3