From: Jeremy Tan Date: Fri, 27 Sep 2013 11:38:41 +0000 (+0800) Subject: Update luts (remove GPIO 117, which was marked as reserved) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=d39da301a24880f38989371731386020b9a02913;p=matches%2FMCTX3420.git Update luts (remove GPIO 117, which was marked as reserved) --- diff --git a/notes/pin maps/gpio/GPIO pin correspondence unrestricted.csv b/notes/pin maps/gpio/GPIO pin correspondence unrestricted.csv index e73ff12..42854dd 100644 --- a/notes/pin maps/gpio/GPIO pin correspondence unrestricted.csv +++ b/notes/pin maps/gpio/GPIO pin correspondence unrestricted.csv @@ -38,7 +38,6 @@ P9_17,5 P9_18,4 P9_23,49 P9_24,15 -P9_25,117 P9_26,14 P9_27,115 P9_30,112 diff --git a/notes/pin maps/gpio/gpionums.csv b/notes/pin maps/gpio/gpionums.csv index a7c061c..9dcb3a8 100644 --- a/notes/pin maps/gpio/gpionums.csv +++ b/notes/pin maps/gpio/gpionums.csv @@ -41,4 +41,3 @@ 89 112 115 -117 diff --git a/notes/pin maps/gpio/parseit.py b/notes/pin maps/gpio/parseit.py index e106f07..4fa7e7f 100644 --- a/notes/pin maps/gpio/parseit.py +++ b/notes/pin maps/gpio/parseit.py @@ -26,7 +26,7 @@ def doit(x): for i in range(0, 93): lutarr.append(lut.get(i, 0)) - for i in range(0, 118): #Max safe GPIO is 117 + for i in range(0, 116): #Max safe GPIO is 115 reverselutarr.append(reverselut.get(i, 0)) return (lutarr, reverselutarr) diff --git a/server/bbb_pin_defines.c b/server/bbb_pin_defines.c index 23e03c5..bfa39cc 100644 --- a/server/bbb_pin_defines.c +++ b/server/bbb_pin_defines.c @@ -10,13 +10,14 @@ * Where the returned value is 0, there is no GPIO pin * at that location. */ + const unsigned char g_pin_real_to_gpio[BBB_PIN_COUNT+1] = { 0, 0, 0, 0, 0, 0, 0, 66, 67, 69, 68, 45, 44, 0, 26, 47, 46, 27, 65, 0, 0, 0, 0, 0, 0, 0, 61, 86, 88, 87, 89, 10, 11, 9, 81, 8, 80, 78, 79, 76, 77, 74, 75, 72, 73, 70, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 60, 31, 0, 48, 0, 5, 4, 0, 0, 0, 0, 49, - 15, 117, 14, 115, 0, 0, 112, 0, 0, 0, 0, 0, 0, 0, + 15, 0, 14, 115, 0, 0, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -33,17 +34,17 @@ const unsigned char g_pin_gpio_to_index[GPIO_MAX_NUMBER+1] = { 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 128, 128, 128, 128, 37, 38, 39, 40, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 41, 128, 128, 42, 128, 43 + 41, 128, 128, 42, 128, 128 }; /** * Maps an index in g_gpio to the corresponding GPIO number. */ -const unsigned char g_pin_index_to_gpio[GPIO_NUM_PINS] = { +const unsigned char g_gpio_lut[GPIO_NUM_PINS] = { 4, 5, 8, 9, 10, 11, 14, 15, 26, 27, 30, 31, 44, 45, 46, 47, 48, 49, 60, 61, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 112, - 115, 117 + 115 }; /** diff --git a/server/bbb_pin_defines.h b/server/bbb_pin_defines.h index ea7de7e..868636b 100644 --- a/server/bbb_pin_defines.h +++ b/server/bbb_pin_defines.h @@ -118,9 +118,9 @@ #define GPIO_DEVICE_PATH "/sys/class/gpio" /** Number of useable GPIO pins **/ -#define GPIO_NUM_PINS 44 +#define GPIO_NUM_PINS 43 /** The max usable GPIO number **/ -#define GPIO_MAX_NUMBER 117 +#define GPIO_MAX_NUMBER 115 /* Luts */ extern const unsigned char g_pin_real_to_gpio[BBB_PIN_COUNT+1];