simu compilation for ARM
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user