Though I guess we still have the issue of wanting to 'own' the allocated
structures outside of the driver..

On Thu, Mar 1, 2018 at 10:36 AM, Jacob Rosenthal <[email protected]>
wrote:

> Frankly something like
> pkg.init.DRV2605_OFB
>    drv2605_init 500
>
>  here would allow us to remove sensor creator entirely
>
> ideally supporting multiple pkg.init conditionals
>
> pkg.init.DRV2605_CLI:
>    drv2605_shell_init 501
>
>
> On Thu, Mar 1, 2018 at 9:23 AM, marko kiiskila <[email protected]> wrote:
>
>> +1 on using sysinit
>>
>> > On Mar 1, 2018, at 6:18 PM, Jacob Rosenthal <[email protected]>
>> wrote:
>> >
>> > shell_init in the app feels odd.
>> > https://github.com/apache/mynewt-core/blob/master/apps/senso
>> rs_test/src/main.c#L411
>> >
>> > It feels like they should be down in the drivers pkg.init, especially
>> > theyre defined down in the driver's syscfg
>> > https://github.com/apache/mynewt-core/blob/master/hw/drivers
>> /drv2605/syscfg.yml#L21
>> >
>> > My ideal world would probably be something conditional like
>> > pkg.init.DRV2605_CLI:
>> >   drv2605_shell_init 501
>> >
>> > but that would need newt tool changes I presume.
>> >
>> > Uglier, but we could make some new second init function which does
>> #ifdef
>> > and calls drv2605_shell_init
>> >
>> > pkg.init:
>> > drv2605_init_thesecond
>> >
>> > Thoughts (especially from vipul)
>>
>>
>

Reply via email to