Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. void DoSetupSampleFreq(void)
  2. {
  3.  
  4. // 32 kHz {0x00, 0x7D, 0x00}
  5. if (SampleFreq[0] == 0x00 && SampleFreq[1] == 0x7D && SampleFreq[2] == 0x00) {
  6. PR2 = 187;
  7. BytesPerFrame = 128;
  8. T2CONON = 0b00001100;
  9.  
  10. // 48 kHz {0x80, 0xBB, 0x00}
  11. }else if (SampleFreq[0] == 0x80 && SampleFreq[1] == 0xBB && SampleFreq[2] == 0x00) {
  12. PR2 = 249;
  13. BytesPerFrame = 196;
  14. T2CONON = 0b00000100;
  15.  
  16. // Valor por defecto (24 kHz) {0xC0, 0x5D, 0x00}
  17. }else{
  18. PR2 = 249;
  19. BytesPerFrame = 96;
  20. T2CONON = 0b00001100;
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement