i2s_at91.h

Go to the documentation of this file.
00001 
00063 #ifndef I2S_H
00064 #define I2S_H
00065 
00066 #include "cfg/cfg_i2s.h"
00067 
00068 #include <cfg/compiler.h>
00069 #include <cfg/macros.h>
00070 #include <io/arm.h>
00071 
00075 #define I2S_FIRST_BUF  0
00076 
00079 #define I2S_SECOND_BUF 1
00080 
00084 void i2s_init(void);
00085 
00093 uint8_t *i2s_getBuffer(unsigned buf_num);
00094 
00102 uint8_t *i2s_getFreeBuffer(void);
00103 
00110 bool i2s_start(void);
00111 
00112 INLINE bool i2s_isPlaying(void)
00113 {
00114     return !(SSC_SR & BV(SSC_TXEMPTY));
00115 }
00116 
00117 #endif /* I2S_H */