Fork of my original MQTTGateway

Dependencies:   mbed-http

Committer:
vpcola
Date:
Sat Apr 08 14:43:14 2017 +0000
Revision:
0:a1734fe1ec4b
Initial commit

Who changed what in which revision?

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