no-OS
Macros | Functions | Variables
aducm3029_pwm.c File Reference

Implementation of aducm3029_pwm.c. More...

#include "no_os_pwm.h"
#include "stdlib.h"
#include "no_os_error.h"
#include "no_os_alloc.h"
#include <drivers/tmr/adi_tmr.h>
#include <drivers/pwr/adi_pwr.h>
Include dependency graph for aducm3029_pwm.c:

Macros

#define NO_OS_NS_PER_SEC   1000000000
 

Functions

int32_t aducm3029_pwm_init (struct no_os_pwm_desc **desc, const struct no_os_pwm_init_param *param)
 
int32_t aducm3029_pwm_remove (struct no_os_pwm_desc *desc)
 
int32_t aducm3029_pwm_enable (struct no_os_pwm_desc *desc)
 
int32_t aducm3029_pwm_disable (struct no_os_pwm_desc *desc)
 
int32_t aducm3029_pwm_set_period (struct no_os_pwm_desc *desc, uint32_t period_ns)
 
int32_t aducm3029_pwm_get_period (struct no_os_pwm_desc *desc, uint32_t *period_ns)
 
int32_t aducm3029_pwm_set_duty_cycle (struct no_os_pwm_desc *desc, uint32_t duty_cycle_ns)
 
int32_t aducm3029_pwm_get_duty_cycle (struct no_os_pwm_desc *desc, uint32_t *duty_cycle_ns)
 
int32_t aducm3029_pwm_set_polarity (struct no_os_pwm_desc *desc, enum no_os_pwm_polarity polarity)
 
int32_t aducm3029_pwm_get_polarity (struct no_os_pwm_desc *desc, enum no_os_pwm_polarity *polarity)
 

Variables

const struct no_os_pwm_platform_ops aducm3029_pwm_ops
 ADUCM3029 platform specific PWM platform ops structure. More...
 

Detailed Description

Implementation of aducm3029_pwm.c.

Author
Mihail Chindris (mihai.nosp@m.l.ch.nosp@m.indri.nosp@m.s@an.nosp@m.alog..nosp@m.com)

Copyright 2020(c) Analog Devices, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ NO_OS_NS_PER_SEC

#define NO_OS_NS_PER_SEC   1000000000

Function Documentation

◆ aducm3029_pwm_disable()

int32_t aducm3029_pwm_disable ( struct no_os_pwm_desc desc)

◆ aducm3029_pwm_enable()

int32_t aducm3029_pwm_enable ( struct no_os_pwm_desc desc)

◆ aducm3029_pwm_get_duty_cycle()

int32_t aducm3029_pwm_get_duty_cycle ( struct no_os_pwm_desc desc,
uint32_t *  duty_cycle_ns 
)

◆ aducm3029_pwm_get_period()

int32_t aducm3029_pwm_get_period ( struct no_os_pwm_desc desc,
uint32_t *  period_ns 
)

◆ aducm3029_pwm_get_polarity()

int32_t aducm3029_pwm_get_polarity ( struct no_os_pwm_desc desc,
enum no_os_pwm_polarity polarity 
)

◆ aducm3029_pwm_init()

int32_t aducm3029_pwm_init ( struct no_os_pwm_desc **  desc,
const struct no_os_pwm_init_param param 
)

◆ aducm3029_pwm_remove()

int32_t aducm3029_pwm_remove ( struct no_os_pwm_desc desc)

◆ aducm3029_pwm_set_duty_cycle()

int32_t aducm3029_pwm_set_duty_cycle ( struct no_os_pwm_desc desc,
uint32_t  duty_cycle_ns 
)

◆ aducm3029_pwm_set_period()

int32_t aducm3029_pwm_set_period ( struct no_os_pwm_desc desc,
uint32_t  period_ns 
)

◆ aducm3029_pwm_set_polarity()

int32_t aducm3029_pwm_set_polarity ( struct no_os_pwm_desc desc,
enum no_os_pwm_polarity  polarity 
)

Variable Documentation

◆ aducm3029_pwm_ops

const struct no_os_pwm_platform_ops aducm3029_pwm_ops
Initial value:
= {
.pwm_ops_init = &aducm3029_pwm_init,
.pwm_ops_enable = &aducm3029_pwm_enable,
.pwm_ops_disable = &aducm3029_pwm_disable,
.pwm_ops_set_period = &aducm3029_pwm_set_period,
.pwm_ops_get_period = &aducm3029_pwm_get_period,
.pwm_ops_set_duty_cycle = &aducm3029_pwm_set_duty_cycle,
.pwm_ops_get_duty_cycle = &aducm3029_pwm_get_duty_cycle,
.pwm_ops_set_polarity = &aducm3029_pwm_set_polarity,
.pwm_ops_get_polarity = &aducm3029_pwm_get_polarity,
.pwm_ops_remove = &aducm3029_pwm_remove
}

ADUCM3029 platform specific PWM platform ops structure.

ADUCM3029 specific PWM platform ops structure.

aducm3029_pwm_get_polarity
int32_t aducm3029_pwm_get_polarity(struct no_os_pwm_desc *desc, enum no_os_pwm_polarity *polarity)
Definition: aducm3029_pwm.c:288
aducm3029_pwm_set_polarity
int32_t aducm3029_pwm_set_polarity(struct no_os_pwm_desc *desc, enum no_os_pwm_polarity polarity)
Definition: aducm3029_pwm.c:276
aducm3029_pwm_set_duty_cycle
int32_t aducm3029_pwm_set_duty_cycle(struct no_os_pwm_desc *desc, uint32_t duty_cycle_ns)
Definition: aducm3029_pwm.c:252
aducm3029_pwm_get_duty_cycle
int32_t aducm3029_pwm_get_duty_cycle(struct no_os_pwm_desc *desc, uint32_t *duty_cycle_ns)
Definition: aducm3029_pwm.c:264
aducm3029_pwm_remove
int32_t aducm3029_pwm_remove(struct no_os_pwm_desc *desc)
Definition: aducm3029_pwm.c:186
aducm3029_pwm_disable
int32_t aducm3029_pwm_disable(struct no_os_pwm_desc *desc)
Definition: aducm3029_pwm.c:213
aducm3029_pwm_set_period
int32_t aducm3029_pwm_set_period(struct no_os_pwm_desc *desc, uint32_t period_ns)
Definition: aducm3029_pwm.c:228
aducm3029_pwm_enable
int32_t aducm3029_pwm_enable(struct no_os_pwm_desc *desc)
Definition: aducm3029_pwm.c:198
aducm3029_pwm_get_period
int32_t aducm3029_pwm_get_period(struct no_os_pwm_desc *desc, uint32_t *period_ns)
Definition: aducm3029_pwm.c:240
aducm3029_pwm_init
int32_t aducm3029_pwm_init(struct no_os_pwm_desc **desc, const struct no_os_pwm_init_param *param)
Definition: aducm3029_pwm.c:146