From: asterix Date: Thu, 14 Oct 2010 10:54:27 +0000 (+0000) Subject: Fix log import module, other simple typo fixes. X-Git-Tag: 2.6.0~5^2~92 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d44a5cdd118dade91c5069b131192b5127c1b159;p=bertos.git Fix log import module, other simple typo fixes. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4428 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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 */