1 /*----------------------------------------------------------------------------+
2  |                                                                            |
3  |                    Digimax Support for HEYU                                |
4  |                Copyright 2008 Charles W. Sullivan                          |
5  |                                                                            |
6  |                                                                            |
7  | As used herein, HEYU is a trademark of Daniel B. Suthers.                  |
8  | X10, CM11A, and ActiveHome are trademarks of X-10 (USA) Inc.               |
9  | The author is not affiliated with either entity.                           |
10  |                                                                            |
11  | Charles W. Sullivan                                                        |
12  | Co-author and Maintainer                                                   |
13  | Greensboro, North Carolina                                                 |
14  | Email ID: cwsulliv01                                                       |
15  | Email domain: -at- heyu -dot- org                                          |
16  |                                                                            |
17  +----------------------------------------------------------------------------*/
18 
19 /*
20  *   This program is free software: you can redistribute it and/or modify
21  *   it under the terms of the GNU General Public License as published by
22  *   the Free Software Foundation, either version 3 of the License, or
23  *   (at your option) any later version.
24  *
25  *   This program is distributed in the hope that it will be useful,
26  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
27  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28  *   GNU General Public License for more details.
29  *
30  *   You should have received a copy of the GNU General Public License
31  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
32  *
33  */
34 
35 /* Bitfields for DigiMax 210 */
36 
37 #define PARMASK     0x0f0000ff   /* Parity bits (to be discarded) */
38 #define STATMASK    0x30000000   /* Input Status field */
39 #define TCURRMASK   0x00ff0000   /* Current Temperature field */
40 #define TSETPMASK   0x00003f00   /* Temperature Setpoint field */
41 #define HEATMASK    0x00004000   /* Heat mode bit (0 = heat, 1 = cool) */
42 #define ONOFFMASK   0x03000000   /* Stored On/Off Status field */
43 #define UNDEFMASK   0xc0008000   /* Undefined Status bits */
44 #define VALMASK     0x00000001   /* Valid stored data (temp) bit */
45 #define SETPFLAG    0x00000002   /* Valid stored setpoint bit */
46 #define TCURRSHIFT  16
47 #define TSETPSHIFT   8
48 #define STATSHIFT   28
49 #define ONOFFSHIFT  24
50 #define HEATSHIFT   14
51 
52 /* Is it necessary to swap On/Off when the DigiMax is operated  */
53 /* in cool mode (for agreement with On/Off PLC code transmitted */
54 /* by the base station) ?  YES|NO                               */
55 #define DMXCOOLSWAP    YES
56 
57