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/12/11 22:12:58 UTC

[GitHub] [mynewt-nimble] redradist edited a comment on issue #697: Added extra argument to sync and reset collback to simplify building C++ Wrapper

redradist edited a comment on issue #697: Added extra argument to sync and reset collback to simplify building C++ Wrapper
URL: https://github.com/apache/mynewt-nimble/pull/697#issuecomment-564756976
 
 
   > would be good if you could explain what is the use case related to this change...
   
   Use-case is pretty simple:
   
   `
   Wrapper::Wrapper() {
   ...
     ble_hs_cfg.reset_cb = &NimBleController::onResetCallback;
     ble_hs_cfg.reset_cb_arg = this;
   ...
   }
   
   void Wrapper::onResetCallback(int _reason, void *arg) {
     reinterpret_cast<Wrapper*>(arg)->onResetHandler(_reason);
   }
   
   void Wrapper::onResetHandler(int _reason) {
     ...
   }
   `

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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