Skip to content

Commit cca2f67

Browse files
committed
Merge branch 'development' into unittests
2 parents 8b50be1 + fc0d845 commit cca2f67

Some content is hidden

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

59 files changed

+2221
-656
lines changed

.circleci/config.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
3+
jobs:
4+
build:
5+
docker:
6+
- image: mbed/doc_builder:latest
7+
auth:
8+
username: $DOCKER_USER
9+
password: $DOCKER_PASS
10+
11+
steps:
12+
- checkout
13+
14+
- run:
15+
name: Validate and build documentation
16+
command: |
17+
docbuilder build os-docs /tmp/artifacts --path ~/project/docs.json --github_token "$GITHUB_TOKEN"
18+
- run:
19+
name: Move images
20+
command: |
21+
cp -R ~/project/docs/images /tmp/artifacts/
22+
- store_artifacts:
23+
path: /tmp/artifacts
24+
destination: docs

docs.json

Lines changed: 527 additions & 454 deletions
Large diffs are not rendered by default.

docs/images/boot_sequence.png

80.3 KB
Loading

docs/images/fastmodel_cm3.png

14.6 KB
Loading

docs/images/quadspi.png

22.7 KB
Loading

docs/introduction/examples.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,6 @@ A few micro:bit How To videos:
3939
- [Hashing](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-tls-hashing/): performs hashing of a buffer with SHA-256 using various APIs. It serves as a tutorial for the basic hashing APIs of Mbed TLS.
4040
- [TLS client](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-tls-tls-client/): downloads a file from an HTTPS server (os.mbed.com) and looks for a specific string in that file.
4141

