Skip to content

Commit f83299c

Browse files
author
Amanda Butler
authored
Merge branch 'development' into ci
2 parents ce30733 + 668571e commit f83299c

File tree

85 files changed

+2025
-10320
lines changed

Some content is hidden

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

85 files changed

+2025
-10320
lines changed

docs.json

Lines changed: 206 additions & 137 deletions
Large diffs are not rendered by default.

docs/api/api.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
<td><a href="busin.html">BusIn</a></td>
7777
<td><a href="ticker.html">Ticker</a></td>
7878
<td><a href="serial.html">Serial</a></td>
79-
<td><a href="devicekey.html">DeviceKey</a></td>
8079
</tr>
8180
<tr>
8281
<td><a href="busout.html">BusOut</a></td>
@@ -201,9 +200,14 @@ You can use [Near-Field Communication (NFC)](nfc.html), a short-range radio tech
201200
<tbody>
202201
<tr>
203202
<td><a href="nfccontroller.html">NFCController</a></td>
203+
<td><a href="simplemessageparser.html">SimpleMessageParser</a></td>
204204
</tr>
205205
<tr>
206206
<td><a href="nfc-eeprom.html">NFC EEPROM</a></td>
207+
<td><a href="messagebuilder.html">MessageBuilder</a></td>
208+
</tr>
209+
<tr>
210+
<td><a href="messageparser.html">MessageParser</a></td>
207211
</tr>
208212
</tbody>
209213
</table>
@@ -217,6 +221,9 @@ With [Arm Mbed TLS](security.html), a comprehensive SSL/TLS solution, you can in
217221
<tr>
218222
<td><a href="tls.html">TLS</a></td>
219223
</tr>
224+
<tr>
225+
<td><a href="Devicekey.html">DeviceKey</a></td>
226+
</tr>
220227
</tbody>
221228
</table>
222229

@@ -238,13 +245,14 @@ The [storage APIs](storage.html) include file system APIs, for file system opera
238245
<td><a href="blockdevice.html">BlockDevice</a></td>
239246
<td><a href="slicingblockdevice.html">SlicingBlockDevice</a></td>
240247
<td><a href="dataflash-block-device.html">DataFlashBlockDevice</a></td>
241-
<td><a href="nvstore.html">NVStore</a></td>
248+
<td><a href="qspifblockdevice.html">QSPIFBlockDevice</a></td>
242249
</tr>
243250
<tr>
244251
<td><a href="file.html">File</a></td>
245252
<td><a href="heapblockdevice.html">HeapBlockDevice</a></td>
246253
<td><a href="profilingblockdevice.html">ProfilingBlockDevice</a></td>
247254
<td><a href="flashiapblockdevice.html">FlashIAPBlockDevice</a></td>
255+
<td><a href="nvstore.html">NVStore</a></td>
248256
</tr>
249257
<tr>
250258
<td><a href="littlefilesystem.html">LittleFileSystem</a></td>

docs/api/bluetooth/BatteryService.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The BatteryService class implements the Bluetooth Battery Service as defined by
1212

1313
### BatteryService example
1414

15-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-BatteryLevel/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-BatteryLevel/file/5cf292205001/source/main.cpp)
15+
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-BatteryLevel/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-BatteryLevel/file/15a6111a679e/source/main.cpp)
1616

1717
### Related content
1818

docs/api/bluetooth/Gap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ You may query the currently used PHY using `readPhy()`, which returns the result
4848

4949
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.
5050

51-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-GAP/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-GAP/file/37872bf83624/source/main.cpp)
51+
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-GAP/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-GAP/file/3993e2608615/source/main.cpp)

docs/api/bluetooth/GattServer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ The term characteristic value update represents Characteristic Value Notificatio
3333

3434
### GattServer example
3535

36-
[![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/a17a79f0d8af/main.cpp)
36+
[![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/6aa9b4b024d7/main.cpp)

docs/api/bluetooth/HeartRateService.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The HeartRateService class implements the Bluetooth Heart Rate service as define
1414

1515
### HeartRateService example
1616

17-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-HeartRate/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-HeartRate/file/55c859f4efe0/source/main.cpp)
17+
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-HeartRate/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-HeartRate/file/f5279652302f/source/main.cpp)
1818

1919
### Related content
2020

docs/api/bluetooth/SecurityManager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ The simplest example is a pairing of a device with no IO capabilities and no OOB
5252

