forked from nanovna-v2/NanoVNA2-firmware
-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.hpp
65 lines (46 loc) · 1.69 KB
/
main.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#pragma once
#include <stdint.h>
#include <mculib/small_function.hpp>
#include "common.hpp"
// DO NOT INCLUDE THIS FILE OTHER THAN FROM main2.cpp and ui.cpp!!!!!
// ONLY ui.cpp IS ALLOWED TO CALL FUNCTIONS DEFINED IN main2.cpp!!!!!
// The following are the application callback functions that the
// UI code will call to perform actions.
extern bool cpu_enable_fpu(void);
namespace UIActions {
void cal_collect(int type);
void cal_done(void);
void cal_reset(void);
void cal_reset_all(void);
void rebuild_bbgain(void);
void set_sweep_frequency(SweepParameter type, freqHz_t frequency);
void set_sweep_points(int points);
freqHz_t get_sweep_frequency(int type);
void set_measurement_mode(enum MeasurementMode mode);
freqHz_t frequencyAt(int index);
void toggle_sweep(void);
void enable_refresh(bool enable);
void set_trace_type(int t, int type);
void set_trace_channel(int t, int channel);
void set_trace_scale(int t, float scale);
void set_trace_refpos(int t, float refpos);
void set_electrical_delay(float picoseconds);
float get_electrical_delay(void);
void apply_edelay_at(int i);
void set_averaging(int i);
void set_adf4350_txPower(int i);
int caldata_save(int id);
int caldata_recall(int id);
int config_save();
int config_recall();
void printTouchCal();
void enterBootload();
void reconnectUSB();
// process all outstanding events in the main event queue.
void application_doEvents();
// process up to one outstanding event in the main event queue.
// This can lead to ui_process() being called.
void application_doSingleEvent();
// register a callback to be called from the main thread at earliest opportunity.
void enqueueEvent(const small_function<void()>& cb);
}