hal_gpio_pin_config_t pin1;
pin1.direction = kHAL_GpioDirectionIn;
pin1.pin = 1;
pin1.port = 0;
HAL_GpioInit(&tl_Pin1GPIOHandler, &pin1);
HAL_GpioInstallCallback(&tl_Pin1GPIOHandler,Pin1IrqEvent,0);
hal_gpio_pin_config_t pin2;
pin2.direction = kHAL_GpioDirectionIn;
pin2.pin = 2;
pin2.port = 0;
HAL_GpioInit(&tl_Pin2GPIOHandler, &pin2);
HAL_GpioInstallCallback(&tl_Pin2GPIOHandler,Pin2IrqEvent,0);
The existing HAL_GpioInstallCallback() code will overwrite the pin1
assignment from above. I had to modify the code so that the
HAL_GpioInstallCallback() would link list to the last entry to assign to.