![]() |
Core2 for AWS IoT EduKit BSP 1.5.1
|
Functions for the on-board 1W-0928 speaker using the NS4168 power amplifier. More...
#include "stdint.h"Go to the source code of this file.
Functions | |
| esp_err_t | Speaker_Init () |
| Initializes the speaker over I2S. The I2S bus is initialized for output with a sample rate of 44100Hz, with a 16-bit depth, and right channel audio. Other configurations requires using the ESP-IDF I2S driver directly. More... | |
| esp_err_t | Speaker_WriteBuff (uint8_t *buff, uint32_t len, uint32_t timeout) |
| Plays buffer through the speaker. More... | |
| esp_err_t | Speaker_Deinit () |
| De-initializes the speaker. More... | |
Functions for the on-board 1W-0928 speaker using the NS4168 power amplifier.
| esp_err_t Speaker_Init | ( | ) |
Initializes the speaker over I2S. The I2S bus is initialized for output with a sample rate of 44100Hz, with a 16-bit depth, and right channel audio. Other configurations requires using the ESP-IDF I2S driver directly.
ESP_OK if successful. | esp_err_t Speaker_WriteBuff | ( | uint8_t * | buff, |
| uint32_t | len, | ||
| uint32_t | timeout | ||
| ) |
Plays buffer through the speaker.
Example:
Play a sound buffer. The audio clip is too short to be recognized and is just to serve as an example.
| [out] | buff | The sound buffer to play. |
| [in] | len | Length of the buffer. |
| [in] | timeout | UNUSED. |
ESP_OK if successful. | esp_err_t Speaker_Deinit | ( | ) |
De-initializes the speaker.
ESP_OK if successful.