Table of Contents

Class Spi

Namespace
Pamoja.Gpio
Assembly
Pamoja.Gpio.dll

The four SPI clock modes, as the (CPOL, CPHA) pair datasheets quote.

public static class Spi
Inheritance
Spi
Inherited Members

Methods

ClockFor(byte)

Returns the clock polarity and phase a mode number names.

public static SpiClock ClockFor(byte mode)

Parameters

mode byte

The mode number, 0 to 3.

Returns

SpiClock

The pair.

Exceptions

PamojaException

The mode number is above 3.

ModeFor(bool, bool)

Returns the mode number a clock polarity and phase name.

public static byte ModeFor(bool cpol, bool cpha)

Parameters

cpol bool

Whether the clock idles high.

cpha bool

Whether data is sampled on the trailing edge.

Returns

byte

The mode number, 0 to 3. Every pair names a mode, so this never fails.