Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
pwm.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Vestas Wind Systems A/S
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PWM_PWM_H_
7#define ZEPHYR_INCLUDE_DT_BINDINGS_PWM_PWM_H_
8
24#define PWM_NSEC(x) (x)
26#define PWM_USEC(x) (PWM_NSEC(x) * 1000UL)
28#define PWM_MSEC(x) (PWM_USEC(x) * 1000UL)
30#define PWM_SEC(x) (PWM_MSEC(x) * 1000UL)
32#define PWM_HZ(x) (PWM_SEC(1UL) / (x))
34#define PWM_KHZ(x) (PWM_HZ((x) * 1000UL))
35
47#define PWM_POLARITY_NORMAL (0 << 0)
48
50#define PWM_POLARITY_INVERTED (1 << 0)
51
53#define PWM_POLARITY_MASK 0x1
59#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_PWM_PWM_H_ */