Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: include/Lib17_DIO.h
- Revision:
- 2:b77d327026af
- Parent:
- 1:2f99edb5545c
- Child:
- 3:0e24c9d4ff2c
--- a/include/Lib17_DIO.h Mon Apr 11 15:39:47 2011 +0000 +++ b/include/Lib17_DIO.h Mon Apr 11 15:46:11 2011 +0000 @@ -23,7 +23,6 @@ ***************************************************************************/ /** - * @file Lib17_DIO.h * @see http://cornflakes.wikidot.com/lib17:core * @defgroup API The Lib17 Core API * @defgroup Lib17_DIO Lib17_DIO functions @@ -76,10 +75,11 @@ public: + /** Constructor + */ Lib17_DIO(PinName p, Direction d = Out, PinMode m = PullDown) { init(p, d, m); }; - /** - * write + /** write * * Writes a value to the pin. * @@ -90,8 +90,7 @@ */ void write(int i) { if (i!=0) { pinUp(); } else { pinDn(); } } - /** - * read + /** read * * Reads the value on the pin. * @@ -102,8 +101,7 @@ */ int read(void) { return pinIs() ? 1 : 0; }; - /** - * output + /** output * * Setup the pin to be an output. * @@ -114,8 +112,7 @@ */ void output(void) { *((volatile uint32_t *)fiodir) |= mask; } - /** - * input + /** input * * Setup the pin to be an input. * @@ -126,8 +123,7 @@ */ void input(void) { *((volatile uint32_t *)fiodir) &= ~mask; } - /** - * getPin + /** getPin * * Get the PinName this object is operating on. * @@ -138,8 +134,7 @@ */ PinName getPin(void) { return pin; } - /** - * getDirection + /** getDirection * * Get the operational direction this pin is setup for. * @@ -150,8 +145,7 @@ */ int getDirection(void) { return *((volatile uint32_t *)fiomask) & mask ? 1 : 0; } - /** - * operator int() + /** operator int() * * Reads the value on the pin. * @@ -163,8 +157,7 @@ */ operator int() { return read(); } - /** - * operator= + /** operator= * * Writes a value to the pin. * @@ -175,8 +168,7 @@ */ Lib17_DIO& operator= (int value) { write(value); return *this; } - /** - * operator= + /** operator= * * Writes a value to the pin. * @@ -187,8 +179,7 @@ */ Lib17_DIO& operator= (Lib17_DIO& rhs) { write(rhs.read()); return *this; } - /** - * getMask + /** getMask * * Get the mask value for this pin. * @@ -199,8 +190,7 @@ */ uint32_t getMask(void) { return mask; } - /** - * getFiodir + /** getFiodir * * Get the FIODIR register for the port the pin is on. * @@ -211,8 +201,7 @@ */ uint32_t getFiodir(void) { return fiodir; } - /** - * getFiomask + /** getFiomask * * Get the FIOMASK register for the port the pin is on. * @@ -223,8 +212,7 @@ */ uint32_t getFiomask(void) { return fiomask; } - /** - * getFiopin + /** getFiopin * * Get the FIOPIN register for the port the pin is on. * @@ -235,8 +223,7 @@ */ uint32_t getFiopin(void) { return fiopin; } - /** - * getFioset + /** getFioset * * Get the FIOSET register for the port the pin is on. * @@ -247,8 +234,7 @@ */ uint32_t getFioset(void) { return fioset; } - /** - * getFioclr + /** getFioclr * * Get the FIOCLR register for the port the pin is on. *