From a56e4ac7dcbf2776690c96656dbcb48b2cf2d818 Mon Sep 17 00:00:00 2001 From: inmarket Date: Thu, 27 Feb 2014 08:04:54 +1000 Subject: First GAUDOUT work. Still incomplete but compiling. Also moved drivers/gaudin to drivers/audio as most audio codecs support input and output in a single device. --- src/gaudin/driver.h | 4 ++-- src/gaudin/gaudin.c | 8 ++++---- src/gaudin/sys_defs.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gaudin') diff --git a/src/gaudin/driver.h b/src/gaudin/driver.h index bd04858a..b534e2a5 100644 --- a/src/gaudin/driver.h +++ b/src/gaudin/driver.h @@ -83,14 +83,14 @@ void gaudin_lld_init(const gaudin_params *paud); * * @api */ -void gadc_lld_start(void); +void gaudin_lld_start(void); /** * @brief Stop the audio input sampling * * @api */ -void gadc_lld_stop(void); +void gaudin_lld_stop(void); #ifdef __cplusplus } diff --git a/src/gaudin/gaudin.c b/src/gaudin/gaudin.c index c9ed1c7f..2e3507ef 100644 --- a/src/gaudin/gaudin.c +++ b/src/gaudin/gaudin.c @@ -40,7 +40,7 @@ static uint16_t audFlags; while ((psl = geventGetSourceListener((GSourceHandle)(&aud), psl))) { if (!(pe = (GEventAudioIn *)geventGetEventBuffer(psl))) { // This listener is missing - save this. - psl->srcflags |= GADC_AUDIO_IN_LOSTEVENT; + psl->srcflags |= GAUDIN_LOSTEVENT; continue; } @@ -107,7 +107,7 @@ bool_t gaudinInit(uint16_t channel, uint32_t frequency, audin_sample_t *buffer, /* Stop any existing transfers */ if ((audFlags & AUDFLG_RUNNING)) - gadc_lld_stop(); + gaudin_lld_stop(); audFlags = 0; /* Initialise everything */ @@ -143,13 +143,13 @@ void gaudinSetBSem(gfxSem *pbsem, GEventAudioIn *pEvent) { void gaudinStart(void) { if (!(audFlags & AUDFLG_RUNNING)) { audFlags |= AUDFLG_RUNNING; - gadc_lld_start(); + gaudin_lld_start(); } } void gaudinStop(void) { if ((audFlags & AUDFLG_RUNNING)) { - gadc_lld_stop(); + gaudin_lld_stop(); audFlags &= ~AUDFLG_RUNNING; } } diff --git a/src/gaudin/sys_defs.h b/src/gaudin/sys_defs.h index 3f06fa6e..c65a69c1 100644 --- a/src/gaudin/sys_defs.h +++ b/src/gaudin/sys_defs.h @@ -55,7 +55,7 @@ typedef struct GEventAudioIn_t { * @brief The event flag values. * @{ */ - #define GADC_AUDIO_IN_LOSTEVENT 0x0001 /**< @brief The last GEVENT_AUDIO_IN event was lost */ + #define GAUDIN_LOSTEVENT 0x0001 /**< @brief The last GEVENT_AUDIO_IN event was lost */ /** @} */ /** * @brief The number of audio samples in the buffer @@ -123,7 +123,7 @@ bool_t gaudinInit(uint16_t channel, uint32_t frequency, audin_sample_t *buffer, * @note The audio input will not use the GEVENT system unless this is * called first. This saves processing time if the application does * not want to use the GEVENT sub-system for audio input. - * Once turned on it can only be turned off by calling @p gadcHighSpeedInit() again. + * Once turned on it can only be turned off by calling @p gaudinInit() again. * @note The audio input is capable of signalling via this method and a binary semaphore * at the same time. * -- cgit v1.2.3