RPi: Improve board revision detection (#681)

Revision detection is done at runtime, the configure script has been
simplified to reflect this.
This commit is contained in:
Marcelo Aquino
2016-12-07 21:17:59 +01:00
committed by Patrick Fallberg
parent fdbb285dee
commit 62b74bb88a
6 changed files with 326 additions and 87 deletions
+6 -2
View File
@@ -19,12 +19,16 @@
* Based on wiringPi Copyright (c) 2012 Gordon Henderson.
*/
#ifndef pins_io_h
#define pins_io_h
#ifndef rpi_util_h
#define rpi_util_h
#include <stdint.h>
#include "bcm2835.h"
const int pin_to_gpio_rev1[41] = {-1, -1, -1, 0, -1, 1, -1, 4, 14, -1, 15, 17, 18, 21, -1, 22, 23, -1, 24, 10, -1, 9, 25, 11, 8, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
const int pin_to_gpio_rev2[41] = {-1, -1, -1, 2, -1, 3, -1, 4, 14, -1, 15, 17, 18, 27, -1, 22, 23, -1, 24, 10, -1, 9, 25, 11, 8, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
const int pin_to_gpio_rev3[41] = {-1, -1, -1, 2, -1, 3, -1, 4, 14, -1, 15, 17, 18, 27, -1, 22, 23, -1, 24, 10, -1, 9, 25, 11, 8, -1, 7, -1, -1, 5, -1, 6, 12, 13, -1, 19, 16, 26, 20, -1, 21 };
namespace rpi_util {
typedef enum {