xbee gateway

Dependencies:   NTPClient SDFileSystem WIZnetInterface XBeeLib mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers config.h Source File

config.h

00001 /**
00002  * Copyright (c) 2015 Digi International Inc.,
00003  * All rights not expressly granted are reserved.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
00007  * You can obtain one at http://mozilla.org/MPL/2.0/.
00008  *
00009  * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
00010  * =======================================================================
00011  */
00012 
00013 #ifndef __CONFIG_H_
00014 #define __CONFIG_H_
00015 
00016 /** Library configuration options *///
00017 //#define ENABLE_LOGGING
00018 #define ENABLE_ASSERTIONS
00019 #define FRAME_BUFFER_SIZE           4
00020 #define MAX_FRAME_PAYLOAD_LEN       128
00021 
00022 #define SYNC_OPS_TIMEOUT_MS         2000
00023 
00024 #define RADIO_TX                D1 /* TODO: specify your setup's Serial TX pin connected to the XBee module DIN pin */
00025 #define RADIO_RX                D0 /* TODO: specify your setup's Serial RX pin connected to the XBee module DOUT pin */
00026 //#define RADIO_RTS               NC /* TODO: specify your setup's Serial RTS# pin connected to the XBee module RTS# pin */
00027 //#define RADIO_CTS               NC /* TODO: specify your setup's Serial CTS# pin connected to the XBee module CTS# pin */
00028 #define RADIO_RESET             D2 /* TODO: specify your setup's GPIO (output) connected to the XBee module's reset pin */
00029 //#define RADIO_SLEEP_REQ         NC /* TODO: specify your setup's GPIO (output) connected to the XBee module's SLEEP_RQ pin */
00030 //#define RADIO_ON_SLEEP          NC /* TODO: specify your setup's GPIO (input) connected to the XBee module's ON_SLEEP pin */
00031 #define DEBUG_TX                USBTX /* TODO: specify your setup's Serial TX for debugging */
00032 #define DEBUG_RX                USBRX /* TODO: specify your setup's Serial RX for debugging (optional) */
00033 
00034 #if !defined(RADIO_TX)
00035     #error "Please define RADIO_TX pin"
00036 #endif
00037 
00038 #if !defined(RADIO_RX)
00039     #error "Please define RADIO_RX pin"
00040 #endif
00041 
00042 #if !defined(RADIO_RESET)
00043     #define RADIO_RESET             NC
00044     #warning "RADIO_RESET not defined, defaulted to 'NC'"
00045 #endif
00046 
00047 #if defined(ENABLE_LOGGING)
00048     #if !defined(DEBUG_TX)
00049         #error "Please define DEBUG_TX"
00050     #endif
00051     #if !defined(DEBUG_RX)
00052         #define DEBUG_RX                NC
00053         #warning "DEBUG_RX not defined, defaulted to 'NC'"
00054     #endif
00055 #endif
00056 
00057 #endif /* __CONFIG_H_ */