BeRTOS
i2s_at91.h
Go to the documentation of this file.
00001 
00062 #ifndef DRV_I2S_AT91_H
00063 #define DRV_I2S_AT91_H
00064 
00065 
00066 #include <cfg/compiler.h>
00067 #include <cfg/macros.h>
00068 #include <io/arm.h>
00069 
00073 #define I2S_FIRST_BUF  0
00074 
00077 #define I2S_SECOND_BUF 1
00078 
00082 void i2s_init(void);
00083 
00091 uint8_t *i2s_getBuffer(unsigned buf_num);
00092 
00100 uint8_t *i2s_getFreeBuffer(void);
00101 
00108 bool i2s_start(void);
00109 
00110 INLINE bool i2s_isPlaying(void)
00111 {
00112     return !(SSC_SR & BV(SSC_TXEMPTY));
00113 }
00114 
00115 #endif /* DRV_I2S_AT91_H */