62 #define HSPI_IOMODE_MAP(XX) \ 63 XX(SPI, 1, 1, 1, true) \ 64 XX(SPIHD, 1, 1, 1, false) \ 65 XX(DUAL, 1, 1, 2, false) \ 66 XX(DIO, 1, 2, 2, false) \ 67 XX(SDI, 2, 2, 2, false) \ 68 XX(QUAD, 1, 1, 4, false) \ 69 XX(QIO, 1, 4, 4, false) \ 70 XX(SQI, 4, 4, 4, false) 106 return (value >> 8) | (value << 8);
111 return ((value >> 16) & 0x0000ff) | (value & 0x00ff00) | ((value << 16) & 0xff0000);
116 return (value >> 24) | ((value >> 8) & 0xff00) | ((value << 8) & 0xff0000) | (value << 24);
Two bits per clock for Address and Data, 1-bit for Command.
PinSet
How SPI hardware pins are connected.
Definition: Common.h:95
One bit per clock, MISO stage follows MOSI (half-duplex)
Two bits per clock for Data, 1-bit for Command and Address.
uint8_t clockBits
Definition: Common.h:75
uint16_t bswap16(uint16_t value)
Definition: Common.h:104
static constexpr S bitVal(E e)
Get the bitmask corresponding to a given value.
Definition: BitSet.h:149
The String class.
Definition: WString.h:136
uint32_t bswap32(uint32_t value)
Definition: Common.h:114
One bit per clock, MISO stage concurrent with MISO (full-duplex)
constexpr IoModes operator|(IoMode a, IoMode b)
Definition: Common.h:52
const FlashString * name
Definition: Common.h:73
uint8_t addrressBits
Definition: Common.h:76
uint8_t ByteOrder
Definition: Common.h:89
Four bits per clock for Data, 1-bit for Command and Address.
uint8_t BitOrder
Definition: Common.h:90
BitSet< uint8_t, IoMode > IoModes
Definition: Common.h:50
Manage a set of bit values using enumeration.
Definition: BitSet.h:43
const IoModeInfo getIoModeInfo(IoMode mode)
describes a counted string stored in flash memory
Definition: String.hpp:173
Four bits per clock for Address and Data, 1-bit for Command.
Two bits per clock for Command, Address and Data.
HSPI pins with manual chip select.
uint32_t bswap24(uint32_t value)
Definition: Common.h:109
IoMode
Mode of data transfer.
Definition: Common.h:39
String toString(IoMode mode)
Definition: Common.h:83
uint8_t dataBits
Definition: Common.h:77
bool duplex
Definition: Common.h:78
ClockMode
SPI clock polarity (CPOL) and phase (CPHA)
Definition: Common.h:29
IoMode mode
Definition: Common.h:74
Four bits per clock for Command, Address and Data.