@@ -20,27 +20,27 @@
|
||||
|
||||
#ifndef _AUDIO_DRIVER_H_
|
||||
#define _AUDIO_DRIVER_H_
|
||||
|
||||
void audioInit( void ) ;
|
||||
void audioEnd( void ) ;
|
||||
|
||||
void setSampleRate( uint32_t frequency ) ;
|
||||
|
||||
inline void dacStart()
|
||||
{
|
||||
PMC->PMC_PCER0 |= 0x40000000L ; // Enable peripheral clock to DAC
|
||||
DACC->DACC_IER = DACC_IER_ENDTX ;
|
||||
}
|
||||
|
||||
inline void dacStop()
|
||||
{
|
||||
DACC->DACC_IDR = DACC_IDR_ENDTX ; // Disable interrupt
|
||||
}
|
||||
|
||||
#define VOLUME_LEVEL_MAX 23
|
||||
#define VOLUME_LEVEL_DEF 12
|
||||
extern const int8_t volumeScale[];
|
||||
|
||||
void setVolume(uint8_t volume);
|
||||
|
||||
|
||||
void audioInit( void ) ;
|
||||
void audioEnd( void ) ;
|
||||
|
||||
void setSampleRate( uint32_t frequency ) ;
|
||||
|
||||
inline void dacStart()
|
||||
{
|
||||
PMC->PMC_PCER0 |= 0x40000000L ; // Enable peripheral clock to DAC
|
||||
DACC->DACC_IER = DACC_IER_ENDTX ;
|
||||
}
|
||||
|
||||
inline void dacStop()
|
||||
{
|
||||
DACC->DACC_IDR = DACC_IDR_ENDTX ; // Disable interrupt
|
||||
}
|
||||
|
||||
#define VOLUME_LEVEL_MAX 23
|
||||
#define VOLUME_LEVEL_DEF 12
|
||||
extern const int8_t volumeScale[];
|
||||
|
||||
void setScaledVolume(uint8_t volume);
|
||||
|
||||
#endif // _AUDIO_DRIVER_H_
|
||||
|
||||
Reference in New Issue
Block a user