Datasheet

HH
VS1053B OGG VORBIS ENCODER VSMPG
4 How to Load a Plugin
4.1 How to Load a .PLG File
A plugin file (.plg) contains a data file that contains one unsigned 16-bit vector called
plugin. The file is in an interleaved and RLE compressed format. An example of a
plugin vector is:
The vector is decoded as follows:
1. Read register address number and repeat number .
2. If & 0x8000U, write the next word times to register .
3. Else write next words to register .
4. Continue until table has been exhausted.
The example vector first tells to write 0x8260 to register 7. Then write 2 words, 0x1234
and 0x5678, to register 6. Finally, write 0xabcd 4 times to register 6.
Assuming the vector is in vector , a full decoder in C language is provided
below:
Rev. 1.70c 2012-11-16
Page 31(39)