Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino_H7_Video: handling errors at initialization time #1015

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

dmazzella
Copy link
Contributor

handling errors at initialization time with added retry counter to avoid infinite wait on anx7625_wait_hpd_event

…etry counter to avoid infinite wait on anx7625_wait_hpd_event
@CLAassistant
Copy link

CLAassistant commented Jan 10, 2025

CLA assistant check
All committers have signed the CLA.

@dmazzella
Copy link
Contributor Author

dmazzella commented Jan 15, 2025

the motivation for this pr is to be able to reboot the board in case the display (USBCVideo) does not turn on for some reason, unfortunately it often happens that after a reset (ota firmware update) of the board the display does not turn on again and a reset fixes this, the problem is that in my specific case it happens on “remote” machines and not being physically there to reset it this is a problem.

  // Initialize display
  int display_ec = Display.begin();
  if (display_ec != 0) {
    NVIC_SystemReset();
  }

for copleteness i use the USB-C to HDMI Adapter from Arduino store

@dmazzella
Copy link
Contributor Author

@leonardocavagnis please take a look at it and let me know.

@leonardocavagnis leonardocavagnis self-requested a review January 17, 2025 14:07
Copy link
Member

@leonardocavagnis leonardocavagnis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!
Just a small fix: the Display.begin() function returns 0 on success or a value >0 if it fails.

0: Success
1: Unknown error
2: Insufficient drawing memory buffer
(NEW) 3: Video controller initialization failure

libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp Outdated Show resolved Hide resolved
@leonardocavagnis leonardocavagnis merged commit d9e1757 into arduino:main Jan 17, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants