From 0eb3475c75e9dff7c6c43f95746fdd2b1c68c2f9 Mon Sep 17 00:00:00 2001
From: Pavel Slama
Date: Fri, 11 Jan 2019 14:10:29 +0100
Subject: [PATCH 1/2] add missing get_type() from BlockDevice
---
I2CEEBlockDevice.cpp | 5 +++++
I2CEEBlockDevice.h | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/I2CEEBlockDevice.cpp b/I2CEEBlockDevice.cpp
index e1870ab529..7a0fed2a6d 100644
--- a/I2CEEBlockDevice.cpp
+++ b/I2CEEBlockDevice.cpp
@@ -147,3 +147,8 @@ bd_size_t I2CEEBlockDevice::size() const
{
return _size;
}
+
+const char *I2CEEBlockDevice::get_type() const
+{
+ return "I2CEE";
+}
diff --git a/I2CEEBlockDevice.h b/I2CEEBlockDevice.h
index da4732d1e7..0e083eae67 100644
--- a/I2CEEBlockDevice.h
+++ b/I2CEEBlockDevice.h
@@ -156,6 +156,12 @@ public:
* @return Size of the underlying device in bytes
*/
virtual bd_size_t size() const;
+
+ /** Get the BlockDevice class type.
+ *
+ * @return A string representation of the BlockDevice class type.
+ */
+ virtual const char *get_type() const;
private:
I2C * _i2c;
From b87c0f60f3b2ea2d6a980721daba721108dd5408 Mon Sep 17 00:00:00 2001
From: Christopher Haster
Date: Wed, 29 May 2019 16:20:22 -0500
Subject: [PATCH 2/2] Fixed travis issues
- Needed new gcc-arm-embedded ppa
- dist: Trusty did not allow apt-get update to work
- test.py is no longer working as it once was
- Needed to update pip versions
---
.travis.yml | 34 ++++++++++++++++------------------
I2CEEBlockDevice.h | 2 +-
2 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index ce00e0ee9c..db59ff7e5b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,19 @@
+dist: xenial
+language: python
+python: 2.7
+
+install:
+ # Get arm-none-eabi-gcc
+ - sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
+ - sudo apt-get update -qq
+ - sudo apt-get install -qq gcc-arm-embedded
+ # Get dependencies
+ - git clone https://github.com/armmbed/mbed-os.git
+ # Install python dependencies
+# - python -m pip install --upgrade pip==18.1
+# - python -m pip install --upgrade setuptools==40.4.3
+ - pip install -r mbed-os/requirements.txt
+
script:
# Check that examples compile
- sed -n '/``` cpp/,${/```$/q;/```/d;p}' README.md > main.cpp &&
@@ -8,21 +24,3 @@ script:
PYTHONPATH=mbed-os python mbed-os/tools/make.py -t GCC_ARM -m K82F
--source=. --build=BUILD/K82F/GCC_ARM -j0 &&
rm main.cpp
-
- # Check that tests compile
- - rm -r BUILD && PYTHONPATH=mbed-os python mbed-os/tools/test.py
- -t GCC_ARM -m K82F --source=. --build=BUILD/TESTS/K82F/GCC_ARM -j0
- -n tests*
-
-python:
- - "2.7"
-
-install:
- # Get arm-none-eabi-gcc
- - sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded
- - sudo apt-get update -qq
- - sudo apt-get install -qq gcc-arm-none-eabi --force-yes
- # Get dependencies
- - git clone https://github.com/armmbed/mbed-os.git
- # Install python dependencies
- - sudo pip install -r mbed-os/requirements.txt
diff --git a/I2CEEBlockDevice.h b/I2CEEBlockDevice.h
index 0e083eae67..ed2b69c13f 100644
--- a/I2CEEBlockDevice.h
+++ b/I2CEEBlockDevice.h
@@ -16,7 +16,7 @@
#ifndef MBED_I2CEEPROM_BLOCK_DEVICE_H
#define MBED_I2CEEPROM_BLOCK_DEVICE_H
-#include
+#include "mbed.h"
#include "BlockDevice.h"