williamfj
Posts: 1
Joined: Mon Feb 16, 2015 3:01 am

Hdmi detect in real time

Mon Feb 16, 2015 3:11 am

Hello everyone, this is my first question I hope to put it in the right place.

I need to have knowledge if the hdmi connector is connected to the raspberry in real time (hot_plug = 1 in config.txt). I'm programming in c I've seen something called mailboxes of arm processor but the information is very confusing.

could you tell me if it is possible to know this by programming or reading system files.


thanks for the help.

-rst-
Posts: 1316
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: Hdmi detect in real time

Tue Feb 17, 2015 10:36 am

Maybe use 'system()' to run the command 'tvservice -s' and parse the output?
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Hdmi detect in real time

Tue Feb 17, 2015 11:34 am

-rst- wrote:Maybe use 'system()' to run the command 'tvservice -s' and parse the output?
The source for tvservice is available here.

Return to “C/C++”