view rvinterf/lowlevel/format_fc.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 8fc3b72eb2c6
children
line wrap: on
line source

/*
 * This module has been split off from format.c; it implements the decoding
 * of those Rx packet types which have been invented in FreeCalypso.
 */

#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include "../include/pktmux.h"
#include "../include/limits.h"

extern u_char rxpkt[];
extern size_t rxpkt_len;

extern void output_cont_logpref();

void
print_ati_output()
{
	char fmtbuf[MAX_PKT_FROM_TARGET*4+2];

	strcpy(fmtbuf, "ATI: ");
	safe_print_trace(rxpkt + 1, (int)rxpkt_len - 1, fmtbuf + 5);
	output_line(fmtbuf);
}

void
print_fc_lld_msg()
{
	char fmtbuf[MAX_PKT_FROM_TARGET*4+2];

	strcpy(fmtbuf, "LLD: ");
	safe_print_trace(rxpkt + 1, (int)rxpkt_len - 1, fmtbuf + 5);
	output_line(fmtbuf);
}

void
print_tch_output_raw()
{
	output_line("Rx TCH packet");
	packet_hex_dump(rxpkt, (unsigned) rxpkt_len, output_cont_logpref);
}

void
report_extui_packet()
{
	char fmtbuf[80];

	sprintf(fmtbuf, "LCD OUT: row %u col %u-%u", rxpkt[1], rxpkt[2],
		rxpkt[2] + (rxpkt_len - 3) / 2 - 1);
	output_line(fmtbuf);
}