Hi there!

I've been diving through the audio lib source code, audio shield schematics, and the sgtl5000 datasheet to try and piece together how the whole embedded system works together, sort of as an exercise.

My question: MCLK, BCLK, LRCLK, TX, RX and ADDR are pins on the sgtl5000 connected to pins 11,9,23,22,13 and 15 respectively on the teensy 3.6 through the audio shield. Where in the code are these teensy pins configured to be inputs, outputs or to generate clock signals, etc. I was unable to find any occurrences of the pins 11,9,23,22,13 and 15 at all in the audio library source.

I looked through control_sgtl5000.cpp where I thought I would find my answers but that all seemed like sgtl5000 configuration using the I2C channel on and nothing about the specific pins on the teensy being configured to do things like generate MCLK, BCLK , etc that the sgtl5000 needs in order to operate. I attached the audio shield schematic for reference.

On a related note: different teensy boards and different version of the audio shield have different pinouts and yet all use the same audio library that seamlessly talk the the sgtl5000. How is this possible and where in the code are these board distinctions handled?

I hope all this makes sense and thanks for helping! I'm just getting into embedded systems and I've been having so much fun getting closer and closer to where hardware meets software.

Click image for larger version. 

Name:	Screen Shot 2020-03-27 at 8.34.08 PM.jpg 
Views:	8 
Size:	94.7 KB 
ID:	19517