Speed improvements

This commit is contained in:
Jan Käberich 2020-10-03 21:56:09 +02:00
parent 5e00b2a7f8
commit 6bc6b1d202
18 changed files with 130 additions and 108 deletions

View file

@ -30,7 +30,7 @@ static void HaltedCallback() {
}
}
static void ReadComplete(FPGA::SamplingResult result) {
static void ReadComplete(const FPGA::SamplingResult &result) {
bool needs_work = false;
switch(activeMode) {
case HW::Mode::VNA:
@ -71,6 +71,16 @@ void HW::Work() {
}
bool HW::Init() {
#ifdef USE_DEBUG_PINS
// initialize debug pins
GPIO_InitTypeDef gpio;
gpio.Pin = DEBUG1_PIN;
gpio.Mode = GPIO_MODE_OUTPUT_PP;
gpio.Speed = GPIO_SPEED_HIGH;
HAL_GPIO_Init(DEBUG1_GPIO, &gpio);
gpio.Pin = DEBUG2_PIN;
HAL_GPIO_Init(DEBUG2_GPIO, &gpio);
#endif
LOG_DEBUG("Initializing...");
activeMode = Mode::Idle;