From df547c6e161225dfa3c60f4858516cb8a38d25a7 Mon Sep 17 00:00:00 2001 From: Thomas A Date: Thu, 8 Apr 2021 17:47:28 +0200 Subject: [PATCH] Explicitly mention invert bit. --- pio/pio_pwmin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pio/pio_pwmin.py b/pio/pio_pwmin.py index 6ddb62f..b80cd9f 100644 --- a/pio/pio_pwmin.py +++ b/pio/pio_pwmin.py @@ -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