Commit dbaad1b8 authored by philip's avatar philip
Browse files

Add call to get_pin_map() in pwms_init()

Move get_pin_map() into platform_init
parent 41022c3b
......@@ -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
}
}
......
......@@ -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);
}
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment