Dreamforce 2014 Workshop RFID Case Generator - FRDM-K64F

Dependencies:   EndpointMain-rfid EthernetInterface StatusReporter BufferedSerial mbed-rtos mbed Logger C12832

Fork of df-2014-workshop-rfid-case-generator-ublox by Doug Anson

Committer:
ansond
Date:
Sun Sep 21 07:29:09 2014 +0000
Revision:
46:68fc0a636266
Parent:
36:1318839f73f9
Child:
48:0ff25290cce3
updates for new ssl library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ansond 0:df2aa79c64f2 1 /* Copyright C2014 ARM, MIT License
ansond 0:df2aa79c64f2 2 *
ansond 0:df2aa79c64f2 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
ansond 0:df2aa79c64f2 4 * and associated documentation files the "Software", to deal in the Software without restriction,
ansond 0:df2aa79c64f2 5 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
ansond 0:df2aa79c64f2 6 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
ansond 0:df2aa79c64f2 7 * furnished to do so, subject to the following conditions:
ansond 0:df2aa79c64f2 8 *
ansond 0:df2aa79c64f2 9 * The above copyright notice and this permission notice shall be included in all copies or
ansond 0:df2aa79c64f2 10 * substantial portions of the Software.
ansond 0:df2aa79c64f2 11 *
ansond 0:df2aa79c64f2 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
ansond 0:df2aa79c64f2 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
ansond 0:df2aa79c64f2 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
ansond 0:df2aa79c64f2 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
ansond 0:df2aa79c64f2 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ansond 0:df2aa79c64f2 17 */
ansond 0:df2aa79c64f2 18
ansond 0:df2aa79c64f2 19 #ifndef _DEFINITIONS_H_
ansond 0:df2aa79c64f2 20 #define _DEFINITIONS_H_
ansond 0:df2aa79c64f2 21
ansond 1:5c7d6b24a773 22 // ----------------- WORKSHOP TUNABLES -----------------
ansond 1:5c7d6b24a773 23
ansond 1:5c7d6b24a773 24 // Tunables for RFID tags
ansond 8:fefcecb66463 25 #define FIRST_WIDGET_RFID 9909120
ansond 8:fefcecb66463 26 #define FIRST_WIDGET_NAME "Tech 49"
ansond 8:fefcecb66463 27 #define FIRST_WIDGET_DESCRIPTION "Investigating Issue"
ansond 8:fefcecb66463 28 #define SECOND_WIDGET_RFID 9909121
ansond 8:fefcecb66463 29 #define SECOND_WIDGET_NAME "Tech 49"
ansond 8:fefcecb66463 30 #define SECOND_WIDGET_DESCRIPTION "Issue Resolved"
ansond 8:fefcecb66463 31 #define THIRD_WIDGET_RFID 9909122
ansond 8:fefcecb66463 32 #define THIRD_WIDGET_NAME "Tech 49"
ansond 8:fefcecb66463 33 #define THIRD_WIDGET_DESCRIPTION "Issue Escalation"
ansond 1:5c7d6b24a773 34
ansond 1:5c7d6b24a773 35 // ----------------- WORKSHOP TUNABLES -----------------
ansond 1:5c7d6b24a773 36
ansond 1:5c7d6b24a773 37 // mbed
ansond 0:df2aa79c64f2 38 #include "mbed.h"
ansond 0:df2aa79c64f2 39
ansond 0:df2aa79c64f2 40 // Our App version
ansond 5:606c2b0be78b 41 #define APP_VERSION "1.0.0"
ansond 3:03108e424931 42
ansond 3:03108e424931 43 // DF2014 CaseGenerator Relay for mbed - ties into the Salesforce APEX host for case generation
ansond 5:606c2b0be78b 44 #define DF_CASE_GEN_URL "https://df2014-arm-developer-edition.na15.force.com/services/apexrest/CaseService"
ansond 0:df2aa79c64f2 45
ansond 6:427c387b10e7 46 // Enable/Disable RFID ID12 usage
ansond 7:5d6e03557246 47 #define ID12_ENABLE true // true - enable, false - disable
ansond 6:427c387b10e7 48
ansond 46:68fc0a636266 49 // maximum memory buffer chunk (including HTTPS requests)
ansond 46:68fc0a636266 50 #define MAX_BUFFER_LENGTH 256
ansond 46:68fc0a636266 51
ansond 0:df2aa79c64f2 52 // What platform we are compiling on
ansond 23:3632b2578c74 53 #define _NXP_PLATFORM false
ansond 22:1b9e29933ab3 54 #define _UBLOX_PLATFORM false
ansond 23:3632b2578c74 55 #define _K64F_PLATFORM true
ansond 0:df2aa79c64f2 56
ansond 27:9bb430dd6c07 57 // K64F needs to launch the task in a thread with a large stack size...
ansond 27:9bb430dd6c07 58 #if _K64F_PLATFORM
ansond 46:68fc0a636266 59 #define STACK_SIZE 40000
ansond 27:9bb430dd6c07 60 #endif
ansond 27:9bb430dd6c07 61
ansond 0:df2aa79c64f2 62 // Wait Time for iterations (ms)
ansond 0:df2aa79c64f2 63 #define WAIT_TIME_MS 500
ansond 0:df2aa79c64f2 64
ansond 19:341ce6a43a84 65 // Blink Time
ansond 19:341ce6a43a84 66 #define BLINK_TIME 250
ansond 19:341ce6a43a84 67
ansond 0:df2aa79c64f2 68 // Tunables for WidgetDB
ansond 17:67eeffe10934 69 #define DB_MAX_NAME_LENGTH 64
ansond 17:67eeffe10934 70 #define DB_MAX_DESCRIPTION_LENGTH 128
ansond 17:67eeffe10934 71 #define DB_MAX_NUM_WIDGETS 3
ansond 0:df2aa79c64f2 72
ansond 0:df2aa79c64f2 73 // convenience definitions for WidgetDB... 2 RFIDs/station
ansond 0:df2aa79c64f2 74 #define FIRST_WIDGET 0
ansond 0:df2aa79c64f2 75 #define SECOND_WIDGET 1
ansond 8:fefcecb66463 76 #define THIRD_WIDGET 2
ansond 0:df2aa79c64f2 77
ansond 22:1b9e29933ab3 78 // PINS for RFID Reader
ansond 22:1b9e29933ab3 79 #if _NXP_PLATFORM
ansond 22:1b9e29933ab3 80 #define RFID_TX_PIN p13
ansond 22:1b9e29933ab3 81 #define RFID_RX_PIN p14
ansond 22:1b9e29933ab3 82 #endif
ansond 22:1b9e29933ab3 83 #if _UBLOX_PLATFORM
ansond 26:efa0655eec62 84 #define RFID_TX_PIN P4_28
ansond 26:efa0655eec62 85 #define RFID_RX_PIN P4_29
ansond 22:1b9e29933ab3 86 #endif
ansond 22:1b9e29933ab3 87 #if _K64F_PLATFORM
ansond 29:a1067f9eb41c 88 #define RFID_TX_PIN D1
ansond 29:a1067f9eb41c 89 #define RFID_RX_PIN D0
ansond 22:1b9e29933ab3 90 #endif
ansond 22:1b9e29933ab3 91
ansond 36:1318839f73f9 92 // KEIL: our MAC address (debugging)
ansond 36:1318839f73f9 93 //#define MAC_ADDRESS 0xa0,0x12,0xAB,0xE3,0x4F,0x56
ansond 36:1318839f73f9 94
ansond 0:df2aa79c64f2 95 #endif // _DEFINITIONS_H_