[−][src]Function picorv32::asm::timer
pub unsafe fn timer(cycles_to_wait: u32) -> u32
timer
instruction wrapper
Original documentation from [https://github.com/cliffordwolf/picorv32/blob/master/README.md#timer]:
Reset the timer counter to a new value. The counter counts down clock cycles and
triggers the timer interrupt when transitioning from 1 to 0. Setting the
counter to zero disables the timer. The old value of the counter is written to
rd
.
0000101 ----- XXXXX --- XXXXX 0001011 f7 rs2 rs f3 rd opcode
Example:
timer x1, x2