Skip to content

Commit 4de8eda

Browse files
author
Deepika
committed
Add required header file and namespace element instead add all
1 parent 80a10cd commit 4de8eda

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@
139139
#ifdef DEVICE_SPI
140140

141141
#include "SDBlockDevice.h"
142-
#include "mbed_debug.h"
142+
#include "platform/mbed_debug.h"
143+
#include "platform/mbed_wait_api.h"
143144
#include <errno.h>
144145

145146
#ifndef MBED_CONF_SD_CMD_TIMEOUT

components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.h

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
#ifdef DEVICE_SPI
2222

2323
#include "BlockDevice.h"
24-
#include "mbed.h"
24+
#include "drivers/SPI.h"
25+
#include "drivers/Timer.h"
26+
#include "drivers/MbedCRC.h"
27+
#include "drivers/DigitalOut.h"
28+
#include "platform/platform.h"
2529
#include "platform/PlatformMutex.h"
2630

2731
/** SDBlockDevice class
@@ -177,10 +181,10 @@ class SDBlockDevice : public BlockDevice {
177181
bool _is_valid_trim(bd_addr_t addr, bd_size_t size);
178182

179183
/* SPI functions */
180-
Timer _spi_timer; /**< Timer Class object used for busy wait */
184+
mbed::Timer _spi_timer; /**< Timer Class object used for busy wait */
181185
uint32_t _init_sck; /**< Intial SPI frequency */
182186
uint32_t _transfer_sck; /**< SPI frequency during data transfer/after initialization */
183-
SPI _spi; /**< SPI Class object */
187+
mbed::SPI _spi; /**< SPI Class object */
184188

185189
/* SPI initialization function */
186190
void _spi_init();
@@ -195,7 +199,7 @@ class SDBlockDevice : public BlockDevice {
195199
int _freq(void);
196200

197201
/* Chip Select and SPI mode select */
198-
DigitalOut _cs;
202+
mbed::DigitalOut _cs;
199203
void _select();
200204
void _deselect();
201205

@@ -217,8 +221,8 @@ class SDBlockDevice : public BlockDevice {
217221
bool _crc_on;
218222
uint32_t _init_ref_count;
219223

220-
MbedCRC<POLY_7BIT_SD, 7> _crc7;
221-
MbedCRC<POLY_16BIT_CCITT, 16> _crc16;
224+
mbed::MbedCRC<POLY_7BIT_SD, 7> _crc7;
225+
mbed::MbedCRC<POLY_16BIT_CCITT, 16> _crc16;
222226
};
223227

224228
#endif /* DEVICE_SPI */

0 commit comments

Comments
 (0)