Skip to content

Commit 7216665

Browse files
FRASTMcarlescufi
authored andcommitted
dts: pwm : flag to enable a complementary output of a stm32 pwm channel
Depending on the stm32 soc and the timer instance, several channels can enable the complementary output for the PWM signal This flag completes the PWM_POLARITY for a PWM channel in the upper byte of the pwm_flags_t. Signed-off-by: Francois Ramu <[email protected]>
1 parent 2c4566f commit 7216665

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2022 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PWM_STM32_H_
7+
#define ZEPHYR_INCLUDE_DT_BINDINGS_PWM_STM32_H_
8+
9+
/**
10+
* @name custom PWM complementary flags for output pins
11+
* This flag can be used with any of the `pwm_pin_set_*` API calls to indicate
12+
* that the PWM signal has to be routed to the complementary output channel.
13+
* This feature is only available on certain SoC families, refer to the
14+
* binding's documentation for more details.
15+
* The custom flags are on the upper 8bits of the pwm_flags_t
16+
* @{
17+
*/
18+
/** PWM complementary output pin is enabled */
19+
#define PWM_STM32_COMPLEMENTARY (1U << 8)
20+
21+
/** @cond INTERNAL_HIDDEN */
22+
#define PWM_STM32_COMPLEMENTARY_MASK 0x100
23+
/** @endcond */
24+
/** @} */
25+
26+
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_PWM_STM32_H_ */

0 commit comments

Comments
 (0)