Commit Graph

8 Commits (52c6048dc8c3dba2f8de4a4a425455b970a801c8)

Author SHA1 Message Date
Russ Butler 6527cf2bad Update files to include SPDX-License-Identifier
Update the header of all files to use a newer license template which
includes SPDX-License-Identifier.
2019-02-22 10:53:24 -06:00
Russ Butler 9f116d9f33 Applied more astyle fixes 2019-02-22 10:53:24 -06:00
Russ Butler 8d731561cf Remove inclusion of mbed.h from USB
Remove mbed.h from USB files and fix the build errors this causes.
This is required to pass CI.
2019-02-22 10:53:23 -06:00
Russ Butler 33756e2316 Add the PolledQueue implementation of TaskQueue
Add the PolledQueue class which provides a TaskQueue which is run
by calling PolledQueue::process.
2019-02-22 10:53:17 -06:00
Russ Butler 29e59d6b83 Add the TaskQueue abstract interface and friends
Add the classes Task, TaskBase and TaskQueue. TaskQueue queue is an
interface class which can be implemented by anything which can run
code. Task and TaskBase are concrete classes which allow callbacks
to be posted to a TaskQueue to be run.
2019-02-22 10:53:17 -06:00
Russ Butler 4b609b6240 Add circular byte buffer using dynamic memory
Add the ByteBuffer class which is similar to the CircularBuffer class
but uses dynamic memory rather than template parameters and is
optimized for byte transfers. This is required for USBAudio which
needs a high performance circular buffer which can be resized at
runtime.
2019-02-22 10:53:17 -06:00
Russ Butler c709f68434 Refactor AsyncOp class
Add the OperationList class to simplify managing async operations.
Add a callback to the AsyncOp class so completion can be signaled with
another mechanism. Finally rework the lock handling so AsyncOp::wait
is passed the lock to use rather than taking it in a constructor.
2019-02-22 10:53:15 -06:00
Russ Butler 0d8c8f0a28 Add USB utility classes
Add an allocation free linked list implementation. Additionally add
the class AsyncOp which provides blocking and wakeup funcionality
to simplify making asynchronous operations block.
2019-02-22 10:52:34 -06:00