MiraOS  1.22
mira_pwm.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (C) 2016 LumenRadio AB *
3  * *
4  * This file is part of MiraOS. *
5  * *
6  * MiraOS contains software components that are patented by LumenRadio. *
7  * Use of this software is under the terms of the LumenRadio MiraOS *
8  * license.
9  * *
10  * You should have received a copy of the MiraOS license from your *
11  * LumenRadio representative. If not, email to <licenses@lumenradio.com> *
12  ****************************************************************************/
13 
25 #ifndef LIBMIRA_PWM_H_
26 #define LIBMIRA_PWM_H_
27 
28 #include <stdint.h>
29 
35 typedef enum {
36  MIRA_PWM_A = 0,
39 
45 typedef enum {
48 } MiraPwmMode;
49 
50 
61 void mira_pwm_init(MiraPwmChannel channel, MiraPwmMode mode, uint32_t period_counts, uint32_t active_counts);
62 
72 void mira_pwm_set(MiraPwmChannel channel, uint32_t period_counts, uint32_t active_counts);
73 
81 void mira_pwm_start(MiraPwmChannel channel);
82 
90 void mira_pwm_stop(MiraPwmChannel channel);
91 
92 #endif /* LIBMIRA_PWM_H_ */
void mira_pwm_init(MiraPwmChannel channel, MiraPwmMode mode, uint32_t period_counts, uint32_t active_counts)
Initialize the PWM driver.
MiraPwmMode
Supported PWM modes.
Definition: mira_pwm.h:45
Definition: mira_pwm.h:47
Definition: mira_pwm.h:46
void mira_pwm_set(MiraPwmChannel channel, uint32_t period_counts, uint32_t active_counts)
Updates PWM for a channel.
MiraPwmChannel
Supported PWM channels.
Definition: mira_pwm.h:35
void mira_pwm_start(MiraPwmChannel channel)
Start the PWM channel.
Definition: mira_pwm.h:36
void mira_pwm_stop(MiraPwmChannel channel)
Stop the PWM channel.
Definition: mira_pwm.h:37