O'Reilly logo

ARM® Cortex® M4 Cookbook by Dr. Mark Fisher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing a driver for the audio codec

The audio codec is a peripheral that enables an analog signal to be converted and coded to a digital data stream or conversely the data stream to be decoded and converted back to an analog signal (https://en.wikipedia.org/wiki/Codec). The MCBSTM32F400 evaluation board uses a CS42L52 device that is manufactured by Cirrus Logic (http://www.cirrus.com/en/products/). As, this codec is not yet included in Board Support, and as no CMSIS-compliant device driver is available, we are faced with the task of having to write our own driver.

However, this is not as daunting as it first appears because the code to set up and manage data transfer across the I2C bus can be lifted from the previous recipe (the Touch_STMPE811.c ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required