Synopsis
void ctl_transport_initialize_spi(CTL_TRANSPORT_t *self,
                                  CTL_SPI_DEVICE_t *dev,
                                  int big_endian);
Description

ctl_transport_initialize_spi initializes the transport self to address the SPI device dev when reading and writing registers.

big_endian specifies the byte order of multi-byte registers; if big_endian is non-zero, consecutive byte registers comprising a multi-byte register are in big-endian (network) byte order, otherwise they are in little-endian (PC) byte order.

The methods read_registers and write_registers of the transport are initialized to methods that immediately return a failure because there is no consensus or standard for reading and writing device registers over SPI. In this case, the client must provide its own register access methods after the transport is initialized.