Library for VS1053 chip
Revision 0:e97876f96d4b, committed 2012-05-23
- Comitter:
- clemente
- Date:
- Wed May 23 06:28:16 2012 +0000
- Child:
- 1:399afe8151de
- Commit message:
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VLSIcodec.c Wed May 23 06:28:16 2012 +0000 @@ -0,0 +1,837 @@ +/* mbed VLSIcodec library. To access VS1053 MPEG3 codec. + + Copyright (c) 2010 NXP 3790 + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#include "mbed.h" +#include "VLSIcodec.h" +#include "VLSIcodec_patch.h" + +#ifdef __ENCODE_OGG +#include "VLSIcodec_OGG.h" +#endif + +#ifdef __PLUGINGA +#include "VLSIcodec_pluginGA.h" +#define cBASE 0x1800 /* Base address of X-RAM for a VS1053 */ +#endif + + +//****************************************************************************** +//****************************************************************************** +// Section: Constants +//****************************************************************************** +//****************************************************************************** + +#define VLSI_MODE 0x00 +#define VLSI_STATUS 0x01 +#define VLSI_BASS 0x02 +#define VLSI_CLOCKF 0x03 +#define VLSI_DECODE_TIME 0x04 +#define VLSI_AUDATA 0x05 +#define VLSI_WRAM 0x06 +#define VLSI_WRAMADDR 0x07 +#define VLSI_HDAT0 0x08 +#define VLSI_HDAT1 0x09 +#define VLSI_AIADDR 0x0A +#define VLSI_VOL 0x0B +#define VLSI_AICTRL0 0x0C +#define VLSI_AICTRL1 0x0D +#define VLSI_AICTRL2 0x0E +#define VLSI_AICTRL3 0x0F + +#define VLSI_STATUS_VER 0x00F0u +#define VER_VS1001 (0u<<4) +#define VER_VS1011 (1u<<4) +#define VER_VS1002 (2u<<4) +#define VER_VS1011E (2u<<4) +#define VER_VS1003 (3u<<4) +#define VER_VS1053 (4u<<4) +#define VER_VS1033 (5u<<4) +#define VER_VS1103 (7u<<4) + +#define cWAIT_DREQ_1MS wait_ms( 1); while (!_dreq); +#define cWAIT_DREQ while (!_dreq); + +/* VLSI 1053, MODE Register bit configuration. */ +#define SM_DIFF 0x01 +#define SM_LAYER12 0x02 +#define SM_RESET 0x04 +#define SM_CANCEL 0x08 +#define SM_EARSPEAKER_LO 0x10 +#define SM_TESTS 0x20 +#define SM_STREAM 0x40 +#define SM_EARSPEAKER_HI 0x80 +#define SM_DACT 0x100 +#define SM_SDIORD 0x200 +#define SM_SDISHARE 0x400 +#define SM_SDINEW 0x800 +#define SM_ADPCM 0x1000 +#define SM_NOTUSE 0x2000 +#define SM_LINE1 0x4000 +#define SM_CLK_RANGE 0x8000 + +/* SC MULT MASK CLKI */ +#define SC_MULT_0 0x0000 /* XTALI */ +#define SC_MULT_2 0x2000 /* XTALI×2.0 */ +#define SC_MULT_2_5 0x4000 /* XTALI×2.5 */ +#define SC_MULT_3 0x6000 /* XTALI×3.0 */ +#define SC_MULT_3_5 0x8000 /* XTALI×3.5 */ +#define SC_MULT_4 0xA000 /* XTALI×4.0 */ +#define SC_MULT_4_5 0xC000 /* XTALI×4.5 */ +#define SC_MULT_5 0xE000 /* XTALI×5.0 */ + +/* + SC ADD tells how much the decoder firmware is allowed to add to the multiplier specified by SC MULT + if more cycles are temporarily needed to decode a WMA or AAC stream. The values are: + SC ADD MASK Multiplier addition +*/ +#define SC_ADD_NOMOD 0x0000 /* No modification is allowed */ +#define SC_ADD_X1 0x0800 /* 1.0× */ +#define SC_ADD_X1_5 0x1000 /* 1.5× */ +#define SC_ADD_X2 0x1800 /* 2.0× */ + +#define SC_FREQ 0x0000 /* 12.288 MHz clock. */ + +/* +*/ +#define cMODEREG_SET ( SM_SDINEW ) +#define cCLOCK_SET ( SC_MULT_5 | SC_ADD_X1 | SC_FREQ) + +#define VS1053_CS_ENABLE _cs=0; +#define VS1053_CS_DISABLE _cs=1; +#define VS1053_XDCS_ENABLE _xdcs=0; +#define VS1053_XDCS_DISABLE _xdcs=1; +#define VS1053_RST_ENABLE _rst=0; +#define VS1053_RST_DISABLE _rst=1; + +/* +*/ +#define cVS1053_CS_DELAY 50 + +VS1053Codec::VS1053Codec( PinName mosi, PinName miso, PinName sclk, PinName cs, PinName dreq, PinName rst, PinName xdcs) : _spi( mosi, miso, sclk), _cs( cs), _dreq( dreq), _rst( rst), _xdcs( xdcs) { + // defaults params + VS1053_CS_DISABLE; + VS1053_XDCS_DISABLE; +} + +void VS1053Codec::testdreq( void){ + while( !_dreq); +} + +void VS1053Codec::lowpower( void) +{ + VS1053_RST_ENABLE; + wait_ms( 10); +} + +void VS1053Codec::init(void) +{ + // + VS1053_RST_DISABLE; + VS1053_CS_DISABLE; + VS1053_XDCS_DISABLE; + // + _spi.format( 8, 0); + _spi.frequency( MP3_INIT_SPEED); + + // Assert RESET + VS1053_RST_ENABLE; + wait_ms( 100); + + // Deassert RESET (active low) + VS1053_RST_DISABLE; + VS1053_CS_DISABLE; + VS1053_XDCS_DISABLE; + wait_ms( 100); + + // Wait + while(!_dreq); + + // Reset the vs1053 + writereg( VLSI_MODE, ( cMODEREG_SET | SM_RESET) ); + wait_ms( 10); + + // Wait... + while(!_dreq); + + /* + * Write configuration MODE register in a loop to verify that the chip is + * connected and running correctly + */ + do + { + writereg( VLSI_MODE, ( cMODEREG_SET )); + wait_ms( 1); + }while( readreg( VLSI_MODE) != ( cMODEREG_SET )); + + // + if((readreg( VLSI_STATUS) & VLSI_STATUS_VER) == VER_VS1053) + { + // Set the clock to maximum speed (VS1053 only) to allow all audio formats + // to be decoded without glitching. Note that this increases power + // consumption. + // SC_MULT = XTALI*4.5, SC_ADD = noMod, SC_FREQ = 0 (12.288MHz) + // VLSIWriteReg(VLSI_CLOCKF, SC_MULT_4_5 | SC_ADD_X1 | SC_FREQ); + + writereg(VLSI_CLOCKF, cCLOCK_SET); + + /* */ + wait_ms( 2); + while(!_dreq); + } + else if ((readreg( VLSI_STATUS) & VLSI_STATUS_VER) == VER_VS1011E) + { + // Nothing special to do + ; + } + else + { + // VLSI Chip version not tested, not supported, halt program execution. + // This trap should be caught during the design phase. + while(1); + } + + _spi.frequency( MP3_RUN_SPEED); +} + +void VS1053Codec::loadpatch(void) +/* Questa funzione carica una patch al firmware del codec */ +{ + int i = 0, plgin_len; + unsigned int addr, n, val; + + plgin_len=sizeof( plugin)/sizeof(plugin[0]); + while (i<plgin_len) { + + addr = plugin[i++]; + n = plugin[i++]; + if (n & 0x8000U) { /* RLE run, replicate n samples */ + n &= 0x7FFF; + val = plugin[i++]; + while (n--) { + writeregnowait(addr, val); + while(!_dreq); + } + } else { /* Copy run, copy n samples */ + while (n--) { + val = plugin[i++]; + writeregnowait(addr, val); + while(!_dreq); + } + } + } + // + wait_ms( 1); + while(!_dreq); +} + +#ifdef __PLUGINGA +void VS1053Codec::loadgapatch(void) +/* Questa funzione carica un plugin nel codec */ +{ + int i = 0, plgin_len; + unsigned int addr, n, val; + + plgin_len=sizeof( gaplugin)/sizeof(gaplugin[0]); + while (i<plgin_len) { + + addr = gaplugin[i++]; + n = gaplugin[i++]; + if (n & 0x8000U) { /* RLE run, replicate n samples */ + n &= 0x7FFF; + val = gaplugin[i++]; + while (n--) { + writeregnowait(addr, val); + while(!_dreq); + } + } else { /* Copy run, copy n samples */ + while (n--) { + val = gaplugin[i++]; + writeregnowait(addr, val); + while(!_dreq); + } + } + } + // + wait_ms( 1); + while(!_dreq); +} +#endif + +#ifdef __ENCODE_OGG +void VS1053Codec::loadoggpatch(void) +/* Questa funzione carica una patch per gestire l'encoder OGG */ +{ + int i = 0, plgin_len; + unsigned int addr, n, val; + + plgin_len=sizeof( ogg_enc)/sizeof(ogg_enc[0]); + while (i<plgin_len) { + + addr = ogg_enc[i++]; + n = ogg_enc[i++]; + if (n & 0x8000U) { /* RLE run, replicate n samples */ + n &= 0x7FFF; + val = ogg_enc[i++]; + while (n--) { + writeregnowait(addr, val); + while(!_dreq); + } + } else { /* Copy run, copy n samples */ + while (n--) { + val = ogg_enc[i++]; + writeregnowait(addr, val); + while(!_dreq); + } + } + } + // + wait_ms( 1); + while(!_dreq); +} +#endif + +#ifdef __PLUGINGA +void VS1053Codec::readgavalue( unsigned char *currval, unsigned char *peak) +{ + writereg( VLSI_WRAMADDR, cBASE+2); + unsigned short bands = (unsigned short)readreg( VLSI_WRAM); + // + writereg( VLSI_WRAMADDR, cBASE+4); + // + for (int i=0;i<bands;i++) { + short pv = readreg( VLSI_WRAM); + /* current value in bits 5..0, normally 0..31 + peak value in bits 11..6, normally 0..31 */ + currval[i]=(unsigned char)(pv&0x003F); + peak[i]=(unsigned char)( (pv>>6)&0x003F); + } +} + +unsigned short VS1053Codec::readgabands( void) +{ + writereg( VLSI_WRAMADDR, cBASE+2); + unsigned short bands = (unsigned short)readreg( VLSI_WRAM); + /* */ + return bands; +} + +#endif + +void VS1053Codec::setvmeter( void) +{ + unsigned short tmp; + + tmp=(unsigned short)readreg( VLSI_STATUS); + tmp|=(1<<9); + writereg( VLSI_STATUS, tmp); +} + +void VS1053Codec::getvmeterval( unsigned char* left, unsigned char* right) +{ + unsigned short tmp; + + tmp=(unsigned short)readreg( VLSI_AICTRL3); + + *right=(unsigned char)tmp&0x00FF; + *left=(unsigned char)(tmp>>8); +} + +/**************************************************************************** + Function: + void VS1053Codec::setbassboost(BYTE bass, BYTE gfreq) + + Description: + This function sets the bass boost. + + Precondition: + None + + Parameters: + BYTE bass - Bass gain in dB, range from 0 to 15 (MSB nibble) + BYTE gfreq - Limit frequency for bass boost, 10 Hz steps (range from + 20 to 150) (LSB nibble) + + Returns: + None + + Remarks: + None + ***************************************************************************/ +void VS1053Codec::setbassboost( unsigned char bass, unsigned char gfreq) +{ + unsigned char templ; + unsigned short tmp; + + // + if(bass > 15u) + bass = 15; + if(gfreq > 150u) + gfreq = 150; + if ( gfreq < 20) + gfreq = 20; + + + // + templ = (unsigned char)gfreq/10; + + // put bass boost value into the upper 4 bit + templ |= (bass << 4); + // + tmp=(unsigned short)readreg( VLSI_BASS); + tmp &= 0xFF00; + tmp |= templ; + // + writereg( VLSI_BASS, tmp); +} + +/**************************************************************************** + Function: + void VS1053Codec::settrebleboost(BYTE bass, WORD gfreq) + + Description: + This function sets the bass boost. + + Precondition: + None + + Parameters: + BYTE treble - Bass gain in dB, range from -8 to 7 (MSB nibble) + WORD gfreq - Limit frequency for bass boost, 1000 Hz steps (range from + 1000 to 15000) (LSB nibble) + + Returns: + None + + Remarks: + None + ***************************************************************************/ +void VS1053Codec::settrebleboost( char treble, unsigned int gfreq) +{ + unsigned char templ; + unsigned short tmp; + + // + if(treble > 7) + treble = 7; + if ( treble < (char)-8) + treble = (char)-8; + + if(gfreq > 15000u) + gfreq = 15000; + if(gfreq < 1000) + gfreq = 1000; + + // + templ = (unsigned char)gfreq/1000; + + // put treble boost value into the upper 4 bit + templ |= (treble << 4); + // + tmp=(unsigned short)readreg( VLSI_BASS); + tmp &= 0x00FF; + tmp |= (templ << 8); + // + writereg( VLSI_BASS, tmp); +} + +void VS1053Codec::getplaytime(char *playtime) +{ + unsigned short playTime; + unsigned char minutes, seconds; + + playTime = (unsigned short)readreg(VLSI_DECODE_TIME); + minutes = playTime/60; + seconds = playTime%60; + *playtime++=('0'+minutes/10); + *playtime++=('0'+minutes%10); + *playtime++=(':'); + *playtime++=('0'+seconds/10); + *playtime++=('0'+seconds%10); +} + + +/**************************************************************************** + Function: + void setvolume(unsigned char vRight, unsigned char vLeft) + + Description: + This function set volume for analog outputs on the VLSI codec. + + Precondition: + None + + Parameters: + unsigned char vRight - right channel attenuation from maximum volume, 0.5dB steps + (0x00 = full volume, 0xFF = muted) + unsigned char vLeft - left channel attenuation from maximum volume, 0.5dB steps + (0x00 = full volume, 0xFF = muted) + + Returns: + None + + Remarks: + None + ***************************************************************************/ +void VS1053Codec::setvolume(unsigned char vRight, unsigned char vLeft) +{ + writereg(VLSI_VOL, ((unsigned int)vLeft)<<8 | vRight); +} + + +void VS1053Codec::sinetest( unsigned char pitch) +{ + unsigned int i; + + while(!_dreq); + + i=(unsigned short)readreg( VLSI_MODE); + writereg( VLSI_MODE, ( i | SM_TESTS )); + + VS1053_XDCS_ENABLE; + + if ( pitch) { + // START Sine Test + _spi.write(0x53); + _spi.write(0xEF); + _spi.write(0x6E); + _spi.write( pitch); + _spi.write(0x00); + _spi.write(0x00); + _spi.write(0x00); + _spi.write(0x00); + } else { + // STOP Sine Test + _spi.write(0x45); + _spi.write(0x78); + _spi.write(0x69); + _spi.write(0x74); + _spi.write(0x00); + _spi.write(0x00); + _spi.write(0x00); + _spi.write(0x00); + } + + VS1053_XDCS_DISABLE; + +} + +void VS1053Codec::writedata( unsigned char data) +/* +* Write data to SDI. +*/ +{ + int i=0; + + VS1053_XDCS_ENABLE; + for( i=0; i<cVS1053_CS_DELAY; i++); + + _spi.write( data); + + for( i=0; i<cVS1053_CS_DELAY; i++); + VS1053_XDCS_DISABLE; + +} + +//****************************************************************************** +//****************************************************************************** +//****************************************************************************** +// Section: Internal Functions +//****************************************************************************** +//****************************************************************************** +//****************************************************************************** + + +unsigned short VS1053Codec::readreg(unsigned char vAddress) +{ + unsigned short wValue; + unsigned int i; + + VS1053_CS_ENABLE; + for ( i=0; i<cVS1053_CS_DELAY;i++); + + _spi.write(0x03); // Read + _spi.write(vAddress); // Register address + ((unsigned char*)&wValue)[1] = _spi.write(0xFF); // 8 bit value high byte + ((unsigned char*)&wValue)[0] = _spi.write(0xFF); // 8 bit value low byte + + for ( i=0; i<cVS1053_CS_DELAY;i++); + VS1053_CS_DISABLE; + + return wValue; +} + +void VS1053Codec::writereg(unsigned char vAddress, unsigned int wValue) +{ + int i; + + while(!_dreq); + + VS1053_CS_ENABLE; + for ( i=0; i<cVS1053_CS_DELAY;i++); + + _spi.write(0x02); // Write + _spi.write(vAddress); // Register address + _spi.write(((unsigned char*)&wValue)[1]); // 8 bit value to write high byte + _spi.write(((unsigned char*)&wValue)[0]); // 8 bit value to write low byte + + for ( i=0; i<cVS1053_CS_DELAY;i++); + VS1053_CS_DISABLE; + +} + + +/* */ +void VS1053Codec::reset( void) +{ + // Reset the vs1053 + writereg(VLSI_MODE, ( cMODEREG_SET | SM_RESET) ); + wait_ms( 5); + // Wait... + while(!_dreq); + + // Configure CLOCK register. + writereg(VLSI_CLOCKF, cCLOCK_SET); + wait_ms( 5); + // Wait... + while(!_dreq); +} + + +void VS1053Codec::writeregnowait(unsigned char vAddress, unsigned int wValue) +/* + Write to SCI interface without waiting for the DREQ pin +*/ +{ + int i; + + VS1053_CS_ENABLE; + for ( i=0; i<cVS1053_CS_DELAY;i++); + + _spi.write(0x02); // Write + _spi.write(vAddress); // Register address + _spi.write(((unsigned char*)&wValue)[1]); // 8 bit value to write high byte + _spi.write(((unsigned char*)&wValue)[0]); // 8 bit value to write low byte + + for ( i=0; i<cVS1053_CS_DELAY;i++); + VS1053_CS_DISABLE; + +} + +#ifdef __ENCODE_OGG +void VS1053Codec::VoggEncoding_Start( void) +/* VorbisEncoder160c pag. 9 */ +{ + unsigned short temp; + +/* 2. vs1053b at 55.3MHz */ + writeregnowait( VLSI_CLOCKF, 0xC000); cWAIT_DREQ_1MS; +/* 3. SCI_BASS to 0 */ + writeregnowait( VLSI_BASS, 0x0000); cWAIT_DREQ_1MS; +/* 4. Disable user application (no wait fot DREQ pin and no delay, as from the VLSI source file example */ +/* record.c from playercode1053-Aug2009.zip */ + writeregnowait( VLSI_AIADDR, 0x0000); +/* 5. Disable all IRQ except the SCI IRQ */ + writeregnowait( VLSI_WRAMADDR, 0xC01A); + writeregnowait( VLSI_WRAM, 0x0002); +/* 6. Load the plugin code... */ + loadoggpatch(); +/* 7. Set bit SM_ADPCM to 1. */ + temp = (unsigned short)readreg( VLSI_MODE); cWAIT_DREQ_1MS; + temp |= SM_ADPCM; + writeregnowait( VLSI_MODE, temp); cWAIT_DREQ_1MS; + writeregnowait( VLSI_AICTRL0, 0x0000); cWAIT_DREQ_1MS; +/* 8. Set recording level. Value are for conservative AGC. */ + writeregnowait( VLSI_AICTRL1, 0x0000); cWAIT_DREQ_1MS; + writeregnowait( VLSI_AICTRL2, 4096); cWAIT_DREQ_1MS; +/* 10. Set 0 to SCI_AICTRL3. */ + writeregnowait( VLSI_AICTRL3, 0x0000); cWAIT_DREQ_1MS; +/* 11. Active the encoder... */ + wait_ms( 5); + writeregnowait( VLSI_AIADDR, 0x0034); wait_ms( 1); +/* 12. wait DREQ high. */ + cWAIT_DREQ; /* Loop forever. */ + +} + +#if 0 +void VS1053Codec::VoggEncoding_ReadStatus( RUNTIME_VOGG_VALUE *status) +/* VorbisEncoder160c par 2.3.4, pag. 11 */ +/* see VLSICodec.h for RUNTIME_VOGG_VALUE struct data. */ +{ + unsigned short temp, temph; + + /* Recording Time */ + writereg( VLSI_WRAMADDR, 0x0008); cWAIT_DREQ_1MS; + temp = (unsigned short)readreg( VLSI_WRAM); /* LSB recording Time */ + temph= (unsigned short)readreg( VLSI_WRAM); /* MSB recording Time */ + status->rec_time = ((unsigned long)temph << 16) | temp; + + /* Average bitrate */ + writereg( VLSI_WRAMADDR, 0x000C); cWAIT_DREQ_1MS; + temp = (unsigned short)readreg( VLSI_WRAM); /* LSB Average bitrate */ + temph= (unsigned short)readreg( VLSI_WRAM); /* MSB Average bitrate */ + status->average_bitrate = ((unsigned long)temph << 16) | temp; + + /* Sample Counter */ + writereg( VLSI_WRAMADDR, 0x1800); cWAIT_DREQ_1MS; + temp = (unsigned short)readreg( VLSI_WRAM); /* LSB Sample Counter */ + temph= (unsigned short)readreg( VLSI_WRAM); /* MSB Average bitrate */ + status->sample_counter = ((unsigned long)temph << 16) | temp; +} +#endif + + +/* +* Questa funzione legge il registro SCI_HDAT1 per verificare la presenza di +* sample disponibili. In caso ci siano li legge dal reg. SCI_HDAT0 +* salvandoli nel puntatore passatogli. Ritorna il numero di byte copiati. +*/ +unsigned int VS1053Codec::VoggEncoding_ReadBuffer( unsigned char *voggSample) +/* VorbisEncoder160c pag. 10 */ +{ + unsigned int i; + unsigned short temp, sample; + + temp=0; + i=0; + sample=0; + +// printf("readbuffer\r\n"); + + do { + /* reading the sample counter... */ + temp = (unsigned short)readreg( VLSI_HDAT1); + if ( temp ) { +// printf("sample %d\r\n", temp); + /* there are samples... */ + i=0; + while( i < temp) { + /* read the sample as word */ + sample=(unsigned short)readreg( VLSI_HDAT0); + /* save it into the array as single byte. */ + *voggSample++ = (unsigned char)(sample >> 8); /* MSB */ + *voggSample++ = (unsigned char)(sample & 0x00FF); /* LSB */ + i++; + wait_ms( 1); + } + + /* Exit the loop. */ + break; + } else { +// printf("no sample\r\n"); + /* Exit the loop. */ + break; + } + } while( 1); + /* just relax... */ + wait_ms( 1); + /* Return the number of byte saved. */ + return i*2; +} + +/* +* Questa funzione esegue la procedura di fine encoding memorizzando i rimanenti sample +* nel puntatore passatogli. Ritorna il numero di sample letti. +*/ +unsigned int VS1053Codec::VoggEncoding_Stop( unsigned char *voggSample) +/* VorbisEncoder160c pag. 11 */ +{ + unsigned int res, i, ii; + unsigned short temp, sample; + res=0; + temp=0; + sample=0; + +/* 1. set bit 0 to 1 */ + temp = (unsigned short)readreg( VLSI_AICTRL3); + temp |= 0x0001; + writereg( VLSI_AICTRL3, temp); + +/* 2. continue reading data but checking the bit 1 of VLSI_AICTRL3 reg. */ + res=0; + do { + /* reading the sample counter... */ + temp = (unsigned short)readreg( VLSI_HDAT1); + if ( temp) { +// printf("EncStop: %d\r\n", temp); + i=0; + while( i < temp ) { + /* */ + sample = (unsigned short)readreg( VLSI_HDAT0); + *voggSample++ = (unsigned char)(sample >> 8); + *voggSample++ = (unsigned char)sample & 0x00FF; + i++; + wait_ms( 1); + } + res+=i; + } + /* just relax... */ + wait_ms( 1); + temp = (unsigned short)readreg( VLSI_AICTRL3); + /* verify the bit 1 of VLSI_AICTRL3 reg. */ + if ( temp & 0x0002) { +// printf("Encoding STOP\r\n"); + /* encoding has finished. */ + break; + } + } while( 1); /* Loop forever... */ +/* 3. write the remaining word... */ + ii=0; + do { + temp = (unsigned short)readreg( VLSI_HDAT1); + if ( temp) { +// printf("Flush %d\r\n", temp); + /* there are samples... */ + i=0; + while( i < temp ) { /* con il numero precedente. */ + /* */ + sample = (unsigned short)readreg( VLSI_HDAT0); + *voggSample++ = (unsigned char)(sample >> 8); + *voggSample++ = (unsigned char)sample & 0x00FF; + i++; + wait_ms( 1); + } + res+=i; + } else { + wait_ms( 1); + ii++; + } + } while( ii<5); /* Loops ... */ +/* 4. read twise AICTRL3 */ + temp = (unsigned short)readreg( VLSI_AICTRL3); + temp = (unsigned short)readreg( VLSI_AICTRL3); +// printf("last read %d\r\n", temp); + if ( temp & 0x0004 ) { + /* remove last byte ( bits 7:0) from the last word. */ + voggSample--; + *voggSample=0; + res=(res*2)-1; + } else { + res=res*2; + } +/* 5. Reset the codec. */ + + /* Ritorno il numero di sample, in byte, letti. */ + return res; +} +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VLSIcodec.h Wed May 23 06:28:16 2012 +0000 @@ -0,0 +1,228 @@ +/* mbed VLSIcodec library. To access VS1053 MPEG3 codec. + + Copyright (c) 2010 NXP 3790 + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +#ifndef __VLSICODEC_H +#define __VLSICODEC_H + +#include "mbed.h" + +/* */ +#define __PLUGINGA 1 +/* */ +#define MP3_INIT_SPEED 2000000 /* 2Mbit */ +#define MP3_RUN_SPEED 3000000 /* 3Mbit */ +#define MP3_BUS_MODE 3 + +/** This library drive a VS1053 codec to play VAW/MP3/Ogg audio file. + * + * @code + * + * VS1053Codec codec( p11, p12, p13, p21, p22, p23, p24); + * + * int main( void) + * { + * codec.init(); // initialize the codec + * codec.loadpatch(); // load the patch code (rev 1.5) + * codec.setbassboost( 15, 150); // set the bass boost value + * codec.settrebleboost( 7, 15000); // set the treable boost value + * codec.setvolume( 0x0, 0x0); // set the volume + * + * // snd_piano is a Ogg file stored in flash memory. + * int cnt=sizeof(snd_piano)/sizeof(snd_piano[0]); + * // + * printf("Start playing file snd_piano [%d]\n\r", cnt); + * // + * int iSize=0; + * while( iSize < cnt) { + * int count=32; + * codec.testdreq(); + * while( count--) { + * codec.writedata( snd_piano[ iSize++]); + * if ( iSize > cnt) + * break; + * } + * } + * } + * + * @endcode + * + */ + +// +class VS1053Codec { + +public: + + /** Initialize the SPI connection to the codec and other services pins. + * + * @param mosi, miso, sclk the SPI connection pins + * @param cs the chip select SPI pin + * @param dreq If DREQ is high, VS1053b can take at least 32 bytes of SDI data or one SCI command. DREQ is turned + * low when the stream buffer is too full and for the duration of a SCI command. + * @param rst hardware reset, active low + * @param xdcs the xdcs pin is the "data chip select". + */ + VS1053Codec( PinName mosi, PinName miso, PinName sclk, PinName cs, PinName dreq, PinName rst, PinName xdcs); + + /** Initialize the connection to the VS1053 codec. + * Never return if fail. + */ + void init(void); + + /** Test the dreq pin. If high the VS1053 can take data. + * The function never return until the pin goes high. + */ + void testdreq( void); + + /** Reset the codec + */ + void reset( void); + + /** write a byte to the codec + * + * @param data + */ + void writedata( unsigned char data); + + /** Set the bass boost value + * + * @param bass Bass gain in dB, range from 0 to 15 + * @param freq Limit frequency for bass boost, 10 Hz steps (range from + * 20 to 150) + */ + void setbassboost(unsigned char bass, unsigned char gfreq); + + /** Set treable boost value + * + * @param treable Bass gain in dB, range from -8 to 7 + * @param freq Limit frequency for bass boost, 1000 Hz steps (range from + * 1000 to 15000) + */ + void settrebleboost( char treble, unsigned int gfreq); + + /** Set the volume. + * Note, that after hardware reset the volume is set to full volume. Resetting the software does not reset the + * volume setting. + * + * @param right vol right channel attenuation from maximum volume, 0.5dB steps + * (0x00 = full volume, 0xFE= muted, 0xFF analog power down mode) + * @param left vol left channel attenuation from maximum volume, 0.5dB steps + * (0x00 = full volume, 0xFE= muted, 0xFF analog power down mode) + * + */ + void setvolume(unsigned char vRight, unsigned char vLeft); + + /** Get the current decodet time + * + * @param playtime a pointer to a string where the function will write the time in the format + * MM:SS + */ + void getplaytime(char *playtime); + + /** Start a sine test to verify codec functionality + * + * @param pitch is a composite value. Use 0x7E to play a tone at 5KHz sampled at 22050Hz. + * Use zero to stop to play. + * @code + * codec.sinetest( 0x7E); // start the sine test... + * wait( 1); // wait 1 sec.. + * codec.sinetest( 0x00); // stop the sine test... + * @endcode + */ + void sinetest(unsigned char pitch); + + /** Load a VLSI patch code inside the codec. The library is rev 1.5 + * This patch enable some features like VMeter. + */ + void loadpatch(void); + +#ifdef __ENCODE_OGG + /** Load a VLSI patch code to encode OGG audio file. + * This file will encode at fixed quality. Read the VLSIcodec_OGG.h for more... + */ + void loadoggpatch(void); +#endif + +#ifdef __PLUGINGA + /** Load a VLSI patch code that add a 23 band Graphics Analizer. + * + */ + void loadgapatch(void); + void readgavalue( unsigned char *currval, unsigned char *peak); + unsigned short readgabands( void); +#endif + + + /** Start the Vmeter functionallity. + * + */ + void setvmeter( void); + + /** Get vmeter values. Values from 0 to 31 are valid for both channels + * Calculates the peak sample value from both channels and returns the values in 3 dB + * + * @param left left channel value + * @param right right channel value + */ + void getvmeterval( unsigned char* left, unsigned char* right); + + /** Put the codec in reset for reduce power consuption. + * Re-init the codec for wake-up. + */ + void lowpower( void); + +#ifdef __ENCODE_OGG + /** Start the encoding. Reset and then load the patch to record a audio stream. + */ + void VoggEncoding_Start( void); + + /** Read the encoded samples. + * + * @param *voggSample pointer to array to store the sample + * @return number of byte write. + */ + unsigned int VoggEncoding_ReadBuffer( unsigned char *voggSample); + + /** Stop the encoding and return the last buffer encoded. + * + * @param *voggSample pointer to array to store the sample + * @return number of byte write. + */ + unsigned int VoggEncoding_Stop( unsigned char *voggSample); +#endif + +protected: + // + unsigned short readreg(unsigned char vAddress); + void writereg(unsigned char vAddress, unsigned int wValue); + void writeregnowait(unsigned char vAddress, unsigned int wValue); + // + SPI _spi; + DigitalOut _cs; + DigitalIn _dreq; + DigitalOut _rst; + DigitalOut _xdcs; + +}; + +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VLSIcodec_patch.h Wed May 23 06:28:16 2012 +0000 @@ -0,0 +1,206 @@ +/* User application code loading tables for VS10xx */ +/* rev 1.5 */ +#if 0 +void LoadUserCode(void) { + int i = 0; + + while (i<sizeof(plugin)/sizeof(plugin[0])) { + unsigned short addr, n, val; + addr = plugin[i++]; + n = plugin[i++]; + if (n & 0x8000U) { /* RLE run, replicate n samples */ + n &= 0x7FFF; + val = plugin[i++]; + while (n--) { + WriteVS10xxRegister(addr, val); + } + } else { /* Copy run, copy n samples */ + while (n--) { + val = plugin[i++]; + WriteVS10xxRegister(addr, val); + } + } + } +} +#endif + +#ifndef SKIP_PLUGIN_VARNAME +#define PLUGIN_SIZE 1377 +const unsigned short plugin[1377] = { /* Compressed plugin */ +#endif + 0x0007, 0x0001, 0x8300, 0x0006, 0x0322, 0xb080, 0x1402, 0x0fdf, /* 0 */ + 0xffc1, 0x0007, 0x9257, 0xb212, 0x3c00, 0x3d00, 0x4024, 0x0030, /* 8 */ + 0x0297, 0x3f00, 0x0024, 0x0006, 0x0017, 0x3f10, 0x0024, 0x3f00, /* 10 */ + 0x0024, 0x0001, 0x1317, 0xf400, 0x55c0, 0x0000, 0x0817, 0xf400, /* 18 */ + 0x57c0, 0xc090, 0x0024, 0x0006, 0x0297, 0x3f00, 0x0024, 0x0000, /* 20 */ + 0x0000, 0x0007, 0x81d7, 0x3f10, 0x0024, 0x3f10, 0x0024, 0x0006, /* 28 */ + 0x01d7, 0x3f00, 0x0024, 0x0000, 0x190d, 0x000f, 0xf94f, 0x0000, /* 30 */ + 0xc80e, 0x280f, 0xe100, 0x0006, 0x2016, 0x0006, 0x0197, 0x0006, /* 38 */ + 0xa115, 0xb080, 0x0024, 0x3f00, 0x3400, 0x0006, 0xa157, 0x3009, /* 40 */ + 0x1c00, 0x0006, 0x01d7, 0x0000, 0x190d, 0x000a, 0x708f, 0x0000, /* 48 */ + 0xd10e, 0x290b, 0x1a80, 0x3f00, 0x184c, 0x0030, 0x0017, 0x4080, /* 50 */ + 0x1c01, 0x0000, 0x0200, 0x2800, 0xc715, 0xb102, 0x0024, 0x0000, /* 58 */ + 0xc808, 0x2800, 0xc715, 0x0000, 0xcd0e, 0x0011, 0x210f, 0x0000, /* 60 */ + 0xfa0d, 0x280f, 0xcb00, 0x3613, 0x0024, 0x0006, 0xa115, 0x0006, /* 68 */ + 0x01d7, 0x37f0, 0x1401, 0x6100, 0x1c01, 0x4012, 0x0024, 0x0000, /* 70 */ + 0x8000, 0x6010, 0x0024, 0x34f3, 0x0400, 0x2800, 0xcfd8, 0x0000, /* 78 */ + 0x0024, 0x0000, 0x8001, 0x6010, 0x3c01, 0x0000, 0x000d, 0x2811, /* 80 */ + 0x8259, 0x0000, 0x0024, 0x2a11, 0x2100, 0x0030, 0x0257, 0x3700, /* 88 */ + 0x8024, 0x4284, 0x0024, 0x0000, 0x0024, 0x2800, 0xd315, 0x0006, /* 90 */ + 0x0197, 0x0006, 0xa115, 0x3f00, 0xb402, 0x4d86, 0x0024, 0x0000, /* 98 */ + 0x190d, 0x2800, 0xd755, 0x0014, 0x1b01, 0x0020, 0x480f, 0x0000, /* a0 */ + 0xd60e, 0x2920, 0x41c0, 0x0000, 0xfa0d, 0x000a, 0x708f, 0x0000, /* a8 */ + 0xd10e, 0x280a, 0xcac0, 0x0000, 0xfa0d, 0x0039, 0x324f, 0x0000, /* b0 */ + 0xe90e, 0x2820, 0x4a18, 0xb882, 0x0024, 0x2a20, 0x48c0, 0x003f, /* b8 */ + 0xfd00, 0xb700, 0x0024, 0x003f, 0xf901, 0x6010, 0x0024, 0x0014, /* c0 */ + 0x1b01, 0x280a, 0xc505, 0x0000, 0x190d, 0x0015, 0x59c0, 0x6fc2, /* c8 */ + 0x0024, 0x0000, 0x0024, 0x2800, 0xe195, 0x0000, 0x18c2, 0x290c, /* d0 */ + 0x4840, 0x3613, 0x0024, 0x290c, 0x4840, 0x4086, 0x184c, 0x6234, /* d8 */ + 0x0024, 0x0000, 0x1d02, 0x2800, 0xdd15, 0x6234, 0x0024, 0x0030, /* e0 */ + 0x0317, 0x2800, 0xe180, 0x3f00, 0x0024, 0x0000, 0x1d82, 0x2800, /* e8 */ + 0xdfd5, 0x6234, 0x0024, 0x2912, 0x0d00, 0x4084, 0x184c, 0xf200, /* f0 */ + 0x0024, 0x6200, 0x0024, 0x0006, 0x0017, 0xb080, 0x3c40, 0x2800, /* f8 */ + 0xe180, 0x3f00, 0x0024, 0x0000, 0x0202, 0x2800, 0xe195, 0xa024, /* 100 */ + 0x0024, 0xc020, 0x0024, 0x0030, 0x02d7, 0x2800, 0xe180, 0x3f00, /* 108 */ + 0x0024, 0x000c, 0x0981, 0x280a, 0x71c0, 0x002c, 0x9d40, 0x3613, /* 110 */ + 0x0024, 0x3e10, 0xb803, 0x3e14, 0x3811, 0x3e11, 0x3805, 0x3e00, /* 118 */ + 0x3801, 0x0007, 0xc390, 0x0006, 0xa011, 0x3010, 0x0444, 0x3050, /* 120 */ + 0x4405, 0x6458, 0x0302, 0xff94, 0x4081, 0x0003, 0xffc5, 0x48b6, /* 128 */ + 0x0024, 0xff82, 0x0024, 0x42b2, 0x0042, 0xb458, 0x0003, 0x4cd6, /* 130 */ + 0x9801, 0xf248, 0x1bc0, 0xb58a, 0x0024, 0x6de6, 0x1804, 0x0006, /* 138 */ + 0x0010, 0x3810, 0x9bc5, 0x3800, 0xc024, 0x36f4, 0x1811, 0x36f0, /* 140 */ + 0x9803, 0x283e, 0x2d80, 0x0fff, 0xffc3, 0x003e, 0x2d4f, 0x2800, /* 148 */ + 0xfa80, 0x0000, 0xe24e, 0x3413, 0x0024, 0x2800, 0xeb05, 0xf400, /* 150 */ + 0x4510, 0x2800, 0xeec0, 0x6894, 0x13cc, 0x3000, 0x184c, 0x6090, /* 158 */ + 0x93cc, 0x38b0, 0x3812, 0x3004, 0x4024, 0x0000, 0x0910, 0x3183, /* 160 */ + 0x0024, 0x3100, 0x4024, 0x6016, 0x0024, 0x000c, 0x8012, 0x2800, /* 168 */ + 0xee11, 0xb884, 0x104c, 0x6894, 0x3002, 0x2939, 0xb0c0, 0x3e10, /* 170 */ + 0x93cc, 0x4084, 0x9bd2, 0x4282, 0x0024, 0x0000, 0x0041, 0x2800, /* 178 */ + 0xf0c5, 0x6212, 0x0024, 0x0000, 0x0040, 0x2800, 0xf5c5, 0x000c, /* 180 */ + 0x8390, 0x2a00, 0xf940, 0x34c3, 0x0024, 0x3444, 0x0024, 0x3073, /* 188 */ + 0x0024, 0x3053, 0x0024, 0x3000, 0x0024, 0x6092, 0x098c, 0x0000, /* 190 */ + 0x0241, 0x2800, 0xf945, 0x32a0, 0x0024, 0x6012, 0x0024, 0x0000, /* 198 */ + 0x0024, 0x2800, 0xf955, 0x0000, 0x0024, 0x3613, 0x0024, 0x3001, /* 1a0 */ + 0x3844, 0x2920, 0x0580, 0x3009, 0x3852, 0xc090, 0x9bd2, 0x2800, /* 1a8 */ + 0xf940, 0x3800, 0x1bc4, 0x000c, 0x4113, 0xb880, 0x2380, 0x3304, /* 1b0 */ + 0x4024, 0x3800, 0x05cc, 0xcc92, 0x05cc, 0x3910, 0x0024, 0x3910, /* 1b8 */ + 0x4024, 0x000c, 0x8110, 0x3910, 0x0024, 0x39f0, 0x4024, 0x3810, /* 1c0 */ + 0x0024, 0x38d0, 0x4024, 0x3810, 0x0024, 0x38f0, 0x4024, 0x34c3, /* 1c8 */ + 0x0024, 0x3444, 0x0024, 0x3073, 0x0024, 0x3063, 0x0024, 0x3000, /* 1d0 */ + 0x0024, 0x4080, 0x0024, 0x0000, 0x0024, 0x2839, 0x53d5, 0x4284, /* 1d8 */ + 0x0024, 0x3613, 0x0024, 0x2800, 0xfc85, 0x6898, 0xb804, 0x0000, /* 1e0 */ + 0x0084, 0x293b, 0x1cc0, 0x3613, 0x0024, 0x000c, 0x8117, 0x3711, /* 1e8 */ + 0x0024, 0x37d1, 0x4024, 0x4e8a, 0x0024, 0x0000, 0x0015, 0x2800, /* 1f0 */ + 0xff45, 0xce9a, 0x0024, 0x3f11, 0x0024, 0x3f01, 0x4024, 0x000c, /* 1f8 */ + 0x8197, 0x408a, 0x9bc4, 0x3f15, 0x4024, 0x2801, 0x0185, 0x4284, /* 200 */ + 0x3c15, 0x6590, 0x0024, 0x0000, 0x0024, 0x2839, 0x53d5, 0x4284, /* 208 */ + 0x0024, 0x0000, 0x0024, 0x2800, 0xe9d8, 0x458a, 0x0024, 0x2a39, /* 210 */ + 0x53c0, 0x3009, 0x3851, 0x3e14, 0xf812, 0x3e12, 0xb817, 0x3e11, /* 218 */ + 0x8024, 0x0006, 0x0293, 0x3301, 0x8024, 0x468c, 0x3804, 0x0006, /* 220 */ + 0xa057, 0x2801, 0x08c4, 0x0006, 0x0011, 0x469c, 0x0024, 0x3be1, /* 228 */ + 0x8024, 0x2801, 0x08d5, 0x0006, 0xc392, 0x3311, 0x0024, 0x33f1, /* 230 */ + 0x2844, 0x3009, 0x2bc4, 0x0030, 0x04d2, 0x3311, 0x0024, 0x3a11, /* 238 */ + 0x0024, 0x3201, 0x8024, 0x003f, 0xfc04, 0xb64c, 0x0fc4, 0xc648, /* 240 */ + 0x0024, 0x3a01, 0x0024, 0x3111, 0x1fd3, 0x6498, 0x07c6, 0x868c, /* 248 */ + 0x2444, 0x0023, 0xffd2, 0x3901, 0x8e06, 0x0030, 0x0551, 0x3911, /* 250 */ + 0x8e06, 0x3961, 0x9c44, 0xf400, 0x44c6, 0xd46c, 0x1bc4, 0x36f1, /* 258 */ + 0xbc13, 0x2801, 0x1255, 0x36f2, 0x9817, 0x002b, 0xffd2, 0x3383, /* 260 */ + 0x188c, 0x3e01, 0x8c06, 0x0006, 0xa097, 0x3009, 0x1c12, 0x3213, /* 268 */ + 0x0024, 0x468c, 0xbc12, 0x002b, 0xffd2, 0xf400, 0x4197, 0x2801, /* 270 */ + 0x0f44, 0x3713, 0x0024, 0x2801, 0x0f85, 0x37e3, 0x0024, 0x3009, /* 278 */ + 0x2c17, 0x3383, 0x0024, 0x3009, 0x0c06, 0x468c, 0x4197, 0x0006, /* 280 */ + 0xa052, 0x2801, 0x1184, 0x3713, 0x2813, 0x2801, 0x11c5, 0x37e3, /* 288 */ + 0x0024, 0x3009, 0x2c17, 0x36f1, 0x8024, 0x36f2, 0x9817, 0x36f4, /* 290 */ + 0xd812, 0x2100, 0x0000, 0x3904, 0x5bd1, 0x2a01, 0x028e, 0x3e11, /* 298 */ + 0x7804, 0x0030, 0x0257, 0x3701, 0x0024, 0x0013, 0x4d05, 0xd45b, /* 2a0 */ + 0xe0e1, 0x0007, 0xc795, 0x2801, 0x19d5, 0x0fff, 0xff45, 0x3511, /* 2a8 */ + 0x184c, 0x4488, 0xb808, 0x0006, 0x8a97, 0x2801, 0x1985, 0x3009, /* 2b0 */ + 0x1c40, 0x3511, 0x1fc1, 0x0000, 0x0020, 0xac52, 0x1405, 0x6ce2, /* 2b8 */ + 0x0024, 0x0000, 0x0024, 0x2801, 0x1981, 0x68c2, 0x0024, 0x291a, /* 2c0 */ + 0x8a40, 0x3e10, 0x0024, 0x2921, 0xca80, 0x3e00, 0x4024, 0x36f3, /* 2c8 */ + 0x0024, 0x3009, 0x1bc8, 0x36f0, 0x1801, 0x3601, 0x5804, 0x3e13, /* 2d0 */ + 0x780f, 0x3e13, 0xb808, 0x0008, 0x9b0f, 0x0001, 0x1c8e, 0x2908, /* 2d8 */ + 0x9300, 0x0000, 0x004d, 0x36f3, 0x9808, 0x2000, 0x0000, 0x36f3, /* 2e0 */ + 0x580f, 0x0006, 0xc610, 0x0007, 0x81d7, 0x3710, 0x0024, 0x3700, /* 2e8 */ + 0x4024, 0x0034, 0x0002, 0x0000, 0x01c3, 0x6dc6, 0x8001, 0xff32, /* 2f0 */ + 0x4043, 0x48b2, 0x0024, 0xffa6, 0x0024, 0x40b2, 0x0024, 0xb386, /* 2f8 */ + 0x4142, 0x0000, 0x0106, 0x2914, 0xaa80, 0xad66, 0x0024, 0x6c96, /* 300 */ + 0x0024, 0x0000, 0x0201, 0xf1d6, 0x0024, 0x61de, 0x0024, 0x0006, /* 308 */ + 0xc612, 0x2801, 0x2241, 0x0006, 0xc713, 0x4c86, 0x0024, 0x2912, /* 310 */ + 0x1180, 0x0006, 0xc351, 0x0006, 0x0210, 0x2912, 0x0d00, 0x3810, /* 318 */ + 0x984c, 0xf200, 0x2043, 0x2808, 0xa000, 0x3800, 0x0024, 0x0007, /* 320 */ + 0x0001, 0x802e, 0x0006, 0x0002, 0x2801, 0x1340, 0x0007, 0x0001, /* 328 */ + 0x8050, 0x0006, 0x008c, 0x3e12, 0x3800, 0x3e10, 0xb804, 0x0030, /* 330 */ + 0x0015, 0x0008, 0x0002, 0x3511, 0x0024, 0xb428, 0x1402, 0x0000, /* 338 */ + 0x8004, 0x2910, 0x0195, 0x0000, 0x1508, 0xb428, 0x0024, 0x0006, /* 340 */ + 0x0095, 0x2800, 0x1f45, 0x3e13, 0x780e, 0x3e11, 0x7803, 0x3e13, /* 348 */ + 0xf806, 0x3e01, 0xf801, 0x3510, 0x8024, 0x3510, 0xc024, 0x0000, /* 350 */ + 0x0021, 0xf2d6, 0x1444, 0x4090, 0x1745, 0x0000, 0x0022, 0xf2ea, /* 358 */ + 0x4497, 0x2400, 0x1b00, 0x6090, 0x1c46, 0xfe6c, 0x0024, 0xcdb6, /* 360 */ + 0x1c46, 0xfe6c, 0x0024, 0xceba, 0x1c46, 0x4d86, 0x3442, 0x0000, /* 368 */ + 0x09c7, 0x2800, 0x1c85, 0xf5d4, 0x3443, 0x6724, 0x0024, 0x4e8a, /* 370 */ + 0x3444, 0x0000, 0x0206, 0x2800, 0x1dc5, 0xf5e8, 0x3705, 0x6748, /* 378 */ + 0x0024, 0xa264, 0x9801, 0xc248, 0x1bc7, 0x0030, 0x03d5, 0x3d01, /* 380 */ + 0x0024, 0x36f3, 0xd806, 0x3601, 0x5803, 0x36f3, 0x0024, 0x36f3, /* 388 */ + 0x580e, 0x2911, 0xf140, 0x3600, 0x9844, 0x0030, 0x0057, 0x3700, /* 390 */ + 0x0024, 0xf200, 0x4595, 0x0fff, 0xfe02, 0xa024, 0x164c, 0x8000, /* 398 */ + 0x17cc, 0x3f00, 0x0024, 0x3500, 0x0024, 0x0021, 0x6d82, 0xd024, /* 3a0 */ + 0x44c0, 0x0006, 0xa402, 0x2800, 0x2495, 0xd024, 0x0024, 0x0000, /* 3a8 */ + 0x0000, 0x2800, 0x2495, 0x000b, 0x6d57, 0x3009, 0x3c00, 0x36f0, /* 3b0 */ + 0x8024, 0x36f2, 0x1800, 0x2000, 0x0000, 0x0000, 0x0024, 0x0007, /* 3b8 */ + 0x0001, 0x8030, 0x0006, 0x0002, 0x2800, 0x1400, 0x0007, 0x0001, /* 3c0 */ + 0x8096, 0x0006, 0x001c, 0x3e12, 0xb817, 0x3e14, 0xf812, 0x3e01, /* 3c8 */ + 0xb811, 0x0007, 0x9717, 0x0020, 0xffd2, 0x0030, 0x11d1, 0x3111, /* 3d0 */ + 0x8024, 0x3704, 0xc024, 0x3b81, 0x8024, 0x3101, 0x8024, 0x3b81, /* 3d8 */ + 0x8024, 0x3f04, 0xc024, 0x2808, 0x4800, 0x36f1, 0x9811, 0x0007, /* 3e0 */ + 0x0001, 0x8028, 0x0006, 0x0002, 0x2a00, 0x258e, 0x0007, 0x0001, /* 3e8 */ + 0x8032, 0x0006, 0x0002, 0x2800, 0x2900, 0x0007, 0x0001, 0x80a4, /* 3f0 */ + 0x0006, 0x0164, 0x3e12, 0xb817, 0x3e12, 0x3815, 0x3e05, 0xb814, /* 3f8 */ + 0x3625, 0x0024, 0x0000, 0x800a, 0x3e10, 0x3801, 0x3e10, 0xb803, /* 400 */ + 0x3e11, 0x3805, 0x3e11, 0xb807, 0x3e14, 0x3811, 0x0006, 0xa090, /* 408 */ + 0x2912, 0x0d00, 0x3e14, 0xc024, 0x4088, 0x8000, 0x4080, 0x0024, /* 410 */ + 0x0007, 0x90d1, 0x2800, 0x2ec5, 0x0000, 0x0024, 0x0007, 0x9051, /* 418 */ + 0x3100, 0x4024, 0x4100, 0x0024, 0x3900, 0x0024, 0x0007, 0x90d1, /* 420 */ + 0x0004, 0x0000, 0x31f0, 0x4024, 0x6014, 0x0400, 0x0007, 0x9051, /* 428 */ + 0x2800, 0x32d1, 0x4080, 0x0024, 0x0000, 0x0000, 0x2800, 0x3285, /* 430 */ + 0x0000, 0x0024, 0x0007, 0x9053, 0x3300, 0x0024, 0x4080, 0x0024, /* 438 */ + 0x0000, 0x0000, 0x2800, 0x32d8, 0x0000, 0x0024, 0x3900, 0x0024, /* 440 */ + 0x3200, 0x504c, 0x6410, 0x0024, 0x3cf0, 0x0000, 0x4080, 0x0024, /* 448 */ + 0x0006, 0xc691, 0x2800, 0x4985, 0x0000, 0x1001, 0x0007, 0x9051, /* 450 */ + 0x3100, 0x0024, 0x6012, 0x0024, 0x0006, 0xc6d0, 0x2800, 0x3e49, /* 458 */ + 0x003f, 0xe000, 0x0006, 0xc693, 0x3900, 0x0c00, 0x3009, 0x0001, /* 460 */ + 0x6014, 0x0024, 0x0007, 0x1ad0, 0x2800, 0x3e55, 0x3009, 0x0000, /* 468 */ + 0x4090, 0x0024, 0x0000, 0x0301, 0x2800, 0x3999, 0x3009, 0x0000, /* 470 */ + 0xc012, 0x0024, 0x2800, 0x3e40, 0x3009, 0x2001, 0x6012, 0x0024, /* 478 */ + 0x0000, 0x0341, 0x2800, 0x3b55, 0x0000, 0x0024, 0x6190, 0x0024, /* 480 */ + 0x2800, 0x3e40, 0x3009, 0x2000, 0x6012, 0x0024, 0x0000, 0x0381, /* 488 */ + 0x2800, 0x3d15, 0x0000, 0x0024, 0x6190, 0x0024, 0x2800, 0x3e40, /* 490 */ + 0x3009, 0x2000, 0x6012, 0x0024, 0x0000, 0x00c0, 0x2800, 0x3e55, /* 498 */ + 0x0000, 0x0024, 0x3009, 0x2000, 0x0006, 0xa090, 0x3009, 0x0000, /* 4a0 */ + 0x4080, 0x0024, 0x0000, 0x0081, 0x2800, 0x42d5, 0x0007, 0x8c13, /* 4a8 */ + 0x3300, 0x104c, 0xb010, 0x0024, 0x0002, 0x8001, 0x2800, 0x4585, /* 4b0 */ + 0x34f0, 0x0024, 0x2800, 0x42c0, 0x0000, 0x0024, 0x3009, 0x0000, /* 4b8 */ + 0x6090, 0x0024, 0x3009, 0x2000, 0x2900, 0x0b80, 0x3009, 0x0405, /* 4c0 */ + 0x0006, 0xc6d1, 0x0006, 0xc690, 0x3009, 0x0000, 0x3009, 0x0401, /* 4c8 */ + 0x6014, 0x0024, 0x0006, 0xc351, 0x2800, 0x4191, 0x0006, 0xa093, /* 4d0 */ + 0xb880, 0x0024, 0x2800, 0x5200, 0x3009, 0x2c00, 0x4040, 0x0024, /* 4d8 */ + 0x6012, 0x0024, 0x0006, 0xc6d0, 0x2800, 0x5218, 0x0006, 0xc693, /* 4e0 */ + 0x3009, 0x0c00, 0x3009, 0x0001, 0x6014, 0x0024, 0x0006, 0xc350, /* 4e8 */ + 0x2800, 0x5201, 0x0000, 0x0024, 0x6090, 0x0024, 0x3009, 0x2c00, /* 4f0 */ + 0x3009, 0x0005, 0x2900, 0x0b80, 0x0000, 0x5208, 0x3009, 0x0400, /* 4f8 */ + 0x4080, 0x0024, 0x0003, 0x8000, 0x2800, 0x5205, 0x0000, 0x0024, /* 500 */ + 0x6400, 0x0024, 0x0000, 0x0081, 0x2800, 0x5209, 0x0007, 0x8c13, /* 508 */ + 0x3300, 0x0024, 0xb010, 0x0024, 0x0006, 0xc650, 0x2800, 0x5215, /* 510 */ + 0x0001, 0x0002, 0x3413, 0x0000, 0x3009, 0x0401, 0x4010, 0x8406, /* 518 */ + 0x0000, 0x0281, 0xa010, 0x13c1, 0x4122, 0x0024, 0x0000, 0x03c2, /* 520 */ + 0x6122, 0x8002, 0x462c, 0x0024, 0x469c, 0x0024, 0xfee2, 0x0024, /* 528 */ + 0x48be, 0x0024, 0x6066, 0x8400, 0x0006, 0xc350, 0x2800, 0x5201, /* 530 */ + 0x0000, 0x0024, 0x4090, 0x0024, 0x3009, 0x2400, 0x2900, 0x0b80, /* 538 */ + 0x3009, 0x0005, 0x2912, 0x0d00, 0x3613, 0x0024, 0x3a00, 0x0024, /* 540 */ + 0x36f4, 0xc024, 0x36f4, 0x1811, 0x36f1, 0x9807, 0x36f1, 0x1805, /* 548 */ + 0x36f0, 0x9803, 0x36f0, 0x1801, 0x3405, 0x9014, 0x36f3, 0x0024, /* 550 */ + 0x36f2, 0x1815, 0x2000, 0x0000, 0x36f2, 0x9817, 0x000a, 0x0001, /* 558 */ + 0x0300, +#ifndef SKIP_PLUGIN_VARNAME +}; +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VLSIcodec_pluginGA.h Wed May 23 06:28:16 2012 +0000 @@ -0,0 +1,155 @@ +/* User application code loading tables for VS10xx */ +/* Spectrum Analizer plugin ver.0.9 */ + +#if 0 +void LoadUserCode(void) { + int i = 0; + + while (i<sizeof(plugin)/sizeof(plugin[0])) { + unsigned short addr, n, val; + addr = plugin[i++]; + n = plugin[i++]; + if (n & 0x8000U) { /* RLE run, replicate n samples */ + n &= 0x7FFF; + val = plugin[i++]; + while (n--) { + WriteVS10xxRegister(addr, val); + } + } else { /* Copy run, copy n samples */ + while (n--) { + val = plugin[i++]; + WriteVS10xxRegister(addr, val); + } + } + } +} +#endif + +#ifndef SKIP_PLUGIN_VARNAME +#define PLUGINGA_SIZE 968 +const unsigned short gaplugin[968] = { /* Compressed plugin */ +#endif + 0x0007, 0x0001, 0x8050, 0x0006, 0x0018, 0x3613, 0x0024, 0x3e00, /* 0 */ + 0x3801, 0x0000, 0x16d7, 0xf400, 0x55c0, 0x0000, 0x0c17, 0xf400, /* 8 */ + 0x57c0, 0x0007, 0x9257, 0xb080, 0x0024, 0x3f00, 0x0024, 0x2000, /* 10 */ + 0x0000, 0x36f0, 0x1801, 0x2800, 0x31c0, 0x0007, 0x0001, 0x805c, /* 18 */ + 0x0006, 0x00d6, 0x3e12, 0xb817, 0x3e12, 0x3815, 0x3e05, 0xb814, /* 20 */ + 0x3615, 0x0024, 0x0000, 0x800a, 0x3e10, 0x3801, 0x0006, 0x0000, /* 28 */ + 0x3e10, 0xb803, 0x0000, 0x0303, 0x3e11, 0x3805, 0x3e11, 0xb807, /* 30 */ + 0x3e14, 0x3812, 0xb884, 0x130c, 0x3410, 0x4024, 0x4112, 0x10d0, /* 38 */ + 0x4010, 0x008c, 0x4010, 0x0024, 0xf400, 0x4012, 0x3000, 0x3840, /* 40 */ + 0x3009, 0x3801, 0x0000, 0x0041, 0xfe02, 0x0024, 0x2900, 0x8440, /* 48 */ + 0x48b2, 0x0024, 0x36f3, 0x0844, 0x6306, 0x8845, 0xae3a, 0x8840, /* 50 */ + 0xbf8e, 0x8b41, 0xac32, 0xa846, 0xffc8, 0xabc7, 0x3e01, 0x7800, /* 58 */ + 0xf400, 0x4480, 0x6090, 0x0024, 0x6090, 0x0024, 0xf400, 0x4015, /* 60 */ + 0x3009, 0x3446, 0x3009, 0x37c7, 0x3009, 0x1800, 0x3009, 0x3844, /* 68 */ + 0x48b3, 0xe1e0, 0x4882, 0x4040, 0xfeca, 0x0024, 0x5ac2, 0x0024, /* 70 */ + 0x5a52, 0x0024, 0x4cc2, 0x0024, 0x48ba, 0x4040, 0x4eea, 0x4801, /* 78 */ + 0x4eca, 0x9800, 0xff80, 0x1bc1, 0xf1eb, 0xe3e2, 0xf1ea, 0x184c, /* 80 */ + 0x4c8b, 0xe5e4, 0x48be, 0x9804, 0x488e, 0x41c6, 0xfe82, 0x0024, /* 88 */ + 0x5a8e, 0x0024, 0x525e, 0x1b85, 0x4ffe, 0x0024, 0x48b6, 0x41c6, /* 90 */ + 0x4dd6, 0x48c7, 0x4df6, 0x0024, 0xf1d6, 0x0024, 0xf1d6, 0x0024, /* 98 */ + 0x4eda, 0x0024, 0x0000, 0x0fc3, 0x2900, 0x8440, 0x4e82, 0x0024, /* a0 */ + 0x4084, 0x130c, 0x0006, 0x0100, 0x3440, 0x4024, 0x4010, 0x0024, /* a8 */ + 0xf400, 0x4012, 0x3200, 0x4024, 0xb132, 0x0024, 0x4214, 0x0024, /* b0 */ + 0xf224, 0x0024, 0x6230, 0x0024, 0x0001, 0x0001, 0x2800, 0x2b49, /* b8 */ + 0x0000, 0x0024, 0xf400, 0x40c2, 0x3200, 0x0024, 0xff82, 0x0024, /* c0 */ + 0x48b2, 0x0024, 0xb130, 0x0024, 0x6202, 0x0024, 0x003f, 0xf001, /* c8 */ + 0x2800, 0x2e51, 0x0000, 0x1046, 0xfe64, 0x0024, 0x48be, 0x0024, /* d0 */ + 0x2800, 0x2f40, 0x3a01, 0x8024, 0x3200, 0x0024, 0xb010, 0x0024, /* d8 */ + 0xc020, 0x0024, 0x3a00, 0x0024, 0x36f4, 0x1812, 0x36f1, 0x9807, /* e0 */ + 0x36f1, 0x1805, 0x36f0, 0x9803, 0x36f0, 0x1801, 0x3405, 0x9014, /* e8 */ + 0x36f3, 0x0024, 0x36f2, 0x1815, 0x2000, 0x0000, 0x36f2, 0x9817, /* f0 */ + 0x0007, 0x0001, 0x80c7, 0x0006, 0x01c0, 0x3e12, 0xb817, 0x3e12, /* f8 */ + 0x3815, 0x3e05, 0xb814, 0x3625, 0x0024, 0x0000, 0x800a, 0x3e10, /* 100 */ + 0x7802, 0x3e10, 0xf804, 0x3e11, 0x7810, 0x3e14, 0x7813, 0x0006, /* 108 */ + 0x0051, 0x3e13, 0xf80e, 0x3e13, 0x4024, 0x3009, 0x3840, 0x3009, /* 110 */ + 0x3852, 0x2911, 0xf140, 0x0006, 0x06d0, 0x3100, 0x5bd2, 0x0006, /* 118 */ + 0xc351, 0x3009, 0x1800, 0x3009, 0x0402, 0x6126, 0x0024, 0x0006, /* 120 */ + 0x00d1, 0x2800, 0x4d05, 0xb882, 0x0024, 0x0006, 0x0011, 0x3009, /* 128 */ + 0x3850, 0x0006, 0x0010, 0x3009, 0x3800, 0x2914, 0xbec0, 0x0000, /* 130 */ + 0x1800, 0x0006, 0x0010, 0xb882, 0x0024, 0x2915, 0x7ac0, 0x0000, /* 138 */ + 0x1700, 0x0000, 0x0301, 0x3900, 0x5bc0, 0x0006, 0xc351, 0x3009, /* 140 */ + 0x1bd0, 0x3009, 0x0404, 0x0006, 0x0051, 0x2800, 0x3d00, 0x3901, /* 148 */ + 0x0024, 0x4448, 0x0401, 0x4192, 0x0024, 0x6498, 0x2401, 0x001f, /* 150 */ + 0x4001, 0x6412, 0x0024, 0x0006, 0x0011, 0x2800, 0x3c51, 0x0000, /* 158 */ + 0x058e, 0x2400, 0x4c0e, 0x0000, 0x0013, 0x0006, 0x0051, 0x0006, /* 160 */ + 0x1a03, 0x3100, 0x4024, 0xf212, 0x44c4, 0x4346, 0x0024, 0xf400, /* 168 */ + 0x40d5, 0x3500, 0x8024, 0x612a, 0x0024, 0x0000, 0x0024, 0x2800, /* 170 */ + 0x4c51, 0x0000, 0x0024, 0x3613, 0x0024, 0x3100, 0x3800, 0x2915, /* 178 */ + 0x7dc0, 0xf200, 0x0024, 0x003f, 0xfec2, 0x4082, 0x4411, 0x3113, /* 180 */ + 0x1bc0, 0xa122, 0x0024, 0x0000, 0x2002, 0x6124, 0x2401, 0x0000, /* 188 */ + 0x1002, 0x2800, 0x4608, 0x0000, 0x0024, 0x003f, 0xf802, 0x3100, /* 190 */ + 0x4024, 0xb124, 0x0024, 0x2800, 0x4bc0, 0x3900, 0x8024, 0x6124, /* 198 */ + 0x0024, 0x0000, 0x0802, 0x2800, 0x4848, 0x0000, 0x0024, 0x003f, /* 1a0 */ + 0xfe02, 0x3100, 0x4024, 0xb124, 0x0024, 0x2800, 0x4bc0, 0x3900, /* 1a8 */ + 0x8024, 0x6124, 0x0024, 0x0000, 0x0402, 0x2800, 0x4a88, 0x0000, /* 1b0 */ + 0x0024, 0x003f, 0xff02, 0x3100, 0x4024, 0xb124, 0x0024, 0x2800, /* 1b8 */ + 0x4bc0, 0x3900, 0x8024, 0x6124, 0x0401, 0x003f, 0xff82, 0x2800, /* 1c0 */ + 0x4bc8, 0xb124, 0x0024, 0x3900, 0x8024, 0xb882, 0x8c4c, 0x3830, /* 1c8 */ + 0x4024, 0x0006, 0x0091, 0x3904, 0xd84c, 0x0006, 0x00d1, 0x0000, /* 1d0 */ + 0x0013, 0x3100, 0x904c, 0x4202, 0x9bcc, 0x39f0, 0x4024, 0x3100, /* 1d8 */ + 0x4024, 0x3c00, 0x4024, 0xf400, 0x44c1, 0x34f0, 0x8024, 0x6126, /* 1e0 */ + 0x0024, 0x0006, 0x06d0, 0x2800, 0x5dd8, 0x4294, 0x0024, 0x2400, /* 1e8 */ + 0x5d82, 0x0000, 0x0024, 0xf400, 0x4411, 0x3123, 0x0024, 0x3100, /* 1f0 */ + 0x8024, 0x4202, 0x0024, 0x4182, 0x2401, 0x0000, 0x2002, 0x2800, /* 1f8 */ + 0x5d89, 0x0000, 0x0024, 0x3013, 0x184c, 0x30f0, 0x7852, 0x6124, /* 200 */ + 0xb850, 0x0006, 0x0001, 0x2800, 0x5588, 0x4088, 0x44c2, 0x4224, /* 208 */ + 0x0024, 0x4122, 0x0024, 0x4122, 0x0024, 0xf400, 0x4051, 0x2900, /* 210 */ + 0x7440, 0x0000, 0x56c8, 0x4224, 0x0024, 0x4122, 0x0024, 0x4122, /* 218 */ + 0x0024, 0x2900, 0x69c0, 0xf400, 0x4051, 0x0004, 0x0002, 0x3009, /* 220 */ + 0x1bd0, 0x3023, 0x1bd2, 0x30e0, 0x4024, 0x6124, 0x0024, 0x0000, /* 228 */ + 0x4002, 0x2800, 0x5988, 0x0000, 0x0024, 0x0000, 0x0001, 0x3820, /* 230 */ + 0x4024, 0x30e0, 0x4024, 0x6124, 0x0001, 0x003f, 0xff42, 0x2800, /* 238 */ + 0x5d88, 0x4182, 0x0024, 0x0000, 0x0024, 0x2800, 0x5d95, 0x0000, /* 240 */ + 0x0024, 0x3613, 0x0024, 0x3e14, 0xc024, 0x2900, 0x1700, 0x3e14, /* 248 */ + 0x0024, 0x36e3, 0x008c, 0x30e0, 0x4024, 0xfe22, 0x4411, 0x48b6, /* 250 */ + 0x048c, 0x3900, 0x8024, 0x3033, 0x0c4c, 0x0006, 0x0011, 0x6892, /* 258 */ + 0x04c2, 0xa122, 0x0402, 0x6126, 0x0024, 0x0006, 0x0093, 0x2800, /* 260 */ + 0x6701, 0x0000, 0x0024, 0xb882, 0x184c, 0x3413, 0x3812, 0x0006, /* 268 */ + 0x00d2, 0x3a00, 0x5bd2, 0x3300, 0x4024, 0x0000, 0x0013, 0x3c00, /* 270 */ + 0x4024, 0xf400, 0x44c1, 0x34f0, 0x8024, 0x6126, 0x0024, 0x0006, /* 278 */ + 0x0111, 0x2800, 0x6718, 0x4294, 0x0024, 0x2400, 0x66c2, 0x0000, /* 280 */ + 0x0024, 0x0003, 0xf001, 0x3101, 0x0024, 0xb412, 0x0024, 0x0028, /* 288 */ + 0x0001, 0x2800, 0x66c5, 0x6144, 0x0024, 0x0004, 0x0002, 0x2800, /* 290 */ + 0x6681, 0x4422, 0x0024, 0x0000, 0x1002, 0x6422, 0x0024, 0x2800, /* 298 */ + 0x66c0, 0x3900, 0x4024, 0x3900, 0x4024, 0x3113, 0x0c4c, 0x36f3, /* 2a0 */ + 0x4024, 0x36f3, 0xd80e, 0x36f4, 0x5813, 0x36f1, 0x5810, 0x36f0, /* 2a8 */ + 0xd804, 0x36f0, 0x5802, 0x3405, 0x9014, 0x36f3, 0x0024, 0x36f2, /* 2b0 */ + 0x1815, 0x2000, 0x0000, 0x36f2, 0x9817, 0x0007, 0x0001, 0x1868, /* 2b8 */ + 0x0006, 0x000f, 0x0032, 0x004f, 0x007e, 0x00c8, 0x013d, 0x01f8, /* 2c0 */ + 0x0320, 0x04f6, 0x07e0, 0x0c80, 0x13d8, 0x1f7f, 0x3200, 0x4f5f, /* 2c8 */ + 0x61a8, 0x0006, 0x8008, 0x0000, 0x0007, 0x0001, 0x81a7, 0x0006, /* 2d0 */ + 0x0054, 0x3e12, 0xb814, 0x0000, 0x800a, 0x3e10, 0x3801, 0x3e10, /* 2d8 */ + 0xb803, 0x3e11, 0x7806, 0x3e11, 0xf813, 0x3e13, 0xf80e, 0x3e13, /* 2e0 */ + 0x4024, 0x3e04, 0x7810, 0x449a, 0x0040, 0x0001, 0x0003, 0x2800, /* 2e8 */ + 0x7304, 0x4036, 0x03c1, 0x0003, 0xffc2, 0xb326, 0x0024, 0x0018, /* 2f0 */ + 0x0042, 0x4326, 0x4495, 0x4024, 0x40d2, 0x0000, 0x0180, 0xa100, /* 2f8 */ + 0x4090, 0x0010, 0x0fc2, 0x4204, 0x0024, 0xbc82, 0x4091, 0x459a, /* 300 */ + 0x0024, 0x0000, 0x0054, 0x2800, 0x7204, 0xbd86, 0x4093, 0x2400, /* 308 */ + 0x71c5, 0xfe01, 0x5e0c, 0x5c43, 0x5f2d, 0x5e46, 0x020c, 0x5c56, /* 310 */ + 0x8a0c, 0x5e53, 0x5e0c, 0x5c43, 0x5f2d, 0x5e46, 0x020c, 0x5c56, /* 318 */ + 0x8a0c, 0x5e52, 0x0024, 0x4cb2, 0x4405, 0x0018, 0x0044, 0x654a, /* 320 */ + 0x0024, 0x2800, 0x8000, 0x36f4, 0x5810, 0x0007, 0x0001, 0x81d1, /* 328 */ + 0x0006, 0x0080, 0x3e12, 0xb814, 0x0000, 0x800a, 0x3e10, 0x3801, /* 330 */ + 0x3e10, 0xb803, 0x3e11, 0x7806, 0x3e11, 0xf813, 0x3e13, 0xf80e, /* 338 */ + 0x3e13, 0x4024, 0x3e04, 0x7810, 0x449a, 0x0040, 0x0000, 0x0803, /* 340 */ + 0x2800, 0x7ec4, 0x30f0, 0x4024, 0x0fff, 0xfec2, 0xa020, 0x0024, /* 348 */ + 0x0fff, 0xff02, 0xa122, 0x0024, 0x4036, 0x0024, 0x0000, 0x1fc2, /* 350 */ + 0xb326, 0x0024, 0x0010, 0x4002, 0x4326, 0x4495, 0x4024, 0x40d2, /* 358 */ + 0x0000, 0x0180, 0xa100, 0x4090, 0x0010, 0x0042, 0x4204, 0x0024, /* 360 */ + 0xbc82, 0x4091, 0x459a, 0x0024, 0x0000, 0x0054, 0x2800, 0x7dc4, /* 368 */ + 0xbd86, 0x4093, 0x2400, 0x7d85, 0xfe01, 0x5e0c, 0x5c43, 0x5f2d, /* 370 */ + 0x5e46, 0x0024, 0x5c56, 0x0024, 0x5e53, 0x5e0c, 0x5c43, 0x5f2d, /* 378 */ + 0x5e46, 0x0024, 0x5c56, 0x0024, 0x5e52, 0x0024, 0x4cb2, 0x4405, /* 380 */ + 0x0010, 0x4004, 0x654a, 0x9810, 0x0000, 0x0144, 0xa54a, 0x1bd1, /* 388 */ + 0x0006, 0x0013, 0x3301, 0xc444, 0x687e, 0x2005, 0xad76, 0x8445, /* 390 */ + 0x4ed6, 0x8784, 0x36f3, 0x64c2, 0xac72, 0x8785, 0x4ec2, 0xa443, /* 398 */ + 0x3009, 0x2440, 0x3009, 0x2741, 0x36f3, 0xd80e, 0x36f1, 0xd813, /* 3a0 */ + 0x36f1, 0x5806, 0x36f0, 0x9803, 0x36f0, 0x1801, 0x2000, 0x0000, /* 3a8 */ + 0x36f2, 0x9814, 0x0007, 0x0001, 0x8211, 0x0006, 0x000e, 0x4c82, /* 3b0 */ + 0x0024, 0x0000, 0x0024, 0x2000, 0x0005, 0xf5c2, 0x0024, 0x0000, /* 3b8 */ + 0x0980, 0x2000, 0x0000, 0x6010, 0x0024, 0x000a, 0x0001, 0x0050, +#ifndef SKIP_PLUGIN_VARNAME +}; +#endif