changeset 132:b8fc86826624

R2D: C139 LCD driver enabled
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 08 Oct 2016 03:55:20 +0000
parents 384fbd61c252
children 87347425b11f
files components/r2d_drv_flash src/cs/drivers/drv_app/r2d/r2d_inits.c src/cs/drivers/drv_app/r2d/r2d_refresh.c src/cs/drivers/drv_app/r2d/uwire.h
diffstat 4 files changed, 26 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/components/r2d_drv_flash	Fri Oct 07 22:04:02 2016 +0000
+++ b/components/r2d_drv_flash	Sat Oct 08 03:55:20 2016 +0000
@@ -125,4 +125,14 @@
 
 # Source modules
 
-cfile_plain $SRCDIR/board/uwire.c
+#cfile_plain $SRCDIR/board/uwire.c
+
+# FreeCalypso change: TI's TCS211 build always includes uwire.c in the lib,
+# but we are currently excluding it unconditionally because none of our
+# supported configurations need it: on the C139 this code is wrong and MUST
+# be excluded, whereas the D-Sample LCD doesn't use uWire and the code never
+# gets pulled into the link even if it's included in the lib.
+#
+# The code in r2d/board/uwire.c is only needed when targeting the real
+# C-Sample (not C139 emulation) or earlier TI boards, but our build system
+# does not currently support those anyway.
--- a/src/cs/drivers/drv_app/r2d/r2d_inits.c	Fri Oct 07 22:04:02 2016 +0000
+++ b/src/cs/drivers/drv_app/r2d/r2d_inits.c	Sat Oct 08 03:55:20 2016 +0000
@@ -101,7 +101,11 @@
 #endif
 
 #if (R2D_EMBEDDED_LCD == R2D_MIRRORED_LCD)
-#include "r2d/lcds/simple/r2d_task_init_i.c"
+  #ifdef CONFIG_TARGET_C139
+    #include "r2d/lcds/c139/r2d_task_init_i.c"
+  #else
+    #include "r2d/lcds/simple/r2d_task_init_i.c"
+  #endif
 #endif
 
 #if (R2D_EMBEDDED_LCD == R2D_CUSTOMER_LCD)
--- a/src/cs/drivers/drv_app/r2d/r2d_refresh.c	Fri Oct 07 22:04:02 2016 +0000
+++ b/src/cs/drivers/drv_app/r2d/r2d_refresh.c	Sat Oct 08 03:55:20 2016 +0000
@@ -82,7 +82,11 @@
 #endif
 
 #if (R2D_EMBEDDED_LCD == R2D_MIRRORED_LCD) 
-#include "lcds/simple/r2d_task_i.c"
+  #ifdef CONFIG_TARGET_C139
+    #include "lcds/c139/r2d_task_i.c"
+  #else
+    #include "lcds/simple/r2d_task_i.c"
+  #endif
 #endif
 
 #if (R2D_EMBEDDED_LCD == R2D_CUSTOMER_LCD) 
--- a/src/cs/drivers/drv_app/r2d/uwire.h	Fri Oct 07 22:04:02 2016 +0000
+++ b/src/cs/drivers/drv_app/r2d/uwire.h	Sat Oct 08 03:55:20 2016 +0000
@@ -34,10 +34,14 @@
 
 #define INDEX_CS1       (1 << 10)
 #define NB_BITS_WR_8    (1 << 8 )
+#define INDEX_CS0       0
+#define NB_BITS_WR_9    (9 << 5)
 #define CS_CMD          (1 << 12)
 #define START           (1 << 13)
 #define CS1_EDGE_RD     (1 << 6)
 #define CS1_FRQ_FINT_4  (1 << 9)
+#define CS0_FRQ_FINT_2  0
+#define CS0_FRQ_FINT_4  (1 << 3)
 #define SR3_CLK_EN      1
 
 #define CSRB            ( 1<<14 )
@@ -75,4 +79,4 @@
    #endif
 #endif
 
-#endif /*_UWIRE_H_*/
\ No newline at end of file
+#endif /*_UWIRE_H_*/