bjoernQ / bleps

A toy-level BLE peripheral stack
MIT License
55 stars 18 forks source link

How to create real dynamic attributes without unsafe? #7

Closed katyo closed 1 year ago

katyo commented 1 year ago

I have no problems with writing attribute from received raw data in write_function but I haven't know how return non-static &[u8] from a read_function.

bjoernQ commented 1 year ago

I think with the current API this wouldn't be really possible (without unsafe and a static buffer). The API should probably get changed to enable this.

This originally just started as a crate used by the examples in the esp-wifi repository but since it seems to be useful for others the API should be changed in a way to enable this use-case