vcgencmd
Currently C header files and libraries for many of the Broadcom APIs are located in /opt/vc/include and /opt/vc/lib respectively, or available from GitHub within the same directory structure.
1.
tux@slitaz:~$ vcgencmd version
Oct 25 2012 16:37:21
Copyright (c) 2012 Broadcom
version 346337 (release)
2.
tux@slitaz:~$ vcgencmd measure_temp
temp=48.2'C
tux@slitaz:~$ cat /sys/class/thermal/thermal_zone0/temp
47615
3.
tux@slitaz:~$ dmesg | grep vchiq
[ 0.821732] vcos: [1]: vchiq_init_state: slot_zero = 0xffd80000, is_master = 0
[ 0.822159] vcos: [1]: vchiq_init_state: called
[ 0.823157] vcos: [1]: vchiq: initialised - version 2 (min 2), device 251.0
tux@slitaz:~$ ls -l /dev/vchiq
crw-rw---T 1 root video 251, 0 Dec 23 12:00 /dev/vchiq
4.
tux@slitaz:~$ ls /opt/vc/*bin
/opt/vc/bin:
edidparser tvservice vcdbg vcgencmd vchiq_test
/opt/vc/sbin:
install_vmcs vcfiled
tux@slitaz:~$
5.
tux@slitaz:~$ \
> for src in arm core h264 isp v3d uart pwm emmc pixel vec hdmi dpi ; do \
> echo -e "$src:\t$(vcgencmd measure_clock $src)" ; \
> done
arm: frequency(45)=700000000
core: frequency(1)=250000000
h264: frequency(28)=0
isp: frequency(42)=0
v3d: frequency(43)=0
uart: frequency(22)=3000000
pwm: frequency(25)=0
emmc: frequency(47)=100000000
pixel: frequency(29)=119000000
vec: frequency(10)=0
hdmi: frequency(9)=163683000
dpi: frequency(4)=0
6.
tux@slitaz:~$ \
> for id in core sdram_c sdram_i sdram_p ; do \
> echo -e "$id:\t$(vcgencmd measure_volts $id)" ; \
> done
core: volt=1.20V
sdram_c: volt=1.20V
sdram_i: volt=1.20V
sdram_p: volt=1.23V
7.
tux@slitaz:~$ \
> for codec in H264 MPG2 WVC1 ; do \
> echo -e "$codec:\t$(vcgencmd codec_enabled $codec)" ; \
> done
H264: H264=enabled
MPG2: MPG2=disabled
WVC1: WVC1=disabled
tux@slitaz:~$