MBED NanoService Lighting Endpoint for NXP Ublox (Ethernet enabled)

Dependencies:   C027 C12832 EthernetInterface StatusReporter LM75B endpoint_core endpoint_nsp mbed-rtos mbed nsp_resources

Committer:
ansond
Date:
Wed Sep 10 17:32:58 2014 +0000
Revision:
228:dfa947de956d
Parent:
227:76dbd27b3c27
Child:
230:f1fab8125edb
disabled APM light behavior

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 177:244dd4404e6a 27 //#define _ENDPOINT_FREESCALE_PLATFORM true // uncomment for the Freescale Freedom MBED platform
ansond 177:244dd4404e6a 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 177:244dd4404e6a 31 //#define CELLULAR_NETWORK true // true - use cellular network, false - use ethernet (cannot co-exist together)
ansond 170:9ee711ce73df 32
ansond 164:eee187a5723a 33 // what kind of personality we are...
ansond 177:244dd4404e6a 34 //#define LIGHT_PERSONALITY true // the endpoint will be a (set of) lights
ansond 173:05a238bb4b6b 35 #define COPCAR_PERSONALITY true // the endpoint will emulate a cop car
ansond 149:3a2fe9f6bcb1 36
ansond 219:8b83fb611d0f 37 // special behavior for APM CopCar - steady state on/off for blinking
ansond 219:8b83fb611d0f 38 //#define APM_COPCAR_ENABLE true // true - enabled, (undef) - disabled
ansond 219:8b83fb611d0f 39
ansond 211:3b3380fa7ecb 40 // APM Demo Light Configuration
ansond 228:dfa947de956d 41 //#define APM_LIGHT_ENABLE false // true - enable APM Demo light, undef - disable
ansond 211:3b3380fa7ecb 42
ansond 211:3b3380fa7ecb 43 // External LED Light Configuration
ansond 211:3b3380fa7ecb 44 #define EXT_LED_ENABLE true // true - enable external LED endpoint light, false - disable
ansond 211:3b3380fa7ecb 45
ansond 148:56bf8bad4567 46 // include common definitions
ansond 148:56bf8bad4567 47 #include "CommonDefinitions.h"
ansond 148:56bf8bad4567 48
ansond 149:3a2fe9f6bcb1 49 // NSP specific definitions
ansond 149:3a2fe9f6bcb1 50 #include "NSPDefinitions.h"
ansond 149:3a2fe9f6bcb1 51
ansond 210:da093eadf7bd 52 // OVERRIDE: NSP Endpoint
ansond 210:da093eadf7bd 53 #undef NSP_ADDRESS
ansond 210:da093eadf7bd 54 #undef NSP_PORT
ansond 210:da093eadf7bd 55 #define NSP_ADDRESS "192.168.1.220" // Target NSP Service
ansond 210:da093eadf7bd 56 #define NSP_PORT 5683 // Target NSP Service Port Number (def: 5683)
ansond 210:da093eadf7bd 57
ansond 149:3a2fe9f6bcb1 58 // Philips Light Config
ansond 164:eee187a5723a 59 #define PL_ENABLE false // true - enable for endpoint light, false - disable
ansond 164:eee187a5723a 60 #define PL_LIGHT_ID PL_LIGHT_ID_BILL // Default light for Philips Light
ansond 148:56bf8bad4567 61
ansond 149:3a2fe9f6bcb1 62 // Endpoint GPS Coordinates
ansond 212:5b2229fbbbba 63 //#define ENDPOINT_LOCATION "Las Vegas Police Dept" // Where this light/endpoint lives
ansond 212:5b2229fbbbba 64 //#define ENDPOINT_GPS_COORDS "36.131735,-115.147683" // Joe Brown Drive
ansond 227:76dbd27b3c27 65 //#define ENDPOINT_LOCATION "ISSUU Dept - Bilbao Spain" // Copcar location
ansond 227:76dbd27b3c27 66 //#define ENDPOINT_GPS_COORDS "43.262977,-2.924335" // Bilbao Spain
ansond 227:76dbd27b3c27 67 #define ENDPOINT_LOCATION "Santa Clara Police Dept" // Copcar location
ansond 227:76dbd27b3c27 68 #define ENDPOINT_GPS_COORDS "37.403841,-121.973001" // Santa Clara CA
ansond 149:3a2fe9f6bcb1 69
ansond 156:f727f668282f 70 // Reset our config values if needed
ansond 156:f727f668282f 71 #ifdef _ENDPOINT_UBLOX_PLATFORM
ansond 204:4e046ba15a01 72 #define UBLOX_GPS_FREQ 100000 // GPS freq in ns
ansond 204:4e046ba15a01 73 #define UBLOX_GPS_POLL_MS 5000 // poll the GPS every 5 seconds
ansond 156:f727f668282f 74 #endif
ansond 156:f727f668282f 75
ansond 149:3a2fe9f6bcb1 76 // DEBUG Hush Logging
ansond 148:56bf8bad4567 77 //#define HUSH_LOG true // false - logging output, true - no logging
ansond 148:56bf8bad4567 78
ansond 149:3a2fe9f6bcb1 79 // DEBUG Hush LED usage
ansond 148:56bf8bad4567 80 //#define HUSH_LEDS true // false - enable LEDs, true - disable LEDs
ansond 148:56bf8bad4567 81
ansond 149:3a2fe9f6bcb1 82 // DEBUG Memory Debug Enable/Disable
ansond 148:56bf8bad4567 83 //#define ENABLE_MEMORY_DEBUG true // false - disable, true - enable (for all error_handler->log() operations)
ansond 148:56bf8bad4567 84 //#define MEMORY_LOGGING true // false - disable, true - enable (for error_handler->log_memory() operations only)
ansond 148:56bf8bad4567 85
ansond 149:3a2fe9f6bcb1 86 // KEIL our MAC address
ansond 148:56bf8bad4567 87 //#define MAC_ADDRESS 0x00,0x1e,0xAB,0xE3,0x4F,0x55
ansond 148:56bf8bad4567 88
ansond 148:56bf8bad4567 89 #endif // _DEFINITIONS_H