This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

About AgsiSetSFRValue(DWORD dwValue)

hello,
I am engaged in developing a new SPeriDLL.dll(dialog) and I can't understand the following function and its specification:

BOOL About AgsiSetSFRValue(DWORD dwValue);

"This function is used to let the SFR read value C used to watch function with read access set for the SFR
Input Parameter
dwValue SFRReadValue;
return value:True if successful(otherwise FALSE)
EXAMPLE:
static void (void
{...
AgsiSetSFRValue(P1&PORT1);
...
}
"
I can't correctly understand the above explanation.can anybody give me more words?

thanks and best regards
huihl@163.com

Parents
  • I have this problem also, but I still can't understand. The example in app note shows
    AgsiSetSFRReadValue(P0 & PORT0); // P0 (Port0 SFR Value), PORT0 (Port0 pins)

    P0 is defined as 0x80 and PORT0 is VTR handle according to Jones Salivic's message. I can't understand how they can be logically or together. Could anybody explain more about this function ?

    Thanks and regards.

Reply
  • I have this problem also, but I still can't understand. The example in app note shows
    AgsiSetSFRReadValue(P0 & PORT0); // P0 (Port0 SFR Value), PORT0 (Port0 pins)

    P0 is defined as 0x80 and PORT0 is VTR handle according to Jones Salivic's message. I can't understand how they can be logically or together. Could anybody explain more about this function ?

    Thanks and regards.

Children
  • I don't understand either. Why are they ANDing the Port register address (0x80) with the port pins? How does that affect the return value? If I wanted to set pin 7, that would be the MSB of the value, which is 0x80, the port number... so how would the pin get set or cleared? Who wrote this function and what were they thinking? Why doesn't it take a register address and value?

    I'm really annoyed at this function because it *doesn't work*! I've tried calling it with 0xff, 0x00, and every combination in between, and the code always reads the SFR value....