FreeCalypso > hg > freecalypso-tools
view rvinterf/asyncshell/poweroff.c @ 995:74024eb17e04
fc-loadtool help: improve language regarding 16 MiB flash chips
In FC project history, 16 MiB flash originally meant Pirelli DP-L10.
Then we got FCDEV3B with the same flash (our own design), but now we are
discovering more Calypso devices that used such large flash, both late
Calypso era (Sony Ericsson K2x0) as well as much earlier ones (FIC FLUID
devices.txt file with 2004 dates, Leonardo+ rev 5). Hence we need to
migrate to more generic or neutral language in associated documentation,
without giving elevated status to specific examples that drove our
early project history.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 03 Dec 2023 21:11:12 +0000 |
parents | e7502631a0f9 |
children |
line wrap: on
line source
/* * fc-shell poweroff and tgtreset commands */ #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include "pktmux.h" #include "etm.h" send_etm_cmd(buf, len) u_char *buf; { int i, c; buf[0] = RVT_TM_HEADER; c = 0; for (i = 1; i <= len; i++) c ^= buf[i]; buf[i] = c; send_pkt_to_target(buf, len + 2); return 0; } cmd_poweroff() { u_char cmdpkt[7]; cmdpkt[1] = ETM_CORE; cmdpkt[2] = TMCORE_OPC_CODEC_WR; cmdpkt[3] = 30; /* VRPCDEV */ cmdpkt[4] = 0x01; /* low 8 bits */ cmdpkt[5] = 0; /* high 2 bits */ return send_etm_cmd(cmdpkt, 5); } cmd_tgtreset() { u_char cmdpkt[4]; cmdpkt[1] = ETM_CORE; cmdpkt[2] = TMCORE_OPC_RESET; return send_etm_cmd(cmdpkt, 2); }