1. 程式人生 > >DEBUG技術 前面有寫過的

DEBUG技術 前面有寫過的

 

        statustmp = phhalHw_FieldOff ( pHal );

        CHECK_STATUS ( statustmp );
		
		
#define CHECK_STATUS(x) \
if ((x) != PH_ERR_SUCCESS) \
{\
DEBUG_PRINTF("file: "__FILE__", function: %s,Line: %d, Error - (0x%04X) has occurred\r\n", __FUNCTION__,__LINE__, (x)); \
}