no-OS
Loading...
Searching...
No Matches
maxim_pwm.h
Go to the documentation of this file.
1/***************************************************************************/
34#ifndef MAXIM_PWM_H_
35#define MAXIM_PWM_H_
36
37#include "tmr.h"
38#include "gpio.h"
39#include "no_os_pwm.h"
40#include "no_os_util.h"
41
48#define NO_OS_MXC_PWM_CLOCK_SOURCE MXC_TMR_APB_CLK
49
50#define MAX_PWM_TMR_MAX_VAL NO_OS_GENMASK(15, 0)
51#define MAX_PWM_PRESCALER_VAL(n) ((n - 1) * 16)
52#define MAX_PWM_PRESCALER_TRUE(n) NO_OS_BIT((n) / 16)
53#define MAX_PWM_GET_PRESCALER(n) NO_OS_BIT((n) - 1)
54
55struct max_pwm_init_param {
56 mxc_gpio_vssel_t vssel;
57};
58
59struct max_pwm_extra {
60 mxc_gpio_vssel_t vssel;
61 mxc_tmr_cfg_t tmr_cfg;
62};
63
67extern const struct no_os_pwm_platform_ops max_pwm_ops;
68
69#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