rpi: Added Raspberry Pi 3 B+ to Hardware Versions with corrections
Signed-off-by: Chuck Duey <cduey@msn.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
committed by
Mihai Tudor Panu
parent
66c2478183
commit
d3207769e7
@@ -39,6 +39,7 @@ extern "C" {
|
||||
#define MRAA_RASPBERRY_PI_ZERO_PINCOUNT 41
|
||||
#define MRAA_RASPBERRY_PI3_B_PINCOUNT 41
|
||||
#define MRAA_RASPBERRY_PI_ZERO_W_PINCOUNT 41
|
||||
#define MRAA_RASPBERRY_PI3_B_PLUS_PINCOUNT 41
|
||||
|
||||
mraa_board_t *
|
||||
mraa_raspberry_pi();
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#define PLATFORM_NAME_RASPBERRY_PI_ZERO "Raspberry Pi Zero"
|
||||
#define PLATFORM_NAME_RASPBERRY_PI3_B "Raspberry Pi 3 Model B"
|
||||
#define PLATFORM_NAME_RASPBERRY_PI_ZERO_W "Raspberry Pi Zero W"
|
||||
#define PLATFORM_NAME_RASPBERRY_PI3_B_PLUS "Raspberry Pi 3 Model B+"
|
||||
#define PLATFORM_RASPBERRY_PI_B_REV_1 1
|
||||
#define PLATFORM_RASPBERRY_PI_A_REV_2 2
|
||||
#define PLATFORM_RASPBERRY_PI_B_REV_2 3
|
||||
@@ -53,6 +54,7 @@
|
||||
#define PLATFORM_RASPBERRY_PI_ZERO 8
|
||||
#define PLATFORM_RASPBERRY_PI3_B 9
|
||||
#define PLATFORM_RASPBERRY_PI_ZERO_W 10
|
||||
#define PLATFORM_RASPBERRY_PI3_B_PLUS 11
|
||||
#define MMAP_PATH "/dev/mem"
|
||||
#define BCM2835_PERI_BASE 0x20000000
|
||||
#define BCM2836_PERI_BASE 0x3f000000
|
||||
@@ -503,6 +505,12 @@ mraa_raspberry_pi()
|
||||
b->platform_name = PLATFORM_NAME_RASPBERRY_PI_ZERO_W;
|
||||
platform_detected = PLATFORM_RASPBERRY_PI_ZERO_W;
|
||||
b->phy_pin_count = MRAA_RASPBERRY_PI_ZERO_W_PINCOUNT;
|
||||
} else if (strstr(line, "a020d3")) {
|
||||
b->platform_name = PLATFORM_NAME_RASPBERRY_PI3_B_PLUS;
|
||||
platform_detected = PLATFORM_RASPBERRY_PI3_B_PLUS;
|
||||
b->phy_pin_count = MRAA_RASPBERRY_PI3_B_PLUS_PINCOUNT;
|
||||
peripheral_base = BCM2837_PERI_BASE;
|
||||
block_size = BCM2837_BLOCK_SIZE;
|
||||
} else {
|
||||
b->platform_name = PLATFORM_NAME_RASPBERRY_PI_B_REV_1;
|
||||
platform_detected = PLATFORM_RASPBERRY_PI_B_REV_1;
|
||||
@@ -565,6 +573,10 @@ mraa_raspberry_pi()
|
||||
b->platform_name = PLATFORM_NAME_RASPBERRY_PI_ZERO_W;
|
||||
platform_detected = PLATFORM_RASPBERRY_PI_ZERO_W;
|
||||
b->phy_pin_count = MRAA_RASPBERRY_PI_ZERO_W_PINCOUNT;
|
||||
} else if (mraa_file_contains(compatible_path, "raspberrypi,3-model-b-plus")) {
|
||||
b->platform_name = PLATFORM_NAME_RASPBERRY_PI3_B_PLUS;
|
||||
platform_detected = PLATFORM_RASPBERRY_PI3_B_PLUS;
|
||||
b->phy_pin_count = MRAA_RASPBERRY_PI3_B_PLUS_PINCOUNT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -831,7 +843,8 @@ mraa_raspberry_pi()
|
||||
(platform_detected == PLATFORM_RASPBERRY_PI2_B_REV_1) ||
|
||||
(platform_detected == PLATFORM_RASPBERRY_PI3_B) ||
|
||||
(platform_detected == PLATFORM_RASPBERRY_PI_ZERO) ||
|
||||
(platform_detected == PLATFORM_RASPBERRY_PI_ZERO_W)) {
|
||||
(platform_detected == PLATFORM_RASPBERRY_PI_ZERO_W) ||
|
||||
(platform_detected == PLATFORM_RASPBERRY_PI3_B_PLUS)) {
|
||||
|
||||
strncpy(b->pins[27].name, "ID_SD", MRAA_PIN_NAME_SIZE);
|
||||
b->pins[27].capabilities = (mraa_pincapabilities_t){ 1, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
Reference in New Issue
Block a user