mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Fixed init order of MAX7456 DisplayPort
This commit is contained in:
parent
805b2f4b1e
commit
0115ff15b2
3 changed files with 13 additions and 7 deletions
|
@ -415,18 +415,18 @@ void max7456ReInit(void)
|
|||
// Here we init only CS and try to init MAX for first time.
|
||||
// Also detect device type (MAX v.s. AT)
|
||||
|
||||
void max7456Init(const max7456Config_t *max7456Config, const vcdProfile_t *pVcdProfile, bool cpuOverclock)
|
||||
bool max7456Init(const max7456Config_t *max7456Config, const vcdProfile_t *pVcdProfile, bool cpuOverclock)
|
||||
{
|
||||
max7456HardwareReset();
|
||||
|
||||
if (!max7456Config->csTag) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
busdev->busdev_u.spi.csnPin = IOGetByTag(max7456Config->csTag);
|
||||
|
||||
if (!IOIsFreeOrPreinit(busdev->busdev_u.spi.csnPin)) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
IOInit(busdev->busdev_u.spi.csnPin, OWNER_OSD_CS, 0);
|
||||
|
@ -489,6 +489,7 @@ void max7456Init(const max7456Config_t *max7456Config, const vcdProfile_t *pVcdP
|
|||
#endif
|
||||
|
||||
// Real init will be made later when driver detect idle.
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue