Skip to content

Fix BLE API docs #4992

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion features/FEATURE_BLE/ble/BLE.h
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ class BLE
* @param connectionParams
* Connection parameters.
* @param scanParams
* Paramters to use while scanning for the peer.
* Parameters to use while scanning for the peer.
* @return BLE_ERROR_NONE if connection establishment procedure is started
* successfully. The onConnection callback (if set) is invoked upon
* a connection event.
Expand Down
4 changes: 2 additions & 2 deletions features/FEATURE_BLE/ble/BLEProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* A common namespace for types and constants used everywhere in BLE API.
*/
namespace BLEProtocol {
/**<
/**
* A simple container for the enumeration of address-types for Protocol addresses.
*
* Adding a struct to encapsulate the contained enumeration prevents
Expand All @@ -37,7 +37,7 @@ namespace BLEProtocol {
* would allow the use of AliasedType::PUBLIC in code.
*/
struct AddressType {
/**< Address-types for Protocol addresses. */
/** Address-types for Protocol addresses. */
enum Type {
PUBLIC = 0,
RANDOM_STATIC,
Expand Down
8 changes: 4 additions & 4 deletions features/FEATURE_BLE/ble/Gap.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Gap {
*
* @deprecated Use BLEProtocol::AddressType_t instead. The following
* constants have been left in their deprecated state to
* transparenly support existing applications which may have
* transparently support existing applications which may have
* used Gap::ADDR_TYPE_*.
*/
enum DeprecatedAddressType_t {
Expand Down Expand Up @@ -320,7 +320,7 @@ class Gap {

/**
* Type for the registered callbacks added to the disconnection event
* callchain. Refer to Gap::onDisconnetion().
* callchain. Refer to Gap::onDisconnection().
*/
typedef FunctionPointerWithContext<const DisconnectionCallbackParams_t*> DisconnectionEventCallback_t;
/**
Expand Down Expand Up @@ -447,7 +447,7 @@ class Gap {
* @param[in] connectionParams
* Connection parameters.
* @param[in] scanParams
* Paramters to be used while scanning for the peer.
* Parameters to be used while scanning for the peer.
*
* @return BLE_ERROR_NONE if connection establishment procedure is started
* successfully. The connectionCallChain (if set) will be invoked upon
Expand Down Expand Up @@ -516,7 +516,7 @@ class Gap {
*
* @deprecated This version of disconnect() doesn't take a connection handle. It
* works reliably only for stacks that are limited to a single
* connection. Use instead Gap::disconnect(Handle_t connectionHandle,
* connection. Use Gap::disconnect(Handle_t connectionHandle,
* DisconnectionReason_t reason) instead.
*/
virtual ble_error_t disconnect(DisconnectionReason_t reason) {
Expand Down
2 changes: 1 addition & 1 deletion features/FEATURE_BLE/ble/GapAdvertisingParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class GapAdvertisingParams {
}

/**
* Get The advertising timeout.
* Get the advertising timeout.
*
* @return The advertising timeout (in seconds).
*/
Expand Down
10 changes: 5 additions & 5 deletions features/FEATURE_BLE/ble/GattCallbackParamTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct GattWriteCallbackParams {
OP_EXEC_WRITE_REQ_NOW = 0x06, /**< Execute write request: immediately execute all prepared writes. */
};

Gap::Handle_t connHandle; /**< The handle of the connection that triggered the event */
Gap::Handle_t connHandle; /**< The handle of the connection that triggered the event. */
GattAttribute::Handle_t handle; /**< Attribute Handle to which the write operation applies. */
WriteOp_t writeOp; /**< Type of write operation. */
uint16_t offset; /**< Offset for the write operation. */
Expand All @@ -46,7 +46,7 @@ struct GattWriteCallbackParams {
};

struct GattReadCallbackParams {
Gap::Handle_t connHandle; /**< The handle of the connection that triggered the event */
Gap::Handle_t connHandle; /**< The handle of the connection that triggered the event. */
GattAttribute::Handle_t handle; /**< Attribute Handle to which the read operation applies. */
uint16_t offset; /**< Offset for the read operation. */
uint16_t len; /**< Length (in bytes) of the data to read. */
Expand Down Expand Up @@ -75,7 +75,7 @@ enum GattAuthCallbackReply_t {
};

struct GattWriteAuthCallbackParams {
Gap::Handle_t connHandle; /**< The handle of the connection that triggered the event */
Gap::Handle_t connHandle; /**< The handle of the connection that triggered the event. */
GattAttribute::Handle_t handle; /**< Attribute Handle to which the write operation applies. */
uint16_t offset; /**< Offset for the write operation. */
uint16_t len; /**< Length of the incoming data. */
Expand All @@ -88,7 +88,7 @@ struct GattWriteAuthCallbackParams {
};

struct GattReadAuthCallbackParams {
Gap::Handle_t connHandle; /**< The handle of the connection that triggered the event */
Gap::Handle_t connHandle; /**< The handle of the connection that triggered the event. */
GattAttribute::Handle_t handle; /**< Attribute Handle to which the read operation applies. */
uint16_t offset; /**< Offset for the read operation. */
uint16_t len; /**< Optional: new length of the outgoing data. */
Expand All @@ -105,7 +105,7 @@ struct GattReadAuthCallbackParams {
* generated at the remote server.
*/
struct GattHVXCallbackParams {
Gap::Handle_t connHandle; /**< The handle of the connection that triggered the event */
Gap::Handle_t connHandle; /**< The handle of the connection that triggered the event. */
GattAttribute::Handle_t handle; /**< Attribute Handle to which the HVx operation applies. */
HVXType_t type; /**< Indication or Notification, see HVXType_t. */
uint16_t len; /**< Attribute data length. */
Expand Down
29 changes: 15 additions & 14 deletions features/FEATURE_BLE/ble/GattCharacteristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ class GattCharacteristic {
/**
* Set up callback that will be triggered before the GATT Client is allowed
* to read this characteristic. The handler will determine the
* authorizaion reply for the read.
* authorization reply for the read.
*
* @param[in] callback
* Event handler being registered.
Expand Down Expand Up @@ -457,7 +457,8 @@ class GattCharacteristic {
* is granted.
*
* @note To authorize or deny the read the params->authorizationReply field
* should be set to true (authorize) or false (deny).
* should be set to AUTH_CALLBACK_REPLY_SUCCESS (authorize) or any
* of the AUTH_CALLBACK_REPLY_ATTERR_* values (deny).
*
* @note If the read is approved and params->data is unchanged (NULL),
* the current characteristic value will be used.
Expand Down Expand Up @@ -507,7 +508,7 @@ class GattCharacteristic {
}

/**
* Get the characteristic's propertied. Refer to
* Get the characteristic's properties. Refer to
* GattCharacteristic::Properties_t.
*
* @return The characteristic's properties.
Expand Down Expand Up @@ -548,7 +549,7 @@ class GattCharacteristic {
/**
* Check whether write authorization is enabled i.e. check whether a
* write authorization callback was previously registered. Refer to
* GattCharacteristic::setReadAuthorizationCallback().
* GattCharacteristic::setWriteAuthorizationCallback().
*
* @return true if write authorization is enabled, false otherwise.
*/
Expand Down Expand Up @@ -590,7 +591,7 @@ class GattCharacteristic {
/**
* The characteristic's descriptor attributes.
* This contains only CCCDs that has neither the notify nor the indicate
* flag set, as thoses are handled by the underlying BLE stack.
* flag set, as those are handled by the underlying BLE stack.
*/
GattAttribute **_descriptors;
/**
Expand Down Expand Up @@ -635,9 +636,9 @@ class ReadOnlyGattCharacteristic : public GattCharacteristic {
* @param[in] uuid
* The characteristic's UUID.
* @param[in] valuePtr
* Pointer to the characterisitic's initial value.
* Pointer to the characteristic's initial value.
* @param[in] additionalProperties
* Additional characterisitic properties. By default, the
* Additional characteristic properties. By default, the
* properties are set to
* Properties_t::BLE_GATT_CHAR_PROPERTIES_READ.
* @param[in] descriptors
Expand Down Expand Up @@ -673,9 +674,9 @@ class WriteOnlyGattCharacteristic : public GattCharacteristic {
* @param[in] uuid
* The characteristic's UUID.
* @param[in] valuePtr
* Pointer to the characterisitic's initial value.
* Pointer to the characteristic's initial value.
* @param[in] additionalProperties
* Additional characterisitic properties. By default, the
* Additional characteristic properties. By default, the
* properties are set to
* Properties_t::BLE_GATT_CHAR_PROPERTIES_WRITE.
* @param[in] descriptors
Expand Down Expand Up @@ -711,9 +712,9 @@ class ReadWriteGattCharacteristic : public GattCharacteristic {
* @param[in] uuid
* The characteristic's UUID.
* @param[in] valuePtr
* Pointer to the characterisitic's initial value.
* Pointer to the characteristic's initial value.
* @param[in] additionalProperties
* Additional characterisitic properties. By default, the
* Additional characteristic properties. By default, the
* properties are set to
* Properties_t::BLE_GATT_CHAR_PROPERTIES_WRITE |
* Properties_t::BLE_GATT_CHAR_PROPERTIES_READ.
Expand Down Expand Up @@ -754,7 +755,7 @@ class WriteOnlyArrayGattCharacteristic : public GattCharacteristic {
* Pointer to an array of length NUM_ELEMENTS containing the
* characteristic's intitial value.
* @param[in] additionalProperties
* Additional characterisitic properties. By default, the
* Additional characteristic properties. By default, the
* properties are set to
* Properties_t::BLE_GATT_CHAR_PROPERTIES_WRITE.
* @param[in] descriptors
Expand Down Expand Up @@ -794,7 +795,7 @@ class ReadOnlyArrayGattCharacteristic : public GattCharacteristic {
* Pointer to an array of length NUM_ELEMENTS containing the
* characteristic's intitial value.
* @param[in] additionalProperties
* Additional characterisitic properties. By default, the
* Additional characteristic properties. By default, the
* properties are set to
* Properties_t::BLE_GATT_CHAR_PROPERTIES_READ.
* @param[in] descriptors
Expand Down Expand Up @@ -834,7 +835,7 @@ class ReadWriteArrayGattCharacteristic : public GattCharacteristic {
* Pointer to an array of length NUM_ELEMENTS containing the
* characteristic's intitial value.
* @param[in] additionalProperties
* Additional characterisitic properties. By default, the
* Additional characteristic properties. By default, the
* properties are set to
* Properties_t::BLE_GATT_CHAR_PROPERTIES_WRITE |
* Properties_t::BLE_GATT_CHAR_PROPERTIES_READ.
Expand Down
2 changes: 1 addition & 1 deletion features/FEATURE_BLE/ble/GattService.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class GattService {
* @param[in] index
* The index of the characteristic.
*
* @return A pointer to the characterisitic at index @p index.
* @return A pointer to the characteristic at index @p index.
*/
GattCharacteristic *getCharacteristic(uint8_t index) {
if (index >= _characteristicCount) {
Expand Down
18 changes: 9 additions & 9 deletions features/FEATURE_BLE/ble/services/DFUService.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class DFUService {
* chance to clean up.
*
* @param[in] params
* Information about the characterisitc being updated.
* Information about the characteristic being updated.
*/
virtual void onDataWritten(const GattWriteCallbackParams *params) {
if (params->handle == controlPoint.getValueHandle()) {
Expand Down Expand Up @@ -124,16 +124,16 @@ class DFUService {
protected:
BLE &ble;

/**< Writing to the control characteristic triggers the handover to DFU
* bootloader. At present, writing anything will do the trick - this needs
* to be improved. */
/** Writing to the control characteristic triggers the handover to DFU
* bootloader. At present, writing anything will do the trick - this needs
* to be improved. */
WriteOnlyArrayGattCharacteristic<uint8_t, SIZEOF_CONTROL_BYTES> controlPoint;

/**< The packet characteristic in this service doesn't do anything meaningful;
* it is only a placeholder to mimic the corresponding characteristic in the
* actual DFU service implemented by the bootloader. Without this, some
* FOTA clients might get confused, because service definitions change after
* handing control over to the bootloader. */
/** The packet characteristic in this service doesn't do anything meaningful;
* it is only a placeholder to mimic the corresponding characteristic in the
* actual DFU service implemented by the bootloader. Without this, some
* FOTA clients might get confused, because service definitions change after
* handing control over to the bootloader. */
GattCharacteristic packet;

uint8_t controlBytes[SIZEOF_CONTROL_BYTES];
Expand Down
2 changes: 1 addition & 1 deletion features/FEATURE_BLE/ble/services/HeartRateService.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class HeartRateService {
* controlPoint characteristic.
*
* @param[in] params
* Information about the characterisitc being updated.
* Information about the characteristic being updated.
*/
virtual void onDataWritten(const GattWriteCallbackParams *params) {
if (params->handle == controlPoint.getValueAttribute().getHandle()) {
Expand Down
2 changes: 1 addition & 1 deletion features/FEATURE_BLE/ble/services/LinkLossService.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class LinkLossService {
* This callback allows receiving updates to the AlertLevel characteristic.
*
* @param[in] params
* Information about the characterisitc being updated.
* Information about the characteristic being updated.
*/
virtual void onDataWritten(const GattWriteCallbackParams *params) {
if (params->handle == alertLevelChar.getValueHandle()) {
Expand Down
2 changes: 1 addition & 1 deletion features/FEATURE_BLE/ble/services/UARTService.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extern const uint8_t UARTServiceRXCharacteristicUUID[UUID::LENGTH_OF_LONG_UUID]
*/
class UARTService {
public:
/**< Maximum length of data (in bytes) that the UART service module can transmit to the peer. */
/** Maximum length of data (in bytes) that the UART service module can transmit to the peer. */
static const unsigned BLE_UART_SERVICE_MAX_DATA_LEN = (BLE_GATT_MTU_SIZE_DEFAULT - 3);

public:
Expand Down