Button

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Button

699 次查看
Filip523
Contributor I

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:
GPIO_ClearPinsOutput(GPIOE, 1<<20u);
GPIO_SetPinsOutput(GPIOC, 1<<0u);
GPIO_SetPinsOutput(GPIOE, 1<<31u);
delay(5000000);
GPIO_ClearPinsOutput(GPIOC, 1<<0u);
GPIO_ClearPinsOutput(GPIOE, 1<<31u);
GPIO_SetPinsOutput(GPIOE, 1<<20u);

But i cant find a way how to use the button connected on PTE21.
Can anyone help me ? 
Thanks 
Filip

0 项奖励
1 回复

685 次查看
nxf58474
NXP Employee
NXP Employee

Hello Filip,

 

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:

nxf58474_3-1607701593594.png

 

Then you need to select the example: driver_examples>gpio>gpio_input_iunterrupt:

nxf58474_2-1607701584718.png

 

Hope this helps.

 

Best Regards,

Ricardo

0 项奖励