#include "status.h"
#include <stdint.h>
#include <stdbool.h>
#include "callbacks.h"
#include "pwm_pal_mapping.h"
#include "pwm_pal_cfg.h"
Go to the source code of this file.
Data Structures | |
struct | pwm_channel_t |
This structure includes the configuration for each channel Implements : pwm_channel_t_Class. More... | |
struct | pwm_global_config_t |
This structure is the configuration for initialization of PWM channels. Implements : pwm_global_config_t_Class. More... | |
Enumerations | |
enum | pwm_channel_type_t { PWM_EDGE_ALIGNED = 0, PWM_CENTER_ALIGNED = 1 } |
Defines the channel types Implements : pwm_channel_type_t_Class. More... | |
enum | pwm_polarity_t { PWM_ACTIVE_HIGH = 0, PWM_ACTIVE_LOW = 1 } |
Defines the polarity of pwm channels Implements : pwm_polarity_t_Class. More... | |
enum | pwm_complementarty_mode_t { PWM_DUPLICATED = 0, PWM_INVERTED = 1 } |
Defines the polarity of complementary pwm channels relative to main channel Implements : pwm_complementarty_mode_t_Class. More... | |
Functions | |
status_t | PWM_Init (const pwm_instance_t *const instance, const pwm_global_config_t *config) |
Initialize PWM channels based on config parameter. More... | |
status_t | PWM_UpdateDuty (const pwm_instance_t *const instance, uint8_t channel, uint32_t duty) |
Update duty cycle. The measurement unit for duty is clock ticks. More... | |
status_t | PWM_UpdatePeriod (const pwm_instance_t *const instance, uint8_t channel, uint32_t period) |
Update period for specific a specific channel. This function changes period for all channels which shares the timebase with targeted channel. More... | |
status_t | PWM_OverwriteOutputChannels (const pwm_instance_t *const instance, uint32_t channelsMask, uint32_t channelsValues) |
This function change the output value for some channels. channelsMask select which channels will be overwrite, each bit filed representing one channel: 1 - channel is controlled by channelsValues, 0 - channel is controlled by pwm. channelsValues select output values to be write on corresponding channel. More... | |
status_t | PWM_Deinit (const pwm_instance_t *const instance) |
Uninitialised PWM instance. More... | |