Skip to content

Commit 2dc0da5

Browse files
author
Janne Kiiskilä
authored
Merge pull request #13 from ARMmbed/mbed_lib
Start using mbed_lib.json
2 parents 37b5043 + f90353c commit 2dc0da5

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ The following sample code illustrates how to use the sd-driver Block Device API:
538538
// MISO (Master In Slave Out)
539539
// SCLK (Serial Clock)
540540
// CS (Chip Select)
541-
SDBlockDevice sd(p5, p6, p7, p12); // mosi, miso, sclk, cs
541+
SDBlockDevice sd(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, MBED_CONF_SD_SPI_CS);
542542
uint8_t block[512] = "Hello World!\n";
543543
544544
int main()

config/mbed_app.json renamed to config/mbed_lib.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"name": "sd",
23
"config": {
34
"UART_RX": "D0",
45
"UART_TX": "D1",

features/TESTS/examples/example1/example1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "platform/mbed_retarget.h"
99

1010

11-
SDBlockDevice sd(MBED_CONF_APP_SPI_MOSI, MBED_CONF_APP_SPI_MISO, MBED_CONF_APP_SPI_CLK, MBED_CONF_APP_SPI_CS);
11+
SDBlockDevice sd(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, MBED_CONF_SD_SPI_CS);
1212
FATFileSystem fs("sd", &sd);
1313

1414
void return_error(int ret_val){

features/TESTS/filesystem/basic/basic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static const char *fsfat_basic_bin_filename_test_10 = "0:testfile.bin";
120120

121121

122122

123-
SDBlockDevice sd(MBED_CONF_APP_SPI_MOSI, MBED_CONF_APP_SPI_MISO, MBED_CONF_APP_SPI_CLK, MBED_CONF_APP_SPI_CS);
123+
SDBlockDevice sd(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, MBED_CONF_SD_SPI_CS);
124124
FATFileSystem fs(sd_mount_pt, &sd);
125125

126126
#define FSFAT_BASIC_MSG(_buf, _max_len, _fmt, ...) \

features/TESTS/filesystem/fopen/fopen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static char fsfat_fopen_utest_msg_g[FSFAT_UTEST_MSG_BUF_SIZE];
8585
static const char *sd_badfile_path = "/sd/badfile.txt";
8686
static const char *sd_testfile_path = "/sd/test.txt";
8787

88-
SDBlockDevice sd(MBED_CONF_APP_SPI_MOSI, MBED_CONF_APP_SPI_MISO, MBED_CONF_APP_SPI_CLK, MBED_CONF_APP_SPI_CS);
88+
SDBlockDevice sd(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, MBED_CONF_SD_SPI_CS);
8989
FATFileSystem fs("sd", &sd);
9090

9191
#define FSFAT_FOPEN_TEST_01 fsfat_fopen_test_01

0 commit comments

Comments
 (0)