libpynq  (release 5EID0-2023 version 0.3.0 of 2024-04-25 09:42 )
pwm.c
Go to the documentation of this file.
1 #include <pwm.h>
2 bool pwm_initialized(const int pwm){};
3 void pwm_init(const int pwm, const uint32_t period){};
4 void pwm_destroy(const int pwm){};
5 void pwm_set_duty_cycle(const int pwm, const uint32_t duty){};
6 void pwm_set_period(const int pwm, const uint32_t period){};
7 uint32_t pwm_get_period(const int pwm){};
8 uint32_t pwm_get_duty_cycle(const int pwm){};
9 void pwm_set_steps(const int pwm, const uint32_t steps){};
10 uint32_t pwm_get_steps(const int pwm){};
pwm_destroy
void pwm_destroy(const int pwm)
Removes the instantiated shared memory system of the PWM channel.
Definition: pwm.c:4
pwm_set_duty_cycle
void pwm_set_duty_cycle(const int pwm, const uint32_t duty)
Sets the duty cycle for the specified PWM channel.
Definition: pwm.c:5
pwm_set_steps
void pwm_set_steps(const int pwm, const uint32_t steps)
Generates steps steps on the PWM channel.
Definition: pwm.c:9
steps
steps
Definition: stepper.c:59
pwm_get_period
uint32_t pwm_get_period(const int pwm)
Returns the period of a certain PWM channel.
Definition: pwm.c:7
pwm_get_duty_cycle
uint32_t pwm_get_duty_cycle(const int pwm)
Gets the duty cycle of the specified PWM channel.
Definition: pwm.c:8
pwm_initialized
bool pwm_initialized(const int pwm)
Checks if the channel index is initialized.
Definition: pwm.c:2
pwm_set_period
void pwm_set_period(const int pwm, const uint32_t period)
Sets the period for the specified PWM channel.
Definition: pwm.c:6
pwm_init
void pwm_init(const int pwm, const uint32_t period)
Initializes the PWM channel with the specified period.
Definition: pwm.c:3
pwm.h
pwm_get_steps
uint32_t pwm_get_steps(const int pwm)
Get the number of steps a certain channel has taken so far.
Definition: pwm.c:10