41 #include <hal/nrf_pwm.h> 81 #define PWM_NUM_CHANNELS 4 104 uint8_t Pin : GPIO_PIN_ID_WIDTH;
149 extern void PwmSet(
const struct pwm_t *Pwm, uint8_t Channel, uint16_t Value);
175 #endif // DRIVER_PWM_H
uint16_t Range
PWM counts from 0 to Range.
Driver for port initialisazion and IO functions for nRF52 uC.
void PwmInterruptHandler(const struct pwm_t *Pwm)
Name: PwmInterruptHandler PWM interrupt handler Called from board.c at hardware interrupt context...
uint32_t IrqPriority
HW IRQ priority (see enum EVE_IRQ_PRIORITIES)
void PwmFrequencySet(const struct pwm_t *Pwm, uint32_t Frequency)
Name: PwmFrequencySet Sets the PWM frequency. This frequency will be used for all channels on the sel...
nrf_pwm_clk_t BaseClock
Base PWM clock.
void PwmInit(const struct pwm_t *Pwm)
Name: PwmInit Initialize PWM.
void PwmSet(const struct pwm_t *Pwm, uint8_t Channel, uint16_t Value)
Name: PwmSet Sets PWM duty cycle for the selected channel.
nrf_pwm_mode_t Mode
Edge- or center-aligned mode.
uint32_t DefaultFrequency
TOP_Value = BaseClock / Frequency - 1.