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