Hi Alan, yes of course, moving to include/nuttx/1wire/1wire_master.h also means splitting into different header files 1wire_master.h 1wire_slave.h and so on. Maybe juha doesn't knew if this is 1wire specific. I think the fact that only maxim integrated/or dallas provides chips for the 1wire bus it is a quasi-standard. ;) At least I didn't found 1wire chips from other vendors.
Marco Am Sa., 3. Apr. 2021 um 15:47 Uhr schrieb Alan Carvalho de Assis < acas...@gmail.com>: > Hi Marco, > > This code was submitted by Juha, maybe he has some rational why it was > put there. > > In fact the structures and functions definition seam to be generic and > should be at include/ > > But, including that file inside 1wire_master.h is not correct, because > it was has slaves definition. > > BR, > > Alan > > On 4/3/21, Marco <ocram.lh...@gmail.com> wrote: > > Hi > > > > I currently working on a sensor driver for a temperature sensor DS18B20 > > connected on a 1wire bus. > > > > It seems to be that logic exists under drivers/1wire/1wire.c that > provides > > a common mechanism to select a sensor on the bus by their unique rom > code. > > I'm not quite sure if that procedure is specific for sensors from vendor > > maxim integrated or if it's 1wire specific. But the interface for that > > implementation is under drivers/1wire/1wire_internal.h at the moment. > > When this implementation is 1wire specific, I would ask if we can move > the > > interface specification to include/nuttx/1wire/1wire_master.h > > I would expect something similar to the i2c interface. > > Currently, I can't use the logic because of restricted access to that > > interface from the sensors subdirectory. > > > > Marco > > >