Added .h files

Sun, 13 Jul 2014 17:31:45 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 13 Jul 2014 17:31:45 +0200
changeset 106
1bd9a16f5061
parent 105
a5a964148e34
child 107
f2f201b7cb48

Added .h files

thermferm/futil.c file | annotate | diff | comparison | revisions
thermferm/futil.h file | annotate | diff | comparison | revisions
thermferm/lcd-buffer.c file | annotate | diff | comparison | revisions
thermferm/lcd-buffer.h file | annotate | diff | comparison | revisions
thermferm/lcd-pcf8574.c file | annotate | diff | comparison | revisions
thermferm/lcd-pcf8574.h file | annotate | diff | comparison | revisions
thermferm/lock.c file | annotate | diff | comparison | revisions
thermferm/lock.h file | annotate | diff | comparison | revisions
thermferm/logger.c file | annotate | diff | comparison | revisions
thermferm/logger.h file | annotate | diff | comparison | revisions
thermferm/rdconfig.c file | annotate | diff | comparison | revisions
thermferm/sensors.c file | annotate | diff | comparison | revisions
thermferm/sensors.h file | annotate | diff | comparison | revisions
thermferm/server.c file | annotate | diff | comparison | revisions
thermferm/server.h file | annotate | diff | comparison | revisions
thermferm/thermferm.c file | annotate | diff | comparison | revisions
thermferm/thermferm.h file | annotate | diff | comparison | revisions
thermferm/units.c file | annotate | diff | comparison | revisions
thermferm/units.h file | annotate | diff | comparison | revisions
thermferm/xutil.c file | annotate | diff | comparison | revisions
thermferm/xutil.h file | annotate | diff | comparison | revisions
--- a/thermferm/futil.c	Sat Jul 12 23:50:48 2014 +0200
+++ b/thermferm/futil.c	Sun Jul 13 17:31:45 2014 +0200
@@ -21,6 +21,7 @@
  *****************************************************************************/
 
 #include "thermferm.h"
+#include "futil.h"
 
 
 /*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/thermferm/futil.h	Sun Jul 13 17:31:45 2014 +0200
@@ -0,0 +1,7 @@
+#ifndef	FUTIL_H
+#define	FUTIL_H
+
+
+int  mkdirs(char *, mode_t);
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/thermferm/lcd-buffer.c	Sun Jul 13 17:31:45 2014 +0200
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (C) 2008-2014
+ *   
+ * Michiel Broek <mbroek at mbse dot eu>
+ *
+ * This file is part of the mbsePi-apps
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * mbsePi-apps is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with mbsePi-apps; see the file COPYING.  If not, write to the Free
+ * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *****************************************************************************/
+
+#include "thermferm.h"
+#include "lcd-buffer.h"
+
+#ifdef HAVE_WIRINGPI_H
+
+
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/thermferm/lcd-buffer.h	Sun Jul 13 17:31:45 2014 +0200
@@ -0,0 +1,6 @@
+#ifndef	LCD_BUFFER_H
+#define	LCD_BUFFER_H
+
+
+
+#endif
--- a/thermferm/lcd-pcf8574.c	Sat Jul 12 23:50:48 2014 +0200
+++ b/thermferm/lcd-pcf8574.c	Sun Jul 13 17:31:45 2014 +0200
@@ -24,6 +24,8 @@
  */
 
 #include "thermferm.h"
