I have two dw1000 modules connected to my stm32 mcu. Looking at the code, i saw that function
int dwt_setlocaldataptr(unsigned int index)
can be useful for switching between the two. However, all file port.c, port.h and deca_spi.c seem hardcoded for just one SPI. Does anyone get a clean solution for the issue?
Indeed, DW1000 DecaDriver API is single chip oriented. There are no official releases of the driver with multiple chip support.
To add a multiple parallel chip support you need to pass the instance to the chip to all driver functions and have different spi drivers with ability to run in parallel.
Taking to the account the nature of the DW chip, which requires blocked operations, it is really hard to achieve speed improvements in a multiple chip solutions.
Anyway, if you still want parallel access to multiple chips, the easiest way for you is to wrap the DW1000 DecaDriver to the C++ class.