how to measure voltage rail on beaglebone black

Hello , anyone know if there is any code to measure voltage power of BBB ?

For example arduino has this one :

https://code.google.com/p/tinkerit/wiki/SecretVoltmeter

The (half) board voltage is connected on board to the ADC subsystem @ channel AIN-7. Just read that samples. (I wrote libpruio for that purpose, see examples io_input or oszi.)