+#include "lcd-pcf8574.h"
+
 
 #ifdef HAVE_WIRINGPI_H
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/thermferm/lcd-pcf8574.h	Sun Jul 13 17:31:45 2014 +0200
@@ -0,0 +1,27 @@
+#ifndef	LCD_PCF8574_H
+#define	LCD_PCF8574_H
+
+
+#ifdef HAVE_WIRINGPI_H
+
+// Defines for the pcf8574 Pi LCD interface board
+#define AF_BASE         100
+
+#define AF_RS           (AF_BASE + 0)
+#define AF_RW           (AF_BASE + 1)
+#define AF_E            (AF_BASE + 2)
+#define AF_BACKLIGHT    (AF_BASE + 3)
+#define AF_DB4          (AF_BASE + 4)
+#define AF_DB5          (AF_BASE + 5)
+#define AF_DB6          (AF_BASE + 6)
+#define AF_DB7          (AF_BASE + 7)
+
+void setBacklight (int);
+int  initLCD (int, int);
+void mb_lcdPutchar(const int, unsigned char);
+void mb_lcdPuts(const int, const char *);
+void mb_lcdClear(const int);
+
+#endif
+
+#endif
--- a/thermferm/lock.c	Sat Jul 12 23:50:48 2014 +0200
+++ b/thermferm/lock.c	Sun Jul 13 17:31:45 2014 +0200
@@ -20,6 +20,7 @@
  * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  *****************************************************************************/
 
+#include "lock.h"
 #include "thermferm.h"
 
 /*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/thermferm/lock.h	Sun Jul 13 17:31:45 2014 +0200
@@ -0,0 +1,8 @@
+#ifndef	LOCK_H
+#define	LOCK_H
+
+
+int  lockprog(char *);
+void ulockprog(char *);
+
+#endif
--- a/thermferm/logger.c	Sat Jul 12 23:50:48 2014 +0200
+++ b/thermferm/logger.c	Sun Jul 13 17:31:45 2014 +0200
@@ -20,7 +20,10 @@
  * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  *****************************************************************************/
 
+#include "logger.h"
 #include "thermferm.h"
+#include "futil.h"
+#include "xutil.h"
 
 
 void logger(char *filename, char *data)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/thermferm/logger.h	Sun Jul 13 17:31:45 2014 +0200
@@ -0,0 +1,7 @@
+#ifndef	LOGGER_H
+#define	LOGGER_H
+
+
+void logger(char *, char *);
+
+#endif
--- a/thermferm/rdconfig.c	Sat Jul 12 23:50:48 2014 +0200
+++ b/thermferm/rdconfig.c	Sun Jul 13 17:31:45 2014 +0200
@@ -20,8 +20,10 @@
  * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  *****************************************************************************/
 
+#include "rdconfig.h"
 #include "thermferm.h"
-
+#include "futil.h"
+#include "xutil.h"
 
 int		debug = FALSE;
 static char	*mypath;
--- a/thermferm/sensors.c	Sat Jul 12 23:50:48 2014 +0200
+++ b/thermferm/sensors.c	Sun Jul 13 17:31:45 2014 +0200
@@ -20,7 +20,9 @@
  * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  *****************************************************************************/
 
+#include "sensors.h"
 #include "thermferm.h"
+#include "xutil.h"
 
 
 extern int		debug;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/thermferm/sensors.h	Sun Jul 13 17:31:45 2014 +0200
@@ -0,0 +1,11 @@
+#ifndef SENSORS_H
+#define	SENSORS_H
+
+
+#ifdef HAVE_WIRINGPI_H
+PI_THREAD (my_sensors_loop);
+#else
+void *my_sensors_loop(void *);
+#endif
+
+#endif
--- a/thermferm/server.c	Sat Jul 12 23:50:48 2014 +0200
+++ b/thermferm/server.c	Sun Jul 13 17:31:45 2014 +0200
@@ -20,7 +20,10 @@
  * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  *****************************************************************************/
 
+#include "rdconfig.h"
 #include "thermferm.h"
+#include "server.h"
+#include "xutil.h"
 
 
 extern int		my_shutdown;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/thermferm/server.h	Sun Jul 13 17:31:45 2014 +0200
@@ -0,0 +1,12 @@
+#ifndef	SERVER_H
+#define	SERVER_H
+
+
+#ifdef HAVE_WIRINGPI_H
+PI_THREAD (my_server_loop);
+#else
+void *my_server_loop(void *);
+#endif
+
+
+#endif
--- a/thermferm/thermferm.c	Sat Jul 12 23:50:48 2014 +0200
+++ b/thermferm/thermferm.c	Sun Jul 13 17:31:45 2014 +0200
@@ -20,7 +20,17 @@
  * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  *****************************************************************************/
 
