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. | |
bool | begin (AudioKitConfig cnfg) |
Starts the codec. | |
bool | end () |
Stops the CODEC. | |
AudioKitConfig | config () |
Provides the actual configuration. | |
bool | setActive (bool active) |
Sets the codec active / inactive. | |
bool | setMute (bool mute) |
Mutes the output. | |
bool | setVolume (int vol) |
Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100. | |
int | volume () |
Determines the volume %. | |
bool | setSampleRate (audio_hal_iface_samples_t sample_rate) |
Just update the sample rate. | |
int8_t | pinAuxin () |
Get the gpio number for auxin detection. | |
int8_t | pinHeadphoneDetect () |
Get the gpio number for headphone detection. | |
int8_t | pinPaEnable () |
Get the gpio number for PA enable. | |
int8_t | pinAdcDetect () |
Get the gpio number for adc detection. | |
int8_t | pinEs7243Mclk () |
Get the mclk gpio number of es7243. | |
int8_t | pinInputRec () |
Get the record-button id for adc-button. | |
int8_t | pinInputMode () |
Get the number for mode-button. | |
int8_t | pinInputSet () |
Get number for set function. | |
int8_t | pinInputPlay () |
Get number for play function. | |
int8_t | pinVolumeUp () |
number for volume up function | |
int8_t | pinVolumeDown () |
Get number for volume down function. | |
int8_t | pinResetCodec () |
Get reset codec gpio number. | |
int8_t | pinResetBoard () |
Get gpio number to reset the board. | |
int8_t | pinGreenLed () |
Get gpio number for green led. | |
int8_t | pinBlueLed () |
Get blue led gpio number. | |
int8_t | pinSpiCs () |
SPI CS Pin for SD Drive. | |
void | setSpeakerActive (bool active) |
Activates/deactivates the speaker amplifier output This is working only if the driver is supporting the functionality. | |
bool | headphoneStatus () |
Returns true if the headphone was detected. | |
bool | isSDActive () |
checks if the SD is active | |
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. | |
Protected Member Functions | |
void | setupHeadphoneDetection () |
Setup the headphone detection. | |
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 216 of file AudioKitHAL.h.
|
inline |
Definition at line 219 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 582 of file AudioKitHAL.h.
|
inline |
Starts the codec.
Definition at line 246 of file AudioKitHAL.h.
|
inline |
|
inline |
Provides the default configuration for input or output.
Definition at line 229 of file AudioKitHAL.h.
|
inline |
Stops the CODEC.
Definition at line 331 of file AudioKitHAL.h.
|
inline |
Returns true if the headphone was detected.
Definition at line 606 of file AudioKitHAL.h.
|
inline |
checks if the SD is active
Definition at line 611 of file AudioKitHAL.h.
|
inline |
Get the gpio number for adc detection.
Definition at line 464 of file AudioKitHAL.h.
|
inline |
Get the gpio number for auxin detection.
Definition at line 440 of file AudioKitHAL.h.
|
inline |
Get blue led gpio number.
Definition at line 552 of file AudioKitHAL.h.
|
inline |
Get the mclk gpio number of es7243.
Definition at line 472 of file AudioKitHAL.h.
|
inline |
Get gpio number for green led.
Definition at line 544 of file AudioKitHAL.h.
|
inline |
Get the gpio number for headphone detection.
Definition at line 448 of file AudioKitHAL.h.
|
inline |
Get the number for mode-button.
Definition at line 488 of file AudioKitHAL.h.
|
inline |
Get number for play function.
Definition at line 504 of file AudioKitHAL.h.
|
inline |
Get the record-button id for adc-button.
Definition at line 480 of file AudioKitHAL.h.
|
inline |
Get number for set function.
Definition at line 496 of file AudioKitHAL.h.
|
inline |
Get the gpio number for PA enable.
Definition at line 456 of file AudioKitHAL.h.
|
inline |
Get gpio number to reset the board.
Definition at line 536 of file AudioKitHAL.h.
|
inline |
Get reset codec gpio number.
Definition at line 528 of file AudioKitHAL.h.
|
inline |
SPI CS Pin for SD Drive.
Definition at line 559 of file AudioKitHAL.h.
|
inline |
Get number for volume down function.
Definition at line 520 of file AudioKitHAL.h.
|
inline |
number for volume up function
Definition at line 512 of file AudioKitHAL.h.
|
inline |
Sets the codec active / inactive.
Definition at line 354 of file AudioKitHAL.h.
|
inline |
Mutes the output.
Definition at line 359 of file AudioKitHAL.h.
|
inline |
Just update the sample rate.
Definition at line 407 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 568 of file AudioKitHAL.h.
|
inlineprotected |
Setup the headphone detection.
Definition at line 631 of file AudioKitHAL.h.
|
inline |
Defines the Volume (in %) if volume is 0, mute is enabled,range is 0-100.
Definition at line 364 of file AudioKitHAL.h.
|
inline |
Determines the volume %.
Definition at line 369 of file AudioKitHAL.h.
|
protected |
Definition at line 618 of file AudioKitHAL.h.
|
protected |
Definition at line 617 of file AudioKitHAL.h.
|
protected |
Definition at line 619 of file AudioKitHAL.h.
|
protected |
Definition at line 622 of file AudioKitHAL.h.
|
protected |
Definition at line 624 of file AudioKitHAL.h.
|
protected |
Definition at line 620 of file AudioKitHAL.h.
|
protected |
Definition at line 616 of file AudioKitHAL.h.
|
protected |
Definition at line 623 of file AudioKitHAL.h.
|
protected |
Definition at line 621 of file AudioKitHAL.h.