Guest User

Untitled

a guest
Jun 21st, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. @@ -318,12 +318,14 @@ pub mod hmc7043 {
  2. * Digital delay resolution: 1/2 input clock cycle = 416ps for 1.2GHz
  3. * 16*25ps = 400ps: limit analog delay to 16 steps instead of 32.
  4. */
  5. + let analog_delay = (phase % 17) as u8;
  6. + let digital_delay = (phase / 17) as u8;
  7. if dacno == 0 {
  8. - write(0x00d5, (phase & 0xf) as u8);
  9. - write(0x00d6, ((phase >> 4) & 0x1f) as u8);
  10. + write(0x00d5, analog_delay);
  11. + write(0x00d6, digital_delay);
  12. } else if dacno == 1 {
  13. - write(0x00e9, (phase & 0xf) as u8);
  14. - write(0x00ea, ((phase >> 4) & 0x1f) as u8);
  15. + write(0x00e9, analog_delay);
  16. + write(0x00ea, digital_delay);
  17. } else {
  18. unimplemented!();
  19. }
Add Comment
Please, Sign In to add comment