simu compilation for ARM
This commit is contained in:
+1
-1
@@ -290,7 +290,7 @@ ifeq ($(PCB), ARM)
|
|||||||
BOARDSRC = board_ersky9x.cpp
|
BOARDSRC = board_ersky9x.cpp
|
||||||
EXTRABOARDSRC = ersky9x/core_cm3.c ersky9x/board_lowlevel.c ersky9x/crt.c ersky9x/vectors_sam3s.c
|
EXTRABOARDSRC = ersky9x/core_cm3.c ersky9x/board_lowlevel.c ersky9x/crt.c ersky9x/vectors_sam3s.c
|
||||||
# ersky9x/ff.c ersky9x/diskio_sam3s.c ersky9x/Media.c ersky9x/ccsbcs.c ersky9x/sdcard.c ersky9x/MEDSdcard.c
|
# ersky9x/ff.c ersky9x/diskio_sam3s.c ersky9x/Media.c ersky9x/ccsbcs.c ersky9x/sdcard.c ersky9x/MEDSdcard.c
|
||||||
CPPSRC += ersky9x/sdmmc_spi.c ersky9x/sdspi.c
|
# CPPSRC += ersky9x/sdmmc_spi.c ersky9x/sdspi.c
|
||||||
EEPROMSRC = eeprom_arm.cpp
|
EEPROMSRC = eeprom_arm.cpp
|
||||||
PULSESSRC = pulses_arm.cpp
|
PULSESSRC = pulses_arm.cpp
|
||||||
CPPSRC += ersky9x/audio.cpp haptic.cpp
|
CPPSRC += ersky9x/audio.cpp haptic.cpp
|
||||||
|
|||||||
@@ -31,16 +31,21 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../open9x.h"
|
||||||
|
|
||||||
void hapticOff()
|
void hapticOff()
|
||||||
{
|
{
|
||||||
|
#ifndef SIMU
|
||||||
PWM->PWM_DIS = PWM_DIS_CHID2 ; // Disable channel 2
|
PWM->PWM_DIS = PWM_DIS_CHID2 ; // Disable channel 2
|
||||||
PWM->PWM_OOV &= ~0x00040000 ; // Force low
|
PWM->PWM_OOV &= ~0x00040000 ; // Force low
|
||||||
PWM->PWM_OSS |= 0x00040000 ; // Force low
|
PWM->PWM_OSS |= 0x00040000 ; // Force low
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// pwmPercent 0-100
|
// pwmPercent 0-100
|
||||||
void hapticOn( uint32_t pwmPercent )
|
void hapticOn( uint32_t pwmPercent )
|
||||||
{
|
{
|
||||||
|
#ifndef SIMU
|
||||||
register Pwm *pwmptr ;
|
register Pwm *pwmptr ;
|
||||||
|
|
||||||
pwmptr = PWM ;
|
pwmptr = PWM ;
|
||||||
@@ -52,4 +57,5 @@ void hapticOn( uint32_t pwmPercent )
|
|||||||
pwmptr->PWM_CH_NUM[2].PWM_CDTYUPD = pwmPercent ; // Duty
|
pwmptr->PWM_CH_NUM[2].PWM_CDTYUPD = pwmPercent ; // Duty
|
||||||
pwmptr->PWM_ENA = PWM_ENA_CHID2 ; // Enable channel 2
|
pwmptr->PWM_ENA = PWM_ENA_CHID2 ; // Enable channel 2
|
||||||
pwmptr->PWM_OSC = 0x00040000 ; // Enable output
|
pwmptr->PWM_OSC = 0x00040000 ; // Enable output
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,9 @@
|
|||||||
|
|
||||||
void init_SDcard()
|
void init_SDcard()
|
||||||
{
|
{
|
||||||
|
#ifndef SIMU
|
||||||
configure_pins( 0xFC000000, PIN_PERIPHERAL | PIN_INPUT | PIN_PER_C | PIN_PORTA | PIN_NO_PULLUP ) ;
|
configure_pins( 0xFC000000, PIN_PERIPHERAL | PIN_INPUT | PIN_PER_C | PIN_PORTA | PIN_NO_PULLUP ) ;
|
||||||
configure_pins( PIO_PB7, PIN_INPUT | PIN_PORTB | PIN_NO_PULLUP | PIN_NO_PULLDOWN ) ;
|
configure_pins( PIO_PB7, PIN_INPUT | PIN_PORTB | PIN_NO_PULLUP | PIN_NO_PULLDOWN ) ;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user