AN2274 Freescale Semiconductor / Motorola, AN2274 Datasheet - Page 14

no-image

AN2274

Manufacturer Part Number
AN2274
Description
Generic Tone Generation on the StarCore SC140 Core
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Using and Testing the Generic Tone Generator
14
}
void test_initialize(TONE_GENERIC * testcases)
{
}
void test_initialize(TONE_GENERIC * testcases)
{
Generic Tone Generation on the StarCore™ SC140/SC1400 Cores, Rev. 1
}
// 15 MF-R2 forward direction digits
for (j = 1; j < 6; j++) {
}
// 15 MF-R2 backward direction digits
for (j = 1; j < 6; j++) {
}
// Inialize the input structures
testcases[0].tone_repeat_cycle = 0;
testcases[0].tone_component_count = 1;
// tone_component description
testcases[0].tone_component[0].flags = 0x0;
testcases[0].tone_component[0].repeat_component = 0;
testcases[0].tone_component[0].sound_duration = 1000;
testcases[0].tone_component[0].silence_duration = 0;
testcases[0].tone_component[0].frequency_1 = 425;
testcases[0].tone_component[0].level_1 = 0;
// Only one frequency is used - level is initialized to -63dB
testcases[0].tone_component[0].frequency_2 = 0;
testcases[0].tone_component[0] .level_2 = 63;
// Inialize the input structures
testcases[0].tone_repeat_cycle = 0;
testcases[0].tone_component_count = 2;
// 2 tone_component description
// COMPONENT 1
testcases[0].tone_component[0].flags = 0x0;
testcases[0].tone_component[0].repeat_component = 1;
testcases[0].tone_component[0].sound_duration = 100;
testcases[0].tone_component[0].silence_duration = 100;
testcases[0].tone_component[0].frequency_1 = 440;
testcases[0].tone_component[0].level_1=0;
// Only one frequency is used - level is initialized to -63db
testcases[0].tone_component[0].frequency_2 = 0;
testcases[0].tone_component[0].level_2 = NOT_USED;
// COMPONENT 2
testcases[0].tone_component[1].flags = 0x0;
testcases[0].tone_component[1].repeat_component = 1;
testcases[0].tone_component[1].sound_duration = 100;
Example 6. Japan Waiting Tone
Example 5. Germany Dial Tone
testcases[i].tone_component[0].level_2 = 10;
for (i = 0; i < j; i++) {
}
for (i = 0; i < j; i++) {
}
testcases[k].tone_component[0].frequency_1 = R2f[i];
testcases[k++].tone_component[0].frequency_2 = R2f[j];
testcases[k].tone_component[0].frequency_1 = R2b[i];
testcases[k++].tone_component[0].frequency_2 = R2b[j];
// 425 or 450
Freescale Semiconductor

Related parts for AN2274