Skip to content

Commit ed27027

Browse files
doc (README.md): add a quick-start section (#240)
[skip ci]
2 parents d786156 + 64a1927 commit ed27027

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ The following types of operations are supported on devices running on Nordic's n
5555
custom firmware being installed in the sense that if the firmware uses more than half of the flash-bank-memory then only a single
5656
flash-bank will be available (no backup flash bank). Same if the firmware-devs explicitly disable the 'dual flash-bank' feature programmatically!
5757

58+
## Quick Start
59+
60+
```xml
61+
<PackageReference Include="Laerdal.McuMgr" Version="3.*" />
62+
63+
<!-- not really needed the appropriate version will be implicitly included by the build system -->
64+
<!-- <PackageReference Include="Laerdal.McuMgr.Bindings.iOS" Version="3.*" Condition="$([MSBuild]::IsOSPlatform('iOS'))" /> -->
65+
<!-- <PackageReference Include="Laerdal.McuMgr.Bindings.Android" Version="3.*" Condition="$([MSBuild]::IsOSPlatform('Android'))" /> -->
66+
<!-- <PackageReference Include="Laerdal.McuMgr.Bindings.MacCatalyst" Version="3.*" Condition="$([MSBuild]::IsOSPlatform('MacCatalyst'))" /> -->
67+
```
5868

5969
## ✅ Nuget Platform-Support Matrix
6070

@@ -145,7 +155,7 @@ Make sure to always get the latest versions of the above packages.
145155

146156
Just be sure to pay attention to the logs for anything that looks fishy in your event-handling logic.
147157

148-
```c#
158+
```csharp
149159

150160
private Laerdal.McuMgr.FirmwareInstallation.IFirmwareInstaller _firmwareInstaller;
151161

@@ -258,7 +268,7 @@ private void CleanupFirmwareInstaller()
258268

259269
- To erase a specific firmware:
260270

261-
```c#
271+
```csharp
262272
private IFirmwareEraser _firmwareEraser;
263273

264274
public async Task EraseFirmwareAsync()
@@ -338,7 +348,7 @@ private void CleanupFirmwareEraser()
338348

339349
- To reboot ('reset') the device:
340350

341-
```c#
351+
```csharp
342352
private IDeviceResetter _deviceResetter;
343353

344354
private void ResetDevice()
@@ -426,7 +436,7 @@ private void CleanupDeviceResetter()
426436
event-handlers might interfere with the native file-operations - this naturally works in your favour most of
427437
the time. Just pay attention to the logs for anything that looks fishy in your event-handling logic.
428438

429-
```c#
439+
```csharp
430440

431441
private Dictionary<string, byte[]> _massFileUploadSelectedFileNamesAndTheirRawBytes; //set this appropriately
432442
private async Task PickLocalFilesToMassUploadButtonClickedAsync()
@@ -869,7 +879,7 @@ private void CleanupDeviceResetter()
869879

870880
Same as in Android. Just make sure to pass a CBPeripheral to the constructors change a bit:
871881

872-
```c#
882+
```csharp
873883
_fileUploader = new Laerdal.McuMgr.FileUploading.FileUploader(desiredBluetoothDevice); // must be a CBPeripheral
874884
_firmwareEraser = new Laerdal.McuMgr.FirmwareErasure.FirmwareEraser(desiredBluetoothDevice); // must be a CBPeripheral
875885
_firmwareUpgrader = new Laerdal.McuMgr.FirmwareInstallation.FirmwareInstaller(desiredBluetoothDevice); // must be a CBPeripheral
@@ -880,7 +890,7 @@ _deviceResetter = new Laerdal.McuMgr.DeviceResetting.DeviceResetter(desiredBluet
880890
Note that the constructors support passing both a native device (CBPeripheral on iOS and BluetoothDevice on Android) or simply an 'object' that is castable to either of these types.
881891
This is done to help you write more uniform code across platforms. You might want to create your own factory-service to smoothen things even further on your:
882892

883-
```c#
893+
```csharp
884894
using Laerdal.Ble.Abstraction;
885895
using Laerdal.McuMgr.DeviceResetting.Contracts;
886896
using Laerdal.McuMgr.FileDownloading.Contracts;

0 commit comments

Comments
 (0)