thanks Mark.
The guide is for I2C, but I guess I can do something similar for SPI.
Please correct me if I am wrong: I need to create a TABLE with SPI parameters, buffers, callback etc. Open the connection (fnOpen) that returns the PortID. And I need to define my callback to manage the received data.
I was expecting that part of this, such as the SPI_TABLE struct and the callback were already implemented or that I could use something similar to the SPI master config
INITIALISE_SPI_SD_INTERFACE() POWER_UP(4, SIM_SCGC4_SPI0); \
_CONFIG_PERIPHERAL(B, 0, PB_0_SPI0_SCK); \
_CONFIG_PERIPHERAL(A, 7, (PA_7_SPI0_MOSI | PORT_SRE_FAST | PORT_DSE_HIGH)); \
_CONFIG_PERIPHERAL(A, 6, (PA_6_SPI0_MISO | PORT_PS_UP_ENABLE)); \
_CONFIG_DRIVE_PORT_OUTPUT_VALUE(A, SPI_CS1_0, SPI_CS1_0, (PORT_SRE_FAST | PORT_DSE_HIGH));\
SPI0_C1 = (SPI_C1_CPHA | SPI_C1_CPOL | SPI_C1_MSTR | SPI_C1_SPE); \
SPI0_BR = (SPI_BR_SPPR_PRE_4 | SPI_BR_SPR_DIV_2); \
(void)SPI0_S; (void)SPI0_D;