FreeCalypso > hg > fc-tourmaline
view src/cs/services/vibr/vibr_api.c @ 300:edcb8364d45b
L1: resurrect TCH tap feature
In this new incarnation of our TCH tap feature, we support DL sniffing
in all 3 of FR1, HR1 and EFR, and the new implementation will capture
every 20 ms frame where the old one silently skipped a frame (sent
nothing) during FACCH stealing. The wire interface on RVTMUX changed
slightly, and fc-shell tch record will need to be updated to support
the new version.
TCH UL play or substitution is supported for FR1 and EFR only;
support for HR1 can be added later if needed.
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Tue, 13 Dec 2022 02:44:01 +0000 |
| parents | e17bdedfbf2b |
| children |
line wrap: on
line source
/* * The implementation of our external API functions lives here. */ #include "vibr/vibr_api.h" #include "vibr/vibr_env.h" #include "vibr/vibr_messages_i.h" #include "rv/rv_general.h" #include "rvf/rvf_api.h" #include "rvm/rvm_use_id_list.h" T_RV_RET vibr_pulse_train_start(UINT8 num_pulses, UINT8 vibr_level) { struct vibr_start_msg *msg; if (!vibr_env) return RV_NOT_READY; if (rvf_get_buf(vibr_env->prim_id, sizeof(struct vibr_start_msg), (T_RVF_BUFFER **)&msg) == RVF_RED) { rvf_send_trace( "rvf_get_buf() failed in vibr_pulse_train_start()", 48, NULL_PARAM, RV_TRACE_LEVEL_ERROR, VIBR_USE_ID); return RV_MEMORY_ERR; } msg->hdr.msg_id = VIBR_START_REQ; msg->hdr.src_addr_id = vibr_env->addr_id; msg->hdr.dest_addr_id = vibr_env->addr_id; msg->hdr.callback_func = NULL; msg->num_pulses = num_pulses; msg->vibr_level = vibr_level; if (rvf_send_msg(vibr_env->addr_id, msg) != RV_OK) { rvf_send_trace("vibr_pulse_train_start(): Send failed!", 38, NULL_PARAM, RV_TRACE_LEVEL_ERROR, VIBR_USE_ID); rvf_free_buf(msg); return RV_INTERNAL_ERR; } return RV_OK; } T_RV_RET vibr_pulse_train_stop(void) { struct vibr_stop_msg *msg; if (!vibr_env) return RV_NOT_READY; if (rvf_get_buf(vibr_env->prim_id, sizeof(struct vibr_stop_msg), (T_RVF_BUFFER **)&msg) == RVF_RED) { rvf_send_trace( "rvf_get_buf() failed in vibr_pulse_train_stop()", 47, NULL_PARAM, RV_TRACE_LEVEL_ERROR, VIBR_USE_ID); return RV_MEMORY_ERR; } msg->hdr.msg_id = VIBR_STOP_REQ; msg->hdr.src_addr_id = vibr_env->addr_id; msg->hdr.dest_addr_id = vibr_env->addr_id; msg->hdr.callback_func = NULL; if (rvf_send_msg(vibr_env->addr_id, msg) != RV_OK) { rvf_send_trace("vibr_pulse_train_stop(): Send failed!", 37, NULL_PARAM, RV_TRACE_LEVEL_ERROR, VIBR_USE_ID); rvf_free_buf(msg); return RV_INTERNAL_ERR; } return RV_OK; }
