Hello, i am trying to find way. To define button for switching off and on leds. On board KL27z.
Here is what i am trying to do in the function:
But i cant find a way how to use the button connected on PTE21.
Can anyone help me ?
Hope you are doing well. I would recommend that you refer to the gpio_input_interrupt SDK example. You can download the SDK from this page: SDK Builder.
After downloading the SDK, you need to drag and drop the SDK into the "Installed SDK's view" in MCUXpresso.
To import and example, you must click "Import SDK example(s)…", Select the frdmkl27z, and click next:
Then you need to select the example: driver_examples>gpio>gpio_input_iunterrupt:
Hope this helps.