From dbaad1b81c0b17ebbb5e4f2d806c9328303b027d Mon Sep 17 00:00:00 2001 From: philip Date: Mon, 29 Feb 2016 22:40:39 -0500 Subject: [PATCH] Add call to get_pin_map() in pwms_init() Move get_pin_map() into platform_init --- app/platform/pin_map.c | 2 -- app/platform/platform.c | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/platform/pin_map.c b/app/platform/pin_map.c index 9d30dd1b..6ad4fe87 100644 --- a/app/platform/pin_map.c +++ b/app/platform/pin_map.c @@ -9,7 +9,6 @@ uint8_t pin_func[GPIO_PIN_NUM]; #ifdef GPIO_INTERRUPT_ENABLE uint8_t pin_num_inv[GPIO_PIN_NUM_INV]; uint8_t pin_int_type[GPIO_PIN_NUM]; -uint8_t pin_trigger[GPIO_PIN_NUM]; #endif typedef struct { @@ -52,7 +51,6 @@ void get_pin_map(void) { #ifdef GPIO_INTERRUPT_ENABLE pin_num_inv[pin_num[i]] = i; pin_int_type[i] = pin[i].intr_type; - pin_trigger[i] = false; #endif } } diff --git a/app/platform/platform.c b/app/platform/platform.c index 08970e6f..0efe62e2 100755 --- a/app/platform/platform.c +++ b/app/platform/platform.c @@ -18,6 +18,9 @@ static void pwms_init(); int platform_init() { + // Setup the various forward and reverse mappings for the pins + get_pin_map(); + // Setup PWMs pwms_init(); @@ -182,10 +185,8 @@ static void ICACHE_RAM_ATTR platform_gpio_intr_dispatcher (void *dummy){ void platform_gpio_init( task_handle_t gpio_task ) { - int i; gpio_task_handle = gpio_task; - get_pin_map(); ETS_GPIO_INTR_ATTACH(platform_gpio_intr_dispatcher, NULL); } /*