PaulStoffregen / Audio

Teensy Audio Library
http://www.pjrc.com/teensy/td_libs_Audio.html
1.07k stars 398 forks source link

SGTL5000 control: support for multiple I²C busses #439

Open h4yn0nnym0u5e opened 2 years ago

h4yn0nnym0u5e commented 2 years ago

This PR adds a setWire() function to the AudioControlSGTL5000 class, allowing any available I²C bus to be selected to control an SGTL5000 audio shield. Either a reference to an existing TwoWire object or integer index based selection is supported; if the latter is used, then 0-3 map to Wire, Wire1, Wire2 and Wire3.

The GUI design tool documentation and keywords.txt have also been updated.

MartijnBraam commented 6 months ago

This patch works great for me. It's needed now only the 20-pin version of the SGTL5000 is in stock since that one can't change its i2c address.