Skip to content

Commit a21a422

Browse files
author
Deepika
committed
Docs update in platform folder
1. Remove protected member functions and protected attributes from rendering on docs site 2. Update BusInOut doxygen
1 parent e635613 commit a21a422

File tree

12 files changed

+35
-16
lines changed

12 files changed

+35
-16
lines changed

drivers/BusIn.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ class BusIn : private NonCopyable<BusIn> {
106106
*/
107107
DigitalIn &operator[](int index);
108108

109+
#if !defined(DOXYGEN_ONLY)
109110
protected:
110111
DigitalIn *_pin[16];
111112

@@ -120,6 +121,7 @@ class BusIn : private NonCopyable<BusIn> {
120121
private:
121122
virtual void lock();
122123
virtual void unlock();
124+
#endif
123125
};
124126

125127
} // namespace mbed

drivers/BusInOut.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ class BusInOut : private NonCopyable<BusInOut> {
8383
*/
8484
int read();
8585

86-
/** Set as an output
86+
/** Set all the pins in bus as output
8787
*/
8888
void output();
8989

90-
/** Set as an input
90+
/** Set all the pins in bus as an input
9191
*/
9292
void input();
9393

94-
/** Set the input pin mode
94+
/** Set the input pin mode for all the pins in bus
9595
*
9696
* @param pull PullUp, PullDown, PullNone
9797
*/
@@ -124,7 +124,7 @@ class BusInOut : private NonCopyable<BusInOut> {
124124
* \sa BusInOut::read()
125125
*/
126126
operator int();
127-
127+
#if !defined(DOXYGEN_ONLY)
128128
protected:
129129
virtual void lock();
130130
virtual void unlock();
@@ -137,6 +137,7 @@ class BusInOut : private NonCopyable<BusInOut> {
137137
int _nc_mask;
138138

139139
PlatformMutex _mutex;
140+
#endif
140141
};
141142

142143
} // namespace mbed

drivers/BusOut.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class BusOut : private NonCopyable<BusOut> {
108108
* \sa BusOut::read()
109109
*/
110110
operator int();
111-
111+
#if !defined(DOXYGEN_ONLY)
112112
protected:
113113
virtual void lock();
114114
virtual void unlock();
@@ -121,6 +121,7 @@ class BusOut : private NonCopyable<BusOut> {
121121
int _nc_mask;
122122

123123
PlatformMutex _mutex;
124+
#endif
124125
};
125126

126127
} // namespace mbed

drivers/FlashIAP.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ class FlashIAP : private NonCopyable<FlashIAP> {
138138
*/
139139
uint8_t get_erase_value() const;
140140

141+
#if !defined(DOXYGEN_ONLY)
141142
private:
142143

143144
/* Check if address and size are aligned to a sector
@@ -151,6 +152,7 @@ class FlashIAP : private NonCopyable<FlashIAP> {
151152
flash_t _flash;
152153
uint8_t *_page_buf;
153154
static SingletonPtr<PlatformMutex> _mutex;
155+
#endif
154156
};
155157

156158
} /* namespace mbed */

drivers/I2C.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class I2C : private NonCopyable<I2C> {
108108
* @param data Pointer to the byte-array to read data in to
109109
* @param length Number of bytes to read
110110
* @param repeated Repeated start, true - don't send stop at end
111-
* default value is false.
111+
* default value is false.
112112
*
113113
* @returns
114114
* 0 on success (ack),
@@ -134,7 +134,7 @@ class I2C : private NonCopyable<I2C> {
134134
* @param data Pointer to the byte-array data to send
135135
* @param length Number of bytes to send
136136
* @param repeated Repeated start, true - do not send stop at end
137-
* default value is false.
137+
* default value is false.
138138
*
139139
* @returns
140140
* 0 on success (ack),
@@ -188,8 +188,8 @@ class I2C : private NonCopyable<I2C> {
188188
* @param event The logical OR of events to modify
189189
* @param callback The event callback function
190190
* @param repeated Repeated start, true - do not send stop at end
191-
* default value is false.
192-
*
191+
* default value is false.
192+
*
193193
* @returns Zero if the transfer has started, or -1 if I2C peripheral is busy
194194
*/
195195
int transfer(int address, const char *tx_buffer, int tx_length, char *rx_buffer, int rx_length, const event_callback_t &callback, int event = I2C_EVENT_TRANSFER_COMPLETE, bool repeated = false);
@@ -198,6 +198,7 @@ class I2C : private NonCopyable<I2C> {
198198
*/
199199
void abort_transfer();
200200

201+
#if !defined(DOXYGEN_ONLY)
201202
protected:
202203
/** Lock deep sleep only if it is not yet locked */
203204
void lock_deep_sleep();
@@ -211,6 +212,7 @@ class I2C : private NonCopyable<I2C> {
211212
DMAUsage _usage;
212213
bool _deep_sleep_locked;
213214
#endif
215+
#endif
214216

215217
#if !defined(DOXYGEN_ONLY)
216218
protected:
@@ -222,7 +224,6 @@ class I2C : private NonCopyable<I2C> {
222224
static SingletonPtr<PlatformMutex> _mutex;
223225
PinName _sda;
224226
PinName _scl;
225-
#endif
226227

227228
private:
228229
/** Recover I2C bus, when stuck with SDA low
@@ -237,6 +238,7 @@ class I2C : private NonCopyable<I2C> {
237238
*
238239
*/
239240
int recover(PinName sda, PinName scl);
241+
#endif
240242
};
241243

242244
} // namespace mbed

drivers/InterruptManager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ class InterruptManager : private NonCopyable<InterruptManager> {
166166
"public API of mbed-os and is being removed in the future.")
167167
bool remove_handler(pFunctionPointer_t handler, IRQn_Type irq);
168168

169+
#if !defined(DOXYGEN_ONLY)
169170
private:
170171
InterruptManager();
171172
~InterruptManager();
@@ -198,6 +199,7 @@ class InterruptManager : private NonCopyable<InterruptManager> {
198199
CallChain *_chains[NVIC_NUM_VECTORS];
199200
static InterruptManager *_instance;
200201
PlatformMutex _mutex;
202+
#endif
201203
};
202204

203205
} // namespace mbed

drivers/LowPowerTimeout.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ namespace mbed {
3333
* @ingroup drivers
3434
*/
3535
class LowPowerTimeout : public LowPowerTicker, private NonCopyable<LowPowerTimeout> {
36-
36+
#if !defined(DOXYGEN_ONLY)
3737
private:
3838
virtual void handler(void)
3939
{
4040
_function.call();
4141
}
42+
#endif
4243
};
4344

4445
}

drivers/MbedCRC.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ class MbedCRC {
302302
return width;
303303
}
304304

305+
#if !defined(DOXYGEN_ONLY)
305306
private:
306307
uint32_t _initial_value;
307308
uint32_t _final_xor;
@@ -546,6 +547,7 @@ class MbedCRC {
546547
}
547548
_mode = (_crc_table != NULL) ? TABLE : BITWISE;
548549
}
550+
#endif
549551
};
550552

551553
#if defined ( __CC_ARM )

drivers/SPI.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ class SPI : private NonCopyable<SPI> {
208208
*/
209209
int set_dma_usage(DMAUsage usage);
210210

211+
#if !defined(DOXYGEN_ONLY)
211212
protected:
212213
/** SPI interrupt handler.
213214
*/
@@ -263,8 +264,6 @@ class SPI : private NonCopyable<SPI> {
263264
*/
264265
void start_transfer(const void *tx_buffer, int tx_length, void *rx_buffer, int rx_length, unsigned char bit_width, const event_callback_t &callback, int event);
265266

266-
#if !defined(DOXYGEN_ONLY)
267-
268267
private:
269268
/** Lock deep sleep only if it is not yet locked */
270269
void lock_deep_sleep();
@@ -294,7 +293,6 @@ class SPI : private NonCopyable<SPI> {
294293
#endif //DEVICE_SPI_ASYNCH
295294

296295
#if !defined(DOXYGEN_ONLY)
297-
298296
protected:
299297
/* Internal SPI object identifying the resources */
300298
spi_t _spi;

drivers/SerialBase.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ class SerialBase : private NonCopyable<SerialBase> {
141141
*/
142142
void send_break();
143143

144+
#if !defined(DOXYGEN_ONLY)
144145
protected:
145146

146147
/** Acquire exclusive access to this serial port
@@ -150,7 +151,7 @@ class SerialBase : private NonCopyable<SerialBase> {
150151
/** Release exclusive access to this serial port
151152
*/
152153
virtual void unlock(void);
153-
154+
#endif
154155
public:
155156

156157
#if DEVICE_SERIAL_FC
@@ -235,12 +236,15 @@ class SerialBase : private NonCopyable<SerialBase> {
235236
*/
236237
int set_dma_usage_rx(DMAUsage usage);
237238

239+
#if !defined(DOXYGEN_ONLY)
238240
protected:
239241
void start_read(void *buffer, int buffer_size, char buffer_width, const event_callback_t &callback, int event, unsigned char char_match);
240242
void start_write(const void *buffer, int buffer_size, char buffer_width, const event_callback_t &callback, int event);
241243
void interrupt_handler_asynch(void);
242244
#endif
245+
#endif
243246

247+
#if !defined(DOXYGEN_ONLY)
244248
protected:
245249
SerialBase(PinName tx, PinName rx, int baud);
246250
virtual ~SerialBase();
@@ -259,7 +263,7 @@ class SerialBase : private NonCopyable<SerialBase> {
259263
serial_t _serial;
260264
Callback<void()> _irq[IrqCnt];
261265
int _baud;
262-
266+
#endif
263267
};
264268

265269
} // namespace mbed

drivers/Timeout.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ namespace mbed {
5656
*/
5757
class Timeout : public Ticker, private NonCopyable<Timeout> {
5858

59+
#if !defined(DOXYGEN_ONLY)
5960
protected:
6061
virtual void handler();
62+
#endif
6163
};
6264

6365
} // namespace mbed

drivers/TimerEvent.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class TimerEvent : private NonCopyable<TimerEvent> {
4343
*/
4444
virtual ~TimerEvent();
4545

46+
#if !defined(DOXYGEN_ONLY)
4647
protected:
4748
// The handler called to service the timer event of the derived class
4849
virtual void handler() = 0;
@@ -77,6 +78,7 @@ class TimerEvent : private NonCopyable<TimerEvent> {
7778
ticker_event_t event;
7879

7980
const ticker_data_t *_ticker_data;
81+
#endif
8082
};
8183

8284
} // namespace mbed

0 commit comments

Comments
 (0)