Arduino AudioKit HAL
|
AudioKit API using the audio_hal. More...
#include <AudioKitHAL.h>
Public Member Functions | |
AudioKitConfig | defaultConfig (AudioKitInOut inout=AudioInputOutput) |
Provides the default configuration for input or output. More... | |
bool | begin (AudioKitConfig cnfg) |
Starts the codec. More... | |
bool | end () |
Stops the CODEC. More... | |
AudioKitConfig | config () |
Provides the actual configuration. More... | |
bool | setActive (bool active) |
Sets the codec active / inactive. More... | |
bool | setMute (bool mute) |
Mutes the output. More... | |
bool | setVolume (int vol) |
Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100. More... | |
int | volume () |
Determines the volume %. More... | |
bool | setSampleRate (audio_hal_iface_samples_t sample_rate) |
Just update the sample rate. More... | |
int8_t | pinAuxin () |
Get the gpio number for auxin detection. More... | |
int8_t | pinHeadphoneDetect () |
Get the gpio number for headphone detection. More... | |
int8_t | pinPaEnable () |
Get the gpio number for PA enable. More... | |
int8_t | pinAdcDetect () |
Get the gpio number for adc detection. More... | |
int8_t | pinEs7243Mclk () |
Get the mclk gpio number of es7243. More... | |
int8_t | pinInputRec () |
Get the record-button id for adc-button. More... | |
int8_t | pinInputMode () |
Get the number for mode-button. More... | |
int8_t | pinInputSet () |
Get number for set function. More... | |
int8_t | pinInputPlay () |
Get number for play function. More... | |
int8_t | pinVolumeUp () |
number for volume up function More... | |
int8_t | pinVolumeDown () |
Get number for volume down function. More... | |
int8_t | pinResetCodec () |
Get reset codec gpio number. More... | |
int8_t | pinResetBoard () |
Get gpio number to reset the board. More... | |
int8_t | pinGreenLed () |
Get gpio number for green led. More... | |
int8_t | pinBlueLed () |
Get blue led gpio number. More... | |
int8_t | pinSpiCs () |
SPI CS Pin for SD Drive. More... | |
void | setSpeakerActive (bool active) |
Activates/deactivates the speaker amplifier output This is working only if the driver is supporting the functionality. More... | |
bool | headphoneStatus () |
Returns true if the headphone was detected. More... | |
bool | isSDActive () |
checks if the SD is active More... | |
Static Public Member Functions | |
static void | actionHeadphoneDetection () |
Switch off the PA if the headphone in plugged in and switch it on again if the headphone is unplugged. More... | |
Protected Member Functions | |
void | setupHeadphoneDetection () |
Setup the headphone detection. More... | |
Protected Attributes | |
bool | is_active = false |
AudioKitConfig | cfg |
audio_hal_codec_config_t | audio_hal_conf |
audio_hal_handle_t | hal_handle = 0 |
audio_hal_codec_i2s_iface_t | iface |
int8_t | spi_cs_pin |
bool | headphoneIsConnected = false |
unsigned long | speakerChangeTimeout = 0 |
int8_t | headphonePin = -1 |
AudioKit API using the audio_hal.
Definition at line 203 of file AudioKitHAL.h.
|
inline |
Definition at line 206 of file AudioKitHAL.h.
|
inlinestatic |
Switch off the PA if the headphone in plugged in and switch it on again if the headphone is unplugged.
Definition at line 554 of file AudioKitHAL.h.
|
inline |
Starts the codec.
Definition at line 233 of file AudioKitHAL.h.
|
inline |
|
inline |
Provides the default configuration for input or output.
Definition at line 216 of file AudioKitHAL.h.
|
inline |
Stops the CODEC.
Definition at line 307 of file AudioKitHAL.h.
|
inline |
Returns true if the headphone was detected.
Definition at line 578 of file AudioKitHAL.h.
|
inline |
checks if the SD is active
Definition at line 583 of file AudioKitHAL.h.
|
inline |
Get the gpio number for adc detection.
Definition at line 436 of file AudioKitHAL.h.
|
inline |
Get the gpio number for auxin detection.
Definition at line 412 of file AudioKitHAL.h.
|
inline |
Get blue led gpio number.
Definition at line 524 of file AudioKitHAL.h.
|
inline |
Get the mclk gpio number of es7243.
Definition at line 444 of file AudioKitHAL.h.
|
inline |
Get gpio number for green led.
Definition at line 516 of file AudioKitHAL.h.
|
inline |
Get the gpio number for headphone detection.
Definition at line 420 of file AudioKitHAL.h.
|
inline |
Get the number for mode-button.
Definition at line 460 of file AudioKitHAL.h.
|
inline |
Get number for play function.
Definition at line 476 of file AudioKitHAL.h.
|
inline |
Get the record-button id for adc-button.
Definition at line 452 of file AudioKitHAL.h.
|
inline |
Get number for set function.
Definition at line 468 of file AudioKitHAL.h.
|
inline |
Get the gpio number for PA enable.
Definition at line 428 of file AudioKitHAL.h.
|
inline |
Get gpio number to reset the board.
Definition at line 508 of file AudioKitHAL.h.
|
inline |
Get reset codec gpio number.
Definition at line 500 of file AudioKitHAL.h.
|
inline |
SPI CS Pin for SD Drive.
Definition at line 531 of file AudioKitHAL.h.
|
inline |
Get number for volume down function.
Definition at line 492 of file AudioKitHAL.h.
|
inline |
number for volume up function
Definition at line 484 of file AudioKitHAL.h.
|
inline |
Sets the codec active / inactive.
Definition at line 328 of file AudioKitHAL.h.
|
inline |
Mutes the output.
Definition at line 333 of file AudioKitHAL.h.
|
inline |
Just update the sample rate.
Definition at line 381 of file AudioKitHAL.h.
|
inline |
Activates/deactivates the speaker amplifier output This is working only if the driver is supporting the functionality.
active |
Definition at line 540 of file AudioKitHAL.h.
|
inlineprotected |
Setup the headphone detection.
Definition at line 603 of file AudioKitHAL.h.
|
inline |
Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100.
Definition at line 338 of file AudioKitHAL.h.
|
inline |
Determines the volume %.
Definition at line 343 of file AudioKitHAL.h.
|
protected |
Definition at line 590 of file AudioKitHAL.h.
|
protected |
Definition at line 589 of file AudioKitHAL.h.
|
protected |
Definition at line 591 of file AudioKitHAL.h.
|
protected |
Definition at line 594 of file AudioKitHAL.h.
|
protected |
Definition at line 596 of file AudioKitHAL.h.
|
protected |
Definition at line 592 of file AudioKitHAL.h.
|
protected |
Definition at line 588 of file AudioKitHAL.h.
|
protected |
Definition at line 595 of file AudioKitHAL.h.
|
protected |
Definition at line 593 of file AudioKitHAL.h.