Plumb BasebandThread to accept direction argument.

Default is to receive, for compatibility with existing users.
This commit is contained in:
Jared Boone 2016-08-10 10:36:03 -07:00
parent 96da55d83a
commit 2ec1bab5d5
2 changed files with 8 additions and 4 deletions

View file

@ -44,9 +44,11 @@ Thread* BasebandThread::thread = nullptr;
BasebandThread::BasebandThread(
uint32_t sampling_rate,
BasebandProcessor* const baseband_processor,
const tprio_t priority
const tprio_t priority,
baseband::Direction direction
) : baseband_processor { baseband_processor },
sampling_rate { sampling_rate }
sampling_rate { sampling_rate },
_direction { direction }
{
thread = chThdCreateStatic(baseband_thread_wa, sizeof(baseband_thread_wa),
priority, ThreadBase::fn,