thermferm/thermferm.h

changeset 72
f7cb53c50ee1
parent 71
a09c5cdc4022
child 73
4a28de5b9b47
equal deleted inserted replaced
71:a09c5cdc4022 72:f7cb53c50ee1
106 int present; /* 1=present, 0=absent */ 106 int present; /* 1=present, 0=absent */
107 int lastval; /* Last valid value */ 107 int lastval; /* Last valid value */
108 int update; /* Value updated */ 108 int update; /* Value updated */
109 } w1_therm; 109 } w1_therm;
110 110
111 #ifdef HAVE_WIRINGPI_H
112 typedef struct _rc_switch {
113 struct _rc_switch *next;
114 char *address; /* Address code */
115 char *alias; /* Friendly name */
116 } rc_switch;
117 #endif
118
119 typedef struct _sys_config { 111 typedef struct _sys_config {
120 char *name; /* Configuration name */ 112 char *name; /* Configuration name */
121 int my_port; /* my client/server port */ 113 int my_port; /* my client/server port */
122 w1_therm *w1therms; /* 1-wire temp sensors */ 114 w1_therm *w1therms; /* 1-wire temp sensors */
123 #ifdef HAVE_WIRINGPI_H 115 #ifdef HAVE_WIRINGPI_H
124 int lcd_cols; /* LCD display columns */ 116 int lcd_cols; /* LCD display columns */
125 int lcd_rows; /* LCD display rows */ 117 int lcd_rows; /* LCD display rows */
126 int tx433; /* 433 MHz transmitter pin */
127 rc_switch *rcswitch; /* 433 MHz RC Power switches */
128 #endif 118 #endif
129 units_list *units; /* Fermenter units */ 119 units_list *units; /* Fermenter units */
130 /* ControlSettings: */ 120 /* ControlSettings: */
131 unsigned char cs_mode; /* mode */ 121 unsigned char cs_mode; /* mode */
132 float cs_beerSet; /* beer temperature */ 122 float cs_beerSet; /* beer temperature */
182 #endif 172 #endif
183 173
184 /* logger.c */ 174 /* logger.c */
185 void logger(char *, char *, char *); 175 void logger(char *, char *, char *);
186 176
187
188 /* rc-switch.c */
189 #ifdef HAVE_WIRINGPI_H
190 int toggleSwitch(char *);
191 int toggleTypeA(char *, char *, bool);
192 int toggleTypeB(int, int, bool);
193 int toggleTypeC(char, int, int, bool);
194 int toggleTypeE(char, int, bool);
195
196 void enableReceiveIRQ(int interrupt);
197 void enableReceive(void);
198 void disableReceive(void);
199 bool available(void);
200 void resetAvailable(void);
201
202 unsigned long getReceivedValue(void);
203 unsigned int getReceivedBitlength(void);
204 unsigned int getReceivedDelay(void);
205 unsigned int getReceivedProtocol(void);
206 unsigned int *getReceivedRawdata(void);
207
208 void enableTransmit(int);
209 void disableTransmit(void);
210
211 char *dec2binWzerofill(unsigned long, unsigned int);
212 #endif
213
214 /* dht11.c */
215 void dht11Read(void);
216 void dht11Init(int, int, int);
217
218 #ifdef HAVE_WIRINGPI_H 177 #ifdef HAVE_WIRINGPI_H
219 PI_THREAD (my_sensors_loop); 178 PI_THREAD (my_sensors_loop);
220 #else 179 #else
221 int my_sensors_loop(void); 180 int my_sensors_loop(void);
222 #endif 181 #endif

mercurial