Skip to content

Update lib.rs - wrong units #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Update lib.rs - wrong units #12

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 4, 2021

1/1000 of a microsecond (us) is nanosecond (ns), not picosecond (ps)

1/1000 of a microsecond (us) is nanosecond (ns), not picosecond (ps)
@stappersg
Copy link
Member

Sorry for close, the "1/1000 of a microsecond (us) is nanosecond (ns), not picosecond (ps)" remark does deserve further attention.

@stappersg
Copy link
Member

Now the open I intented earlier.

afbeelding

@stappersg
Copy link
Member

Current version of delay_us():

///delay for N microseconds
/// # Arguments
/// * 'us' - an u64, number of microseconds to busy-wait
#[inline(always)]
pub fn delay_us(us: u64) {
    let us_in_loop = (avr_config::CPU_FREQUENCY_HZ / 1000000 / 4) as u64;
    let loops = us * us_in_loop;
    delay(loops);
}

So it is okay that this merge request is closed.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant