From d44a5cdd118dade91c5069b131192b5127c1b159 Mon Sep 17 00:00:00 2001 From: asterix Date: Thu, 14 Oct 2010 10:54:27 +0000 Subject: [PATCH] Fix log import module, other simple typo fixes. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4428 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/arm/drv/i2s_at91.c | 15 +++++++++++++-- bertos/cpu/arm/drv/i2s_at91.h | 7 +++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/bertos/cpu/arm/drv/i2s_at91.c b/bertos/cpu/arm/drv/i2s_at91.c index 84947004..f6b039eb 100644 --- a/bertos/cpu/arm/drv/i2s_at91.c +++ b/bertos/cpu/arm/drv/i2s_at91.c @@ -34,16 +34,27 @@ * \author Luca Ottaviano */ + +/* + * TODO: Revise the public api of this module to be more generic. Evalutate to + * implement the more generic layer to be common to all I2S BeRTOS drivers. + */ #include "i2s_at91.h" +#include "cfg/cfg_i2s.h" -#include +// Define log settings for cfg/log.h. +#define LOG_LEVEL I2S_LOG_LEVEL +#define LOG_FORMAT I2S_LOG_FORMAT #include + +#include #include #define DATALEN (15 & SSC_DATLEN_MASK) // FIXME: this is not correct for 16 <= DATALEN < 24 #define PDC_DIV ((DATALEN / 8) + 1) -/* PDC_DIV must be 1, 2 or 4, which are the bytes that are transferred +/* + * PDC_DIV must be 1, 2 or 4, which are the bytes that are transferred * each time the PDC reads from memory. */ STATIC_ASSERT(PDC_DIV % 2 == 0); diff --git a/bertos/cpu/arm/drv/i2s_at91.h b/bertos/cpu/arm/drv/i2s_at91.h index 1c162ea6..af3aba00 100644 --- a/bertos/cpu/arm/drv/i2s_at91.h +++ b/bertos/cpu/arm/drv/i2s_at91.h @@ -59,10 +59,9 @@ * $WIZ$ module_supports = "at91" */ -#ifndef I2S_H -#define I2S_H +#ifndef DRV_I2S_AT91_H +#define DRV_I2S_AT91_H -#include "cfg/cfg_i2s.h" #include #include @@ -113,4 +112,4 @@ INLINE bool i2s_isPlaying(void) return !(SSC_SR & BV(SSC_TXEMPTY)); } -#endif /* I2S_H */ +#endif /* DRV_I2S_AT91_H */ -- 2.25.1