Skip to content

Commit b746b28

Browse files
committed
Merge pull request #4 from mbedmicro/master
Synd with master (February)
2 parents e91231e + 0fe5f5f commit b746b28

File tree

369 files changed

+30827
-11646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

369 files changed

+30827
-11646
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
2-
install: "sudo $TRAVIS_BUILD_DIR/travis/install_dependencies.sh > /dev/null"
32
python:
43
- "2.7"
54
script: "python workspace_tools/build_travis.py"
5+
install:
6+
- "sudo $TRAVIS_BUILD_DIR/travis/install_dependencies.sh > /dev/null"
7+
- sudo pip install colorama
8+
- sudo pip install prettytable

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ NXP:
3333
* LPC810 (Cortex-M0+)
3434
* [LPC812](http://developer.mbed.org/platforms/NXP-LPC800-MAX/) (Cortex-M0+)
3535
* [EA LPC4088](http://developer.mbed.org/platforms/EA-LPC4088/) (Cortex-M4F)
36+
* [EA LPC4088 DM](http://developer.mbed.org/platforms/EA-LPC4088-Display-Module/) (Cortex-M4F)
3637
* LPC4330 (Cortex-M4F + Cortex-M0)
3738
* [LPC1347](http://developer.mbed.org/platforms/DipCortex-M3/) (Cortex-M3)
3839
* [LPC1114](http://developer.mbed.org/platforms/LPC1114FN28/) (Cortex-M0)

libraries/USBDevice/USBDevice/USBEndpoints.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ typedef enum {
3737
} EP_STATUS;
3838

3939
/* Include configuration for specific target */
40-
#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088)
40+
#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC4088) || defined(TARGET_LPC4088_DM)
4141
#include "USBEndpoints_LPC17_LPC23.h"
4242
#elif defined(TARGET_LPC11UXX) || defined(TARGET_LPC1347) || defined (TARGET_LPC11U6X) || defined (TARGET_LPC1549)
4343
#include "USBEndpoints_LPC11U.h"

libraries/USBDevice/USBDevice/USBHAL_LPC40.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1717
*/
1818

19-
#if defined(TARGET_LPC4088)
19+
#if defined(TARGET_LPC4088) || defined(TARGET_LPC4088_DM)
2020

2121
#include "USBHAL.h"
2222

libraries/mbed/api/BusIn.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,35 @@ class BusIn {
5858
*/
5959
void mode(PinMode pull);
6060

61+
/** Binary mask of bus pins connected to actual pins (not NC pins)
62+
* If bus pin is in NC state make corresponding bit will be cleared (set to 0), else bit will be set to 1
63+
*
64+
* @returns
65+
* Binary mask of connected pins
66+
*/
67+
int mask() {
68+
return _nc_mask;
69+
}
70+
6171
#ifdef MBED_OPERATORS
6272
/** A shorthand for read()
6373
*/
6474
operator int();
75+
76+
/** Access to particular bit in random-iterator fashion
77+
*/
78+
DigitalIn & operator[] (int index);
6579
#endif
6680

6781
protected:
6882
DigitalIn* _pin[16];
6983

84+
/** Mask of bus's NC pins
85+
* If bit[n] is set to 1 - pin is connected
86+
* if bit[n] is cleared - pin is not connected (NC)
87+
*/
88+
int _nc_mask;
89+
7090
/* disallow copy constructor and assignment operators */
7191
private:
7292
BusIn(const BusIn&);

libraries/mbed/api/BusInOut.h

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ class BusInOut {
5151
*/
5252
void write(int value);
5353

54-
5554
/** Read the value currently output on the bus
5655
*
5756
* @returns
@@ -73,12 +72,26 @@ class BusInOut {
7372
*/
7473
void mode(PinMode pull);
7574

75+
/** Binary mask of bus pins connected to actual pins (not NC pins)
76+
* If bus pin is in NC state make corresponding bit will be cleared (set to 0), else bit will be set to 1
77+
*
78+
* @returns
79+
* Binary mask of connected pins
80+
*/
81+
int mask() {
82+
return _nc_mask;
83+
}
84+
7685
#ifdef MBED_OPERATORS
7786
/** A shorthand for write()
7887
*/
7988
BusInOut& operator= (int v);
8089
BusInOut& operator= (BusInOut& rhs);
8190

91+
/** Access to particular bit in random-iterator fashion
92+
*/
93+
DigitalInOut& operator[] (int index);
94+
8295
/** A shorthand for read()
8396
*/
8497
operator int();
@@ -87,6 +100,12 @@ class BusInOut {
87100
protected:
88101
DigitalInOut* _pin[16];
89102

103+
/** Mask of bus's NC pins
104+
* If bit[n] is set to 1 - pin is connected
105+
* if bit[n] is cleared - pin is not connected (NC)
106+
*/
107+
int _nc_mask;
108+
90109
/* disallow copy constructor and assignment operators */
91110
private:
92111
BusInOut(const BusInOut&);

libraries/mbed/api/BusOut.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,26 @@ class BusOut {
5656
*/
5757
int read();
5858

59+
/** Binary mask of bus pins connected to actual pins (not NC pins)
60+
* If bus pin is in NC state make corresponding bit will be cleared (set to 0), else bit will be set to 1
61+
*
62+
* @returns
63+
* Binary mask of connected pins
64+
*/
65+
int mask() {
66+
return _nc_mask;
67+
}
68+
5969
#ifdef MBED_OPERATORS
6070
/** A shorthand for write()
6171
*/
6272
BusOut& operator= (int v);
6373
BusOut& operator= (BusOut& rhs);
6474

75+
/** Access to particular bit in random-iterator fashion
76+
*/
77+
DigitalOut& operator[] (int index);
78+
6579
/** A shorthand for read()
6680
*/
6781
operator int();
@@ -70,6 +84,12 @@ class BusOut {
7084
protected:
7185
DigitalOut* _pin[16];
7286

87+
/** Mask of bus's NC pins
88+
* If bit[n] is set to 1 - pin is connected
89+
* if bit[n] is cleared - pin is not connected (NC)
90+
*/
91+
int _nc_mask;
92+
7393
/* disallow copy constructor and assignment operators */
7494
private:
7595
BusOut(const BusOut&);

libraries/mbed/api/DigitalIn.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@ class DigitalIn {
8080
gpio_mode(&gpio, pull);
8181
}
8282

83+
/** Return the output setting, represented as 0 or 1 (int)
84+
*
85+
* @returns
86+
* Non zero value if pin is connected to uc GPIO
87+
* 0 if gpio object was initialized with NC
88+
*/
89+
int is_connected() {
90+
return gpio_is_connected(&gpio);
91+
}
92+
8393
#ifdef MBED_OPERATORS
8494
/** An operator shorthand for read()
8595
*/

libraries/mbed/api/DigitalInOut.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ class DigitalInOut {
8585
gpio_mode(&gpio, pull);
8686
}
8787

88+
/** Return the output setting, represented as 0 or 1 (int)
89+
*
90+
* @returns
91+
* Non zero value if pin is connected to uc GPIO
92+
* 0 if gpio object was initialized with NC
93+
*/
94+
int is_connected() {
95+
return gpio_is_connected(&gpio);
96+
}
97+
8898
#ifdef MBED_OPERATORS
8999
/** A shorthand for write()
90100
*/

libraries/mbed/api/DigitalOut.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ class DigitalOut {
7777
return gpio_read(&gpio);
7878
}
7979

80+
/** Return the output setting, represented as 0 or 1 (int)
81+
*
82+
* @returns
83+
* Non zero value if pin is connected to uc GPIO
84+
* 0 if gpio object was initialized with NC
85+
*/
86+
int is_connected() {
87+
return gpio_is_connected(&gpio);
88+
}
89+
8090
#ifdef MBED_OPERATORS
8191
/** A shorthand for write()
8292
*/

0 commit comments

Comments
 (0)