PEController BSP v4
Board Support Package for PEController from Taraz Technologies
 
Loading...
Searching...
No Matches
Functions

Functions

DutyCycleUpdateFnc BSP_PWM1_10_ConfigInvertedPairs (uint32_t pwmNo, pwm_config_t *config, int pairCount)
 Configures consecutive inverted pairs for PWM.
 
float BSP_PWM1_10_UpdatePairDuty (uint32_t pwmNo, float duty, pwm_config_t *config)
 Update the Duty Cycle of an Inverted Pair.
 
DutyCycleUpdateFnc BSP_PWM1_10_ConfigChannels (uint32_t pwmNo, pwm_config_t *config, int chCount)
 Configures consecutive PWM channels.
 
float BSP_PWM1_10_UpdateChannelDuty (uint32_t pwmNo, float duty, pwm_config_t *config)
 Update the Duty Cycle of a channel.
 
void BSP_PWM1_10_Config_Interrupt (uint32_t pwmNo, bool enable, PWMResetCallback callback, int priority)
 Enable / Disable interrupt for a PWM channel as per requirement.
 
void PWM1_10_ActivateInvertedPair (uint32_t pwmNo, bool en)
 Activates a specific PWM Inverted pair.
 

Detailed Description

Function Documentation

◆ BSP_PWM1_10_Config_Interrupt()

void BSP_PWM1_10_Config_Interrupt ( uint32_t  pwmNo,
bool  enable,
PWMResetCallback  callback,
int  priority 
)
extern
Parameters
pwmNoChannel no of the PWM Channel (Range 1-10)
enableIf enable interrupt set this parameter to true
callbackSpecifies the function to be called when the PWM is reset
priorityInterrupt priority. Range (0-15). Here 0 is the highest priority

◆ BSP_PWM1_10_ConfigChannels()

DutyCycleUpdateFnc BSP_PWM1_10_ConfigChannels ( uint32_t  pwmNo,
pwm_config_t config,
int  chCount 
)
extern
Parameters
pwmNoChannel no of the first PWM Channel in the pair (Valid Values 1-10)
*configPointer to a pwm_config_t structure that contains the configuration parameters for the PWM pair
chCountNo of channels to be configured with the setting
Returns
DutyCycleUpdateFnc Returns the function pointer of the type DutyCycleUpdateFnc which needs to be called whenever the duty cycles of the pair need to be updated

◆ BSP_PWM1_10_ConfigInvertedPairs()

DutyCycleUpdateFnc BSP_PWM1_10_ConfigInvertedPairs ( uint32_t  pwmNo,
pwm_config_t config,
int  pairCount 
)
extern
Parameters
pwmNoChannel no of reference channel is the PWM pair (Valid Values 1-10).
Pairs are classified as :
  1. CH1 = Reference channel available at pin pwmNo
  2. CH2 = Inverted Channel from reference available at pin pwmNo + 1 if pwmNo is odd else pwmNo - 1
*configPointer to a pwm_config_t structure that contains the configuration parameters for the PWM pair
pairCountNo of PWM pairs to be configured
Returns
DutyCycleUpdateFnc Returns the function pointer of the type DutyCycleUpdateFnc which needs to be called whenever the duty cycles of the pair need to be updated

◆ BSP_PWM1_10_UpdateChannelDuty()

float BSP_PWM1_10_UpdateChannelDuty ( uint32_t  pwmNo,
float  duty,
pwm_config_t config 
)
extern
Parameters
pwmNoPWM channel to be configured (Valid Values 1-10)
dutyduty cycle to be applied to the channel (Range 0-1 or given in the config parameter)
*configPointer to a pwm_config_t structure that contains the configuration parameters for the PWM channel
Returns
float Duty cycle applied in this cycle. May differ from the duty variable if outside permitted limits

◆ BSP_PWM1_10_UpdatePairDuty()

float BSP_PWM1_10_UpdatePairDuty ( uint32_t  pwmNo,
float  duty,
pwm_config_t config 
)
extern
Parameters
pwmNoChannel no of reference channel is the PWM pair (Valid Values 1-10).
Pairs are classified as :
  1. CH1 = Reference channel available at pin pwmNo
  2. CH2 = Inverted Channel from reference available at pin pwmNo + 1 if pwmNo is odd else pwmNo - 1
dutyduty cycle to be applied to the pair (Range 0-1 or given in the config parameter)
*configPointer to a pwm_config_t structure that contains the configuration parameters for the PWM pair
Returns
float Duty cycle applied in this cycle. May differ from the duty variable if outside permitted limits

◆ PWM1_10_ActivateInvertedPair()

void PWM1_10_ActivateInvertedPair ( uint32_t  pwmNo,
bool  en 
)
extern
Parameters
pwmNoChannel no of reference channel is the PWM pair (Valid Values 1-10).
Pairs are classified as :
  1. CH1 = Reference channel available at pin pwmNo
  2. CH2 = Inverted Channel from reference available at pin pwmNo + 1 if pwmNo is odd else pwmNo - 1
entrue if needs activation, else false