diff options
author | Brian J. Nemec <bnemec@chromium.org> | 2020-05-23 23:04:31 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-04 14:49:43 +0000 |
commit | 11b912091e133568483e92b5aa7fadbf882e5e92 (patch) | |
tree | 92d5786eb1fd01fbb66a131ef5b9a6855968c09f /chip/stm32/usb_spi.c | |
parent | f5e6ae210518bae0dc9a577d98c80a805b764fce (diff) | |
download | chrome-ec-11b912091e133568483e92b5aa7fadbf882e5e92.tar.gz |
ec: Minor cleanup of magic number commonly used in STM32 USB
Minor cleanup of a commonly used magic number in the STM32
USB interface.
BUG=none
BRANCH=none
TEST=Builds
Signed-off-by: Brian Nemec <bnemec@chromium.org>
Change-Id: I2c0b7947810aae651e452db42ac27221ab19b99b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2224763
Tested-by: Brian Nemec <bnemec@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Brian Nemec <bnemec@chromium.org>
Diffstat (limited to 'chip/stm32/usb_spi.c')
-rw-r--r-- | chip/stm32/usb_spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/stm32/usb_spi.c b/chip/stm32/usb_spi.c index 597d4c5df7..1846e8efcd 100644 --- a/chip/stm32/usb_spi.c +++ b/chip/stm32/usb_spi.c @@ -25,7 +25,7 @@ static int16_t usb_spi_map_error(int error) static uint16_t usb_spi_read_packet(struct usb_spi_config const *config) { size_t i; - uint16_t bytes = btable_ep[config->endpoint].rx_count & 0x3ff; + uint16_t bytes = btable_ep[config->endpoint].rx_count & RX_COUNT_MASK; size_t count = MAX((bytes + 1) / 2, USB_MAX_PACKET_SIZE / 2); /* |