Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

line of code.

Status
Not open for further replies.

electricity86

New Member
What does this line mean:

P0IFG = (HAL_KEY_P0INT_LOW_USED | HAL_KEY_POINT_HIGH_USED);

Where:
#define HAL_KEY_P0INT_LOW_USED 0
#define HAL_KEY_POINT_HIGH_USED 0

What will be inside P0IFG after that line, if before that line, his value was xxxxxxxx (eight 'x's).

Thanks.
 
Should be zeros!
Was this a trick question?
 
Last edited:
0 OR 0 = 0
I'm not sure why you're having a problem with this question?
 
I guess,

1. there's no such numeric value as 8 x's unless it was something like base 40 or something.

2. The pipe character '|' is a bitwise or operator in C. Google 'bitwise or' and you'll get an explanation of how it works.
 
In digital logic x's are commonly used to indicated an 'unknown' state.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top