mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
CF/BF - SPRACINGF3OSD initial target support inc support for OSD SLAVE via MSP_DISPLAYPORT.
OSD is tested and working on an SPRACINGF3EVO stacked with an SPRACINGF3OSD.
This commit is contained in:
parent
73e46e9050
commit
ca5bafeab9
23 changed files with 638 additions and 12 deletions
23
src/main/drivers/max7456.c
Executable file → Normal file
23
src/main/drivers/max7456.c
Executable file → Normal file
|
@ -389,6 +389,8 @@ void max7456ReInit(void)
|
|||
|
||||
void max7456Init(const vcdProfile_t *pVcdProfile)
|
||||
{
|
||||
max7456HardwareReset();
|
||||
|
||||
#ifdef MAX7456_SPI_CS_PIN
|
||||
max7456CsPin = IOGetByTag(IO_TAG(MAX7456_SPI_CS_PIN));
|
||||
#endif
|
||||
|
@ -612,4 +614,25 @@ void max7456WriteNvm(uint8_t char_address, const uint8_t *font_data)
|
|||
max7456Lock = false;
|
||||
}
|
||||
|
||||
#ifdef MAX7456_NRST_PIN
|
||||
static IO_t max7456ResetPin = IO_NONE;
|
||||
#endif
|
||||
|
||||
void max7456HardwareReset(void)
|
||||
{
|
||||
#ifdef MAX7456_NRST_PIN
|
||||
#define IO_RESET_CFG IO_CONFIG(GPIO_Mode_OUT, GPIO_Speed_2MHz, GPIO_OType_PP, GPIO_PuPd_DOWN)
|
||||
|
||||
max7456ResetPin = IOGetByTag(IO_TAG(MAX7456_NRST_PIN));
|
||||
IOInit(max7456ResetPin, OWNER_OSD, 0);
|
||||
IOConfigGPIO(max7456ResetPin, IO_RESET_CFG);
|
||||
|
||||
|
||||
// RESET
|
||||
IOLo(max7456ResetPin);
|
||||
delay(100);
|
||||
IOHi(max7456ResetPin);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue