Re: ADC device not allowed multiple opens

2018-06-06 Thread will sanfilippo
Thanks for all the input. I will look at the adc driver in a bit more detail to see which option is best. My original thought was to do what you had done Andrzej: if the device is already opened, just return OK. But I will look at the various locks and such to determine if there will be issues

Re: ADC device not allowed multiple opens

2018-06-06 Thread Andrzej Kaczmarek
Hi, +1 for proper ref counting btw, trng_nrf52 already works this way except it does not check ref counter explicitly but OS_DEV_F_STATUS_OPEN flag instead. This is also already used in Mynewt as NimBLE host, controller and TinyCrypt can (depending on configuration) just open trng device on its

Re: ADC device not allowed multiple opens

2018-06-06 Thread will sanfilippo
Chris and Vipul: That does indeed seem to be a decent option! I will see if others chime in and if not, add that change. Thanks!!! > On Jun 6, 2018, at 1:32 PM, Vipul Rahane wrote: > > >> On Jun 6, 2018, at 1:01 PM, Christopher Collins wrote: >> >> On Wed, Jun 06, 2018 at 11:57:34AM

Re: ADC device not allowed multiple opens

2018-06-06 Thread Vipul Rahane
> On Jun 6, 2018, at 1:01 PM, Christopher Collins wrote: > > On Wed, Jun 06, 2018 at 11:57:34AM -0700, will sanfilippo wrote: >> Chris: >> >> I might be missing something here, but given that os_dev already has a >> reference count and that handles multiple folks opening/closing the device,

Re: ADC device not allowed multiple opens

2018-06-06 Thread Christopher Collins
On Wed, Jun 06, 2018 at 11:57:34AM -0700, will sanfilippo wrote: > Chris: > > I might be missing something here, but given that os_dev already has a > reference count and that handles multiple folks opening/closing the device, > does the underlying adc driver need a reference count itself? If

[DISCUSS] Release Apache Mynewt 1.4.0-rc1 and Apache NimBLE 1.0.0-rc1

2018-06-06 Thread Szymon Janc
Hi all, This thread is for any and all discussion regarding the release of Apache Mynewt 1.4.0 and Apache NimBLE 1.0.0. All feedback is welcome. -- pozdrawiam Szymon Janc

[VOTE] Release Apache Mynewt 1.4.0-rc1 and Apache NimBLE 1.0.0-rc1

2018-06-06 Thread Szymon Janc
Hello all, I am pleased to be calling this vote for the source release of Apache Mynewt 1.4.0 and Apache NimBLE 1.0.0. Apache Mynewt is a community-driven, permissively licensed open source initiative for constrained, embedded applications. Mynewt provides a real-time operating system, flash

Re: ADC device not allowed multiple opens

2018-06-06 Thread will sanfilippo
Chris: I might be missing something here, but given that os_dev already has a reference count and that handles multiple folks opening/closing the device, does the underlying adc driver need a reference count itself? If it just returned no error if opened again this would be fine. I do note

FINAL REMINDER: Apache EU Roadshow 2018 in Berlin next week!

2018-06-06 Thread sharan
Hello Apache Supporters and Enthusiasts This is a final reminder that our Apache EU Roadshow will be held in Berlin next week on 13th and 14th June 2018. We will have 28 different sessions running over 2 days that cover some great topics. So if you are interested in Microservices, Internet of

Re: ADC device not allowed multiple opens

2018-06-06 Thread Christopher Collins
On Wed, Jun 06, 2018 at 08:50:34AM -0700, will sanfilippo wrote: > Hello: > > I am not the most familiar with the ADC device so it is possible that it was > being used incorrectly but in any event I ran across something I wanted to > discuss. The call to os_dev_open() allows a device to be

ADC device not allowed multiple opens

2018-06-06 Thread will sanfilippo
Hello: I am not the most familiar with the ADC device so it is possible that it was being used incorrectly but in any event I ran across something I wanted to discuss. The call to os_dev_open() allows a device to be opened multiple times (there is a reference count there). However, the call to