Beagle bone black

On BeagleBoneBlack , speed up digitalRead() & digitalWrite().
Change to the way directly writing or reading gpio registers.