09.11.2012 Views

Contents - Raspberry PI Community Projects

Contents - Raspberry PI Community Projects

Contents - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

// initialise bcm_host<br />

bcm_host_init();<br />

// initialise vcos/vchi<br />

vcos_init();<br />

if (vchi_initialise(&vchi_instance) != VCHIQ_SUCCESS) {<br />

fprintf(stderr, "failed to open vchiq instance\n");<br />

exit(-2);<br />

}<br />

// create a vchi connection<br />

if ( vchi_connect( NULL, 0, vchi_instance ) != 0) {<br />

fprintf(stderr, "failed to connect to VCHI\n");<br />

exit(-3);<br />

}<br />

// connect to tvservice<br />

if ( vc_vchi_tv_init( vchi_instance, &vchi_connections, 1) != 0) {<br />

fprintf(stderr, "failed to connect to tvservice\n");<br />

exit(-4);<br />

}<br />

TODO: Deinitialization<br />

Samples<br />

vc_cec_*<br />

▪ rpi-output-swapper (https://github.com/adammw/rpi-output-swapper) Uses<br />

tvservice apis to power on HDMI or SDTV display in specific or preferred mode.<br />

The vc_cec A<strong>PI</strong>s allow programs to interface with the Consumer Electronics Control<br />

(CEC) (http://en.wikipedia.org/wiki/Consumer_Electronics_Control#CEC) host<br />

middleware on the system to send CEC packets, set strings for the middleware to autorespond<br />

to certain requests or override the middleware handling by adding custom<br />

callbacks.<br />

TODO: Samples/Howto<br />

vc_gencmd_*<br />

TODO<br />

EGL<br />

EGL (Native Platform Graphics Interface) (http://www.khronos.org/egl/) is an interface<br />

between Khronos rendering A<strong>PI</strong>s such as OpenGL ES or OpenVG and the underlying<br />

native platform. The <strong>Raspberry</strong> Pi supports EGL Version 1.4 (http://www.khronos.org/

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!