FreeCalypso > hg > tcs211-l1-reconst
diff chipsetsw/layer1/tm_cfile/l1tm_async.c @ 217:aea3c2548676
l1tm_async.c: starting reconstruction
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 14 Jan 2017 21:00:14 +0000 |
parents | fd96174924df |
children | 24f094deabe3 |
line wrap: on
line diff
--- a/chipsetsw/layer1/tm_cfile/l1tm_async.c Sat Jan 14 20:02:22 2017 +0000 +++ b/chipsetsw/layer1/tm_cfile/l1tm_async.c Sat Jan 14 21:00:14 2017 +0000 @@ -195,85 +195,6 @@ #endif #endif // ((L1_STEREOPATH == 1) && (OP_L1_STANDALONE == 1)) -/***************************************************************************** - * etm_rf() - * - * Description: Processing of actions from orders coming from etm_rf PC DLL - * When RF_TRANSACTION is called at the ETM PC side. The Messages sent in - * the primitive are processed by this function. - *****************************************************************************/ - -void etm_rf(xSignalHeaderRec *msg) { - T_TESTMODE_PRIM *prim; - T_TM_RETURN tm_ret; - - // use CID to decide what to do - prim = (T_TESTMODE_PRIM *)(msg->SigP); - - #if (ETM_PROTOCOL == 1) - // fill in the mid - tm_ret.mid = prim->mid; - #endif - - // fill in the cid also named fid in the ETM protocol - tm_ret.cid = prim->cid; - - switch (prim->cid) - { - case RF_ENABLE: l1tm_rf_enable(prim, &tm_ret); break; - case STATS_READ: l1tm_statistics(prim, &tm_ret); break; - case STATS_CONFIG_WRITE: l1tm_stats_config_write(prim, &tm_ret); break; - case STATS_CONFIG_READ: l1tm_stats_config_read(prim, &tm_ret); break; - case RF_PARAM_WRITE: l1tm_rf_param_write(prim, &tm_ret); break; - case RF_PARAM_READ: l1tm_rf_param_read(prim, &tm_ret); break; - case RF_TABLE_WRITE: l1tm_rf_table_write(prim, &tm_ret); break; - case RF_TABLE_READ: l1tm_rf_table_read(prim, &tm_ret); break; - case RX_PARAM_WRITE: l1tm_rx_param_write(prim, &tm_ret); break; - case RX_PARAM_READ: l1tm_rx_param_read(prim, &tm_ret); break; - case TX_PARAM_WRITE: l1tm_tx_param_write(prim, &tm_ret); break; - case TX_PARAM_READ: l1tm_tx_param_read(prim, &tm_ret); break; - case TX_TEMPLATE_WRITE: l1tm_tx_template_write(prim, &tm_ret); break; - case TX_TEMPLATE_READ: l1tm_tx_template_read(prim, &tm_ret); break; - case SPECIAL_PARAM_WRITE: l1tm_special_param_write(prim, &tm_ret); break; - case SPECIAL_PARAM_READ: l1tm_special_param_read(prim, &tm_ret); break; - case SPECIAL_TABLE_WRITE: l1tm_special_table_write(prim, &tm_ret); break; - case SPECIAL_TABLE_READ: l1tm_special_table_read(prim, &tm_ret); break; - case SPECIAL_ENABLE: l1tm_special_enable(prim, &tm_ret); break; - #if (L1_DRP == 1) - case DRP_SW_WRITE: l1tm_drp_sw_write(prim, &tm_ret); break; - #endif -#if (CODE_VERSION != SIMULATION) - case TPU_TABLE_WRITE: l1tm_tpu_table_write(prim, &tm_ret); break; - case TPU_TABLE_READ: l1tm_tpu_table_read(prim, &tm_ret); break; -#endif - #if(L1_TPU_DEV == 1) - case FLEXI_TPU_TABLE_WRITE: l1tm_flexi_tpu_table_write(prim, &tm_ret); break; - case FLEXI_TPU_TABLE_READ: l1tm_flexi_tpu_table_read(prim, &tm_ret); break; - - case FLEXI_ABB_WRITE: l1tm_flexi_abb_write(prim, &tm_ret); break; - case FLEXI_ABB_READ: l1tm_flexi_abb_read(prim, &tm_ret); break; - #endif -#if 0 //(CODE_VERSION != SIMULATION) // FreeCalypso TCS211 reconstruction - case DRP_CALIB_WRITE: l1tm_drp_calib_write(prim, &tm_ret); break; - case DRP_CALIB_READ : l1tm_drp_calib_read(prim, &tm_ret); break; // TBD for Future Use -#endif // CODE_VERSION - default: - #if (OP_L1_STANDALONE == 1) - etm_core(msg); - return; - #else - tm_ret.size = 0; - #if (ETM_PROTOCOL == 1) - tm_ret.status = -ETM_BADOP; - #else - tm_ret.status = E_BADCID; - #endif - #endif // ETM_PROTOCOL - break; - } // end of switch - tm_transmit(&tm_ret); -} - /***********************************************************************/ /* TESTMODE 3.X */ /***********************************************************************/ @@ -303,10 +224,8 @@ /*-----------------------------------------------------------*/ void l1a_tmode(xSignalHeaderRec *msg) { -#if (ETM_PROTOCOL == 1) T_TESTMODE_PRIM *prim; T_TM_RETURN tm_ret; -#endif int SignalCode = msg->SignalCode; @@ -322,31 +241,121 @@ if (SignalCode == TESTMODE_PRIM) { - #if (ETM_PROTOCOL == 1) + // use CID to decide what to do prim = (T_TESTMODE_PRIM *)(msg->SigP); - switch (prim->mid) + + // fill in the cid also named fid in the ETM protocol + tm_ret.cid = prim->cid; + + switch (prim->cid) { - case ETM_RF: - etm_rf(msg); - break; - #if (OP_L1_STANDALONE == 1) - case ETM_CORE: - etm_core(msg); - break; + case RF_ENABLE: + l1tm_rf_enable(prim, &tm_ret); + break; + case STATS_READ: + l1tm_statistics(prim, &tm_ret); + break; + case STATS_CONFIG_WRITE: + l1tm_stats_config_write(prim, &tm_ret); + break; + case STATS_CONFIG_READ: + l1tm_stats_config_read(prim, &tm_ret); + break; + case RF_PARAM_WRITE: + l1tm_rf_param_write(prim, &tm_ret); + break; + case RF_PARAM_READ: + l1tm_rf_param_read(prim, &tm_ret); + break; + case RF_TABLE_WRITE: + l1tm_rf_table_write(prim, &tm_ret); + break; + case RF_TABLE_READ: + l1tm_rf_table_read(prim, &tm_ret); + break; + case RX_PARAM_WRITE: + l1tm_rx_param_write(prim, &tm_ret); + break; + case RX_PARAM_READ: + l1tm_rx_param_read(prim, &tm_ret); + break; + case TX_PARAM_WRITE: + l1tm_tx_param_write(prim, &tm_ret); + break; + case TX_PARAM_READ: + l1tm_tx_param_read(prim, &tm_ret); + break; + case TX_TEMPLATE_WRITE: + l1tm_tx_template_write(prim, &tm_ret); + break; + case TX_TEMPLATE_READ: + l1tm_tx_template_read(prim, &tm_ret); + break; + case SPECIAL_PARAM_WRITE: + l1tm_special_param_write(prim, &tm_ret); + break; + case SPECIAL_PARAM_READ: + l1tm_special_param_read(prim, &tm_ret); + break; + case SPECIAL_TABLE_WRITE: + l1tm_special_table_write(prim, &tm_ret); + break; + case SPECIAL_TABLE_READ: + l1tm_special_table_read(prim, &tm_ret); + break; + case SPECIAL_ENABLE: + l1tm_special_enable(prim, &tm_ret); + break; + #if (L1_DRP == 1) + case DRP_SW_WRITE: + l1tm_drp_sw_write(prim, &tm_ret); + break; #endif + #if (CODE_VERSION != SIMULATION) + case TPU_TABLE_WRITE: + l1tm_tpu_table_write(prim, &tm_ret); + break; + case TPU_TABLE_READ: + l1tm_tpu_table_read(prim, &tm_ret); + break; + #endif + #if(L1_TPU_DEV == 1) + case FLEXI_TPU_TABLE_WRITE: + l1tm_flexi_tpu_table_write(prim, &tm_ret); + break; + case FLEXI_TPU_TABLE_READ: + l1tm_flexi_tpu_table_read(prim, &tm_ret); + break; + case FLEXI_ABB_WRITE: + l1tm_flexi_abb_write(prim, &tm_ret); + break; + case FLEXI_ABB_READ: + l1tm_flexi_abb_read(prim, &tm_ret); + break; + #endif + #if 0 //(CODE_VERSION != SIMULATION) // FreeCalypso TCS211 reconstruction + case DRP_CALIB_WRITE: + l1tm_drp_calib_write(prim, &tm_ret); + break; + case DRP_CALIB_READ: + l1tm_drp_calib_read(prim, &tm_ret); + break; // TBD for Future Use + #endif // CODE_VERSION default: - // fill in the mid - tm_ret.mid = prim->mid; - tm_ret.status = -ETM_BADOP; - // fill in the cid - tm_ret.cid = prim->cid; + #if (OP_L1_STANDALONE == 1) + etm_core(msg); + return; + #else tm_ret.size = 0; - tm_transmit(&tm_ret); + #if (ETM_PROTOCOL == 1) + tm_ret.status = -ETM_BADOP; + #else + tm_ret.status = E_BADCID; + #endif + #endif // OP_L1_STANDALONE break; - } //switch - #elif (ETM_PROTOCOL == 0) - etm_rf(msg); - #endif + } // end of switch + tm_transmit(&tm_ret); } //end of TESTMODE_PRIM #if L1_GPRS else if ( ((SignalCode <= TMODE_PDTCH_INFO) && (SignalCode >= TMODE_RXLEV_REQ)) || (l1tm.tm_msg_received == TRUE) )