changeset 276:4221c724c664

R2D: preparations for adding LCD hardware suspend handling
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 07 Sep 2021 21:05:38 +0000
parents 79cfefc1e2b4
children 0196b6bf633c
files src/cs/drivers/drv_app/r2d/lcds/c139/r2d_task_i.c src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i.c src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i_96x64.c src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i_bw.c src/cs/drivers/drv_app/r2d/r2d_task.c
diffstat 5 files changed, 20 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/drivers/drv_app/r2d/lcds/c139/r2d_task_i.c	Fri Jul 30 02:55:48 2021 +0000
+++ b/src/cs/drivers/drv_app/r2d/lcds/c139/r2d_task_i.c	Tue Sep 07 21:05:38 2021 +0000
@@ -51,6 +51,10 @@
 	y1=r2d_update_ul_y; //0
 	y2=r2d_update_br_y; //63
 
+	if (y1 > y2)
+		return;
+	r2d_reinit_update_region();
+
 	/* set window area */
 	c139_set_lcd_addr_region(0, 95, y1, y2);
 
@@ -72,6 +76,4 @@
 		}	    
 		p++;
 	} 
-
-	r2d_reinit_update_region();
 }
--- a/src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i.c	Fri Jul 30 02:55:48 2021 +0000
+++ b/src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i.c	Tue Sep 07 21:05:38 2021 +0000
@@ -26,6 +26,10 @@
 	y1=r2d_update_ul_y; //0
 	y2=r2d_update_br_y; //219
 
+	if (y1 > y2)
+		return;
+	r2d_reinit_update_region();
+
 	/* set window area */
 	LCD_REG_WR(0x36, x2);
 	LCD_REG_WR(0x37, x1);
@@ -57,7 +61,4 @@
 		}	    
 		p+=de;
 	} 
-
-	//r2d_check_and_send_event(r2d_g_framebuffer);
-	r2d_reinit_update_region();
 }
--- a/src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i_96x64.c	Fri Jul 30 02:55:48 2021 +0000
+++ b/src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i_96x64.c	Tue Sep 07 21:05:38 2021 +0000
@@ -21,6 +21,10 @@
 	y1=r2d_update_ul_y; //0
 	y2=r2d_update_br_y; //63
 
+	if (y1 > y2)
+		return;
+	r2d_reinit_update_region();
+
 	/* set window area */
 	LCD_REG_WR(0x36, 135);
 	LCD_REG_WR(0x37, 40);
@@ -50,6 +54,4 @@
 		}	    
 		p++;
 	} 
-
-	r2d_reinit_update_region();
 }
--- a/src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i_bw.c	Fri Jul 30 02:55:48 2021 +0000
+++ b/src/cs/drivers/drv_app/r2d/lcds/luna/r2d_task_i_bw.c	Tue Sep 07 21:05:38 2021 +0000
@@ -21,6 +21,10 @@
 	y1=r2d_update_ul_y; //0
 	y2=r2d_update_br_y; //219
 
+	if (y1 > y2)
+		return;
+	r2d_reinit_update_region();
+
 	/* set window area */
 	LCD_REG_WR(0x36, 175);
 	LCD_REG_WR(0x37, 0);
@@ -58,6 +62,4 @@
 			v=v>>1;
 		}
 	} 
-
-	r2d_reinit_update_region();
 }
--- a/src/cs/drivers/drv_app/r2d/r2d_task.c	Fri Jul 30 02:55:48 2021 +0000
+++ b/src/cs/drivers/drv_app/r2d/r2d_task.c	Tue Sep 07 21:05:38 2021 +0000
@@ -95,8 +95,10 @@
 
 			r2d_g_event_was_sent=FALSE;
 			if (r2d_g_refresh_disabled==0)
-			  r2d_refresh();
-			rvf_delay(RVF_MS_TO_TICKS(R2D_REFRESH_PERIOD));
+			{
+			    r2d_refresh();
+			    rvf_delay(RVF_MS_TO_TICKS(R2D_REFRESH_PERIOD));
+			}
 		}
 	}