E electricity86 New Member Apr 1, 2009 #1 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.
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.
Papabravo Well-Known Member Most Helpful Member Apr 1, 2009 #2 Should be zeros! Was this a trick question? Last edited: Apr 1, 2009
E electricity86 New Member Apr 1, 2009 #3 no, thanks. So if HAL_KEY_POINT_HIGH_USED was equal 1, Then the value of P0IFG would be 0x0F?
Sceadwian Banned Apr 1, 2009 #4 0 OR 0 = 0 I'm not sure why you're having a problem with this question?
DirtyLude Well-Known Member Apr 1, 2009 #5 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.
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.
Sceadwian Banned Apr 1, 2009 #6 In digital logic x's are commonly used to indicated an 'unknown' state.
Papabravo Well-Known Member Most Helpful Member Apr 1, 2009 #7 electricity86 said: no, thanks. So if HAL_KEY_POINT_HIGH_USED was equal 1, Then the value of P0IFG would be 0x0F? Click to expand... No it would be 1 as in 0x01 | 0x00 = 0x01 all day every day
electricity86 said: no, thanks. So if HAL_KEY_POINT_HIGH_USED was equal 1, Then the value of P0IFG would be 0x0F? Click to expand... No it would be 1 as in 0x01 | 0x00 = 0x01 all day every day