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.
|
|
|
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 194 of file AudioKitHAL.h.
◆ headphoneStatus()
bool AudioKit::headphoneStatus |
( |
| ) |
|
|
inline |
Returns true if the headphone was detected.
- Returns
- true
-
false
Definition at line 528 of file AudioKitHAL.h.
529 return headphonePin>0 ? !digitalRead(headphonePin) : false;
◆ pinAdcDetect()
int8_t AudioKit::pinAdcDetect |
( |
| ) |
|
|
inline |
Get the gpio number for adc detection.
- Returns
- -1 non-existent Others gpio number
Definition at line 379 of file AudioKitHAL.h.
379 {
return get_adc_detect_gpio(); }
◆ pinAuxin()
int8_t AudioKit::pinAuxin |
( |
| ) |
|
|
inline |
Get the gpio number for auxin detection.
- Returns
- -1 non-existent Others gpio number
Definition at line 355 of file AudioKitHAL.h.
355 {
return get_auxin_detect_gpio(); }
◆ pinBlueLed()
int8_t AudioKit::pinBlueLed |
( |
| ) |
|
|
inline |
Get green led gpio number.
- Returns
- -1 non-existent Others gpio number
Definition at line 467 of file AudioKitHAL.h.
467 {
return get_blue_led_gpio(); }
◆ pinEs7243Mclk()
int8_t AudioKit::pinEs7243Mclk |
( |
| ) |
|
|
inline |
Get the mclk gpio number of es7243.
- Returns
- -1 non-existent Others gpio number
Definition at line 387 of file AudioKitHAL.h.
387 {
return get_es7243_mclk_gpio(); }
◆ pinGreenLed()
int8_t AudioKit::pinGreenLed |
( |
| ) |
|
|
inline |
Get DSP reset gpio number.
- Returns
- -1 non-existent Others gpio number
Definition at line 459 of file AudioKitHAL.h.
459 {
return get_green_led_gpio(); }
◆ pinHeadphoneDetect()
int8_t AudioKit::pinHeadphoneDetect |
( |
| ) |
|
|
inline |
Get the gpio number for headphone detection.
- Returns
- -1 non-existent Others gpio number
Definition at line 363 of file AudioKitHAL.h.
363 {
return get_headphone_detect_gpio(); }
◆ pinInputMode()
int8_t AudioKit::pinInputMode |
( |
| ) |
|
|
inline |
Get the number for mode-button.
- Returns
- -1 non-existent Others number
Definition at line 403 of file AudioKitHAL.h.
403 {
return get_input_mode_id(); }
◆ pinInputPlay()
int8_t AudioKit::pinInputPlay |
( |
| ) |
|
|
inline |
Get number for play function.
- Returns
- -1 non-existent Others number
Definition at line 419 of file AudioKitHAL.h.
419 {
return get_input_play_id(); }
◆ pinInputRec()
int8_t AudioKit::pinInputRec |
( |
| ) |
|
|
inline |
Get the record-button id for adc-button.
- Returns
- -1 non-existent Others button id
Definition at line 395 of file AudioKitHAL.h.
395 {
return get_input_rec_id(); }
◆ pinInputSet()
int8_t AudioKit::pinInputSet |
( |
| ) |
|
|
inline |
Get number for set function.
- Returns
- -1 non-existent Others number
Definition at line 411 of file AudioKitHAL.h.
411 {
return get_input_set_id(); };
◆ pinPaEnable()
int8_t AudioKit::pinPaEnable |
( |
| ) |
|
|
inline |
Get the gpio number for PA enable.
- Returns
- -1 non-existent Others gpio number
Definition at line 371 of file AudioKitHAL.h.
371 {
return get_pa_enable_gpio(); }
◆ pinResetBoard()
int8_t AudioKit::pinResetBoard |
( |
| ) |
|
|
inline |
Get DSP reset gpio number.
- Returns
- -1 non-existent Others gpio number
Definition at line 451 of file AudioKitHAL.h.
451 {
return get_reset_board_gpio(); }
◆ pinResetCodec()
int8_t AudioKit::pinResetCodec |
( |
| ) |
|
|
inline |
Get green led gpio number.
- Returns
- -1 non-existent Others gpio number
Definition at line 443 of file AudioKitHAL.h.
443 {
return get_reset_codec_gpio(); }
◆ pinSpiCs()
int8_t AudioKit::pinSpiCs |
( |
| ) |
|
|
inline |
SPI CS Pin for SD Drive.
- Returns
- int8_t
Definition at line 474 of file AudioKitHAL.h.
◆ pinVolumeDown()
int8_t AudioKit::pinVolumeDown |
( |
| ) |
|
|
inline |
Get number for volume down function.
- Returns
- -1 non-existent Others number
Definition at line 435 of file AudioKitHAL.h.
435 {
return get_input_voldown_id(); }
◆ pinVolumeUp()
int8_t AudioKit::pinVolumeUp |
( |
| ) |
|
|
inline |
number for volume up function
- Returns
- -1 non-existent Others number
Definition at line 427 of file AudioKitHAL.h.
427 {
return get_input_volup_id(); }
◆ setSpeakerActive()
void 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 483 of file AudioKitHAL.h.
484 int paPin = get_pa_enable_gpio();
486 digitalWrite(paPin, active);
488 KIT_LOGW(
"setSpeakerActive not supported");
The documentation for this class was generated from the following file: