changeset 453:96c047b4325e

R2D D-Sample drivers: only do the actual hw pokes when CONFIG_TARGET_DSAMPLE
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 15 Mar 2018 05:48:03 +0000
parents 4d7c2ccb5814
children 8473cabf491d
files src/cs/drivers/drv_app/r2d/lcds/BW_D_Sample/r2d_task_i.c src/cs/drivers/drv_app/r2d/lcds/BW_D_Sample/r2d_task_init_i.c src/cs/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_i.c src/cs/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_init_i.c
diffstat 4 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/drivers/drv_app/r2d/lcds/BW_D_Sample/r2d_task_i.c	Wed Mar 14 07:22:05 2018 +0000
+++ b/src/cs/drivers/drv_app/r2d/lcds/BW_D_Sample/r2d_task_i.c	Thu Mar 15 05:48:03 2018 +0000
@@ -10,6 +10,7 @@
 
 void r2d_refresh(void)
 {
+#ifdef CONFIG_TARGET_DSAMPLE
   UINT16 i,j,k;
 
 
@@ -71,8 +72,9 @@
     } 
 	//LCD_cmd(LCD_DISON);
 	LCD_deactivate;
+#endif
 
    
    r2d_reinit_update_region();
 
-}
\ No newline at end of file
+}
--- a/src/cs/drivers/drv_app/r2d/lcds/BW_D_Sample/r2d_task_init_i.c	Wed Mar 14 07:22:05 2018 +0000
+++ b/src/cs/drivers/drv_app/r2d/lcds/BW_D_Sample/r2d_task_init_i.c	Thu Mar 15 05:48:03 2018 +0000
@@ -11,6 +11,7 @@
 #define R2D_MB_PRIM_SIZE	(4000)
  
 
+#ifdef CONFIG_TARGET_DSAMPLE
 const unsigned char INIT_DISCTL[11] = { 0xDE,0x01,0x64,0x00,0x1B,0xF4,0x00,0xDC,0x00,0x02,0x00};
 
 const unsigned char INIT_GCP64[126] = {
@@ -39,11 +40,12 @@
     unsigned short a;
     while (ms-- > 0) for (a=0;a<1000;a++) asm(" nop");
 }
+#endif
 
  void r2d_refresh_task_init(void)
 {
 
-#ifndef _WINDOWS
+#ifdef CONFIG_TARGET_DSAMPLE
 
   UINT32  i;
 
--- a/src/cs/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_i.c	Wed Mar 14 07:22:05 2018 +0000
+++ b/src/cs/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_i.c	Thu Mar 15 05:48:03 2018 +0000
@@ -15,7 +15,7 @@
 {
   UINT16 i,j;
 
-#ifndef _WINDOWS
+#ifdef CONFIG_TARGET_DSAMPLE
   
   UINT32 v;
   UINT32  *p;
--- a/src/cs/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_init_i.c	Wed Mar 14 07:22:05 2018 +0000
+++ b/src/cs/drivers/drv_app/r2d/lcds/D_Sample/r2d_task_init_i.c	Thu Mar 15 05:48:03 2018 +0000
@@ -11,6 +11,7 @@
 #define R2D_MB_PRIM_SIZE	(4000)
  
 
+#ifdef CONFIG_TARGET_DSAMPLE
 const unsigned char INIT_DISCTL[11] = { 0xDE,0x01,0x64,0x00,0x1B,0xF4,0x00,0xDC,0x00,0x02,0x00};
 
 
@@ -61,11 +62,12 @@
     unsigned short a;
     while (ms-- > 0) for (a=0;a<1000;a++) asm(" nop");
 }
+#endif
 
  void r2d_refresh_task_init(void)
 {
 
-#ifndef _WINDOWS
+#ifdef CONFIG_TARGET_DSAMPLE
 
   UINT32  i;
 
@@ -172,11 +174,12 @@
 
 void r2d_lcd_off(void)
 {
-	 
+#ifdef CONFIG_TARGET_DSAMPLE
   LCD_cmd(LCD_DISOFF);
   //wait 70ms
   r2d_nop_delay(70);
   LCD_cmd(LCD_SLPIN);  
   //wait 110ms
   r2d_nop_delay(110);
+#endif
 }