Updates Usage Docs And Shuffles Around Where Device Gets Configured#51
Updates Usage Docs And Shuffles Around Where Device Gets Configured#51
Conversation
c2577e0 to
a9bd22e
Compare
towynlin
left a comment
There was a problem hiding this comment.
I like the direction, but it seems there's more work to do.
| // is called should be placed here (application specific), the below | ||
| // function call is a must in order to inform L2 that an event must be | ||
| // handled | ||
| bm_l2_handle_device_interrupt(); |
There was a problem hiding this comment.
It looks like this should change to bristlemouth_handle_network_device_interrupt which would allow us to remove the l2.h include above, right?
| register_device_interrupt(network_device_interrupt); | ||
|
|
||
| // Information about the device must be configured | ||
| DeviceCfg device = { |
There was a problem hiding this comment.
Are you planning to introduce a change to allow bm_core to set a bristlemouth version? If so, in this PR or a different PR?
There was a problem hiding this comment.
I believe a different PR.
There is going to be some internal discussion to determine if we want to add that to the info message or create a new message in itself.
If we make a new message it will be a new PR.
Depending on the direction we end up going, it may be best to leave this PR open until we discuss further.
| // ... your other setup code... | ||
|
|
||
| BmErr err = bristlemouth_init(network_device_power_callback); | ||
| BmErr err = bristlemouth_init(network_device_power_callback, device); |
There was a problem hiding this comment.
👍 Yes I do like this. I think implementors should only have to call one init function and should only have to include one header.
Device configuration (device_init) should not be an API that the user must call so the struct should be passed into the bristlemout_init function Updates docs to reflect this
16e8b30 to
9a67bc0
Compare
Device configuration (device_init) should not be an API that the user must call so the struct should be passed into the bristlemout_init function
Updates docs to reflect this change
@towynlin please let me know if you like this, otherwise the user would have to call device_init in their application.