Nut/OS  4.10.3
API Reference
vs1001k.h File Reference

Network interface controller definitions. More...

#include <sys/types.h>
#include <stdint.h>
Include dependency graph for vs1001k.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  VS_HEADERINFO

Defines

#define VS_OPCODE_READ   3
#define VS_OPCODE_WRITE   2
#define VS_MODE_REG   0
#define VS_STATUS_REG   1
#define VS_INT_FCTLH_REG   2
#define VS_CLOCKF_REG   3
#define VS_DECODE_TIME_REG   4
#define VS_AUDATA_REG   5
#define VS_WRAM_REG   6
#define VS_WRAMADDR_REG   7
#define VS_HDAT0_REG   8
#define VS_HDAT1_REG   9
#define VS_A1ADDR_REG   10
#define VS_VOL_REG   11
#define VS_A1CTRL_REG   13
#define VS_SM_DIFF   0x0001
#define VS_SM_FFWD   0x0002
#define VS_SM_RESET   0x0004
#define VS_SM_MP12   0x0008
#define VS_SM_PDOWN   0x0010
#define VS_SM_DAC   0x0020
#define VS_SM_DACMONO   0x0040
#define VS_SM_BASS   0x0080
#define VS_SM_DACT   0x0100
#define VS_SM_BYTEORD   0x0200
#define VS_SM_IBMODE   0x0400
#define VS_SM_IBCLK   0x0800
#define VS_CF_DOUBLER   0x8000
#define VS_FLUSH_BYTES   2048
#define VS_STATUS_STOPPED   0
#define VS_STATUS_RUNNING   1
#define VS_STATUS_EOF   2
#define VS_STATUS_EMPTY   4

Functions

int VsPlayerInit (void)
 Initialize the VS1001 hardware interface.
int VsPlayerReset (uint16_t mode)
 Software reset the decoder.
int VsPlayerSetMode (uint16_t mode)
 Set mode register of the decoder.
int VsPlayerKick (void)
 Start playback.
int VsPlayerStop (void)
 Stops the playback.
int VsPlayerFlush (void)
 Sets up decoder internal buffer flushing.
uint8_t VsPlayerInterrupts (uint8_t enable)
 Enable or disable player interrupts.
uint8_tVsBufferInit (uint16_t size)
uint8_tVsBufferReset (void)
uint8_tVsBufferRequest (uint16_t *sizep)
uint8_tVsBufferAcknowledge (uint16_t nbytes)
uint16_t VsBufferAvailable (void)
uint16_t VsPlayTime (void)
 Returns play time since last reset.
uint8_t VsGetStatus (void)
 Returns status of the player.
int VsGetHeaderInfo (VS_HEADERINFO *vshi)
 Query MP3 stream header information.
uint16_t VsMemoryTest (void)
 Initialize decoder memory test and return result.
int VsSetVolume (uint8_t left, uint8_t right)
 Set volume.
int VsBeep (uint8_t fsin, uint8_t ms)
 Sine wave beep.

Detailed Description

Network interface controller definitions.

Definition in file vs1001k.h.