I have a macro:
#define SPITXWAIT   while ( !( IFG1 & UTXIFG0 ) );  // Wait for the TX 
That is expanding to this:

    SPITXWAIT;                          // USART0 TX buffer ready?
    1994:       c2 93 02 00             cmp.b   #0,     &0x0002 
    1998:       fd 37                   jge     $-4     ;abs dst addr
0x1994

Even though this is seeminging to work, why is UTXIFG0 being expanded to
"#0" instead of "0x80" as it should be.  Here is the macro definitions
in the header file:
#define UTXIFG0             (1<<7)

Try as I might, I cannot get the cmp.b to compare w/ 0x80.  It seems
stuck on only comparing Zero with IFG1.  This also happens when I use
something else, like U0TCTL.  Or if I use this macro definition:
#define SPITXWAIT   while ( !( IFG1 & 0x80 ) );  // Wait for the TX 

Any ideas?
-Mark


Reply via email to