42-
##### Arm Mbed uVisor
43-
44-
- [Threaded Blinky with uVisor](https://github.com/ARMmbed/mbed-os-example-uvisor-thread): an example threaded application with uVisor security.
45-
- [IRQ Blinky uVisor](https://github.com/ARMmbed/mbed-os-example-uvisor): an example threaded application with uVisor security and IRQ support.
46-
- [Threaded REPC with uVisor](https://github.com/ARMmbed/mbed-os-example-uvisor-number-store): using uVisor APIs to build a box that stores a number.
47-
48-
These examples work on the K64F and the GNU Arm Embedded toolchain only.
49-
5042
#### Core features
5143

5244
##### File system

docs/reference/api/api.md

Lines changed: 138 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
## API overview
1+
## Full API list
22

33

4-
### Platform
4+
### Platform APIs
55

66
[Modules that provide consistent user experience.](platform.html)
77

@@ -11,30 +11,32 @@
1111
<td><a href="wait.html">Wait</a></td>
1212
<td><a href="criticalsectionlock.html">CriticalSectionLock</a></td>
1313
<td><a href="memory-tracing.html">Memory tracing</a></td>
14-
<td><a href="platformmutex.html">PlatformMutex</a></td>
14+
<td><a href="shared-pointer.html">Shared pointer</a></td>
15+
<td><a href="atcmdparser.html">ATCmdParser</a></td>
1516
</tr>
1617
<tr>
17-
<td><a href="callback.html">CallBack</a></td>
18+
<td><a href="callback.html">Callback</a></td>
1819
<td><a href="time.html">Time</a></td>
1920
<td><a href="error-handling.html">Error handling</a></td>
20-
<td><a href="circularbuffer.html">CircularBuffer</a></td>
21+
<td><a href="span.html">Span</a></td>
22+
<td><a href="mbed-statistics.html">Mbed statistics</a></td>
2123
</tr>
2224
<tr>
2325
<td><a href="deepsleeplock.html">DeepSleepLock</a></td>
2426
<td><a href="rtc.html">RTC</a></td>
2527
<td><a href="assert.html">Assert</a></td>
26-
<td><a href="atcmdparser.html">ATCmdParser</a></td>
28+
<td><a href="platformmutex.html">PlatformMutex</a></td>
2729
</tr>
2830
<tr>
2931
<td><a href="power-management.html">Power management</a></td>
3032
<td><a href="debug.html">Debug</a></td>
3133
<td><a href="noncopyable.html">NonCopyable</a></td>
32-
<td><a href="mbed-statistics.html">Mbed statistics</a></td>
34+
<td><a href="circularbuffer.html">CircularBuffer</a></td>
3335
</tr>
3436
</tbody>
3537
</table>
3638

37-
### Drivers
39+
### Drivers APIs
3840

3941
[Analog and digital input and outputs and digital interfaces.](drivers.html)
4042

@@ -44,30 +46,31 @@
4446
<td><a href="analogin.html">AnalogIn</a></td>
4547
<td><a href="portin.html">PortIn</a></td>
4648
<td><a href="lowpowertimeout.html">LowPowerTimeout</a></td>
47-
<td><a href="i2cslave.html">I2CSlave</a></td>
49+
<td><a href="i2c.html">I2C</a></td>
4850
</tr>
4951
<tr>
5052
<td><a href="analogout.html">AnalogOut</a></td>
5153
<td><a href="portout.html">PortOut</a></td>
5254
<td><a href="lowpowertimer.html">LowPowerTimer</a></td>
53-
<td><a href="debug.html">CAN</a></td>
55+
<td><a href="i2cslave.html">I2CSlave</a></td>
5456
</tr>
5557
<tr>
5658
<td><a href="digitalin.html">DigitalIn</a></td>
5759
<td><a href="portinout.html">PortInOut</a></td>
5860
<td><a href="flash-iap.html">Flash IAP</a></td>
59-
<td><a href="mbedcrc.html">MbedCRC</a></td>
61+
<td><a href="debug.html">CAN</a></td>
6062
</tr>
6163
<tr>
6264
<td><a href="digitalout.html">DigitalOut</a></td>
6365
<td><a href="pwmout.html">PwmOut</a></td>
6466
<td><a href="rawserial.html">RawSerial</a></td>
65-
<td><a href="devicekey.html">DeviceKey</a></td>
67+
<td><a href="mbedcrc.html">MbedCRC</a></td>
6668
</tr>
6769
<tr>
6870
<td><a href="digitalinout.html">DigitalInOut</a></td>
6971
<td><a href="interruptin.html">InterruptIn</a></td>
7072
<td><a href="serial.html">Serial</a></td>
73+
<td><a href="devicekey.html">DeviceKey</a></td>
7174
</tr>
7275
<tr>
7376
<td><a href="busin.html">BusIn</a></td>
@@ -82,12 +85,12 @@
8285
<tr>
8386
<td><a href="businout.html">BusInOut</a></td>
8487
<td><a href="lowpowerticker.html">LowPowerTicker</a></td>
85-
<td><a href="i2c.html">I2C</a></td>
88+
<td><a href="quadspi-qspi.html">QuadSPI (QSPI)</a></td>
8689
</tr>
8790
</tbody>
8891
</table>
8992

90-
### RTOS
93+
### RTOS APIs
9194

9295
[Handling tasks and events in Mbed OS.](rtos.html)
9396

@@ -113,3 +116,124 @@
113116
</tr>
114117
</tbody>
115118
</table>
119+
120+
### Network socket APIs
121+
122+
[Network socket API for TCP/IP.](network-socket.html)
123+
124+
<table>
125+
<tbody>
126+
<tr>
127+
<td><a href="socket.html">Socket</a></td>
128+
<td><a href="socketaddress.html">SocketAddress</a></td>
129+
</tr>
130+
<tr>
131+
<td><a href="udpsocket.html">UDPSocket</a></td>
132+
<td><a href="dns-resolver.html">DNS Resolver</a></td>
133+
<tr>
134+
<td><a href="tcpsocket.html">TCPSocket</a></td>
135+
</tr>
136+
</tbody>
137+
</table>
138+
139+
### Network interfaces APIs
140+
141+
[Network interfaces, Ethernet, Wifi, Cellular & Mesh](network-interfaces.html)
142+
143+
<table>
144+
<tbody>
145+
<tr>
146+
<td><a href="ethernet.html">Ethernet</a></td>
147+
<td><a href="mesh-api.html">6LoWPAN Mesh</a></td>
148+
</tr>
149+
<tr>
150+
<td><a href="wi-fi.html">Wi-Fi</a></td>
151+
<td><a href="network-status.html">Network status</a></td>
152+
<tr>
153+
<td><a href="cellular-api.html">Cellular</a></td>
154+
</tr>
155+
</tbody>
156+
</table>
157+
158+
### Bluetooth Low Energy (BLE) APIs
159+
160+
[Bluetooth Low Energy](bluetooth.html)
161+
162+
<table>
163+
<tbody>
164+
<tr>
165+
<td><a href="ble.html">BLE</a></td>
166+
<td><a href="gattserver.html">GattServer</a></td>
167+
<td><a href="heartrateservice.html">HeartRateService</a></td>
168+
</tr>
169+
<tr>
170+
<td><a href="gap.html">GAP</a></td>
171+
<td><a href="secuirtymanager.html">SecurityManager</a></td>
172+
<td><a href="ibeacon.html">iBeacon</a></td>
173+
<tr>
174+
<td><a href="gattclient.html">GattClient</a></td>
175+
<td><a href="batteryservice.html">BatteryService</a></td>
176+
</tr>
177+
</tbody>
178+
</table>
179+
180+
### LoRaWAN APIs
181+
182+
[Low power wide area network.](lorawan.html)
183+
184+
<table>
185+
<tbody>
186+
<tr>
187+
<td><a href="lorawan-api.html">LoRaWANInterface</a></td>
188+
</tr>
189+
<tr>
190+
<td><a href="loraradio-api.html">LoRaRadio</a></td>
191+
</tr>
192+
</tbody>
193+
</table>
194+
195+
### Security APIs
196+
197+
[Working with Arm Mbed uVisor and Arm Mbed TLS in the context of Mbed OS.](security.html)
198+
199+
<table>
200+
<tbody>
201+
<tr>
202+
<td><a href="tls.html">TLS</a></td>
203+
</tr>
204+
<tr>
205+
<td><a href="uvisor.html">uVisor</a></td>
206+
</tr>
207+
</tbody>
208+
</table>
209+
210+
### Storage APIs
211+
212+
[Working with the file system.](storage.html)
213+
214+
<table>
215+
<tbody>
216+
<tr>
217+
<td><a href="filesystem.html">FileSystem</a></td>
218+
<td><a href="fatfilesystem.html">FATFileSystem</a></td>
219+
<td><a href="chainingblockdevice.html">ChainingBlockDevice</a></td>
220+
<td><a href="flashsimblockdevice.html">FlashSimBlockDevice</a></td>
221+
</tr>
222+
<tr>
223+
<td><a href="dir.html">Dir</a></td>
224+
<td><a href="blockdevice.html">BlockDevice</a></td>
225+
<td><a href="slicingblockdevice.html">SlicingBlockDevice</a></td>
226+
<td><a href="nvstore.html">NVStore</a></td>
227+
</tr>
228+
<tr>
229+
<td><a href="file.html">File</a></td>
230+
<td><a href="heapblockdevice.html">HeapBlockDevice</a></td>
231+
<td><a href="profilingblockdevice.html">ProfilingBlockDevice</a></td>
232+
</tr>
233+
<tr>
234+
<td><a href="littlefilesystem.html">LittleFileSystem</a></td>
235+
<td><a href="mbrblockdevice.html">MBRBlockDevice</a></td>
236+
<td><a href="bufferedblockdevice.html">BufferedBlockDevice</a></td>
237+
</tr>
238+
</tbody>
239+
</table>

docs/reference/api/connectivity/bluetooth/Gap.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ Privacy is a feature that allows a device to avoid being tracked by other (untru
2626

2727
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.
2828

29-
#### Modulation Schemes
29+
#### Modulation schemes
3030

3131
When supported by the host and controller, you can select different modulation schemes:
3232

33-
- LE 1M PHY.
34-
- LE 2M PHY.
35-
- LE coded PHY.
33+
- LE 1M PHY.
34+
- LE 2M PHY.
35+
- LE coded PHY.
3636

3737
These provide different compromises between bandwidth, power usage and error resiliency (see BLUETOOTH SPECIFICATION Version 5.0 Vol 1, Part A - 1.2).
38-
39-
You may set preferred PHYs (separately for RX and TX) using `setPreferredPhys()`. You may also set the currently used PHYs on a selected connection using `setPhy()`. Both of these settings are only advisory, and the controller is allowed to make its own decision on the best PHY to use based on your request, the peer's supported features and the connection's physical conditions.
40-
38+
39+
You may set preferred PHYs (separately for RX and TX) using `setPreferredPhys()`. You may also set the currently used PHYs on a selected connection using `setPhy()`. Both of these settings are only advisory. The controller is allowed to make its own decision on the best PHY to use based on your request, the peer's supported features and the connection's physical conditions.
40+
4141
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.
42-
42+
4343
### GAP class reference
4444

4545
[![View code](https://www.mbed.com/embed/?type=library)](http://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/class_gap.html)

docs/reference/api/connectivity/networksocket/networkinterface.md

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,85 @@ A socket requires a NetworkInterface instance when opened to indicate which Netw
44

55
Network interface is also the controlling API for application to specify network configuration.
66

7-
Existing network interfaces:
7+
### Existing network interfaces:
88

99
- [Ethernet](ethernet.html): API for connecting to the internet over an Ethernet connection.
1010
- [Wi-Fi](wi-fi.html): API for connecting to the internet with a Wi-Fi device.
1111
- [Cellular](cellular-api.html): API for connecting to the internet using a cellular device.
1212
- [Mesh networking interface](mesh-api.html): Mbed OS provides two kinds of IPv6-based mesh networks - 6LoWPAN_ND and Thread.
1313

14-
Optional functionality:
14+
### Network status updates
15+
16+
An application may choose to register a callback to monitoring status changes from network interfaces. The application can do this by using the following API:
1517

1618
- [Network status](network-status.html): API for monitoring network status changes.
19+
20+
### Default network interface
21+
22+
In Mbed OS, targets that provide network connectivity also provide a default network interface. This can be Ethernet, Wi-Fi, mesh or cellular. Using a default interface allows you to port applications to different targets and connectivity options.
23+
24+
The following example uses a default interface to connect to the network:
25+
26+
```
27+
NetworkInterface *net = NetworkInterface::get_default_instance();
28+
29+
if (!net) {
30+
printf("Error! No network inteface found.\n");
31+
return 0;
32+
}
33+
34+
net->connect();
35+
```
36+
37+
This example works on all IP-based connectivity options that Mbed OS supports. The Mbed OS configuration system provides configuration for the default interface at build time, so at run time, you can just call `connect()` without any parameters.
38+
39+
For example, when providing Wi-Fi SSID and password, you may use the following `mbed_app.json`:
40+
41+
```
42+
{
43+
"target_overrides": {
44+
"*": {
45+
"nsapi.default-wifi-security": "WPA_WPA2",
46+
"nsapi.default-wifi-ssid": "\"ssid\"",
47+
"nsapi.default-wifi-password": "\"password\""
48+
}
49+
}
50+
}
51+
```
52+
53+
Please see [Selecting the default network interface](configuration-connectivity.html#selecting-the-default-network-interface) for information about how to supply required configuration parameters on different connections.
54+
55+
Targets with connectivity set the `target.network-default-interface-type` configuration variable appropriately, either to their only interface or the one most commonly used. For targets that provide more than one type of connectivity, you may choose the default by overriding the `target.network-default-interface-type` configuration variable.
56+
57+
Applications may also ask for a specific type of connection, as the following table shows:
58+
59+
|Method|What connectivity is returned| Requirements |
60+
|------|-----------------------------|--------------|
61+
|`*WiFiInterface::get_default_instance()`| Wi-Fi interface | Requires security parameters (mode, SSID, password) |
62+
|`*EthInterface::get_default_instance()` | Wired Ethernet interface, not Wi-Fi | none |
63+
|`*MeshInterface::get_default_instance()` | Returns either `LoWPANNDInterface` or `ThreadInterface`, depending on which is set to default | Target provides a driver or macro `DEVICE_802_15_4_PHY` is enabled |
64+
| `*CellularBase::get_default_instance()` | Return cellular connectivity | Requires network parameters (pin, APN, username, password) |
65+
| `*NetworkInterface::get_default_instance()` | One of the above, depending on `target.network-default-interface-type` | |
66+
67+
Note that the calls for a specific interface type do not preconfigure credentials such as SSID because an interface-type-specific application is expected to configure these in code. `NULL` is returned if no interface of that type is available.
68+
69+
Calls for a NetworkInterface will request one of the interface types depending on `target.default-network-interface-type`, and preconfigure the credentials. If credentials can't be preconfigured (for example because `nsapi.default-wifi-ssid` isn't set), the call returns `NULL` rather than an unconfigured interface.
70+
71+
An application may check the type of the interface returned by `NetworkInterface::get_default_instance()` by using the "dynamic downcast" methods:
72+
73+
```
74+
// net set from NetworkInterface::get_default_instance() as above
75+
WiFiInterface *wifi = net->wifiInterface();
76+
if (wifi) {
77+
printf("This is a Wi-Fi board.")
78+
// call WiFi-specific methods
79+
}
80+
```
81+
82+
### Related content
83+
84+
- [Configuring the default network interface](configuration-connectivity.html#selecting-the-default-network-interface).
85+
- [Network connectivity](connectivity-tech.html).
86+
- [IP networking](ip-networking.html).
87+
- [Network status API](network-status.html).
88+
- [Network sockets](network-socket.html).

0 commit comments

Comments
 (0)