Bill Schilit / BLE_API

Fork of BLE_API by Bluetooth Low Energy

Committer:
ktownsend
Date:
Wed Dec 04 07:20:24 2013 +0000
Revision:
1:fd3ec64b2345
Parent:
0:ace2e8d3ce79
Child:
2:ffc5216bd2cc
Added LPC1768 pinout

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 "bleservice.h"
ktownsend 0:ace2e8d3ce79 7 #include "bleradio.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 0:ace2e8d3ce79 15 /* Functions that mus be implemented from NRFRadio */
ktownsend 1:fd3ec64b2345 16 //virtual ble_error_t attach(void (*fptr)(void));
ktownsend 0:ace2e8d3ce79 17 virtual ble_error_t addService(BLEService &);
ktownsend 0:ace2e8d3ce79 18 virtual ble_error_t updateValue(uint8_t, uint8_t, uint8_t[], uint16_t);
ktownsend 0:ace2e8d3ce79 19 virtual ble_error_t start(void);
ktownsend 0:ace2e8d3ce79 20 virtual ble_error_t stop(void);
ktownsend 0:ace2e8d3ce79 21 virtual ble_error_t reset(void);
ktownsend 0:ace2e8d3ce79 22
ktownsend 0:ace2e8d3ce79 23 /* nRF51 Functions */
ktownsend 0:ace2e8d3ce79 24 void uartCallback(void);
ktownsend 0:ace2e8d3ce79 25
ktownsend 0:ace2e8d3ce79 26 private:
ktownsend 0:ace2e8d3ce79 27 Serial uart;
ktownsend 0:ace2e8d3ce79 28 };
ktownsend 0:ace2e8d3ce79 29
ktownsend 0:ace2e8d3ce79 30 #endif