diff options
author | Nicolas Boichat <drinkcat@google.com> | 2017-03-14 11:03:11 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-03-16 11:25:50 -0700 |
commit | 391056f9eea24cf19bc7d1571d7db18a3d0ae683 (patch) | |
tree | f1bcebbf50779cf8acbada01400d7a1bc593f21b /chip | |
parent | 236a70f726ae0a1f0e77312eb3e86418ca1eeda1 (diff) | |
download | chrome-ec-391056f9eea24cf19bc7d1571d7db18a3d0ae683.tar.gz |
usb: Cleanup headers
Let's split the usb headers in 3 different parts, instead of having
usb_descriptor.h pull in usb_hw.h and usb_api.h.
- usb_api.h: EC functions related to usb (e.g. connect/disconnect)
- usb_descriptor.h: common USB names and structures
- usb_hw.h: Functions required for interactive with EC's USB HW
BRANCH=none
BUG=b:35587171
TEST=make buildall -j
Change-Id: I37ead61e3be5e7ae464f1c9137cf02eaab0ff92e
Reviewed-on: https://chromium-review.googlesource.com/454861
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/g/usb-stream.h | 1 | ||||
-rw-r--r-- | chip/g/usb.c | 1 | ||||
-rw-r--r-- | chip/g/usb_console.c | 1 | ||||
-rw-r--r-- | chip/stm32/usb-stream.c | 2 | ||||
-rw-r--r-- | chip/stm32/usb-stream.h | 1 | ||||
-rw-r--r-- | chip/stm32/usb.c | 2 | ||||
-rw-r--r-- | chip/stm32/usb_console.c | 2 | ||||
-rw-r--r-- | chip/stm32/usb_gpio.h | 1 | ||||
-rw-r--r-- | chip/stm32/usb_hid.c | 1 | ||||
-rw-r--r-- | chip/stm32/usb_hid_keyboard.c | 2 | ||||
-rw-r--r-- | chip/stm32/usb_hid_touchpad.c | 2 | ||||
-rw-r--r-- | chip/stm32/usb_spi.c | 1 | ||||
-rw-r--r-- | chip/stm32/usb_spi.h | 1 |
13 files changed, 17 insertions, 1 deletions
diff --git a/chip/g/usb-stream.h b/chip/g/usb-stream.h index b789c65925..5eb03865b0 100644 --- a/chip/g/usb-stream.h +++ b/chip/g/usb-stream.h @@ -14,6 +14,7 @@ #include "producer.h" #include "queue.h" #include "usb_descriptor.h" +#include "usb_hw.h" /* * Compile time Per-USB stream configuration stored in flash. Instances of this diff --git a/chip/g/usb.c b/chip/g/usb.c index 05e58cd210..32b347e3ab 100644 --- a/chip/g/usb.c +++ b/chip/g/usb.c @@ -19,6 +19,7 @@ #include "timer.h" #include "util.h" #include "usb_descriptor.h" +#include "usb_hw.h" #include "watchdog.h" /****************************************************************************/ diff --git a/chip/g/usb_console.c b/chip/g/usb_console.c index b9c35a53f2..c3e1e09c01 100644 --- a/chip/g/usb_console.c +++ b/chip/g/usb_console.c @@ -14,6 +14,7 @@ #include "timer.h" #include "util.h" #include "usb_descriptor.h" +#include "usb_hw.h" /* Console output macro */ #define CPRINTF(format, args...) cprintf(CC_USB, format, ## args) diff --git a/chip/stm32/usb-stream.c b/chip/stm32/usb-stream.c index d077cb553b..45c57e6ab1 100644 --- a/chip/stm32/usb-stream.c +++ b/chip/stm32/usb-stream.c @@ -12,7 +12,7 @@ #include "task.h" #include "timer.h" #include "util.h" -#include "usb_descriptor.h" +#include "usb_hw.h" #include "usb-stream.h" static size_t rx_read(struct usb_stream_config const *config) diff --git a/chip/stm32/usb-stream.h b/chip/stm32/usb-stream.h index 785ee3e9a8..f829009c51 100644 --- a/chip/stm32/usb-stream.h +++ b/chip/stm32/usb-stream.h @@ -17,6 +17,7 @@ #include "producer.h" #include "queue.h" #include "usb_descriptor.h" +#include "usb_hw.h" #include <stdint.h> diff --git a/chip/stm32/usb.c b/chip/stm32/usb.c index fae1e26297..953bac0b46 100644 --- a/chip/stm32/usb.c +++ b/chip/stm32/usb.c @@ -16,7 +16,9 @@ #include "task.h" #include "timer.h" #include "util.h" +#include "usb_api.h" #include "usb_descriptor.h" +#include "usb_hw.h" /* Console output macro */ #define CPRINTF(format, args...) cprintf(CC_USB, format, ## args) diff --git a/chip/stm32/usb_console.c b/chip/stm32/usb_console.c index b9483dd0fc..c2a40918f2 100644 --- a/chip/stm32/usb_console.c +++ b/chip/stm32/usb_console.c @@ -12,7 +12,9 @@ #include "task.h" #include "timer.h" #include "util.h" +#include "usb_api.h" #include "usb_descriptor.h" +#include "usb_hw.h" /* Console output macro */ #define CPRINTF(format, args...) cprintf(CC_USB, format, ## args) diff --git a/chip/stm32/usb_gpio.h b/chip/stm32/usb_gpio.h index 8f544a002a..cfbded61bf 100644 --- a/chip/stm32/usb_gpio.h +++ b/chip/stm32/usb_gpio.h @@ -9,6 +9,7 @@ #include "compile_time_macros.h" #include "usb_descriptor.h" +#include "usb_hw.h" struct usb_gpio_state { uint32_t set_mask; diff --git a/chip/stm32/usb_hid.c b/chip/stm32/usb_hid.c index 79668ad0de..5561c8afad 100644 --- a/chip/stm32/usb_hid.c +++ b/chip/stm32/usb_hid.c @@ -15,6 +15,7 @@ #include "timer.h" #include "util.h" #include "usb_descriptor.h" +#include "usb_hw.h" #include "usb_hid.h" /* Console output macro */ diff --git a/chip/stm32/usb_hid_keyboard.c b/chip/stm32/usb_hid_keyboard.c index 91b8c8ed35..da3c215050 100644 --- a/chip/stm32/usb_hid_keyboard.c +++ b/chip/stm32/usb_hid_keyboard.c @@ -17,7 +17,9 @@ #include "task.h" #include "timer.h" #include "util.h" +#include "usb_api.h" #include "usb_descriptor.h" +#include "usb_hw.h" #include "usb_hid.h" #include "usb_hid_hw.h" diff --git a/chip/stm32/usb_hid_touchpad.c b/chip/stm32/usb_hid_touchpad.c index 15b7f6554c..af2334e0f1 100644 --- a/chip/stm32/usb_hid_touchpad.c +++ b/chip/stm32/usb_hid_touchpad.c @@ -14,7 +14,9 @@ #include "task.h" #include "timer.h" #include "util.h" +#include "usb_api.h" #include "usb_descriptor.h" +#include "usb_hw.h" #include "usb_hid.h" #include "usb_hid_hw.h" #include "usb_hid_touchpad.h" diff --git a/chip/stm32/usb_spi.c b/chip/stm32/usb_spi.c index 1a54d5f6b7..ca540c3c7c 100644 --- a/chip/stm32/usb_spi.c +++ b/chip/stm32/usb_spi.c @@ -8,6 +8,7 @@ #include "registers.h" #include "spi.h" #include "usb_descriptor.h" +#include "usb_hw.h" #include "usb_spi.h" #include "util.h" diff --git a/chip/stm32/usb_spi.h b/chip/stm32/usb_spi.h index 9a061af0c3..3c71fd4bc6 100644 --- a/chip/stm32/usb_spi.h +++ b/chip/stm32/usb_spi.h @@ -10,6 +10,7 @@ #include "compile_time_macros.h" #include "hooks.h" #include "usb_descriptor.h" +#include "usb_hw.h" /* * Command: |