typedef struct { CTL_STATUS_t (*configure_controller)(int); CTL_STATUS_t (*claim_pins)(int , const PLATFORM_PIN_CONFIGURATION_t *, PLATFORM_PIN_CLAIM_t); CTL_SPI_BUS_t *(*controller)(int); } PLATFORM_PRIVATE_SPI_METHODS_t;
PLATFORM_PRIVATE_SPI_METHODS_t contains the methods required to configure an SPI bus. The first parameter of each method is the index of the device SPI bus to configure rather than the index of the Platform SPI bus. For instance, platform SPI bus with index 0 may well be implemented using the device SPI bus SPI2, in which case the index will be 2.