FreeCalypso > hg > fc-magnetite
changeset 109:45ceec943347
src/cs/services/etm/etm_{api,env}.c: non-8-character tab cleanup
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 05 Oct 2016 23:44:54 +0000 |
parents | 94170d82d926 |
children | 49254db81128 |
files | src/cs/services/etm/etm_api.c src/cs/services/etm/etm_env.c |
diffstat | 2 files changed, 124 insertions(+), 124 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cs/services/etm/etm_api.c Wed Oct 05 22:46:22 2016 +0000 +++ b/src/cs/services/etm/etm_api.c Wed Oct 05 23:44:54 2016 +0000 @@ -1,22 +1,22 @@ -/******************************************************************************** +/******************************************************************************* * Enhanced TestMode (ETM) - * @file etm_api.c + * @file etm_api.c * * API for ETM SWE. * - * @author Kim T. Peteren (ktp@ti.com) + * @author Kim T. Peteren (ktp@ti.com) * @version 0.1 * * * History: * - * Date Modification + * Date Modification * ------------------------------------ - * 11/06/2003 Creation + * 11/06/2003 Creation * * (C) Copyright 2003 by Texas Instruments Incorporated, All Rights Reserved - *********************************************************************************/ + ******************************************************************************/ #include "etm/etm.h" @@ -33,23 +33,23 @@ extern T_ETM_ENV_CTRL_BLK *etm_env_ctrl_blk; -/******************************************************************************** +/******************************************************************************* * Registers the SWE to the ETM instance. * * This is a bridge function. It sends the T_ETM_REGISTRATION_REQ * message to the ETM SWE. * It is the first function that should be called. * - * @return ETM_NOMEM in case of a memory error, - * the return value of rvf_send_msg otherwise. - *********************************************************************************/ + * @return ETM_NOMEM in case of a memory error, + * the return value of rvf_send_msg otherwise. + ******************************************************************************/ int etm_register(char name[], int mid, int task_id, T_RVF_ADDR_ID addr_id, ETM_CALLBACK_FUNC callback) { - /* Type for a registration event. */ - T_ETM_REGISTER_REQ *etm_registration_p; + /* Type for a registration event. */ + T_ETM_REGISTER_REQ *etm_registration_p; - tr_etm(TgTrEtmLow, "ETM API: _register bridge function(%s)", name); + tr_etm(TgTrEtmLow, "ETM API: _register bridge function(%s)", name); /* Allocate the memory for the message to send */ if ((etm_registration_p = (T_ETM_REGISTER_REQ*) etm_malloc(sizeof(T_ETM_REGISTER_REQ))) == NULL) @@ -65,18 +65,18 @@ /* Fill the message parameters */ memcpy(etm_registration_p->name, name, strlen(name)); - etm_registration_p->mid = mid; - etm_registration_p->task_id = task_id; - etm_registration_p->addr_id = addr_id; - etm_registration_p->rx_callback_func = callback; + etm_registration_p->mid = mid; + etm_registration_p->task_id = task_id; + etm_registration_p->addr_id = addr_id; + etm_registration_p->rx_callback_func = callback; - /* Send the message using mailbox. */ - return rvf_send_msg(etm_env_ctrl_blk->addr_id, - (void*) etm_registration_p); + /* Send the message using mailbox. */ + return rvf_send_msg(etm_env_ctrl_blk->addr_id, + (void*) etm_registration_p); } -/******************************************************************************** +/******************************************************************************* * Cleans ETM register tables, i.e. set/clean the variable at their initialization * state for a specific entity. * This function can be used to reinitialize ETM register database without having to @@ -84,16 +84,16 @@ * * This is a bridge function. It sends ETM_UNREGISTER message to ETM. * - * @return ETM_NOMEM in case of a memory error, - * the return value of rvf_send_msg otherwise. - *********************************************************************************/ + * @return ETM_NOMEM in case of a memory error, + * the return value of rvf_send_msg otherwise. + ******************************************************************************/ int etm_unregister(char name[], int mid, int task_id, T_RVF_ADDR_ID addr_id, ETM_CALLBACK_FUNC callback) { - /* Type for a start input event. */ - T_ETM_UNREGISTER *etm_unregister_p; + /* Type for a start input event. */ + T_ETM_UNREGISTER *etm_unregister_p; - tr_etm(TgTrEtmLow, "ETM API: _unregister bridge function"); + tr_etm(TgTrEtmLow, "ETM API: _unregister bridge function"); /* Allocate the memory for the message to send */ if ((etm_unregister_p = (T_ETM_UNREGISTER*) etm_malloc(sizeof(T_ETM_UNREGISTER))) == NULL) @@ -109,25 +109,25 @@ /* Fill the message parameters */ memcpy(etm_unregister_p->name, name, strlen(name)); - etm_unregister_p->mid = mid; - etm_unregister_p->task_id = task_id; - etm_unregister_p->addr_id = addr_id; - etm_unregister_p->rx_callback_func = callback; + etm_unregister_p->mid = mid; + etm_unregister_p->task_id = task_id; + etm_unregister_p->addr_id = addr_id; + etm_unregister_p->rx_callback_func = callback; - /* Send the message using mailbox. */ - return rvf_send_msg(etm_env_ctrl_blk->addr_id, - (void*) etm_unregister_p); + /* Send the message using mailbox. */ + return rvf_send_msg(etm_env_ctrl_blk->addr_id, + (void*) etm_unregister_p); } -/******************************************************************************** +/******************************************************************************* * Get data from a ETM packet structur. Get either 8, 16 or 32 value * Used to unpack data * * This is helpers * - * @return the return value of the point of the ETM packet. - *********************************************************************************/ + * @return the return value of the point of the ETM packet. + ******************************************************************************/ int etm_get8(void *buf) { @@ -171,14 +171,14 @@ } -/******************************************************************************** +/******************************************************************************* * Put data into a ETM packet structur. Put either 8, 16 or 32 value * Used to pack data * * This is helpers * - * @return Return ETM_PACKET of ETM_OK. - *********************************************************************************/ + * @return Return ETM_PACKET of ETM_OK. + ******************************************************************************/ #define max_ul_data_size 240 @@ -242,13 +242,13 @@ } -/******************************************************************************** +/******************************************************************************* * This function is used to send an ETM Packet to the PC * * This is helpers * - * @return Return value of rvf_send_trace_cpy. - *********************************************************************************/ + * @return Return value of rvf_send_trace_cpy. + ******************************************************************************/ int etm_pkt_send(T_ETM_PKT *pkt) {
--- a/src/cs/services/etm/etm_env.c Wed Oct 05 22:46:22 2016 +0000 +++ b/src/cs/services/etm/etm_env.c Wed Oct 05 23:44:54 2016 +0000 @@ -1,17 +1,17 @@ /******************************************************************************** * Enhanced TestMode (ETM) - * @file etm_env.c + * @file etm_env.c * - * @author Kim T. Peteren (ktp@ti.com) + * @author Kim T. Peteren (ktp@ti.com) * @version 0.1 * * * History: * - * Date Modification + * Date Modification * ------------------------------------ - * 16/06/2003 Creation + * 16/06/2003 Creation * * (C) Copyright 2003 by Texas Instruments Incorporated, All Rights Reserved *********************************************************************************/ @@ -40,127 +40,127 @@ /****************************************************************************** -* Function : etm_get_info +* Function : etm_get_info * * Description : This function is called by the RV manager to learn -* driver requirements in terms of memory, SWEs... +* driver requirements in terms of memory, SWEs... * * Parameters : T_RVM_INFO_SWE * swe_info: pointer to the structure to fill -* containing infos related to the driver SWE. +* containing infos related to the driver SWE. * * Return : T_RVM_RETURN * -* History : 0.1 -* +* History : 0.1 +* * ******************************************************************************/ T_RVM_RETURN etm_get_info(T_RVM_INFO_SWE *swe_info) { /* SWE info */ - swe_info->swe_type = RVM_SWE_TYPE_4; + swe_info->swe_type = RVM_SWE_TYPE_4; swe_info->type_info.type4.swe_use_id = ETM_USE_ID; memcpy(swe_info->type_info.type4.swe_name, "ETM", sizeof("ETM")); - swe_info->type_info.type4.stack_size = ETM_STACK_SIZE; - swe_info->type_info.type4.priority = RVM_ETM_TASK_PRIORITY; + swe_info->type_info.type4.stack_size = ETM_STACK_SIZE; + swe_info->type_info.type4.priority = RVM_ETM_TASK_PRIORITY; - /* Set the return path */ - swe_info->type_info.type4.return_path.callback_func = NULL; - swe_info->type_info.type4.return_path.addr_id = 0; + /* Set the return path */ + swe_info->type_info.type4.return_path.callback_func = NULL; + swe_info->type_info.type4.return_path.addr_id = 0; - /* memory bank info */ - swe_info->type_info.type4.nb_mem_bank = 1; - - memcpy (swe_info->type_info.type4.mem_bank[0].bank_name, "ETM_PRIM", 9); - swe_info->type_info.type4.mem_bank[0].initial_params.size = ETM_MB_PRIM_SIZE; - swe_info->type_info.type4.mem_bank[0].initial_params.watermark = ETM_MB_PRIM_WATERMARK; + /* memory bank info */ + swe_info->type_info.type4.nb_mem_bank = 1; + + memcpy (swe_info->type_info.type4.mem_bank[0].bank_name, "ETM_PRIM", 9); + swe_info->type_info.type4.mem_bank[0].initial_params.size = ETM_MB_PRIM_SIZE; + swe_info->type_info.type4.mem_bank[0].initial_params.watermark = ETM_MB_PRIM_WATERMARK; - /* linked SWE info */ + /* linked SWE info */ /* this SWE requires the ATP SWE to run */ #ifdef RVM_ATP_SWE swe_info->type_info.type4.nb_linked_swe = 1; swe_info->type_info.type4.linked_swe_id[0] = ATP_USE_ID; #else - swe_info->type_info.type4.nb_linked_swe = 0; + swe_info->type_info.type4.nb_linked_swe = 0; #endif - /* generic functions */ - swe_info->type_info.type4.set_info = etm_set_info; - swe_info->type_info.type4.init = etm_init; - swe_info->type_info.type4.core = etm_start; - swe_info->type_info.type4.stop = etm_stop; - swe_info->type_info.type4.kill = etm_kill; + /* generic functions */ + swe_info->type_info.type4.set_info = etm_set_info; + swe_info->type_info.type4.init = etm_init; + swe_info->type_info.type4.core = etm_start; + swe_info->type_info.type4.stop = etm_stop; + swe_info->type_info.type4.kill = etm_kill; - return RVM_OK; + return RVM_OK; } /****************************************************************************** -* Function : etm_set_info +* Function : etm_set_info * * Description : This function is called by the RV manager to inform -* the driver SWE about task_id, mb_id and error function. +* the driver SWE about task_id, mb_id and error function. * * Parameters : - T_RVF_ADDR_ID addr_id: unique path to the SWE. -* - T_RV_RETURN ReturnPath[], array of return path for linked SWE -* - T_RVF_MB_ID mbId[]: array of memory bank ids. -* - callback function to call in case of unrecoverable error. +* - T_RV_RETURN ReturnPath[], array of return path for linked SWE +* - T_RVF_MB_ID mbId[]: array of memory bank ids. +* - callback function to call in case of unrecoverable error. * * Return : T_RVM_RETURN * -* History : 0.1 -* +* History : 0.1 +* * ******************************************************************************/ -T_RVM_RETURN etm_set_info (T_RVF_ADDR_ID addr_id, - T_RV_RETURN return_path[], - T_RVF_MB_ID bk_id[], - T_RVM_RETURN (*rvm_error_ft)(T_RVM_NAME swe_name, - T_RVM_RETURN error_cause, - T_RVM_ERROR_TYPE error_type, - T_RVM_STRING error_msg)) +T_RVM_RETURN etm_set_info (T_RVF_ADDR_ID addr_id, + T_RV_RETURN return_path[], + T_RVF_MB_ID bk_id[], + T_RVM_RETURN (*rvm_error_ft)(T_RVM_NAME swe_name, + T_RVM_RETURN error_cause, + T_RVM_ERROR_TYPE error_type, + T_RVM_STRING error_msg)) { - /* Create instance gathering all the variable used by EXPL instance */ - if (rvf_get_buf(bk_id[0], - sizeof(T_ETM_ENV_CTRL_BLK), - (T_RVF_BUFFER**)&etm_env_ctrl_blk) != RVF_GREEN) - { - /* The environemnt will cancel the ETM instance creation. */ - return RVM_MEMORY_ERR; - } + /* Create instance gathering all the variable used by EXPL instance */ + if (rvf_get_buf(bk_id[0], + sizeof(T_ETM_ENV_CTRL_BLK), + (T_RVF_BUFFER**)&etm_env_ctrl_blk) != RVF_GREEN) + { + /* The environemnt will cancel the ETM instance creation. */ + return RVM_MEMORY_ERR; + } - /* Store the pointer to the error function */ - etm_env_ctrl_blk->error_ft = rvm_error_ft ; - /* Store the mem bank id. */ - etm_env_ctrl_blk->prim_id = bk_id[0]; + /* Store the pointer to the error function */ + etm_env_ctrl_blk->error_ft = rvm_error_ft ; + /* Store the mem bank id. */ + etm_env_ctrl_blk->prim_id = bk_id[0]; /* Store the addr id */ - etm_env_ctrl_blk->addr_id = addr_id; + etm_env_ctrl_blk->addr_id = addr_id; - /* - * Task ID (task_id) and Memory bank ID (mb_id) can be retrieved later - * using rvf_get_taskid and rvf_get_mb_id functions. - */ + /* + * Task ID (task_id) and Memory bank ID (mb_id) can be retrieved later + * using rvf_get_taskid and rvf_get_mb_id functions. + */ - /* return_path of linked SWE -> not used */ + /* return_path of linked SWE -> not used */ - return RVM_OK; + return RVM_OK; } /****************************************************************************** -* Function : etm_init +* Function : etm_init * * Description : This function is called by the RV manager to initialize the -* etm SWE before creating the task and calling etm_start. +* etm SWE before creating the task and calling etm_start. * * Parameters : None * * Return : T_RVM_RETURN * -* History : 0.1 (20-August-2000) -* +* History : 0.1 (20-August-2000) +* * ******************************************************************************/ @@ -171,29 +171,29 @@ /****************************************************************************** -* Function : etm_start +* Function : etm_start * * Description : This function is called by the RV manager to start the etm -* SWE, it is the body of the task. +* SWE, it is the body of the task. * * Parameters : None * * Return : T_RVM_RETURN * -* History : 0.1 -* +* History : 0.1 +* * ******************************************************************************/ T_RVM_RETURN etm_start(void) { etm_task(); - return RV_OK; + return RV_OK; } /****************************************************************************** -* Function : etm_stop +* Function : etm_stop * * Description : This function is called by the RV manager to stop the etm SWE. * @@ -201,32 +201,32 @@ * * Return : T_RVM_RETURN * -* History : 0.1 +* History : 0.1 * ******************************************************************************/ T_RVM_RETURN etm_stop(void) { - return RVM_OK; + return RVM_OK; } /****************************************************************************** -* Function : etm_kill +* Function : etm_kill * * Description : This function is called by the RV manager to kill the etm -* SWE, after the etm_stop function has been called. +* SWE, after the etm_stop function has been called. * * Parameters : None * * Return : T_RVM_RETURN * -* History : 0.1 -* +* History : 0.1 +* * ******************************************************************************/ T_RVM_RETURN etm_kill (void) { - rvf_free_buf(etm_env_ctrl_blk); - return RVM_OK; + rvf_free_buf(etm_env_ctrl_blk); + return RVM_OK; }