Update for latest nRF51822 code changes.
Dependencies: BLE_API nRF51822
Fork of Puck by
Puck.hpp@1:29b2cca0d529, 2014-07-17 (annotated)
- Committer:
- stiaje
- Date:
- Thu Jul 17 08:46:50 2014 +0000
- Revision:
- 1:29b2cca0d529
- Parent:
- 0:718051934fdb
- Child:
- 2:38614fd0fcce
Make all pucks connectable
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
stiaje | 0:718051934fdb | 1 | #ifndef __PUCK_HPP__ |
stiaje | 0:718051934fdb | 2 | #define __PUCK_HPP__ |
stiaje | 0:718051934fdb | 3 | |
stiaje | 0:718051934fdb | 4 | #include "BLEDevice.h" |
stiaje | 0:718051934fdb | 5 | |
stiaje | 0:718051934fdb | 6 | class Puck { |
stiaje | 0:718051934fdb | 7 | private: |
stiaje | 0:718051934fdb | 8 | |
stiaje | 0:718051934fdb | 9 | BLEDevice _ble; |
stiaje | 0:718051934fdb | 10 | |
stiaje | 0:718051934fdb | 11 | uint8_t _beaconPayload[25]; |
stiaje | 0:718051934fdb | 12 | |
stiaje | 0:718051934fdb | 13 | public: |
stiaje | 0:718051934fdb | 14 | /** Initialize the Puck library |
stiaje | 0:718051934fdb | 15 | */ |
stiaje | 1:29b2cca0d529 | 16 | Puck(uint16_t minor); |
stiaje | 0:718051934fdb | 17 | |
stiaje | 0:718051934fdb | 18 | /** The BLE Device |
stiaje | 0:718051934fdb | 19 | * @return ble device |
stiaje | 0:718051934fdb | 20 | */ |
stiaje | 0:718051934fdb | 21 | BLEDevice ble() { return _ble; } |
stiaje | 0:718051934fdb | 22 | |
stiaje | 0:718051934fdb | 23 | /** Initialize the BLE Device and start advertising |
stiaje | 0:718051934fdb | 24 | */ |
stiaje | 0:718051934fdb | 25 | void init(); |
stiaje | 0:718051934fdb | 26 | }; |
stiaje | 0:718051934fdb | 27 | |
stiaje | 0:718051934fdb | 28 | #endif // __PUCK_HPP__ |