changeset 229:5bac269a6c27

l1tm_func.c: l1tm_mem_write() reconstructed
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 15 Jan 2017 05:07:32 +0000
parents a40cdf33f1f6
children 217942c111e1
files chipsetsw/layer1/tm_cfile/l1tm_func.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/tm_cfile/l1tm_func.c	Sun Jan 15 04:37:08 2017 +0000
+++ b/chipsetsw/layer1/tm_cfile/l1tm_func.c	Sun Jan 15 05:07:32 2017 +0000
@@ -1077,9 +1077,20 @@
   tm_return->status = E_OK;
 }
 
+/* TCS211 function missing in LoCosto, reconstructed from disassembly */
 void l1tm_mem_write(T_TESTMODE_PRIM *prim, T_TM_RETURN *tm_return)
 {
-/* TCS211 function missing in LoCosto, to be reconstructed from disasm */
+  UWORD8 *mem_ptr;
+  UWORD8 num_of_bytes;
+  UWORD16 i;
+
+  mem_ptr = (UWORD8 *) prim->u.mem_write.address;
+  num_of_bytes = prim->str_len_in_bytes - 4;
+  for (i = 0; i < num_of_bytes; i++)
+    mem_ptr[i] = prim->u.mem_write.table[i];
+  tm_return->size = 0;
+  tm_return->index = 0;
+  tm_return->status = E_OK;
 }
 
 void l1tm_mem_read(T_TESTMODE_PRIM *prim, T_TM_RETURN *tm_return)