mbed library sources for TON Board V1.2
Fork of mbed-dev by
Diff: drivers/BusIn.h
- Revision:
- 167:e84263d55307
- Parent:
- 149:156823d33999
diff -r c97ed07ec1a8 -r e84263d55307 drivers/BusIn.h --- a/drivers/BusIn.h Thu Jun 08 15:02:37 2017 +0100 +++ b/drivers/BusIn.h Wed Jun 21 17:46:44 2017 +0100 @@ -22,11 +22,11 @@ namespace mbed { /** \addtogroup drivers */ -/** @{*/ /** A digital input bus, used for reading the state of a collection of pins * - * @Note Synchronization level: Thread safe + * @note Synchronization level: Thread safe + * @ingroup drivers */ class BusIn { @@ -35,7 +35,22 @@ /** Create an BusIn, connected to the specified pins * - * @param <n> DigitalIn pin to connect to bus bit <n> (p5-p30, NC) + * @param p0 DigitalIn pin to connect to bus bit + * @param p1 DigitalIn pin to connect to bus bit + * @param p2 DigitalIn pin to connect to bus bit + * @param p3 DigitalIn pin to connect to bus bit + * @param p4 DigitalIn pin to connect to bus bit + * @param p5 DigitalIn pin to connect to bus bit + * @param p6 DigitalIn pin to connect to bus bit + * @param p7 DigitalIn pin to connect to bus bit + * @param p8 DigitalIn pin to connect to bus bit + * @param p9 DigitalIn pin to connect to bus bit + * @param p10 DigitalIn pin to connect to bus bit + * @param p11 DigitalIn pin to connect to bus bit + * @param p12 DigitalIn pin to connect to bus bit + * @param p13 DigitalIn pin to connect to bus bit + * @param p14 DigitalIn pin to connect to bus bit + * @param p15 DigitalIn pin to connect to bus bit * * @note * It is only required to specify as many pin variables as is required @@ -46,7 +61,12 @@ PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC, PinName p12 = NC, PinName p13 = NC, PinName p14 = NC, PinName p15 = NC); - BusIn(PinName pins[16]); + + /** Create an BusIn, connected to the specified pins + * + * @param pins An array of pins to connect to bus bit + */ + BusIn(PinName pins[16]); virtual ~BusIn(); @@ -59,7 +79,7 @@ /** Set the input pin mode * - * @param mode PullUp, PullDown, PullNone + * @param pull PullUp, PullDown, PullNone */ void mode(PinMode pull); @@ -75,17 +95,19 @@ } /** A shorthand for read() + * \sa DigitalIn::read() */ operator int(); /** Access to particular bit in random-iterator fashion + * @param index Position of bit */ DigitalIn & operator[] (int index); protected: DigitalIn* _pin[16]; - /** Mask of bus's NC pins + /* Mask of bus's NC pins * If bit[n] is set to 1 - pin is connected * if bit[n] is cleared - pin is not connected (NC) */ @@ -105,4 +127,3 @@ #endif -/** @}*/