Skip to content

Commit 2ce592d

Browse files
Cruz Monrreal IICruz Monrreal II
authored andcommitted
Merge branch 'deepikabhavnani-doc_updates' into rollup-aus_writathon
2 parents 32accc6 + b480a89 commit 2ce592d

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

drivers/QSPI.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,22 @@ class QSPI : private NonCopyable<QSPI> {
8484
* @param io3 4th IO pin used for sending/receiving data during data phase of a transaction
8585
* @param sclk QSPI Clock pin
8686
* @param ssel QSPI chip select pin
87-
* @param mode Mode specifies the SPI mode(Mode=0 uses CPOL=0, CPHA=0, Mode=1 uses CPOL=1, CPHA=1)
88-
* default value = 0
87+
* @param mode Clock polarity and phase mode (0 - 3) of SPI
88+
* (Default: Mode=0 uses CPOL=0, CPHA=0, Mode=1 uses CPOL=1, CPHA=1)
8989
*
9090
*/
9191
QSPI(PinName io0, PinName io1, PinName io2, PinName io3, PinName sclk, PinName ssel = NC, int mode = 0);
92+
virtual ~QSPI()
93+
{
94+
}
9295

9396
/** Configure the data transmission format
9497
*
9598
* @param inst_width Bus width used by instruction phase(Valid values are QSPI_CFG_BUS_SINGLE, QSPI_CFG_BUS_DUAL, QSPI_CFG_BUS_QUAD)
9699
* @param address_width Bus width used by address phase(Valid values are QSPI_CFG_BUS_SINGLE, QSPI_CFG_BUS_DUAL, QSPI_CFG_BUS_QUAD)
97100
* @param address_size Size in bits used by address phase(Valid values are QSPI_CFG_ADDR_SIZE_8, QSPI_CFG_ADDR_SIZE_16, QSPI_CFG_ADDR_SIZE_24, QSPI_CFG_ADDR_SIZE_32)
98101
* @param alt_width Bus width used by alt phase(Valid values are QSPI_CFG_BUS_SINGLE, QSPI_CFG_BUS_DUAL, QSPI_CFG_BUS_QUAD)
99-
* @param alt_size Size in bits used by alt phase(Valid values are QSPI_CFG_ADDR_SIZE_8, QSPI_CFG_ADDR_SIZE_16, QSPI_CFG_ADDR_SIZE_24, QSPI_CFG_ADDR_SIZE_32)
102+
* @param alt_size Size in bits used by alt phase(Valid values are QSPI_CFG_ALT_SIZE_8, QSPI_CFG_ALT_SIZE_16, QSPI_CFG_ALT_SIZE_24, QSPI_CFG_ALT_SIZE_32)
100103
* @param data_width Bus width used by data phase(Valid values are QSPI_CFG_BUS_SINGLE, QSPI_CFG_BUS_DUAL, QSPI_CFG_BUS_QUAD)
101104
* @param dummy_cycles Number of dummy clock cycles to be used after alt phase
102105
*
@@ -179,6 +182,7 @@ class QSPI : private NonCopyable<QSPI> {
179182
*/
180183
qspi_status_t command_transfer(int instruction, int address, const char *tx_buffer, size_t tx_length, const char *rx_buffer, size_t rx_length);
181184

185+
#if !defined(DOXYGEN_ONLY)
182186
protected:
183187
/** Acquire exclusive access to this SPI bus
184188
*/
@@ -188,12 +192,6 @@ class QSPI : private NonCopyable<QSPI> {
188192
*/
189193
virtual void unlock(void);
190194

191-
public:
192-
virtual ~QSPI()
193-
{
194-
}
195-
196-
protected:
197195
qspi_t _qspi;
198196

199197
bool acquire(void);
@@ -223,6 +221,7 @@ class QSPI : private NonCopyable<QSPI> {
223221
* This function builds the qspi command struct to be send to Hal
224222
*/
225223
inline void _build_qspi_command(int instruction, int address, int alt);
224+
#endif
226225
};
227226

228227
} // namespace mbed

mbed.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
#include "drivers/UARTSerial.h"
7474
#include "drivers/FlashIAP.h"
7575
#include "drivers/MbedCRC.h"
76+
#include "drivers/QSPI.h"
7677

7778
// mbed Internal components
7879
#include "drivers/Timer.h"

0 commit comments

Comments
 (0)