802.15.4 network configuration example for mbed XBeeLib By Digi

Dependencies:   XBeeLib mbed

Committer:
hbujanda
Date:
Fri Jul 29 12:12:17 2016 +0200
Revision:
3:3fecffaf52c8
Parent:
0:8013d167495f
Automatic upload

Who changed what in which revision?

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