amedes / esp_a2dp_sink_spdif

S/PDIF driver for ESP32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESP32 S/PDIF driver

This is the S/PDIF driver for ESP32.

The driver files are follows.

  • spdif.h
  • spdif.c

The three APIs are provided.

  • void spdif_init(int rate)
  • void spdif_write(const void *src, size_t size)
  • void spdif_set_sample_rates(int rate)

Example

The driver project includes modified version of a2dp_sink example to use the S/PDIF driver.

Hardware Required

The S/PDIF toslink transmitter is needed. The default data output pin is GPIO27. You can change the pin to use "idf.py menuconfig". circuit board

Configure the project

idf.py menuconfig

Build and Flash

idf.py -p PORT flash monitor

(To exit the serial monitor, type Ctrl-].)

About

S/PDIF driver for ESP32


Languages

Language:C 98.0%Language:CMake 1.1%Language:Makefile 0.9%