X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/35a39ce2df2deabfb56dd577a5ccb481d0c0ed16..e0865b0bc720d55f55232539ec03508dc9eec9e7:/src/adafruit_blinka/microcontroller/rockchip/PWMOut.py diff --git a/src/adafruit_blinka/microcontroller/rockchip/PWMOut.py b/src/adafruit_blinka/microcontroller/rockchip/PWMOut.py index 56dd280..e152377 100644 --- a/src/adafruit_blinka/microcontroller/rockchip/PWMOut.py +++ b/src/adafruit_blinka/microcontroller/rockchip/PWMOut.py @@ -78,6 +78,7 @@ class PWMOut: self._chip = pwmout[0][0] self._channel = pwmout[0][1] + self._chip_path = os.path.join( "/sys/class/pwm", self._chip_path.format(self._chip) ) @@ -142,6 +143,8 @@ class PWMOut: self.frequency = frequency self.duty_cycle = duty_cycle + self.polarity = "normal" + self.enable() # Cache the period for fast duty cycle updates self._period_ns = self._get_period_ns()