Question: I need this C function translated to ARM assembly language. UPDATED: void pwmLedSetIntensity(int intensityLevel) { int n = intensityLevel - 1; pwm_t *pwm = &intensityLevelTable[n];

 I need this C function translated to ARM assembly language. UPDATED:

I need this C function translated to ARM assembly language.

UPDATED:

void pwmLedSetIntensity(int intensityLevel) { int n = intensityLevel - 1; pwm_t *pwm = &intensityLevelTable[n];

// Range check on the intensity level if (n >= LED_INTENSITY_LEVEL_NUM) return;

TimerLoadSet(TIMER0_BASE, TIMER_B, pwm->pwmPeriod); TimerMatchSet(TIMER0_BASE, TIMER_B, pwm->pwmPeriod - pwm->pwmDutyCycle); TimerLoadSet(TIMER1_BASE, TIMER_A, pwm->pwmPeriod); TimerMatchSet(TIMER1_BASE, TIMER_A, pwm->pwmPeriod - pwm->pwmDutyCycle); TimerLoadSet(TIMER1_BASE, TIMER_B, pwm->pwmPeriod); TimerMatchSet(TIMER1_BASE, TIMER_B, pwm->pwmPeriod - pwm->pwmDutyCycle); }

void pwmLedsetIntensitylint intensityLevel) int n intensityLevel 1 pwm t pwm - kintensityLevelTablela] // Range check on the intensity level if (n): LEDINTENSITYLEVELNUM) - - - return; TimerLoadset (TIMERO BASE, TIMER B. W>pimPeriod) : Time rMatchset(T?MERO-BASE, TIMER, B, pwm->pwnPeriod- TimerLoadSet (TIMER1 BASE, TIMERA, wm->pwmPeriod) TimerMatchSet (TIMER1 BASE, TIMER A, pw->pwmPeriod -pw-pwmDut TimerLoadset (TIMER1 BASE, TIMER B, pm->pwmPeriod) ; yCycle) -pwmDutyCycle) TimerMatchet (TIMERI BASE, TIMER B, pwm->pwmperiod n pwm void pwmLedsetIntensitylint intensityLevel) int n intensityLevel 1 pwm t pwm - kintensityLevelTablela] // Range check on the intensity level if (n): LEDINTENSITYLEVELNUM) - - - return; TimerLoadset (TIMERO BASE, TIMER B. W>pimPeriod) : Time rMatchset(T?MERO-BASE, TIMER, B, pwm->pwnPeriod- TimerLoadSet (TIMER1 BASE, TIMERA, wm->pwmPeriod) TimerMatchSet (TIMER1 BASE, TIMER A, pw->pwmPeriod -pw-pwmDut TimerLoadset (TIMER1 BASE, TIMER B, pm->pwmPeriod) ; yCycle) -pwmDutyCycle) TimerMatchet (TIMERI BASE, TIMER B, pwm->pwmperiod n pwm

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!