The spi_setcfg() function sets the configuration for a specific device on the SPI bus. The prototype for this function is:
int spi_setcfg( int fd, uint32_t device, spi_cfg_t *cfg );
The arguments are:
typedef struct { uint32_t mode; uint32_t clock_rate; } spi_cfg_t;
The possible mode settings are defined in <hw/spi-master.h>.
This function returns EOK if the configuration is successful.