Skip to content

Commit 8d03303

Browse files
committed
Filesystem: Integrate filesystem classes with common mbed.h entry point
1 parent 2a6a18e commit 8d03303

File tree

4 files changed

+49
-2
lines changed

4 files changed

+49
-2
lines changed

features/TESTS/filesystem/fat_file_system/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
#include "utest.h"
2020

2121
#include "HeapBlockDevice.h"
22-
#include "File.h"
23-
#include "Dir.h"
2422
#include "FATFileSystem.h"
2523
#include <stdlib.h>
2624
#include "retarget.h"

features/filesystem/mbed_filesystem.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/* filesystem
2+
* Copyright (c) 2016 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
#ifndef MBED_FILESYSTEM_API_H
17+
#define MBED_FILESYSTEM_API_H
18+
/** \addtogroup filesystem */
19+
/** @{*/
20+
21+
22+
// Standard types
23+
#include "platform/platform.h"
24+
25+
// FileSystem classes
26+
#include "filesystem/FileSystem.h"
27+
#include "filesystem/File.h"
28+
#include "filesystem/Dir.h"
29+
30+
// BlockDevice classes
31+
#include "bd/BlockDevice.h"
32+
#include "bd/BlockDevice.h"
33+
#include "bd/ChainingBlockDevice.h"
34+
#include "bd/SlicingBlockDevice.h"
35+
#include "bd/HeapBlockDevice.h"
36+
37+
38+
/** @}*/
39+
#endif

features/filesystem/mbed_lib.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "filesystem",
3+
"config": {
4+
"present": 1
5+
}
6+
}

mbed.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
#include "events/mbed_events.h"
4848
#endif
4949

50+
#if MBED_CONF_FILESYSTEM_PRESENT
51+
#include "filesystem/mbed_filesystem.h"
52+
#endif
53+
5054
#include "platform/toolchain.h"
5155
#include "platform/platform.h"
5256

0 commit comments

Comments
 (0)