ZigBee network configuration example for mbed XBeeLib By Digi

Dependencies:   XBeeLib mbed

Committer:
hbujanda
Date:
Fri Jul 29 12:14:09 2016 +0200
Revision:
3:b956561a2440
Parent:
0:03d43843c066
Automatic upload

Who changed what in which revision?

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