You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/01/16 19:44:10 UTC

[GitHub] andrzej-kaczmarek commented on issue #291: nimble/ll: Add API to set controller public address

andrzej-kaczmarek commented on issue #291: nimble/ll: Add API to set controller public address
URL: https://github.com/apache/mynewt-nimble/pull/291#issuecomment-454913504
 
 
   We should not make any new calls to Mynewt HAL in LL since this won't be portable. The function name of course can be non-HAL but then there's problem with weak functions which do not work well in Mynewt (and possible other OS-es) since packages are first linked to static libraries and then they are linked into final binary so our weak symbol in LL package won't be overridden by strong symbol from other package. So while I agree that it would be nice to just fetch address automatically from LL, I do not yet see how this could be done in a clean way which works reliably.
   
   With new API things are simple and for generic BSP-s we just need to put this call inside `#ifdef MYNEWT_VAL(BLE_DEVICE)` so it does not get called when LL is not available. For custom BSP-s I think it's just like any other hw available, i.e. if you have sensor in your device then you just call `os_dev_create` in `hal_bsp_init` and now just do the same if your design uses LL.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services