FreeJoy is project of game-devices controller based on STM32 BluePill board. There are a variaty of options how to configure your device - this project can cover almost all functions present in game controllers