38 int pwm_setClock(
int clkSrc,
int divisorInt,
int divisorFrac);
int pwm_writeToFifo(unsigned int data)
Write the provided data word to the fifo.
Definition: pwm.cpp:354
int pwm_isInit()
true if pwm_init has been called with success
Definition: pwm.cpp:55
int pwm_setData(int channel, uint32_t data)
Sets the data for the specified channel: in Serializer mode (if not using fifo) it will be sent as pu...
Definition: pwm.cpp:323
int pwm_setClock(int clkSrc, int divisorInt, int divisorFrac)
sets the clock divisor for the pwm (the base frequency is 19.2 MHz)
Definition: pwm.cpp:66
int pwm_clearFifo()
clears the fifo
Definition: pwm.cpp:148
int pwm_init()
Initializes this peripheral interface, to use before any other function in this file.
Definition: pwm.cpp:33
int pwm_setEnable(int channel, unsigned int value)
Sets the enabled status of the specified channel. After the dma completes a transfer (a chain of cont...
Definition: pwm.cpp:166
int pwm_resetChannel(int channel)
Resets the specified channel to: disabled, pwm mode, don't repeat last, silence=0, normal polarity, don't use fifo, don't use M/S Warning: the pwm peripheral likes to ignore the CTL_RPTL1_MASK and repeat the last word even if you say it not to.
Definition: pwm.cpp:90
int pwm_setDreqThreshold(unsigned int threshold)
Sets the threshold under which the dreq signal is raised.
Definition: pwm.cpp:372
int pwm_setMSenable(int channel, unsigned int mode)
Sets the pwm mode: M/S or the algorithm (see datasheet pag 139)
Definition: pwm.cpp:259
int pwm_setDmaEnable(unsigned int value)
Enables or disables the generation of the dma signals DREQ and PANIC.
Definition: pwm.cpp:388
int pwm_setSerializerMode(int channel, unsigned int mode)
Set the serialized mode to use the fifo or the data register.
Definition: pwm.cpp:228
int pwm_setRange(int channel, uint32_t range)
Sets the range of the specified channel counter.
Definition: pwm.cpp:290
int pwm_setMode(int channel, unsigned int mode)
Sets the mode of the specified channel to PWM or Serializer.
Definition: pwm.cpp:197
int pwm_setRepeatLastWord(int channel, unsigned int value)
Sets the repetition of the last word in the fifo on serializer mode Warning: the pwm peripheral likes...
Definition: pwm.cpp:120