Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DoSetupSampleFreq(void)
- {
- // 32 kHz {0x00, 0x7D, 0x00}
- if (SampleFreq[0] == 0x00 && SampleFreq[1] == 0x7D && SampleFreq[2] == 0x00) {
- PR2 = 187;
- BytesPerFrame = 128;
- T2CONON = 0b00001100;
- // 48 kHz {0x80, 0xBB, 0x00}
- }else if (SampleFreq[0] == 0x80 && SampleFreq[1] == 0xBB && SampleFreq[2] == 0x00) {
- PR2 = 249;
- BytesPerFrame = 196;
- T2CONON = 0b00000100;
- // Valor por defecto (24 kHz) {0xC0, 0x5D, 0x00}
- }else{
- PR2 = 249;
- BytesPerFrame = 96;
- T2CONON = 0b00001100;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement