Add required header file and namespace element instead add all

pull/8006/head
Deepika 2018-09-05 11:41:25 -05:00
parent 80a10cd134
commit 4de8eda249
2 changed files with 12 additions and 7 deletions

View File

@ -139,7 +139,8 @@
#ifdef DEVICE_SPI #ifdef DEVICE_SPI
#include "SDBlockDevice.h" #include "SDBlockDevice.h"
#include "mbed_debug.h" #include "platform/mbed_debug.h"
#include "platform/mbed_wait_api.h"
#include <errno.h> #include <errno.h>
#ifndef MBED_CONF_SD_CMD_TIMEOUT #ifndef MBED_CONF_SD_CMD_TIMEOUT

View File

@ -21,7 +21,11 @@
#ifdef DEVICE_SPI #ifdef DEVICE_SPI
#include "BlockDevice.h" #include "BlockDevice.h"
#include "mbed.h" #include "drivers/SPI.h"
#include "drivers/Timer.h"
#include "drivers/MbedCRC.h"
#include "drivers/DigitalOut.h"
#include "platform/platform.h"
#include "platform/PlatformMutex.h" #include "platform/PlatformMutex.h"
/** SDBlockDevice class /** SDBlockDevice class
@ -177,10 +181,10 @@ private:
bool _is_valid_trim(bd_addr_t addr, bd_size_t size); bool _is_valid_trim(bd_addr_t addr, bd_size_t size);
/* SPI functions */ /* SPI functions */
Timer _spi_timer; /**< Timer Class object used for busy wait */ mbed::Timer _spi_timer; /**< Timer Class object used for busy wait */
uint32_t _init_sck; /**< Intial SPI frequency */ uint32_t _init_sck; /**< Intial SPI frequency */
uint32_t _transfer_sck; /**< SPI frequency during data transfer/after initialization */ uint32_t _transfer_sck; /**< SPI frequency during data transfer/after initialization */
SPI _spi; /**< SPI Class object */ mbed::SPI _spi; /**< SPI Class object */
/* SPI initialization function */ /* SPI initialization function */
void _spi_init(); void _spi_init();
@ -195,7 +199,7 @@ private:
int _freq(void); int _freq(void);
/* Chip Select and SPI mode select */ /* Chip Select and SPI mode select */
DigitalOut _cs; mbed::DigitalOut _cs;
void _select(); void _select();
void _deselect(); void _deselect();
@ -217,8 +221,8 @@ private:
bool _crc_on; bool _crc_on;
uint32_t _init_ref_count; uint32_t _init_ref_count;
MbedCRC<POLY_7BIT_SD, 7> _crc7; mbed::MbedCRC<POLY_7BIT_SD, 7> _crc7;
MbedCRC<POLY_16BIT_CCITT, 16> _crc16; mbed::MbedCRC<POLY_16BIT_CCITT, 16> _crc16;
}; };
#endif /* DEVICE_SPI */ #endif /* DEVICE_SPI */