FreeCalypso > hg > freecalypso-tools
view rvinterf/lowlevel/tchhide.c @ 1001:7df4c9ae6ba4
loadtools/scripts: w220.{config,init} => chimei.{config,init}
Motorola W220, first touched by FreeCalypso in 2019-05, is an ODM phone
made by Chi-Mei, and its peculiar property of relevance to loadtools
is that it has XRAM on Calypso nCS3 instead of the usual nCS1 - which
matters for fc-xram. We are now discovering other Chi-Mei phones
including Sony Ericsson J120, and they share the same quirk of XRAM
on nCS3 - hence we rename this loadtools target from w220 to chimei.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 09 Dec 2023 17:53:44 +0000 |
parents | a1065c17429c |
children |
line wrap: on
line source
/* * One of several FreeCalypso extensions to RVTMUX is TCH bit access * logical channel, and we would like to handle it specially in rvinterf * because it's extremely chatty, sending a frame every 20 ms. If we * were to output every TCH frame in our regular log, that log output * becomes useless as everything else is drowned out. Therefore, we * implement a hiding mode by default: we only count how many TCH packets * were exchanged in between other messages of interest, and report these * counts. */ #include <stdio.h> extern void (*output_hook)(); unsigned tch_rx_count, tch_tx_count; static void tch_report_hook() { char msgbuf[80]; output_hook = 0; if (tch_rx_count) { sprintf(msgbuf, "TCH: received %u packet%s", tch_rx_count, tch_rx_count != 1 ? "s" : ""); output_line(msgbuf); tch_rx_count = 0; } if (tch_tx_count) { sprintf(msgbuf, "TCH: sent %u packet%s", tch_tx_count, tch_tx_count != 1 ? "s" : ""); output_line(msgbuf); tch_tx_count = 0; } } void tch_inc_count_rx() { tch_rx_count++; output_hook = tch_report_hook; } void tch_inc_count_tx() { tch_tx_count++; output_hook = tch_report_hook; }