Re: PCF8575 driver for NuttX

2023-10-07 Thread Michal Lenc
Hi, Perhaps I am too late to the discussion and some of those stuffs were already said but I use PCF8575 on a custom board so I think a can help a bit with that. > I'm trying to access the PCF8575 device from my application on NuttX to make it light up LEDs. I'm not really sure how to

Re: PCF8575 driver for NuttX

2023-10-06 Thread Alan C. Assis
Hi David, On 10/6/23, David S. Alessio wrote: >>> In a quick search I noticed that i2c_vbus_initialize() never was part of NuttX, >>> >>> OK, that’s not good. What’s the best way to submit it now? >>> >> >> No idea, I think this function is something you created for your project. >>

Re: PCF8575 driver for NuttX

2023-10-06 Thread David S. Alessio
>> >>> In a quick search I noticed that i2c_vbus_initialize() never was part >>> of NuttX, >> >> OK, that’s not good. What’s the best way to submit it now? >> > > No idea, I think this function is something you created for your project. > > How is i2c_vbus_initialize() defined in your source

Re: PCF8575 driver for NuttX

2023-10-06 Thread Alan C. Assis
Hi David, On 10/6/23, David S. Alessio wrote: > >> In a quick search I noticed that i2c_vbus_initialize() never was part >> of NuttX, > > OK, that’s not good. What’s the best way to submit it now? > No idea, I think this function is something you created for your project. How is

Re: PCF8575 driver for NuttX

2023-10-06 Thread Alan C. Assis
Hi Gustavo, On 10/6/23, Gustavo Soares wrote: > Hi, Alan and David! > > I'm using nrf52_sx1509.c (at boards/arm/nrf62/thingy52/src) as model for my > driver. I've attached what I have wrote so far and I'd like to know if you > could tell me if I'm at the right direction: >

Re: PCF8575 driver for NuttX

2023-10-06 Thread David S. Alessio
> In a quick search I noticed that i2c_vbus_initialize() never was part > of NuttX, OK, that’s not good. What’s the best way to submit it now?

RE: PCF8575 driver for NuttX

2023-10-06 Thread Gustavo Soares
: Alan C. Assis Enviado: sexta-feira, 6 de outubro de 2023 10:36 Para: dev@nuttx.apache.org Assunto: Re: PCF8575 driver for NuttX Hi David, In a quick search I noticed that i2c_vbus_initialize() never was part of NuttX, maybe it is something you created to abstract from different MCUs initialization

Re: PCF8575 driver for NuttX

2023-10-06 Thread Alan C. Assis
Hi David, In a quick search I noticed that i2c_vbus_initialize() never was part of NuttX, maybe it is something you created to abstract from different MCUs initialization. I think we can use some similar (a generic function) to create a boards/common/ directory to keep all I2C, SPI, devices

Re: PCF8575 driver for NuttX

2023-10-05 Thread David S. Alessio
Hi, Alan, I don’t see my I2C virtual bus driver code in the current repo. I’m not sure what happened, but I’d like to [re-] submit it. Can you point me to how that’s done today? (I’m sure email won’t work). The problem I see with the existing IOEXPANDER code is that I don’t believe it’s

Re: PCF8575 driver for NuttX

2023-10-05 Thread Alan C. Assis
Hi David, I think you figure out Gustavo's mistake. Gustavo, all you need to do is use the existing driver. In your code you was trying to implement a low level driver to communicate with your PCF8575. You don't need to do it. Unfortunately there is not much boards examples using IOEXPANDER

Re: PCF8575 driver for NuttX

2023-10-04 Thread Gregory Nutt
On 10/4/2023 8:02 PM, Gustavo Soares wrote: Hi Greg! Yes, if I use #include this problem is solved, but then the code loses the reference to that specific struct causing another error. And how exactly "the file does not exist"? I can open it and it is at the nuttx repo, I shared it's link.

Re: PCF8575 driver for NuttX

2023-10-04 Thread Gregory Nutt
Actually, the problem is very simple.  This file does not exist. #include You probably wanted #include The more I look at what you are trying to do, the more confused I get. There is a file at drivers/ioexpander/pcf8575.h, but you are not permitted to include that.  That contains

Re: PCF8575 driver for NuttX

2023-10-04 Thread Gustavo Soares
_ From: Gregory Nutt Sent: Wednesday, October 4, 2023 10:52:32 PM To: dev@nuttx.apache.org Subject: Re: PCF8575 driver for NuttX >>> Why wouldn't the compiler access nuttx/drivers/ioexpander/pcf8575.h? >>> >> Access to internal driver files by applications is specif

Re: PCF8575 driver for NuttX

2023-10-04 Thread Gregory Nutt
Why wouldn't the compiler access nuttx/drivers/ioexpander/pcf8575.h? Access to internal driver files by applications is specifically forbidden.  This is part of the enforcement of the modular design to assure that people do not do that kind of thing:  Applications must not have access to

Re: PCF8575 driver for NuttX

2023-10-04 Thread Gregory Nutt
Why wouldn't the compiler access nuttx/drivers/ioexpander/pcf8575.h? Access to internal driver files by applications is specifically forbidden.  This is part of the enforcement of the modular design to assure that people do not do that kind of thing: Applications must not have access to

Re: PCF8575 driver for NuttX

2023-10-04 Thread Gregory Nutt
On 10/4/2023 7:02 PM, Gustavo Soares wrote: Why wouldn't the compiler access nuttx/drivers/ioexpander/pcf8575.h? Access to internal driver files by applications is specifically forbidden.  This is part of the enforcement of the modular design to assure that people do not do that kind of