write Characteristic Compat
fun BluetoothGatt.writeCharacteristicCompat(characteristic: BluetoothGattCharacteristic, payload: ByteArray, writeType: Int): Int
Wraps BluetoothGatt.writeCharacteristic in an SDK version agnostic API.
On SDK versions prior to Build.VERSION_CODES.TIRAMISU, we are forced to use the old version of this API which had memory safety issues.