added more spi test code, preprocessor defines

and various bugfixes
This commit is contained in:
2021-04-02 15:14:08 +02:00
committed by IRS Cleanroom Laptop
parent fca78108a2
commit 08351bcda2
9 changed files with 136 additions and 57 deletions

View File

@ -38,6 +38,7 @@ private:
void acsInit();
/* ACS board specific variables */
#ifdef RASPBERRY_PI
uint8_t mgm0Lis3ChipSelect = 0;
uint8_t mgm1Rm3100ChipSelect = 1;
uint8_t gyro0AdisChipSelect = 5;
@ -45,6 +46,16 @@ private:
uint8_t gyro2L3gd20ChipSelect = 4;
uint8_t mgm2Lis3mdlChipSelect = 17;
uint8_t mgm3Rm3100ChipSelect = 27;
#elif defined(XIPHOS_Q7S)
uint8_t mgm0Lis3mdlChipSelect = 5;
uint8_t mgm1Rm3100ChipSelect = 17;
uint8_t gyro0AdisResetLin = 20;
uint8_t gyro0AdisChipSelect = 21;
uint8_t gyro1L3gd20ChipSelect = 7;
uint8_t gyro2L3gd20ChipSelect = 3;
uint8_t mgm2Lis3mdlChipSelect = 0;
uint8_t mgm3Rm3100ChipSelect = 23;
#endif
static constexpr uint8_t STM_READ_MASK = 0b1000'0000;
static constexpr uint8_t RM3100_READ_MASK = STM_READ_MASK;