Fork of my MQTTGateway

Dependencies:   mbed-http

Committer:
vpcola
Date:
Sat Apr 08 14:45:51 2017 +0000
Revision:
0:f1d3878b8dd9
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vpcola 0:f1d3878b8dd9 1 /**
vpcola 0:f1d3878b8dd9 2 * Copyright (c) 2015 Digi International Inc.,
vpcola 0:f1d3878b8dd9 3 * All rights not expressly granted are reserved.
vpcola 0:f1d3878b8dd9 4 *
vpcola 0:f1d3878b8dd9 5 * This Source Code Form is subject to the terms of the Mozilla Public
vpcola 0:f1d3878b8dd9 6 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
vpcola 0:f1d3878b8dd9 7 * You can obtain one at http://mozilla.org/MPL/2.0/.
vpcola 0:f1d3878b8dd9 8 *
vpcola 0:f1d3878b8dd9 9 * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
vpcola 0:f1d3878b8dd9 10 * =======================================================================
vpcola 0:f1d3878b8dd9 11 */
vpcola 0:f1d3878b8dd9 12
vpcola 0:f1d3878b8dd9 13 #ifndef __CONFIG_H_
vpcola 0:f1d3878b8dd9 14 #define __CONFIG_H_
vpcola 0:f1d3878b8dd9 15
vpcola 0:f1d3878b8dd9 16 /** Library configuration options */
vpcola 0:f1d3878b8dd9 17 #define ENABLE_LOGGING
vpcola 0:f1d3878b8dd9 18 #define ENABLE_ASSERTIONS
vpcola 0:f1d3878b8dd9 19 #define FRAME_BUFFER_SIZE 4
vpcola 0:f1d3878b8dd9 20 #define MAX_FRAME_PAYLOAD_LEN 256
vpcola 0:f1d3878b8dd9 21
vpcola 0:f1d3878b8dd9 22 #define SYNC_OPS_TIMEOUT_MS 2000
vpcola 0:f1d3878b8dd9 23
vpcola 0:f1d3878b8dd9 24 //#define DEBUG 1
vpcola 0:f1d3878b8dd9 25
vpcola 0:f1d3878b8dd9 26 #ifdef DEBUG
vpcola 0:f1d3878b8dd9 27 #define DBG(fmt, args...) printf(fmt, ## args)
vpcola 0:f1d3878b8dd9 28 #else
vpcola 0:f1d3878b8dd9 29 #define DBG(fmt, args...) /* Don't do anything in release builds */
vpcola 0:f1d3878b8dd9 30 #endif
vpcola 0:f1d3878b8dd9 31
vpcola 0:f1d3878b8dd9 32 //#define RADIO_TX NC /* TODO: specify your setup's Serial TX pin connected to the XBee module DIN pin */
vpcola 0:f1d3878b8dd9 33 //#define RADIO_RX NC /* TODO: specify your setup's Serial RX pin connected to the XBee module DOUT pin */
vpcola 0:f1d3878b8dd9 34 //#define RADIO_RTS NC /* TODO: specify your setup's Serial RTS# pin connected to the XBee module RTS# pin */
vpcola 0:f1d3878b8dd9 35 //#define RADIO_CTS NC /* TODO: specify your setup's Serial CTS# pin connected to the XBee module CTS# pin */
vpcola 0:f1d3878b8dd9 36 //#define RADIO_RESET NC /* TODO: specify your setup's GPIO (output) connected to the XBee module's reset pin */
vpcola 0:f1d3878b8dd9 37 //#define RADIO_SLEEP_REQ NC /* TODO: specify your setup's GPIO (output) connected to the XBee module's SLEEP_RQ pin */
vpcola 0:f1d3878b8dd9 38 //#define RADIO_ON_SLEEP NC /* TODO: specify your setup's GPIO (input) connected to the XBee module's ON_SLEEP pin */
vpcola 0:f1d3878b8dd9 39 //#define DEBUG_TX NC /* TODO: specify your setup's Serial TX for debugging */
vpcola 0:f1d3878b8dd9 40 //#define DEBUG_RX NC /* TODO: specify your setup's Serial RX for debugging (optional) */
vpcola 0:f1d3878b8dd9 41 #define RADIO_TX D1
vpcola 0:f1d3878b8dd9 42 #define RADIO_RX D0
vpcola 0:f1d3878b8dd9 43 #define RADIO_RESET D2
vpcola 0:f1d3878b8dd9 44 #define DEBUG_TX USBTX
vpcola 0:f1d3878b8dd9 45 #define DEBUG_RX USBRX
vpcola 0:f1d3878b8dd9 46
vpcola 0:f1d3878b8dd9 47 #if !defined(RADIO_TX)
vpcola 0:f1d3878b8dd9 48 #error "Please define RADIO_TX pin"
vpcola 0:f1d3878b8dd9 49 #endif
vpcola 0:f1d3878b8dd9 50
vpcola 0:f1d3878b8dd9 51 #if !defined(RADIO_RX)
vpcola 0:f1d3878b8dd9 52 #error "Please define RADIO_RX pin"
vpcola 0:f1d3878b8dd9 53 #endif
vpcola 0:f1d3878b8dd9 54
vpcola 0:f1d3878b8dd9 55 #if !defined(RADIO_RESET)
vpcola 0:f1d3878b8dd9 56 #define RADIO_RESET NC
vpcola 0:f1d3878b8dd9 57 #warning "RADIO_RESET not defined, defaulted to 'NC'"
vpcola 0:f1d3878b8dd9 58 #endif
vpcola 0:f1d3878b8dd9 59
vpcola 0:f1d3878b8dd9 60 #if defined(ENABLE_LOGGING)
vpcola 0:f1d3878b8dd9 61 #if !defined(DEBUG_TX)
vpcola 0:f1d3878b8dd9 62 #error "Please define DEBUG_TX"
vpcola 0:f1d3878b8dd9 63 #endif
vpcola 0:f1d3878b8dd9 64 #if !defined(DEBUG_RX)
vpcola 0:f1d3878b8dd9 65 #define DEBUG_RX NC
vpcola 0:f1d3878b8dd9 66 #warning "DEBUG_RX not defined, defaulted to 'NC'"
vpcola 0:f1d3878b8dd9 67 #endif
vpcola 0:f1d3878b8dd9 68 #endif
vpcola 0:f1d3878b8dd9 69
vpcola 0:f1d3878b8dd9 70 #endif /* __CONFIG_H_ */