diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-15 07:51:52 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-15 07:51:52 -0400 |
commit | 425568bfa9c5d50732ec872f4716fe9226992037 (patch) | |
tree | 9cfc77f3593594e7642b0fc1763a7d876c6b2797 /device-functions.c | |
parent | 79f06f62d4bdc3bcd62aee7527ed5730fac66d9f (diff) |
ran dos2unix
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/device-functions.c b/device-functions.c index 9422b40..ac2acfb 100644 --- a/device-functions.c +++ b/device-functions.c @@ -1,39 +1,39 @@ -#include "device-functions.h"
-
-/* START FUNCTION DESCRIPTION ********************************************
-Set_frequency <DEVFUNC.LIB>
-
-SYNTAX: Set_frequency(int check_possible_only,int word_override,int range_override,int channel,float set_freq)
-
-KEYWORDS:
-
-DESCRIPTION: sets the offset DAC.
-
-RETURN VALUE: error code (zero = OK).
-END DESCRIPTION **********************************************************/
-
-/*----------------------------------------------------------------------------------------------------------*/
-int Set_frequency(int check_possible_only,int word_override,int range_override,int channel,float set_freq)
-{
- // keep, but ignore, the first 3 parameters for now
-
- // all this does right now is check the frequency range,
- // and store the set value.
-
- /* abandon if high channel selected by user but not enabled by firmware */
- if (channel && !globals.Flash.ChanKey_frequency) {
- return InvalidChannel;
- }
-
- if (set_freq < 1.0) {
- return freq_lower_limit;
- }
- if (set_freq > 1.0e6) {
- return freq_upper_limit;
- }
-
- globals.ChannelState[channel].frequency=set_freq;
-
- return OK;
-}
-
+#include "device-functions.h" + +/* START FUNCTION DESCRIPTION ******************************************** +Set_frequency <DEVFUNC.LIB> + +SYNTAX: Set_frequency(int check_possible_only,int word_override,int range_override,int channel,float set_freq) + +KEYWORDS: + +DESCRIPTION: sets the offset DAC. + +RETURN VALUE: error code (zero = OK). +END DESCRIPTION **********************************************************/ + +/*----------------------------------------------------------------------------------------------------------*/ +int Set_frequency(int check_possible_only,int word_override,int range_override,int channel,float set_freq) +{ + // keep, but ignore, the first 3 parameters for now + + // all this does right now is check the frequency range, + // and store the set value. + + /* abandon if high channel selected by user but not enabled by firmware */ + if (channel && !globals.Flash.ChanKey_frequency) { + return InvalidChannel; + } + + if (set_freq < 1.0) { + return freq_lower_limit; + } + if (set_freq > 1.0e6) { + return freq_upper_limit; + } + + globals.ChannelState[channel].frequency=set_freq; + + return OK; +} + |