companion9x compilation

This commit is contained in:
bsongis
2012-06-26 12:39:22 +00:00
parent d46c65c8fd
commit 8a34c2d51e
+2 -7
View File
@@ -35,27 +35,22 @@
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 ;
if ( pwmPercent > 100 )
{
if (pwmPercent > 100)
pwmPercent = 100 ;
}
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
}