diff options
| author | MikeTeachman <mike.teachman@gmail.com> | 2021-11-29 09:50:34 -0800 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-03-30 14:12:40 +1100 |
| commit | 1f6cb8f0476e699c1910ed59f1bb027fbef72ad7 (patch) | |
| tree | 0c8513ca9b0ab56b35fe2e1f23bf4811abe627b9 /docs/library | |
| parent | 5e685a9c6faeb764c0b689bc736ed00736bfd6b6 (diff) | |
mixmrt/machine_i2s: Add I2S protocol support.
This commit adds support for machine.I2S on the mimxrt port. The I2S API
is consistent with the existing stm32, esp32, and rp2 implementations.
I2S features:
- controller transmit and controller receive
- 16-bit and 32-bit sample sizes
- mono and stereo formats
- sampling frequencies from 8kHz to 48kHz
- 3 modes of operation:
- blocking
- non-blocking with callback
- uasyncio
- configurable internal buffer
- optional MCK
Tested with the following development boards:
- MIMXRT1010_EVK, MIMXRT1015_EVK, MIMXRT1020_EVK, MIMXRT1050_EVK
- Teensy 4.0, Teensy 4.1
- Olimex RT1010
- Seeed ARCH MIX
Tested with the following I2S hardware peripherals:
- UDA1334
- GY-SPH0645LM4H
- WM8960 codec on board the MIMXRT boards and separate breakout board
- INMP441
- PCM5102
- SGTL5000 on the Teensy audio shield
Signed-off-by: Mike Teachman <mike.teachman@gmail.com>
Diffstat (limited to 'docs/library')
| -rw-r--r-- | docs/library/machine.I2S.rst | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/docs/library/machine.I2S.rst b/docs/library/machine.I2S.rst index d4e5ac943..e68a863d7 100644 --- a/docs/library/machine.I2S.rst +++ b/docs/library/machine.I2S.rst @@ -75,23 +75,19 @@ uasyncio:: Constructor ----------- -.. class:: I2S(id, *, sck, ws, sd, mode, bits, format, rate, ibuf) +.. class:: I2S(id, *, sck, ws, sd, mck=None, mode, bits, format, rate, ibuf) Construct an I2S object of the given id: - - ``id`` identifies a particular I2S bus. - - ``id`` is board and port specific: - - - PYBv1.0/v1.1: has one I2S bus with id=2. - - PYBD-SFxW: has two I2S buses with id=1 and id=2. - - ESP32: has two I2S buses with id=0 and id=1. + - ``id`` identifies a particular I2S bus; it is board and port specific Keyword-only parameters that are supported on all ports: - ``sck`` is a pin object for the serial clock line - ``ws`` is a pin object for the word select line - ``sd`` is a pin object for the serial data line + - ``mck`` is a pin object for the master clock line; + master clock frequency is sampling rate * 256 - ``mode`` specifies receive or transmit - ``bits`` specifies sample size (bits), 16 or 32 - ``format`` specifies channel format, STEREO or MONO |
