SPI_Mode Enum

Header: #include <applibs/spi.h>

The possible communication mode values for an SPI interface. The communication mode defines timings for device communication.

typedef enum SPI_Mode {
    SPI_Mode_Invalid = 0x0,
    SPI_Mode_0 = 0x1,
    SPI_Mode_1 = 0x2,
    SPI_Mode_2 = 0x3,
    SPI_Mode_3 = 0x4
} SPI_Mode;

Values

SPI_Mode_Invalid

An invalid mode.

SPI_Mode_0

SPI mode 0: clock polarity (CPOL) = 0, clock phase (CPHA) = 0.

SPI_Mode_1

SPI mode 1: clock polarity (CPOL) = 0, clock phase (CPHA) = 1.

SPI_Mode_2

SPI mode 2: clock polarity (CPOL) = 1, clock phase (CPHA) = 0.

SPI_Mode_3

SPI mode 3: clock polarity (CPOL) = 1, clock phase (CPHA) = 1.