Skip to content

Commit

Permalink
docs/psoc6/quickref: Remove support for invert functionality.
Browse files Browse the repository at this point in the history
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
  • Loading branch information
NikhitaR-IFX committed Feb 13, 2024
1 parent 64e04a7 commit 7e0b811
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/psoc6/quickref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -451,16 +451,16 @@ The constructor can be called by passing the required arguments. All initializat

::

pwm = PWM('P9_0', freq=50, duty_u16=8192, invert=0) # PWM is initialised for the given pin with respective frequency & duty cycle.
pwm1 = PWM('P9_1', freq=50, duty_ns=1000, invert=1) # PWM is initialised for the given pin with respective frequency & pulse width & inverts the output.
pwm = PWM('P9_0', freq=50, duty_u16=8192) # PWM is initialised for the given pin with respective frequency & duty cycle given as raw value.
pwm1 = PWM('P9_1', freq=50, duty_ns=1000) # PWM is initialised for the given pin with respective frequency & duty cycle given in nanoseconds.

All four arguments has to be passed manadatorily to create PWM object. duty_u16 or duty_ns should be specified at a time.

::

from machine import PWM

pwm = PWM('P9_0', freq=50, duty_u16=8192, invert=0)
pwm = PWM('P9_0', freq=50, duty_u16=8192)
print(pwm) # view PWM settings

pwm.freq() # get current frequency
Expand All @@ -472,9 +472,13 @@ The constructor can be called by passing the required arguments. All initializat
pwm.duty_ns() # get current pulse width in ns
pwm.duty_ns(1000) # set the current pulse width in ns from 0 to 1000000000/freq

pwm.init(freq=90,duty_us=100,invert=1) # Modify the settings of PWM object
pwm.init(freq=90,duty_us=100) # Modify the settings of PWM object
pwm.deinit() # Deinitialisation of PWM pin


.. note::
invert functionality is not enabled in this port.

Software SPI bus
----------------

Expand Down

0 comments on commit 7e0b811

Please sign in to comment.