Macro |
|
Call debug with a specified value in w register (the MCU accumulator) |
Purpose |
|
To identify the given breakpoint via the w value |
Syntax |
|
void breakpoint(uns8 wValue) Alternative syntax void debugW(uns8 wValue) is also possible. |
Parameters |
|
wValue: Value to be put into w register |
Return value |
|
– |
Output values |
|
• W = wValue • debug called |
Preconditions |
|
– |
Remarks |
|
The corresponding wValue is displayed in IQRF IDE when a breakpoint is reached. |
Side effects |
|
– |
See also |
|
|
Example 1 |
|
if(!eeeReadData(0x000)) // External EEPROM test { breakpoint(1); // Read unsuccessful, stopped with W == 1 } else { breakpoint(2); // Read successful, stopped with W == 2 } |
Example 2 |
|
// The same as Example 1 but with the alternative syntax debugW
if(!eeeReadData(0x000)) // External EEPROM test { debugW(1); // Read unsuccessful, stopped with W == 1 } else { debugW(2); // Read successful, stopped with W == 2 } |