Skip to content

Commit 4da4d3b

Browse files
author
AnotherButler
committed
Merge branch 'for-url-work' into development-merge
# Conflicts: # docs/api/usb/USBAudio.md # docs/contributing/guidelines/workflow.md
2 parents c17a38c + 88e88e4 commit 4da4d3b

File tree

287 files changed

+1545
-1552
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+1545
-1552
lines changed

docs.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"product_name": "Mbed OS 6",
3+
"split_pages_on": "h1",
34
"books": [{
45
"title": "Mbed OS API doxygen",
56
"description": "The full Mbed OS API documentation in doxygen format",
@@ -173,7 +174,7 @@
173174
]
174175
},
175176
{
176-
"title": "APIs",
177+
"title": "Full API references",
177178
"description": "The APIs of Mbed OS: RTOS, I/O, storage, networking, Cloud connection, security, power, memory and utilities",
178179
"slug": "apis",
179180
"type": "markdown",
@@ -664,13 +665,10 @@
664665
},
665666
{
666667
"title": "Bluetooth",
667-
"sub_chapters": [{
668-
"title": "Concepts",
669-
"intro": {
670-
"path": "docs/api/bluetooth/bluetooth.md"
671-
},
672-
"sources": []
673-
},
668+
"intro": {
669+
"path": "docs/api/bluetooth/bluetooth.md"
670+
},
671+
"sub_chapters": [
674672
{
675673
"title": "Options and config",
676674
"intro": {

docs/api/bluetooth/BatteryService.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
## BatteryService
1+
# BatteryService
22

33
It is often a requirement for devices operating on battery to report the battery charge level to the user.
44

55
The [Bluetooth Battery Service](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245138) defines how to expose a battery charge level through a BLE link. It allows a client - usually a smartphone application - of a device to read the current battery charge level and follow its evolution.
66

77
The BatteryService class implements the Bluetooth Battery Service as defined by the Bluetooth SIG. Makers of BLE devices operating on battery can use the API to expose interoperably the charge level of their products.
88

9-
### BatteryService class reference
9+
## BatteryService class reference
1010

1111
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/mbed-os/development/mbed-os-api-doxy/class_battery_service.html)
1212

13-
### BatteryService example
13+
## BatteryService example
1414

1515
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-example-ble/blob/master/BLE_BatteryLevel/source)](https://github.com/ARMmbed/mbed-os-example-ble/blob/mbed-os-5.14/BLE_BatteryLevel/source/main.cpp)
1616

17-
### Related content
17+
## Related content
1818

1919
- [Bluetooth Battery Service](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=245138) specification.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
## EnvironmentalService
1+
# EnvironmentalService
22

33
[Add description here.]
44

5-
### EnvironmentalService class reference
5+
## EnvironmentalService class reference
66

77
[![View code](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_environmental_service.html)
88

9-
### EnvironmentalService example
9+
## EnvironmentalService example
1010

1111
[Add example here.]

docs/api/bluetooth/Gap.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## GAP
1+
# GAP
22

33
<span class="notes">**Note:** Some functions, variables or types have been deprecated. Please see the class reference linked below for details.</span>
44

@@ -12,19 +12,19 @@ The other side of the process is the act of scanning, which listens for advertis
1212

1313
Advertising, scanning and connection all have parameters that let you find a compromise between desired power consumption levels, latency and efficiency of these processes.
1414

15-
### Advertising
15+
## Advertising
1616

1717
Advertising consists of broadcasting at a regular interval a small amount of data containing valuable information about the device. Peer devices listening on BLE advertising channels may scan these packets.
1818

1919
Scanners may also request additional information from device advertising by sending a scan request. If the broadcaster accepts scan requests, it can reply with a scan response packet containing additional information.
2020

21-
### Scanning
21+
## Scanning
2222

2323
Scanning consists of listening for peer advertising packets. From a scan, a device can identify devices available in its environment.
2424

2525
If the device scans actively, it sends scan request to scannable advertisers and collects their scan responses.
2626

27-
### Extended and periodic advertising
27+
## Extended and periodic advertising
2828

2929
BLE controllers supporting Bluetooth 5.0 may offer additional advertising and scanning options. Use `isFeatureSupported()` to check feature availability.
3030

@@ -36,13 +36,13 @@ There may be many advertising sets active at one time on a single advertiser. Th
3636

3737
Devices that do not support extended and periodic advertising will not see these advertisements. You may use legacy advertising alongside extended advertising, running at the same time, to support older devices in the environment.
3838

39-
### Privacy
39+
## Privacy
4040

4141
Privacy is a feature that allows a device to avoid being tracked by other (untrusted) devices. The device achieves it by periodically generating a new random address. The random address may be a resolvable random address, enabling trusted devices to recognize it as belonging to the same device. These trusted devices receive an Identity Resolution Key (IRK) during pairing. The SecurityManager handles this and relies on the other device accepting and storing the IRK.
4242

4343
You need to enable privacy by calling `enablePrivacy()` after initializing the SecurityManager because privacy requires SecurityManager to handle IRKs. Set the behavior of privacy enabled devices by using `setCentralPrivacyConfiguration()`, which specifies what the device should be with devices using random addresses, and `setPeripheralPrivacyConfiguration`. Random addresses that privacy enabled devices generate can be of two types: resolvable (by devices who have the IRK) and unresolvable. You can't use unresolvable addresses for connecting and connectable advertising; therefore, use a resolvable one for these, regardless of the privacy configuration.
4444

45-
### Modulation schemes
45+
## Modulation schemes
4646

4747
When supported by the host and controller, you can select different modulation schemes:
4848

@@ -56,7 +56,7 @@ You may set preferred PHYs (separately for RX and TX) using `setPreferredPhys()`
5656

5757
You may query the currently used PHY using `readPhy()`, which returns the result through a call to the registered event handler. You may register the handler with `setEventHandler()`. The events inform about the currently used PHY and of any changes to PHYs, which the controller or the peer may trigger autonomously.
5858

59-
### Data length (over-the-air MTU)
59+
## Data length (over-the-air MTU)
6060

6161
In addition to modulation schemes, Maximum Transmission Unit (MTU) size also strongly affects throughput. Newer controllers allow you to negotiate bigger MTUs. Because each packet contains overhead, bigger packets maximize throughput.
6262

@@ -66,11 +66,11 @@ The default value of data length supported by all controllers is 23 octets. If b
6666

6767
`ATT_MTU` and data length are independent of each other.
6868

69-
### GAP class reference
69+
## GAP class reference
7070

7171
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_gap.html)
7272

73-
### GAP example
73+
## GAP example
7474

7575
Here is an example demonstrating how to use the GAP API to advertise, scan, connect and disconnect and how parameters influence efficiency of these actions.
7676

docs/api/bluetooth/GattClient.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
## GattClient
1+
# GattClient
22

33
<span class="notes">**Note:** Some functions, variables or types have been deprecated. Please see the class reference linked below for details.</span>
44

55
You can use Generic Attribute Profile (GATT) to discover services, characteristics and descriptors and to perform operations on them. The interaction happens between two peers, one of which is the client (which initiates interactions) and the other is the server (which responds). You can use Attribute Protocol (ATT) to implement this interaction. `GattClient` defines procedures required for interacting with a remote `GattServer`.
66

7-
### Discovery procedures
7+
## Discovery procedures
88

99
A GattServer hosts a fixed set of services. These services are a logical composition of characteristics that may be discovered, read or written and can broadcast their state to a connected client. These characteristics may also contain metainformation and named characteristic descriptors. A characteristic descriptor may indicate the unit used for a characteristic value, describe the characteristic purpose in a textual form or allow a client to register for update notifications for the characteristic value.
1010

1111
Prior to any interaction with a server characteristic, a GattClient discovers the layout of the services and characteristics present on the server.
1212

1313
The layout of the descriptors of a characteristic may also be issued as an extra discovery step.
1414

15-
### Attribute manipulation
15+
## Attribute manipulation
1616

1717
As a result of the discovery process, the client can start interacting with the characteristic discovered. Depending on the characteristic properties (acquired during discovery), a client can read or write the value of a given characteristic.
1818

1919
Mbed BLE abstracts read and write operations to offer a single API that can be used to read or write characteristic values. The application code does not have to handle the necessary fragmentation or reassembly process if the attribute value to be transported can't fit in a single data packet.
2020

21-
### Attribute Protocol Maximum Transmission Unit (ATT_MTU)
21+
## Attribute Protocol Maximum Transmission Unit (ATT_MTU)
2222

2323
`ATT_MTU` is the maximum size of the attribute protocol packet. Operation on attributes too large to fit into a single packet are split across multiple operations.
2424

@@ -28,16 +28,16 @@ Only `GattClient` can trigger the exchange of `ATT_MTU` between client and serve
2828

2929
`ATT_MTU` is at least 23 octets by default. If a larger size is negotiated, the user application will be informed through the `onAttMtuChange` function called in the `GattClient::EventHandler`. (`GattServer::EventHandler` is also informed.)
3030

31-
### Server initiated events
31+
## Server initiated events
3232

3333
When a server updates a characteristic value, it can forward the new value to any registered clients. Clients may register for these updates on a per-characteristic basis. The server sends the updates by using notifications (no confirmation from client) or indications (client confirms receipt). This mechanism minimizes the number of transactions between a client and a server by avoiding polling.
3434

3535
Clients register for these updates by setting the Client Characteristic Configuration Descriptor (CCCD) value. This is an attribute, and the client needs to discover its descriptor. It is present in the characteristic if its notify or indicate properties are set.
3636

37-
### GattClient class reference
37+
## GattClient class reference
3838

3939
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_gatt_client.html)
4040

41-
### GattClient example
41+
## GattClient example
4242

4343
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-GattClient/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-GattClient/file/38639a71a0f1/source/main.cpp)

docs/api/bluetooth/GattServer.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
## GattServer
1+
# GattServer
22

33
<span class="notes">**Note:** Some functions, variables or types have been deprecated. Please see the class reference linked below for details.</span>
44

55
You can use Generic Attribute Profile (GATT) to discover services, characteristics and descriptors and to perform operations on them. The interaction happens between two peers, one of which is the client (which initiates interactions) and the other is the server (which responds). You can use Attribute Protocol (ATT) to implement this interaction.
66

77
`GattServer` is a collection of GattServices. These services contain characteristics that a `GattClient` on the peer connected to the device may read or write. These characteristics may also emit updates to subscribed clients when their values change.
88

9-
### Server layout
9+
## Server layout
1010

1111
Application code can add a GattService object to the server with the help of the function `addService()`. That function registers all the GattCharacteristics enclosed in the service, as well as all the characteristic descriptors (see GattAttribute) that these characteristics contain. Service registration assigns a unique handle to the various attributes that are part of the service. The user must use this handle to read or write these components.
1212

1313
There are no defined primitives that remove a single service; however, a call to the function `reset()` removes all services previously registered in the GattServer.
1414

15-
### Characteristic and attributes access
15+
## Characteristic and attributes access
1616

1717
You must access values of the characteristic and the characteristic descriptor present in the GattServer through the handle assigned to them when you registered the service. The GattServer class offers several types of `read()` and `write()` functions that retrieve or mutate an attribute value.
1818

1919
You can query the server by invoking the function `areUpdatesEnabled()` to find out if a client has subscribed to a given characteristic's value update.
2020

21-
### Attribute Protocol Maximum Transmission Unit (ATT_MTU)
21+
## Attribute Protocol Maximum Transmission Unit (ATT_MTU)
2222

2323
The Attribute Protocol Maximum Transmission Unit (`ATT_MTU`) is the maximum size of the attribute protocol packet. For details, please see the [GattClient Documentation](../apis/gattclient.html).
2424

25-
### Events
25+
## Events
2626

2727
You can register several event handlers with the GattServer that it will call to notify you of client (remote application connected to the server) and server activities:
2828

@@ -35,10 +35,10 @@ You can register several event handlers with the GattServer that it will call to
3535

3636
The term characteristic value update represents Characteristic Value Notification and Characteristic Value Indication when the nature of the server initiated is not relevant.
3737

38-
### GattServer class reference
38+
## GattServer class reference
3939

4040
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/development/mbed-os-api-doxy/class_gatt_server.html)
4141

