Main Page Data Structures File List Data Fields Globals Related Pages

# vs1001.h

Go to the documentation of this file.

    00001 #ifndef VS1001_H
    00002 #define VS1001_H
    00003
    00004 #define SDI_DMACHANNEL 0
    00005 #define SDI_DATAREG    0x130
    00006
    00007 #define SCI_XCSPIO    10
    00008 #define SCI_SCLKPIO   11
    00009 #define SCI_SIPIO     12
    00010 #define SCI_SOPIO      9
    00011
    00012 #define SCI_MODE       0
    00013 #define SCI_STATUS     1
    00014 #define SCI_CLOCKF     3
    00015 #define SCI_DECTIME    4
    00016 #define SCI_AUDATA     5
    00017 #define SCI_WRAM       6
    00018 #define SCI_WRAMADR    7
    00019 #define SCI_HDAT0      8
    00020 #define SCI_HDAT1      9
    00021 #define SCI_A1ADDR    10
    00022 #define SCI_VOL       11
    00023 #define SCI_A1CTRL0   12
    00024 #define SCI_A1CTRL1   13
    00025 #define SCI_A1CTRL2   14
    00026
    00027 #define SM_DIFF        1
    00028 #define SM_FFWD        2
    00029 #define SM_RESET       4
    00030 #define SM_MP12        8
    00031 #define SM_PDOWN      16
    00032 #define SM_DAC        32
    00033 #define SM_DACMONO    64
    00034 #define SM_BASS      128
    00035 #define SM_DACT      256
    00036 #define SM_BYTEORD   512
    00037 #define SM_IBMODE   1024
    00038 #define SM_IBCLK    2048
    00039
    00040 #define VS_OK          0
    00041 #define VS_TIMEOUT     1
    00042
    00043 // length of internal fifo in bytes
    00044 // (see VS1001 data sheet)
    00045 //
    00046 #define VS_FIFOSIZE   2048
    00047
    00048 // Default clock frequency for VS_Reset()
    00049 //
    00050 //#define VS_CLOCK    24576000L
    00051 #define VS_CLOCK      12288000L
    00052
    00053 extern void  VS_Init();
    00054 extern void  VS_Done();
    00055 extern void  VS_Reset();
    00056
    00057 extern void  VS_SCITest();
    00058 extern void  VS_SDITest();
    00059
    00060 extern void  VS_SetClockFreq(long frequency);
    00061 extern void  VS_SetVolume   (int left, int right);
    00062 extern void  VS_SetBassBoost(bool onoff);
    00063 extern int   VS_PlayMpegSync(char *data, unsigned len);
    00064 extern void  VS_PlayMpegAsync(char *data, unsigned len,
    00065                               void (*function)(void*),
    00066                               void *param);
    00067 extern void  VS_Stop();
    00068 extern bool  VS_IsPlaying();
    00069
    00070 extern void  VS_GetMPEGHeader(unsigned long *header);
    00071
    00072
    00073 #endif
    00074
    00075