Function to enable and disable encryption requirements as a whole.
The original Arduino BLE library uses uint8_t for characteristic properties, and the new uses the same bits for the properties but changes the type to uint16_t to allow for BLE permissions too. If uint8_t is passed to the new uint16_t then the 8 MSBs may become undefined leading to unpredictable behaviour.
Will the compiler catch this to prevent the issue?
Does there need to be another location to define permissions? I.e. revert to uint8_t for properties & add new constructor,
Use uint16_t as is & add function to prevent encryption / auth checks.
I think the third is the most stable but if the compiler will warn developers putting uint8_t into uint16_t then this doesn’t need to happen.
Function to enable and disable encryption requirements as a whole.
The original Arduino BLE library uses uint8_t for characteristic properties, and the new uses the same bits for the properties but changes the type to uint16_t to allow for BLE permissions too. If uint8_t is passed to the new uint16_t then the 8 MSBs may become undefined leading to unpredictable behaviour.
I think the third is the most stable but if the compiler will warn developers putting uint8_t into uint16_t then this doesn’t need to happen.