Fork of the official mbed C/C++ SDK provides the software platform and libraries to build your applications. The fork has the documentation converted to Doxygen format
Dependents: NervousPuppySprintOne NervousPuppySprint2602 Robot WarehouseBot1 ... more
Fork of mbed by
Diff: PortInOut.h
- Revision:
- 28:667d61c9177b
- Parent:
- 27:7110ebee3484
- Child:
- 43:aff670d0d510
diff -r 7110ebee3484 -r 667d61c9177b PortInOut.h --- a/PortInOut.h Tue Nov 29 14:59:27 2011 +0000 +++ b/PortInOut.h Thu Dec 08 12:04:01 2011 +0000 @@ -35,9 +35,7 @@ * Variables: * value - An integer specifying a bit to write for every corresponding port pin */ - void write(int value) { - _gpio->FIOPIN = (_gpio->FIOPIN & ~_mask) | (value & _mask); - } + void write(int value); /* Function: read * Read the value currently output on the port @@ -45,9 +43,7 @@ * Variables: * returns - An integer with each bit corresponding to associated port pin setting */ - int read() { - return _gpio->FIOPIN & _mask; - } + int read(); /* Function: output * Set as an output @@ -88,9 +84,11 @@ } private: +#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) LPC_GPIO_TypeDef *_gpio; +#endif PortName _port; - uint32_t _mask; + uint32_t _mask; }; } // namespace mbed