changeset 248:2a1b6e3f7a84

l1tm_cust.c: reconstruction complete, exact match to TCS211 binary object
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 16 Jan 2017 03:15:51 +0000
parents 65004e173824
children b5f180a36b22
files chipsetsw/layer1/tm_cust0/l1tm_cust.c
diffstat 1 files changed, 16 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/tm_cust0/l1tm_cust.c	Mon Jan 16 02:39:56 2017 +0000
+++ b/chipsetsw/layer1/tm_cust0/l1tm_cust.c	Mon Jan 16 03:15:51 2017 +0000
@@ -309,7 +309,7 @@
     }
     case RX_AGC_GLOBAL_PARAMS:
     {
-      if (size != 10)  // 5 UWORD16 values
+      if (size != 8)  // 4 UWORD16 values
       {
         tm_return->status = E_BADSIZE;
         break;
@@ -547,8 +547,7 @@
     }
     case RX_AGC_GLOBAL_PARAMS:
     {
-
-      tm_return->size = 10;  // 5 UWORD16's
+      tm_return->size = 8;  // 4 UWORD16's
       memcpy(tm_return->result, &rf.rx.agc.low_agc_noise_thr, tm_return->size);
 
       break;
@@ -615,6 +614,7 @@
       tm_return->status = E_NOSUBSYS;
       return;
     }
+
     #if L1_GPRS
       case RLC_TX_BUFFER_CS1:
       case RLC_TX_BUFFER_CS2:
@@ -623,28 +623,33 @@
       {
         tm_return->size = l1_config.tmode.tx_params.rlc_buffer_size * 2; // UWORD16's
         memcpy(tm_return->result, &l1_config.tmode.tx_params.rlc_buffer[0], tm_return->size);
-		break;
+        break;
       }
+    #endif
 
-    #endif
     case TX_DATA_BUFFER:
     {
+      UWORD8 i;
+      for (i=0; i<16; i++)
+      {
+        tm_return->result[2*i]=(TM_ul_data[i] >> 6) & 0x00FF;
+        tm_return->result[2*i+1]=(TM_ul_data[i] >> 14) & 0x0003;
+      }
+
       tm_return->size = 32; //16*UWORD16
-      memcpy(tm_return->result, &TM_ul_data[0], tm_return->size);
       break;
+    }
 
-    }
     #if (RF==35)
     case RX_PLL_TUNING_TABLE:
     {
       tm_return->size = sizeof(pll_tuning); //6*UWORD16
       memcpy(tm_return->result, &pll_tuning, tm_return->size);
-
       pll_tuning.enable    = 0;
-
       break;
     }
     #endif
+
     default:
     {
       tm_return->size = 0;
@@ -758,8 +763,8 @@
     }
     case TX_BURST_DATA:
     {
-      // range is [0..10], but we only support [0..2] and [5..13] at the moment
-      if ((value > 2 && value < 5) || (value > 13))
+      // range is [0..10], currently we support [0..13] at the moment
+      if (value > 13)
       {
         tm_return->status = E_INVAL;
         break;