2424namespace mbed {
2525/* * \addtogroup drivers */
2626
27- /* * A digital input output bus, used for setting the state of a collection of pins
27+ /* * A digital input output bus, used for setting the state of a collection of pins.
28+ * Implemented as an array of DigitalInOut pins, the bus can be constructed by any
29+ * pins without restriction other than being capable of digital input or output
30+ * capabilities
2831 *
2932 * @note Synchronization level: Thread safe
3033 * @ingroup drivers
@@ -33,7 +36,7 @@ class BusInOut : private NonCopyable<BusInOut> {
3336
3437public:
3538
36- /* * Create an BusInOut, connected to the specified pins
39+ /* * Create a BusInOut, connected to the specified pins
3740 *
3841 * @param p0 DigitalInOut pin to connect to bus bit
3942 * @param p1 DigitalInOut pin to connect to bus bit
@@ -61,9 +64,11 @@ class BusInOut : private NonCopyable<BusInOut> {
6164 PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC,
6265 PinName p12 = NC, PinName p13 = NC, PinName p14 = NC, PinName p15 = NC);
6366
64- /* * Create an BusInOut, connected to the specified pins
67+ /* * Create a BusInOut, connected to the specified pins
6568 *
66- * @param pins An array of pins to construct a BusInOut from
69+ * @param pins An array of pins (PinName) to construct a BusInOut from. The maximum
70+ * number of pins in the array is 16 and any pins that are unspecified or are not to be
71+ * connected must be specified as NC in the array that is passed in
6772 */
6873 BusInOut (PinName pins[16 ]);
6974
@@ -111,7 +116,7 @@ class BusInOut : private NonCopyable<BusInOut> {
111116 }
112117
113118 /* * A shorthand for write()
114- * \sa BusInOut::write()
119+ * \sa BusInOut::write()
115120 */
116121 BusInOut &operator = (int v);
117122 BusInOut &operator = (BusInOut &rhs);
@@ -125,8 +130,9 @@ class BusInOut : private NonCopyable<BusInOut> {
125130 * \sa BusInOut::read()
126131 */
127132 operator int ();
128- # if !defined(DOXYGEN_ONLY)
133+
129134protected:
135+ #if !defined(DOXYGEN_ONLY)
130136 virtual void lock ();
131137 virtual void unlock ();
132138 DigitalInOut *_pin[16 ];
@@ -138,7 +144,7 @@ class BusInOut : private NonCopyable<BusInOut> {
138144 int _nc_mask;
139145
140146 PlatformMutex _mutex;
141- #endif
147+ #endif // !defined(DOXYGEN_ONLY)
142148};
143149
144150} // namespace mbed
0 commit comments