AN2274 Freescale Semiconductor / Motorola, AN2274 Datasheet - Page 13

no-image

AN2274

Manufacturer Part Number
AN2274
Description
Generic Tone Generation on the StarCore SC140 Core
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Freescale Semiconductor
}
UINT16 R1[] = {700, 900, 1100, 1300, 1500, 1700};
void
test_initialize(TONE_GENERIC * testcases)
// testcases must point to a 15-item TONE_GENERIC structure
{
}
UINT16 R2f[] = {1380, 1500, 1620, 1740, 1860, 1980};
UINT16 R2b[] = {1140, 1020, 900, 780, 660, 540};
void
test_initialize(TONE_GENERIC * testcases)
// testcases must point to a 30-item TONE_GENERIC structure
// First 15 for MF-R2 foward direction
// Last 15 for MR-R2 backward direction
{
Generic Tone Generation on the StarCore™ SC140/SC1400 Cores, Rev. 1
}
int i, j, k = 0;
for (i = 0; i < 15; i++) {
}
// MF-R1 digits
// Key:
// Code:
for (j = 1; j < 6; j++) {
}
int i, j, k = 0;
for (i = 0; i < 30; i++) {
for (j = 0; j < 4; j++) {
}
// Inialize the input structures
testcases[i].tone_repeat_cycle = 1;
testcases[i].tone_component_count = 1;
// 1 tone_component description
testcases[i].tone_component[0].flags = 0x0;
testcases[i].tone_component[0].repeat_component = 1;
testcases[i].tone_component[0].sound_duration = 50;
testcases[i].tone_component[0].silence_duration = 50;
testcases[i].tone_component[0].level_1 = 10;
testcases[i].tone_component[0].level_2 = 10;
for (i = 0; i < j; i++) {
}
// Inialize the input structures for the i+1 key
testcases[i].tone_repeat_cycle = 1;
testcases[i].tone_component_count = 1;
// 1 tone_component description
testcases[i].tone_component[0].flags = 0x0;
testcases[i].tone_component[0].repeat_component = 1;
testcases[i].tone_component[0].sound_duration = 50;
testcases[i].tone_component[0].silence_duration = 50;
testcases[i].tone_component[0].level_1 = 10;
testcases[4 * i + j].tone_component[0].frequency_1 = DTMFl[i];
testcases[4 * i + j].tone_component[0].frequency_2 = DTMFh[j];
1| 2| 3| 4| 5| 6| 7| 8| 9| 0| ST3P| STP| KP| STP2| ST
1| 2| 3| 4| 5| 6| 7| 8| 9|10|
Example 3. MF-R1
Example 4. MF-R2
testcases[k].tone_component[0].frequency_1 = R1[i];
testcases[k++].tone_component[0].frequency_2 = R1[j];
Using and Testing the Generic Tone Generator
11|
12| 13|
14| 15
13

Related parts for AN2274