public enum SPIClockMode extends java.lang.Enum<SPIClockMode>
SPI
interface.
The clock mode represents the combination of the CPOL (SPI Clock Polarity Bit) and CPHA (SPI Clock Phase Bit) signals.
Enum Constant | Description |
---|---|
CPOL_0_CPHA_0 |
Mode 0: Clock polarity = 0 / Clock phase = 0
|
CPOL_0_CPHA_1 |
Mode 1: Clock polarity = 0 / Clock phase = 1
|
CPOL_1_CPHA_0 |
Mode 2: Clock polarity = 1 / Clock phase = 0
|
CPOL_1_CPHA_1 |
Mode 3: Clock polarity = 1 / Clock phase = 1
|
Modifier and Type | Method | Description |
---|---|---|
static SPIClockMode |
getByValue(int value) |
Returns the
SPIMode associated to the provided value. |
int |
getValue() |
Returns the SPI mode value.
|
static SPIClockMode |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static SPIClockMode[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SPIClockMode CPOL_0_CPHA_0
public static final SPIClockMode CPOL_0_CPHA_1
public static final SPIClockMode CPOL_1_CPHA_0
public static final SPIClockMode CPOL_1_CPHA_1
public static SPIClockMode[] values()
for (SPIClockMode c : SPIClockMode.values()) System.out.println(c);
public static SPIClockMode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getValue()
public static SPIClockMode getByValue(int value)
SPIMode
associated to the provided value.value
- The value of the SPIMode
to retrieve.SPIMode
associated to the provided value or
null
if not found.