add pwm1 (not working)

This commit is contained in:
Pavol Rusnak 2011-04-22 22:40:46 +02:00
parent e9713ca9b7
commit 888b659330
4 changed files with 44 additions and 43 deletions

View file

@ -25,6 +25,7 @@ class Device:
# sets pwm (which=1,2), (duty=16bit)
def pwm(self, which, duty):
duty = 65535 - duty
self.epo.write('p' + chr(which) + chr(duty & 0xff) + chr(duty >> 8))
# sets ddswave (wave=square,sine,saw1,saw2)