i2s_at91.c File Reference
I2S driver implementation. More...
#include "i2s_at91.h"#include <drv/timer.h>#include <cfg/log.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. | |
Detailed Description
I2S driver implementation.
- Version:
- $Id$
Definition in file i2s_at91.c.
Function Documentation
| 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.
- Parameters:
-
buf_num The number of the buffer, ie I2S_FIRST_BUF or I2S_SECOND_BUF.
- Returns:
- A pointer to the buffer if the buffer is available (not full), 0 on errors
Definition at line 59 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
- Returns:
- The next buffer to be played, 0 if both are busy.
Definition at line 77 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.
- Returns:
- false on errors, true otherwise.
Definition at line 111 of file i2s_at91.c.
