The [datasheet](https://files.waveshare.com/upload/5/51/CST816S_Datasheet_EN.pdf) doesn't include much helpful info (eg. registers), but [this repo](https://github.com/fbiego/CST816S) has documented the registers. There's a number of existing drivers around for inspiration. [This repo](https://github.com/NeoStormer/CircuitPython_CST816) has a CircuitPython driver, for example.