I will read from the chip using the driver and then I will send the data through BLE to the central
- I wrote the code to send the data over BLE

I believe that I used wrong terminology.. I want to write a library and not a driver.. Actually I want to communicate with this particular chip and send the data over BLE
This is a library example I found
GitHub - svcguy/lib-BQ27421: A library based on STM32 CubeMX HAL drivers for interfacing with the Texas Instruments BQ27421 Fuel Gauge IC

I want to write something similar with that from scratch, that's why I'm asking if there are any general rules/guidelines I sould follow.