SysIo  1.9.0
Embedded Library and tools
Raspberry Pi

Detailed Description

Ce module fournit des éléments spécifiques au Raspberry Pi.

La numérotation logique SysIo des broches de GPIO est la suivante:

Connecteur J8 (Modèle A+, B+, 2B, 3B, Zero)


BCM SysIo Name Physical Name SysIo BCM
3V3 1 - 2 5V
2 8 I2C_SDA1 3 - 4 5V
3 9 I2C_SCL1 5 - 6 GND
4 7 GPIO_GCLK 7 - 8 UART_TXD0 15 14
GND 9 - 10 UART_RXD0 16 15
17 0 GPIO_GEN0 11 - 12 GPIO_GEN1 1 18
27 2 GPIO_GEN2 13 - 14 GND
22 3 GPIO_GEN3 15 - 16 GPIO_GEN4 4 23
3V3 17 - 18 GPIO_GEN5 5 24
10 12 SPI_MOSI 19 - 20 GND
9 13 SPI_MISO 21 - 22 GPIO_GEN6 6 25
11 14 SPI_SCLK 23 - 24 SPI_CE0_N 10 8
GND 25 - 26 SPI_CE1_N 11 7
0 30 I2C_SDA0 27 - 28 I2C_SCL0 31 1
5 21 GPIO_GEN11 29 - 30 GND
6 22 LAN_RUN 31 - 32 GPIO_GEN15 26 12
13 23 GPIO_GEN12 33 - 34 GND
19 24 GPIO_GEN13 35 - 36 STATUS_LED 27 16
26 25 GPIO_GEN14 37 - 38 GPIO_GEN17 28 20
GND 39 - 40 GPIO_GEN18 29 21


Connecteur P1 (Modèle A et B PCB V2.0)


BCM SysIo Name Physical Name SysIo BCM
3V3 1 - 2 5V
2 8 I2C_SDA1 3 - 4 5V
3 9 I2C_SCL1 5 - 6 GND
4 7 GPIO_GCLK 7 - 8 UART_TXD0 15 14
GND 9 - 10 UART_RXD0 16 15
17 0 GPIO_GEN0 11 - 12 GPIO_GEN1 1 18
27 2 GPIO_GEN2 13 - 14 GND
22 3 GPIO_GEN3 15 - 16 GPIO_GEN4 4 23
3V3 17 - 18 GPIO_GEN5 5 24
10 12 SPI_MOSI 19 - 20 GND
9 13 SPI_MISO 21 - 22 GPIO_GEN6 6 25
11 14 SPI_SCLK 23 - 24 SPI_CE0_N 10 8
GND 25 - 26 SPI_CE1_N 11 7


Connecteur P5 (Modèle A et B PCB V2.0), la broche Physical 27 correspond à la broche 1 du connecteur P5:


BCM SysIo Name Physical Name SysIo BCM
5V 27 - 28 3V3
28 17 GPIO_GEN7 29 - 30 GPIO_GEN8 18 29
30 19 GPIO_GEN9 31 - 32 GPIO_GEN10 20 31
GND 33 - 33 GND


Connecteur P1 (Modèle B PCB V1.0, Q3 2012, Board Rev <= 3)


BCM SysIo Name Physical Name SysIo BCM
3V3 1 - 2 5V
0 8 I2C_SDA 3 - 4 5V
1 9 I2C_SCL 5 - 6 GND
4 7 GPIO_GCLK 7 - 8 UART_TXD0 15 14
GND 9 - 10 UART_RXD0 16 15
17 0 GPIO_GEN0 11 - 12 GPIO_GEN1 1 18
21 2 GPIO_GEN2 13 - 14 GND
22 3 GPIO_GEN3 15 - 16 GPIO_GEN4 4 23
3V3 17 - 18 GPIO_GEN5 5 24
10 12 SPI_MOSI 19 - 20 GND
9 13 SPI_MISO 21 - 22 GPIO_GEN6 6 25
11 14 SPI_SCLK 23 - 24 SPI_CE0_N 10 8
GND 25 - 26 SPI_CE1_N 11 7

Classes

struct  xRpi
 Information sur le Raspberry Pi. More...
 

Functions

int iRpiRev (void)
 Retourne la revision du raspberry. More...
 
const xRpipxRpiInfo (void)
 Lecture des informations sur le Raspberry Pi. More...
 
const char * sRpiMcuToStr (eRpiMcu eMcu)
 Chaîne de caractères correspondant à un mcu. More...
 
const char * sRpiModelToStr (eRpiModel eModel)
 Chaîne de caractères correspondant à un modèle. More...
 

Macros

#define GPIO0   30
 
#define GPIO1   31
 
#define GPIO10   12
 
#define GPIO11   14
 
#define GPIO12   26
 
#define GPIO13   23
 
#define GPIO14   15
 
#define GPIO15   16
 
#define GPIO16   27
 
#define GPIO17   0
 
#define GPIO18   1
 
#define GPIO19   24
 
#define GPIO2   8
 
#define GPIO20   28
 
#define GPIO21   29
 
#define GPIO22   3
 
#define GPIO23   4
 
#define GPIO24   5
 
#define GPIO25   6
 
#define GPIO26   25
 
#define GPIO27   2
 
#define GPIO28   17
 
#define GPIO29   18
 
#define GPIO3   9
 
#define GPIO30   19
 
#define GPIO31   20
 
#define GPIO4   7
 
#define GPIO5   21
 
#define GPIO6   22
 
#define GPIO7   11
 
