summaryrefslogtreecommitdiff
path: root/board/twinkie
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2015-01-06 09:21:40 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-08 00:38:09 +0000
commit18d3bde7f89cb0bf62e3703d1954791dbb2a0df3 (patch)
treea0f34ab79e78d60d7d27ef0132a78d7007caa817 /board/twinkie
parent5062e5a1714f9a90ffc3227a280bf8d793cdfc83 (diff)
downloadchrome-ec-18d3bde7f89cb0bf62e3703d1954791dbb2a0df3.tar.gz
USB: Add memcpy_from_usbram and update existing memcpy
Previously there was just a memcpy_usbram that copied to USB packet memory, and no routine to copy out. This adds the "from" version and renames and improves to "to" version. The improvement is that the new "to" version correctly handles unaligned beginning and endings of the region to be copied. These need to be read/modify/write accesses since the USB packet ram has to be manipulated in 16-bit chunks. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Verify that discovery-stm32f072 still enumerates and communicates correctly over USB. Change-Id: I94353e66ad0248d4e674abb29f9a88e979767655 Reviewed-on: https://chromium-review.googlesource.com/238764 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Vic Yang <victoryang@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org> Trybot-Ready: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'board/twinkie')
-rw-r--r--board/twinkie/sniffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/board/twinkie/sniffer.c b/board/twinkie/sniffer.c
index e6a0cff0a4..e1f2d5c8c2 100644
--- a/board/twinkie/sniffer.c
+++ b/board/twinkie/sniffer.c
@@ -289,8 +289,8 @@ void sniffer_task(void)
}
ep_buf[u][0] = sample_seq[d >> 3] | (d & 7);
ep_buf[u][1] = sample_tstamp[d >> 3];
- memcpy_usbram(ep_buf[u] + 2,
- samples[d >> 4]+off, EP_PAYLOAD_SIZE);
+ memcpy_to_usbram(ep_buf[u] + 2,
+ samples[d >> 4]+off, EP_PAYLOAD_SIZE);
atomic_clear((uint32_t *)&free_usb, 1 << u);
u = !u;
atomic_clear((uint32_t *)&filled_dma, 1 << d);