mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Add temporary facility of vendor specific init string to displayport msp
Only for debugging purposes during attribute rich displayport devices. Should be / Will be removed from a production firmware.
This commit is contained in:
parent
05418297b2
commit
3d7151c6c0
4 changed files with 29 additions and 0 deletions
|
@ -170,6 +170,21 @@ static const displayPortVTable_t mspDisplayPortVTable = {
|
|||
|
||||
displayPort_t *displayPortMspInit(void)
|
||||
{
|
||||
#ifdef USE_DISPLAYPORT_MSP_VENDOR_SPECIFIC
|
||||
// XXX Should handle the case that a device starts to listen after the init string is sent
|
||||
// XXX 1. Send the init string periodically while not armed.
|
||||
// XXX 2. Send the init string in response to device identification message from a device.
|
||||
|
||||
// Send vendor specific initialization string.
|
||||
// The string start with subcommand code.
|
||||
|
||||
int initLength = displayPortProfileMsp()->vendorInitLength;
|
||||
|
||||
if (initLength) {
|
||||
output(&mspDisplayPort, MSP_DISPLAYPORT, (uint8_t *)displayPortProfileMsp()->vendorInit, initLength);
|
||||
}
|
||||
#endif
|
||||
|
||||
displayInit(&mspDisplayPort, &mspDisplayPortVTable);
|
||||
resync(&mspDisplayPort);
|
||||
return &mspDisplayPort;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue