# SPI Constants

This page aggregates all SPI-related constants used by functions and methods from the C and C++ APIs.

group SPI-related constants

  Enums

  enum SpiBitOrder

    This enum represents the SPI bit transmission order.

    Values:

    enumerator SPI_BIT_ORDER_MSB

      Most Significant Bit first

    enumerator SPI_BIT_ORDER_LSB

      Least Significant Bit first

  enum SpiMode

    This enum represents the SPI clock polarity and phase modes.

    Values:

    enumerator SPI_MODE_0

      CPOL = 0, CPHA = 0

    enumerator SPI_MODE_1

      CPOL = 0, CPHA = 1

    enumerator SPI_MODE_2

      CPOL = 1, CPHA = 0

    enumerator SPI_MODE_3

      CPOL = 1, CPHA = 1

  enum SpiDataWidth

    This enum represents the SPI data word size.

    Values:

    enumerator SPI_DATA_WIDTH_8_BITS

      8-bit data width

    enumerator SPI_DATA_WIDTH_16_BITS

      16-bit data width

  enum SpiChipSelect

    This enum represents the available SPI chip select lines.

    Values:

    enumerator SPI_CHIP_SELECT_0

      Chip select line 0

    enumerator SPI_CHIP_SELECT_1

      Chip select line 1

    enumerator SPI_CHIP_SELECT_2

      Chip select line 2

    enumerator SPI_CHIP_SELECT_3

      Chip select line 3

  enum SpiChipSelectPolarity

    This enum represents the SPI chip select active polarity.

    Values:

    enumerator SPI_CS_ACTIVE_LOW

      Chip select is active low

    enumerator SPI_CS_ACTIVE_HIGH

      Chip select is active high