2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-24 19:04:02 +08:00

grabber: fix frequency counter formula

This commit is contained in:
Sebastien Bourdeauducq 2018-07-12 20:14:38 +08:00
parent 82def6b535
commit 46fb5adac3

View File

@ -80,7 +80,7 @@ fn get_video_clock(g: usize) -> u32 {
let freq_count = unsafe {
(csr::GRABBER[g].freq_count_read)()
} as u32;
2*freq_count*(csr::CONFIG_CLOCK_FREQUENCY/1000000)/255
2*freq_count*(csr::CONFIG_CLOCK_FREQUENCY/1000)/(511*1000)
}
pub fn tick() {