mynewt-core
mynewt-core copied to clipboard
Add generic API to retrieve provisioned data from BSP
@ccollins476ad @wes3 you're right, this is too confusing. my intention was to allow to read some data even if app uses some buffer of hardcoded length and it's too small, but this does not really make sense as incomplete data are not really useful... I changed this API to return data length as previously, but if buffer is too small it will always return an error. so caller does not need to check for truncation since this won't happen.
also I included some code in common hal_bsp.c so each BSP does not need to implement it (i.e. c&p...)
I keep this as a draft for now since I am still not really sure if this does what I would expect, so any comments regarding usability of this API are welcome :)