Microbug / BLE_API

Fork of BLE_API by Bluetooth Low Energy

Committer:
ktownsend
Date:
Tue Jan 07 10:54:02 2014 +0000
Revision:
22:260313bcf4d0
Parent:
17:9eb2b6fbbda9
Child:
23:f19c60478e1b
More doxygen cleanup

Who changed what in which revision?

UserRevisionLine numberNew 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 22:260313bcf4d0 9 /**************************************************************************/
ktownsend 22:260313bcf4d0 10 /*!
ktownsend 22:260313bcf4d0 11 \brief
ktownsend 22:260313bcf4d0 12 Driver for the nRF51822 in connectivity mode using custom serialization
ktownsend 22:260313bcf4d0 13 firmware.
ktownsend 22:260313bcf4d0 14 */
ktownsend 22:260313bcf4d0 15 /**************************************************************************/
ktownsend 0:ace2e8d3ce79 16 class nRF51822 : public BLERadio
ktownsend 0:ace2e8d3ce79 17 {
ktownsend 0:ace2e8d3ce79 18 public:
ktownsend 0:ace2e8d3ce79 19 nRF51822();
ktownsend 0:ace2e8d3ce79 20 virtual ~nRF51822(void);
ktownsend 0:ace2e8d3ce79 21
ktownsend 9:124ae067ae27 22 /* Functions that mus be implemented from BLERadio */
ktownsend 7:5e1f0d7f7c7d 23 virtual ble_error_t setAdvertising(GapAdvertisingParams &, GapAdvertisingData &, GapAdvertisingData &);
ktownsend 2:ffc5216bd2cc 24 virtual ble_error_t addService(GattService &);
ktownsend 2:ffc5216bd2cc 25 virtual ble_error_t readCharacteristic(GattService &, GattCharacteristic &, uint8_t[], uint16_t);
ktownsend 2:ffc5216bd2cc 26 virtual ble_error_t writeCharacteristic(GattService &, GattCharacteristic &, uint8_t[], uint16_t);
ktownsend 0:ace2e8d3ce79 27 virtual ble_error_t start(void);
ktownsend 0:ace2e8d3ce79 28 virtual ble_error_t stop(void);
ktownsend 0:ace2e8d3ce79 29 virtual ble_error_t reset(void);
ktownsend 0:ace2e8d3ce79 30
ktownsend 2:ffc5216bd2cc 31 private:
ktownsend 17:9eb2b6fbbda9 32 RawSerial uart;
ktownsend 2:ffc5216bd2cc 33
ktownsend 0:ace2e8d3ce79 34 /* nRF51 Functions */
ktownsend 0:ace2e8d3ce79 35 void uartCallback(void);
ktownsend 0:ace2e8d3ce79 36 };
ktownsend 0:ace2e8d3ce79 37
ktownsend 0:ace2e8d3ce79 38 #endif