Core platform-independent code from Chan's FatFS http://elm-chan.org/fsw/ff/00index_e.html