Introduce shared/defines.h to collect commonly used macros. For now
it defines min() / max() macros.
This commit is contained in:
@@ -60,17 +60,17 @@
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include "lcd.h"
|
||||
#include "pylcd.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "shared/defines.h"
|
||||
#include "lcd.h"
|
||||
#include "pylcd.h"
|
||||
#include "lcd_lib.h"
|
||||
#include "report.h"
|
||||
|
||||
#define min(a, b) ((a)<(b) ? (a) : (b))
|
||||
#define True 1
|
||||
#define False 0
|
||||
|
||||
|
||||
@@ -225,9 +225,6 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
// Autorepeat values
|
||||
#define KEYPAD_AUTOREPEAT_DELAY 500
|
||||
#define KEYPAD_AUTOREPEAT_FREQ 15
|
||||
|
||||
+1
-1
@@ -55,6 +55,7 @@
|
||||
/* TODO: fill in what to include otherwise */
|
||||
|
||||
#include "shared/report.h"
|
||||
#include "shared/defines.h"
|
||||
|
||||
#include "drivers.h"
|
||||
#include "sock.h"
|
||||
@@ -70,7 +71,6 @@
|
||||
#include "drivers.h"
|
||||
#include "main.h"
|
||||
|
||||
|
||||
#if !defined(SYSCONFDIR)
|
||||
# define SYSCONFDIR "/etc"
|
||||
#endif
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
# define false 0
|
||||
#endif
|
||||
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
#include "shared/LL.h"
|
||||
|
||||
/** A Menu is a MenuItem too.
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "shared/report.h"
|
||||
#include "shared/defines.h"
|
||||
|
||||
#include "menuitem.h"
|
||||
#include "menuscreens.h"
|
||||
|
||||
@@ -35,9 +35,6 @@
|
||||
# define false 0
|
||||
#endif
|
||||
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
/*********************************************************************
|
||||
* Data definitions of the menustuff
|
||||
*/
|
||||
|
||||
+1
-1
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "shared/report.h"
|
||||
#include "shared/LL.h"
|
||||
#include "shared/defines.h"
|
||||
|
||||
#include "drivers.h"
|
||||
|
||||
@@ -40,7 +41,6 @@
|
||||
|
||||
#define BUFSIZE 1024 /* larger than display width => large enough */
|
||||
|
||||
|
||||
int heartbeat = HEARTBEAT_OPEN;
|
||||
static int heartbeat_fallback = HEARTBEAT_ON; /* If no heartbeat setting has been set at all */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user