| Line No. | Rev | Author | Line |
|---|---|---|---|
| 1 | 6 | kaklik | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
||
| 3 | <title>Procyon AVRlib: sta013.c Source File</title> |
||
| 4 | <link href="dox.css" rel="stylesheet" type="text/css"> |
||
| 5 | </head><body> |
||
| 6 | <!-- Generated by Doxygen 1.4.2 --> |
||
| 7 | <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
||
| 8 | <h1>sta013.c</h1><a href="sta013_8c.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*! \file sta013.c \brief STMicroelectronics STA013 MP3 player driver. */</span> |
||
| 9 | 00002 <span class="comment">//*****************************************************************************</span> |
||
| 10 | 00003 <span class="comment">//</span> |
||
| 11 | 00004 <span class="comment">// File Name : 'sta013.c'</span> |
||
| 12 | 00005 <span class="comment">// Title : STMicroelectronics STA013 MP3 player driver</span> |
||
| 13 | 00006 <span class="comment">// Author : Pascal Stang</span> |
||
| 14 | 00007 <span class="comment">// Created : 10/22/2000</span> |
||
| 15 | 00008 <span class="comment">// Revised : 7/11/2003</span> |
||
| 16 | 00009 <span class="comment">// Version : 0.3</span> |
||
| 17 | 00010 <span class="comment">// Target MCU : ATmega103 (should work for Atmel AVR Series)</span> |
||
| 18 | 00011 <span class="comment">// Editor Tabs : 4</span> |
||
| 19 | 00012 <span class="comment">//</span> |
||
| 20 | 00013 <span class="comment">// NOTE: This code is currently below version 1.0, and therefore is considered</span> |
||
| 21 | 00014 <span class="comment">// to be lacking in some functionality or documentation, or may not be fully</span> |
||
| 22 | 00015 <span class="comment">// tested. Nonetheless, you can expect most functions to work.</span> |
||
| 23 | 00016 <span class="comment">//</span> |
||
| 24 | 00017 <span class="comment">// This code is distributed under the GNU Public License</span> |
||
| 25 | 00018 <span class="comment">// which can be found at http://www.gnu.org/licenses/gpl.txt</span> |
||
| 26 | 00019 <span class="comment">//</span> |
||
| 27 | 00020 <span class="comment">//*****************************************************************************</span> |
||
| 28 | 00021 |
||
| 29 | 00022 <span class="preprocessor">#include <avr/io.h></span> |
||
| 30 | 00023 <span class="preprocessor">#include <avr/pgmspace.h></span> |
||
| 31 | 00024 |
||
| 32 | 00025 <span class="preprocessor">#include "<a class="code" href="global_8h.html">global.h</a>"</span> |
||
| 33 | 00026 <span class="preprocessor">#include "<a class="code" href="i2csw_8h.html">i2csw.h</a>"</span> |
||
| 34 | 00027 <span class="preprocessor">#include "<a class="code" href="timer_8h.html">timer.h</a>"</span> |
||
| 35 | 00028 <span class="comment">//#include "procyon.h"</span> |
||
| 36 | 00029 |
||
| 37 | 00030 <span class="preprocessor">#include "<a class="code" href="sta013_8h.html">sta013.h</a>"</span> |
||
| 38 | 00031 |
||
| 39 | 00032 <span class="comment">// bitrate and sampling frequency mappings</span> |
||
| 40 | 00033 <span class="comment">//static int __attribute__ ((progmem)) MP3_Bitrates[] =</span> |
||
| 41 | 00034 <span class="comment">// { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 0,</span> |
||
| 42 | 00035 <span class="comment">// 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 0};</span> |
||
| 43 | 00036 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> __attribute__ ((progmem)) MP3_Bitrates[] = |
||
| 44 | 00037 { 0, 4, 8, 12, 16, 20, 24, 28, 32, 40, 48, 56, 64, 72, 80, 0, |
||
| 45 | 00038 0, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 0}; |
||
| 46 | 00039 |
||
| 47 | 00040 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> __attribute__ ((progmem)) MP3_SamplingFrequencies[] = |
||
| 48 | 00041 { 11, 12, 8, 0, <span class="comment">// MPEG 2.5 rates</span> |
||
| 49 | 00042 0, 0, 0, 0, <span class="comment">// reserved rates</span> |
||
| 50 | 00043 22, 24, 16, 0, <span class="comment">// MPEG 2 rates</span> |
||
| 51 | 00044 44, 48, 32, 0 <span class="comment">// MPEG 1 rates</span> |
||
| 52 | 00045 }; |
||
| 53 | 00046 |
||
| 54 | 00047 <span class="comment">// STA013 firmware update and configuration data</span> |
||
| 55 | 00048 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> __attribute__ ((progmem)) STA013_UpdateData[] = |
||
| 56 | 00049 { |
||
| 57 | 00050 0x3a, 0x01, 0x2a, 0x04, 0x28, 0x00, 0x29, 0x00, 0x20, 0x00, |
||
| 58 | 00051 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 0x24, 0x00, 0x25, 0x00, |
||
| 59 | 00052 0x26, 0x00, 0x27, 0x00, 0x28, 0x01, 0x28, 0x02, 0x21, 0x8f, |
||
| 60 | 00053 0x28, 0x03, 0x21, 0x00, 0x28, 0x04, 0x28, 0x05, 0x28, 0x06, |
||
| 61 | 00054 0x28, 0x07, 0x28, 0x08, 0x28, 0x09, 0x28, 0x0a, 0x28, 0x0b, |
||
| 62 | 00055 0x28, 0x0c, 0x20, 0x80, 0x21, 0x90, 0x28, 0x0d, 0x20, 0x00, |
||
| 63 | 00056 0x21, 0x00, 0x28, 0x0e, 0x20, 0x81, 0x21, 0x91, 0x28, 0x0f, |
||
| 64 | 00057 0x20, 0x00, 0x21, 0x92, 0x28, 0x10, 0x21, 0x00, 0x28, 0x11, |
||
| 65 | 00058 0x21, 0x93, 0x28, 0x12, 0x21, 0x00, 0x28, 0x13, 0x28, 0x14, |
||
| 66 | 00059 0x28, 0x15, 0x20, 0x82, 0x28, 0x16, 0x20, 0x00, 0x28, 0x17, |
||
| 67 | 00060 0x28, 0x18, 0x28, 0x19, 0x21, 0x94, 0x28, 0x1a, 0x21, 0x95, |
||
| 68 | 00061 0x28, 0x1b, 0x21, 0x96, 0x28, 0x1c, 0x21, 0x00, 0x28, 0x1d, |
||
| 69 | 00062 0x20, 0x83, 0x28, 0x1e, 0x20, 0x00, 0x28, 0x1f, 0x21, 0x97, |
||
| 70 | 00063 0x28, 0x20, 0x21, 0x00, 0x28, 0x21, 0x28, 0x22, 0x28, 0x23, |
||
| 71 | 00064 0x28, 0x24, 0x28, 0x25, 0x28, 0x26, 0x28, 0x27, 0x28, 0x28, |
||
| 72 | 00065 0x28, 0x29, 0x28, 0x2a, 0x20, 0x84, 0x28, 0x2b, 0x20, 0x00, |
||
| 73 | 00066 0x28, 0x2c, 0x28, 0x2d, 0x28, 0x2e, 0x28, 0x2f, 0x28, 0x30, |
||
| 74 | 00067 0x28, 0x31, 0x28, 0x32, 0x20, 0x85, 0x28, 0x33, 0x20, 0x00, |
||
| 75 | 00068 0x28, 0x34, 0x28, 0x35, 0x28, 0x36, 0x28, 0x37, 0x21, 0x98, |
||
| 76 | 00069 0x28, 0x38, 0x21, 0x00, 0x28, 0x39, 0x28, 0x3a, 0x28, 0x3b, |
||
| 77 | 00070 0x28, 0x3c, 0x28, 0x3d, 0x28, 0x3e, 0x28, 0x3f, 0x28, 0x40, |
||
| 78 | 00071 0x28, 0x41, 0x28, 0x42, 0x28, 0x43, 0x28, 0x44, 0x28, 0x45, |
||
| 79 | 00072 0x28, 0x46, 0x28, 0x47, 0x28, 0x48, 0x28, 0x49, 0x28, 0x4a, |
||
| 80 | 00073 0x28, 0x4b, 0x28, 0x4c, 0x28, 0x4d, 0x28, 0x4e, 0x28, 0x4f, |
||
| 81 | 00074 0x28, 0x50, 0x28, 0x51, 0x28, 0x52, 0x28, 0x53, 0x28, 0x54, |
||
| 82 | 00075 0x28, 0x55, 0x28, 0x56, 0x28, 0x57, 0x28, 0x58, 0x28, 0x59, |
||
| 83 | 00076 0x28, 0x5a, 0x28, 0x5b, 0x28, 0x5c, 0x28, 0x5d, 0x28, 0x5e, |
||
| 84 | 00077 0x28, 0x5f, 0x28, 0x60, 0x28, 0x61, 0x28, 0x62, 0x21, 0x99, |
||
| 85 | 00078 0x28, 0x63, 0x21, 0x00, 0x28, 0x64, 0x28, 0x65, 0x28, 0x66, |
||
| 86 | 00079 0x28, 0x67, 0x28, 0x68, 0x28, 0x69, 0x28, 0x6a, 0x28, 0x6b, |
||
| 87 | 00080 0x28, 0x6c, 0x28, 0x6d, 0x28, 0x6e, 0x28, 0x6f, 0x28, 0x70, |
||
| 88 | 00081 0x28, 0x71, 0x28, 0x72, 0x28, 0x73, 0x28, 0x74, 0x28, 0x75, |
||
| 89 | 00082 0x28, 0x76, 0x28, 0x77, 0x28, 0x78, 0x28, 0x79, 0x28, 0x7a, |
||
| 90 | 00083 0x28, 0x7b, 0x28, 0x7c, 0x28, 0x7d, 0x28, 0x7e, 0x28, 0x7f, |
||
| 91 | 00084 0x28, 0x80, 0x28, 0x81, 0x28, 0x82, 0x28, 0x83, 0x28, 0x84, |
||
| 92 | 00085 0x28, 0x85, 0x28, 0x86, 0x28, 0x87, 0x28, 0x88, 0x28, 0x89, |
||
| 93 | 00086 0x28, 0x8a, 0x28, 0x8b, 0x28, 0x8c, 0x28, 0x8d, 0x28, 0x8e, |
||
| 94 | 00087 0x28, 0x8f, 0x28, 0x90, 0x28, 0x91, 0x20, 0x86, 0x28, 0x92, |
||
| 95 | 00088 0x20, 0x87, 0x28, 0x93, 0x20, 0x00, 0x28, 0x94, 0x28, 0x95, |
||
| 96 | 00089 0x28, 0x96, 0x28, 0x97, 0x28, 0x98, 0x28, 0x99, 0x28, 0x9a, |
||
| 97 | 00090 0x28, 0x9b, 0x28, 0x9c, 0x28, 0x9d, 0x28, 0x9e, 0x28, 0x9f, |
||
| 98 | 00091 0x21, 0x9a, 0x28, 0xa0, 0x21, 0x00, 0x28, 0xa1, 0x28, 0xa2, |
||
| 99 | 00092 0x28, 0xa3, 0x28, 0xa4, 0x28, 0xa5, 0x28, 0xa6, 0x28, 0xa7, |
||
| 100 | 00093 0x28, 0xa8, 0x28, 0xa9, 0x28, 0xaa, 0x28, 0xab, 0x28, 0xac, |
||
| 101 | 00094 0x28, 0xad, 0x28, 0xae, 0x28, 0xaf, 0x28, 0xb0, 0x28, 0xb1, |
||
| 102 | 00095 0x28, 0xb2, 0x28, 0xb3, 0x28, 0xb4, 0x28, 0xb5, 0x28, 0xb6, |
||
| 103 | 00096 0x28, 0xb7, 0x28, 0xb8, 0x28, 0xb9, 0x20, 0x88, 0x28, 0xba, |
||
| 104 | 00097 0x20, 0x00, 0x28, 0xbb, 0x20, 0x89, 0x28, 0xbc, 0x20, 0x00, |
||
| 105 | 00098 0x28, 0xbd, 0x28, 0xbe, 0x28, 0xbf, 0x28, 0xc0, 0x28, 0xc1, |
||
| 106 | 00099 0x28, 0xc2, 0x28, 0xc3, 0x21, 0x9b, 0x28, 0xc4, 0x21, 0x00, |
||
| 107 | 00100 0x28, 0xc5, 0x28, 0xc6, 0x28, 0xc7, 0x28, 0xc8, 0x28, 0xc9, |
||
| 108 | 00101 0x28, 0xca, 0x28, 0xcb, 0x28, 0xcc, 0x28, 0xcd, 0x28, 0xce, |
||
| 109 | 00102 0x28, 0xcf, 0x28, 0xd0, 0x28, 0xd1, 0x28, 0xd2, 0x28, 0xd3, |
||
| 110 | 00103 0x28, 0xd4, 0x28, 0xd5, 0x28, 0xd6, 0x28, 0xd7, 0x28, 0xd8, |
||
| 111 | 00104 0x28, 0xd9, 0x28, 0xda, 0x28, 0xdb, 0x28, 0xdc, 0x28, 0xdd, |
||
| 112 | 00105 0x28, 0xde, 0x28, 0xdf, 0x28, 0xe0, 0x28, 0xe1, 0x20, 0x8a, |
||
| 113 | 00106 0x28, 0xe2, 0x20, 0x8b, 0x28, 0xe3, 0x20, 0x00, 0x28, 0xe4, |
||
| 114 | 00107 0x28, 0xe5, 0x28, 0xe6, 0x28, 0xe7, 0x28, 0xe8, 0x28, 0xe9, |
||
| 115 | 00108 0x28, 0xea, 0x28, 0xeb, 0x28, 0xec, 0x28, 0xed, 0x28, 0xee, |
||
| 116 | 00109 0x28, 0xef, 0x28, 0xf0, 0x28, 0xf1, 0x28, 0xf2, 0x28, 0xf3, |
||
| 117 | 00110 0x28, 0xf4, 0x28, 0xf5, 0x28, 0xf6, 0x28, 0xf7, 0x28, 0xf8, |
||
| 118 | 00111 0x20, 0x8c, 0x28, 0xf9, 0x20, 0x00, 0x21, 0x9c, 0x28, 0xfa, |
||
| 119 | 00112 0x21, 0x9d, 0x28, 0xfb, 0x20, 0x8d, 0x21, 0x9e, 0x28, 0xfc, |
||
| 120 | 00113 0x20, 0x8e, 0x21, 0x9f, 0x28, 0xfd, 0x20, 0x00, 0x21, 0x00, |
||
| 121 | 00114 0x28, 0xfe, 0x28, 0xff, 0x2a, 0x01, 0x28, 0x00, 0x22, 0x01, |
||
| 122 | 00115 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0xa4, 0x27, 0x07, |
||
| 123 | 00116 0x28, 0x01, 0x21, 0xc7, 0x22, 0x00, 0x23, 0x80, 0x26, 0xc4, |
||
| 124 | 00117 0x27, 0x0c, 0x28, 0x02, 0x20, 0x09, 0x21, 0x1c, 0x22, 0x04, |
||
| 125 | 00118 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x03, 0x20, 0x00, 0x21, 0x00, |
||
| 126 | 00119 0x22, 0x00, 0x23, 0xa6, 0x26, 0xa0, 0x27, 0x07, 0x28, 0x04, |
||
| 127 | 00120 0x28, 0x05, 0x20, 0x05, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, |
||
| 128 | 00121 0x28, 0x06, 0x20, 0x00, 0x22, 0x03, 0x23, 0x00, 0x24, 0x81, |
||
| 129 | 00122 0x25, 0xc0, 0x26, 0xab, 0x27, 0x0a, 0x28, 0x07, 0x21, 0xae, |
||
| 130 | 00123 0x22, 0x00, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0xa4, |
||
| 131 | 00124 0x27, 0x00, 0x28, 0x08, 0x21, 0x48, 0x22, 0x01, 0x23, 0x80, |
||
| 132 | 00125 0x26, 0xc4, 0x27, 0x0c, 0x28, 0x09, 0x20, 0x09, 0x21, 0x04, |
||
| 133 | 00126 0x22, 0x04, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x0a, 0x20, 0x00, |
||
| 134 | 00127 0x21, 0x00, 0x22, 0x00, 0x23, 0xa8, 0x26, 0xa4, 0x27, 0x07, |
||
| 135 | 00128 0x28, 0x0b, 0x28, 0x0c, 0x21, 0x40, 0x22, 0x20, 0x23, 0x80, |
||
| 136 | 00129 0x26, 0xc4, 0x27, 0x0c, 0x28, 0x0d, 0x22, 0x24, 0x26, 0xc6, |
||
| 137 | 00130 0x28, 0x0e, 0x21, 0x9e, 0x22, 0x00, 0x26, 0xc8, 0x28, 0x0f, |
||
| 138 | 00131 0x20, 0x09, 0x21, 0x02, 0x22, 0x14, 0x26, 0xaa, 0x27, 0x0a, |
||
| 139 | 00132 0x28, 0x10, 0x20, 0x05, 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, |
||
| 140 | 00133 0x26, 0xb4, 0x27, 0x09, 0x28, 0x11, 0x20, 0x00, 0x21, 0x01, |
||
| 141 | 00134 0x23, 0x00, 0x24, 0x01, 0x25, 0xc0, 0x26, 0xab, 0x27, 0x0a, |
||
| 142 | 00135 0x28, 0x12, 0x21, 0xc3, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, |
||
| 143 | 00136 0x26, 0x20, 0x27, 0x00, 0x28, 0x13, 0x20, 0x03, 0x21, 0xc2, |
||
| 144 | 00137 0x23, 0x83, 0x26, 0x26, 0x27, 0x0d, 0x28, 0x14, 0x21, 0xb3, |
||
| 145 | 00138 0x22, 0x08, 0x28, 0x15, 0x20, 0x00, 0x21, 0xc6, 0x22, 0x00, |
||
| 146 | 00139 0x23, 0x95, 0x26, 0x00, 0x27, 0x08, 0x28, 0x16, 0x21, 0x00, |
||
| 147 | 00140 0x23, 0x00, 0x24, 0x96, 0x25, 0x03, 0x26, 0xaa, 0x27, 0x0a, |
||
| 148 | 00141 0x28, 0x17, 0x20, 0x42, 0x21, 0xb6, 0x23, 0x80, 0x24, 0x89, |
||
| 149 | 00142 0x25, 0x07, 0x28, 0x18, 0x20, 0x00, 0x21, 0x00, 0x23, 0x94, |
||
| 150 | 00143 0x26, 0x0e, 0x28, 0x19, 0x20, 0x0f, 0x23, 0x84, 0x26, 0xb4, |
||
| 151 | 00144 0x27, 0x09, 0x28, 0x1a, 0x20, 0x00, 0x23, 0x93, 0x26, 0xa8, |
||
| 152 | 00145 0x27, 0x03, 0x28, 0x1b, 0x26, 0x28, 0x27, 0x00, 0x28, 0x1c, |
||
| 153 | 00146 0x21, 0x01, 0x23, 0x00, 0x24, 0x01, 0x25, 0xc0, 0x26, 0xab, |
||
| 154 | 00147 0x27, 0x0a, 0x28, 0x1d, 0x21, 0xc5, 0x23, 0x95, 0x24, 0x89, |
||
| 155 | 00148 0x25, 0x07, 0x26, 0x20, 0x27, 0x00, 0x28, 0x1e, 0x21, 0x00, |
||
| 156 | 00149 0x23, 0x94, 0x26, 0x00, 0x27, 0x0a, 0x28, 0x1f, 0x26, 0x0e, |
||
| 157 | 00150 0x28, 0x20, 0x20, 0x03, 0x21, 0x79, 0x22, 0x01, 0x23, 0x83, |
||
| 158 | 00151 0x26, 0x26, 0x27, 0x0d, 0x28, 0x21, 0x21, 0x32, 0x28, 0x22, |
||
| 159 | 00152 0x20, 0x00, 0x21, 0x04, 0x22, 0x00, 0x23, 0x80, 0x24, 0x00, |
||
| 160 | 00153 0x25, 0xfc, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x23, 0x21, 0x00, |
||
| 161 | 00154 0x23, 0x00, 0x25, 0x00, 0x28, 0x24, 0x21, 0xa3, 0x22, 0x0d, |
||
| 162 | 00155 0x23, 0x80, 0x24, 0x9e, 0x25, 0x3b, 0x28, 0x25, 0x20, 0x42, |
||
| 163 | 00156 0x21, 0x57, 0x22, 0x01, 0x24, 0x89, 0x25, 0x07, 0x28, 0x26, |
||
| 164 | 00157 0x20, 0x00, 0x21, 0x43, 0x22, 0x0d, 0x24, 0x00, 0x25, 0x38, |
||
| 165 | 00158 0x28, 0x27, 0x21, 0x08, 0x22, 0x98, 0x23, 0x95, 0x24, 0x89, |
||
| 166 | 00159 0x25, 0x07, 0x26, 0x24, 0x27, 0x00, 0x28, 0x28, 0x20, 0x42, |
||
| 167 | 00160 0x21, 0x93, 0x22, 0x01, 0x23, 0x80, 0x26, 0xaa, 0x27, 0x0a, |
||
| 168 | 00161 0x28, 0x29, 0x20, 0x03, 0x21, 0x7e, 0x22, 0x04, 0x23, 0x83, |
||
| 169 | 00162 0x26, 0x26, 0x27, 0x0d, 0x28, 0x2a, 0x20, 0x00, 0x21, 0xb0, |
||
| 170 | 00163 0x22, 0x00, 0x23, 0x95, 0x26, 0xa0, 0x27, 0x07, 0x28, 0x2b, |
||
| 171 | 00164 0x21, 0x00, 0x23, 0x00, 0x24, 0x0c, 0x25, 0x04, 0x26, 0xaa, |
||
| 172 | 00165 0x27, 0x0a, 0x28, 0x2c, 0x21, 0x02, 0x23, 0x80, 0x24, 0x86, |
||
| 173 | 00166 0x25, 0xc3, 0x26, 0xab, 0x28, 0x2d, 0x20, 0x42, 0x21, 0x97, |
||
| 174 | 00167 0x22, 0x01, 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, 0x28, 0x2e, |
||
| 175 | 00168 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x24, 0x1f, 0x25, 0x04, |
||
| 176 | 00169 0x28, 0x2f, 0x21, 0xb2, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, |
||
| 177 | 00170 0x26, 0x20, 0x27, 0x04, 0x28, 0x30, 0x20, 0x42, 0x21, 0x8b, |
||
| 178 | 00171 0x22, 0x04, 0x23, 0x80, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x31, |
||
| 179 | 00172 0x20, 0x00, 0x21, 0xb1, 0x22, 0x00, 0x23, 0x95, 0x26, 0xa0, |
||
| 180 | 00173 0x27, 0x07, 0x28, 0x32, 0x20, 0x03, 0x21, 0x75, 0x22, 0x04, |
||
| 181 | 00174 0x23, 0x83, 0x26, 0x26, 0x27, 0x0d, 0x28, 0x33, 0x20, 0x05, |
||
| 182 | 00175 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, |
||
| 183 | 00176 0x28, 0x34, 0x20, 0x00, 0x21, 0x60, 0x23, 0x00, 0x24, 0x01, |
||
| 184 | 00177 0x25, 0xc0, 0x26, 0xab, 0x27, 0x0a, 0x28, 0x35, 0x21, 0x08, |
||
| 185 | 00178 0x22, 0x98, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x24, |
||
| 186 | 00179 0x27, 0x00, 0x28, 0x36, 0x21, 0xbc, 0x22, 0x00, 0x28, 0x37, |
||
| 187 | 00180 0x21, 0xa3, 0x22, 0x0d, 0x23, 0x00, 0x24, 0x01, 0x25, 0xc0, |
||
| 188 | 00181 0x26, 0xab, 0x27, 0x0a, 0x28, 0x38, 0x21, 0x60, 0x22, 0x00, |
||
| 189 | 00182 0x23, 0x80, 0x24, 0x00, 0x25, 0x38, 0x26, 0xaa, 0x28, 0x39, |
||
| 190 | 00183 0x21, 0x06, 0x22, 0x98, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, |
||
| 191 | 00184 0x26, 0x24, 0x27, 0x00, 0x28, 0x3a, 0x21, 0xbe, 0x22, 0x00, |
||
| 192 | 00185 0x28, 0x3b, 0x20, 0x05, 0x21, 0x00, 0x23, 0x84, 0x26, 0xb4, |
||
| 193 | 00186 0x27, 0x09, 0x28, 0x3c, 0x20, 0x00, 0x21, 0x60, 0x23, 0x00, |
||
| 194 | 00187 0x24, 0x01, 0x25, 0xc0, 0x26, 0xab, 0x27, 0x0a, 0x28, 0x3d, |
||
| 195 | 00188 0x21, 0x42, 0x22, 0x01, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, |
||
| 196 | 00189 0x26, 0x24, 0x27, 0x00, 0x28, 0x3e, 0x21, 0x0c, 0x22, 0x98, |
||
| 197 | 00190 0x26, 0xa4, 0x27, 0x07, 0x28, 0x3f, 0x21, 0x08, 0x28, 0x40, |
||
| 198 | 00191 0x21, 0x60, 0x22, 0x00, 0x23, 0x00, 0x24, 0x01, 0x25, 0xc0, |
||
| 199 | 00192 0x26, 0xab, 0x27, 0x0a, 0x28, 0x41, 0x21, 0x0c, 0x22, 0x98, |
||
| 200 | 00193 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x24, 0x27, 0x00, |
||
| 201 | 00194 0x28, 0x42, 0x20, 0x05, 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, |
||
| 202 | 00195 0x26, 0xb4, 0x27, 0x09, 0x28, 0x43, 0x20, 0x00, 0x23, 0x80, |
||
| 203 | 00196 0x24, 0x00, 0x25, 0x10, 0x26, 0xab, 0x27, 0x0a, 0x28, 0x44, |
||
| 204 | 00197 0x21, 0x22, 0x22, 0x01, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, |
||
| 205 | 00198 0x26, 0x24, 0x27, 0x00, 0x28, 0x45, 0x21, 0x00, 0x22, 0x00, |
||
| 206 | 00199 0x23, 0x00, 0x24, 0x04, 0x25, 0x12, 0x26, 0xaa, 0x27, 0x0a, |
||
| 207 | 00200 0x28, 0x46, 0x20, 0x03, 0x21, 0xd4, 0x22, 0x05, 0x23, 0x83, |
||
| 208 | 00201 0x24, 0x89, 0x25, 0x07, 0x26, 0x26, 0x27, 0x0d, 0x28, 0x47, |
||
| 209 | 00202 0x20, 0x00, 0x21, 0x60, 0x22, 0x00, 0x23, 0x00, 0x24, 0x01, |
||
| 210 | 00203 0x25, 0xc0, 0x26, 0xab, 0x27, 0x0a, 0x28, 0x48, 0x21, 0xb3, |
||
| 211 | 00204 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x00, 0x27, 0x08, |
||
| 212 | 00205 0x28, 0x49, 0x21, 0x00, 0x23, 0x00, 0x24, 0x09, 0x25, 0x00, |
||
| 213 | 00206 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x4a, 0x21, 0x02, 0x23, 0x80, |
||
| 214 | 00207 0x24, 0x86, 0x25, 0x3b, 0x28, 0x4b, 0x20, 0x42, 0x21, 0xdd, |
||
| 215 | 00208 0x22, 0x05, 0x24, 0x89, 0x25, 0x07, 0x28, 0x4c, 0x20, 0x00, |
||
| 216 | 00209 0x21, 0x00, 0x22, 0x00, 0x24, 0x1f, 0x25, 0x00, 0x28, 0x4d, |
||
| 217 | 00210 0x21, 0xb3, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x20, |
||
| 218 | 00211 0x27, 0x00, 0x28, 0x4e, 0x21, 0x00, 0x23, 0x00, 0x24, 0x97, |
||
| 219 | 00212 0x25, 0x03, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x4f, 0x20, 0x42, |
||
| 220 | 00213 0x21, 0xe2, 0x22, 0x05, 0x23, 0x80, 0x24, 0x89, 0x25, 0x07, |
||
| 221 | 00214 0x28, 0x50, 0x20, 0x00, 0x21, 0x10, 0x22, 0x00, 0x23, 0x00, |
||
| 222 | 00215 0x24, 0x80, 0x25, 0xcc, 0x26, 0xab, 0x28, 0x51, 0x21, 0x00, |
||
| 223 | 00216 0x22, 0x40, 0x23, 0xb4, 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, |
||
| 224 | 00217 0x27, 0x04, 0x28, 0x52, 0x22, 0x00, 0x23, 0xb0, 0x26, 0x92, |
||
| 225 | 00218 0x27, 0x09, 0x28, 0x53, 0x21, 0x14, 0x22, 0x01, 0x23, 0x95, |
||
| 226 | 00219 0x26, 0x00, 0x27, 0x08, 0x28, 0x54, 0x21, 0x48, 0x23, 0xa4, |
||
| 227 | 00220 0x26, 0x2a, 0x27, 0x00, 0x28, 0x55, 0x21, 0x00, 0x22, 0x00, |
||
| 228 | 00221 0x23, 0x00, 0x24, 0x09, 0x25, 0x00, 0x26, 0xaa, 0x27, 0x0a, |
||
| 229 | 00222 0x28, 0x56, 0x21, 0x08, 0x23, 0x80, 0x24, 0x86, 0x25, 0x3b, |
||
| 230 | 00223 0x28, 0x57, 0x20, 0x42, 0x21, 0x11, 0x22, 0x07, 0x24, 0x89, |
||
| 231 | 00224 0x25, 0x07, 0x28, 0x58, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, |
||
| 232 | 00225 0x24, 0x1f, 0x25, 0x00, 0x28, 0x59, 0x21, 0x14, 0x22, 0x01, |
||
| 233 | 00226 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x20, 0x27, 0x00, |
||
| 234 | 00227 0x28, 0x5a, 0x21, 0x16, 0x26, 0x02, 0x27, 0x09, 0x28, 0x5b, |
||
| 235 | 00228 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 0x24, 0x80, 0x25, 0x48, |
||
| 236 | 00229 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x5c, 0x23, 0xa0, 0x24, 0x89, |
||
| 237 | 00230 0x25, 0x07, 0x26, 0x14, 0x27, 0x09, 0x28, 0x5d, 0x24, 0x80, |
||
| 238 | 00231 0x25, 0x50, 0x26, 0xa4, 0x27, 0x04, 0x28, 0x5e, 0x21, 0x16, |
||
| 239 | 00232 0x22, 0x01, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x27, 0x00, |
||
| 240 | 00233 0x28, 0x5f, 0x21, 0x04, 0x22, 0x00, 0x23, 0x00, 0x24, 0x9c, |
||
| 241 | 00234 0x25, 0x78, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x60, 0x21, 0x43, |
||
| 242 | 00235 0x22, 0x0d, 0x24, 0x01, 0x25, 0xc4, 0x26, 0xab, 0x28, 0x61, |
||
| 243 | 00236 0x21, 0x03, 0x22, 0x00, 0x24, 0x15, 0x28, 0x62, 0x21, 0x00, |
||
| 244 | 00237 0x24, 0x00, 0x25, 0x00, 0x26, 0xaa, 0x28, 0x63, 0x21, 0x5e, |
||
| 245 | 00238 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x10, 0x27, 0x09, |
||
| 246 | 00239 0x28, 0x64, 0x21, 0x03, 0x23, 0x00, 0x24, 0x15, 0x25, 0xc4, |
||
| 247 | 00240 0x26, 0xab, 0x27, 0x0a, 0x28, 0x65, 0x21, 0x00, 0x23, 0x80, |
||
| 248 | 00241 0x24, 0x00, 0x25, 0x06, 0x26, 0xaa, 0x28, 0x66, 0x24, 0x8f, |
||
| 249 | 00242 0x25, 0xe3, 0x26, 0xab, 0x28, 0x67, 0x20, 0x42, 0x21, 0xcd, |
||
| 250 | 00243 0x22, 0x07, 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, 0x28, 0x68, |
||
| 251 | 00244 0x20, 0x00, 0x21, 0x60, 0x22, 0x00, 0x23, 0x00, 0x24, 0x01, |
||
| 252 | 00245 0x25, 0xc0, 0x26, 0xab, 0x28, 0x69, 0x21, 0x00, 0x23, 0x80, |
||
| 253 | 00246 0x24, 0x8f, 0x25, 0x03, 0x26, 0xaa, 0x28, 0x6a, 0x20, 0x42, |
||
| 254 | 00247 0x21, 0xdd, 0x22, 0x07, 0x24, 0x89, 0x25, 0x07, 0x28, 0x6b, |
||
| 255 | 00248 0x20, 0x00, 0x21, 0x43, 0x22, 0x0d, 0x23, 0x00, 0x24, 0x01, |
||
| 256 | 00249 0x25, 0xc0, 0x26, 0xab, 0x28, 0x6c, 0x21, 0x00, 0x22, 0x00, |
||
| 257 | 00250 0x24, 0x00, 0x25, 0x04, 0x26, 0xaa, 0x28, 0x6d, 0x20, 0x03, |
||
| 258 | 00251 0x21, 0x7f, 0x22, 0x01, 0x23, 0x83, 0x24, 0x89, 0x25, 0x07, |
||
| 259 | 00252 0x26, 0x26, 0x27, 0x0d, 0x28, 0x6e, 0x21, 0x62, 0x28, 0x6f, |
||
| 260 | 00253 0x20, 0x05, 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, 0x26, 0xb4, |
||
| 261 | 00254 0x27, 0x09, 0x28, 0x70, 0x20, 0x00, 0x21, 0x06, 0x23, 0x95, |
||
| 262 | 00255 0x26, 0x00, 0x27, 0x08, 0x28, 0x71, 0x21, 0x01, 0x23, 0x00, |
||
| 263 | 00256 0x24, 0x97, 0x25, 0x3b, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x72, |
||
| 264 | 00257 0x20, 0x42, 0x21, 0x0e, 0x22, 0x08, 0x23, 0x80, 0x24, 0x89, |
||
| 265 | 00258 0x25, 0x07, 0x28, 0x73, 0x20, 0x03, 0x21, 0x3c, 0x22, 0x0b, |
||
| 266 | 00259 0x23, 0x83, 0x26, 0x26, 0x27, 0x0d, 0x28, 0x74, 0x20, 0x00, |
||
| 267 | 00260 0x21, 0x03, 0x22, 0x00, 0x23, 0x95, 0x26, 0x02, 0x27, 0x08, |
||
| 268 | 00261 0x28, 0x75, 0x21, 0x27, 0x23, 0x00, 0x24, 0x81, 0x25, 0xc4, |
||
| 269 | 00262 0x26, 0xab, 0x27, 0x0a, 0x28, 0x76, 0x21, 0x00, 0x23, 0x80, |
||
| 270 | 00263 0x24, 0x09, 0x25, 0x48, 0x26, 0xaa, 0x28, 0x77, 0x21, 0x58, |
||
| 271 | 00264 0x22, 0x34, 0x23, 0xa3, 0x24, 0x89, 0x25, 0x07, 0x26, 0x2a, |
||
| 272 | 00265 0x27, 0x00, 0x28, 0x78, 0x21, 0x00, 0x22, 0x00, 0x23, 0xa0, |
||
| 273 | 00266 0x26, 0x00, 0x27, 0x09, 0x28, 0x79, 0x21, 0x07, 0x23, 0x80, |
||
| 274 | 00267 0x24, 0x03, 0x25, 0x39, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x7a, |
||
| 275 | 00268 0x21, 0x04, 0x23, 0x00, 0x24, 0x1c, 0x25, 0x38, 0x28, 0x7b, |
||
| 276 | 00269 0x21, 0x07, 0x23, 0x80, 0x24, 0x83, 0x25, 0x39, 0x28, 0x7c, |
||
| 277 | 00270 0x21, 0x03, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x02, |
||
| 278 | 00271 0x27, 0x08, 0x28, 0x7d, 0x21, 0x27, 0x23, 0x00, 0x24, 0x81, |
||
| 279 | 00272 0x25, 0xc4, 0x26, 0xab, 0x27, 0x0a, 0x28, 0x7e, 0x21, 0x00, |
||
| 280 | 00273 0x23, 0x80, 0x24, 0x09, 0x25, 0x48, 0x26, 0xaa, 0x28, 0x7f, |
||
| 281 | 00274 0x21, 0x58, 0x22, 0x34, 0x23, 0xa3, 0x24, 0x89, 0x25, 0x07, |
||
| 282 | 00275 0x26, 0x2a, 0x27, 0x00, 0x28, 0x80, 0x21, 0x06, 0x22, 0x00, |
||
| 283 | 00276 0x23, 0x00, 0x24, 0x81, 0x25, 0xc0, 0x26, 0x93, 0x27, 0x01, |
||
| 284 | 00277 0x28, 0x81, 0x21, 0x00, 0x23, 0x80, 0x24, 0x89, 0x25, 0x48, |
||
| 285 | 00278 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x82, 0x20, 0x02, 0x21, 0x66, |
||
| 286 | 00279 0x22, 0x08, 0x23, 0x00, 0x24, 0x00, 0x25, 0x66, 0x28, 0x83, |
||
| 287 | 00280 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x80, 0x24, 0x1f, |
||
| 288 | 00281 0x25, 0x02, 0x28, 0x84, 0x21, 0x06, 0x24, 0x89, 0x25, 0x07, |
||
| 289 | 00282 0x26, 0xdc, 0x27, 0x0c, 0x28, 0x85, 0x21, 0x00, 0x23, 0xaa, |
||
| 290 | 00283 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x86, 0x23, 0xb6, 0x26, 0x00, |
||
| 291 | 00284 0x27, 0x08, 0x28, 0x87, 0x23, 0x80, 0x24, 0x86, 0x25, 0x3b, |
||
| 292 | 00285 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x88, 0x21, 0x05, 0x24, 0x89, |
||
| 293 | 00286 0x25, 0x07, 0x26, 0xdc, 0x27, 0x0c, 0x28, 0x89, 0x21, 0x00, |
||
| 294 | 00287 0x23, 0xaa, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x8a, 0x23, 0xb6, |
||
| 295 | 00288 0x26, 0x00, 0x27, 0x08, 0x28, 0x8b, 0x23, 0x80, 0x24, 0x86, |
||
| 296 | 00289 0x25, 0x3b, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x8c, 0x20, 0x42, |
||
| 297 | 00290 0x21, 0x7b, 0x22, 0x08, 0x24, 0x89, 0x25, 0x07, 0x28, 0x8d, |
||
| 298 | 00291 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 0x24, 0x01, |
||
| 299 | 00292 0x25, 0x82, 0x28, 0x8e, 0x21, 0x05, 0x24, 0x81, 0x25, 0xc2, |
||
| 300 | 00293 0x26, 0xab, 0x28, 0x8f, 0x20, 0x03, 0x21, 0x93, 0x22, 0x08, |
||
| 301 | 00294 0x23, 0x83, 0x24, 0x89, 0x25, 0x07, 0x26, 0x26, 0x27, 0x0d, |
||
| 302 | 00295 0x28, 0x90, 0x20, 0x00, 0x21, 0x05, 0x22, 0x00, 0x23, 0x00, |
||
| 303 | 00296 0x24, 0x81, 0x25, 0xc0, 0x26, 0x13, 0x27, 0x01, 0x28, 0x91, |
||
| 304 | 00297 0x21, 0x00, 0x23, 0x80, 0x24, 0x89, 0x25, 0x48, 0x26, 0xaa, |
||
| 305 | 00298 0x27, 0x0a, 0x28, 0x92, 0x20, 0x02, 0x21, 0x7e, 0x22, 0x08, |
||
| 306 | 00299 0x23, 0x00, 0x24, 0x00, 0x25, 0x66, 0x28, 0x93, 0x20, 0x00, |
||
| 307 | 00300 0x21, 0x00, 0x22, 0x00, 0x23, 0x80, 0x24, 0x1f, 0x25, 0x02, |
||
| 308 | 00301 0x28, 0x94, 0x21, 0x05, 0x24, 0x89, 0x25, 0x07, 0x26, 0xdc, |
||
| 309 | 00302 0x27, 0x0c, 0x28, 0x95, 0x21, 0x00, 0x23, 0xaa, 0x26, 0xaa, |
||
| 310 | 00303 0x27, 0x0a, 0x28, 0x96, 0x23, 0xb6, 0x26, 0x00, 0x27, 0x08, |
||
| 311 | 00304 0x28, 0x97, 0x23, 0x80, 0x24, 0x86, 0x25, 0x3b, 0x26, 0xaa, |
||
| 312 | 00305 0x27, 0x0a, 0x28, 0x98, 0x21, 0x05, 0x24, 0x89, 0x25, 0x07, |
||
| 313 | 00306 0x26, 0xdc, 0x27, 0x0c, 0x28, 0x99, 0x21, 0x00, 0x23, 0xaa, |
||
| 314 | 00307 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x9a, 0x23, 0x80, 0x24, 0x1f, |
||
| 315 | 00308 0x25, 0x02, 0x28, 0x9b, 0x21, 0x01, 0x23, 0x00, 0x24, 0x81, |
||
| 316 | 00309 0x25, 0xc2, 0x26, 0xab, 0x28, 0x9c, 0x20, 0x03, 0x21, 0x93, |
||
| 317 | 00310 0x22, 0x08, 0x23, 0x83, 0x24, 0x89, 0x25, 0x07, 0x26, 0x26, |
||
| 318 | 00311 0x27, 0x0d, 0x28, 0x9d, 0x20, 0x00, 0x21, 0x04, 0x22, 0x00, |
||
| 319 | 00312 0x23, 0x95, 0x26, 0x12, 0x27, 0x08, 0x28, 0x9e, 0x21, 0x60, |
||
| 320 | 00313 0x23, 0xc4, 0x26, 0xaa, 0x27, 0x04, 0x28, 0x9f, 0x21, 0x00, |
||
| 321 | 00314 0x23, 0xc0, 0x26, 0x00, 0x27, 0x09, 0x28, 0xa0, 0x20, 0x42, |
||
| 322 | 00315 0x21, 0xcb, 0x22, 0x08, 0x23, 0x80, 0x26, 0xaa, 0x27, 0x0a, |
||
| 323 | 00316 0x28, 0xa1, 0x20, 0x70, 0x21, 0x54, 0x22, 0xb8, 0x23, 0x95, |
||
| 324 | 00317 0x26, 0x12, 0x27, 0x08, 0x28, 0xa2, 0x20, 0x02, 0x21, 0xcc, |
||
| 325 | 00318 0x22, 0x08, 0x23, 0x80, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0xa3, |
||
| 326 | 00319 0x20, 0x03, 0x21, 0xca, 0x22, 0x0f, 0x23, 0x83, 0x26, 0x26, |
||
| 327 | 00320 0x27, 0x0d, 0x28, 0xa4, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, |
||
| 328 | 00321 0x23, 0x00, 0x24, 0x8c, 0x25, 0x0c, 0x26, 0xaa, 0x27, 0x0a, |
||
| 329 | 00322 0x28, 0xa5, 0x21, 0x04, 0x24, 0x82, 0x25, 0x78, 0x28, 0xa6, |
||
| 330 | 00323 0x21, 0x00, 0x23, 0x80, 0x24, 0x89, 0x25, 0x48, 0x26, 0x12, |
||
| 331 | 00324 0x27, 0x04, 0x28, 0xa7, 0x20, 0x03, 0x21, 0xde, 0x22, 0x0f, |
||
| 332 | 00325 0x23, 0x83, 0x25, 0x07, 0x26, 0x26, 0x27, 0x0d, 0x28, 0xa8, |
||
| 333 | 00326 0x20, 0x00, 0x21, 0x01, 0x22, 0x00, 0x23, 0x00, 0x24, 0x9c, |
||
| 334 | 00327 0x25, 0x78, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0xa9, 0x21, 0x00, |
||
| 335 | 00328 0x23, 0x80, 0x24, 0x81, 0x25, 0x40, 0x28, 0xaa, 0x20, 0x03, |
||
| 336 | 00329 0x21, 0xcf, 0x22, 0x0f, 0x23, 0x83, 0x24, 0x89, 0x25, 0x07, |
||
| 337 | 00330 0x26, 0x26, 0x27, 0x0d, 0x28, 0xab, 0x20, 0x70, 0x21, 0x08, |
||
| 338 | 00331 0x22, 0xb8, 0x23, 0x95, 0x26, 0xa0, 0x27, 0x04, 0x28, 0xac, |
||
| 339 | 00332 0x20, 0x03, 0x21, 0xd4, 0x22, 0x0f, 0x23, 0x83, 0x26, 0x26, |
||
| 340 | 00333 0x27, 0x0d, 0x28, 0xad, 0x21, 0x27, 0x22, 0x0b, 0x28, 0xae, |
||
| 341 | 00334 0x20, 0x70, 0x21, 0x63, 0x22, 0xb8, 0x23, 0x95, 0x26, 0x12, |
||
| 342 | 00335 0x27, 0x08, 0x28, 0xaf, 0x20, 0x00, 0x21, 0x01, 0x22, 0x00, |
||
| 343 | 00336 0x23, 0x80, 0x24, 0x86, 0x25, 0xcb, 0x26, 0xab, 0x27, 0x0a, |
||
| 344 | 00337 0x28, 0xb0, 0x20, 0x42, 0x21, 0xdd, 0x22, 0x08, 0x24, 0x89, |
||
| 345 | 00338 0x25, 0x07, 0x26, 0xaa, 0x28, 0xb1, 0x20, 0x00, 0x21, 0x18, |
||
| 346 | 00339 0x22, 0x80, 0x23, 0x95, 0x26, 0xa4, 0x27, 0x00, 0x28, 0xb2, |
||
| 347 | 00340 0x20, 0x03, 0x21, 0xd9, 0x22, 0x0f, 0x23, 0x83, 0x26, 0x26, |
||
| 348 | 00341 0x27, 0x0d, 0x28, 0xb3, 0x20, 0x70, 0x21, 0x0a, 0x22, 0xb8, |
||
| 349 | 00342 0x23, 0x95, 0x26, 0xa0, 0x27, 0x00, 0x28, 0xb4, 0x20, 0x02, |
||
| 350 | 00343 0x21, 0xe0, 0x22, 0x08, 0x23, 0x80, 0x26, 0xaa, 0x27, 0x0a, |
||
| 351 | 00344 0x28, 0xb5, 0x20, 0x70, 0x21, 0x0a, 0x22, 0xb8, 0x23, 0x95, |
||
| 352 | 00345 0x26, 0xa0, 0x27, 0x00, 0x28, 0xb6, 0x21, 0x54, 0x26, 0x02, |
||
| 353 | 00346 0x27, 0x08, 0x28, 0xb7, 0x20, 0x00, 0x21, 0x18, 0x22, 0x80, |
||
| 354 | 00347 0x26, 0xa4, 0x27, 0x00, 0x28, 0xb8, 0x21, 0x00, 0x22, 0x00, |
||
| 355 | 00348 0x23, 0x80, 0x24, 0x80, 0x25, 0x48, 0x26, 0xaa, 0x27, 0x0a, |
||
| 356 | 00349 0x28, 0xb9, 0x20, 0x70, 0x21, 0x5e, 0x22, 0xb8, 0x23, 0x95, |
||
| 357 | 00350 0x24, 0x89, 0x25, 0x07, 0x26, 0x12, 0x27, 0x08, 0x28, 0xba, |
||
| 358 | 00351 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x80, 0x24, 0x09, |
||
| 359 | 00352 0x25, 0x4b, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0xbb, 0x20, 0x70, |
||
| 360 | 00353 0x21, 0x5f, 0x22, 0xb8, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, |
||
| 361 | 00354 0x26, 0x10, 0x27, 0x08, 0x28, 0xbc, 0x20, 0x00, 0x21, 0x00, |
||
| 362 | 00355 0x22, 0x00, 0x23, 0x00, 0x24, 0x1c, 0x25, 0x83, 0x26, 0xab, |
||
| 363 | 00356 0x27, 0x0a, 0x28, 0xbd, 0x20, 0x03, 0x21, 0x32, 0x22, 0x09, |
||
| 364 | 00357 0x23, 0x83, 0x24, 0x89, 0x25, 0x07, 0x26, 0x26, 0x27, 0x0d, |
||
| 365 | 00358 0x28, 0xbe, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, |
||
| 366 | 00359 0x24, 0x82, 0x25, 0x8c, 0x26, 0xab, 0x27, 0x0a, 0x28, 0xbf, |
||
| 367 | 00360 0x20, 0x03, 0x21, 0x25, 0x22, 0x09, 0x23, 0x83, 0x24, 0x89, |
||
| 368 | 00361 0x25, 0x07, 0x26, 0x26, 0x27, 0x0d, 0x28, 0xc0, 0x20, 0x42, |
||
| 369 | 00362 0x21, 0xbc, 0x23, 0x80, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0xc1, |
||
| 370 | 00363 0x20, 0x00, 0x21, 0x01, 0x22, 0x00, 0x23, 0x00, 0x24, 0x01, |
||
| 371 | 00364 0x25, 0xc0, 0x26, 0xab, 0x28, 0xc2, 0x20, 0x70, 0x21, 0x0f, |
||
| 372 | 00365 0x22, 0xb8, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x20, |
||
| 373 | 00366 0x27, 0x00, 0x28, 0xc3, 0x20, 0x03, 0x21, 0xe3, 0x22, 0x0f, |
||
| 374 | 00367 0x23, 0x83, 0x26, 0x26, 0x27, 0x0d, 0x28, 0xc4, 0x20, 0x05, |
||
| 375 | 00368 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, |
||
| 376 | 00369 0x28, 0xc5, 0x20, 0x00, 0x21, 0x03, 0x23, 0x95, 0x26, 0x14, |
||
| 377 | 00370 0x27, 0x08, 0x28, 0xc6, 0x21, 0xa6, 0x23, 0xa4, 0x26, 0x2a, |
||
| 378 | 00371 0x27, 0x05, 0x28, 0xc7, 0x21, 0x00, 0x23, 0xa0, 0x26, 0x44, |
||
| 379 | 00372 0x27, 0x09, 0x28, 0xc8, 0x21, 0x18, 0x22, 0x6d, 0x23, 0x80, |
||
| 380 | 00373 0x24, 0x9e, 0x25, 0x7b, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0xc9, |
||
| 381 | 00374 0x20, 0x42, 0x21, 0x13, 0x22, 0x0b, 0x24, 0x89, 0x25, 0x07, |
||
| 382 | 00375 0x28, 0xca, 0x20, 0x00, 0x21, 0xae, 0x22, 0x00, 0x23, 0x95, |
||
| 383 | 00376 0x26, 0x24, 0x27, 0x00, 0x28, 0xcb, 0x21, 0x00, 0x22, 0x03, |
||
| 384 | 00377 0x23, 0x80, 0x24, 0x87, 0x25, 0x7b, 0x26, 0xaa, 0x27, 0x0a, |
||
| 385 | 00378 0x28, 0xcc, 0x20, 0x42, 0x21, 0x16, 0x22, 0x0b, 0x24, 0x89, |
||
| 386 | 00379 0x25, 0x07, 0x28, 0xcd, 0x20, 0x00, 0x21, 0xae, 0x22, 0x00, |
||
| 387 | 00380 0x23, 0x95, 0x26, 0x24, 0x27, 0x00, 0x28, 0xce, 0x20, 0x05, |
||
| 388 | 00381 0x21, 0x00, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, 0x28, 0xcf, |
||
| 389 | 00382 0x20, 0x03, 0x21, 0x0d, 0x22, 0x0b, 0x23, 0x83, 0x26, 0x26, |
||
| 390 | 00383 0x27, 0x0d, 0x28, 0xd0, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, |
||
| 391 | 00384 0x23, 0x00, 0x24, 0x80, 0x26, 0x02, 0x27, 0x00, 0x28, 0xd1, |
||
| 392 | 00385 0x23, 0x80, 0x24, 0x09, 0x25, 0x48, 0x26, 0x1e, 0x28, 0xd2, |
||
| 393 | 00386 0x21, 0x58, 0x22, 0x34, 0x23, 0x33, 0x24, 0x80, 0x25, 0x07, |
||
| 394 | 00387 0x26, 0x2a, 0x28, 0xd3, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, |
||
| 395 | 00388 0x26, 0x80, 0x27, 0x10, 0x28, 0xd4, 0x21, 0x10, 0x23, 0x63, |
||
| 396 | 00389 0x26, 0x2a, 0x27, 0x00, 0x28, 0xd5, 0x21, 0x00, 0x23, 0x60, |
||
| 397 | 00390 0x26, 0xa8, 0x27, 0x12, 0x28, 0xd6, 0x21, 0xaf, 0x22, 0x4c, |
||
| 398 | 00391 0x23, 0x00, 0x26, 0xc8, 0x27, 0x0c, 0x28, 0xd7, 0x21, 0x00, |
||
| 399 | 00392 0x22, 0x00, 0x26, 0x80, 0x27, 0x05, 0x28, 0xd8, 0x23, 0x80, |
||
| 400 | 00393 0x24, 0x86, 0x25, 0x3b, 0x26, 0x1e, 0x27, 0x00, 0x28, 0xd9, |
||
| 401 | 00394 0x20, 0x42, 0x21, 0x1c, 0x22, 0x0e, 0x23, 0x00, 0x24, 0x80, |
||
| 402 | 00395 0x25, 0x07, 0x28, 0xda, 0x20, 0x00, 0x21, 0x35, 0x22, 0x29, |
||
| 403 | 00396 0x26, 0xc4, 0x27, 0x0c, 0x28, 0xdb, 0x20, 0x02, 0x21, 0x1d, |
||
| 404 | 00397 0x22, 0x0e, 0x26, 0x1e, 0x27, 0x00, 0x28, 0xdc, 0x20, 0x00, |
||
| 405 | 00398 0x21, 0x7f, 0x22, 0x34, 0x26, 0xc4, 0x27, 0x0c, 0x28, 0xdd, |
||
| 406 | 00399 0x21, 0x00, 0x22, 0x00, 0x23, 0x90, 0x24, 0x9f, 0x25, 0x04, |
||
| 407 | 00400 0x26, 0x10, 0x27, 0x0a, 0x28, 0xde, 0x23, 0x00, 0x24, 0x84, |
||
| 408 | 00401 0x25, 0x00, 0x26, 0x80, 0x27, 0x10, 0x28, 0xdf, 0x21, 0x06, |
||
| 409 | 00402 0x23, 0x63, 0x24, 0x80, 0x25, 0x07, 0x26, 0x2a, 0x27, 0x00, |
||
| 410 | 00403 0x28, 0xe0, 0x21, 0x00, 0x23, 0x80, 0x24, 0x89, 0x26, 0xaa, |
||
| 411 | 00404 0x27, 0x0a, 0x28, 0xe1, 0x20, 0x05, 0x23, 0x84, 0x26, 0xb4, |
||
| 412 | 00405 0x27, 0x09, 0x28, 0xe2, 0x20, 0x70, 0x21, 0x61, 0x22, 0xb8, |
||
| 413 | 00406 0x23, 0x95, 0x26, 0x12, 0x27, 0x08, 0x28, 0xe3, 0x20, 0x00, |
||
| 414 | 00407 0x21, 0x01, 0x22, 0x00, 0x23, 0x80, 0x24, 0x86, 0x25, 0xc3, |
||
| 415 | 00408 0x26, 0xab, 0x27, 0x0a, 0x28, 0xe4, 0x20, 0x42, 0x21, 0xce, |
||
| 416 | 00409 0x22, 0x0f, 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, 0x28, 0xe5, |
||
| 417 | 00410 0x20, 0x70, 0x21, 0x50, 0x22, 0xb8, 0x23, 0x95, 0x26, 0x12, |
||
| 418 | 00411 0x27, 0x08, 0x28, 0xe6, 0x20, 0x05, 0x21, 0x00, 0x22, 0x00, |
||
| 419 | 00412 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, 0x28, 0xe7, 0x20, 0x70, |
||
| 420 | 00413 0x21, 0x64, 0x22, 0xb8, 0x23, 0x95, 0x26, 0x12, 0x27, 0x08, |
||
| 421 | 00414 0x28, 0xe8, 0x20, 0x00, 0x21, 0x01, 0x22, 0x00, 0x23, 0x80, |
||
| 422 | 00415 0x24, 0x86, 0x25, 0xc3, 0x26, 0xab, 0x27, 0x0a, 0x28, 0xe9, |
||
| 423 | 00416 0x20, 0x42, 0x21, 0xd3, 0x22, 0x0f, 0x24, 0x89, 0x25, 0x07, |
||
| 424 | 00417 0x26, 0xaa, 0x28, 0xea, 0x20, 0x70, 0x21, 0x51, 0x22, 0xb8, |
||
| 425 | 00418 0x23, 0x95, 0x26, 0x12, 0x27, 0x08, 0x28, 0xeb, 0x20, 0x05, |
||
| 426 | 00419 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, |
||
| 427 | 00420 0x28, 0xec, 0x20, 0x70, 0x21, 0x65, 0x22, 0xb8, 0x23, 0x95, |
||
| 428 | 00421 0x26, 0x12, 0x27, 0x08, 0x28, 0xed, 0x20, 0x00, 0x21, 0x01, |
||
| 429 | 00422 0x22, 0x00, 0x23, 0x80, 0x24, 0x86, 0x25, 0xc3, 0x26, 0xab, |
||
| 430 | 00423 0x27, 0x0a, 0x28, 0xee, 0x20, 0x42, 0x21, 0xd8, 0x22, 0x0f, |
||
| 431 | 00424 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, 0x28, 0xef, 0x20, 0x70, |
||
| 432 | 00425 0x21, 0x52, 0x22, 0xb8, 0x23, 0x95, 0x26, 0x12, 0x27, 0x08, |
||
| 433 | 00426 0x28, 0xf0, 0x20, 0x05, 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, |
||
| 434 | 00427 0x26, 0xb4, 0x27, 0x09, 0x28, 0xf1, 0x20, 0x70, 0x21, 0x61, |
||
| 435 | 00428 0x22, 0xb8, 0x23, 0x95, 0x26, 0x02, 0x27, 0x08, 0x28, 0xf2, |
||
| 436 | 00429 0x20, 0x00, 0x21, 0x01, 0x22, 0x00, 0x23, 0x80, 0x24, 0x86, |
||
| 437 | 00430 0x25, 0xc3, 0x26, 0xab, 0x27, 0x0a, 0x28, 0xf3, 0x20, 0x42, |
||
| 438 | 00431 0x21, 0xdd, 0x22, 0x0f, 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, |
||
| 439 | 00432 0x28, 0xf4, 0x20, 0x70, 0x21, 0x50, 0x22, 0xb8, 0x23, 0x95, |
||
| 440 | 00433 0x26, 0x02, 0x27, 0x08, 0x28, 0xf5, 0x20, 0x05, 0x21, 0x00, |
||
| 441 | 00434 0x22, 0x00, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, 0x28, 0xf6, |
||
| 442 | 00435 0x20, 0x00, 0x21, 0x01, 0x23, 0x80, 0x24, 0x86, 0x25, 0xcb, |
||
| 443 | 00436 0x26, 0xab, 0x27, 0x0a, 0x28, 0xf7, 0x20, 0x42, 0x21, 0xe1, |
||
| 444 | 00437 0x22, 0x0f, 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, 0x28, 0xf8, |
||
| 445 | 00438 0x20, 0x00, 0x21, 0x02, 0x22, 0x00, 0x23, 0x00, 0x24, 0x81, |
||
| 446 | 00439 0x25, 0xc4, 0x26, 0xab, 0x28, 0xf9, 0x21, 0x00, 0x23, 0x80, |
||
| 447 | 00440 0x24, 0x89, 0x25, 0x48, 0x26, 0xaa, 0x28, 0xfa, 0x20, 0x05, |
||
| 448 | 00441 0x23, 0x84, 0x25, 0x07, 0x26, 0xb4, 0x27, 0x09, 0x28, 0xfb, |
||
| 449 | 00442 0x20, 0x70, 0x21, 0x4e, 0x22, 0xb8, 0x23, 0x95, 0x26, 0x10, |
||
| 450 | 00443 0x27, 0x08, 0x28, 0xfc, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, |
||
| 451 | 00444 0x23, 0x80, 0x24, 0x86, 0x25, 0xc3, 0x26, 0xab, 0x27, 0x0a, |
||
| 452 | 00445 0x28, 0xfd, 0x20, 0x42, 0x21, 0xe7, 0x22, 0x0f, 0x24, 0x89, |
||
| 453 | 00446 0x25, 0x07, 0x26, 0xaa, 0x28, 0xfe, 0x20, 0x00, 0x21, 0xbb, |
||
| 454 | 00447 0x22, 0x00, 0x23, 0x95, 0x26, 0x20, 0x27, 0x00, 0x28, 0xff, |
||
| 455 | 00448 0x20, 0x05, 0x21, 0x00, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, |
||
| 456 | 00449 0x2a, 0x08, 0x10, 0x01, 0x3a, 0x00, 0x64, 0x3a, 0x65, 0xbb, |
||
| 457 | 00450 0x08, 0x3a, 0x09, 0xbb, 0x50, 0x10, 0x52, 0x67, 0x51, 0x77, |
||
| 458 | 00451 0x05, 0xa1, 0x18, 0x04, 0xff, 0xff |
||
| 459 | 00452 }; |
||
| 460 | 00453 |
||
| 461 | 00454 <span class="keywordtype">void</span> sta013HWReset(<span class="keywordtype">void</span>) |
||
| 462 | 00455 { |
||
| 463 | 00456 sbi(DDRD, 2); <span class="comment">// set reset pin to output</span> |
||
| 464 | 00457 sbi(PORTD, 2); <span class="comment">// clock RESET low</span> |
||
| 465 | 00458 cbi(PORTD, 2); |
||
| 466 | 00459 <a class="code" href="group__timer.html#ga10">timerPause</a>(10); |
||
| 467 | 00460 sbi(PORTD, 2); |
||
| 468 | 00461 |
||
| 469 | 00462 <span class="comment">// give the sta013 a little time to come out of reset</span> |
||
| 470 | 00463 <a class="code" href="group__timer.html#ga10">timerPause</a>(50); |
||
| 471 | 00464 } |
||
| 472 | 00465 |
||
| 473 | 00466 u08 sta013ReadReg(u08 reg) |
||
| 474 | 00467 { |
||
| 475 | 00468 u08 data; |
||
| 476 | 00469 <a class="code" href="i2csw_8c.html#a13">i2cReceive</a>(STA_I2C_DEV, reg, 1, &data); |
||
| 477 | 00470 <span class="keywordflow">return</span> data; |
||
| 478 | 00471 } |
||
| 479 | 00472 |
||
| 480 | 00473 <span class="keywordtype">void</span> sta013WriteReg(u08 reg, u08 data) |
||
| 481 | 00474 { |
||
| 482 | 00475 <a class="code" href="i2csw_8c.html#a12">i2cSend</a>(STA_I2C_DEV, reg, 1, &data); |
||
| 483 | 00476 } |
||
| 484 | 00477 |
||
| 485 | 00478 <span class="keywordtype">void</span> sta013DownloadUpdate(<span class="keywordtype">void</span>) |
||
| 486 | 00479 { |
||
| 487 | 00480 u16 i; |
||
| 488 | 00481 u08 reg, data; |
||
| 489 | 00482 |
||
| 490 | 00483 i=0; |
||
| 491 | 00484 <span class="comment">// get first reg/data pair</span> |
||
| 492 | 00485 reg = pgm_read_byte(STA013_UpdateData + i++); |
||
| 493 | 00486 data = pgm_read_byte(STA013_UpdateData + i++); |
||
| 494 | 00487 <span class="comment">// loop until end of update</span> |
||
| 495 | 00488 <span class="keywordflow">while</span>( (reg != 0xff) ) |
||
| 496 | 00489 { |
||
| 497 | 00490 sta013WriteReg(reg, data); |
||
| 498 | 00491 reg = pgm_read_byte(STA013_UpdateData + i++); |
||
| 499 | 00492 data = pgm_read_byte(STA013_UpdateData + i++); |
||
| 500 | 00493 } |
||
| 501 | 00494 } |
||
| 502 | 00495 |
||
| 503 | 00496 |
||
| 504 | 00497 u08 sta013Init(<span class="keywordtype">void</span>) |
||
| 505 | 00498 { |
||
| 506 | 00499 <span class="comment">// reset STA013 device</span> |
||
| 507 | 00500 sta013HWReset(); |
||
| 508 | 00501 |
||
| 509 | 00502 <span class="comment">// identify STA013 device</span> |
||
| 510 | 00503 <span class="keywordflow">if</span>(sta013ReadReg(STA_REG_IDENT) != STA_IDENT) |
||
| 511 | 00504 { |
||
| 512 | 00505 <span class="keywordflow">return</span> FALSE; |
||
| 513 | 00506 } |
||
| 514 | 00507 |
||
| 515 | 00508 <span class="comment">// do firmware configuration and update</span> |
||
| 516 | 00509 sta013DownloadUpdate(); |
||
| 517 | 00510 <span class="comment">// start decoder</span> |
||
| 518 | 00511 sta013StartDecoder(); |
||
| 519 | 00512 |
||
| 520 | 00513 <span class="keywordflow">return</span> TRUE; |
||
| 521 | 00514 } |
||
| 522 | 00515 |
||
| 523 | 00516 |
||
| 524 | 00517 <span class="keywordtype">void</span> sta013StartDecoder(<span class="keywordtype">void</span>) |
||
| 525 | 00518 { |
||
| 526 | 00519 <span class="comment">// Soft reset</span> |
||
| 527 | 00520 sta013WriteReg(STA_REG_SOFT_RESET, 0x01); |
||
| 528 | 00521 sta013WriteReg(STA_REG_SOFT_RESET, 0x00); |
||
| 529 | 00522 |
||
| 530 | 00523 <span class="comment">// Mute and configure DAC output</span> |
||
| 531 | 00524 sta013WriteReg(STA_REG_MUTE, 0x01); |
||
| 532 | 00525 sta013WriteReg(STA_REG_PCMDIVIDER, 0x01); <span class="comment">// 32-bit mode, O_FAC = 256</span> |
||
| 533 | 00526 sta013WriteReg(STA_REG_PCMCONF, 0x31); <span class="comment">// 18-bit mode & more</span> |
||
| 534 | 00527 |
||
| 535 | 00528 <span class="comment">// Configure PLL for MP3 rates</span> |
||
| 536 | 00529 sta013WriteReg(STA_REG_PLLFRAC_441_H, 0x67); |
||
| 537 | 00530 sta013WriteReg(STA_REG_PLLFRAC_441_L, 0x77); |
||
| 538 | 00531 sta013WriteReg(STA_REG_PLLFRAC_H, 0xbb); |
||
| 539 | 00532 sta013WriteReg(STA_REG_PLLFRAC_L, 0x3a); |
||
| 540 | 00533 sta013WriteReg(STA_REG_MFSDF_441, 0x10); |
||
| 541 | 00534 sta013WriteReg(STA_REG_MFSDF, 0x0F); |
||
| 542 | 00535 |
||
| 543 | 00536 <span class="comment">// Configure interface polarities, etc</span> |
||
| 544 | 00537 sta013WriteReg(STA_REG_PLLCTL_2, 0x0C); |
||
| 545 | 00538 sta013WriteReg(STA_REG_PLLCTL_3, 0x00); |
||
| 546 | 00539 sta013WriteReg(STA_REG_PLLCTL_1, 0xA1); |
||
| 547 | 00540 sta013WriteReg(STA_REG_SCLK_POL, 0x00); <span class="comment">// data sampled on rising edge</span> |
||
| 548 | 00541 sta013WriteReg(STA_REG_REQ_POL, 0x01); <span class="comment">// REQ line active high</span> |
||
| 549 | 00542 sta013WriteReg(STA_REG_DATA_REQ_ENABLE, 0x04); |
||
| 550 | 00543 sta013WriteReg(STA_REG_PLLCTL_1, 0xA1); |
||
| 551 | 00544 |
||
| 552 | 00545 <span class="comment">// Set audio tone controls</span> |
||
| 553 | 00546 sta013SetTone(0, 0, 0, 0); |
||
| 554 | 00547 |
||
| 555 | 00548 <span class="comment">// Unmute and start running</span> |
||
| 556 | 00549 sta013WriteReg(STA_REG_RUN, 0x01); |
||
| 557 | 00550 sta013WriteReg(STA_REG_PLAY, 0x01); |
||
| 558 | 00551 sta013WriteReg(STA_REG_MUTE, 0x00); |
||
| 559 | 00552 } |
||
| 560 | 00553 |
||
| 561 | 00554 |
||
| 562 | 00555 <span class="keywordtype">void</span> sta013StopDecoder(<span class="keywordtype">void</span>) |
||
| 563 | 00556 { |
||
| 564 | 00557 <span class="comment">// mute output</span> |
||
| 565 | 00558 sta013WriteReg(STA_REG_MUTE, 0x01); |
||
| 566 | 00559 <span class="comment">// soft reset</span> |
||
| 567 | 00560 sta013WriteReg(STA_REG_SOFT_RESET, 0x01); |
||
| 568 | 00561 sta013WriteReg(STA_REG_SOFT_RESET, 0x00); |
||
| 569 | 00562 } |
||
| 570 | 00563 |
||
| 571 | 00564 |
||
| 572 | 00565 <span class="keywordtype">void</span> sta013PauseDecoder(<span class="keywordtype">void</span>) |
||
| 573 | 00566 { |
||
| 574 | 00567 <span class="comment">// enable mute</span> |
||
| 575 | 00568 sta013WriteReg(STA_REG_MUTE, 0x01); |
||
| 576 | 00569 <span class="comment">// stop the decoder</span> |
||
| 577 | 00570 sta013WriteReg(STA_REG_PLAY, 0x00); |
||
| 578 | 00571 } |
||
| 579 | 00572 |
||
| 580 | 00573 |
||
| 581 | 00574 <span class="keywordtype">void</span> sta013ResumeDecoder(<span class="keywordtype">void</span>) |
||
| 582 | 00575 { |
||
| 583 | 00576 <span class="comment">// run the decoder</span> |
||
| 584 | 00577 sta013WriteReg(STA_REG_PLAY, 0x01); |
||
| 585 | 00578 <span class="comment">// disable mute</span> |
||
| 586 | 00579 sta013WriteReg(STA_REG_MUTE, 0x00); |
||
| 587 | 00580 } |
||
| 588 | 00581 |
||
| 589 | 00582 <span class="keywordtype">void</span> sta013GetMP3Info(u16 *bitrate, u08 *sampFreq, u08 *mode) |
||
| 590 | 00583 { |
||
| 591 | 00584 u08 headL, headM, headH; |
||
| 592 | 00585 u08 mpegID, bitrateIndex, sampFreqIndex; |
||
| 593 | 00586 |
||
| 594 | 00587 <span class="comment">// get the MP3 header info</span> |
||
| 595 | 00588 headH = sta013ReadReg(STA_REG_HEAD_H); |
||
| 596 | 00589 headM = sta013ReadReg(STA_REG_HEAD_M); |
||
| 597 | 00590 headL = sta013ReadReg(STA_REG_HEAD_L); |
||
| 598 | 00591 |
||
| 599 | 00592 <span class="comment">// IDex:ID is in head[20:19]</span> |
||
| 600 | 00593 <span class="comment">// 00 - MPEG2.5</span> |
||
| 601 | 00594 <span class="comment">// 01 - reserved</span> |
||
| 602 | 00595 <span class="comment">// 10 - MPEG2</span> |
||
| 603 | 00596 <span class="comment">// 11 - MPEG1</span> |
||
| 604 | 00597 mpegID = (headH & 0x18)>>3; |
||
| 605 | 00598 |
||
| 606 | 00599 <span class="comment">// sampling frequency is in head[11:10]</span> |
||
| 607 | 00600 sampFreqIndex = ((headM & 0x0C)>>2) | (mpegID<<2); |
||
| 608 | 00601 |
||
| 609 | 00602 <span class="comment">// bitrate index is in head[15:12]</span> |
||
| 610 | 00603 bitrateIndex = ((headM & 0xF0)>>4) | ((mpegID & 0x01)<<4); |
||
| 611 | 00604 <span class="comment">//bitrateIndex = ((headM & 0xF0)>>4) | (1<<4);</span> |
||
| 612 | 00605 |
||
| 613 | 00606 <span class="comment">// mode is in head[7:6]</span> |
||
| 614 | 00607 <span class="comment">// 00 - stereo</span> |
||
| 615 | 00608 <span class="comment">// 01 - joint stereo</span> |
||
| 616 | 00609 <span class="comment">// 10 - dual channel</span> |
||
| 617 | 00610 <span class="comment">// 11 - single channel (mono)</span> |
||
| 618 | 00611 *mode = (headL & 0xC0)>>6; |
||
| 619 | 00612 |
||
| 620 | 00613 *bitrate = 2 * pgm_read_byte( MP3_Bitrates + bitrateIndex ); |
||
| 621 | 00614 *sampFreq = pgm_read_byte( MP3_SamplingFrequencies + sampFreqIndex ); |
||
| 622 | 00615 |
||
| 623 | 00616 <span class="comment">/*</span> |
||
| 624 | 00617 <span class="comment"> header = (unsigned long)sta013ReadReg(STA_REG_HEAD_H) << 16 |</span> |
||
| 625 | 00618 <span class="comment"> (unsigned long)sta013ReadReg(STA_REG_HEAD_M) << 8 |</span> |
||
| 626 | 00619 <span class="comment"> (unsigned long)sta013ReadReg(STA_REG_HEAD_L);</span> |
||
| 627 | 00620 <span class="comment"></span> |
||
| 628 | 00621 <span class="comment">// hdr->word = l;</span> |
||
| 629 | 00622 <span class="comment">// hdr->emphasis = l & 0x03;</span> |
||
| 630 | 00623 <span class="comment">// hdr->isOriginal = (l >> 2) & 0x01;</span> |
||
| 631 | 00624 <span class="comment">// hdr->isCopyrighted = (l >> 3) & 0x01;</span> |
||
| 632 | 00625 <span class="comment">// hdr->modeExtension = (l >> 4) & 0x03;</span> |
||
| 633 | 00626 <span class="comment">// hdr->mode = (l >> 6) & 0x03;</span> |
||
| 634 | 00627 <span class="comment">// hdr->private = (l >> 8) & 0x01;</span> |
||
| 635 | 00628 <span class="comment">// hdr->padding = (l >> 9) & 0x01;</span> |
||
| 636 | 00629 <span class="comment">// hdr->frequencyIndex = (l >> 10) & 0x03;</span> |
||
| 637 | 00630 <span class="comment">// hdr->bitrateIndex = (l >> 12) & 0x0f;</span> |
||
| 638 | 00631 <span class="comment">// hdr->protection = (l >> 16) & 0x01;</span> |
||
| 639 | 00632 <span class="comment">// hdr->layer = (l >> 17) & 0x03;</span> |
||
| 640 | 00633 <span class="comment">// hdr->ID = (l >> 19) & 0x01;</span> |
||
| 641 | 00634 <span class="comment">// hdr->ID_ex = (l >> 20) & 0x01;</span> |
||
| 642 | 00635 <span class="comment">*/</span> |
||
| 643 | 00636 } |
||
| 644 | 00637 |
||
| 645 | 00638 u16 sta013GetAverageBitrate(<span class="keywordtype">void</span>) |
||
| 646 | 00639 { |
||
| 647 | 00640 <span class="keywordflow">return</span> (2 * sta013ReadReg(STA_REG_AVERAGE_BITRATE)); |
||
| 648 | 00641 } |
||
| 649 | 00642 |
||
| 650 | 00643 <span class="keywordtype">void</span> sta013SetVolume(u08 volume, s08 balance) |
||
| 651 | 00644 { |
||
| 652 | 00645 <span class="keywordtype">char</span> attenL, attenR; |
||
| 653 | 00646 |
||
| 654 | 00647 <span class="comment">// volume is expected as 0-100 value</span> |
||
| 655 | 00648 <span class="comment">// Note:</span> |
||
| 656 | 00649 <span class="comment">// #define MIN_VOLUME_ATTENUATION 0</span> |
||
| 657 | 00650 <span class="comment">// #define MAX_VOLUME_ATTENUATION 96</span> |
||
| 658 | 00651 |
||
| 659 | 00652 <span class="keywordflow">if</span>( balance > 0) |
||
| 660 | 00653 { <span class="comment">// balance to the left, attenuate right</span> |
||
| 661 | 00654 attenL = (100 - volume); |
||
| 662 | 00655 attenR = (100 - volume) - (balance); |
||
| 663 | 00656 } |
||
| 664 | 00657 <span class="keywordflow">else</span> |
||
| 665 | 00658 { <span class="comment">// balance to the right, attenuate left</span> |
||
| 666 | 00659 attenL = (100 - volume) + (balance); |
||
| 667 | 00660 attenR = (100 - volume); |
||
| 668 | 00661 } |
||
| 669 | 00662 <span class="comment">// respect limits</span> |
||
| 670 | 00663 attenL = MIN(attenL,MAX_VOLUME_ATTENUATION); |
||
| 671 | 00664 attenL = MAX(attenL,MIN_VOLUME_ATTENUATION); |
||
| 672 | 00665 attenR = MIN(attenR,MAX_VOLUME_ATTENUATION); |
||
| 673 | 00666 attenR = MAX(attenR,MIN_VOLUME_ATTENUATION); |
||
| 674 | 00667 |
||
| 675 | 00668 <span class="comment">// set volume</span> |
||
| 676 | 00669 sta013WriteReg(STA_REG_DLA, attenL); |
||
| 677 | 00670 sta013WriteReg(STA_REG_DLB, MAX_VOLUME_ATTENUATION); |
||
| 678 | 00671 sta013WriteReg(STA_REG_DRA, attenR); |
||
| 679 | 00672 sta013WriteReg(STA_REG_DRB, MAX_VOLUME_ATTENUATION); |
||
| 680 | 00673 } |
||
| 681 | 00674 |
||
| 682 | 00675 |
||
| 683 | 00676 <span class="keywordtype">void</span> sta013SetTone(s08 bassEnh, u16 bassFreq, s08 trebleEnh, u16 trebleFreq) |
||
| 684 | 00677 { |
||
| 685 | 00678 <span class="comment">// set bass enhancement</span> |
||
| 686 | 00679 sta013WriteReg(STA_REG_BASS_FREQUENCY_LOW, (bassFreq ) & 0xFF ); |
||
| 687 | 00680 sta013WriteReg(STA_REG_BASS_FREQUENCY_HIGH, (bassFreq>>8) & 0xFF ); |
||
| 688 | 00681 <span class="comment">// respect limits</span> |
||
| 689 | 00682 bassEnh = MIN(bassEnh,MAX_BASS_ENHANCE); |
||
| 690 | 00683 bassEnh = MAX(bassEnh,MIN_BASS_ENHANCE); |
||
| 691 | 00684 sta013WriteReg(STA_REG_BASS_ENHANCE, bassEnh); |
||
| 692 | 00685 |
||
| 693 | 00686 <span class="comment">// set treble enhancement</span> |
||
| 694 | 00687 sta013WriteReg(STA_REG_TREBLE_FREQUENCY_LOW, (trebleFreq ) & 0xFF ); |
||
| 695 | 00688 sta013WriteReg(STA_REG_TREBLE_FREQUENCY_HIGH, (trebleFreq>>8) & 0xFF ); |
||
| 696 | 00689 <span class="comment">// respect limits</span> |
||
| 697 | 00690 trebleEnh = MIN(trebleEnh,MAX_TREBLE_ENHANCE); |
||
| 698 | 00691 trebleEnh = MAX(trebleEnh,MIN_TREBLE_ENHANCE); |
||
| 699 | 00692 sta013WriteReg(STA_REG_TREBLE_ENHANCE, trebleEnh); |
||
| 700 | 00693 |
||
| 701 | 00694 <span class="comment">// set attentuation to avoid clipping</span> |
||
| 702 | 00695 sta013WriteReg( STA_REG_TONE_ATTEN, MAX(bassEnh,trebleEnh) ); |
||
| 703 | 00696 } |
||
| 704 | 00697 |
||
| 705 | 00698 u08 sta013Demand(<span class="keywordtype">void</span>) |
||
| 706 | 00699 { |
||
| 707 | 00700 <span class="keywordflow">return</span> bit_is_set(STA013_DEMAND_PORTIN,STA013_DEMAND_PIN); |
||
| 708 | 00701 } |
||
| 709 | </pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:07 2006 for Procyon AVRlib by |
||
| 710 | <a href="http://www.doxygen.org/index.html"> |
||
| 711 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address> |
||
| 712 | </body> |
||
| 713 | </html> |
Powered by WebSVN v2.8.3