summaryrefslogtreecommitdiff
path: root/test/usb_pd_test_util.h
Commit message (Collapse)AuthorAgeFilesLines
* chocodile_vpdmcu: Firmware for chocodile mcuSam Hurst2019-04-081-0/+2
| | | | | | | | | | | | | | | | | | Implement Chocodile Charge-Through Vconn Powered firmware for mcu using new Type-C/PD State machine stack. BUG=b:115626873 BRANCH=none TEST=manual Charge-Through was tested on an Atlas running a DRP USB-C/PD state machine with CTUnattached.SNK and CTAttached.SNK states. Signed-off-by: Sam Hurst <shurst@chromium.org> Change-Id: I847f1bcd2fc3ce41e66edd133a10c943d5e8c819 Reviewed-on: https://chromium-review.googlesource.com/1225250 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Stefan Reinauer <reinauer@google.com>
* cleanup: fix all the header guardsBill Richardson2015-06-181-3/+3
| | | | | | | | | | | | | | | This unifies all the EC header files to use __CROS_EC_FILENAME_H as the include guard. Well, except for test/ util/ and extra/ which use __TEST_ __UTIL_ and __EXTRA_ prefixes respectively. BUG=chromium:496895 BRANCH=none TEST=make buildall -j Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: Iea71b3a08bdec94a11239de810a2b2e152b15029 Reviewed-on: https://chromium-review.googlesource.com/278121 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* pd: check for collisions before transmittingAlec Berg2014-12-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added check for collision just before transmitting on CC line. To check for collision, RX monitoring is left on all the time (except when in the act of receiving or transmitting, or in between receiving and sending a goodCRC), and a simple check for RX transmission started is used to see if the CC line is idle or not. RX monitoring is also changed to only trigger on 3 edges within 20us, as per the PD spec. When a collision is detected by seeing that CC is not idle, the transmitting packet is dropped. BUG=chrome-os-partner:30135 BRANCH=samus TEST=load onto samus and zinger. make sure we negotiate and make sure custom VDMs succeed. enabled pings and made sure we stay alive with pings for a few min. Also added code to pd_rx_handler to toggle a test point on EVT board to verify the timing of when we get RX interrupts: Change-Id: I22d172163319437d3d901e019eda79d4d592f6b8 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/226118 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Add back unit test for usb_pd"Vic Yang2014-10-041-0/+31
| | | | | | | | | | | | | | | | | | This is mostly the same as previous commits, but with increased delay. Previously, we have short delays (e.g. 3ms) which is too short and may cause instability. Now that we have slowed down the time when running unit tests and increased the delay, this shouldn't cause problems anymore. BUG=chrome-os-partner:31200 TEST=Repeatedly run multiple unit tests in parallel. BRANCH=Samus Change-Id: Ib55e3adc5fd27a8e233996b4799dab3cefd62318 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/220734 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Revert "Add back unit test for usb_pd"Vic Yang2014-08-151-31/+0
| | | | | | | | | | | | | | | | | This reverts commit cb7468744d8292590ddc4fb0a0b6ed7752b1490a. Apparently this test fails when running on a heavily loaded system. Revert this for now. BUG=chromium:402335,chrome-os-partner:31200 TEST=make buildall BRANCH=None Change-Id: I8b616d3915ee5c2f524530897758871cc0375d35 Reviewed-on: https://chromium-review.googlesource.com/212582 Tested-by: Vic Yang <victoryang@chromium.org> Reviewed-by: Christopher Wiley <wiley@chromium.org> Commit-Queue: Vic Yang <victoryang@chromium.org>
* Add back unit test for usb_pdVic Yang2014-08-131-0/+31
| | | | | | | | | | | | | | Add back the test but only enable USB PD tasks for usb_pd test. This should ensure that we do not break existing tests. BUG=chrome-os-partner:31200,chromium:402335 TEST=make buildall BRANCH=None Change-Id: I4daa41a96a1067362b2c40a2a09fce733843bdff Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/211923 Reviewed-by: Alec Berg <alecaberg@chromium.org>
* Revert "Add unit test for usb_pd"Alec Berg2014-08-111-31/+0
| | | | | | | | | This reverts commit 0739074fbf735cffefdac7ff6d086084449f6493. Change-Id: I1889138e5a8d5bc22d3bac2e48afe6378a59542a Reviewed-on: https://chromium-review.googlesource.com/211773 Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org> Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
* Add unit test for usb_pdVic Yang2014-08-101-0/+31
Initial commit of usb_pd unit test. The test cases are very simple. We'll add more test cases in similar format. BUG=chrome-os-partner:31200 TEST=Pass usb_pd test BRANCH=None Change-Id: I9e3de5b2c032ee1d3670cde6d8227ce0378ae8a0 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/211643 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>