libdragon
|
Register definition for the AI interface. More...
#include <regsinternal.h>
Data Fields | |
volatile void * | address |
Pointer to uncached memory buffer of samples to play. | |
uint32_t | length |
Size in bytes of the buffer to be played. Should be number of stereo samples * 2 * sizeof( uint16_t ) | |
uint32_t | control |
DMA start register. Write a 1 to this register to start playing back an audio sample. | |
uint32_t | status |
AI status register. Bit 31 is the full bit, bit 30 is the busy bit. | |
uint32_t | dacrate |
Rate at which the buffer should be played. | |
uint32_t | samplesize |
The size of a single sample in bits. |
Register definition for the AI interface.
uint32_t AI_regs_s::dacrate |
Rate at which the buffer should be played.
Use the following formula to calculate the value: ((2 * clockrate / frequency) + 1) / 2 - 1