-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
intended form of zero in bitfields? #5
Comments
I've usd CharacteristicEvent::empty() but ... is that really the best way? |
sure! that's perfectly fine. I didn't read up on bitfields enough toknow that the zeros could be put in them too, I'm pretty new to rust :) |
Were you going to add this to the module? or just show how I could do it in general? Should also apply to CharacteristicPermission as well? Looking at AN5270 for ACI_GATT_ADD_CHAR, it should get 0s defined for CharacteristicProperty, CharacteristicPermission, CharacteristicEvent, For ACI_GATT_ADD_CHAR_DESC, there's 0, and some higher numbers missing from DescriptorPermission, AccessPermission For ACI_GATT_UPDATE_CHAR_VALUE_EXT, the 0 should be added to UpdateType I can make a PR for this is you'd prefer? |
Sure, go ahead! That would be great! |
Based on AN5270rev10 For ACI_GATT_ADD_CHAR, added the "NONE" properties, and the "NO_NOTIFY" gatt event mask. For ACI_GATT_ADD_CHAR_DESC, reused the same security bitflags, and extended the access bitflags. Signed-off-by: Karl Palsson <[email protected]> Fixes: eupn#5
Based on AN5270rev10 For ACI_GATT_ADD_CHAR, added the "NONE" properties, and the "NO_NOTIFY" gatt event mask. For ACI_GATT_ADD_CHAR_DESC, reused the same security bitflags, and extended the access bitflags. Signed-off-by: Karl Palsson <[email protected]> Fixes: eupn#5
Based on AN5270rev10 For ACI_GATT_ADD_CHAR, added the "NONE" properties, and the "NO_NOTIFY" gatt event mask. For ACI_GATT_ADD_CHAR_DESC, reused the same security bitflags, and extended the access bitflags. Signed-off-by: Karl Palsson <[email protected]> Fixes: eupn#5
Hi,
I'm porting some code that sets the characteristic event flags. This is the following in C,
In the rust package, it's a bitfield: https://github.com/eupn/stm32wb55/blob/master/src/command/gatt.rs#L1565
What's the "intended" way of writing this, when you want to use the "zero" form? You can use a literal 0, but that's not as clear as the "CharacteristicEvent::NO_NOTIFY" or similar?
The text was updated successfully, but these errors were encountered: