revive MC33816 driver, also support bus sharing #6781
only:alphax-4k-gdi
This commit is contained in:
parent
f5ba5a834c
commit
bacedbb65e
|
@ -67,7 +67,8 @@ static const tle9104_config tle9104_cfg[BOARD_TLE9104_COUNT] = {
|
|||
},
|
||||
.resn = Gpio::Unassigned,
|
||||
.en = Gpio::Unassigned
|
||||
},
|
||||
}
|
||||
/* ,
|
||||
{
|
||||
.spi_bus = &SPID2,
|
||||
.spi_config = {
|
||||
|
@ -119,7 +120,9 @@ static const tle9104_config tle9104_cfg[BOARD_TLE9104_COUNT] = {
|
|||
},
|
||||
.resn = Gpio::Unassigned,
|
||||
.en = Gpio::Unassigned
|
||||
}};
|
||||
}
|
||||
*/
|
||||
};
|
||||
|
||||
/*PUBLIC_API_WEAK*/ void boardInitHardware() {
|
||||
setHellenMegaEnPin();
|
||||
|
@ -164,7 +167,7 @@ static const tle9104_config tle9104_cfg[BOARD_TLE9104_COUNT] = {
|
|||
csDcAux.setValue(1);
|
||||
}
|
||||
|
||||
initAll9104(tle9104_cfg);
|
||||
// initAll9104(tle9104_cfg);
|
||||
}
|
||||
|
||||
static Gpio OUTPUTS[] = {
|
||||
|
|
|
@ -33,7 +33,7 @@ static SPIConfig spiCfg = {
|
|||
.data_cb = NULL,
|
||||
.error_cb = NULL,
|
||||
#endif
|
||||
.ssport = NULL,
|
||||
.ssport = nullptr,
|
||||
.sspad = 0,
|
||||
.cr1 =
|
||||
SPI_CR1_16BIT_MODE |
|
||||
|
@ -49,6 +49,8 @@ public:
|
|||
|
||||
protected:
|
||||
void select() override {
|
||||
// revive MC33816 driver, also support bus sharing #6781
|
||||
// should be somewhere but not here spiStart(driver, &spiCfg);
|
||||
spiSelect(driver);
|
||||
}
|
||||
|
||||
|
@ -181,6 +183,7 @@ void Pt2001::init() {
|
|||
}
|
||||
|
||||
chipSelect.initPin("mc33 CS", engineConfiguration->mc33816_cs /*, &engineConfiguration->csPinMode*/);
|
||||
chipSelect.setValue(1);
|
||||
|
||||
// Initialize the chip via ResetB
|
||||
resetB.initPin("mc33 RESTB", engineConfiguration->mc33816_rstb);
|
||||
|
|
Loading…
Reference in New Issue