-
Notifications
You must be signed in to change notification settings - Fork 0
/
deviceOLD.c
532 lines (436 loc) · 16.7 KB
/
deviceOLD.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
#include "device.h"
unsigned int Analog_counter = 1;
unsigned int Volume_counter = 4;
unsigned int mute_status = 1;
unsigned int EQ_status = 1;
unsigned int SRSwow_status = 1;
unsigned int shutdown_status = 1;
unsigned char Volume;
unsigned char LED_p0;
unsigned char LED_p1;
void AIC3254_VOLUME_UP(void)
{
if(Volume_counter < 10)
{
Volume_counter++;
Volume = VOLUME[Volume_counter-1];
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x00);
I2C_singleWrite(AIC3254_Device_Address,0x41,Volume); //LDAC Volume
I2C_singleWrite(AIC3254_Device_Address,0x42,Volume); //RDAC Volume
LED_p0 &= 0xE1; //clear all volume LEDs
if((Volume_counter>=1) && (Volume_counter<=3))
{
LED_p0 |= 0x10;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D);
}
if((Volume_counter >= 4) && (Volume_counter <= 6))
{
LED_p0 |= 0x18;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2,D);
}
if((Volume_counter >= 7) && (Volume_counter <= 9))
{
LED_p0 |= 0x1C;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D);
}
if(Volume_counter == 10)
{
LED_p0 |= 0x1E;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D);
}
}
if(Volume_counter == 10)
{
Volume = VOLUME[9];
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x00);
I2C_singleWrite(AIC3254_Device_Address,0x41,Volume); //LDAC Volume
I2C_singleWrite(AIC3254_Device_Address,0x42,Volume); //RDAC Volume
}
}
void AIC3254_VOLUME_DOWN(void)
{
LED_p0 &= 0xE1; //clear all the volume LEDs
if(Volume_counter > 1)
{
Volume_counter--;
Volume = VOLUME[Volume_counter-1];
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x00);
I2C_singleWrite(AIC3254_Device_Address,0x41,Volume);
I2C_singleWrite(AIC3254_Device_Address,0x42,Volume);
if((Volume_counter>=1) && (Volume_counter<=3))
{
LED_p0 |= 0x10;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D);
}
if((Volume_counter >= 4) && (Volume_counter <= 6))
{
LED_p0 |= 0x18;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D);
}
if((Volume_counter >= 7) && (Volume_counter <= 9))
{
LED_p0 |= 0x1C;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D);
}
if(Volume_counter == 10)
{
LED_p0 |= 0x1E;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D);
}
}
if(Volume_counter == 1)
{
Volume = VOLUME[0];
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x00);
I2C_singleWrite(AIC3254_Device_Address,0x41,Volume);
I2C_singleWrite(AIC3254_Device_Address,0x42,Volume);
}
}
//this function is used when switch from I2S mode to Analog mode
void AIC3254_toAnalogMode(void)
{
//select page 0
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x00);
//Mute ADCs
I2C_singleWrite(AIC3254_Device_Address, 0x52, 0x88);
//power down ADCs
I2C_singleWrite(AIC3254_Device_Address, 0x51, 0x00);
//Mute DACs
I2C_singleWrite(AIC3254_Device_Address, 0x40, 0x0C);
//power down both DACs
I2C_singleWrite(AIC3254_Device_Address, 0x3F, 0x14);
//power down PLL
I2C_singleWrite(AIC3254_Device_Address, 0x05, 0x11);
//configure PLL settings
unsigned char pllData[]={0x07, 0x91, 0x10};
I2C_multiWrite(AIC3254_Device_Address, 0x04, 3, pllData);
//configure Audio interface
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x00);
I2C_singleWrite(AIC3254_Device_Address,0x21, 0x44);
I2C_singleWrite(AIC3254_Device_Address,0x1F, 0x14); //sec_bclk path
I2C_singleWrite(AIC3254_Device_Address,0x37, 0x14);
I2C_singleWrite(AIC3254_Device_Address,0x34, 0x20);
I2C_singleWrite(AIC3254_Device_Address,0x20, 0x0E); //interface path
I2C_singleWrite(AIC3254_Device_Address,0x1D, 0x01);//disable digital loopback
I2C_singleWrite(AIC3254_Device_Address,0x1B, 0x00); //set wclk as output
I2C_singleWrite(AIC3254_Device_Address,0x1E, 0x82); //power up Bclk divider, and set ratio=2
I2C_singleWrite(AIC3254_Device_Address,0x3C, 0x80);
I2C_singleWrite(AIC3254_Device_Address,0x3D, 0x00);
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address,0x01, 0x04);
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x2C);
I2C_singleWrite(AIC3254_Device_Address,0x01, 0x04);
//adjust PGA gain for Analog mode
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x01);
unsigned char pgaGain[] = {0x14, 0x14}; //8 dB
I2C_multiWrite(AIC3254_Device_Address,0x3B,2, pgaGain);
//power up both ADCs
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x00);
I2C_singleWrite(AIC3254_Device_Address,0x51, 0xC0);
//unMute both ADCs
I2C_singleWrite(AIC3254_Device_Address,0x52, 0x00);
//power up both DACs
I2C_singleWrite(AIC3254_Device_Address,0x3F, 0xD4);
//unMute both DACs
I2C_singleWrite(AIC3254_Device_Address,0x40, 0x00);
//configure the Input Mux in miniDSP process flow
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x09);
I2C_singleWrite(AIC3254_Device_Address, 0x6E, 0x02);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address, 0x01, 0x05);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x09);
I2C_singleWrite(AIC3254_Device_Address, 0x6E, 0x02);
}
//this function is used when switch from Analog mode to I2S mode
void AIC3254_toI2SMode(void)
{
//select page 0
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x00);
//Mute ADCs
I2C_singleWrite(AIC3254_Device_Address, 0x52, 0x88);
//power down ADCs
I2C_singleWrite(AIC3254_Device_Address, 0x51, 0x00);
//Mute DACs
I2C_singleWrite(AIC3254_Device_Address, 0x40, 0x0C);
//power down both DACs
I2C_singleWrite(AIC3254_Device_Address, 0x3F, 0x14);
//power down PLL
I2C_singleWrite(AIC3254_Device_Address, 0x05, 0x11);
//configure PLL settings
unsigned char pllData[]={0x03, 0x91, 0x04};
I2C_multiWrite(AIC3254_Device_Address, 0x04, 3, pllData);
//configure Audio interface
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x00);
I2C_singleWrite(AIC3254_Device_Address,0x21, 0x00);
I2C_singleWrite(AIC3254_Device_Address,0x1F, 0x12); //sec_bclk path
I2C_singleWrite(AIC3254_Device_Address,0x37, 0x14);
I2C_singleWrite(AIC3254_Device_Address,0x34, 0x20);
I2C_singleWrite(AIC3254_Device_Address,0x20, 0x00); //interface path
I2C_singleWrite(AIC3254_Device_Address,0x1D, 0x01);//disable digital loopback
I2C_singleWrite(AIC3254_Device_Address,0x1E, 0x02); //power down Bclk divider, and set ratio=2
I2C_singleWrite(AIC3254_Device_Address,0x1B, 0x00);
I2C_singleWrite(AIC3254_Device_Address,0x3C, 0x80);
I2C_singleWrite(AIC3254_Device_Address,0x3D, 0x00);
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address,0x01, 0x04);
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x2C);
I2C_singleWrite(AIC3254_Device_Address,0x01, 0x04);
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x00);
//power up both ADCs
I2C_singleWrite(AIC3254_Device_Address,0x51, 0xC0);
//unMute both ADCs
I2C_singleWrite(AIC3254_Device_Address,0x52, 0x00);
//power up both DACs
I2C_singleWrite(AIC3254_Device_Address,0x3F, 0xD4);
//unMute both DACs
I2C_singleWrite(AIC3254_Device_Address,0x40, 0x00);
//configure the Input Mux in miniDSP process flow
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x09);
I2C_singleWrite(AIC3254_Device_Address, 0x6E, 0x01);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address, 0x01, 0x05); //flip buffers
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x09);
I2C_singleWrite(AIC3254_Device_Address, 0x6E, 0x01);
}
void AIC3254_USB_IN(void)
{
LED_p0 &= 0x7F; //clear SPDIF LED light
LED_p1 &= 0x20;
LED_p1 |= 0x08;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D); //turn on the LED lights
//switch from Analog mode to I2S mode
AIC3254_toI2SMode();
//configure the on-board hardware switch
P3OUT_bit.P3OUT_7 = 0; //switch_EN, enable the switch
P3OUT_bit.P3OUT_6 = 0; //switch_Logic low, USB path
P2OUT_bit.P2OUT_2 = 0; //CKSEL, DIR9001 in PLL mode
VolumeReset();
}
void AIC3254_SPDIF_IN(void)
{
LED_p0 |= 0x80;
LED_p1 &= 0x20;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D); //turn on the LED lights
//switch from analog mode to I2S mode
AIC3254_toI2SMode();
//configure the on-board hardware switch
P3OUT_bit.P3OUT_7 = 0; //switch_EN, enable the switch
P3OUT_bit.P3OUT_6 = 1; //switch_Logic high, SPDIF path
P2OUT_bit.P2OUT_2 = 0; //CKSEL, DIR9001 in PLL mode
VolumeReset();
}
void AIC3254_ANALOG_IN(void)
{
LED_p0 &= 0x7F; //clear the SPDIF LED light
LED_p1 &= 0x20;
//configure GPIO pins
P3OUT_bit.P3OUT_7 = 1; //switch_EN, Disable the switch
P2OUT_bit.P2OUT_2 = 1; //CKSEL, non-PLL mode,only generate clocks for AIC3254
//switch from I2S mode to Analog mode
AIC3254_toAnalogMode();
if (Analog_counter == 1)
{
LED_p1 |= 0x01;
unsigned char D1[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D1); //LED lights for Analog1
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x01);
I2C_singleWrite(AIC3254_Device_Address,0x34, 0x80); //input rounting to IN1
I2C_singleWrite(AIC3254_Device_Address,0x36, 0x80);
I2C_singleWrite(AIC3254_Device_Address,0x37, 0x80);
I2C_singleWrite(AIC3254_Device_Address,0x39, 0x80);
}
if (Analog_counter == 2)
{
LED_p1 |= 0x02;
unsigned char D2[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D2); //LED lights for Analog2
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x01);
I2C_singleWrite(AIC3254_Device_Address, 0x34, 0x20); //input rounting to IN2
I2C_singleWrite(AIC3254_Device_Address, 0x36, 0x80);
I2C_singleWrite(AIC3254_Device_Address, 0x37, 0x20);
I2C_singleWrite(AIC3254_Device_Address, 0x39, 0x80);
}
if (Analog_counter == 3)
{
LED_p1 |= 0x04;
unsigned char D3[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D3); //LED lights for Analog3
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x01);
I2C_singleWrite(AIC3254_Device_Address,0x34, 0x08); //input rounting to IN3
I2C_singleWrite(AIC3254_Device_Address,0x36, 0x80);
I2C_singleWrite(AIC3254_Device_Address,0x37, 0x08);
I2C_singleWrite(AIC3254_Device_Address,0x39, 0x80);
Analog_counter = 0; //clear the analog counter
}
Analog_counter++;
VolumeReset();
}
void AIC3254_MUTE(void) //toggle
{
/************MUTE AIC3254 DAC**********************************/
if (mute_status)
{
LED_p1 |= 0x20;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D); // turn ON mute LED light
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x00); //configure AIC3254
I2C_singleWrite(AIC3254_Device_Address, 0x40,0x0c);
mute_status = 0;
}
else
{
LED_p1 &= ~0x20;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D); //turn OFF mute LED light
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x00);
I2C_singleWrite(AIC3254_Device_Address, 0x40,0x00);
mute_status = 1;
}
}
void AIC3254_SD(void) //Toggle
{
/**************shutdown TPA3110******************/
if(shutdown_status)
{
LED_p0 |= 0x01;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D); //turn ON SD LED
P3OUT_bit.P3OUT_0 = 0; //Bring TPA3110 into Shutdown
shutdown_status = 0;
}
else
{
LED_p0 &= ~0x01;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D); //turn OFF SD LED
P3OUT_bit.P3OUT_0 = 1; //Bring TPA3110 out of Shutdown
shutdown_status = 1;
}
}
void TurnOffLED(void)
{
//set PCA9535 pins all as output
unsigned char Type[] = {0x00, 0x00};
I2C_multiWrite(0x20, 0x06, 2, Type); //setting Port0 and Port1 as OUTPUT
LED_p0 &= 0x00;
LED_p1 &= 0x00;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D);
}
void VolumeReset(void)
{
I2C_singleWrite(AIC3254_Device_Address,0x00, 0x00);
I2C_singleWrite(AIC3254_Device_Address,0x41,0xF4); //LDAC Volume
I2C_singleWrite(AIC3254_Device_Address,0x42,0xF4); //RDAC Volume
Volume_counter=4;
LED_p0 &= 0xE1;
LED_p0 |= 0x18;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D);
}
void AIC3254_SRRD0(void) // button control for EQ ON/OFF, toggle
{
if(EQ_status) //both EQ ON
{
LED_p0 &= 0xBF;
LED_p0 |= 0x40;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D); //turn ON SD LED
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x09);
I2C_singleWrite(AIC3254_Device_Address, 0x72, 0x01);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address, 0x01, 0x05);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x09);
I2C_singleWrite(AIC3254_Device_Address, 0x72, 0x01); //end of Mux B
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x0c);
I2C_singleWrite(AIC3254_Device_Address, 0x5A, 0x01);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address, 0x01, 0x05);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x0c);
I2C_singleWrite(AIC3254_Device_Address, 0x5A, 0x01);
EQ_status = 0;
}
else
{
LED_p0 &= ~0x40;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D); //turn OFF EQ LED
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x09);
I2C_singleWrite(AIC3254_Device_Address, 0x72, 0x02);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address, 0x01, 0x05);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x09);
I2C_singleWrite(AIC3254_Device_Address, 0x72, 0x02);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x0c);
I2C_singleWrite(AIC3254_Device_Address, 0x5A, 0x02);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address, 0x01, 0x05);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x0c);
I2C_singleWrite(AIC3254_Device_Address, 0x5A, 0x02);
EQ_status = 1;
}
}
void AIC3254_SRRD1(void) //Turn SRS_WOW ON/OFF, toggle
{
if(SRSwow_status) //both EQ ON
{
LED_p0 &= 0xDF;
LED_p0 |= 0x20;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D); //turn ON SD LED
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x0c);
I2C_singleWrite(AIC3254_Device_Address, 0x56, 0x02);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address, 0x01, 0x05);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x0c);
I2C_singleWrite(AIC3254_Device_Address, 0x56, 0x02);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x09);
I2C_singleWrite(AIC3254_Device_Address, 0x72, 0x01);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address, 0x01, 0x05);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x09);
I2C_singleWrite(AIC3254_Device_Address, 0x72, 0x01);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x0c);
I2C_singleWrite(AIC3254_Device_Address, 0x5A, 0x02);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address, 0x01, 0x05);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x0c);
I2C_singleWrite(AIC3254_Device_Address, 0x5A, 0x02);
SRSwow_status = 0;
}
else
{
LED_p0 &= ~0x20;
unsigned char D[] = {LED_p0, LED_p1};
I2C_multiWrite(0x20, 0x02, 2, D); //turn OFF EQ LED
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x0c);
I2C_singleWrite(AIC3254_Device_Address, 0x56, 0x01);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address, 0x01, 0x05);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x0c);
I2C_singleWrite(AIC3254_Device_Address, 0x56, 0x01);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x09);
I2C_singleWrite(AIC3254_Device_Address, 0x72, 0x02);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address, 0x01, 0x05);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x09);
I2C_singleWrite(AIC3254_Device_Address, 0x72, 0x02);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x0c);
I2C_singleWrite(AIC3254_Device_Address, 0x5A, 0x02);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x08);
I2C_singleWrite(AIC3254_Device_Address, 0x01, 0x05);
I2C_singleWrite(AIC3254_Device_Address, 0x00, 0x0c);
I2C_singleWrite(AIC3254_Device_Address, 0x5A, 0x02);
SRSwow_status = 1;
}
}