X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fdrv%2Fi2s_at91.c;h=f6b039eb412914dc542a5b5aa812e568a13f7077;hb=ab40eaf9ac5b43e7087588fe7f435bdbc9a6eb23;hp=edb8ba046f387f418ccf29a350f35b1a6e975793;hpb=4b44dce76b22ee82adce289246abd6985d8d5259;p=bertos.git diff --git a/bertos/cpu/arm/drv/i2s_at91.c b/bertos/cpu/arm/drv/i2s_at91.c index edb8ba04..f6b039eb 100644 --- a/bertos/cpu/arm/drv/i2s_at91.c +++ b/bertos/cpu/arm/drv/i2s_at91.c @@ -31,20 +31,30 @@ * * \brief I2S driver implementation. * - * \version $Id$ * \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);