Add a bit-level transfer queue
commit6d639b09f0e3ef0c1cc38606a851e6ae9a4f4e30
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>
Sun, 12 Feb 2012 21:29:50 +0000 (12 22:29 +0100)
committerPeter Stuge <peter@stuge.se>
Fri, 6 Jul 2012 14:58:25 +0000 (6 14:58 +0000)
treeaa7993fc4fdd0a470721138883654606fa83ab47
parentedf0c3376d5394bc05b1028c5a17c19e17657dcb
Add a bit-level transfer queue

Interface drivers regularly need to keep track of where each part of a long
read buffer should be copied, once that data arrives. Both source and
destination are often at an arbitrary bit offset.

This queued bit-level copy can help with that, by allowing the driver to
perform postponed reads from the receive buffer already when building the
transmit buffer, and have those reads executed at a later time when data is
available.

For simplicity, it uses the linked list implementation list.h imported from
the Linux kernel.

Change-Id: I06862a0a6f057cbbcacfb021f17a795195faded2
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/450
Tested-by: jenkins
Reviewed-by: Xiaofan <xiaofanc@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Reviewed-by: Peter Stuge <peter@stuge.se>
src/helper/Makefile.am
src/helper/binarybuffer.c
src/helper/binarybuffer.h
src/helper/list.h [new file with mode: 0644]