Skip to content

Commit b0d36eb

Browse files
committed
Remove mbed.h includes from I2CEEBlockDevice
1 parent 51dd443 commit b0d36eb

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

components/storage/blockdevice/COMPONENT_I2CEE/I2CEEBlockDevice.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* limitations under the License.
1515
*/
1616
#include "I2CEEBlockDevice.h"
17+
#include "mbed_wait_api.h"
18+
using namespace mbed;
1719

1820
#define I2CEE_TIMEOUT 10000
1921

components/storage/blockdevice/COMPONENT_I2CEE/I2CEEBlockDevice.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
#ifndef MBED_I2CEEPROM_BLOCK_DEVICE_H
1717
#define MBED_I2CEEPROM_BLOCK_DEVICE_H
1818

19-
#include "mbed.h"
2019
#include "BlockDevice.h"
21-
20+
#include "I2C.h"
2221

2322
/** BlockDevice for I2C based flash device such as
2423
* Microchip's 24LC or ATMEL's AT24C ranges
@@ -81,7 +80,7 @@ class I2CEEBlockDevice : public BlockDevice {
8180
* @param freq The frequency of the I2C bus, defaults to 400K.
8281
*/
8382
I2CEEBlockDevice(
84-
I2C * i2c_obj, uint8_t address,
83+
mbed::I2C * i2c_obj, uint8_t address,
8584
bd_size_t size, bd_size_t block=32);
8685

8786
/** Destructor of I2CEEBlockDevice
@@ -164,8 +163,8 @@ class I2CEEBlockDevice : public BlockDevice {
164163
virtual const char *get_type() const;
165164

166165
private:
167-
I2C * _i2c;
168-
uint32_t _i2c_buffer[sizeof(I2C) / sizeof(uint32_t)];
166+
mbed::I2C * _i2c;
167+
uint32_t _i2c_buffer[sizeof(mbed::I2C) / sizeof(uint32_t)];
169168
uint8_t _i2c_addr;
170169
uint32_t _size;
171170
uint32_t _block;

targets/targets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@
14701470
},
14711471
"K64F": {
14721472
"supported_form_factors": ["ARDUINO"],
1473-
"components_add": ["SD", "FLASHIAP"],
1473+
"components_add": ["SD", "FLASHIAP", "I2CEE"],
14741474
"core": "Cortex-M4F",
14751475
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
14761476
"extra_labels": [

0 commit comments

Comments
 (0)