Move BasebandThread init into main().

This commit is contained in:
Jared Boone 2015-12-10 16:29:50 -08:00
parent 13e4b41c1e
commit ed25f65e8b

View File

@ -105,10 +105,6 @@ static void init() {
rf::rssi::init(); rf::rssi::init();
touch::dma::init(); touch::dma::init();
baseband_thread.thread_main = chThdSelf();
baseband_thread.thread_rssi = rssi_thread.start(NORMALPRIO + 10);
baseband_thread.start(NORMALPRIO + 20);
} }
static void shutdown() { static void shutdown() {
@ -203,6 +199,9 @@ int main(void) {
); );
/* TODO: Ensure DMAs are configured to point at first LLI in chain. */ /* TODO: Ensure DMAs are configured to point at first LLI in chain. */
baseband_thread.thread_main = chThdSelf();
baseband_thread.thread_rssi = rssi_thread.start(NORMALPRIO + 10);
baseband_thread.start(NORMALPRIO + 20);
if( baseband_thread.direction() == baseband::Direction::Receive ) { if( baseband_thread.direction() == baseband::Direction::Receive ) {
rf::rssi::dma::allocate(4, 400); rf::rssi::dma::allocate(4, 400);