revive MC33816 driver, also support bus sharing #6781

only:alphax-4k-gdi
This commit is contained in:
rusefi 2024-08-11 18:27:14 -04:00
parent ec6876cbc8
commit 9e7a69efcf
4 changed files with 4 additions and 3 deletions

View File

@ -1,2 +1,2 @@
#!/usr/bin/env bash
cd ../../../.. && bash bin/compile.sh config/boards/hellen/alphax-4K-GDI/meta-info.env
cd ../../../.. && bash bin/compile.sh config/boards/hellen/alphax-4K-GDI/meta-info-alphax-4k-gdi.env

View File

@ -51,6 +51,7 @@ protected:
void select() override {
// revive MC33816 driver, also support bus sharing #6781
// should be somewhere but not here spiStart(driver, &spiCfg);
efiPrintf("mc select %s", hwOnChipPhysicalPinName(driver->config->ssport, driver->config->sspad));
spiSelect(driver);
}

View File

@ -194,7 +194,7 @@ __attribute__((weak)) const char * getBoardSpecificPinName(brain_pin_e /*brainPi
return nullptr;
}
static const char *hwOnChipPhysicalPinName(ioportid_t hwPort, int hwPin) {
const char *hwOnChipPhysicalPinName(ioportid_t hwPort, int hwPin) {
portNameStream.eos = 0; // reset
if (hwPort == GPIO_NULL) {
return "NONE";

View File

@ -16,7 +16,7 @@
#include "plain_pin_repository.h"
bool isBrainPinValid(Gpio brainPin);
const char *hwOnChipPhysicalPinName(ioportid_t hwPort, int hwPin);
void initPinRepository();
bool brain_pin_is_onchip(Gpio brainPin);
bool brain_pin_is_ext(Gpio brainPin);