MBED NanoService Lighting Endpoint for NXP Ublox (cellular enabled)

Dependencies:   C027_Support C12832 StatusReporter LM75B c027_radios endpoint_core endpoint_nsp nsp_resources mbed mbed-rtos

Committer:
ansond
Date:
Fri Sep 26 05:58:50 2014 +0000
Revision:
261:20e281330cea
Parent:
252:cdd766bca478
updates for new logger and status reporter

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ansond 148:56bf8bad4567 1 /* Copyright C2013 Doug Anson, MIT License
ansond 148:56bf8bad4567 2 *
ansond 148:56bf8bad4567 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
ansond 148:56bf8bad4567 4 * and associated documentation files the "Software", to deal in the Software without restriction,
ansond 148:56bf8bad4567 5 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
ansond 148:56bf8bad4567 6 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
ansond 148:56bf8bad4567 7 * furnished to do so, subject to the following conditions:
ansond 148:56bf8bad4567 8 *
ansond 148:56bf8bad4567 9 * The above copyright notice and this permission notice shall be included in all copies or
ansond 148:56bf8bad4567 10 * substantial portions of the Software.
ansond 148:56bf8bad4567 11 *
ansond 148:56bf8bad4567 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
ansond 148:56bf8bad4567 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
ansond 148:56bf8bad4567 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
ansond 148:56bf8bad4567 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
ansond 148:56bf8bad4567 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ansond 148:56bf8bad4567 17 */
ansond 148:56bf8bad4567 18
ansond 148:56bf8bad4567 19 #ifndef _DEFINITIONS_H_
ansond 148:56bf8bad4567 20 #define _DEFINITIONS_H_
ansond 148:56bf8bad4567 21
ansond 148:56bf8bad4567 22 // platform
ansond 148:56bf8bad4567 23 #include "mbed.h"
ansond 148:56bf8bad4567 24
ansond 149:3a2fe9f6bcb1 25 // Platform Switch
ansond 164:eee187a5723a 26 #define _ENDPOINT_UBLOX_PLATFORM true // uncomment for the U-Blox MBED platform
ansond 174:378cbc9cb6a7 27 //#define _ENDPOINT_FREESCALE_PLATFORM true // uncomment for the Freescale Freedom MBED platform
ansond 174:378cbc9cb6a7 28 //#define _ENDPOINT_NXP_PLATFORM true // uncomment for the NXP MBED platform
ansond 164:eee187a5723a 29
ansond 170:9ee711ce73df 30 // Network Usage (default is Ethernet)
ansond 174:378cbc9cb6a7 31 #define CELLULAR_NETWORK true // true - use cellular network, false - use ethernet (cannot co-exist together)
ansond 203:1c7ccf6ac38b 32 //#define CELLULAR_DEBUG true // true - debug enabled, undef - no
ansond 170:9ee711ce73df 33
ansond 252:cdd766bca478 34 // Multitech Temp Probe customization
ansond 252:cdd766bca478 35 //#define MULTITECH_TEMP_PROBE true // true - on, undef - off
ansond 252:cdd766bca478 36
ansond 216:b7a051cc4b6f 37 // NSP, which runs threaded, requires special handling of the cellular network stack with RTOS
ansond 221:863be42b21f5 38 //#ifdef CELLULAR_NETWORK
ansond 221:863be42b21f5 39 // #define NSP_CELLULAR_NETWORK true
ansond 221:863be42b21f5 40 //#endif
ansond 216:b7a051cc4b6f 41
ansond 164:eee187a5723a 42 // what kind of personality we are...
ansond 219:c40004da55c9 43 //#define LIGHT_PERSONALITY true // the endpoint will be a (set of) lights
ansond 219:c40004da55c9 44 #define COPCAR_PERSONALITY true // the endpoint will emulate a cop car
ansond 149:3a2fe9f6bcb1 45
ansond 230:b8faf572bdb3 46 // special behavior for APM CopCar - steady state on/off for blinking
ansond 230:b8faf572bdb3 47 //#define APM_COPCAR_ENABLE true // true - enabled, (undef) - disabled
ansond 230:b8faf572bdb3 48
ansond 221:863be42b21f5 49 // APM Demo Light Configuration
ansond 239:b2fea9e246f6 50 //#define APM_LIGHT_ENABLE false // true - enable APM Demo light, undef - disable
ansond 221:863be42b21f5 51
ansond 221:863be42b21f5 52 // External LED Light Configuration
ansond 221:863be42b21f5 53 #define EXT_LED_ENABLE true // true - enable external LED endpoint light, false - disable
ansond 221:863be42b21f5 54
ansond 148:56bf8bad4567 55 // include common definitions
ansond 148:56bf8bad4567 56 #include "CommonDefinitions.h"
ansond 148:56bf8bad4567 57
ansond 219:c40004da55c9 58 // turn these ON for NSP via cellular
ansond 221:863be42b21f5 59 #undef EH_USE_MUTEXES
ansond 221:863be42b21f5 60 #undef NETWORK_MUTEX
ansond 221:863be42b21f5 61 #define ENABLE_THREADS true
ansond 205:8d15b5c00a9f 62
ansond 149:3a2fe9f6bcb1 63 // NSP specific definitions
ansond 149:3a2fe9f6bcb1 64 #include "NSPDefinitions.h"
ansond 149:3a2fe9f6bcb1 65
ansond 191:e43990cd14e9 66 // OVERRIDE: NSP Endpoint
ansond 192:921672c972ea 67 #undef NSP_ADDRESS
ansond 211:305a526e365c 68 #undef NSP_PORT
ansond 227:97b0a7e6bdcd 69 //#define NSP_ADDRESS "192.168.1.220" // Target NSP Service
ansond 227:97b0a7e6bdcd 70 //#define NSP_PORT 5683 // Target NSP Service Port Number (def: 5683)
ansond 227:97b0a7e6bdcd 71
ansond 227:97b0a7e6bdcd 72 #define NSP_ADDRESS "72.182.18.233" // Target NSP Service
ansond 227:97b0a7e6bdcd 73 #define NSP_PORT 19648 // Target NSP Service Port Number (def: 5683)
ansond 191:e43990cd14e9 74
ansond 149:3a2fe9f6bcb1 75 // Philips Light Config
ansond 213:f3f284fee989 76 #define PL_ENABLE false // true - enable for endpoint light, false - disable
ansond 213:f3f284fee989 77 #define PL_LIGHT_ID PL_LIGHT_ID_BILL // Default light for Philips Light
ansond 148:56bf8bad4567 78
ansond 149:3a2fe9f6bcb1 79 // Endpoint GPS Coordinates
ansond 222:b8acc55cfb0f 80 //#define ENDPOINT_LOCATION "Las Vegas Police Dept" // Where this light/endpoint lives
ansond 222:b8acc55cfb0f 81 //#define ENDPOINT_GPS_COORDS "36.131735,-115.147683" // Joe Brown Drive
ansond 238:ba3d07e39840 82 //#define ENDPOINT_LOCATION "ISSUU Dept - Bilbao Spain" // Copcar location
ansond 238:ba3d07e39840 83 //#define ENDPOINT_GPS_COORDS "43.262977,-2.924335" // Bilbao Spain
ansond 241:1b92c4303724 84 #define ENDPOINT_LOCATION "Santa Clara PD" // Where this light/endpoint lives
ansond 241:1b92c4303724 85 #define ENDPOINT_GPS_COORDS "37.403841,-121.973001" // Santa Clara, CA
ansond 149:3a2fe9f6bcb1 86
ansond 156:f727f668282f 87 // Reset our config values if needed
ansond 156:f727f668282f 88 #ifdef _ENDPOINT_UBLOX_PLATFORM
ansond 163:650a02b5fd9a 89 #define UBLOX_GPS_FREQ 100000 // GPS freq in ns
ansond 163:650a02b5fd9a 90 #define UBLOX_GPS_POLL_MS 5000 // poll the GPS every 5 seconds
ansond 156:f727f668282f 91 #endif
ansond 156:f727f668282f 92
ansond 149:3a2fe9f6bcb1 93 // DEBUG Hush Logging
ansond 148:56bf8bad4567 94 //#define HUSH_LOG true // false - logging output, true - no logging
ansond 148:56bf8bad4567 95
ansond 149:3a2fe9f6bcb1 96 // DEBUG Hush LED usage
ansond 148:56bf8bad4567 97 //#define HUSH_LEDS true // false - enable LEDs, true - disable LEDs
ansond 148:56bf8bad4567 98
ansond 149:3a2fe9f6bcb1 99 // DEBUG Memory Debug Enable/Disable
ansond 148:56bf8bad4567 100 //#define ENABLE_MEMORY_DEBUG true // false - disable, true - enable (for all error_handler->log() operations)
ansond 148:56bf8bad4567 101 //#define MEMORY_LOGGING true // false - disable, true - enable (for error_handler->log_memory() operations only)
ansond 148:56bf8bad4567 102
ansond 149:3a2fe9f6bcb1 103 // KEIL our MAC address
ansond 148:56bf8bad4567 104 //#define MAC_ADDRESS 0x00,0x1e,0xAB,0xE3,0x4F,0x55
ansond 148:56bf8bad4567 105
ansond 148:56bf8bad4567 106 #endif // _DEFINITIONS_H