Racing Robots remote control using xbee and API mode
Dependencies: XBeeLib mbed racing_robots
config.h@1:47dae7bc4964, 2016-05-19 (annotated)
- Committer:
- sillevl
- Date:
- Thu May 19 13:18:03 2016 +0000
- Revision:
- 1:47dae7bc4964
- Parent:
- 0:cff20bebf3e4
Remote control features added to racing robots using Xbee API mode
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sillevl | 0:cff20bebf3e4 | 1 | /** |
sillevl | 0:cff20bebf3e4 | 2 | * Copyright (c) 2015 Digi International Inc., |
sillevl | 0:cff20bebf3e4 | 3 | * All rights not expressly granted are reserved. |
sillevl | 0:cff20bebf3e4 | 4 | * |
sillevl | 0:cff20bebf3e4 | 5 | * This Source Code Form is subject to the terms of the Mozilla Public |
sillevl | 0:cff20bebf3e4 | 6 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
sillevl | 0:cff20bebf3e4 | 7 | * You can obtain one at http://mozilla.org/MPL/2.0/. |
sillevl | 0:cff20bebf3e4 | 8 | * |
sillevl | 0:cff20bebf3e4 | 9 | * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343 |
sillevl | 0:cff20bebf3e4 | 10 | * ======================================================================= |
sillevl | 0:cff20bebf3e4 | 11 | */ |
sillevl | 0:cff20bebf3e4 | 12 | |
sillevl | 0:cff20bebf3e4 | 13 | #ifndef __CONFIG_H_ |
sillevl | 0:cff20bebf3e4 | 14 | #define __CONFIG_H_ |
sillevl | 0:cff20bebf3e4 | 15 | |
sillevl | 0:cff20bebf3e4 | 16 | /** Library configuration options */ |
sillevl | 0:cff20bebf3e4 | 17 | //#define ENABLE_LOGGING |
sillevl | 0:cff20bebf3e4 | 18 | //#define ENABLE_ASSERTIONS |
sillevl | 0:cff20bebf3e4 | 19 | #define FRAME_BUFFER_SIZE 4 |
sillevl | 0:cff20bebf3e4 | 20 | #define MAX_FRAME_PAYLOAD_LEN 128 |
sillevl | 0:cff20bebf3e4 | 21 | |
sillevl | 0:cff20bebf3e4 | 22 | #define SYNC_OPS_TIMEOUT_MS 2000 |
sillevl | 0:cff20bebf3e4 | 23 | |
sillevl | 0:cff20bebf3e4 | 24 | #define RADIO_TX p28 /* TODO: specify your setup's Serial TX pin connected to the XBee module DIN pin */ |
sillevl | 0:cff20bebf3e4 | 25 | #define RADIO_RX p27 /* TODO: specify your setup's Serial RX pin connected to the XBee module DOUT pin */ |
sillevl | 0:cff20bebf3e4 | 26 | //#define RADIO_RTS NC /* TODO: specify your setup's Serial RTS# pin connected to the XBee module RTS# pin */ |
sillevl | 0:cff20bebf3e4 | 27 | //#define RADIO_CTS NC /* TODO: specify your setup's Serial CTS# pin connected to the XBee module CTS# pin */ |
sillevl | 0:cff20bebf3e4 | 28 | #define RADIO_RESET p26 /* TODO: specify your setup's GPIO (output) connected to the XBee module's reset pin */ |
sillevl | 0:cff20bebf3e4 | 29 | //#define RADIO_SLEEP_REQ NC /* TODO: specify your setup's GPIO (output) connected to the XBee module's SLEEP_RQ pin */ |
sillevl | 0:cff20bebf3e4 | 30 | //#define RADIO_ON_SLEEP NC /* TODO: specify your setup's GPIO (input) connected to the XBee module's ON_SLEEP pin */ |
sillevl | 0:cff20bebf3e4 | 31 | #define DEBUG_TX USBTX /* TODO: specify your setup's Serial TX for debugging */ |
sillevl | 0:cff20bebf3e4 | 32 | #define DEBUG_RX USBRX /* TODO: specify your setup's Serial RX for debugging (optional) */ |
sillevl | 0:cff20bebf3e4 | 33 | |
sillevl | 0:cff20bebf3e4 | 34 | #if !defined(RADIO_TX) |
sillevl | 0:cff20bebf3e4 | 35 | #error "Please define RADIO_TX pin" |
sillevl | 0:cff20bebf3e4 | 36 | #endif |
sillevl | 0:cff20bebf3e4 | 37 | |
sillevl | 0:cff20bebf3e4 | 38 | #if !defined(RADIO_RX) |
sillevl | 0:cff20bebf3e4 | 39 | #error "Please define RADIO_RX pin" |
sillevl | 0:cff20bebf3e4 | 40 | #endif |
sillevl | 0:cff20bebf3e4 | 41 | |
sillevl | 0:cff20bebf3e4 | 42 | #if !defined(RADIO_RESET) |
sillevl | 0:cff20bebf3e4 | 43 | #define RADIO_RESET NC |
sillevl | 0:cff20bebf3e4 | 44 | #warning "RADIO_RESET not defined, defaulted to 'NC'" |
sillevl | 0:cff20bebf3e4 | 45 | #endif |
sillevl | 0:cff20bebf3e4 | 46 | |
sillevl | 0:cff20bebf3e4 | 47 | #if defined(ENABLE_LOGGING) |
sillevl | 0:cff20bebf3e4 | 48 | #if !defined(DEBUG_TX) |
sillevl | 0:cff20bebf3e4 | 49 | #error "Please define DEBUG_TX" |
sillevl | 0:cff20bebf3e4 | 50 | #endif |
sillevl | 0:cff20bebf3e4 | 51 | #if !defined(DEBUG_RX) |
sillevl | 0:cff20bebf3e4 | 52 | #define DEBUG_RX NC |
sillevl | 0:cff20bebf3e4 | 53 | #warning "DEBUG_RX not defined, defaulted to 'NC'" |
sillevl | 0:cff20bebf3e4 | 54 | #endif |
sillevl | 0:cff20bebf3e4 | 55 | #endif |
sillevl | 0:cff20bebf3e4 | 56 | |
sillevl | 0:cff20bebf3e4 | 57 | #endif /* __CONFIG_H_ */ |