Explicitly mention invert bit.

pull/30/head
Thomas A 2021-04-08 17:47:28 +02:00
rodzic b07f0acda5
commit df547c6e16
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -12,7 +12,7 @@ def pwmin():
pull(block) # wait for activation
set(x, 0) # Set x = 0
mov(x, x | (0b01 << 3)) # invert x = Max-Value for 32 bits
mov(x, x | (0b01 << 3)) # invert x = Max-Value for 32 bits. (0b01 << 3) sets the invert bit.
wait(1, pin, 0) # wait for a full PWM cycle to start measurement
wait(0, pin, 0) # wait for pin to be low