Line No. | Rev | Author | Line |
---|---|---|---|
1 | 6 | kaklik | /*! \file sta013.c \brief STMicroelectronics STA013 MP3 player driver. */ |
2 | //***************************************************************************** |
||
3 | // |
||
4 | // File Name : 'sta013.c' |
||
5 | // Title : STMicroelectronics STA013 MP3 player driver |
||
6 | // Author : Pascal Stang |
||
7 | // Created : 10/22/2000 |
||
8 | // Revised : 7/11/2003 |
||
9 | // Version : 0.3 |
||
10 | // Target MCU : ATmega103 (should work for Atmel AVR Series) |
||
11 | // Editor Tabs : 4 |
||
12 | // |
||
13 | // NOTE: This code is currently below version 1.0, and therefore is considered |
||
14 | // to be lacking in some functionality or documentation, or may not be fully |
||
15 | // tested. Nonetheless, you can expect most functions to work. |
||
16 | // |
||
17 | // This code is distributed under the GNU Public License |
||
18 | // which can be found at http://www.gnu.org/licenses/gpl.txt |
||
19 | // |
||
20 | //***************************************************************************** |
||
21 | |||
22 | #include <avr/io.h> |
||
23 | #include <avr/pgmspace.h> |
||
24 | |||
25 | #include "global.h" |
||
26 | #include "i2csw.h" |
||
27 | #include "timer.h" |
||
28 | //#include "procyon.h" |
||
29 | |||
30 | #include "sta013.h" |
||
31 | |||
32 | // bitrate and sampling frequency mappings |
||
33 | //static int __attribute__ ((progmem)) MP3_Bitrates[] = |
||
34 | // { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 0, |
||
35 | // 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 0}; |
||
36 | static unsigned char __attribute__ ((progmem)) MP3_Bitrates[] = |
||
37 | { 0, 4, 8, 12, 16, 20, 24, 28, 32, 40, 48, 56, 64, 72, 80, 0, |
||
38 | 0, 16, 20, 24, 28, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 0}; |
||
39 | |||
40 | static unsigned char __attribute__ ((progmem)) MP3_SamplingFrequencies[] = |
||
41 | { 11, 12, 8, 0, // MPEG 2.5 rates |
||
42 | 0, 0, 0, 0, // reserved rates |
||
43 | 22, 24, 16, 0, // MPEG 2 rates |
||
44 | 44, 48, 32, 0 // MPEG 1 rates |
||
45 | }; |
||
46 | |||
47 | // STA013 firmware update and configuration data |
||
48 | static unsigned char __attribute__ ((progmem)) STA013_UpdateData[] = |
||
49 | { |
||
50 | 0x3a, 0x01, 0x2a, 0x04, 0x28, 0x00, 0x29, 0x00, 0x20, 0x00, |
||
51 | 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 0x24, 0x00, 0x25, 0x00, |
||
52 | 0x26, 0x00, 0x27, 0x00, 0x28, 0x01, 0x28, 0x02, 0x21, 0x8f, |
||
53 | 0x28, 0x03, 0x21, 0x00, 0x28, 0x04, 0x28, 0x05, 0x28, 0x06, |
||
54 | 0x28, 0x07, 0x28, 0x08, 0x28, 0x09, 0x28, 0x0a, 0x28, 0x0b, |
||
55 | 0x28, 0x0c, 0x20, 0x80, 0x21, 0x90, 0x28, 0x0d, 0x20, 0x00, |
||
56 | 0x21, 0x00, 0x28, 0x0e, 0x20, 0x81, 0x21, 0x91, 0x28, 0x0f, |
||
57 | 0x20, 0x00, 0x21, 0x92, 0x28, 0x10, 0x21, 0x00, 0x28, 0x11, |
||
58 | 0x21, 0x93, 0x28, 0x12, 0x21, 0x00, 0x28, 0x13, 0x28, 0x14, |
||
59 | 0x28, 0x15, 0x20, 0x82, 0x28, 0x16, 0x20, 0x00, 0x28, 0x17, |
||
60 | 0x28, 0x18, 0x28, 0x19, 0x21, 0x94, 0x28, 0x1a, 0x21, 0x95, |
||
61 | 0x28, 0x1b, 0x21, 0x96, 0x28, 0x1c, 0x21, 0x00, 0x28, 0x1d, |
||
62 | 0x20, 0x83, 0x28, 0x1e, 0x20, 0x00, 0x28, 0x1f, 0x21, 0x97, |
||
63 | 0x28, 0x20, 0x21, 0x00, 0x28, 0x21, 0x28, 0x22, 0x28, 0x23, |
||
64 | 0x28, 0x24, 0x28, 0x25, 0x28, 0x26, 0x28, 0x27, 0x28, 0x28, |
||
65 | 0x28, 0x29, 0x28, 0x2a, 0x20, 0x84, 0x28, 0x2b, 0x20, 0x00, |
||
66 | 0x28, 0x2c, 0x28, 0x2d, 0x28, 0x2e, 0x28, 0x2f, 0x28, 0x30, |
||
67 | 0x28, 0x31, 0x28, 0x32, 0x20, 0x85, 0x28, 0x33, 0x20, 0x00, |
||
68 | 0x28, 0x34, 0x28, 0x35, 0x28, 0x36, 0x28, 0x37, 0x21, 0x98, |
||
69 | 0x28, 0x38, 0x21, 0x00, 0x28, 0x39, 0x28, 0x3a, 0x28, 0x3b, |
||
70 | 0x28, 0x3c, 0x28, 0x3d, 0x28, 0x3e, 0x28, 0x3f, 0x28, 0x40, |
||
71 | 0x28, 0x41, 0x28, 0x42, 0x28, 0x43, 0x28, 0x44, 0x28, 0x45, |
||
72 | 0x28, 0x46, 0x28, 0x47, 0x28, 0x48, 0x28, 0x49, 0x28, 0x4a, |
||
73 | 0x28, 0x4b, 0x28, 0x4c, 0x28, 0x4d, 0x28, 0x4e, 0x28, 0x4f, |
||
74 | 0x28, 0x50, 0x28, 0x51, 0x28, 0x52, 0x28, 0x53, 0x28, 0x54, |
||
75 | 0x28, 0x55, 0x28, 0x56, 0x28, 0x57, 0x28, 0x58, 0x28, 0x59, |
||
76 | 0x28, 0x5a, 0x28, 0x5b, 0x28, 0x5c, 0x28, 0x5d, 0x28, 0x5e, |
||
77 | 0x28, 0x5f, 0x28, 0x60, 0x28, 0x61, 0x28, 0x62, 0x21, 0x99, |
||
78 | 0x28, 0x63, 0x21, 0x00, 0x28, 0x64, 0x28, 0x65, 0x28, 0x66, |
||
79 | 0x28, 0x67, 0x28, 0x68, 0x28, 0x69, 0x28, 0x6a, 0x28, 0x6b, |
||
80 | 0x28, 0x6c, 0x28, 0x6d, 0x28, 0x6e, 0x28, 0x6f, 0x28, 0x70, |
||
81 | 0x28, 0x71, 0x28, 0x72, 0x28, 0x73, 0x28, 0x74, 0x28, 0x75, |
||
82 | 0x28, 0x76, 0x28, 0x77, 0x28, 0x78, 0x28, 0x79, 0x28, 0x7a, |
||
83 | 0x28, 0x7b, 0x28, 0x7c, 0x28, 0x7d, 0x28, 0x7e, 0x28, 0x7f, |
||
84 | 0x28, 0x80, 0x28, 0x81, 0x28, 0x82, 0x28, 0x83, 0x28, 0x84, |
||
85 | 0x28, 0x85, 0x28, 0x86, 0x28, 0x87, 0x28, 0x88, 0x28, 0x89, |
||
86 | 0x28, 0x8a, 0x28, 0x8b, 0x28, 0x8c, 0x28, 0x8d, 0x28, 0x8e, |
||
87 | 0x28, 0x8f, 0x28, 0x90, 0x28, 0x91, 0x20, 0x86, 0x28, 0x92, |
||
88 | 0x20, 0x87, 0x28, 0x93, 0x20, 0x00, 0x28, 0x94, 0x28, 0x95, |
||
89 | 0x28, 0x96, 0x28, 0x97, 0x28, 0x98, 0x28, 0x99, 0x28, 0x9a, |
||
90 | 0x28, 0x9b, 0x28, 0x9c, 0x28, 0x9d, 0x28, 0x9e, 0x28, 0x9f, |
||
91 | 0x21, 0x9a, 0x28, 0xa0, 0x21, 0x00, 0x28, 0xa1, 0x28, 0xa2, |
||
92 | 0x28, 0xa3, 0x28, 0xa4, 0x28, 0xa5, 0x28, 0xa6, 0x28, 0xa7, |
||
93 | 0x28, 0xa8, 0x28, 0xa9, 0x28, 0xaa, 0x28, 0xab, 0x28, 0xac, |
||
94 | 0x28, 0xad, 0x28, 0xae, 0x28, 0xaf, 0x28, 0xb0, 0x28, 0xb1, |
||
95 | 0x28, 0xb2, 0x28, 0xb3, 0x28, 0xb4, 0x28, 0xb5, 0x28, 0xb6, |
||
96 | 0x28, 0xb7, 0x28, 0xb8, 0x28, 0xb9, 0x20, 0x88, 0x28, 0xba, |
||
97 | 0x20, 0x00, 0x28, 0xbb, 0x20, 0x89, 0x28, 0xbc, 0x20, 0x00, |
||
98 | 0x28, 0xbd, 0x28, 0xbe, 0x28, 0xbf, 0x28, 0xc0, 0x28, 0xc1, |
||
99 | 0x28, 0xc2, 0x28, 0xc3, 0x21, 0x9b, 0x28, 0xc4, 0x21, 0x00, |
||
100 | 0x28, 0xc5, 0x28, 0xc6, 0x28, 0xc7, 0x28, 0xc8, 0x28, 0xc9, |
||
101 | 0x28, 0xca, 0x28, 0xcb, 0x28, 0xcc, 0x28, 0xcd, 0x28, 0xce, |
||
102 | 0x28, 0xcf, 0x28, 0xd0, 0x28, 0xd1, 0x28, 0xd2, 0x28, 0xd3, |
||
103 | 0x28, 0xd4, 0x28, 0xd5, 0x28, 0xd6, 0x28, 0xd7, 0x28, 0xd8, |
||
104 | 0x28, 0xd9, 0x28, 0xda, 0x28, 0xdb, 0x28, 0xdc, 0x28, 0xdd, |
||
105 | 0x28, 0xde, 0x28, 0xdf, 0x28, 0xe0, 0x28, 0xe1, 0x20, 0x8a, |
||
106 | 0x28, 0xe2, 0x20, 0x8b, 0x28, 0xe3, 0x20, 0x00, 0x28, 0xe4, |
||
107 | 0x28, 0xe5, 0x28, 0xe6, 0x28, 0xe7, 0x28, 0xe8, 0x28, 0xe9, |
||
108 | 0x28, 0xea, 0x28, 0xeb, 0x28, 0xec, 0x28, 0xed, 0x28, 0xee, |
||
109 | 0x28, 0xef, 0x28, 0xf0, 0x28, 0xf1, 0x28, 0xf2, 0x28, 0xf3, |
||
110 | 0x28, 0xf4, 0x28, 0xf5, 0x28, 0xf6, 0x28, 0xf7, 0x28, 0xf8, |
||
111 | 0x20, 0x8c, 0x28, 0xf9, 0x20, 0x00, 0x21, 0x9c, 0x28, 0xfa, |
||
112 | 0x21, 0x9d, 0x28, 0xfb, 0x20, 0x8d, 0x21, 0x9e, 0x28, 0xfc, |
||
113 | 0x20, 0x8e, 0x21, 0x9f, 0x28, 0xfd, 0x20, 0x00, 0x21, 0x00, |
||
114 | 0x28, 0xfe, 0x28, 0xff, 0x2a, 0x01, 0x28, 0x00, 0x22, 0x01, |
||
115 | 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0xa4, 0x27, 0x07, |
||
116 | 0x28, 0x01, 0x21, 0xc7, 0x22, 0x00, 0x23, 0x80, 0x26, 0xc4, |
||
117 | 0x27, 0x0c, 0x28, 0x02, 0x20, 0x09, 0x21, 0x1c, 0x22, 0x04, |
||
118 | 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x03, 0x20, 0x00, 0x21, 0x00, |
||
119 | 0x22, 0x00, 0x23, 0xa6, 0x26, 0xa0, 0x27, 0x07, 0x28, 0x04, |
||
120 | 0x28, 0x05, 0x20, 0x05, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, |
||
121 | 0x28, 0x06, 0x20, 0x00, 0x22, 0x03, 0x23, 0x00, 0x24, 0x81, |
||
122 | 0x25, 0xc0, 0x26, 0xab, 0x27, 0x0a, 0x28, 0x07, 0x21, 0xae, |
||
123 | 0x22, 0x00, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0xa4, |
||
124 | 0x27, 0x00, 0x28, 0x08, 0x21, 0x48, 0x22, 0x01, 0x23, 0x80, |
||
125 | 0x26, 0xc4, 0x27, 0x0c, 0x28, 0x09, 0x20, 0x09, 0x21, 0x04, |
||
126 | 0x22, 0x04, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x0a, 0x20, 0x00, |
||
127 | 0x21, 0x00, 0x22, 0x00, 0x23, 0xa8, 0x26, 0xa4, 0x27, 0x07, |
||
128 | 0x28, 0x0b, 0x28, 0x0c, 0x21, 0x40, 0x22, 0x20, 0x23, 0x80, |
||
129 | 0x26, 0xc4, 0x27, 0x0c, 0x28, 0x0d, 0x22, 0x24, 0x26, 0xc6, |
||
130 | 0x28, 0x0e, 0x21, 0x9e, 0x22, 0x00, 0x26, 0xc8, 0x28, 0x0f, |
||
131 | 0x20, 0x09, 0x21, 0x02, 0x22, 0x14, 0x26, 0xaa, 0x27, 0x0a, |
||
132 | 0x28, 0x10, 0x20, 0x05, 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, |
||
133 | 0x26, 0xb4, 0x27, 0x09, 0x28, 0x11, 0x20, 0x00, 0x21, 0x01, |
||
134 | 0x23, 0x00, 0x24, 0x01, 0x25, 0xc0, 0x26, 0xab, 0x27, 0x0a, |
||
135 | 0x28, 0x12, 0x21, 0xc3, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, |
||
136 | 0x26, 0x20, 0x27, 0x00, 0x28, 0x13, 0x20, 0x03, 0x21, 0xc2, |
||
137 | 0x23, 0x83, 0x26, 0x26, 0x27, 0x0d, 0x28, 0x14, 0x21, 0xb3, |
||
138 | 0x22, 0x08, 0x28, 0x15, 0x20, 0x00, 0x21, 0xc6, 0x22, 0x00, |
||
139 | 0x23, 0x95, 0x26, 0x00, 0x27, 0x08, 0x28, 0x16, 0x21, 0x00, |
||
140 | 0x23, 0x00, 0x24, 0x96, 0x25, 0x03, 0x26, 0xaa, 0x27, 0x0a, |
||
141 | 0x28, 0x17, 0x20, 0x42, 0x21, 0xb6, 0x23, 0x80, 0x24, 0x89, |
||
142 | 0x25, 0x07, 0x28, 0x18, 0x20, 0x00, 0x21, 0x00, 0x23, 0x94, |
||
143 | 0x26, 0x0e, 0x28, 0x19, 0x20, 0x0f, 0x23, 0x84, 0x26, 0xb4, |
||
144 | 0x27, 0x09, 0x28, 0x1a, 0x20, 0x00, 0x23, 0x93, 0x26, 0xa8, |
||
145 | 0x27, 0x03, 0x28, 0x1b, 0x26, 0x28, 0x27, 0x00, 0x28, 0x1c, |
||
146 | 0x21, 0x01, 0x23, 0x00, 0x24, 0x01, 0x25, 0xc0, 0x26, 0xab, |
||
147 | 0x27, 0x0a, 0x28, 0x1d, 0x21, 0xc5, 0x23, 0x95, 0x24, 0x89, |
||
148 | 0x25, 0x07, 0x26, 0x20, 0x27, 0x00, 0x28, 0x1e, 0x21, 0x00, |
||
149 | 0x23, 0x94, 0x26, 0x00, 0x27, 0x0a, 0x28, 0x1f, 0x26, 0x0e, |
||
150 | 0x28, 0x20, 0x20, 0x03, 0x21, 0x79, 0x22, 0x01, 0x23, 0x83, |
||
151 | 0x26, 0x26, 0x27, 0x0d, 0x28, 0x21, 0x21, 0x32, 0x28, 0x22, |
||
152 | 0x20, 0x00, 0x21, 0x04, 0x22, 0x00, 0x23, 0x80, 0x24, 0x00, |
||
153 | 0x25, 0xfc, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x23, 0x21, 0x00, |
||
154 | 0x23, 0x00, 0x25, 0x00, 0x28, 0x24, 0x21, 0xa3, 0x22, 0x0d, |
||
155 | 0x23, 0x80, 0x24, 0x9e, 0x25, 0x3b, 0x28, 0x25, 0x20, 0x42, |
||
156 | 0x21, 0x57, 0x22, 0x01, 0x24, 0x89, 0x25, 0x07, 0x28, 0x26, |
||
157 | 0x20, 0x00, 0x21, 0x43, 0x22, 0x0d, 0x24, 0x00, 0x25, 0x38, |
||
158 | 0x28, 0x27, 0x21, 0x08, 0x22, 0x98, 0x23, 0x95, 0x24, 0x89, |
||
159 | 0x25, 0x07, 0x26, 0x24, 0x27, 0x00, 0x28, 0x28, 0x20, 0x42, |
||
160 | 0x21, 0x93, 0x22, 0x01, 0x23, 0x80, 0x26, 0xaa, 0x27, 0x0a, |
||
161 | 0x28, 0x29, 0x20, 0x03, 0x21, 0x7e, 0x22, 0x04, 0x23, 0x83, |
||
162 | 0x26, 0x26, 0x27, 0x0d, 0x28, 0x2a, 0x20, 0x00, 0x21, 0xb0, |
||
163 | 0x22, 0x00, 0x23, 0x95, 0x26, 0xa0, 0x27, 0x07, 0x28, 0x2b, |
||
164 | 0x21, 0x00, 0x23, 0x00, 0x24, 0x0c, 0x25, 0x04, 0x26, 0xaa, |
||
165 | 0x27, 0x0a, 0x28, 0x2c, 0x21, 0x02, 0x23, 0x80, 0x24, 0x86, |
||
166 | 0x25, 0xc3, 0x26, 0xab, 0x28, 0x2d, 0x20, 0x42, 0x21, 0x97, |
||
167 | 0x22, 0x01, 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, 0x28, 0x2e, |
||
168 | 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x24, 0x1f, 0x25, 0x04, |
||
169 | 0x28, 0x2f, 0x21, 0xb2, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, |
||
170 | 0x26, 0x20, 0x27, 0x04, 0x28, 0x30, 0x20, 0x42, 0x21, 0x8b, |
||
171 | 0x22, 0x04, 0x23, 0x80, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x31, |
||
172 | 0x20, 0x00, 0x21, 0xb1, 0x22, 0x00, 0x23, 0x95, 0x26, 0xa0, |
||
173 | 0x27, 0x07, 0x28, 0x32, 0x20, 0x03, 0x21, 0x75, 0x22, 0x04, |
||
174 | 0x23, 0x83, 0x26, 0x26, 0x27, 0x0d, 0x28, 0x33, 0x20, 0x05, |
||
175 | 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, |
||
176 | 0x28, 0x34, 0x20, 0x00, 0x21, 0x60, 0x23, 0x00, 0x24, 0x01, |
||
177 | 0x25, 0xc0, 0x26, 0xab, 0x27, 0x0a, 0x28, 0x35, 0x21, 0x08, |
||
178 | 0x22, 0x98, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x24, |
||
179 | 0x27, 0x00, 0x28, 0x36, 0x21, 0xbc, 0x22, 0x00, 0x28, 0x37, |
||
180 | 0x21, 0xa3, 0x22, 0x0d, 0x23, 0x00, 0x24, 0x01, 0x25, 0xc0, |
||
181 | 0x26, 0xab, 0x27, 0x0a, 0x28, 0x38, 0x21, 0x60, 0x22, 0x00, |
||
182 | 0x23, 0x80, 0x24, 0x00, 0x25, 0x38, 0x26, 0xaa, 0x28, 0x39, |
||
183 | 0x21, 0x06, 0x22, 0x98, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, |
||
184 | 0x26, 0x24, 0x27, 0x00, 0x28, 0x3a, 0x21, 0xbe, 0x22, 0x00, |
||
185 | 0x28, 0x3b, 0x20, 0x05, 0x21, 0x00, 0x23, 0x84, 0x26, 0xb4, |
||
186 | 0x27, 0x09, 0x28, 0x3c, 0x20, 0x00, 0x21, 0x60, 0x23, 0x00, |
||
187 | 0x24, 0x01, 0x25, 0xc0, 0x26, 0xab, 0x27, 0x0a, 0x28, 0x3d, |
||
188 | 0x21, 0x42, 0x22, 0x01, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, |
||
189 | 0x26, 0x24, 0x27, 0x00, 0x28, 0x3e, 0x21, 0x0c, 0x22, 0x98, |
||
190 | 0x26, 0xa4, 0x27, 0x07, 0x28, 0x3f, 0x21, 0x08, 0x28, 0x40, |
||
191 | 0x21, 0x60, 0x22, 0x00, 0x23, 0x00, 0x24, 0x01, 0x25, 0xc0, |
||
192 | 0x26, 0xab, 0x27, 0x0a, 0x28, 0x41, 0x21, 0x0c, 0x22, 0x98, |
||
193 | 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x24, 0x27, 0x00, |
||
194 | 0x28, 0x42, 0x20, 0x05, 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, |
||
195 | 0x26, 0xb4, 0x27, 0x09, 0x28, 0x43, 0x20, 0x00, 0x23, 0x80, |
||
196 | 0x24, 0x00, 0x25, 0x10, 0x26, 0xab, 0x27, 0x0a, 0x28, 0x44, |
||
197 | 0x21, 0x22, 0x22, 0x01, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, |
||
198 | 0x26, 0x24, 0x27, 0x00, 0x28, 0x45, 0x21, 0x00, 0x22, 0x00, |
||
199 | 0x23, 0x00, 0x24, 0x04, 0x25, 0x12, 0x26, 0xaa, 0x27, 0x0a, |
||
200 | 0x28, 0x46, 0x20, 0x03, 0x21, 0xd4, 0x22, 0x05, 0x23, 0x83, |
||
201 | 0x24, 0x89, 0x25, 0x07, 0x26, 0x26, 0x27, 0x0d, 0x28, 0x47, |
||
202 | 0x20, 0x00, 0x21, 0x60, 0x22, 0x00, 0x23, 0x00, 0x24, 0x01, |
||
203 | 0x25, 0xc0, 0x26, 0xab, 0x27, 0x0a, 0x28, 0x48, 0x21, 0xb3, |
||
204 | 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x00, 0x27, 0x08, |
||
205 | 0x28, 0x49, 0x21, 0x00, 0x23, 0x00, 0x24, 0x09, 0x25, 0x00, |
||
206 | 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x4a, 0x21, 0x02, 0x23, 0x80, |
||
207 | 0x24, 0x86, 0x25, 0x3b, 0x28, 0x4b, 0x20, 0x42, 0x21, 0xdd, |
||
208 | 0x22, 0x05, 0x24, 0x89, 0x25, 0x07, 0x28, 0x4c, 0x20, 0x00, |
||
209 | 0x21, 0x00, 0x22, 0x00, 0x24, 0x1f, 0x25, 0x00, 0x28, 0x4d, |
||
210 | 0x21, 0xb3, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x20, |
||
211 | 0x27, 0x00, 0x28, 0x4e, 0x21, 0x00, 0x23, 0x00, 0x24, 0x97, |
||
212 | 0x25, 0x03, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x4f, 0x20, 0x42, |
||
213 | 0x21, 0xe2, 0x22, 0x05, 0x23, 0x80, 0x24, 0x89, 0x25, 0x07, |
||
214 | 0x28, 0x50, 0x20, 0x00, 0x21, 0x10, 0x22, 0x00, 0x23, 0x00, |
||
215 | 0x24, 0x80, 0x25, 0xcc, 0x26, 0xab, 0x28, 0x51, 0x21, 0x00, |
||
216 | 0x22, 0x40, 0x23, 0xb4, 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, |
||
217 | 0x27, 0x04, 0x28, 0x52, 0x22, 0x00, 0x23, 0xb0, 0x26, 0x92, |
||
218 | 0x27, 0x09, 0x28, 0x53, 0x21, 0x14, 0x22, 0x01, 0x23, 0x95, |
||
219 | 0x26, 0x00, 0x27, 0x08, 0x28, 0x54, 0x21, 0x48, 0x23, 0xa4, |
||
220 | 0x26, 0x2a, 0x27, 0x00, 0x28, 0x55, 0x21, 0x00, 0x22, 0x00, |
||
221 | 0x23, 0x00, 0x24, 0x09, 0x25, 0x00, 0x26, 0xaa, 0x27, 0x0a, |
||
222 | 0x28, 0x56, 0x21, 0x08, 0x23, 0x80, 0x24, 0x86, 0x25, 0x3b, |
||
223 | 0x28, 0x57, 0x20, 0x42, 0x21, 0x11, 0x22, 0x07, 0x24, 0x89, |
||
224 | 0x25, 0x07, 0x28, 0x58, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, |
||
225 | 0x24, 0x1f, 0x25, 0x00, 0x28, 0x59, 0x21, 0x14, 0x22, 0x01, |
||
226 | 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x20, 0x27, 0x00, |
||
227 | 0x28, 0x5a, 0x21, 0x16, 0x26, 0x02, 0x27, 0x09, 0x28, 0x5b, |
||
228 | 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 0x24, 0x80, 0x25, 0x48, |
||
229 | 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x5c, 0x23, 0xa0, 0x24, 0x89, |
||
230 | 0x25, 0x07, 0x26, 0x14, 0x27, 0x09, 0x28, 0x5d, 0x24, 0x80, |
||
231 | 0x25, 0x50, 0x26, 0xa4, 0x27, 0x04, 0x28, 0x5e, 0x21, 0x16, |
||
232 | 0x22, 0x01, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x27, 0x00, |
||
233 | 0x28, 0x5f, 0x21, 0x04, 0x22, 0x00, 0x23, 0x00, 0x24, 0x9c, |
||
234 | 0x25, 0x78, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x60, 0x21, 0x43, |
||
235 | 0x22, 0x0d, 0x24, 0x01, 0x25, 0xc4, 0x26, 0xab, 0x28, 0x61, |
||
236 | 0x21, 0x03, 0x22, 0x00, 0x24, 0x15, 0x28, 0x62, 0x21, 0x00, |
||
237 | 0x24, 0x00, 0x25, 0x00, 0x26, 0xaa, 0x28, 0x63, 0x21, 0x5e, |
||
238 | 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x10, 0x27, 0x09, |
||
239 | 0x28, 0x64, 0x21, 0x03, 0x23, 0x00, 0x24, 0x15, 0x25, 0xc4, |
||
240 | 0x26, 0xab, 0x27, 0x0a, 0x28, 0x65, 0x21, 0x00, 0x23, 0x80, |
||
241 | 0x24, 0x00, 0x25, 0x06, 0x26, 0xaa, 0x28, 0x66, 0x24, 0x8f, |
||
242 | 0x25, 0xe3, 0x26, 0xab, 0x28, 0x67, 0x20, 0x42, 0x21, 0xcd, |
||
243 | 0x22, 0x07, 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, 0x28, 0x68, |
||
244 | 0x20, 0x00, 0x21, 0x60, 0x22, 0x00, 0x23, 0x00, 0x24, 0x01, |
||
245 | 0x25, 0xc0, 0x26, 0xab, 0x28, 0x69, 0x21, 0x00, 0x23, 0x80, |
||
246 | 0x24, 0x8f, 0x25, 0x03, 0x26, 0xaa, 0x28, 0x6a, 0x20, 0x42, |
||
247 | 0x21, 0xdd, 0x22, 0x07, 0x24, 0x89, 0x25, 0x07, 0x28, 0x6b, |
||
248 | 0x20, 0x00, 0x21, 0x43, 0x22, 0x0d, 0x23, 0x00, 0x24, 0x01, |
||
249 | 0x25, 0xc0, 0x26, 0xab, 0x28, 0x6c, 0x21, 0x00, 0x22, 0x00, |
||
250 | 0x24, 0x00, 0x25, 0x04, 0x26, 0xaa, 0x28, 0x6d, 0x20, 0x03, |
||
251 | 0x21, 0x7f, 0x22, 0x01, 0x23, 0x83, 0x24, 0x89, 0x25, 0x07, |
||
252 | 0x26, 0x26, 0x27, 0x0d, 0x28, 0x6e, 0x21, 0x62, 0x28, 0x6f, |
||
253 | 0x20, 0x05, 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, 0x26, 0xb4, |
||
254 | 0x27, 0x09, 0x28, 0x70, 0x20, 0x00, 0x21, 0x06, 0x23, 0x95, |
||
255 | 0x26, 0x00, 0x27, 0x08, 0x28, 0x71, 0x21, 0x01, 0x23, 0x00, |
||
256 | 0x24, 0x97, 0x25, 0x3b, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x72, |
||
257 | 0x20, 0x42, 0x21, 0x0e, 0x22, 0x08, 0x23, 0x80, 0x24, 0x89, |
||
258 | 0x25, 0x07, 0x28, 0x73, 0x20, 0x03, 0x21, 0x3c, 0x22, 0x0b, |
||
259 | 0x23, 0x83, 0x26, 0x26, 0x27, 0x0d, 0x28, 0x74, 0x20, 0x00, |
||
260 | 0x21, 0x03, 0x22, 0x00, 0x23, 0x95, 0x26, 0x02, 0x27, 0x08, |
||
261 | 0x28, 0x75, 0x21, 0x27, 0x23, 0x00, 0x24, 0x81, 0x25, 0xc4, |
||
262 | 0x26, 0xab, 0x27, 0x0a, 0x28, 0x76, 0x21, 0x00, 0x23, 0x80, |
||
263 | 0x24, 0x09, 0x25, 0x48, 0x26, 0xaa, 0x28, 0x77, 0x21, 0x58, |
||
264 | 0x22, 0x34, 0x23, 0xa3, 0x24, 0x89, 0x25, 0x07, 0x26, 0x2a, |
||
265 | 0x27, 0x00, 0x28, 0x78, 0x21, 0x00, 0x22, 0x00, 0x23, 0xa0, |
||
266 | 0x26, 0x00, 0x27, 0x09, 0x28, 0x79, 0x21, 0x07, 0x23, 0x80, |
||
267 | 0x24, 0x03, 0x25, 0x39, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x7a, |
||
268 | 0x21, 0x04, 0x23, 0x00, 0x24, 0x1c, 0x25, 0x38, 0x28, 0x7b, |
||
269 | 0x21, 0x07, 0x23, 0x80, 0x24, 0x83, 0x25, 0x39, 0x28, 0x7c, |
||
270 | 0x21, 0x03, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x02, |
||
271 | 0x27, 0x08, 0x28, 0x7d, 0x21, 0x27, 0x23, 0x00, 0x24, 0x81, |
||
272 | 0x25, 0xc4, 0x26, 0xab, 0x27, 0x0a, 0x28, 0x7e, 0x21, 0x00, |
||
273 | 0x23, 0x80, 0x24, 0x09, 0x25, 0x48, 0x26, 0xaa, 0x28, 0x7f, |
||
274 | 0x21, 0x58, 0x22, 0x34, 0x23, 0xa3, 0x24, 0x89, 0x25, 0x07, |
||
275 | 0x26, 0x2a, 0x27, 0x00, 0x28, 0x80, 0x21, 0x06, 0x22, 0x00, |
||
276 | 0x23, 0x00, 0x24, 0x81, 0x25, 0xc0, 0x26, 0x93, 0x27, 0x01, |
||
277 | 0x28, 0x81, 0x21, 0x00, 0x23, 0x80, 0x24, 0x89, 0x25, 0x48, |
||
278 | 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x82, 0x20, 0x02, 0x21, 0x66, |
||
279 | 0x22, 0x08, 0x23, 0x00, 0x24, 0x00, 0x25, 0x66, 0x28, 0x83, |
||
280 | 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x80, 0x24, 0x1f, |
||
281 | 0x25, 0x02, 0x28, 0x84, 0x21, 0x06, 0x24, 0x89, 0x25, 0x07, |
||
282 | 0x26, 0xdc, 0x27, 0x0c, 0x28, 0x85, 0x21, 0x00, 0x23, 0xaa, |
||
283 | 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x86, 0x23, 0xb6, 0x26, 0x00, |
||
284 | 0x27, 0x08, 0x28, 0x87, 0x23, 0x80, 0x24, 0x86, 0x25, 0x3b, |
||
285 | 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x88, 0x21, 0x05, 0x24, 0x89, |
||
286 | 0x25, 0x07, 0x26, 0xdc, 0x27, 0x0c, 0x28, 0x89, 0x21, 0x00, |
||
287 | 0x23, 0xaa, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x8a, 0x23, 0xb6, |
||
288 | 0x26, 0x00, 0x27, 0x08, 0x28, 0x8b, 0x23, 0x80, 0x24, 0x86, |
||
289 | 0x25, 0x3b, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x8c, 0x20, 0x42, |
||
290 | 0x21, 0x7b, 0x22, 0x08, 0x24, 0x89, 0x25, 0x07, 0x28, 0x8d, |
||
291 | 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 0x24, 0x01, |
||
292 | 0x25, 0x82, 0x28, 0x8e, 0x21, 0x05, 0x24, 0x81, 0x25, 0xc2, |
||
293 | 0x26, 0xab, 0x28, 0x8f, 0x20, 0x03, 0x21, 0x93, 0x22, 0x08, |
||
294 | 0x23, 0x83, 0x24, 0x89, 0x25, 0x07, 0x26, 0x26, 0x27, 0x0d, |
||
295 | 0x28, 0x90, 0x20, 0x00, 0x21, 0x05, 0x22, 0x00, 0x23, 0x00, |
||
296 | 0x24, 0x81, 0x25, 0xc0, 0x26, 0x13, 0x27, 0x01, 0x28, 0x91, |
||
297 | 0x21, 0x00, 0x23, 0x80, 0x24, 0x89, 0x25, 0x48, 0x26, 0xaa, |
||
298 | 0x27, 0x0a, 0x28, 0x92, 0x20, 0x02, 0x21, 0x7e, 0x22, 0x08, |
||
299 | 0x23, 0x00, 0x24, 0x00, 0x25, 0x66, 0x28, 0x93, 0x20, 0x00, |
||
300 | 0x21, 0x00, 0x22, 0x00, 0x23, 0x80, 0x24, 0x1f, 0x25, 0x02, |
||
301 | 0x28, 0x94, 0x21, 0x05, 0x24, 0x89, 0x25, 0x07, 0x26, 0xdc, |
||
302 | 0x27, 0x0c, 0x28, 0x95, 0x21, 0x00, 0x23, 0xaa, 0x26, 0xaa, |
||
303 | 0x27, 0x0a, 0x28, 0x96, 0x23, 0xb6, 0x26, 0x00, 0x27, 0x08, |
||
304 | 0x28, 0x97, 0x23, 0x80, 0x24, 0x86, 0x25, 0x3b, 0x26, 0xaa, |
||
305 | 0x27, 0x0a, 0x28, 0x98, 0x21, 0x05, 0x24, 0x89, 0x25, 0x07, |
||
306 | 0x26, 0xdc, 0x27, 0x0c, 0x28, 0x99, 0x21, 0x00, 0x23, 0xaa, |
||
307 | 0x26, 0xaa, 0x27, 0x0a, 0x28, 0x9a, 0x23, 0x80, 0x24, 0x1f, |
||
308 | 0x25, 0x02, 0x28, 0x9b, 0x21, 0x01, 0x23, 0x00, 0x24, 0x81, |
||
309 | 0x25, 0xc2, 0x26, 0xab, 0x28, 0x9c, 0x20, 0x03, 0x21, 0x93, |
||
310 | 0x22, 0x08, 0x23, 0x83, 0x24, 0x89, 0x25, 0x07, 0x26, 0x26, |
||
311 | 0x27, 0x0d, 0x28, 0x9d, 0x20, 0x00, 0x21, 0x04, 0x22, 0x00, |
||
312 | 0x23, 0x95, 0x26, 0x12, 0x27, 0x08, 0x28, 0x9e, 0x21, 0x60, |
||
313 | 0x23, 0xc4, 0x26, 0xaa, 0x27, 0x04, 0x28, 0x9f, 0x21, 0x00, |
||
314 | 0x23, 0xc0, 0x26, 0x00, 0x27, 0x09, 0x28, 0xa0, 0x20, 0x42, |
||
315 | 0x21, 0xcb, 0x22, 0x08, 0x23, 0x80, 0x26, 0xaa, 0x27, 0x0a, |
||
316 | 0x28, 0xa1, 0x20, 0x70, 0x21, 0x54, 0x22, 0xb8, 0x23, 0x95, |
||
317 | 0x26, 0x12, 0x27, 0x08, 0x28, 0xa2, 0x20, 0x02, 0x21, 0xcc, |
||
318 | 0x22, 0x08, 0x23, 0x80, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0xa3, |
||
319 | 0x20, 0x03, 0x21, 0xca, 0x22, 0x0f, 0x23, 0x83, 0x26, 0x26, |
||
320 | 0x27, 0x0d, 0x28, 0xa4, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, |
||
321 | 0x23, 0x00, 0x24, 0x8c, 0x25, 0x0c, 0x26, 0xaa, 0x27, 0x0a, |
||
322 | 0x28, 0xa5, 0x21, 0x04, 0x24, 0x82, 0x25, 0x78, 0x28, 0xa6, |
||
323 | 0x21, 0x00, 0x23, 0x80, 0x24, 0x89, 0x25, 0x48, 0x26, 0x12, |
||
324 | 0x27, 0x04, 0x28, 0xa7, 0x20, 0x03, 0x21, 0xde, 0x22, 0x0f, |
||
325 | 0x23, 0x83, 0x25, 0x07, 0x26, 0x26, 0x27, 0x0d, 0x28, 0xa8, |
||
326 | 0x20, 0x00, 0x21, 0x01, 0x22, 0x00, 0x23, 0x00, 0x24, 0x9c, |
||
327 | 0x25, 0x78, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0xa9, 0x21, 0x00, |
||
328 | 0x23, 0x80, 0x24, 0x81, 0x25, 0x40, 0x28, 0xaa, 0x20, 0x03, |
||
329 | 0x21, 0xcf, 0x22, 0x0f, 0x23, 0x83, 0x24, 0x89, 0x25, 0x07, |
||
330 | 0x26, 0x26, 0x27, 0x0d, 0x28, 0xab, 0x20, 0x70, 0x21, 0x08, |
||
331 | 0x22, 0xb8, 0x23, 0x95, 0x26, 0xa0, 0x27, 0x04, 0x28, 0xac, |
||
332 | 0x20, 0x03, 0x21, 0xd4, 0x22, 0x0f, 0x23, 0x83, 0x26, 0x26, |
||
333 | 0x27, 0x0d, 0x28, 0xad, 0x21, 0x27, 0x22, 0x0b, 0x28, 0xae, |
||
334 | 0x20, 0x70, 0x21, 0x63, 0x22, 0xb8, 0x23, 0x95, 0x26, 0x12, |
||
335 | 0x27, 0x08, 0x28, 0xaf, 0x20, 0x00, 0x21, 0x01, 0x22, 0x00, |
||
336 | 0x23, 0x80, 0x24, 0x86, 0x25, 0xcb, 0x26, 0xab, 0x27, 0x0a, |
||
337 | 0x28, 0xb0, 0x20, 0x42, 0x21, 0xdd, 0x22, 0x08, 0x24, 0x89, |
||
338 | 0x25, 0x07, 0x26, 0xaa, 0x28, 0xb1, 0x20, 0x00, 0x21, 0x18, |
||
339 | 0x22, 0x80, 0x23, 0x95, 0x26, 0xa4, 0x27, 0x00, 0x28, 0xb2, |
||
340 | 0x20, 0x03, 0x21, 0xd9, 0x22, 0x0f, 0x23, 0x83, 0x26, 0x26, |
||
341 | 0x27, 0x0d, 0x28, 0xb3, 0x20, 0x70, 0x21, 0x0a, 0x22, 0xb8, |
||
342 | 0x23, 0x95, 0x26, 0xa0, 0x27, 0x00, 0x28, 0xb4, 0x20, 0x02, |
||
343 | 0x21, 0xe0, 0x22, 0x08, 0x23, 0x80, 0x26, 0xaa, 0x27, 0x0a, |
||
344 | 0x28, 0xb5, 0x20, 0x70, 0x21, 0x0a, 0x22, 0xb8, 0x23, 0x95, |
||
345 | 0x26, 0xa0, 0x27, 0x00, 0x28, 0xb6, 0x21, 0x54, 0x26, 0x02, |
||
346 | 0x27, 0x08, 0x28, 0xb7, 0x20, 0x00, 0x21, 0x18, 0x22, 0x80, |
||
347 | 0x26, 0xa4, 0x27, 0x00, 0x28, 0xb8, 0x21, 0x00, 0x22, 0x00, |
||
348 | 0x23, 0x80, 0x24, 0x80, 0x25, 0x48, 0x26, 0xaa, 0x27, 0x0a, |
||
349 | 0x28, 0xb9, 0x20, 0x70, 0x21, 0x5e, 0x22, 0xb8, 0x23, 0x95, |
||
350 | 0x24, 0x89, 0x25, 0x07, 0x26, 0x12, 0x27, 0x08, 0x28, 0xba, |
||
351 | 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x80, 0x24, 0x09, |
||
352 | 0x25, 0x4b, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0xbb, 0x20, 0x70, |
||
353 | 0x21, 0x5f, 0x22, 0xb8, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, |
||
354 | 0x26, 0x10, 0x27, 0x08, 0x28, 0xbc, 0x20, 0x00, 0x21, 0x00, |
||
355 | 0x22, 0x00, 0x23, 0x00, 0x24, 0x1c, 0x25, 0x83, 0x26, 0xab, |
||
356 | 0x27, 0x0a, 0x28, 0xbd, 0x20, 0x03, 0x21, 0x32, 0x22, 0x09, |
||
357 | 0x23, 0x83, 0x24, 0x89, 0x25, 0x07, 0x26, 0x26, 0x27, 0x0d, |
||
358 | 0x28, 0xbe, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, |
||
359 | 0x24, 0x82, 0x25, 0x8c, 0x26, 0xab, 0x27, 0x0a, 0x28, 0xbf, |
||
360 | 0x20, 0x03, 0x21, 0x25, 0x22, 0x09, 0x23, 0x83, 0x24, 0x89, |
||
361 | 0x25, 0x07, 0x26, 0x26, 0x27, 0x0d, 0x28, 0xc0, 0x20, 0x42, |
||
362 | 0x21, 0xbc, 0x23, 0x80, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0xc1, |
||
363 | 0x20, 0x00, 0x21, 0x01, 0x22, 0x00, 0x23, 0x00, 0x24, 0x01, |
||
364 | 0x25, 0xc0, 0x26, 0xab, 0x28, 0xc2, 0x20, 0x70, 0x21, 0x0f, |
||
365 | 0x22, 0xb8, 0x23, 0x95, 0x24, 0x89, 0x25, 0x07, 0x26, 0x20, |
||
366 | 0x27, 0x00, 0x28, 0xc3, 0x20, 0x03, 0x21, 0xe3, 0x22, 0x0f, |
||
367 | 0x23, 0x83, 0x26, 0x26, 0x27, 0x0d, 0x28, 0xc4, 0x20, 0x05, |
||
368 | 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, |
||
369 | 0x28, 0xc5, 0x20, 0x00, 0x21, 0x03, 0x23, 0x95, 0x26, 0x14, |
||
370 | 0x27, 0x08, 0x28, 0xc6, 0x21, 0xa6, 0x23, 0xa4, 0x26, 0x2a, |
||
371 | 0x27, 0x05, 0x28, 0xc7, 0x21, 0x00, 0x23, 0xa0, 0x26, 0x44, |
||
372 | 0x27, 0x09, 0x28, 0xc8, 0x21, 0x18, 0x22, 0x6d, 0x23, 0x80, |
||
373 | 0x24, 0x9e, 0x25, 0x7b, 0x26, 0xaa, 0x27, 0x0a, 0x28, 0xc9, |
||
374 | 0x20, 0x42, 0x21, 0x13, 0x22, 0x0b, 0x24, 0x89, 0x25, 0x07, |
||
375 | 0x28, 0xca, 0x20, 0x00, 0x21, 0xae, 0x22, 0x00, 0x23, 0x95, |
||
376 | 0x26, 0x24, 0x27, 0x00, 0x28, 0xcb, 0x21, 0x00, 0x22, 0x03, |
||
377 | 0x23, 0x80, 0x24, 0x87, 0x25, 0x7b, 0x26, 0xaa, 0x27, 0x0a, |
||
378 | 0x28, 0xcc, 0x20, 0x42, 0x21, 0x16, 0x22, 0x0b, 0x24, 0x89, |
||
379 | 0x25, 0x07, 0x28, 0xcd, 0x20, 0x00, 0x21, 0xae, 0x22, 0x00, |
||
380 | 0x23, 0x95, 0x26, 0x24, 0x27, 0x00, 0x28, 0xce, 0x20, 0x05, |
||
381 | 0x21, 0x00, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, 0x28, 0xcf, |
||
382 | 0x20, 0x03, 0x21, 0x0d, 0x22, 0x0b, 0x23, 0x83, 0x26, 0x26, |
||
383 | 0x27, 0x0d, 0x28, 0xd0, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, |
||
384 | 0x23, 0x00, 0x24, 0x80, 0x26, 0x02, 0x27, 0x00, 0x28, 0xd1, |
||
385 | 0x23, 0x80, 0x24, 0x09, 0x25, 0x48, 0x26, 0x1e, 0x28, 0xd2, |
||
386 | 0x21, 0x58, 0x22, 0x34, 0x23, 0x33, 0x24, 0x80, 0x25, 0x07, |
||
387 | 0x26, 0x2a, 0x28, 0xd3, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, |
||
388 | 0x26, 0x80, 0x27, 0x10, 0x28, 0xd4, 0x21, 0x10, 0x23, 0x63, |
||
389 | 0x26, 0x2a, 0x27, 0x00, 0x28, 0xd5, 0x21, 0x00, 0x23, 0x60, |
||
390 | 0x26, 0xa8, 0x27, 0x12, 0x28, 0xd6, 0x21, 0xaf, 0x22, 0x4c, |
||
391 | 0x23, 0x00, 0x26, 0xc8, 0x27, 0x0c, 0x28, 0xd7, 0x21, 0x00, |
||
392 | 0x22, 0x00, 0x26, 0x80, 0x27, 0x05, 0x28, 0xd8, 0x23, 0x80, |
||
393 | 0x24, 0x86, 0x25, 0x3b, 0x26, 0x1e, 0x27, 0x00, 0x28, 0xd9, |
||
394 | 0x20, 0x42, 0x21, 0x1c, 0x22, 0x0e, 0x23, 0x00, 0x24, 0x80, |
||
395 | 0x25, 0x07, 0x28, 0xda, 0x20, 0x00, 0x21, 0x35, 0x22, 0x29, |
||
396 | 0x26, 0xc4, 0x27, 0x0c, 0x28, 0xdb, 0x20, 0x02, 0x21, 0x1d, |
||
397 | 0x22, 0x0e, 0x26, 0x1e, 0x27, 0x00, 0x28, 0xdc, 0x20, 0x00, |
||
398 | 0x21, 0x7f, 0x22, 0x34, 0x26, 0xc4, 0x27, 0x0c, 0x28, 0xdd, |
||
399 | 0x21, 0x00, 0x22, 0x00, 0x23, 0x90, 0x24, 0x9f, 0x25, 0x04, |
||
400 | 0x26, 0x10, 0x27, 0x0a, 0x28, 0xde, 0x23, 0x00, 0x24, 0x84, |
||
401 | 0x25, 0x00, 0x26, 0x80, 0x27, 0x10, 0x28, 0xdf, 0x21, 0x06, |
||
402 | 0x23, 0x63, 0x24, 0x80, 0x25, 0x07, 0x26, 0x2a, 0x27, 0x00, |
||
403 | 0x28, 0xe0, 0x21, 0x00, 0x23, 0x80, 0x24, 0x89, 0x26, 0xaa, |
||
404 | 0x27, 0x0a, 0x28, 0xe1, 0x20, 0x05, 0x23, 0x84, 0x26, 0xb4, |
||
405 | 0x27, 0x09, 0x28, 0xe2, 0x20, 0x70, 0x21, 0x61, 0x22, 0xb8, |
||
406 | 0x23, 0x95, 0x26, 0x12, 0x27, 0x08, 0x28, 0xe3, 0x20, 0x00, |
||
407 | 0x21, 0x01, 0x22, 0x00, 0x23, 0x80, 0x24, 0x86, 0x25, 0xc3, |
||
408 | 0x26, 0xab, 0x27, 0x0a, 0x28, 0xe4, 0x20, 0x42, 0x21, 0xce, |
||
409 | 0x22, 0x0f, 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, 0x28, 0xe5, |
||
410 | 0x20, 0x70, 0x21, 0x50, 0x22, 0xb8, 0x23, 0x95, 0x26, 0x12, |
||
411 | 0x27, 0x08, 0x28, 0xe6, 0x20, 0x05, 0x21, 0x00, 0x22, 0x00, |
||
412 | 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, 0x28, 0xe7, 0x20, 0x70, |
||
413 | 0x21, 0x64, 0x22, 0xb8, 0x23, 0x95, 0x26, 0x12, 0x27, 0x08, |
||
414 | 0x28, 0xe8, 0x20, 0x00, 0x21, 0x01, 0x22, 0x00, 0x23, 0x80, |
||
415 | 0x24, 0x86, 0x25, 0xc3, 0x26, 0xab, 0x27, 0x0a, 0x28, 0xe9, |
||
416 | 0x20, 0x42, 0x21, 0xd3, 0x22, 0x0f, 0x24, 0x89, 0x25, 0x07, |
||
417 | 0x26, 0xaa, 0x28, 0xea, 0x20, 0x70, 0x21, 0x51, 0x22, 0xb8, |
||
418 | 0x23, 0x95, 0x26, 0x12, 0x27, 0x08, 0x28, 0xeb, 0x20, 0x05, |
||
419 | 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, |
||
420 | 0x28, 0xec, 0x20, 0x70, 0x21, 0x65, 0x22, 0xb8, 0x23, 0x95, |
||
421 | 0x26, 0x12, 0x27, 0x08, 0x28, 0xed, 0x20, 0x00, 0x21, 0x01, |
||
422 | 0x22, 0x00, 0x23, 0x80, 0x24, 0x86, 0x25, 0xc3, 0x26, 0xab, |
||
423 | 0x27, 0x0a, 0x28, 0xee, 0x20, 0x42, 0x21, 0xd8, 0x22, 0x0f, |
||
424 | 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, 0x28, 0xef, 0x20, 0x70, |
||
425 | 0x21, 0x52, 0x22, 0xb8, 0x23, 0x95, 0x26, 0x12, 0x27, 0x08, |
||
426 | 0x28, 0xf0, 0x20, 0x05, 0x21, 0x00, 0x22, 0x00, 0x23, 0x84, |
||
427 | 0x26, 0xb4, 0x27, 0x09, 0x28, 0xf1, 0x20, 0x70, 0x21, 0x61, |
||
428 | 0x22, 0xb8, 0x23, 0x95, 0x26, 0x02, 0x27, 0x08, 0x28, 0xf2, |
||
429 | 0x20, 0x00, 0x21, 0x01, 0x22, 0x00, 0x23, 0x80, 0x24, 0x86, |
||
430 | 0x25, 0xc3, 0x26, 0xab, 0x27, 0x0a, 0x28, 0xf3, 0x20, 0x42, |
||
431 | 0x21, 0xdd, 0x22, 0x0f, 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, |
||
432 | 0x28, 0xf4, 0x20, 0x70, 0x21, 0x50, 0x22, 0xb8, 0x23, 0x95, |
||
433 | 0x26, 0x02, 0x27, 0x08, 0x28, 0xf5, 0x20, 0x05, 0x21, 0x00, |
||
434 | 0x22, 0x00, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, 0x28, 0xf6, |
||
435 | 0x20, 0x00, 0x21, 0x01, 0x23, 0x80, 0x24, 0x86, 0x25, 0xcb, |
||
436 | 0x26, 0xab, 0x27, 0x0a, 0x28, 0xf7, 0x20, 0x42, 0x21, 0xe1, |
||
437 | 0x22, 0x0f, 0x24, 0x89, 0x25, 0x07, 0x26, 0xaa, 0x28, 0xf8, |
||
438 | 0x20, 0x00, 0x21, 0x02, 0x22, 0x00, 0x23, 0x00, 0x24, 0x81, |
||
439 | 0x25, 0xc4, 0x26, 0xab, 0x28, 0xf9, 0x21, 0x00, 0x23, 0x80, |
||
440 | 0x24, 0x89, 0x25, 0x48, 0x26, 0xaa, 0x28, 0xfa, 0x20, 0x05, |
||
441 | 0x23, 0x84, 0x25, 0x07, 0x26, 0xb4, 0x27, 0x09, 0x28, 0xfb, |
||
442 | 0x20, 0x70, 0x21, 0x4e, 0x22, 0xb8, 0x23, 0x95, 0x26, 0x10, |
||
443 | 0x27, 0x08, 0x28, 0xfc, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, |
||
444 | 0x23, 0x80, 0x24, 0x86, 0x25, 0xc3, 0x26, 0xab, 0x27, 0x0a, |
||
445 | 0x28, 0xfd, 0x20, 0x42, 0x21, 0xe7, 0x22, 0x0f, 0x24, 0x89, |
||
446 | 0x25, 0x07, 0x26, 0xaa, 0x28, 0xfe, 0x20, 0x00, 0x21, 0xbb, |
||
447 | 0x22, 0x00, 0x23, 0x95, 0x26, 0x20, 0x27, 0x00, 0x28, 0xff, |
||
448 | 0x20, 0x05, 0x21, 0x00, 0x23, 0x84, 0x26, 0xb4, 0x27, 0x09, |
||
449 | 0x2a, 0x08, 0x10, 0x01, 0x3a, 0x00, 0x64, 0x3a, 0x65, 0xbb, |
||
450 | 0x08, 0x3a, 0x09, 0xbb, 0x50, 0x10, 0x52, 0x67, 0x51, 0x77, |
||
451 | 0x05, 0xa1, 0x18, 0x04, 0xff, 0xff |
||
452 | }; |
||
453 | |||
454 | void sta013HWReset(void) |
||
455 | { |
||
456 | sbi(DDRD, 2); // set reset pin to output |
||
457 | sbi(PORTD, 2); // clock RESET low |
||
458 | cbi(PORTD, 2); |
||
459 | timerPause(10); |
||
460 | sbi(PORTD, 2); |
||
461 | |||
462 | // give the sta013 a little time to come out of reset |
||
463 | timerPause(50); |
||
464 | } |
||
465 | |||
466 | u08 sta013ReadReg(u08 reg) |
||
467 | { |
||
468 | u08 data; |
||
469 | i2cReceive(STA_I2C_DEV, reg, 1, &data); |
||
470 | return data; |
||
471 | } |
||
472 | |||
473 | void sta013WriteReg(u08 reg, u08 data) |
||
474 | { |
||
475 | i2cSend(STA_I2C_DEV, reg, 1, &data); |
||
476 | } |
||
477 | |||
478 | void sta013DownloadUpdate(void) |
||
479 | { |
||
480 | u16 i; |
||
481 | u08 reg, data; |
||
482 | |||
483 | i=0; |
||
484 | // get first reg/data pair |
||
485 | reg = pgm_read_byte(STA013_UpdateData + i++); |
||
486 | data = pgm_read_byte(STA013_UpdateData + i++); |
||
487 | // loop until end of update |
||
488 | while( (reg != 0xff) ) |
||
489 | { |
||
490 | sta013WriteReg(reg, data); |
||
491 | reg = pgm_read_byte(STA013_UpdateData + i++); |
||
492 | data = pgm_read_byte(STA013_UpdateData + i++); |
||
493 | } |
||
494 | } |
||
495 | |||
496 | |||
497 | u08 sta013Init(void) |
||
498 | { |
||
499 | // reset STA013 device |
||
500 | sta013HWReset(); |
||
501 | |||
502 | // identify STA013 device |
||
503 | if(sta013ReadReg(STA_REG_IDENT) != STA_IDENT) |
||
504 | { |
||
505 | return FALSE; |
||
506 | } |
||
507 | |||
508 | // do firmware configuration and update |
||
509 | sta013DownloadUpdate(); |
||
510 | // start decoder |
||
511 | sta013StartDecoder(); |
||
512 | |||
513 | return TRUE; |
||
514 | } |
||
515 | |||
516 | |||
517 | void sta013StartDecoder(void) |
||
518 | { |
||
519 | // Soft reset |
||
520 | sta013WriteReg(STA_REG_SOFT_RESET, 0x01); |
||
521 | sta013WriteReg(STA_REG_SOFT_RESET, 0x00); |
||
522 | |||
523 | // Mute and configure DAC output |
||
524 | sta013WriteReg(STA_REG_MUTE, 0x01); |
||
525 | sta013WriteReg(STA_REG_PCMDIVIDER, 0x01); // 32-bit mode, O_FAC = 256 |
||
526 | sta013WriteReg(STA_REG_PCMCONF, 0x31); // 18-bit mode & more |
||
527 | |||
528 | // Configure PLL for MP3 rates |
||
529 | sta013WriteReg(STA_REG_PLLFRAC_441_H, 0x67); |
||
530 | sta013WriteReg(STA_REG_PLLFRAC_441_L, 0x77); |
||
531 | sta013WriteReg(STA_REG_PLLFRAC_H, 0xbb); |
||
532 | sta013WriteReg(STA_REG_PLLFRAC_L, 0x3a); |
||
533 | sta013WriteReg(STA_REG_MFSDF_441, 0x10); |
||
534 | sta013WriteReg(STA_REG_MFSDF, 0x0F); |
||
535 | |||
536 | // Configure interface polarities, etc |
||
537 | sta013WriteReg(STA_REG_PLLCTL_2, 0x0C); |
||
538 | sta013WriteReg(STA_REG_PLLCTL_3, 0x00); |
||
539 | sta013WriteReg(STA_REG_PLLCTL_1, 0xA1); |
||
540 | sta013WriteReg(STA_REG_SCLK_POL, 0x00); // data sampled on rising edge |
||
541 | sta013WriteReg(STA_REG_REQ_POL, 0x01); // REQ line active high |
||
542 | sta013WriteReg(STA_REG_DATA_REQ_ENABLE, 0x04); |
||
543 | sta013WriteReg(STA_REG_PLLCTL_1, 0xA1); |
||
544 | |||
545 | // Set audio tone controls |
||
546 | sta013SetTone(0, 0, 0, 0); |
||
547 | |||
548 | // Unmute and start running |
||
549 | sta013WriteReg(STA_REG_RUN, 0x01); |
||
550 | sta013WriteReg(STA_REG_PLAY, 0x01); |
||
551 | sta013WriteReg(STA_REG_MUTE, 0x00); |
||
552 | } |
||
553 | |||
554 | |||
555 | void sta013StopDecoder(void) |
||
556 | { |
||
557 | // mute output |
||
558 | sta013WriteReg(STA_REG_MUTE, 0x01); |
||
559 | // soft reset |
||
560 | sta013WriteReg(STA_REG_SOFT_RESET, 0x01); |
||
561 | sta013WriteReg(STA_REG_SOFT_RESET, 0x00); |
||
562 | } |
||
563 | |||
564 | |||
565 | void sta013PauseDecoder(void) |
||
566 | { |
||
567 | // enable mute |
||
568 | sta013WriteReg(STA_REG_MUTE, 0x01); |
||
569 | // stop the decoder |
||
570 | sta013WriteReg(STA_REG_PLAY, 0x00); |
||
571 | } |
||
572 | |||
573 | |||
574 | void sta013ResumeDecoder(void) |
||
575 | { |
||
576 | // run the decoder |
||
577 | sta013WriteReg(STA_REG_PLAY, 0x01); |
||
578 | // disable mute |
||
579 | sta013WriteReg(STA_REG_MUTE, 0x00); |
||
580 | } |
||
581 | |||
582 | void sta013GetMP3Info(u16 *bitrate, u08 *sampFreq, u08 *mode) |
||
583 | { |
||
584 | u08 headL, headM, headH; |
||
585 | u08 mpegID, bitrateIndex, sampFreqIndex; |
||
586 | |||
587 | // get the MP3 header info |
||
588 | headH = sta013ReadReg(STA_REG_HEAD_H); |
||
589 | headM = sta013ReadReg(STA_REG_HEAD_M); |
||
590 | headL = sta013ReadReg(STA_REG_HEAD_L); |
||
591 | |||
592 | // IDex:ID is in head[20:19] |
||
593 | // 00 - MPEG2.5 |
||
594 | // 01 - reserved |
||
595 | // 10 - MPEG2 |
||
596 | // 11 - MPEG1 |
||
597 | mpegID = (headH & 0x18)>>3; |
||
598 | |||
599 | // sampling frequency is in head[11:10] |
||
600 | sampFreqIndex = ((headM & 0x0C)>>2) | (mpegID<<2); |
||
601 | |||
602 | // bitrate index is in head[15:12] |
||
603 | bitrateIndex = ((headM & 0xF0)>>4) | ((mpegID & 0x01)<<4); |
||
604 | //bitrateIndex = ((headM & 0xF0)>>4) | (1<<4); |
||
605 | |||
606 | // mode is in head[7:6] |
||
607 | // 00 - stereo |
||
608 | // 01 - joint stereo |
||
609 | // 10 - dual channel |
||
610 | // 11 - single channel (mono) |
||
611 | *mode = (headL & 0xC0)>>6; |
||
612 | |||
613 | *bitrate = 2 * pgm_read_byte( MP3_Bitrates + bitrateIndex ); |
||
614 | *sampFreq = pgm_read_byte( MP3_SamplingFrequencies + sampFreqIndex ); |
||
615 | |||
616 | /* |
||
617 | header = (unsigned long)sta013ReadReg(STA_REG_HEAD_H) << 16 | |
||
618 | (unsigned long)sta013ReadReg(STA_REG_HEAD_M) << 8 | |
||
619 | (unsigned long)sta013ReadReg(STA_REG_HEAD_L); |
||
620 | |||
621 | // hdr->word = l; |
||
622 | // hdr->emphasis = l & 0x03; |
||
623 | // hdr->isOriginal = (l >> 2) & 0x01; |
||
624 | // hdr->isCopyrighted = (l >> 3) & 0x01; |
||
625 | // hdr->modeExtension = (l >> 4) & 0x03; |
||
626 | // hdr->mode = (l >> 6) & 0x03; |
||
627 | // hdr->private = (l >> 8) & 0x01; |
||
628 | // hdr->padding = (l >> 9) & 0x01; |
||
629 | // hdr->frequencyIndex = (l >> 10) & 0x03; |
||
630 | // hdr->bitrateIndex = (l >> 12) & 0x0f; |
||
631 | // hdr->protection = (l >> 16) & 0x01; |
||
632 | // hdr->layer = (l >> 17) & 0x03; |
||
633 | // hdr->ID = (l >> 19) & 0x01; |
||
634 | // hdr->ID_ex = (l >> 20) & 0x01; |
||
635 | */ |
||
636 | } |
||
637 | |||
638 | u16 sta013GetAverageBitrate(void) |
||
639 | { |
||
640 | return (2 * sta013ReadReg(STA_REG_AVERAGE_BITRATE)); |
||
641 | } |
||
642 | |||
643 | void sta013SetVolume(u08 volume, s08 balance) |
||
644 | { |
||
645 | char attenL, attenR; |
||
646 | |||
647 | // volume is expected as 0-100 value |
||
648 | // Note: |
||
649 | // #define MIN_VOLUME_ATTENUATION 0 |
||
650 | // #define MAX_VOLUME_ATTENUATION 96 |
||
651 | |||
652 | if( balance > 0) |
||
653 | { // balance to the left, attenuate right |
||
654 | attenL = (100 - volume); |
||
655 | attenR = (100 - volume) - (balance); |
||
656 | } |
||
657 | else |
||
658 | { // balance to the right, attenuate left |
||
659 | attenL = (100 - volume) + (balance); |
||
660 | attenR = (100 - volume); |
||
661 | } |
||
662 | // respect limits |
||
663 | attenL = MIN(attenL,MAX_VOLUME_ATTENUATION); |
||
664 | attenL = MAX(attenL,MIN_VOLUME_ATTENUATION); |
||
665 | attenR = MIN(attenR,MAX_VOLUME_ATTENUATION); |
||
666 | attenR = MAX(attenR,MIN_VOLUME_ATTENUATION); |
||
667 | |||
668 | // set volume |
||
669 | sta013WriteReg(STA_REG_DLA, attenL); |
||
670 | sta013WriteReg(STA_REG_DLB, MAX_VOLUME_ATTENUATION); |
||
671 | sta013WriteReg(STA_REG_DRA, attenR); |
||
672 | sta013WriteReg(STA_REG_DRB, MAX_VOLUME_ATTENUATION); |
||
673 | } |
||
674 | |||
675 | |||
676 | void sta013SetTone(s08 bassEnh, u16 bassFreq, s08 trebleEnh, u16 trebleFreq) |
||
677 | { |
||
678 | // set bass enhancement |
||
679 | sta013WriteReg(STA_REG_BASS_FREQUENCY_LOW, (bassFreq ) & 0xFF ); |
||
680 | sta013WriteReg(STA_REG_BASS_FREQUENCY_HIGH, (bassFreq>>8) & 0xFF ); |
||
681 | // respect limits |
||
682 | bassEnh = MIN(bassEnh,MAX_BASS_ENHANCE); |
||
683 | bassEnh = MAX(bassEnh,MIN_BASS_ENHANCE); |
||
684 | sta013WriteReg(STA_REG_BASS_ENHANCE, bassEnh); |
||
685 | |||
686 | // set treble enhancement |
||
687 | sta013WriteReg(STA_REG_TREBLE_FREQUENCY_LOW, (trebleFreq ) & 0xFF ); |
||
688 | sta013WriteReg(STA_REG_TREBLE_FREQUENCY_HIGH, (trebleFreq>>8) & 0xFF ); |
||
689 | // respect limits |
||
690 | trebleEnh = MIN(trebleEnh,MAX_TREBLE_ENHANCE); |
||
691 | trebleEnh = MAX(trebleEnh,MIN_TREBLE_ENHANCE); |
||
692 | sta013WriteReg(STA_REG_TREBLE_ENHANCE, trebleEnh); |
||
693 | |||
694 | // set attentuation to avoid clipping |
||
695 | sta013WriteReg( STA_REG_TONE_ATTEN, MAX(bassEnh,trebleEnh) ); |
||
696 | } |
||
697 | |||
698 | u08 sta013Demand(void) |
||
699 | { |
||
700 | return bit_is_set(STA013_DEMAND_PORTIN,STA013_DEMAND_PIN); |
||
701 | } |
Powered by WebSVN v2.8.3