2020-08-24 19:06:50 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include "Protocol.hpp"
|
2020-09-11 23:08:30 +02:00
|
|
|
#include "FPGA/FPGA.hpp"
|
2020-08-24 19:06:50 +02:00
|
|
|
|
|
|
|
|
namespace VNA {
|
|
|
|
|
|
|
|
|
|
using SweepCallback = void(*)(Protocol::Datapoint);
|
|
|
|
|
using StatusCallback = void(*)(FPGA::SamplingResult);
|
|
|
|
|
|
|
|
|
|
bool Init();
|
2020-09-15 23:22:08 +02:00
|
|
|
// returns whether the sweep is actually started
|
2020-08-24 19:06:50 +02:00
|
|
|
bool ConfigureSweep(Protocol::SweepSettings s, SweepCallback cb);
|
|
|
|
|
bool ConfigureManual(Protocol::ManualControl m, StatusCallback cb);
|
2020-09-13 18:01:32 +02:00
|
|
|
bool ConfigureGenerator(Protocol::GeneratorSettings g);
|
2020-09-14 23:13:32 +02:00
|
|
|
void SetIdle();
|
2020-09-12 12:17:35 +02:00
|
|
|
|
|
|
|
|
// Only call the following function when the sweep is inactive
|
2020-08-24 19:06:50 +02:00
|
|
|
bool GetTemps(uint8_t *source, uint8_t *lo);
|
2020-09-12 12:17:35 +02:00
|
|
|
void fillDeviceInfo(Protocol::DeviceInfo *info);
|
|
|
|
|
namespace Ref {
|
|
|
|
|
bool available();
|
|
|
|
|
bool applySettings(Protocol::ReferenceSettings s);
|
|
|
|
|
}
|
2020-08-24 19:06:50 +02:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|