BLE Nano LED control
Dependencies: BLE_API mbed nRF51822
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__
Generated on Sat Jul 16 2022 07:31:50 by
1.7.2
hirokuma hirokuma