Reference   Language | Libraries | Comparison | Changes

I2S

begin()

Description

Initializes the I2S interface with the given parameters to enable communication.

Syntax

I2S.begin(mode, sampleRate, bitsPerSample); // master device
I2S.begin(mode, bitsPerSample); // slave device

Parameters

  • mode: one between I2S_PHILIPS_MODE, I2S_RIGHT_JUSTIFIED_MODE or I2S_LEFT_JUSTIFIED_MODE
  • sampleRate: the desired sample rate in Hz - long
  • bitsPerSample: the desired bits per sample (i.e 8, 16, 32)

Returns

1 if initialization is ok, 0 otherwise

See also

Reference Home Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

Share