hirokuma hirokuma / Mbed 2 deprecated BleNanoLed

Dependencies:   BLE_API mbed nRF51822

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ble_nanoled_service.h Source File

ble_nanoled_service.h

00001 #ifndef BLE_NANOLED_SERVICE_H__
00002 #define BLE_NANOLED_SERVICE_H__
00003 
00004 #include "mbed.h"
00005 #include "ble/BLE.h"
00006 
00007 class ServiceUart {
00008 private:
00009     static const int TXRX_BUF_LEN = 20;
00010     static const int CHAR_NUM = 2;
00011 
00012 public:
00013     void addService(BLE& ble);
00014     void writtenHandler(BLE& ble, const GattWriteCallbackParams* params);
00015     void readHandler(BLE& ble, const GattReadCallbackParams* params);
00016 
00017 private:
00018     GattCharacteristic* mChars[CHAR_NUM];
00019     uint8_t mTxPayload[TXRX_BUF_LEN];
00020     uint8_t mRxPayload[TXRX_BUF_LEN];
00021 };
00022 
00023 #endif //BLE_NANOLED_SERVICE_H__