1
- /*
2
- BLE Central API (deprecated)
3
- Copyright (c) 2016 Arduino LLC. All right reserved.
4
-
5
- This library is free software; you can redistribute it and/or
6
- modify it under the terms of the GNU Lesser General Public
7
- License as published by the Free Software Foundation; either
8
- version 2.1 of the License, or (at your option) any later version.
9
-
10
- This library is distributed in the hope that it will be useful,
11
- but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- Lesser General Public License for more details.
14
-
15
- You should have received a copy of the GNU Lesser General Public
16
- License along with this library; if not, write to the Free Software
17
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
- */
19
-
20
- #ifndef ARDUINO_CENTRAL_H
21
- #define ARDUINO_CENTRAL_H
22
-
23
- class BLECentral {
24
- public:
25
- bool connected (void ); // is the central connected
26
-
27
- const char * address (void ) const ; // address of the Central in string form
28
-
29
- bool disconnect (void ); // Disconnect the central if it is connected
30
- void poll (void ); // Poll the central for events
31
-
32
- operator bool (void ) const ;
33
- bool operator ==(const BLECentral& rhs) const ;
34
- bool operator !=(const BLECentral& rhs) const ;
35
- protected:
36
- friend void bleBackCompatiblePeripheralConnectHandler (BLEDevice central);
37
- friend void bleBackCompatiblePeripheralDisconnectHandler (BLEDevice central);
38
- friend class BLEPeripheral ;
39
- BLECentral (BLEDevice& device);
40
- private:
41
-
42
- BLEDevice _device;
43
- };
44
-
1
+ /*
2
+ BLE Central API (deprecated)
3
+ Copyright (c) 2016 Arduino LLC. All right reserved.
4
+
5
+ This library is free software; you can redistribute it and/or
6
+ modify it under the terms of the GNU Lesser General Public
7
+ License as published by the Free Software Foundation; either
8
+ version 2.1 of the License, or (at your option) any later version.
9
+
10
+ This library is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ Lesser General Public License for more details.
14
+
15
+ You should have received a copy of the GNU Lesser General Public
16
+ License along with this library; if not, write to the Free Software
17
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
+ */
19
+
20
+ #ifndef ARDUINO_CENTRAL_H
21
+ #define ARDUINO_CENTRAL_H
22
+
23
+ class BLECentral {
24
+ public:
25
+ bool connected (void ); // is the central connected
26
+
27
+ const char * address (void ) const ; // address of the Central in string form
28
+
29
+ bool disconnect (void ); // Disconnect the central if it is connected
30
+ void poll (void ); // Poll the central for events
31
+
32
+ operator bool (void ) const ;
33
+ bool operator ==(const BLECentral& rhs) const ;
34
+ bool operator !=(const BLECentral& rhs) const ;
35
+ protected:
36
+ friend class BLECharacteristicImp ;
37
+ friend void bleBackCompatiblePeripheralConnectHandler (BLEDevice central);
38
+ friend void bleBackCompatiblePeripheralDisconnectHandler (BLEDevice central);
39
+ friend class BLEPeripheral ;
40
+ BLECentral (BLEDevice& device);
41
+ private:
42
+
43
+ BLEDevice _device;
44
+ };
45
+
45
46
#endif
0 commit comments