diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f7bdb36 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Ignore the generated Doxygen output +apidoc/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2c7af91..6ddc430 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ # Hello! We are an open source project of [ARM mbed](https://www.mbed.com). Contributions via [pull request](https://github.com/ARMmbed/ble/pulls), and [bug reports](https://github.com/ARMmbed/ble/issues) are welcome! -Please submit your pull request to the 'develop' branch of this module. Commits to develop will merge into master at the time of the next release. +Please submit your pull request to the `develop` branch of [this module](https://github.com/ARMmbed/ble/tree/develop). Commits to develop will be merge into the master branch at the time of the next release. # Contributor agreement For your pull request to be accepted, we will need you to agree to our [contributor agreement](https://developer.mbed.org/contributor_agreement/) to give us the necessary rights to use and distribute your contributions. (To click through the agreement create an account on mbed.com and log in.) diff --git a/DOXYGEN_FRONTPAGE.md b/DOXYGEN_FRONTPAGE.md index 6f286f8..0901fc4 100644 --- a/DOXYGEN_FRONTPAGE.md +++ b/DOXYGEN_FRONTPAGE.md @@ -1,16 +1,31 @@ -#BLE API +# BLE API {#mainpage} -The BLE module within mbed OS offers a high level abstraction for using +The BLE module within mbed OS offers a high abstraction level for using Bluetooth Low Energy on multiple platforms. -This documentation describes the internal structure of mbed -(BLE_API)[https://github.com/armmbed/ble]. It was automatically generated from -specially formatted comment blocks in BLE_API's source code using Doxygen. -(See http://www.stack.nl/~dimitri/doxygen/ for more information on Doxygen). +This documentation describes the internal structure of the mbed +[BLE API](https://github.com/armmbed/ble). It was automatically generated from +specially formatted comment blocks in BLE API's source code using Doxygen (see http://www.stack.nl/~dimitri/doxygen/ for more information on Doxygen). -For getting started with BLE on mbed, check our (introduction -page)[https://docs.mbed.com/docs/ble-intros/en/latest/]. +For getting started with BLE on mbed, check our [introduction +page](https://docs.mbed.com/docs/ble-intros/en/latest/). -For mbed OS examples using BLE, check (this -repository)[https://github.com/armmbed/ble-examples]. For mbed-classic -examples, refer to (code under mbed.org)[https://developer.mbed.org/teams/Bluetooth-Low-Energy/code/]. +For mbed OS examples using BLE, check [this +repository](https://github.com/armmbed/ble-examples). For mbed-classic +examples, please refer to [code under mbed.org](https://developer.mbed.org/teams/Bluetooth-Low-Energy/code/). + +## Supported Services + +Currently supported reference services include: + +* [Battery](@ref BatteryService) +* [Device Firmware Update (DFU)](@ref DFUService) +* [Device Information](@ref DeviceInformationService) +* [Health Thermometer](@ref HealthThermometerService) +* [Heart Rate](@ref HeartRateService) +* [UART](@ref UARTService) +* [UriBeacon](@ref URIBeaconConfigService) +* [iBeacon](@ref iBeacon) + +The [documentation](https://docs.mbed.com/docs/ble-intros/en/latest/AdvSamples/Overview/) +contains an overview on how to create new, application-specific services. diff --git a/README.md b/README.md index a91f8ef..de62bee 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is the Github repo for the `BLE_API` used by developer.mbed.org. Please see the [mbed BLE Homepage](https://developer.mbed.org/teams/Bluetooth-Low-Energy/) for all documentation, code examples and general help. # Supported Services -Supported GATT services and constantly being added and can be found in the (`ble/ble/services/`)[https://github.com/ARMmbed/ble/tree/master/ble/services] folder. +Supported GATT services and constantly being added and can be found in the [ble/services/](https://github.com/ARMmbed/ble/tree/master/ble/services) folder. Currently supported services include: * Battery diff --git a/ble.doxyfile b/ble.doxyfile index f16c4ad..5df12b1 100644 --- a/ble.doxyfile +++ b/ble.doxyfile @@ -664,7 +664,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = . +INPUT = # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -682,7 +682,7 @@ INPUT_ENCODING = UTF-8 # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl -FILE_PATTERNS = *.h *.cpp +FILE_PATTERNS = *.h *.cpp *.md # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. @@ -789,7 +789,7 @@ FILTER_SOURCE_PATTERNS = # (index.html). This can be useful if you have a project on for instance GitHub # and want reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = +USE_MDFILE_AS_MAINPAGE = DOXYGEN_FRONTPAGE.md #--------------------------------------------------------------------------- # configuration options related to source browsing diff --git a/ble/blecommon.h b/ble/blecommon.h index 271b4b5..ed71fff 100644 --- a/ble/blecommon.h +++ b/ble/blecommon.h @@ -22,9 +22,7 @@ extern "C" { #endif -/** @defgroup BLE_UUID_VALUES assigned values for BLE UUIDs. - * @{ */ -/* Generic UUIDs, applicable to all services. */ +/*! @brief Assigned values for BLE UUIDs. */ enum { BLE_UUID_UNKNOWN = 0x0000, /**< Reserved UUID. */ BLE_UUID_SERVICE_PRIMARY = 0x2800, /**< Primary Service. */ @@ -50,11 +48,10 @@ enum { BLE_UUID_GAP_CHARACTERISTIC_RECONN_ADDR = 0x2A03, /**< Reconnection Address Characteristic. */ BLE_UUID_GAP_CHARACTERISTIC_PPCP = 0x2A04, /**< Peripheral Preferred Connection Parameters Characteristic. */ }; -/** @} */ -/** @defgroup BLE_APPEARANCES Bluetooth appearance values. +/*! Bluetooth appearance values. * @note Retrieved from http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.gap.appearance.xml - * @{ */ + */ enum { BLE_APPEARANCE_UNKNOWN = 0, /**< Unknown. */ BLE_APPEARANCE_GENERIC_PHONE = 64, /**< Generic Phone. */ @@ -106,13 +103,9 @@ enum { BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD = 5187, /**< Location Pod (Outdoor Sports Activity subtype). */ BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD = 5188, /**< Location and Navigation Pod (Outdoor Sports Activity subtype). */ }; -/** @} */ -/**************************************************************************/ -/*! - \brief Error codes for the BLE API -*/ -/**************************************************************************/ + +/*! @brief Error codes for the BLE API. */ enum ble_error_t { BLE_ERROR_NONE = 0, /**< No error. */ BLE_ERROR_BUFFER_OVERFLOW = 1, /**< The requested action would cause a buffer overflow and has been aborted. */