Skip to content

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