Arduino AudioKit HAL
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AudioKit Class Reference

AudioKit API using the audio_hal. More...

#include <AudioKit.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.
 
int volume ()
 Determines the volume.
 
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 green led gpio number. More...
 
int8_t pinResetBoard ()
 Get DSP reset gpio number. More...
 
int8_t pinGreenLed ()
 Get DSP reset gpio number. More...
 
int8_t pinBlueLed ()
 Get green led gpio number. More...
 
int8_t pinSpiCs ()
 SPI CS Pin for SD Drive. More...
 

Protected Member Functions

void setupSPI ()
 Setup the SPI so that we can access the SD Drive.
 

Protected Attributes

AudioKitConfig cfg
 
audio_hal_codec_config_t audio_hal_conf
 
audio_hal_handle_t hal_handle
 
audio_hal_codec_i2s_iface_t iface
 
int8_t spi_cs_pin
 

Detailed Description

AudioKit API using the audio_hal.

Definition at line 192 of file AudioKit.h.

Member Function Documentation

◆ pinAdcDetect()

int8_t AudioKit::pinAdcDetect ( )
inline

Get the gpio number for adc detection.

Returns
-1 non-existent Others gpio number

Definition at line 369 of file AudioKit.h.

369 { 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 345 of file AudioKit.h.

345 { 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 457 of file AudioKit.h.

457 { 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 377 of file AudioKit.h.

377 { 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 449 of file AudioKit.h.

449 { 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 353 of file AudioKit.h.

353 { 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 393 of file AudioKit.h.

393 { 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 409 of file AudioKit.h.

409 { 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 385 of file AudioKit.h.

385 { 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 401 of file AudioKit.h.

401 { 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 361 of file AudioKit.h.

361 { 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 441 of file AudioKit.h.

441 { 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 433 of file AudioKit.h.

433 { return get_reset_codec_gpio(); }

◆ pinSpiCs()

int8_t AudioKit::pinSpiCs ( )
inline

SPI CS Pin for SD Drive.

Returns
int8_t

Definition at line 464 of file AudioKit.h.

464  {
465  return spi_cs_pin;
466  }

◆ pinVolumeDown()

int8_t AudioKit::pinVolumeDown ( )
inline

Get number for volume down function.

Returns
-1 non-existent Others number

Definition at line 425 of file AudioKit.h.

425 { 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 417 of file AudioKit.h.

417 { return get_input_volup_id(); }

The documentation for this class was generated from the following file: