Re: [riot-devel] Driver design rules in RIOT

2018-09-26 Thread Oleg Hahm
Hi Juan! Just a small comment: On Wed, Sep 26, 2018 at 12:16:08PM +0200, Juan Ignacio Carrano wrote: > Maybe off topic, but I think we need a IO layer (think SAUL, but more > complete) so that the user does not have to directly interact with drivers. > I would answer many of your questions, as

Re: [riot-devel] Driver design rules in RIOT

2018-09-26 Thread Gunar Schorcht
Hi Juan, thank you for your very comprehensive answer, which gives another view on the use of drivers from a developer who is obviously interested in very accurate results :-) Obviously, there are two different groups of application developers that should be supported by a driver interface: 1.

Re: [riot-devel] Driver design rules in RIOT

2018-09-26 Thread Matthias Waehlisch
On Wed, 26 Sep 2018, Gunar Schorcht wrote: > Unfortunaly, it seem not to be reachable from the top level wiki page or > problems of wiki, where information kills itself ;). Done: https://github.com/RIOT-OS/RIOT/wiki#general-hints Cheers matthias -- Matthias Waehlisch . Freie

Re: [riot-devel] Driver design rules in RIOT

2018-09-26 Thread Hauke Petersen
Hej, On 09/26/2018 12:16 PM, Juan Ignacio Carrano wrote: Hi Gunar, I'm not very experienced on the driver development side, but enough as a user to see some issues. On 9/26/18 9:27 AM, Gunar Schorcht wrote: - Should a driver be as complete as possible, which of cource produces more code,

Re: [riot-devel] Driver design rules in RIOT

2018-09-26 Thread Alexandre Abadie
- Le 26 Sep 18, à 13:44, Gunar Schorcht gu...@schorcht.net a écrit : > Cool, that's exactly what I was looking for. > > Unfortunaly, it seem not to be reachable from the top level wiki page or > I missed it. The only way to find is to use a search engine. Maybe it could be moved in a

Re: [riot-devel] Driver design rules in RIOT

2018-09-26 Thread Hauke Petersen
Hi Pekka, that would indeed be something very desirable. Would you mind maybe just dumping this as TODO at the end of the wiki page? Then this is 'documented' and is not forgotten in the depth of the devel list :-) Thanks and cheers, Hauke On 09/26/2018 01:34 PM, Nikander Pekka wrote: How

Re: [riot-devel] Driver design rules in RIOT

2018-09-26 Thread Gunar Schorcht
Cool, that's exactly what I was looking for. Unfortunaly, it seem not to be reachable from the top level wiki page or I missed it. The only way to find is to use a search engine. On 26.09.2018 13:31, Hauke Petersen wrote: > Hi, > > long done :-) > > See >

Re: [riot-devel] Driver design rules in RIOT

2018-09-26 Thread Nikander Pekka
How about adding some information about how to handle multiple threads, when to use mutexes, and how to deal with interrupts? :-) And especially patterns for being nice from other threads and power consumption point of view... --Pekka On 26.9.2018, at 14:31, Hauke Petersen

Re: [riot-devel] Driver design rules in RIOT

2018-09-26 Thread Hauke Petersen
Hi, long done :-) See https://github.com/RIOT-OS/RIOT/wiki/Guide:-Writing-a-device-driver-in-RIOT Cheers, Hauke On 09/26/2018 11:11 AM, Emmanuel Baccelli wrote: Hi there, based on this exchange, is there matter for a wiki page on this? (Or for alternative documentation, e.g. reviving the

Re: [riot-devel] Driver design rules in RIOT

2018-09-26 Thread Emmanuel Baccelli
Hi there, based on this exchange, is there matter for a wiki page on this? (Or for alternative documentation, e.g. reviving the concept of RDM [1] ?) Best Emmanuel [1] https://github.com/RIOT-OS/RIOT/pull/6191 On Wed, Sep 26, 2018 at 11:38 AM Gunar Schorcht wrote: > Hi Hauke, > > many

Re: [riot-devel] Driver design rules in RIOT

2018-09-26 Thread Gunar Schorcht
Hi Hauke, many thanks for your comprehensive and clearifying answers. Most of them met my thoughts about driver design. >> - Should a driver support at least data-ready interrupts (if possible at >> all) to realize event-driven data retrieval? > If the driver comes with a 'full/extra'

Re: [riot-devel] Driver design rules in RIOT

2018-09-26 Thread Hauke Petersen
Hi everyone, for documentation purposes a quote from a private mail that I wrote Gunar earlier today (at that point I was not aware of this email...): ``` Maybe one think that could (or even should?!) be considered: try to make very specialized features optional (e.g. via "sub-moduling"

[riot-devel] Driver design rules in RIOT

2018-09-26 Thread Gunar Schorcht
Hi, I wrote a series of sensor drivers for esp-open-rtos/ESP-IDF, for example for different ST sensors, the BME680, the CCS811 or the SHT3x. I would like to port some of these drivers to RIOT OS. All the drivers are quite complex as they try to cover all the features of the sensors. I have seen