-
Notifications
You must be signed in to change notification settings - Fork 2
/
Config.h
56 lines (47 loc) · 1.95 KB
/
Config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Config.h Simple config library for RFbee
// Copyright (c) 2010 Hans Klunder <hans.klunder (at) bigfoot.com>
// Author: Hans Klunder, based on the original Rfbee v1.0 firmware by Seeedstudio
// Version: Aug 27, 2010
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library 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
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef Config_h
#define Config_h 1
#include "WProgram.h"
// config layout
#define CONFIG_RFBEE_MARKER 0 // Marker
#define CONFIG_HW_VERSION 1 // Hardware version
#define CONFIG_FW_VERSION 2 // Firmware version
#define CONFIG_DEST_ADDR 3 // Receiver address
#define CONFIG_MY_ADDR 4 // Sender address
#define CONFIG_ADDR_CHECK 5 // Address checking
#define CONFIG_TX_THRESHOLD 6 // Transmit threshold
#define CONFIG_BDINDEX 7 // Index to baudrate
#define CONFIG_PAINDEX 8 // Index to PowerAmplifier
#define CONFIG_CONFIG_ID 9 // Selected CCx configuration
#define CONFIG_OUTPUT_FORMAT 10 // output format to use
#define CONFIG_RFBEE_MODE 11 // rfBee operating mode (e.g. transmit/receive/idle)
// marker
#define CONFIG_RFBEE_MARKER_VALUE 0xAA
class CONFIG
{
public:
CONFIG(void);
void reset(void);
byte get(byte);
void set(byte,byte);
int initialized();
};
extern CONFIG Config;
#endif