Skip to content

Commit b49f209

Browse files
author
Amanda Butler
authored
Copy edit Storage.md
Copy edit file for active voice, present tense and other grammar.
1 parent fe51f3d commit b49f209

File tree

1 file changed

+25
-20
lines changed

1 file changed

+25
-20
lines changed

docs/reference/configuration/Storage.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ This page describes the build-time configurable parameters for storage in Mbed O
77
- [Default BlockDevice configuration](#Default-BlockDevice-configuration).
88
- [Default FileSystem configuration](#Default-FileSystem-configuration).
99

10-
The following is the complete list of storage configuration parameters and how to use and override default implementation if needed.
11-
For more details regarding configuration parameters please refer [the configuration system documentation](configuration.md).
10+
Below is the complete list of storage configuration parameters, as generated by `mbed compile --config -v`, and how to use and override default implementation. For more details regarding configuration parameters, please refer to [the configuration system documentation](configuration.md).
1211

1312
### LittleFS configuration
1413

@@ -99,20 +98,23 @@ Name: nvstore.max_keys
9998
```
10099

101100
### BlockDevice - default configuration
102-
Mbed-os configuration allows you to add block devices as components using the targets json file or target overrides in application config file.
103101

104-
When one of the following components is enabled a default block device will be set in the system.
102+
The Mbed OS configuration allows you to add block devices as components using the `targets.json` file or target overrides in the application configuration file.
105103

106-
1. SPIF component.
107-
2. DATAFLASH component.
108-
3. SD component.
104+
When one of the following components is enabled, a default block device is set in the system:
105+
106+
1. SPIF component.
107+
1. DATAFLASH component.
108+
1. SD component.
109109

110110
Components can coexist in the system. A device can have SPIF and SD or any combination of block devices enabled but only one default block device.
111111

112-
The list above is in precedence order and show which block device will be the default one if more than one component will be enabled.
112+
The list above is in the order of precedence shows which block device is the default one if more than one component is enabled.
113+
114+
#### Configuring components
113115

114-
#### configuring component:
115116
Adding "components": ["???"] in targets.json:
117+
116118
```
117119
"K64F": {
118120
"supported_form_factors": ["ARDUINO"],
@@ -134,7 +136,9 @@ Adding "components": ["???"] in targets.json:
134136
}
135137
},
136138
```
139+
137140
Adding "target.components_add": ["???"] in application config file:
141+
138142
```
139143
"MTB_ADV_WISE_1570": {
140144
"target.components_add": ["SPIF"],
@@ -143,10 +147,11 @@ Adding "target.components_add": ["???"] in application config file:
143147
}
144148
```
145149

146-
Please note that while a default block device exists an application is not enforced to use it and can create its own one.
150+
Please note that while a default block device exists, an application is not forced to use it and can create its own one.
147151

148-
#### Overriding default block device implementation
149-
The get default instance is implemented as [MBED_WEAK](https://github.com/ARMmbed/mbed-os/blob/40058871de290edc758a21ae6d8f2ec1d1b3533d/platform/mbed_toolchain.h#L120) at features/storage/system_storage/SystemStorage.cpp. That means that it can be overridden by implementing the function without MBED_WEAK and change the default block device for a given application.
152+
#### Overriding default block device implementation
153+
154+
The get default instance is implemented as [MBED_WEAK](https://github.com/ARMmbed/mbed-os/blob/40058871de290edc758a21ae6d8f2ec1d1b3533d/platform/mbed_toolchain.h#L120) at `features/storage/system_storage/SystemStorage.cpp`. That means that can override it by implementing the function without `MBED_WEAK` and change the default block device for a given application.
150155

151156
```
152157
#include "HeapBlockDevice.h"
@@ -160,19 +165,19 @@ BlockDevice *BlockDevice::get_default_instance()
160165

161166
### FileSystem - default configuration
162167

163-
Mbed-os configuration allows you to add block devices as components using the targets json file or target overrides in application config file.
164-
When a component of SPIF, DATAFLASH or SD are configured then the system will support one default file system.
168+
The Mbed OS configuration allows you to add block devices as components using the `targets.json` file or target overrides in the application configuration file. When you configure a component of SPIF, DATAFLASH or SD, the system supports one default file system.
165169

166-
Please note that while a default file system exists an application is not enforced to use it and can create its own one.
170+
Please note that while a default file system exists, an application is not forced to use it and can create its own one.
167171

168-
The default file system will be created based on the default block device due to performance considerations.
169-
SPIF and DATAFLASH block devices will support Little file system while SD block device will support FAT file system.
172+
The default file system is created based on the default block device due to performance considerations.
173+
174+
SPIF and DATAFLASH block devices support the Little file system, and the SD block device supports the FAT file system. However, the application can ovveride this behavior.
170175

171176
#### Overriding default block device implementation
172177

173-
The get default instance is implemented as MBED_WEAK at features/storage/system_storage/SystemStorage.cpp. That means that it can be overridden by implementing the function without MBED_WEAK and change the default block device for a given application.
178+
The get default instance is implemented as `MBED_WEAK` at `features/storage/system_storage/SystemStorage.cpp`. That means you can overridde it by implementing the function without `MBED_WEAK` and change the default block device for a given application.
174179

175-
The following example will override the get default instance of and will always return a FAT file system regardless of the block device type.
180+
The following example overrides the get default instance of and always returns a FAT file system regardless of the block device type:
176181

177182
```
178183
#include "FATFileSystem.h"
@@ -184,4 +189,4 @@ FileSystem *FileSystem::get_default_instance()
184189
return &default_fs;
185190
}
186191
187-
```
192+
```

0 commit comments

Comments
 (0)