最新revisionだとなんかerrorになるので、暫定的に rev 111にrevert。ごめんなさい。こういうときどういうふうにcommitすればいいのか分からなかったので。

Dependents:   MiniSteer_BLE

Fork of BLE_API by Bluetooth Low Energy

Committer:
lipoyang
Date:
Wed Sep 17 04:54:22 2014 +0000
Revision:
118:f2de8009b969
Parent:
116:ca826083980e
revert to revison 111

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rohit Grover 106:a20be740075d 1 /* mbed Microcontroller Library
Rohit Grover 106:a20be740075d 2 * Copyright (c) 2006-2013 ARM Limited
Rohit Grover 106:a20be740075d 3 *
Rohit Grover 106:a20be740075d 4 * Licensed under the Apache License, Version 2.0 (the "License");
Rohit Grover 106:a20be740075d 5 * you may not use this file except in compliance with the License.
Rohit Grover 106:a20be740075d 6 * You may obtain a copy of the License at
Rohit Grover 106:a20be740075d 7 *
Rohit Grover 106:a20be740075d 8 * http://www.apache.org/licenses/LICENSE-2.0
Rohit Grover 106:a20be740075d 9 *
Rohit Grover 106:a20be740075d 10 * Unless required by applicable law or agreed to in writing, software
Rohit Grover 106:a20be740075d 11 * distributed under the License is distributed on an "AS IS" BASIS,
Rohit Grover 106:a20be740075d 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Rohit Grover 106:a20be740075d 13 * See the License for the specific language governing permissions and
Rohit Grover 106:a20be740075d 14 * limitations under the License.
Rohit Grover 106:a20be740075d 15 */
Rohit Grover 106:a20be740075d 16
Rohit Grover 106:a20be740075d 17 #ifndef __GAP_EVENTS_H__
Rohit Grover 106:a20be740075d 18 #define __GAP_EVENTS_H__
Rohit Grover 106:a20be740075d 19
Rohit Grover 106:a20be740075d 20 #include "blecommon.h"
Rohit Grover 106:a20be740075d 21 #include "mbed.h"
Rohit Grover 106:a20be740075d 22
Rohit Grover 106:a20be740075d 23 /**************************************************************************/
Rohit Grover 106:a20be740075d 24 /*!
Rohit Grover 106:a20be740075d 25 \brief
Rohit Grover 106:a20be740075d 26 The base class used to abstract away the callback events that can be
Rohit Grover 106:a20be740075d 27 triggered with the GAP.
Rohit Grover 106:a20be740075d 28 */
Rohit Grover 106:a20be740075d 29 /**************************************************************************/
Rohit Grover 106:a20be740075d 30 class GapEvents
Rohit Grover 106:a20be740075d 31 {
Rohit Grover 106:a20be740075d 32 public:
Rohit Grover 106:a20be740075d 33 /******************************************************************/
Rohit Grover 106:a20be740075d 34 /*!
Rohit Grover 106:a20be740075d 35 \brief
Rohit Grover 106:a20be740075d 36 Identifies GAP events generated by the radio HW when an event
Rohit Grover 106:a20be740075d 37 callback occurs
Rohit Grover 106:a20be740075d 38 */
Rohit Grover 106:a20be740075d 39 /******************************************************************/
Rohit Grover 106:a20be740075d 40 typedef enum gapEvent_e {
lipoyang 118:f2de8009b969 41 GAP_EVENT_TIMEOUT = 1, /**< Advertising timed out
lipoyang 118:f2de8009b969 42 *before a connection was
lipoyang 118:f2de8009b969 43 *established */
lipoyang 118:f2de8009b969 44 GAP_EVENT_CONNECTED = 2, /**< A connection was
lipoyang 118:f2de8009b969 45 *established with a
lipoyang 118:f2de8009b969 46 *central device */
lipoyang 118:f2de8009b969 47 GAP_EVENT_DISCONNECTED = 3 /**< A connection was
lipoyang 118:f2de8009b969 48 *closed or lost with a
lipoyang 118:f2de8009b969 49 *central device */
Rohit Grover 106:a20be740075d 50 } gapEvent_t;
lipoyang 118:f2de8009b969 51
lipoyang 118:f2de8009b969 52 /******************************************************************/
lipoyang 118:f2de8009b969 53 /*!
lipoyang 118:f2de8009b969 54 \brief
lipoyang 118:f2de8009b969 55 Advertising timed out before a connection was established
lipoyang 118:f2de8009b969 56 */
lipoyang 118:f2de8009b969 57 /******************************************************************/
lipoyang 118:f2de8009b969 58 virtual void onTimeout(void) {
lipoyang 118:f2de8009b969 59 }
lipoyang 118:f2de8009b969 60
lipoyang 118:f2de8009b969 61 /******************************************************************/
lipoyang 118:f2de8009b969 62 /*!
lipoyang 118:f2de8009b969 63 \brief
lipoyang 118:f2de8009b969 64 A connection was established with a central device
lipoyang 118:f2de8009b969 65 */
lipoyang 118:f2de8009b969 66 /******************************************************************/
lipoyang 118:f2de8009b969 67 virtual void onConnected(void) {
lipoyang 118:f2de8009b969 68 }
lipoyang 118:f2de8009b969 69
lipoyang 118:f2de8009b969 70 /******************************************************************/
lipoyang 118:f2de8009b969 71 /*!
lipoyang 118:f2de8009b969 72 \brief
lipoyang 118:f2de8009b969 73 A connection was closed or lost with a central device
lipoyang 118:f2de8009b969 74 */
lipoyang 118:f2de8009b969 75 /******************************************************************/
lipoyang 118:f2de8009b969 76 virtual void onDisconnected(void) {
lipoyang 118:f2de8009b969 77 }
Rohit Grover 106:a20be740075d 78 };
Rohit Grover 106:a20be740075d 79
Rohit Grover 106:a20be740075d 80 #endif // ifndef __GAP_EVENTS_H__