simu compilation for ARM

This commit is contained in:
bsongis
2012-05-06 20:30:19 +00:00
parent ca4b1b6ba3
commit 809e45c1e2
3 changed files with 9 additions and 1 deletions
+6
View File
@@ -31,16 +31,21 @@
*
*/
#include "../open9x.h"
void hapticOff()
{
#ifndef SIMU
PWM->PWM_DIS = PWM_DIS_CHID2 ; // Disable channel 2
PWM->PWM_OOV &= ~0x00040000 ; // Force low
PWM->PWM_OSS |= 0x00040000 ; // Force low
#endif
}
// pwmPercent 0-100
void hapticOn( uint32_t pwmPercent )
{
#ifndef SIMU
register Pwm *pwmptr ;
pwmptr = PWM ;
@@ -52,4 +57,5 @@ void hapticOn( uint32_t pwmPercent )
pwmptr->PWM_CH_NUM[2].PWM_CDTYUPD = pwmPercent ; // Duty
pwmptr->PWM_ENA = PWM_ENA_CHID2 ; // Enable channel 2
pwmptr->PWM_OSC = 0x00040000 ; // Enable output
#endif
}