5353
The SecurityManager example demonstrates both a central and a peripheral connecting, performing basic pairing and setting up link security.
5454

55-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-SM/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-SM/file/547e88d95052/source/main.cpp)
55+
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-SM/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-SM/file/d849f18bb4dd/source/main.cpp)

docs/api/bluetooth/iBeacon.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ The iBeacon class builds an advertising payload mimicking an iBeacon and assigns
1212

1313
### iBeacon example
1414

15-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-Beacon/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-Beacon/file/5575d1bee775/source/main.cpp)
15+
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-Beacon/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-ble-Beacon/file/ec76013cdcab/source/main.cpp)
1616

1717
<span class="notes">**Note:** You can find more information at the [Apple iBeacon page](https://developer.apple.com/ibeacon/).</span>

docs/api/drivers/BusIn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<span class="images">![](http://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/classmbed_1_1_bus_in.png)<span>BusIn class hierarchy</span></span>
44

5-
With the BusIn API, you can create a number of DigitalIn pins that you can read as one value. This abstraction is useful for checking multiple inputs at once. You can use this API to write clearer code faster.
5+
With the BusIn API, you can combine number of DigitalIn pins to read them at once. This abstraction is useful for checking multiple inputs together as single interface instead of individual pins.
66

77
You can use any of the numbered Arm Mbed pins as a DigitalIn in the BusIn.
88

docs/api/drivers/BusOut.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<span class="images">![](http://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/classmbed_1_1_bus_out.png)<span>BusOut class hierarchy</span></span>
44

5-
Use the BusOut interface to create a number of [DigitalOut](digitalout.html) pins that you can write as one value. This API is useful for writing multiple outputs at once. You can use this API to write clearer code faster.
5+
Use the BusOut interface to combine a number of [DigitalOut](digitalout.html) pins to write them at once. This API is useful for writing to multiple pins together as single interface instead of individual pins.
66

77
You can use any of the numbered Arm Mbed pins as a DigitalOut in the BusOut.
88

docs/api/drivers/CAN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Controller-Area Network (CAN) is a bus standard that allows microcontrollers and
1414

1515
This example sends a counter from one CAN bus (can1) and listens for a packet on the other CAN bus (can2). Each bus controller should be connected to a CAN bus transceiver. These should be connected together at a CAN bus.
1616

17-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed_example/code/CAN_ex_1/)](https://os.mbed.com/teams/mbed_example/code/CAN_ex_1/file/5791101761f9/main.cpp)
17+
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed_example/code/CAN_ex_1/)](https://os.mbed.com/teams/mbed_example/code/CAN_ex_1/file/d6cbcdb04ada/main.cpp)

docs/api/drivers/MbedCRC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ Below is a CRC example to compute 32-bit CRC.
2424

2525
Below is a 32-bit CRC example using `compute_partial` APIs.
2626

27-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed_example/code/CRC_partial_example/)](https://os.mbed.com/teams/mbed_example/code/CRC_partial_example/file/834c44916a38/main.cpp)
27+
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed_example/code/CRC_partial_example/)](https://os.mbed.com/teams/mbed_example/code/CRC_partial_example/file/d4c48b62da22/main.cpp)
2828

2929
#### Example 3
3030

3131
Below is a CRC example for the SD driver.
3232

33-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed_example/code/CRC_eample_sd/)](https://os.mbed.com/teams/mbed_example/code/CRC_eample_sd/file/ee110889fa99/main.cpp)
33+
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed_example/code/CRC_eample_sd/)](https://os.mbed.com/teams/mbed_example/code/CRC_eample_sd/file/97e3e51ca5d5/main.cpp)
3434

3535
### Related content
3636

docs/api/drivers/PortIn.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
## PortIn
22

3-
Use the PortIn interface to read an underlying GPIO port as one value. This is much faster than [BusIn](busin.html) because you can read a port in one go, but it is much less flexible because you are constrained by the port and bit layout of the underlying GPIO ports.
3+
Use the PortIn interface to define which pins of a hardware GPIO port are set as an input and to read the value of those pins. The port name is device specific and defined in the device's `PortNames.h` file in the `mbed-os/targets` folder.
44

5-
A mask can be supplied so only certain bits of a port are used, allowing other bits to be used for other interfaces.
5+
A bit mask defines which pins of the GPIO port are set as an input (`1b` = include, `0b` = ignore). The default mask value is `0xFFFFFFFF`, which sets all pins as an input.
6+
7+
The device-specific `PinNames.h` and the respective datasheet or reference manual define the pins associated with a GPIO port.
8+
9+
<span class="notes">**Note:** You can combine pins from different GPIO ports using the [BusIn](busin.html) interface. Use [PortOut](portout.html) to define which GPIO pins are to be used as digital output.</span>
610

711
### PortIn class reference
812

@@ -15,3 +19,4 @@ A mask can be supplied so only certain bits of a port are used, allowing other b
1519
### Related content
1620

1721
- [BusIn](busin.html) API reference.
22+
- [PortOut](portout.html) API reference.

docs/api/drivers/PortOut.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
## PortOut
22

3-
Use the PortOut interface to write to an underlying GPIO port as one value. This is much faster than [BusOut](busout.html) because you can write a port in one go, but it is much less flexible because you are constrained by the port and bit layout of the underlying GPIO ports.
3+
Use the PortOut interface to define which pins of a hardware GPIO port are set as an output and to write those pins. The port name is device specific and defined in the device's `PortNames.h` file in the `mbed-os/targets` folder.
44

5-
A mask can be supplied so only certain bits of a port are used, allowing other bits to be used for other interfaces.
5+
A bit mask defines which pins of the GPIO port are set as an output (`1b` = include, `0b` = ignore). The default mask value is `0xFFFFFFFF` which sets all pins as an output.
6+
7+
The device-specific `PinNames.h` and the respective datasheet or reference manual define the pins associated with a GPIO port.
8+
9+
<span class="notes">**Note:** You can combine pins from different GPIO ports using the [BusOut](busout.html) interface. Use [PortIn](portin.html) to define which GPIO pins are to be used as digital input.</span>
610

711
### PortOut class reference
812

@@ -15,3 +19,4 @@ A mask can be supplied so only certain bits of a port are used, allowing other b
1519
### Related content
1620

1721
- [BusOut](busout.html) API reference.
22+
- [PortIn](portin.html) API reference.

docs/api/drivers/PwmOut.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Use the PwmOut interface to control the frequency and duty cycle of a PWM signal
99

1010
### PwmOut class reference
1111

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

1414

1515
### PwmOut hello, world

docs/api/drivers/TimeOut.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ You can create any number of Timeout objects, allowing multiple outstanding inte
88

99
### Warnings and notes
1010

11-
* Timers are based on 32-bit int microsecond counters, so they can only time up to a maximum of 2^31-1 microseconds (30 minutes). They are designed for times between microseconds and seconds. For longer times, you should consider the time() real time clock.
12-
1311
* No blocking code in ISR: avoid any call to wait, infinite while loop or blocking calls in general.
1412

1513
* No printf, malloc or new in ISR: Avoid any call to bulky library functions. In particular, certain library functions (such as printf, malloc and new) are not re-entrant, and their behavior could be corrupted when called from an ISR.
1614

15+
* While a Timeout is running, deep sleep is blocked to maintain accurate timing. If you don't need microsecond precision, consider using the LowPowerTimeout class instead because this does not block deep sleep mode.
16+
1717
### Timeout class reference
1818

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

docs/api/drivers/Timer.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
## Timer
22

3-
Use the Timer interface to create, start, stop and read a timer for measuring small times (between microseconds and seconds).
3+
<span class="images">![](https://os-doc-builder.test.mbed.com/docs/development/mbed-os-api-doxy/classmbed_1_1_timer.png)<span>Timer class hierarchy</span></span>
4+
5+
Use the Timer interface to create, start, stop and read a timer for measuring precise times (better than millisecond precision).
46

57
You can independently create, start and stop any number of Timer objects.
68

7-
<span class="notes">**Note:** Timers are based on 32-bit int microsecond counters, so they can only time up to a maximum of 2^31-1 microseconds (30 minutes). They are designed for times between microseconds and seconds. For longer times, use the `time()` real time clock.</span>
9+
### Warnings and notes
10+
11+
- Timers are based on 64-bit unsigned microsecond counters, but for backward compatibility, the `read_ms()` and `read_us()` methods only return 32-bit signed integers. This limits their range before wrapping to 49 days and 35 minutes respectively. Use `read_high_resolution_us()` to access the full range of over 500,000 years.
12+
- While a Timer is running, deep sleep is blocked to maintain accurate timing. If you don't need microsecond precision, consider using the LowPowerTimer class instead because this does not block deep sleep mode.
813

914
### Timer class reference
1015

docs/api/drivers/drivers.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
11
## Drivers overview
22

3-
Driver APIs include analog and digital inputs and outputs on development boards, as well as digital interfaces, which allow your board to interface with a computer or external devices. With these drivers, you can read or set the voltage of analog pins, control digital pins individually or as a grouped value and trigger an event when a digital input pin changes value. You can also control the frequency and mark to space ratio of a digital pulse wave (or train).
3+
Drivers provide access to general purpose microcontroller hardware. Drivers typically access a microcontroller's hardware peripherals directly, and may form the lowest lever of a protocol or network stack.
4+
5+
The Mbed OS driver APIs include analog and digital inputs and outputs on development boards, as well as digital interfaces, which allow your board to interface with a computer or external devices. With these drivers, you can read or set the voltage of analog pins, control digital pins individually or grouped into a bus and trigger an event when more data is available on the bus. You can also control the frequency and mark to space ratio, or duty cycle, of a Pulse Width Modulated (PWM) digital output.
6+
7+
### Blocking nature
8+
9+
By default, all Mbed OS driver APIs are blocking. In the drivers, blocking APIs cause the current thread to wait until the hardware operation completes. Blocking APIs simplify control flow, allow for linearly structured programs and make debugging intuitive. We suggest using blocking APIs as a starting point. You should only consider more complex APIs if the blocking APIs do not satisfy your requirements.
10+
11+
Mbed OS is built around an RTOS, and to complement this, the drivers are thread safe. This means that if you use multiple drivers in a blocking manner, as long as the drivers are in separate threads, their operations can still be carried out in parallel. When a driver blocks a thread, the RTOS either switches to any nonblocked threads or sleeps. This means that in most cases, an application using blocking APIs has the same advantages as one using nonblocking APIs.
12+
13+
In some cases, the drivers provide nonblocking APIs. These APIs configure hardware to run in the background of the processor, without blocking a thread. Nonblocking drivers signal through the attach function once the background operation is complete.
14+
15+
### Attaching callbacks to drivers
16+
17+
In Mbed OS, the standard API for asynchronous events is the attach function. You can use the attach function to attach a callback function. Drivers call the attached callback function during specific events. You can use this to learn when the state of a nonblocking operation changes or whether other asynchronous events occur.
18+
19+
For example, you can attach a callback function on a [Serial](serial.html) object, which the Serial object calls when the serial line receives a packet on the RX line.
20+
21+
One important thing to note is that when you attach callbacks with this function, the driver calls them in interrupt context. Interrupt context runs at a higher priority than any thread, which means that any code called from the attach callback must be interrupt safe. This excludes any blocking APIs such as blocking drivers, malloc, and mutexes. Or you risk preventing other high-priority interrupts from running, which may break other parts of the OS.
22+
23+
When you need to call code that’s not interrupt safe from interrupt context, you must first defer from the interrupt context to a thread. The easiest way to defer to a thread is to signal a waiting thread through a [Semaphore](semaphore.html). In more complex use cases, you can use an [EventQueue](eventqueue.html) to manage multiple events at once.

docs/api/lorawan/loraradio.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To configure this class, please see the [LoRa configuration documentation](/docs
1212

1313
### LoRaRadio example
1414

15-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-lorawan/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-lorawan/file/ceea78461fbd/main.cpp)
15+
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-example-lorawan)](https://github.com/ARMmbed/mbed-os-example-lorawan/blob/master/main.cpp)
1616

1717
### Related content
1818

docs/api/lorawan/lorawan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To configure this class, please see the [LoRa configuration documentation](/docs
1414

1515
Please visit our Arm Mbed Online Compiler example, and follow the instructions in the `README.md`.
1616

17-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-lorawan/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-lorawan/file/ceea78461fbd/main.cpp)
17+
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-example-lorawan)](https://github.com/ARMmbed/mbed-os-example-lorawan/blob/master/main.cpp)
1818

1919
### Related content
2020

docs/api/networkinterfaces/CellularInterface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ To bring up the network interface:
7070

7171
This example establishes connection with the cellular network using Mbed OS CellularInterface.
7272

73-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-cellular/)](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-cellular/file/cf737b827270/main.cpp)
73+
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-example-cellular)](https://github.com/ARMmbed/mbed-os-example-cellular/blob/master/main.cpp)
7474

7575
### Related content
7676

0 commit comments

Comments
 (0)