refactored usb mass storage device code so that it ties in with the normal HAL and is used commonly by both sets of sample code