42-
### GattServer example
42+
## GattServer example
4343

4444
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-GattServer/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-GattServer/file/622c672f6d5f/source/main.cpp)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## HeartRateService
1+
# HeartRateService
22

33
People practicing physical activities use heart rate monitors to track their pulse in real time and improve their physical performances.
44

@@ -8,15 +8,15 @@ The HeartRateService class implements the Bluetooth Heart Rate service as define
88

99
<span class="note"> **Note:** The Bluetooth Heart Rate Service is part of the [Bluetooth Heart Rate Profile](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239865), which defines behaviors that a Bluetooth heart rate sensor expects. You must ensure that your application conforms to the heart rate profile to guarantee interoperability of your heart rate sensors.</span>
1010

11-
### HeartRateService class reference
11+
## HeartRateService class reference
1212

1313
[![View code](https://www.mbed.com/embed/?type=library)](https://os.mbed.com/docs/mbed-os/development/mbed-os-api-doxy/class_heart_rate_service.html)
1414

15-
### HeartRateService example
15+
## HeartRateService example
1616

1717
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-example-ble/blob/master/BLE_HeartRate/source)](https://github.com/ARMmbed/mbed-os-example-ble/blob/mbed-os-5.14/BLE_HeartRate/source/main.cpp)
1818

19-
### Related content
19+
## Related content
2020

2121
- [Bluetooth Heart Rate Service](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239866) specification.
2222
- [Bluetooth Heart Rate Profile](https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239865) specification.

0 commit comments

Comments
 (0)