Updated for ChibiOS 3.0