microbit-dal
Dependencies: BLE_API mbed-dev-bin nRF51822
Fork of microbit-dal by
inc/bluetooth/MESEvents.h@1:8aa5cdb4ab67, 2016-04-07 (annotated)
- Committer:
- Jonathan Austin
- Date:
- Thu Apr 07 01:33:22 2016 +0100
- Revision:
- 1:8aa5cdb4ab67
Synchronized with git rev 55cb9199
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jonathan Austin |
1:8aa5cdb4ab67 | 1 | /* |
Jonathan Austin |
1:8aa5cdb4ab67 | 2 | The MIT License (MIT) |
Jonathan Austin |
1:8aa5cdb4ab67 | 3 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 4 | Copyright (c) 2016 British Broadcasting Corporation. |
Jonathan Austin |
1:8aa5cdb4ab67 | 5 | This software is provided by Lancaster University by arrangement with the BBC. |
Jonathan Austin |
1:8aa5cdb4ab67 | 6 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 7 | Permission is hereby granted, free of charge, to any person obtaining a |
Jonathan Austin |
1:8aa5cdb4ab67 | 8 | copy of this software and associated documentation files (the "Software"), |
Jonathan Austin |
1:8aa5cdb4ab67 | 9 | to deal in the Software without restriction, including without limitation |
Jonathan Austin |
1:8aa5cdb4ab67 | 10 | the rights to use, copy, modify, merge, publish, distribute, sublicense, |
Jonathan Austin |
1:8aa5cdb4ab67 | 11 | and/or sell copies of the Software, and to permit persons to whom the |
Jonathan Austin |
1:8aa5cdb4ab67 | 12 | Software is furnished to do so, subject to the following conditions: |
Jonathan Austin |
1:8aa5cdb4ab67 | 13 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 14 | The above copyright notice and this permission notice shall be included in |
Jonathan Austin |
1:8aa5cdb4ab67 | 15 | all copies or substantial portions of the Software. |
Jonathan Austin |
1:8aa5cdb4ab67 | 16 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
Jonathan Austin |
1:8aa5cdb4ab67 | 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
Jonathan Austin |
1:8aa5cdb4ab67 | 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
Jonathan Austin |
1:8aa5cdb4ab67 | 20 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
Jonathan Austin |
1:8aa5cdb4ab67 | 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
Jonathan Austin |
1:8aa5cdb4ab67 | 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
Jonathan Austin |
1:8aa5cdb4ab67 | 23 | DEALINGS IN THE SOFTWARE. |
Jonathan Austin |
1:8aa5cdb4ab67 | 24 | */ |
Jonathan Austin |
1:8aa5cdb4ab67 | 25 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 26 | #ifndef MES_EVENTS_H |
Jonathan Austin |
1:8aa5cdb4ab67 | 27 | #define MES_EVENTS_H |
Jonathan Austin |
1:8aa5cdb4ab67 | 28 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 29 | // |
Jonathan Austin |
1:8aa5cdb4ab67 | 30 | // MicroBit Event Service Event ID's and values |
Jonathan Austin |
1:8aa5cdb4ab67 | 31 | // |
Jonathan Austin |
1:8aa5cdb4ab67 | 32 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 33 | // |
Jonathan Austin |
1:8aa5cdb4ab67 | 34 | // Events that master devices respond to: |
Jonathan Austin |
1:8aa5cdb4ab67 | 35 | // |
Jonathan Austin |
1:8aa5cdb4ab67 | 36 | #define MES_REMOTE_CONTROL_ID 1001 |
Jonathan Austin |
1:8aa5cdb4ab67 | 37 | #define MES_REMOTE_CONTROL_EVT_PLAY 1 |
Jonathan Austin |
1:8aa5cdb4ab67 | 38 | #define MES_REMOTE_CONTROL_EVT_PAUSE 2 |
Jonathan Austin |
1:8aa5cdb4ab67 | 39 | #define MES_REMOTE_CONTROL_EVT_STOP 3 |
Jonathan Austin |
1:8aa5cdb4ab67 | 40 | #define MES_REMOTE_CONTROL_EVT_NEXTTRACK 4 |
Jonathan Austin |
1:8aa5cdb4ab67 | 41 | #define MES_REMOTE_CONTROL_EVT_PREVTRACK 5 |
Jonathan Austin |
1:8aa5cdb4ab67 | 42 | #define MES_REMOTE_CONTROL_EVT_FORWARD 6 |
Jonathan Austin |
1:8aa5cdb4ab67 | 43 | #define MES_REMOTE_CONTROL_EVT_REWIND 7 |
Jonathan Austin |
1:8aa5cdb4ab67 | 44 | #define MES_REMOTE_CONTROL_EVT_VOLUMEUP 8 |
Jonathan Austin |
1:8aa5cdb4ab67 | 45 | #define MES_REMOTE_CONTROL_EVT_VOLUMEDOWN 9 |
Jonathan Austin |
1:8aa5cdb4ab67 | 46 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 47 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 48 | #define MES_CAMERA_ID 1002 |
Jonathan Austin |
1:8aa5cdb4ab67 | 49 | #define MES_CAMERA_EVT_LAUNCH_PHOTO_MODE 1 |
Jonathan Austin |
1:8aa5cdb4ab67 | 50 | #define MES_CAMERA_EVT_LAUNCH_VIDEO_MODE 2 |
Jonathan Austin |
1:8aa5cdb4ab67 | 51 | #define MES_CAMERA_EVT_TAKE_PHOTO 3 |
Jonathan Austin |
1:8aa5cdb4ab67 | 52 | #define MES_CAMERA_EVT_START_VIDEO_CAPTURE 4 |
Jonathan Austin |
1:8aa5cdb4ab67 | 53 | #define MES_CAMERA_EVT_STOP_VIDEO_CAPTURE 5 |
Jonathan Austin |
1:8aa5cdb4ab67 | 54 | #define MES_CAMERA_EVT_STOP_PHOTO_MODE 6 |
Jonathan Austin |
1:8aa5cdb4ab67 | 55 | #define MES_CAMERA_EVT_STOP_VIDEO_MODE 7 |
Jonathan Austin |
1:8aa5cdb4ab67 | 56 | #define MES_CAMERA_EVT_TOGGLE_FRONT_REAR 8 |
Jonathan Austin |
1:8aa5cdb4ab67 | 57 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 58 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 59 | #define MES_ALERTS_ID 1004 |
Jonathan Austin |
1:8aa5cdb4ab67 | 60 | #define MES_ALERT_EVT_DISPLAY_TOAST 1 |
Jonathan Austin |
1:8aa5cdb4ab67 | 61 | #define MES_ALERT_EVT_VIBRATE 2 |
Jonathan Austin |
1:8aa5cdb4ab67 | 62 | #define MES_ALERT_EVT_PLAY_SOUND 3 |
Jonathan Austin |
1:8aa5cdb4ab67 | 63 | #define MES_ALERT_EVT_PLAY_RINGTONE 4 |
Jonathan Austin |
1:8aa5cdb4ab67 | 64 | #define MES_ALERT_EVT_FIND_MY_PHONE 5 |
Jonathan Austin |
1:8aa5cdb4ab67 | 65 | #define MES_ALERT_EVT_ALARM1 6 |
Jonathan Austin |
1:8aa5cdb4ab67 | 66 | #define MES_ALERT_EVT_ALARM2 7 |
Jonathan Austin |
1:8aa5cdb4ab67 | 67 | #define MES_ALERT_EVT_ALARM3 8 |
Jonathan Austin |
1:8aa5cdb4ab67 | 68 | #define MES_ALERT_EVT_ALARM4 9 |
Jonathan Austin |
1:8aa5cdb4ab67 | 69 | #define MES_ALERT_EVT_ALARM5 10 |
Jonathan Austin |
1:8aa5cdb4ab67 | 70 | #define MES_ALERT_EVT_ALARM6 11 |
Jonathan Austin |
1:8aa5cdb4ab67 | 71 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 72 | // |
Jonathan Austin |
1:8aa5cdb4ab67 | 73 | // Events that master devices generate: |
Jonathan Austin |
1:8aa5cdb4ab67 | 74 | // |
Jonathan Austin |
1:8aa5cdb4ab67 | 75 | #define MES_SIGNAL_STRENGTH_ID 1101 |
Jonathan Austin |
1:8aa5cdb4ab67 | 76 | #define MES_SIGNAL_STRENGTH_EVT_NO_BAR 1 |
Jonathan Austin |
1:8aa5cdb4ab67 | 77 | #define MES_SIGNAL_STRENGTH_EVT_ONE_BAR 2 |
Jonathan Austin |
1:8aa5cdb4ab67 | 78 | #define MES_SIGNAL_STRENGTH_EVT_TWO_BAR 3 |
Jonathan Austin |
1:8aa5cdb4ab67 | 79 | #define MES_SIGNAL_STRENGTH_EVT_THREE_BAR 4 |
Jonathan Austin |
1:8aa5cdb4ab67 | 80 | #define MES_SIGNAL_STRENGTH_EVT_FOUR_BAR 5 |
Jonathan Austin |
1:8aa5cdb4ab67 | 81 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 82 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 83 | #define MES_DEVICE_INFO_ID 1103 |
Jonathan Austin |
1:8aa5cdb4ab67 | 84 | #define MES_DEVICE_ORIENTATION_LANDSCAPE 1 |
Jonathan Austin |
1:8aa5cdb4ab67 | 85 | #define MES_DEVICE_ORIENTATION_PORTRAIT 2 |
Jonathan Austin |
1:8aa5cdb4ab67 | 86 | #define MES_DEVICE_GESTURE_NONE 3 |
Jonathan Austin |
1:8aa5cdb4ab67 | 87 | #define MES_DEVICE_GESTURE_DEVICE_SHAKEN 4 |
Jonathan Austin |
1:8aa5cdb4ab67 | 88 | #define MES_DEVICE_DISPLAY_OFF 5 |
Jonathan Austin |
1:8aa5cdb4ab67 | 89 | #define MES_DEVICE_DISPLAY_ON 6 |
Jonathan Austin |
1:8aa5cdb4ab67 | 90 | #define MES_DEVICE_INCOMING_CALL 7 |
Jonathan Austin |
1:8aa5cdb4ab67 | 91 | #define MES_DEVICE_INCOMING_MESSAGE 8 |
Jonathan Austin |
1:8aa5cdb4ab67 | 92 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 93 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 94 | #define MES_DPAD_CONTROLLER_ID 1104 |
Jonathan Austin |
1:8aa5cdb4ab67 | 95 | #define MES_DPAD_BUTTON_A_DOWN 1 |
Jonathan Austin |
1:8aa5cdb4ab67 | 96 | #define MES_DPAD_BUTTON_A_UP 2 |
Jonathan Austin |
1:8aa5cdb4ab67 | 97 | #define MES_DPAD_BUTTON_B_DOWN 3 |
Jonathan Austin |
1:8aa5cdb4ab67 | 98 | #define MES_DPAD_BUTTON_B_UP 4 |
Jonathan Austin |
1:8aa5cdb4ab67 | 99 | #define MES_DPAD_BUTTON_C_DOWN 5 |
Jonathan Austin |
1:8aa5cdb4ab67 | 100 | #define MES_DPAD_BUTTON_C_UP 6 |
Jonathan Austin |
1:8aa5cdb4ab67 | 101 | #define MES_DPAD_BUTTON_D_DOWN 7 |
Jonathan Austin |
1:8aa5cdb4ab67 | 102 | #define MES_DPAD_BUTTON_D_UP 8 |
Jonathan Austin |
1:8aa5cdb4ab67 | 103 | #define MES_DPAD_BUTTON_1_DOWN 9 |
Jonathan Austin |
1:8aa5cdb4ab67 | 104 | #define MES_DPAD_BUTTON_1_UP 10 |
Jonathan Austin |
1:8aa5cdb4ab67 | 105 | #define MES_DPAD_BUTTON_2_DOWN 11 |
Jonathan Austin |
1:8aa5cdb4ab67 | 106 | #define MES_DPAD_BUTTON_2_UP 12 |
Jonathan Austin |
1:8aa5cdb4ab67 | 107 | #define MES_DPAD_BUTTON_3_DOWN 13 |
Jonathan Austin |
1:8aa5cdb4ab67 | 108 | #define MES_DPAD_BUTTON_3_UP 14 |
Jonathan Austin |
1:8aa5cdb4ab67 | 109 | #define MES_DPAD_BUTTON_4_DOWN 15 |
Jonathan Austin |
1:8aa5cdb4ab67 | 110 | #define MES_DPAD_BUTTON_4_UP 16 |
Jonathan Austin |
1:8aa5cdb4ab67 | 111 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 112 | // |
Jonathan Austin |
1:8aa5cdb4ab67 | 113 | // Events that typically use radio broadcast: |
Jonathan Austin |
1:8aa5cdb4ab67 | 114 | // |
Jonathan Austin |
1:8aa5cdb4ab67 | 115 | #define MES_BROADCAST_GENERAL_ID 2000 |
Jonathan Austin |
1:8aa5cdb4ab67 | 116 | |
Jonathan Austin |
1:8aa5cdb4ab67 | 117 | #endif |