Improve readability with getHandle inline
Fork of BLE_API by
Revision 235:4d570d99b8cb, committed 2014-12-08
- Comitter:
- mbedAustin
- Date:
- Mon Dec 08 19:24:29 2014 +0000
- Parent:
- 234:4cfb5b8a4fb9
- Child:
- 236:aac647674384
- Commit message:
- Added documentation to UARTService.h
Changed in this revision
services/UARTService.h | Show annotated file Show diff for this revision Revisions of this file |
services/URIBeaconConfigService.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/services/UARTService.h Mon Dec 08 17:47:58 2014 +0000 +++ b/services/UARTService.h Mon Dec 08 19:24:29 2014 +0000 @@ -34,6 +34,10 @@ extern const uint8_t UARTServiceTXCharacteristicUUID[LENGTH_OF_LONG_UUID]; extern const uint8_t UARTServiceRXCharacteristicUUID[LENGTH_OF_LONG_UUID]; +/** +* @class UARTService +* @breif BLE Service to enable UART over BLE +*/ class UARTService { public: /**< Maximum length of data (in bytes) that can be transmitted by the UART service module to the peer. */ @@ -41,6 +45,11 @@ static const unsigned BLE_UART_SERVICE_MAX_DATA_LEN = (GATT_MTU_SIZE_DEFAULT - 3); public: + + /** + * @param[ref] ble + * BLEDevice object for the underlying controller. + */ UARTService(BLEDevice &_ble) : ble(_ble), receiveBuffer(), @@ -131,6 +140,11 @@ return (write(&c, 1) == 1) ? 1 : EOF; } + /** + * Override for Stream::_getc() + * @return + * The character read. + */ int _getc() { if (receiveBufferIndex == numBytesReceived) { return EOF;
--- a/services/URIBeaconConfigService.h Mon Dec 08 17:47:58 2014 +0000 +++ b/services/URIBeaconConfigService.h Mon Dec 08 19:24:29 2014 +0000 @@ -178,7 +178,7 @@ } private: - /** + /* * Setup the advertisement payload and GAP settings. */ void configureGAP(void) { @@ -402,7 +402,11 @@ ble.updateCharacteristicValue(txPowerLevelsChar.getValueHandle(), reinterpret_cast<uint8_t *>(powerLevels), NUM_POWER_MODES * sizeof(int8_t)); } + /** + * The following is a private debug function. + */ private: + /** * For debugging only. Print Hex representation of ServiceDataPayload to terminal. */