updated the code for 2.6.x branch chibios