grabber: fix frequency counter formula

This commit is contained in:
Sebastien Bourdeauducq 2018-07-12 20:14:38 +08:00
parent 82def6b535
commit 46fb5adac3
1 changed files with 1 additions and 1 deletions

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() {