autodetect capabilities of controller

* no need for pointer to uint8_t, use them directly
* make them non-const, since we detect them on run-time as compared to compile-time
* introduce get_caps function
* simplify stm32_read