mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-06 23:51:28 +00:00
97a1d1671b224b4b6bfda0029edf6c02f932f7a7
The format of an ep packet header (8 bytes) : Packets for cc1: [sample_tstamp, sample_seq, vbus_voltage, tstamp_offset] Packets for cc2: [sample_tstamp, sample_seq, vbus_current, tstamp_offset] Updated: use array to implement a circular queue; when a forming a packet, remove one element from the queue. In this way, we can capture more samples of vbus information. Updated: when sniffer task has not started sending packets, most recent vbus info is always stored at the first position of the queue, making sure that the first reported vbus info is the most recent one. Updated: allow user to compile the original version or the new version of the source code. In ec/board/twinkie/board.h Use #define CONFIG_USBC_SNIFFER_HEADER_V1, if you do not want twinkie to send out vbus info; Use #define CONFIG_USBC_SNIFFER_HEADER_V2, if you want twinkie to send out vbus info. Signed-off-by: Dawei Li <daweili@google.com> BUG=chrome-os-partner:42703 BRANCH=none TEST=BEGIN connect Twinkie to a waveform generator, record data using: sudo sigrok-cli -d chromium-twinkie --continuous -o test.sr then check the resulting waveforms on pulseview. END Change-Id: Ifdb6402eb7d998ffb25128c510d1780491b11872 Reviewed-on: https://chromium-review.googlesource.com/282388 Commit-Ready: Sheng-liang Song <ssl@chromium.org> Tested-by: Dawei Li <daweili@google.com> Reviewed-by: Sheng-liang Song <ssl@chromium.org>
For an overview of the Embedded Controller firmware, refer to http://www.chromium.org/chromium-os/2014-firmware-summit
Description
Languages
C
64.7%
Lasso
20.7%
ASL
3.6%
JavaScript
3.2%
C#
2.9%
Other
4.6%