From: Junhwan Park Date: Tue, 4 Apr 2017 12:27:10 +0000 (+0900) Subject: artik053: export GPIO pins at boot X-Git-Tag: 1.1_Public_Release~614^2~122 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c506acb27041be87b128e96ed648426f1713c56e;p=rtos%2Ftinyara.git artik053: export GPIO pins at boot Export GPIO pins that are actually supported on the ARTIK-053 starter kit. Change-Id: Ie06626bb89513f8b90d7f9d07acc33c1b4fcb0d6 Signed-off-by: Junhwan Park --- diff --git a/os/arch/arm/src/artik053/src/artik053_boot.c b/os/arch/arm/src/artik053/src/artik053_boot.c index cccc67c..004eda1 100644 --- a/os/arch/arm/src/artik053/src/artik053_boot.c +++ b/os/arch/arm/src/artik053/src/artik053_boot.c @@ -85,9 +85,42 @@ ****************************************************************************/ static void s5j_gpioinitialize(void) { - up_create_gpio(1); - up_create_gpio(2); - up_create_gpio(3); + /* List of available GPIO IDs */ + + int artik053_gpio_list[] = { + 30, /* ARTIK_A053_XGPIO1 */ + 31, /* ARTIK_A053_XGPIO2 */ + 32, /* ARTIK_A053_XGPIO3 */ + 37, /* ARTIK_A053_XGPIO8 */ + 38, /* ARTIK_A053_XGPIO9 */ + 39, /* ARTIK_A053_XGPIO10 */ + 40, /* ARTIK_A053_XGPIO11 */ + 41, /* ARTIK_A053_XGPIO12 */ + 42, /* ARTIK_A053_XGPIO13 */ + 43, /* ARTIK_A053_XGPIO14 */ + 44, /* ARTIK_A053_XGPIO15 */ + 45, /* ARTIK_A053_XGPIO16 */ + 46, /* ARTIK_A053_XGPIO17 */ + 47, /* ARTIK_A053_XGPIO18 */ + 48, /* ARTIK_A053_XGPIO19 */ + 49, /* ARTIK_A053_XGPIO20 */ + 50, /* ARTIK_A053_XGPIO21 */ + 51, /* ARTIK_A053_XGPIO22 */ + 52, /* ARTIK_A053_XGPIO23 */ + 53, /* ARTIK_A053_XGPIO24 */ + 54, /* ARTIK_A053_XGPIO25 */ + 55, /* ARTIK_A053_XGPIO26 */ + 57, /* ARTIK_A053_XEINT0 */ + 58, /* ARTIK_A053_XEINT1 */ + 59 /* ARTIK_A053_XEINT2 */ + }; + + int i; + int count = sizeof(artik053_gpio_list) / sizeof(artik053_gpio_list[0]); + + for (i = 0; i < count; i++) { + up_create_gpio(artik053_gpio_list[i]); + } } /*****************************************************************************