MKE06 read pin

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MKE06 read pin

Jump to solution
546 Views
gangliu
Contributor II

Hello, Thank you for seeing my problem,.I use the MKE06Z.I would like to know how to read the level of a pin.  Please show me how it works.Thank you!999.png

So this is my way of reading the pin level with '|' and I feel like this is going to be a lot of trouble, every time.

Best Regards!

GANG LIU

0 Kudos
Reply
1 Solution
481 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi GANG,

Please refer the code shown below:

if((GPIO_Read(GPIOB) & 0x2000000)==0x2000000)

 

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
1 Reply
482 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi GANG,

Please refer the code shown below:

if((GPIO_Read(GPIOB) & 0x2000000)==0x2000000)

 

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply