modeMask Constant

Top  Previous  Next

Gets the constant used to mask the config property to the bits that effect SPI mode.

Syntax

Cell.SPI.modeMask

Value

A bit mask used to extract the SPI mode from the config property.

Remarks

The SPI mode is a bit field in the config property. This constant can be used with logical operators to extract the SPI mode field, or to mask it out.

Examples

// Change the SPI mode without affecting other settings

oldConfig = Cell.SPI.config & ~Cell.SPI.modeMask;

Cell.SPI.config = oldConfig | Cell.SPI.mode2;

See Also

config Property