no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
maxim_pwm.h
Go to the documentation of this file.
1/***************************************************************************/
33#ifndef MAXIM_PWM_H_
34#define MAXIM_PWM_H_
35
36#include "tmr.h"
37#include "gpio.h"
38#include "no_os_pwm.h"
39#include "no_os_util.h"
40
41#define MAX_PWM_TMR_MAX_VAL NO_OS_GENMASK(15, 0)
42#define MAX_PWM_PRESCALER_VAL(n) ((n - 1) * 16)
43#define MAX_PWM_PRESCALER_TRUE(n) NO_OS_BIT((n) / 16)
44#define MAX_PWM_GET_PRESCALER(n) NO_OS_BIT((n) - 1)
45
46struct max_pwm_init_param {
47 mxc_gpio_vssel_t vssel;
48};
49
50struct max_pwm_extra {
51 mxc_gpio_vssel_t vssel;
52 mxc_tmr_cfg_t tmr_cfg;
53};
54
58extern const struct no_os_pwm_platform_ops max_pwm_ops;
59
60#endif // MAXIM_PWM_H_
const struct no_os_pwm_platform_ops max_pwm_ops
Maxim platform specific callbacks for the PWM API.
Definition maxim_pwm.c:309
Header file of PWM Interface.
Header file of utility functions.
Definition maxim_pwm.h:49
mxc_tmr_cfg_t tmr_cfg
Definition maxim_pwm.h:51
mxc_gpio_vssel_t vssel
Definition maxim_pwm.h:50
Definition maxim_pwm.h:45
mxc_gpio_vssel_t vssel
Definition maxim_pwm.h:46
Structure holding PWM function pointers that point to the platform specific function.
Definition no_os_pwm.h:115