http://mbed.org/users/tomlankhorst/code/HIDScope/#eade4ec5282b