40 int pwmDma_addPulse(
int channel,
int bcmPort,
unsigned int start_us,
unsigned int length_us);
50 int pwmDma_addMultiplePulse(
int channel,
int bcmPort,
unsigned int start_us,
unsigned int length_us,
unsigned int subPeriod_us);
int pwmDma_addMultiplePulse(int channel, int bcmPort, unsigned int start_us, unsigned int length_us, unsigned int subPeriod_us)
Adds multiple pulses to the channel at the specified port. The pulse will be repeated every subPeriod...
Definition: pwmByDma.cpp:631
int pwmDma_init(unsigned int pulseDuration_us)
Initialize: call this before any other function in this file. This sets up the pwm to use it as a tim...
Definition: pwmByDma.cpp:72
unsigned int pwmDma_get_pulseDuration_us()
Returns the duration in microseconds of a single pulse, you can set this duration in pwmDma_init(...
Definition: pwmByDma.cpp:145
int pwmDma_stopChannelWaitCycleEnd(int channel)
Stops channel waiting for the current cycle to finish.
Definition: pwmByDma.cpp:392
int pwmDma_stopChannel(int channel)
Stops channel.
Definition: pwmByDma.cpp:426
int pwmDma_clearPort(int channel, int bcmPort)
Removes any pulse on this port at the specified channel.
Definition: pwmByDma.cpp:519
int pwmDma_freeChannel(int channel)
Frees a channel initialized with pwmDma_initChannel or pwmDma_initChannel_periodInPulses.
Definition: pwmByDma.cpp:344
int pwmDma_isChannelInitialized(int channel)
Tells if a channel is initialized.
Definition: pwmByDma.cpp:157
int pwmDma_getChannelPeriodUs(int channel)
Return the duration in microseconds of a cycle for the specified channel.
Definition: pwmByDma.cpp:173
int pwmDma_printWords(int channel)
For debugging purposes: prints all the set/clear words.
Definition: pwmByDma.cpp:554
int pwmDma_initChannel_periodInPulses(int channel, unsigned int pulsesPerPeriod)
Sets up the channel to output pwm, you can use only a channel at a time.
Definition: pwmByDma.cpp:212
int pwmDma_printControlBlocks(int channel)
For debugging purposes: prints all the control blocks.
Definition: pwmByDma.cpp:581
int pwmDma_startChannel(int channel)
Starts a stopped channel.
Definition: pwmByDma.cpp:371
int pwmDma_initChannel(int channel, unsigned int period_us)
Sets up the channel to output pwm.
Definition: pwmByDma.cpp:329
int pwmDma_addPulse(int channel, int bcmPort, unsigned int start_us, unsigned int length_us)
Sets a pulse on the specified channel and gpio.
Definition: pwmByDma.cpp:450
int pwmDma_setMSRatio(int channel, int bcmPort, double ratio)
Set the port to output a square wave with the specified duty cycle. Will be high for the first ratio*...
Definition: pwmByDma.cpp:609