+#include "lock.h"
+#include "logger.h"
+#include "rdconfig.h"
+#include "sensors.h"
+#include "server.h"
 #include "thermferm.h"
+#include "lcd-pcf8574.h"
+#include "lcd-buffer.h"
+#include "futil.h"
+#include "units.h"
+#include "xutil.h"
 
 
 int			current_unit = -1;
--- a/thermferm/thermferm.h	Sat Jul 12 23:50:48 2014 +0200
+++ b/thermferm/thermferm.h	Sun Jul 13 17:31:45 2014 +0200
@@ -163,71 +163,5 @@
 } sys_config;
 
 
-void killconfig(void);
-int  rdconfig(void);
-int  wrconfig(void);
-
-
-/* lock.c */
-int  lockprog(char *);
-void ulockprog(char *);
-
-
-/* xutil.c */
-char *xmalloc(size_t);
-char *xstrcpy(char *);
-char *xstrcat(char *, char *);
-
-
-/* futil.c */
-int  mkdirs(char *, mode_t);
-
-
-#ifdef HAVE_WIRINGPI_H
-
-/* lcd-pcf8574.c */
-// Defines for the pcf8574 Pi LCD interface board
-#define AF_BASE         100
-
-#define AF_RS           (AF_BASE + 0)
-#define AF_RW           (AF_BASE + 1)
-#define AF_E            (AF_BASE + 2)
-#define AF_BACKLIGHT    (AF_BASE + 3)
-#define AF_DB4          (AF_BASE + 4)
-#define AF_DB5          (AF_BASE + 5)
-#define AF_DB6          (AF_BASE + 6)
-#define AF_DB7          (AF_BASE + 7)
-
-void setBacklight (int);
-int  initLCD (int, int);
-void mb_lcdPutchar(const int, unsigned char);
-void mb_lcdPuts(const int, const char *);
-void mb_lcdClear(const int);
 
 #endif
-
-/* logger.c */
-void logger(char *, char *);
-
-#ifdef HAVE_WIRINGPI_H
-PI_THREAD (my_sensors_loop);
-#else
-void *my_sensors_loop(void *);
-#endif
-
-/* server.c */
-#ifdef HAVE_WIRINGPI_H
-PI_THREAD (my_server_loop);
-#else
-void *my_server_loop(void *);
-#endif
-
-#ifdef HAVE_WIRINGPI_H
-PI_THREAD (my_units_loop);
-#else
-void *my_units_loop(void *);
-#endif
-
-
-#endif
-
--- a/thermferm/units.c	Sat Jul 12 23:50:48 2014 +0200
+++ b/thermferm/units.c	Sun Jul 13 17:31:45 2014 +0200
@@ -21,6 +21,8 @@
  *****************************************************************************/
 
 #include "thermferm.h"
+#include "units.h"
+#include "xutil.h"
 
 
 extern int		debug;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/thermferm/units.h	Sun Jul 13 17:31:45 2014 +0200
@@ -0,0 +1,11 @@
+#ifndef	UNITS_H
+#define UNITS_H
+
+
+#ifdef HAVE_WIRINGPI_H
+PI_THREAD (my_units_loop);
+#else
+void *my_units_loop(void *);
+#endif
+
+#endif
--- a/thermferm/xutil.c	Sat Jul 12 23:50:48 2014 +0200
+++ b/thermferm/xutil.c	Sun Jul 13 17:31:45 2014 +0200
@@ -21,6 +21,7 @@
  *****************************************************************************/
 
 #include "thermferm.h"
+#include "xutil.h"
 
 
 char *xmalloc(size_t size)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/thermferm/xutil.h	Sun Jul 13 17:31:45 2014 +0200
@@ -0,0 +1,8 @@
+#ifndef XUTIL_H
+#define	XUTIL_H
+
+char *xmalloc(size_t);
+char *xstrcpy(char *);
+char *xstrcat(char *, char *);
+
+#endif

mercurial