MBED NanoService Lighting Endpoint for NXP Ublox (Ethernet enabled)

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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Definitions.h Source File

Definitions.h

00001 /* Copyright C2013 Doug Anson, MIT License
00002  *
00003  * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
00004  * and associated documentation files the "Software", to deal in the Software without restriction,
00005  * including without limitation the rights to use, copy, modify, merge, publish, distribute,
00006  * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
00007  * furnished to do so, subject to the following conditions:
00008  *
00009  * The above copyright notice and this permission notice shall be included in all copies or
00010  * substantial portions of the Software.
00011  *
00012  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
00013  * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00014  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
00015  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00016  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00017  */
00018  
00019 #ifndef _DEFINITIONS_H_
00020 #define _DEFINITIONS_H_
00021 
00022 // platform
00023 #include "mbed.h"
00024 
00025 // Platform Switch
00026 #define   _ENDPOINT_UBLOX_PLATFORM      true                      // uncomment for the U-Blox MBED platform
00027 //#define   _ENDPOINT_FREESCALE_PLATFORM  true                    // uncomment for the Freescale Freedom MBED platform
00028 //#define   _ENDPOINT_NXP_PLATFORM        true                    // uncomment for the NXP MBED platform
00029 
00030 // Network Usage (default is Ethernet)
00031 //#define CELLULAR_NETWORK                true                    // true - use cellular network, false - use ethernet (cannot co-exist together)
00032 
00033 // Multitech Temp Probe customization
00034 //#define MULTITECH_TEMP_PROBE            true                // true - on, undef - off
00035 
00036 // what kind of personality we are...
00037 //#define LIGHT_PERSONALITY               true                    // the endpoint will be a (set of) lights
00038 #define COPCAR_PERSONALITY              true                      // the endpoint will emulate a cop car
00039 
00040 // special behavior for APM CopCar - steady state on/off for blinking
00041 //#define APM_COPCAR_ENABLE               true                      // true - enabled, (undef) - disabled
00042 
00043 // APM Demo Light Configuration
00044 //#define APM_LIGHT_ENABLE            false                            // true - enable APM Demo light, undef - disable
00045 
00046 // External LED Light Configuration
00047 #define EXT_LED_ENABLE              true                            // true - enable external LED endpoint light, false - disable
00048 
00049 // include common definitions
00050 #include "CommonDefinitions.h"
00051 
00052 // NSP specific definitions
00053 #include "NSPDefinitions.h"
00054 
00055 // OVERRIDE: NSP Endpoint
00056 #undef NSP_ADDRESS
00057 #undef NSP_PORT
00058 #define NSP_ADDRESS                "192.168.1.220"               // Target NSP Service
00059 #define NSP_PORT                   5683                          // Target NSP Service Port Number (def: 5683)
00060 
00061 // Philips Light Config
00062 #define PL_ENABLE                       false                    // true - enable for endpoint light, false - disable
00063 #define PL_LIGHT_ID                     PL_LIGHT_ID_BILL         // Default light for Philips Light
00064 
00065 // Endpoint GPS Coordinates
00066 //#define ENDPOINT_LOCATION               "Las Vegas Police Dept"  // Where this light/endpoint lives
00067 //#define ENDPOINT_GPS_COORDS             "36.131735,-115.147683"  // Joe Brown Drive 
00068 //#define ENDPOINT_LOCATION           "ISSUU Dept - Bilbao Spain"     // Copcar location
00069 //#define ENDPOINT_GPS_COORDS         "43.262977,-2.924335"           // Bilbao Spain 
00070 #define ENDPOINT_LOCATION             "Santa Clara PD"            // Where this light/endpoint lives
00071 #define ENDPOINT_GPS_COORDS           "37.403841,-121.973001"     // Santa Clara, CA
00072 
00073 // Reset our config values if needed
00074 #ifdef _ENDPOINT_UBLOX_PLATFORM
00075     #define UBLOX_GPS_FREQ          100000                       // GPS freq in ns
00076     #define UBLOX_GPS_POLL_MS       5000                         // poll the GPS every 5 seconds
00077 #endif
00078 
00079 // DEBUG Hush Logging
00080 //#define HUSH_LOG                      true          // false - logging output, true - no logging
00081 
00082 // DEBUG Hush LED usage
00083 //#define HUSH_LEDS                     true          // false - enable LEDs, true - disable LEDs
00084 
00085 // DEBUG Memory Debug Enable/Disable
00086 //#define ENABLE_MEMORY_DEBUG           true          // false - disable, true - enable (for all error_handler->log() operations)
00087 //#define MEMORY_LOGGING                true          // false - disable, true - enable (for error_handler->log_memory() operations only)
00088 
00089 // KEIL our MAC address
00090 //#define MAC_ADDRESS                   0x00,0x1e,0xAB,0xE3,0x4F,0x55
00091 
00092 #endif // _DEFINITIONS_H