twinkie: send raw packet traces to sniffer endpoint

When using the PD packet tracer and we are in raw mode (aka 'tw trace
raw'), send the packet data to the sniffer endpoint rather than the USB
console. This way we avoid having mixed asynchronous packet trace inside
our command trace.
Then, put the raw packet trace in binary rather than text, with
following format (as 32-bit words) :
[0] micro-second timestamp
[2] PD header
[2..8] PD payloads (unused ones might be junk)
[9..15] junk

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BRANCH=twinkie
BUG=none
TEST=trace a PD sequence with Twebkie.

Change-Id: I551ab468f663b2702b7d6e3f0bb51bdb9cfb414a
Reviewed-on: https://chromium-review.googlesource.com/742920
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Trybot-Ready: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
4 files changed