mbgtools-lx
4.2.8
|
Data Structures | |
struct | SYNTH |
Synthesizer configuration parameters. More... | |
struct | SYNTH_STATE |
A structure used to report the synthesizer state. More... | |
Macros | |
#define | N_SYNTH_FREQ_DIGIT 4 |
number of digits to edit More... | |
#define | MAX_SYNTH_FREQ 1000 |
if range == MAX_SYNTH_RANGE More... | |
#define | MIN_SYNTH_RANGE 0 |
#define | MAX_SYNTH_RANGE 5 |
#define | N_SYNTH_RANGE ( MAX_SYNTH_RANGE - MIN_SYNTH_RANGE + 1 ) |
#define | N_SYNTH_PHASE_DIGIT 4 |
#define | MAX_SYNTH_PHASE 3600 |
#define | MAX_SYNTH_FREQ_EDIT 9999 |
max sequence of digits when editing More... | |
#define | MAX_SYNTH_FREQ_VAL 10000000UL |
The maximum frequency that can be configured for the synthesizer. More... | |
#define | SYNTH_PHASE_SYNC_LIMIT 10000UL |
The synthesizer's phase is only be synchronized if the frequency is below this limit. More... | |
#define | _synth_dp_pos_from_range(_r) ( ( ( N_SYNTH_RANGE - (_r) ) % ( N_SYNTH_FREQ_DIGIT - 1 ) ) + 1 ) |
#define | DEFAULT_FREQ_RANGES |
Synthesizer frequency units. More... | |
#define | _mbg_swab_synth(_p) |
#define | _mbg_swab_synth_state(_p) _nop_macro_fnc() |
#define | SYNTH_FLAG_PHASE_IGNORED 0x01 |
Enumerations | |
enum | SYNTH_STATES { SYNTH_DISABLED, SYNTH_OFF, SYNTH_FREE, SYNTH_DRIFTING, SYNTH_SYNC, N_SYNTH_STATE } |
Enumeration of synthesizer states. More... | |
Synthesizer frequency is expressed as a four digit decimal number (freq) to be multiplied by 0.1 Hz and an base 10 exponent (range). If the effective frequency is less than 10 kHz its phase is synchronized corresponding to the variable phase. Phase may be in a range from -360 deg to +360 deg with a resolution of 0.1 deg, so the resulting numbers to be stored are in a range of -3600 to +3600.
Example:
Assume the value of freq is 2345 (decimal) and the value of phase is 900. If range == 0 the effective frequency is 234.5 Hz with a phase of +90 deg. If range == 1 the synthesizer will generate a 2345 Hz output frequency and so on.
Limitations:
If freq == 0 the synthesizer is disabled. If range == 0 the least significant digit of freq is limited to 0, 3, 5 or 6. The resulting frequency is shown in the examples below:
If range == MAX_SYNTH_RANGE the value of freq must not exceed 1000, so the output frequency is limited to 10 MHz (see MAX_SYNTH_FREQ_VAL).
#define _mbg_swab_synth | ( | _p | ) |
Definition at line 2864 of file gpsdefs.h.
Referenced by mbg_get_synth(), mbg_set_synth(), mbgextio_get_synth(), and mbgextio_set_synth().
#define _mbg_swab_synth_state | ( | _p | ) | _nop_macro_fnc() |
Definition at line 2897 of file gpsdefs.h.
Referenced by mbg_get_synth_state().
#define _synth_dp_pos_from_range | ( | _r | ) | ( ( ( N_SYNTH_RANGE - (_r) ) % ( N_SYNTH_FREQ_DIGIT - 1 ) ) + 1 ) |
#define DEFAULT_FREQ_RANGES |
Synthesizer frequency units.
An initializer for commonly displayed synthesizer frequency units (N_SYNTH_RANGE strings)
#define MAX_SYNTH_FREQ 1000 |
if range == MAX_SYNTH_RANGE
#define MAX_SYNTH_FREQ_EDIT 9999 |
#define MAX_SYNTH_FREQ_VAL 10000000UL |
#define N_SYNTH_RANGE ( MAX_SYNTH_RANGE - MIN_SYNTH_RANGE + 1 ) |
#define SYNTH_PHASE_SYNC_LIMIT 10000UL |
enum SYNTH_STATES |
Enumeration of synthesizer states.