Sat, 07 Nov 2015 22:04:17 +0100
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
#ifndef _BREWCO_H #define _BREWCO_H #define TRUE 1 #define FALSE 0 #include "../config.h" #include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <stdarg.h> #include <string.h> #include <ctype.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/time.h> #include <time.h> #include <fcntl.h> #include <syslog.h> #include <unistd.h> #include <errno.h> #include <signal.h> #include <getopt.h> #ifndef HAVE_WIRINGPI_H #include <pthread.h> #endif #include <libxml/xmlmemory.h> #include <libxml/parser.h> #include <libxml/encoding.h> #include <libxml/xmlwriter.h> #ifdef HAVE_WIRINGPI_H /* wiringPi */ #include <wiringPi.h> #include <pcf8574.h> #include <lcd.h> /* * Thread locks */ #define LOCK_DEVICES 0 #define LOCK_LCD 1 #define LOCK_MENU 2 #define LOCK_SPARE2 3 #endif /* * 1-Wire devices */ #define W1_FAMILY_DEFAULT 0 #define W1_FAMILY_SMEM_01 0x01 #define W1_FAMILY_SMEM_81 0x81 #define W1_THERM_DS18S20 0x10 #define W1_FAMILY_DS28E04 0x1C #define W1_COUNTER_DS2423 0x1D #define W1_THERM_DS1822 0x22 #define W1_EEPROM_DS2433 0x23 #define W1_THERM_DS18B20 0x28 #define W1_FAMILY_DS2408 0x29 #define W1_EEPROM_DS2431 0x2D #define W1_FAMILY_DS2760 0x30 #define W1_FAMILY_DS2780 0x32 #define W1_FAMILY_DS2413 0x3A #define W1_THERM_DS1825 0x3B #define W1_FAMILY_DS2781 0x3D #define W1_THERM_DS28EA00 0x42 #define MBSE_SS(x) (x)?(x):"(null)" typedef struct _sys_config { char *name; /* Configuration name */ unsigned char tempFormat; /* Temperature format, C or F */ char *hlt_sensor_address; /* HLT sensor address */ int hlt_sensor_state; /* HLT sensor state */ int hlt_sensor_value; /* HLT sensor value */ char *mlt_sensor_address; /* MLT sensor address */ int mlt_sensor_state; /* MLT sensor state */ int mlt_sensor_value; /* MLT sensor value */ #ifdef HAVE_WIRINGPI_H int lcd_cols; /* LCD display columns */ int lcd_rows; /* LCD display rows */ int lcd_address; /* LCD display i2c address */ #endif } sys_config; #endif