diff options
| author | Tom Rini <[email protected]> | 2024-08-24 14:03:28 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-08-24 14:03:28 -0600 |
| commit | ee2af844ba1b27b2e959c4e649e4b769fbeb4074 (patch) | |
| tree | 602c42364f4987b315667ccce5c245779d071da8 /doc | |
| parent | a481740629af5e51732b86b6ead61dc5aa5a440d (diff) | |
| parent | dcd1b63b7072749f98ea0a87565d0ae5c8ddfb65 (diff) | |
Merge tag 'efi-2024-10-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2024-10-rc4
Documentation:
* Add description of the pwm command
UEFI
* Correct printf codes in mkeficapsule
* Allow CONFIG_EFI_LOADER_BOUNCE_BUFFER on all architectures
* Free memory in efi_get_dp_from_boot()
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/usage/cmd/pwm.rst | 91 | ||||
| -rw-r--r-- | doc/usage/index.rst | 1 |
2 files changed, 92 insertions, 0 deletions
diff --git a/doc/usage/cmd/pwm.rst b/doc/usage/cmd/pwm.rst new file mode 100644 index 00000000000..522acb5afa3 --- /dev/null +++ b/doc/usage/cmd/pwm.rst @@ -0,0 +1,91 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +.. index:: + single: pwm (command) + +pwm command +=========== + +Synopsis +-------- + +:: + + pwm invert <pwm_dev_num> <channel> <polarity> + pwm config <pwm_dev_num> <channel> <period_ns> <duty_ns> + pwm enable <pwm_dev_num> <channel> + pwm disable <pwm_dev_num> <channel> + + +Description +----------- + +The ``pwm`` command is used to access and configure PWM (Pulse Width Modulation) +signals. + +pwm invert +---------- + +* If the value of ``polarity`` is 0, the default polarity is used. +* If the value of ``polarity`` is 1, the polarity is inverted. + +pwm config +---------- + +Configure the period and duty period in nanoseconds. + +pwm enable +---------- + +Enable output on the configured device and channel. + +pwm disable +----------- + +Disable output on the configured device and channel. + +pwm_dev_num + Device number of the pulse width modulation device + +channel + Output channel of the PWM device + +polarity + * 0 - Use normal polarity + * 1 - Use inverted polarity + +duty_ns + Duty period in ns + +period_ns + Period time in ns + +Examples +-------- + +Configure device 0, channel 0 to 20 µs period and 14 µs (that is, 70%) duty period:: + + => pwm config 0 0 20000 14000 + +Enable output on the configured device and channel:: + + => pwm enable 0 0 + +Disable output on the configured device and channel:: + + => pwm disable 0 0 + +Invert the signal on the configured device and channel:: + + => pwm invert 0 0 1 + +Configuration +------------- + +The ``pwm`` command is only available if CONFIG_CMD_PWM=y. + +Return value +------------ + +If the command succeeds, the return value ``$?`` is set to 0. If an error occurs, the +return value ``$?`` is set to 1. diff --git a/doc/usage/index.rst b/doc/usage/index.rst index 1f6518b77c4..6a218c46b4e 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -93,6 +93,7 @@ Shell commands cmd/pinmux cmd/printenv cmd/pstore + cmd/pwm cmd/qfw cmd/read cmd/reset |
