diff options
author | Jett Rink <jettrink@chromium.org> | 2020-08-12 14:35:40 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-13 22:32:24 +0000 |
commit | b0a3a4fc5df23043823a82b727c7cd4dd14b35d7 (patch) | |
tree | 8251e7a41838a87bd1222d25cfe4414146a7e158 /test/usb_pe.h | |
parent | 0df97d0e5846493c868eabe4c1647d67a946d7fd (diff) | |
download | chrome-ec-b0a3a4fc5df23043823a82b727c7cd4dd14b35d7.tar.gz |
usbc: add GEN_NOT_SUPPORTED macro for unsupported states
To enabled use of the IS_ENABLE macro we need to define some of the usb
state machine states as extern variables that will never be linked. This
allows the compiler to know about a state but will still fail the
linking phase if the config option is not defined properly.
This is just adding a convenience macro for this paradigm, not creating
the paradigm itself.
BRANCH=none
BUG=none
TEST=builds
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Ia19b5babd43d536f043745314481475cf25f6e01
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2353369
Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'test/usb_pe.h')
-rw-r--r-- | test/usb_pe.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/usb_pe.h b/test/usb_pe.h index 3ba11ce040..bb9cd3f508 100644 --- a/test/usb_pe.h +++ b/test/usb_pe.h @@ -131,21 +131,19 @@ enum usb_pe_state { PE_DR_SNK_GET_SINK_CAP, PE_DR_SNK_GIVE_SOURCE_CAP, -#ifdef CONFIG_USB_PD_REV30 + /* AMS Start parent - runs SenderResponseTimer */ + PE_SENDER_RESPONSE, + /* PD3.0 only states below here*/ PE_FRS_SNK_SRC_START_AMS, -#ifdef CONFIG_USB_PD_EXTENDED_MESSAGES PE_GIVE_BATTERY_CAP, PE_GIVE_BATTERY_STATUS, PE_SEND_ALERT, -#else PE_SRC_CHUNK_RECEIVED, PE_SNK_CHUNK_RECEIVED, -#endif /* CONFIG_USB_PD_EXTENDED_MESSAGES */ /* Super States */ PE_PRS_FRS_SHARED, -#endif /* CONFIG_USB_PD_REV30 */ }; void set_state_pe(const int port, const enum usb_pe_state new_state); |