Funzione SPIMaster_SetModeSPIMaster_SetMode Function
Intestazione: #include <applibs/spi.h>Header: #include <applibs/spi.h>
Imposta la modalità di comunicazione per un'interfaccia master SPI.Sets the communication mode for an SPI master interface.
int SPIMaster_SetMode(int fd, SPI_Mode mode);
ParametriParameters
fd
Il descrittore del file per l'interfaccia master SPI.fd
The file descriptor for the SPI master interface.mode
La modalità di comunicazione.mode
The communication mode.
Valore restituitoReturn value
Restituisce 0 per l'esito positivo o-1 per l'esito negativo, nel qual caso errno
verrà impostato sul valore di errore.Returns 0 for success, or -1 for failure, in which case errno
will be set to the error value.
Requisiti del manifesto dell'applicazioneApplication manifest requirements
Per accedere alle singole interfacce SPI, l'applicazione deve identificarle nel campo SpiMaster del manifesto dell'applicazione.To access individual SPI interfaces, your application must identify them in the SpiMaster field of the application manifest.