The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Revision:
24:e2ac27c8e93e
Parent:
18:b3c9f16cbb96
Child:
27:7110ebee3484
--- a/PortInOut.h	Thu Aug 26 08:50:26 2010 +0000
+++ b/PortInOut.h	Fri Sep 03 09:33:18 2010 +0000
@@ -32,8 +32,7 @@
      *  value - An integer specifying a bit to write for every corresponding port pin
      */    
     void write(int value) {
-        _gpio->FIOSET = value & _mask;
-        _gpio->FIOCLR = ~(value) & _mask;
+        _gpio->FIOPIN = (_gpio->FIOPIN & ~_mask) | (value & _mask);
     }
 
     /* Function: read