Add call to get_pin_map() in pwms_init()

Move get_pin_map() into platform_init
This commit is contained in:
philip 2016-02-29 22:40:39 -05:00
parent 41022c3b6a
commit dbaad1b81c
2 changed files with 3 additions and 4 deletions

View File

@ -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
}
}

View File

@ -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);
}
/*