ArduinoBLE icon indicating copy to clipboard operation
ArduinoBLE copied to clipboard

Definition for known format types.

Open mklemarczyk opened this issue 2 years ago • 5 comments

To simplify usage of the ArduinoBLE, I added the definitions for format types. In the future I would like to add also known services and characteristics uuid codes.

I check with the Arduino compiler that the definitions are included in result binary only if they are used by the code. So no extra space will be taken, Please review and tell what do you think about the idea. I find it more useful than searching the internet for proper values.

I has been forced to use char type, as Description constructor does not accept the uint8_t type as input for value. BLEDescriptor::BLEDescriptor(const char* uuid, const uint8_t value[], int valueSize) BLEDescriptor::BLEDescriptor(const char* uuid, const char* value)

mklemarczyk avatar Apr 06 '22 20:04 mklemarczyk

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 06 '22 20:04 CLAassistant

IMHO would it look better if these were snake_case rather than CamelCase, and made to resemble the C99 standard:

BleUint8 -> ble_uint8_t BleInt8 -> ble_int8_t BleUint64 -> ble_uint64_t

etc.

But probably irrelevant for this.

rmlearney-digicatapult avatar Jun 24 '22 11:06 rmlearney-digicatapult

It is a constant for a value, you can not declare those types in the code. Will it not create a confusion with the value types form C99 ? The current naming follows the other constants like BLEEncryption, BLERead.

I would like to ask if there is a concern for merge that PR that I can address? It is waiting quite a long time.

mklemarczyk avatar Jun 24 '22 13:06 mklemarczyk

@facchinm You do not want this change? There are several PRs waiting, and no comment or merged.

mklemarczyk avatar Sep 14 '22 13:09 mklemarczyk

Bump, any answer on the integration ? I wonder why it takes so long...

mklemarczyk avatar Jun 11 '23 10:06 mklemarczyk