Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
hw/nrf51822.h@17:9eb2b6fbbda9, 2013-12-18 (annotated)
- Committer:
- ktownsend
- Date:
- Wed Dec 18 19:15:07 2013 +0000
- Revision:
- 17:9eb2b6fbbda9
- Parent:
- 9:124ae067ae27
- Child:
- 22:260313bcf4d0
Switched to RawSerial
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ktownsend | 0:ace2e8d3ce79 | 1 | #ifndef __NRF51822_H__ |
| ktownsend | 0:ace2e8d3ce79 | 2 | #define __NRF51822_H__ |
| ktownsend | 0:ace2e8d3ce79 | 3 | |
| ktownsend | 0:ace2e8d3ce79 | 4 | #include "mbed.h" |
| ktownsend | 0:ace2e8d3ce79 | 5 | #include "blecommon.h" |
| ktownsend | 0:ace2e8d3ce79 | 6 | #include "bleradio.h" |
| ktownsend | 2:ffc5216bd2cc | 7 | #include "GattService.h" |
| ktownsend | 0:ace2e8d3ce79 | 8 | |
| ktownsend | 0:ace2e8d3ce79 | 9 | class nRF51822 : public BLERadio |
| ktownsend | 0:ace2e8d3ce79 | 10 | { |
| ktownsend | 0:ace2e8d3ce79 | 11 | public: |
| ktownsend | 0:ace2e8d3ce79 | 12 | nRF51822(); |
| ktownsend | 0:ace2e8d3ce79 | 13 | virtual ~nRF51822(void); |
| ktownsend | 0:ace2e8d3ce79 | 14 | |
| ktownsend | 9:124ae067ae27 | 15 | /* Functions that mus be implemented from BLERadio */ |
| ktownsend | 7:5e1f0d7f7c7d | 16 | virtual ble_error_t setAdvertising(GapAdvertisingParams &, GapAdvertisingData &, GapAdvertisingData &); |
| ktownsend | 2:ffc5216bd2cc | 17 | virtual ble_error_t addService(GattService &); |
| ktownsend | 2:ffc5216bd2cc | 18 | virtual ble_error_t readCharacteristic(GattService &, GattCharacteristic &, uint8_t[], uint16_t); |
| ktownsend | 2:ffc5216bd2cc | 19 | virtual ble_error_t writeCharacteristic(GattService &, GattCharacteristic &, uint8_t[], uint16_t); |
| ktownsend | 0:ace2e8d3ce79 | 20 | virtual ble_error_t start(void); |
| ktownsend | 0:ace2e8d3ce79 | 21 | virtual ble_error_t stop(void); |
| ktownsend | 0:ace2e8d3ce79 | 22 | virtual ble_error_t reset(void); |
| ktownsend | 0:ace2e8d3ce79 | 23 | |
| ktownsend | 2:ffc5216bd2cc | 24 | private: |
| ktownsend | 17:9eb2b6fbbda9 | 25 | RawSerial uart; |
| ktownsend | 2:ffc5216bd2cc | 26 | |
| ktownsend | 0:ace2e8d3ce79 | 27 | /* nRF51 Functions */ |
| ktownsend | 0:ace2e8d3ce79 | 28 | void uartCallback(void); |
| ktownsend | 0:ace2e8d3ce79 | 29 | }; |
| ktownsend | 0:ace2e8d3ce79 | 30 | |
| ktownsend | 0:ace2e8d3ce79 | 31 | #endif |
