qmk-firmware/drivers/encoder
..
encoder_quadrature.c