diff options
author | Bill Richardson <wfrichar@chromium.org> | 2015-05-19 00:00:23 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-18 05:07:55 +0000 |
commit | b72a5f5e8e97ba86736c1e26b4204fc6d0c215da (patch) | |
tree | 155559713f9432bbc849bbe18a12983a672db5c6 /chip/stm32/usb_gpio.c | |
parent | dd1987051b473e74dab3490921d0cc77c76fcac3 (diff) | |
download | chrome-ec-b72a5f5e8e97ba86736c1e26b4204fc6d0c215da.tar.gz |
discovery-stm32f072: Blink the LEDs
This just makes the LEDs blink continually, because I have a
development board sitting on my desk and I like to see it doing
something.
You can still force the GPIOs on and off using the tool in
extra/usb_gpio/.
BUG=none
BRANCH=none
TEST=make buildall
Try it:
sudo make BOARD=discovery-stm32f072 flash
The LEDs blink.
Force them on and off with:
cd extra/usb_gpio
make
./usb_gpio write -1 0
./usb_gpio write 0 -1
./usb_gpio write 2 0
./usb_gpio write 4 2
To resume blinking, use
./usb_gpio write 0 0
Change-Id: Iadbe7436c02de5b6eae81885d95bad154ca3692c
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/274131
Reviewed-by: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'chip/stm32/usb_gpio.c')
-rw-r--r-- | chip/stm32/usb_gpio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chip/stm32/usb_gpio.c b/chip/stm32/usb_gpio.c index 027ddadaae..43cda832a8 100644 --- a/chip/stm32/usb_gpio.c +++ b/chip/stm32/usb_gpio.c @@ -39,6 +39,9 @@ void usb_gpio_rx(struct usb_gpio_config const *config) (uint32_t)(config->rx_ram[3]) << 16); uint32_t ignore_mask = set_mask & clear_mask; + config->state->set_mask = set_mask; + config->state->clear_mask = clear_mask; + if ((btable_ep[config->endpoint].rx_count & 0x3ff) == USB_GPIO_RX_PACKET_SIZE) { for (i = 0; i < config->num_gpios; ++i, mask <<= 1) { |