Hi Bernd,

Yes, I think the current implementation is fixed to allow only 1 CS
per RP2040 SPI.

That is not ideal (read: "incorrect").

It is possible to have the rp2040_spi.c as a common boards file, but
the CS should be extended, i.e.:

#if defined(LCDxyz) || defined(LCDwku) ...
  rp2040_gpio_put(BOARD_RP2040_SPI0_DISPLAY_CS, !selected);
#endif

#if defined(AUDIOCODECtqj) || defined(AUDIOCODECcnp) ...
  rp2040_gpio_put(BOARD_RP2040_SPI0_AUDIO_CS, !selected);
#endif

etc...

This way the common rp2040_spi.c file could support many more devices
than current implementation.

BR,

Alan

On 9/15/22, Bernd Walter <ti...@cicely7.cicely.de> wrote:
> A recent change (e8f4d74ad0c33389c1094c3ca6c10a6336d8fbe7) moved the
> individual rp2040_spi.c into the common directory.
> How can a board with different chip select GPIO usage have a board
> specific setup?
> I don't see a way to disable the common implementation.
>
> --
> B.Walter <be...@bwct.de> https://www.bwct.de
> Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
>

Reply via email to