bjoernQ / bleps

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

Turn AttData into trait and optimize response encoding #9

Closed katyo closed 1 year ago

katyo commented 1 year ago

I propose refusing AttData enum in favor of AttData trait. The trait-based solution is quite useful for users which needs own way to access attribute data. I implemented such trait for byte slices and arrays, static sized values, and tuples of functions. Also I made many fixes to avoid unnecessary data copying when creating responses.

katyo commented 1 year ago

Solves #7

bjoernQ commented 1 year ago

Do you consider this as complete now? Hopefully will get to reviewing this today - latest tomorrow morning

katyo commented 1 year ago

@bjoernQ Of course. I tested it with esp32c3-based device. But I'm not sure, seems notifications still does not work.