Hi Gustavo,

On 10/6/23, Gustavo Soares <gustavo.felipesoa...@hotmail.com> 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:
> [cid:efd68788-44d6-4e3f-a528-ab0fb1e35f03] (print from nrf52_sx1509.c,
> nrf52_sx1509_pinscfg() method)
>
> My guess for what I should implement is to set the direction and option for
> every pin in PCF8575 and after that write bytes to those I set as outputs,
> is it correct?
> what exactly does IOEXP_SETOPTION() do?
>

Yes, I think you are moving on!

The best way to search for NuttX documentation is looking the source
code (all NuttX source code has a lot of documentation embedded on it)

I use this command to find my direction:

$ git grep IOEXP_SETOPTION

So, it will return:

include/nuttx/ioexpander/ioexpander.h: * Name: IOEXP_SETOPTION
include/nuttx/ioexpander/ioexpander.h:#define
IOEXP_SETOPTION(dev,pin,opt,val)
((dev)->ops->ioe_option(dev,pin,opt,val))

Please open this file and there you will find the comments explaining
what these macros do.

Best Regards,

Alan

Reply via email to