updated for mbed-os 5.5

Fork of Task121 by Nicholas Outram