Move LIMIT macro to utils

This commit is contained in:
Reed Nightingale 2020-02-08 14:59:06 -08:00
parent 1c60b8b63f
commit e35a9eecec
2 changed files with 4 additions and 2 deletions

View File

@ -4,6 +4,7 @@
#include "setup.h"
#include "settings.h"
#include "ubitx.h"
#include "utils.h"
/** Menus
* The Radio menus are accessed by tapping on the function button.
@ -139,8 +140,6 @@ void runSetting(const SettingScreen_t* const p_screen)
screen.Finalize(last_value);
}
#define LIMIT(val,min,max) ((val) < (min)) ? (min) : (((max) < (val)) ? (max) : (val))
//Local Oscillator
void ssLocalOscInitialize(long int* start_value_out){
{

3
utils.h Normal file
View File

@ -0,0 +1,3 @@
#pragma once
#define LIMIT(val,min,max) ((val) < (min)) ? (min) : (((max) < (val)) ? (max) : (val))