AudioKit API using the audio_hal.
More...
#include <AudioKitHAL.h>
|
static void | actionHeadphoneDetection () |
| Switch off the PA if the headphone in plugged in and switch it on again if the headphone is unplugged.
|
|
|
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 |
|
board_driver | driver |
|
SPIClass * | p_spi = &AUDIOKIT_SD_SPI |
|
AudioKit API using the audio_hal.
Definition at line 240 of file AudioKitHAL.h.
◆ headphoneStatus()
bool audiokit::AudioKit::headphoneStatus |
( |
| ) |
|
|
inline |
Returns true if the headphone was detected.
- Returns
- true
-
false
Definition at line 605 of file AudioKitHAL.h.
607 int headphonePin =
config().
pins.detect_headphone;
608 return headphonePin > 0 ? !digitalRead(headphonePin) : false;
AudioKitConfig & config()
Provides the actual configuration.
audio_kit_pins pins
defines all relevant pins
◆ pinAdcDetect()
int8_t audiokit::AudioKit::pinAdcDetect |
( |
| ) |
|
|
inline |
Get the gpio number for adc detection.
- Returns
- -1 non-existent Others gpio number
Definition at line 471 of file AudioKitHAL.h.
471 {
return driver.get_adc_detect_gpio(); }
◆ pinAuxin()
int8_t audiokit::AudioKit::pinAuxin |
( |
| ) |
|
|
inline |
Get the gpio number for auxin detection.
- Returns
- -1 non-existent Others gpio number
Definition at line 447 of file AudioKitHAL.h.
447 {
return driver.get_auxin_detect_gpio(); }
◆ pinBlueLed()
int8_t audiokit::AudioKit::pinBlueLed |
( |
| ) |
|
|
inline |
Get blue led gpio number.
- Returns
- -1 non-existent Others gpio number
Definition at line 559 of file AudioKitHAL.h.
559 {
return driver.get_blue_led_gpio(); }
◆ pinEs7243Mclk()
int8_t audiokit::AudioKit::pinEs7243Mclk |
( |
| ) |
|
|
inline |
Get the mclk gpio number of es7243.
- Returns
- -1 non-existent Others gpio number
Definition at line 479 of file AudioKitHAL.h.
479 {
return driver.get_es7243_mclk_gpio(); }
◆ pinGreenLed()
int8_t audiokit::AudioKit::pinGreenLed |
( |
| ) |
|
|
inline |
Get gpio number for green led.
- Returns
- -1 non-existent Others gpio number
Definition at line 551 of file AudioKitHAL.h.
551 {
return driver.get_green_led_gpio(); }
◆ pinHeadphoneDetect()
int8_t audiokit::AudioKit::pinHeadphoneDetect |
( |
| ) |
|
|
inline |
Get the gpio number for headphone detection.
- Returns
- -1 non-existent Others gpio number
Definition at line 455 of file AudioKitHAL.h.
455 {
return driver.get_headphone_detect_gpio(); }
◆ pinInputMode()
int8_t audiokit::AudioKit::pinInputMode |
( |
| ) |
|
|
inline |
Get the number for mode-button.
- Returns
- -1 non-existent Others number
Definition at line 495 of file AudioKitHAL.h.
495 {
return driver.get_input_mode_id(); }
◆ pinInputPlay()
int8_t audiokit::AudioKit::pinInputPlay |
( |
| ) |
|
|
inline |
Get number for play function.
- Returns
- -1 non-existent Others number
Definition at line 511 of file AudioKitHAL.h.
511 {
return driver.get_input_play_id(); }
◆ pinInputRec()
int8_t audiokit::AudioKit::pinInputRec |
( |
| ) |
|
|
inline |
Get the record-button id for adc-button.
- Returns
- -1 non-existent Others button id
Definition at line 487 of file AudioKitHAL.h.
487 {
return driver.get_input_rec_id(); }
◆ pinInputSet()
int8_t audiokit::AudioKit::pinInputSet |
( |
| ) |
|
|
inline |
Get number for set function.
- Returns
- -1 non-existent Others number
Definition at line 503 of file AudioKitHAL.h.
503 {
return driver.get_input_set_id(); };
◆ pinPaEnable()
int8_t audiokit::AudioKit::pinPaEnable |
( |
| ) |
|
|
inline |
Get the gpio number for PA enable.
- Returns
- -1 non-existent Others gpio number
Definition at line 463 of file AudioKitHAL.h.
463 {
return driver.get_pa_enable_gpio(); }
◆ pinResetBoard()
int8_t audiokit::AudioKit::pinResetBoard |
( |
| ) |
|
|
inline |
Get gpio number to reset the board.
- Returns
- -1 non-existent Others gpio number
Definition at line 543 of file AudioKitHAL.h.
543 {
return driver.get_reset_board_gpio(); }
◆ pinResetCodec()
int8_t audiokit::AudioKit::pinResetCodec |
( |
| ) |
|
|
inline |
Get reset codec gpio number.
- Returns
- -1 non-existent Others gpio number
Definition at line 535 of file AudioKitHAL.h.
535 {
return driver.get_reset_codec_gpio(); }
◆ pinVolumeDown()
int8_t audiokit::AudioKit::pinVolumeDown |
( |
| ) |
|
|
inline |
Get number for volume down function.
- Returns
- -1 non-existent Others number
Definition at line 527 of file AudioKitHAL.h.
527 {
return driver.get_input_voldown_id(); }
◆ pinVolumeUp()
int8_t audiokit::AudioKit::pinVolumeUp |
( |
| ) |
|
|
inline |
number for volume up function
- Returns
- -1 non-existent Others number
Definition at line 519 of file AudioKitHAL.h.
519 {
return driver.get_input_volup_id(); }
◆ setSpeakerActive()
void audiokit::AudioKit::setSpeakerActive |
( |
bool |
active | ) |
|
|
inline |
Activates/deactivates the speaker amplifier output This is working only if the driver is supporting the functionality.
- Parameters
-
Definition at line 566 of file AudioKitHAL.h.
568 int paPin = driver.get_pa_enable_gpio();
570 digitalWrite(paPin, active);
572 KIT_LOGW(
"setSpeakerActive not supported");
The documentation for this class was generated from the following file: