ONBOARD_MEMS_TYPE=LIS2DH12
This commit is contained in:
parent
1cb7621ab9
commit
83abe4ccdc
|
@ -36,3 +36,4 @@ $(error Unsupported PROJECT_CPU [$(PROJECT_CPU)])
|
|||
endif
|
||||
|
||||
DDEFS += -DHW_HELLEN_4CHAN=1
|
||||
ONBOARD_MEMS_TYPE=LIS2DH12
|
||||
|
|
|
@ -30,3 +30,5 @@ DDEFS += -DSTATIC_BOARD_ID=STATIC_BOARD_ID_ALPHAX_8CHAN
|
|||
|
||||
SHORT_BOARD_NAME=alphax-8chan
|
||||
DDEFS += -DHW_HELLEN_8CHAN=1
|
||||
|
||||
ONBOARD_MEMS_TYPE=LIS2DH12
|
||||
|
|
|
@ -16,3 +16,13 @@ DDEFS += -DHW_HELLEN=1
|
|||
ifeq ($(RAM_UNUSED_SIZE),)
|
||||
DDEFS += -DRAM_UNUSED_SIZE=100
|
||||
endif
|
||||
|
||||
ifeq ($(ONBOARD_MEMS_TYPE),LIS2DH12)
|
||||
# Same spi is used for SD and Accelerometer
|
||||
DDEFS += -DMMC_USE_MUTUAL_EXCLUSION=TRUE
|
||||
|
||||
# This board has some Accelerometer onboard
|
||||
DDEFS += -DEFI_ONBOARD_MEMS=TRUE
|
||||
EFI_ONBOARD_MEMS_LIS2DH12 = yes
|
||||
DDEFS += -DLSM303AGR_USE_SPI=TRUE -DLSM303AGR_USE_I2C=FALSE -DLSM303AGR_SHARED_SPI=TRUE
|
||||
endif
|
||||
|
|
|
@ -146,9 +146,7 @@ void setBoardDefaultConfiguration() {
|
|||
setTPS1Calibration(100, 650);
|
||||
hellenWbo();
|
||||
|
||||
/* accel SPI is shared with SD card SPI */
|
||||
engineConfiguration->accelerometerSpiDevice = SPI_DEVICE_1;
|
||||
engineConfiguration->accelerometerCsPin = Gpio::H_SPI1_CS2;
|
||||
setAccelerometerSpi();
|
||||
}
|
||||
|
||||
static Gpio OUTPUTS[] = {
|
||||
|
|
|
@ -249,6 +249,12 @@ static void setHellenSdCardSpi3NoCS() {
|
|||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
|
||||
static void setAccelerometerSpi() {
|
||||
/* accelerometer SPI is shared with SD card SPI on mm144 */
|
||||
engineConfiguration->accelerometerSpiDevice = SPI_DEVICE_1;
|
||||
engineConfiguration->accelerometerCsPin = Gpio::H_SPI1_CS2;
|
||||
}
|
||||
|
||||
static void setHellenSdCardSpi1() {
|
||||
setHellenSdCardSpi1NoCS();
|
||||
engineConfiguration->sdCardCsPin = Gpio::H_SPI1_CS1;
|
||||
|
|
Loading…
Reference in New Issue