Nut/OS  4.10.3
API Reference
spi_vscodec.c File Reference
#include <dev/vscodec.h>
#include <sys/event.h>
#include <sys/timer.h>
#include <sys/nutdebug.h>
#include <sys/bankmem.h>
#include <stdlib.h>
#include <string.h>
#include <memdebug.h>
#include <fcntl.h>
Include dependency graph for spi_vscodec.c:

Go to the source code of this file.


int VsCodecWaitReady (NUTDEVICE *dev, uint32_t tmo)
 Wait until codec is ready.
uint16_t VsCodecReg (NUTDEVICE *dev, uint_fast8_t op, uint_fast8_t reg, uint_fast16_t val)
uint16_t VsCodecMode (NUTDEVICE *dev, uint_fast16_t flags, uint_fast16_t mask)
 Read and modify VLSI audio codec mode flags.
int VsDecoderSetVolume (NUTDEVICE *dev, int left, int right)
 Set volume.
int VsDecoderSetBass (NUTDEVICE *dev, int treb, int tfin, int bass, int bfin)
 Set Bass.
uint16_t VsCodecBeep (NUTDEVICE *dev, uint16_t fsin)
 Start or stop sine wave beeper.
int VsDecoderBufferInit (NUTDEVICE *dev, uint32_t size)
void FeederThread (void *arg)
int VsCodecIOCtl (NUTDEVICE *dev, int req, void *conf)
 Handle I/O controls for audio codec.
int VsCodecRead (NUTFILE *nfp, void *data, int len)
 Read from the encoder.
int VsCodecWrite (NUTFILE *nfp, CONST void *data, int len)
 Write to decoder.
int VsCodecWrite_P (NUTFILE *nfp, PGM_P buffer, int len)
 Write program data to decoder.
NUTFILEVsCodecOpen (NUTDEVICE *dev, CONST char *name, int mode, int acc)
int VsCodecClose (NUTFILE *nfp)


uint8_t zero_chunk [VSCODEC_DATA_CHUNK_SIZE]

Internal Command Flags

#define VSREQ_PLAY   0x00000001
 Force immediate player start.
#define VSREQ_CANCEL   0x00000002
 Force immediate player stop.
#define VSREQ_VOLUPD   0x00000004
 Volume update.
#define VSREQ_AUDIOE   0x00000008
 Audio enhancement update.
#define VSREQ_BEEP   0x00000010
 Sine wave test.
#define VSREQ_RECORD   0x00000020
 Start recording.