I would recommend looking at open source mining software that supports X11 or software you can bake X11 support into, however as X11 is now ASIC based writing software to mine X11 on a CPU or GPU wouldn't be worth the time unless for a hobby. If you are writing code for mining hardware (ASIC) then take a look at X11 based firmware and start from there. Assuming you are using existing ASIC hear use a stock image as a starting point. If you are making your own ASIC, you can code the controller and hashing software it will use.