Modifications

Sauter à la navigation Sauter à la recherche
199 octets ajoutés ,  12 octobre 2013 à 21:16
Ligne 27 : Ligne 27 :  
  int wiringPiSPISetup(int channel, int speed);
 
  int wiringPiSPISetup(int channel, int speed);
   −
This is the way to initialise a channel (The Pi has 2 channels; 0 and 1). The speed parameter is an integer in the range 500,000 through 32,000,000 and represents the SPI clock speed in Hz.
+
C'est la façon dont il faut initialiser un canal SPI (le Pi dispose de 2 canaux; 0 et 1).  
   −
The returned value is the Linux file-descriptor for the device, or -1 on error. If an error has happened, you may use the standard errno global variable to see why.
+
Paramètres:
 +
* '''channel''': Le canal SPI à initialiser.
 +
* '''speed''': la vitesse du canal SPI. Un entier (''integer'') dont la valeur varie entre 500,000 et 32,000,000 et représente la vitesse d'horloge du bus SPI en Hz.
 +
 
 +
La valeur retournée est un ''file descriptor'' Linux correspondant au périphérique. En cas d'erreur, c'est -1 qui est retourné en qui est retourné et la variable globale ''errno'' est initialisée avec un code d'erreur standard.
    
=== wiringPiSPIDataRW ===
 
=== wiringPiSPIDataRW ===
29 917

modifications

Menu de navigation