Fork of my original MQTTGateway

Dependencies:   mbed-http

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       256
00021 
00022 #define SYNC_OPS_TIMEOUT_MS         2000
00023 
00024 //#define DEBUG 1
00025 
00026 #ifdef DEBUG
00027 #define DBG(fmt, args...)    printf(fmt, ## args)
00028 #else
00029 #define DBG(fmt, args...)    /* Don't do anything in release builds */
00030 #endif
00031 
00032 //#define RADIO_TX                NC /* TODO: specify your setup's Serial TX pin connected to the XBee module DIN pin */
00033 //#define RADIO_RX                NC /* TODO: specify your setup's Serial RX pin connected to the XBee module DOUT pin */
00034 //#define RADIO_RTS               NC /* TODO: specify your setup's Serial RTS# pin connected to the XBee module RTS# pin */
00035 //#define RADIO_CTS               NC /* TODO: specify your setup's Serial CTS# pin connected to the XBee module CTS# pin */
00036 //#define RADIO_RESET             NC /* TODO: specify your setup's GPIO (output) connected to the XBee module's reset pin */
00037 //#define RADIO_SLEEP_REQ         NC /* TODO: specify your setup's GPIO (output) connected to the XBee module's SLEEP_RQ pin */
00038 //#define RADIO_ON_SLEEP          NC /* TODO: specify your setup's GPIO (input) connected to the XBee module's ON_SLEEP pin */
00039 //#define DEBUG_TX                NC /* TODO: specify your setup's Serial TX for debugging */
00040 //#define DEBUG_RX                NC /* TODO: specify your setup's Serial RX for debugging (optional) */
00041 #define RADIO_TX    D1
00042 #define RADIO_RX    D0
00043 #define RADIO_RESET D2
00044 #define DEBUG_TX    USBTX
00045 #define DEBUG_RX    USBRX
00046 
00047 #if !defined(RADIO_TX)
00048     #error "Please define RADIO_TX pin"
00049 #endif
00050 
00051 #if !defined(RADIO_RX)
00052     #error "Please define RADIO_RX pin"
00053 #endif
00054 
00055 #if !defined(RADIO_RESET)
00056     #define RADIO_RESET             NC
00057     #warning "RADIO_RESET not defined, defaulted to 'NC'"
00058 #endif
00059 
00060 #if defined(ENABLE_LOGGING)
00061     #if !defined(DEBUG_TX)
00062         #error "Please define DEBUG_TX"
00063     #endif
00064     #if !defined(DEBUG_RX)
00065         #define DEBUG_RX                NC
00066         #warning "DEBUG_RX not defined, defaulted to 'NC'"
00067     #endif
00068 #endif
00069 
00070 #endif /* __CONFIG_H_ */