pamoja for TypeScript - v0.1.17
    Preparing search index...

    Variable spiConst

    spi: {
        clockFor(mode: number): SpiClock;
        modeFor(cpol: boolean, cpha: boolean): number;
    } = ...

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

    Type Declaration

    • clockFor: function
      • Returns the clock polarity and phase a mode number names.

        Parameters

        • mode: number

          The mode number, 0 to 3.

        Returns SpiClock

        The pair.

        If the mode number is above 3.

    • modeFor: function
      • Returns the mode number a clock polarity and phase name.

        Parameters

        • cpol: boolean

          Whether the clock idles high.

        • cpha: boolean

          Whether data is sampled on the trailing edge.

        Returns number

        The mode number, 0 to 3. Every pair names a mode.