Copied QEI driver to chibios