#define GPIO8   10
 
#define GPIO9   13
 
#define GPIO_GCLK   7
 
#define GPIO_GEN0   0
 
#define GPIO_GEN1   1
 
#define GPIO_GEN10   20
 
#define GPIO_GEN11   21
 
#define GPIO_GEN12   23
 
#define GPIO_GEN13   24
 
#define GPIO_GEN14   25
 
#define GPIO_GEN15   26
 
#define GPIO_GEN17   28
 
#define GPIO_GEN18   29
 
#define GPIO_GEN2   2
 
#define GPIO_GEN3   3
 
#define GPIO_GEN4   4
 
#define GPIO_GEN5   5
 
#define GPIO_GEN6   6
 
#define GPIO_GEN7   17
 
#define GPIO_GEN8   18
 
#define GPIO_GEN9   19
 
#define I2C_SCL   9
 
#define I2C_SCL0   31
 
#define I2C_SCL1   9
 
#define I2C_SDA   8
 
#define I2C_SDA0   30
 
#define I2C_SDA1   8
 
#define LAN_RUN   22
 
#define SPI_CE0_N   10
 
#define SPI_CE1_N   11
 
#define SPI_MISO   13
 
#define SPI_MOSI   12
 
#define SPI_SCLK   14
 
#define STATUS_LED   27
 
#define UART_RXD   16
 
#define UART_RXD0   16
 
#define UART_TXD   15
 
#define UART_TXD0   15
 

Typedefs

typedef struct xRpi xRpi
 Information sur le Raspberry Pi.
 

Enumerations

enum  eRpiMcu { eRpiMcuBcm2708, eRpiMcuBcm2709, eRpiMcuBcm2710, eRpiMcuUnknown = -1 }
 Type de MCU SoC.
 
enum  eRpiModel {
  eRpiModelA, eRpiModelB, eRpiModelAPlus, eRpiModelBPlus,
  eRpiModelComputeModule, eRpiModel2B, eRpiModelZero, eRpiModel3B,
  eRpiModelZeroW, eRpiModelComputeModule3, eRpiModelUnknown = -1
}
 Modèle de Raspberry Pi.
 

Function Documentation

int iRpiRev ( void  )

#include <rpi.h>

Retourne la revision du raspberry.

Returns
la révision matérielle, 0 si le système n'est pas un rpi ou -1 en cas d'erreur.
const xRpi* pxRpiInfo ( void  )

#include <rpi.h>

Lecture des informations sur le Raspberry Pi.

Dernière mise à jour du tableau au 06/08/2017.

Returns
Pointeur sur les informations, NULL si erreur Board Revision History (from elinux.org) :

Revision Release Date Model PCB Revision Memory Notes
Beta Q1 2012 B (Beta) ? 256MB Beta Board
0002 Q1 2012 B 1.0 256MB
0003 Q3 2012 B (ECN0001) 1.0 256MB Fuses mod and D14 removed
0004 Q3 2012 B 2.0 256MB Mfg by Sony
0005 Q4 2012 B 2.0 256MB Mfg by Qisda
0006 Q4 2012 B 2.0 256MB Mfg by Egoman
0007 Q1 2013 A 2.0 256MB Mfg by Egoman
0008 Q1 2013 A 2.0 256MB Mfg by Sony
0009 Q1 2013 A 2.0 256MB Mfg by Qisda
000d Q4 2012 B 2.0 512MB Mfg by Egoman
000e Q4 2012 B 2.0 512MB Mfg by Sony
000f Q4 2012 B 2.0 512MB Mfg by Qisda
0010 Q3 2014 B+ 1.0 512MB Mfg by Sony
0011 Q2 2014 Compute Module 1.0 512MB Mfg by Sony
0012 Q4 2014 A+ 1.0 256MB Mfg by Sony
0013 Q1 2015 B+ 1.2 512MB ?
0014 Q2 2014 Compute Module 1.0 512MB Mfg by Embest, China
0015 Q1 2015 A+ 1.1 512MB Mfg by Embest, China
900021 Q3 2016 A+ 1.1 512MB Mfg by Sony
900032 Q2 2016? B+ 1.2 512MB Mfg by Sony
a01040 Unknown 2 Model B 1.0 1GB Unknown
a01041 Q1 2015 2 Model B 1.1 1GB Mfg by Sony
a21041 Q1 2015 2 Model B 1.1 1GB Mfg by Embest, China
a22042 Q3 2016 2 Model B 1.2 1GB Mfg by Embest, China
900092 Q4 2015 Zero 1.2 512MB Mfg by Sony
900093 Q2 2016 Zero 1.3 512MB Mfg by Sony
920093 Q4 2016? Zero 1.3 512MB Mfg by Embest
9000c1 Q1 2017 Zero W 1.1 512MB Mfg by Sony
a02082 Q1 2016 3 Model B 1.2 1GB Mfg by Sony
a020a0 Q1 2017 CM3 / CM3 Lite 1.0 1GB Mfg by Sony
a22082 Q1 2016 3 Model B 1.2 1GB Mfg ?
a32082 Q4 2016 3 Model B 1.2 1GB Mfg by Sony Japan
const char* sRpiMcuToStr ( eRpiMcu  eMcu)

#include <rpi.h>

Chaîne de caractères correspondant à un mcu.

Parameters
eMcumcu
Returns
string correspondante
const char* sRpiModelToStr ( eRpiModel  eModel)

#include <rpi.h>

Chaîne de caractères correspondant à un modèle.

Parameters
eModelmodèle
Returns
string correspondante