Spidev different ioctl structure
Andre.Nahrwold at dlr.de
Andre.Nahrwold at dlr.de
Fri Apr 23 13:29:40 UTC 2021
Hello,
I discovered that the Spidev include (linux/spi/spidev.h) contains different implementations of the ioctl structure when comparing rtems and linux.
I used the mode value of the structure and wanted to compile the application for rtems and linux, that is where I got some errors.
A few further value names differ also: cs, word_delay_usecs, pad.
Does anybody now why there is this difference?
Or is it not necessary to use the mode value for the ioctl commands?
On rtems it looks like this:
struct spi_ioc_transfer {
void *rx_buf;
const void *tx_buf;
size_t len;
uint32_t speed_hz;
uint16_t delay_usecs;
uint8_t bits_per_word;
uint8_t cs_change;
uint8_t rx_nbits;
uint8_t tx_nbits;
uint32_t mode;
uint8_t cs;
};
On linux it looks like this:
struct spi_ioc_transfer {
__u64 tx_buf;
__u64 rx_buf;
__u32 len;
__u32 speed_hz;
__u16 delay_usecs;
__u8 bits_per_word;
__u8 cs_change;
__u8 tx_nbits;
__u8 rx_nbits;
__u8 word_delay_usecs;
__u8 pad;
};
Best regards
Andre Nahrwold
--------------------------
Deutsches Zentrum für Luft- und Raumfahrt e. V. (DLR)
German Aerospace Center
Institute for Software Technolog | SRV-OSS BS | Lilienthalpl. 7 | 38108 Braunschweig | Geb. 112C Raum 001
M.Sc. Andre Nahrwold | Telephone +49 531 295-3834 | andre.nahrwold at dlr.de
DLR.de
More information about the users
mailing list