Skip to content

Commit

Permalink
Profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
peterantypas committed Nov 3, 2020
1 parent c8aa111 commit 7ea1e42
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions latest/Firmware/Src/Receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bool Receiver::init()
//DBG("Configuring IC\r\n");
configure();
resetBitScanner();
//configureGPIOsForRX();
configureGPIOsForRX();

return true;
}
Expand All @@ -76,10 +76,11 @@ void Receiver::switchToChannel(VHFChannel channel)
mSwitchToChannel = channel;
}

// TODO: This is a really, really long operation - over 150us !!!
// TODO: This is a really, really long operation - over 320us !!!
void Receiver::startListening(VHFChannel channel)
{
configureGPIOsForRX();
bsp_signal_high();
//configureGPIOsForRX();

mChannel = channel;
RX_OPTIONS options;
Expand All @@ -91,6 +92,7 @@ void Receiver::startListening(VHFChannel channel)
options.next_state3 = 0;

sendCmd (START_RX, &options, sizeof options, NULL, 0);
bsp_signal_low();
}

void Receiver::resetBitScanner()
Expand Down Expand Up @@ -255,10 +257,10 @@ void Receiver::pushPacket()

if ( p )
{
bsp_signal_high();
//bsp_signal_high();
p->rxPacket = currPacket;
EventQueue::instance().push(p);
bsp_signal_low();
//bsp_signal_low();
}

mRXPacket->reset();
Expand Down

0 comments on commit 7ea1e42

Please sign in to comment.