MAX32620HSP (MAXREFDES100) RPC Example for Graphical User Interface
Dependencies: USBDevice
Fork of HSP_Release by
QuadSPI Class Reference
This class provides a Quad SPI interface for quad spi devices the class also allows single (4-Wire) communication. More...
#include <QuadSpi.h>
Public Member Functions | |
QuadSPI (PinName mosi, PinName miso, PinName sclk, PinName ssel=NC) | |
Create a QuadSPI master connected to the specified pins. | |
virtual int | write (int value) |
Write to the Quad SPI Slave and return the response. | |
int | read (void) |
Read from the Quad SPI Slave and return the response. | |
void | setSingleMode () |
Allow switching to and from Single SPI and Quad SPI. |
Detailed Description
This class provides a Quad SPI interface for quad spi devices the class also allows single (4-Wire) communication.
Definition at line 45 of file QuadSpi.h.
Constructor & Destructor Documentation
QuadSPI | ( | PinName | mosi, |
PinName | miso, | ||
PinName | sclk, | ||
PinName | ssel = NC |
||
) |
Create a QuadSPI master connected to the specified pins.
Initialize a SPI master for Quad SPI.
mosi or miso can be specfied as NC if not used
- Parameters:
-
mosi QuadSPI Master Out, Slave In pin miso QuadSPI Master In, Slave Out pin sclk QuadSPI Clock pin ssel QuadSPI chip select pin mosi Pin used for Master Out Slave In miso Pin used for Master In Slave Out sclk Pin used for Clock ssel Pin used for Chip Select
Definition at line 43 of file QuadSpi.cpp.
Member Function Documentation
int read | ( | void | ) |
Read from the Quad SPI Slave and return the response.
Read a byte in master mode using Quad SPI simplex transfer.
- Parameters:
-
none
- Returns:
- Response from the SPI slave
- Returns the value received from Quad SPI
Definition at line 67 of file QuadSpi.cpp.
void setSingleMode | ( | ) |
Allow switching to and from Single SPI and Quad SPI.
- Parameters:
-
none
- Returns:
- Response from the SPI slave
Definition at line 50 of file QuadSpi.cpp.
int write | ( | int | value ) | [virtual] |
Write to the Quad SPI Slave and return the response.
Write a byte out in master mode and receive a value.
- Parameters:
-
value Data to be sent to the SPI slave
- Returns:
- none
- Parameters:
-
value Byte Value to send
- Returns:
- Returns Zero
Definition at line 57 of file QuadSpi.cpp.
Generated on Tue Jul 12 2022 17:59:20 by 1.7.2