mbed libraries for KL25Z
Diff: PortOut.h
- Revision:
- 7:73c5efe92a6c
- Parent:
- 2:e9a661555b58
- Child:
- 8:c14af7958ef5
--- a/PortOut.h Fri Oct 12 10:06:08 2012 +0000 +++ b/PortOut.h Tue Oct 23 09:20:18 2012 +0000 @@ -1,7 +1,6 @@ /* mbed Microcontroller Library - PortOut * Copyright (c) 2006-2011 ARM Limited. All rights reserved. - */ - + */ #ifndef MBED_PORTOUT_H #define MBED_PORTOUT_H @@ -9,12 +8,11 @@ #if DEVICE_PORTOUT +#include "port_api.h" + #include "platform.h" -#include "PinNames.h" #include "Base.h" -#include "PortNames.h" - namespace mbed { /* Class: PortOut * A multiple pin digital out @@ -40,16 +38,15 @@ */ class PortOut { public: - /* Constructor: PortOut * Create an PortOut, connected to the specified port * * Variables: * port - Port to connect to (Port0-Port5) * mask - A bitmask to identify which bits in the port should be included (0 - ignore) - */ + */ PortOut(PortName port, int mask = 0xFFFFFFFF); - + /* Function: write * Write the value to the output port * @@ -57,7 +54,7 @@ * value - An integer specifying a bit to write for every corresponding PortOut pin */ void write(int value); - + /* Function: read * Read the value currently output on the port * @@ -87,11 +84,7 @@ } private: -#if defined(TARGET_LPC1768) || defined(TARGET_LPC2368) - LPC_GPIO_TypeDef *_gpio; -#endif - PortName _port; - uint32_t _mask; + port_object _port; }; } // namespace mbed