mynewt-core icon indicating copy to clipboard operation
mynewt-core copied to clipboard

Add generic API to retrieve provisioned data from BSP

Open andrzej-kaczmarek opened this issue 5 years ago • 2 comments

andrzej-kaczmarek avatar Feb 12 '20 21:02 andrzej-kaczmarek

@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 :)

andrzej-kaczmarek avatar Feb 14 '20 15:02 andrzej-kaczmarek

Style check summary

No suggestions at this time!

apache-mynewt-bot avatar Feb 14 '20 15:02 apache-mynewt-bot