Go to the documentation of this file.
40 #ifndef AXI_PWM_EXTRA_H_
41 #define AXI_PWM_EXTRA_H_
#define AXI_PWMGEN_CHX_DUTY(ch)
Definition: axi_pwm.c:65
int32_t no_os_pwm_init(struct no_os_pwm_desc **desc, const struct no_os_pwm_init_param *param)
Initialize the pwm axi generator and the handler associated with it.
Definition: axi_pwm.c:281
uint32_t duty_cycle_ns
Definition: no_os_pwm.h:91
Structure containing the init parameters needed by the PWM generator.
Definition: no_os_pwm.h:66
#define AXI_PWMGEN_REG_SCRATCHPAD
Definition: axi_pwm.c:56
uint32_t channel
Definition: axi_pwm_extra.h:61
AXI PWM descriptor.
Definition: axi_pwm_extra.h:68
uint32_t period_ns
Definition: no_os_pwm.h:70
#define AXI_PWMGEN_LOAD_CONIG
Definition: axi_pwm.c:68
int32_t no_os_pwm_remove(struct no_os_pwm_desc *desc)
Free the memory allocated by axi_pwmgen_init().
Definition: axi_pwm.c:373
uint32_t phase_ns
Definition: no_os_pwm.h:93
int32_t no_os_pwm_get_period(struct no_os_pwm_desc *desc, uint32_t *period_ns)
Get period of PWM generator device.
Definition: axi_pwm.c:179
void * no_os_calloc(size_t nitems, size_t size)
#define AXI_PWMGEN_RESET
Definition: axi_pwm.c:69
#define AXI_PWMGEN_CHX_PERIOD(ch)
Definition: axi_pwm.c:64
int32_t no_os_pwm_set_phase(struct no_os_pwm_desc *desc, uint32_t phase_ns)
Set phase of PWM generator device.
Definition: axi_pwm.c:240
uint32_t period_ns
Definition: no_os_pwm.h:89
uint32_t base_addr
Definition: axi_pwm_extra.h:70
int32_t no_os_pwm_disable(struct no_os_pwm_desc *desc)
Disable PWM generator device.
Definition: axi_pwm.c:129
int32_t no_os_pwm_get_duty_cycle(struct no_os_pwm_desc *desc, uint32_t *duty_cycle_ns)
Get duty cycle of PWM generator device.
Definition: axi_pwm.c:225
#define USEC_PER_SEC
Definition: axi_pwm.c:73
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:56
enum no_os_pwm_polarity polarity
Definition: no_os_pwm.h:76
int32_t no_os_pwm_get_phase(struct no_os_pwm_desc *desc, uint32_t *phase_ns)
Get phase of PWM generator device.
Definition: axi_pwm.c:267
#define AXI_PWMGEN_CHANNEL_DISABLE
Definition: axi_pwm.c:70
int32_t no_os_pwm_set_period(struct no_os_pwm_desc *desc, uint32_t period_ns)
Set period of PWM generator device.
Definition: axi_pwm.c:151
enum no_os_pwm_polarity polarity
Definition: no_os_pwm.h:95
#define NSEC_PER_USEC
Definition: axi_pwm.c:72
int32_t no_os_axi_io_read(uint32_t base, uint32_t offset, uint32_t *data)
AXI IO Altera specific read function.
Definition: altera_axi_io.c:59
bool enabled
Definition: no_os_pwm.h:97
void * extra
Definition: no_os_pwm.h:78
Structure representing an PWM generator device.
Definition: no_os_pwm.h:85
uint32_t duty_cycle_ns
Definition: no_os_pwm.h:72
#define AXI_PWMGEN_REG_CONFIG
Definition: axi_pwm.c:58
uint32_t channel
Definition: axi_pwm_extra.h:74
Structure holding the initialization parameters for axi PWM.
Definition: axi_pwm_extra.h:55
Header file of PWM Interface.
void * extra
Definition: no_os_pwm.h:99
int32_t no_os_pwm_set_duty_cycle(struct no_os_pwm_desc *desc, uint32_t duty_cycle_ns)
Set duty cycle of PWM generator device.
Definition: axi_pwm.c:194
void no_os_free(void *ptr)
#define AXI_PWMGEN_TEST_DATA
Definition: axi_pwm.c:67
int32_t no_os_pwm_enable(struct no_os_pwm_desc *desc)
Enable PWM generator device.
Definition: axi_pwm.c:108
#define AXI_PWMGEN_REG_NPWM
Definition: axi_pwm.c:59
uint32_t ref_clock_Hz
Definition: axi_pwm_extra.h:72
uint32_t ref_clock_Hz
Definition: axi_pwm_extra.h:59
int32_t no_os_axi_io_write(uint32_t base, uint32_t offset, uint32_t data)
AXI IO Altera specific write function.
Definition: altera_axi_io.c:73
uint32_t base_addr
Definition: axi_pwm_extra.h:57
#define AXI_PWMGEN_CHX_PHASE(ch)
Definition: axi_pwm.c:66
Header file of utility functions.
uint32_t ch_period
Definition: axi_pwm_extra.h:76