BeRTOS
|
I2S driver implementation. More...
#include "i2s_at91.h"
#include "cfg/cfg_i2s.h"
#include <cfg/log.h>
#include <drv/timer.h>
#include <io/arm.h>
Go to the source code of this file.
Functions | |
uint8_t * | i2s_getBuffer (unsigned buf_num) |
Returns one of the two buffers or NULL if none is available. | |
uint8_t * | i2s_getFreeBuffer (void) |
Returns a buffer that will be played after the current one. | |
bool | i2s_start (void) |
Starts playing from I2S_FIRST_BUFFER. | |
void | i2s_init (void) |
Initializes the module and sets current buffer to I2S_FIRST_BUF. |
I2S driver implementation.
Definition in file i2s_at91.c.
uint8_t* i2s_getBuffer | ( | unsigned | buf_num | ) |
Returns one of the two buffers or NULL if none is available.
You can't call this function if you have already started the player.
buf_num | The number of the buffer, ie I2S_FIRST_BUF or I2S_SECOND_BUF. |
Definition at line 69 of file i2s_at91.c.
uint8_t* i2s_getFreeBuffer | ( | void | ) |
Returns a buffer that will be played after the current one.
You should fill it faster than your reproduction time. You can't call this function if the player is not running
Definition at line 87 of file i2s_at91.c.
bool i2s_start | ( | void | ) |
Starts playing from I2S_FIRST_BUFFER.
You must have filled both buffers before calling this function. Does nothing if already playing.
Definition at line 121 of file i2s_at91.c.